/* ============================================================
   RESPONSIVE.CSS — Adaptive layout for webadvokat.com.ua
   Breakpoints: 1199px | 991px | 768px | 576px | 480px | 375px
   ============================================================ */

/* =============================================================
   GLOBAL RESETS — prevent horizontal scroll on all devices
   ============================================================= */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
    scroll-behavior: smooth;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img,
iframe {
    max-width: 100%;
}

.container,
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100%;
}

/* =============================================================
   HEADER / NAVBAR — Global styles
   ============================================================= */
.header {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: clip;
    /* no horizontal scroll from header pseudo-elements */
}

/* Sticky nav bar — single fixed strip */
.premium-sticky-menu {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100% !important;
    max-width: 100% !important;
    padding-left: clamp(12px, 3vw, 50px) !important;
    padding-right: clamp(12px, 3vw, 50px) !important;
    z-index: 999999 !important;
    box-sizing: border-box;
    transition: all 0.3s ease; /* Добавляем плавность */
}

.premium-sticky-menu.scrolled {
    background-color: rgba(17, 17, 17, 0.97) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.premium-sticky-menu:not(.scrolled) {
    background-color: transparent !important;
    box-shadow: none !important;
}

/* Fix mobile menu background when expanded */
.premium-sticky-menu.mobile-menu-open {
    background-color: rgba(17, 17, 17, 0.97) !important;
}

/* Navbar inner: keep all items on one line */
.navbar {
    padding: 0 !important;
    flex-wrap: nowrap !important;
}

/* Logo — smaller text on medium desktops */
.premium-logo {
    flex-shrink: 0;
    margin-right: 1rem !important;
}

.premium-logo-title {
    font-size: clamp(0.85rem, 1.5vw, 1.1rem) !important;
    white-space: nowrap;
}

.premium-logo-subtitle {
    font-size: clamp(0.6rem, 1vw, 0.75rem) !important;
}

/* Desktop nav links */
@media (min-width: 992px) {
    .navbar-nav .nav-link {
        font-size: clamp(0.7rem, 1.1vw, 0.9rem) !important;
        padding-left: clamp(0.4rem, 0.8vw, 0.85rem) !important;
        padding-right: clamp(0.4rem, 0.8vw, 0.85rem) !important;
        letter-spacing: 0.05em;
    }

    /* Language switcher sizing */
    .language_links.premium-lang-header a,
    .language_links.premium-lang-header span {
        font-size: clamp(0.7rem, 1vw, 0.85rem) !important;
    }

    .language_links.premium-lang-header {
        gap: 4px !important;
        padding-left: clamp(8px, 1vw, 16px) !important;
        flex-shrink: 0 !important;
    }
}

/* =============================================================
   HERO SECTION — no black gap
   ============================================================= */
/* =============================================================
HERO SECTION — Photo positioning and scaling
============================================================= */
.first_section {
flex: 1;
display: flex;
align-items: flex-start;
min-height: 80vh;
padding-top: 150px !important;
padding-bottom: 80px !important;
margin-top: 0 !important;
background-image:
linear-gradient(to right, rgba(17, 17, 17, 0.97) 0%, rgba(17, 17, 17, 0.82) 50%, rgba(17, 17, 17, 0.55) 100%),
url('../img/Work.webp');
background-size: cover;
background-position: center center;
}

/* Hero photo container — прижат к правому краю header */
.hero-photo-container {
position: absolute;
right: 0;
bottom: 0;
top: 80px;
height: calc(100% - 80px);
width: auto;
display: flex;
align-items: flex-end;
justify-content: flex-end;
z-index: 0;
pointer-events: none;
}

/* Hero photo — прижато к правому краю, без отступов */
.hero-photo {
width: auto;
height: 100%;
min-height: auto;
max-width: none;
object-fit: cover;
object-position: right bottom;
margin: 0;
padding: 0;
}

.first_section .container {
    position: relative;
    z-index: 2;
    padding-bottom: 0 !important;
}

/* Hero heading — fluid */
/* Hero content block: shift right from left edge */
.first_title {
    padding-left: clamp(3rem, 6vw, 8rem) !important;
}

.first_title h1,
.header .first_section .first_title h1 {
    font-size: clamp(2.5rem, 5vw + 0.5rem, 5rem) !important;
    line-height: 1.12 !important;
    margin-bottom: 2rem !important;
}

@media (max-width: 1440px) and (min-width: 992px) {
    .first_title {
        padding-left: 15px;
    }
    
    .first_title h1,
    .header .first_section .first_title h1 {
        font-size: clamp(3rem, 5vw, 4.5rem) !important;
    }
}

/* Trust bar: always horizontal */
.trust-bar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 1.5rem !important; /* Уменьшаем отступ для мобильных чтобы влезало */
    align-items: flex-start;
    justify-content: flex-start !important;
    margin: 2rem 0 2.5rem !important;
    padding: 1.5rem 0 !important;
    border-top: 1px solid rgba(182, 138, 82, 0.3);
    border-bottom: 1px solid rgba(182, 138, 82, 0.3);
    max-width: fit-content;
    overflow-x: auto; /* Позволяем скроллить если не влезает */
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 80px;
}

.trust-item .number {
    font-size: clamp(2rem, 4vw, 3rem) !important;
    color: var(--accent);
    font-family: 'Playfair Display', 'PlayfairDisplay Fallback', serif;
    font-weight: 700;
    line-height: 1;
}

.trust-item .label {
    font-size: clamp(0.7rem, 1.3vw, 0.85rem) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted, #a0a0a0);
    margin-top: 6px;
}

/* CTA button: moved lower */
.communication_button {
    margin-top: 2.5rem !important;
}

.communication_button a,
.btn-premium {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-width: 220px;
    max-width: 100%;
}

/* =============================================================
SECTION 2: ХТО МИ? — Photo with adaptive frames
Photo scales with text height, never cropped
Логика: при сжатии экрана отступы уменьшаются, картинка увеличивается
============================================================= */
.second_section {
height: auto !important;
min-height: auto !important;
}

/* Контейнер фото — растягивается по высоте текста */
.who_are_we_images {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
}

/* Wrapper с рамками слева/справа — полностью адаптивный */
.premium-image-wrapper {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
/* Меньше отступы */
padding: clamp(10px, 2vh, 30px) clamp(10px, 2vw, 40px);
}

/* Фото: contain = никогда не обрезается, больше по высоте */
.who_are_we_images .premium-image {
width: auto;
height: auto;
max-width: 100%;
max-height: clamp(500px, 85vh, 900px);
object-fit: contain;
object-position: center;
border-radius: 8px;
display: block;
}

/* =============================================================
GRIDS — Services, Features, Reviews
Base (desktop-first): explicit columns for symmetry
============================================================= */

/* 6 cards → 3+3 on desktop, 2+2+2 on tablet, 1 column on mobile */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* 8 items → 4+4 on desktop */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* 6 reviews → 3+3 on desktop */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.service-card,
.feature-item,
.review-card {
    min-width: 0;
    width: 100%;
}

/* Планшет и небольшой ноутбук (992–1199): при трёх-четырёх колонках
   карточка сжималась до ~230–300 px, и текст внутри ложился по два-три
   слова в строку. Даём меньше колонок — карточки шире, текст читается. */
@media (min-width: 992px) and (max-width: 1199px) {

    .services-grid,
    .reviews-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .features-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .case-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =============================================================
   CONTACT SECTION — no overflow
   ============================================================= */
.contact_section,
.fifth_section,
[class*="contact"] {
    overflow: hidden;
}

.premium-form {
    padding: clamp(1.5rem, 4vw, 3rem) !important;
    width: 100%;
    box-sizing: border-box;
}

/* Submit row — button left, link right */
.premium-form .d-flex.justify-content-between {
    flex-wrap: wrap;
    gap: 1rem;
}

/* =============================================================
   FOOTER
   ============================================================= */
.premium-footer {
    padding: clamp(3rem, 6vw, 5rem) 0 2rem !important;
}

.map-wrapper {
    min-height: 300px;
    overflow: hidden;
}

.map-wrapper iframe {
    min-height: 300px;
    display: block;
}

/* =============================================================
BREAKPOINT: 1024px – 1199px (Tablet/Desktop transition)
Fix text wrapping and trust bar spacing
============================================================= */
@media (min-width: 1024px) and (max-width: 1199px) {
  /* Reduce trust bar gap to prevent text wrapping */
  .trust-bar {
    gap: 1rem !important;
    padding: 1rem 0 !important;
  }
  
  /* Smaller trust items to fit in one row */
  .trust-item .number {
    font-size: 1.8rem !important;
  }
  
  .trust-item .label {
    font-size: 0.65rem !important;
  }
  
  /* Reduce title size to prevent overflow */
  .first_title h1,
  .header .first_section .first_title h1 {
    font-size: clamp(2.2rem, 4vw, 3.5rem) !important;
  }
  
  /* Less left padding */
  .first_title {
    padding-left: 1rem !important;
  }
}

/* =============================================================
BREAKPOINT: 992 – 1199px (Medium Desktop — "squeezing" zone)
Navbar is still horizontal but container is narrower
============================================================= */
@media (min-width: 992px) and (max-width: 1199px) {

    /* Hide subtitle to save horizontal space */
    .premium-logo-subtitle {
        display: none !important;
    }

    /* Smaller logo icon */
    .premium-logo-icon img {
        width: 38px !important;
        max-width: 38px !important;
        min-width: 38px !important;
        height: auto !important;
    }

    /* logo title: slightly smaller */
    .premium-logo-title {
        font-size: 0.88rem !important;
        white-space: nowrap;
    }

    /* Nav links: even tighter */
    .navbar-nav .nav-link {
        font-size: 0.72rem !important;
        padding-left: 0.38rem !important;
        padding-right: 0.38rem !important;
        letter-spacing: 0.04em;
        white-space: nowrap;
    }

    /* Lang switcher: compact */
    .language_links.premium-lang-header {
        gap: 2px !important;
        padding-left: 6px !important;
        white-space: nowrap;
        flex-shrink: 0 !important;
        display: flex !important;
        /* ensure it's visible */
    }

    .language_links.premium-lang-header a,
    .language_links.premium-lang-header span {
        font-size: 0.72rem !important;
    }

    /* navbar shouldn't wrap */
    .navbar {
        flex-wrap: nowrap !important;
    }

    /* Prevent navbar content from overflowing */
    .navbar-collapse {
        overflow: visible !important;
    }
}

/* =============================================================
BREAKPOINT: ≤ 991px (Tablet Landscape & below)
Hamburger menu activates, fullscreen overlay
============================================================= */
@media (max-width: 991px) {
  .header {
    min-height: auto;
  }
  
  /* Hide hero photo on tablet and below */
  .hero-photo-container {
    display: none !important;
  }
  
  /* Add background image to first section */
  .first_section {
    background-image: 
      linear-gradient(rgba(17, 17, 17, 0.88), rgba(17, 17, 17, 0.92)),
      url('../img/Main_photo.webp') !important;
    background-size: cover;
    background-position: center bottom;
    background-attachment: scroll;
  }

/* Center items */
  .trust-bar {
    justify-content: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  /* Center align trust items */
  .trust-item {
    align-items: center !important;
    text-align: center !important;
  }
  
  .communication_button {
    text-align: center !important;
  }
.scrolling {
display: none !important;
}

    /* Header background on mobile (always visible) */
    .premium-sticky-menu {
        background-color: rgba(42, 42, 42, 0.95) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }

    /* === FULLSCREEN OVERLAY MENU === */
    .navbar {
        position: relative !important;
        border-bottom: none !important;
    }
    
    .premium-header-bar {
        border-bottom: none !important;
    }

    .navbar-collapse {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background: rgba(42, 42, 42, 0.99) !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        z-index: 100000 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
        flex-grow: 0 !important;
        overflow-y: auto !important; /* Allow scrolling on small landscape screens */
        overflow-x: hidden !important;
    }

    .navbar-collapse.show {
        opacity: 1 !important;
        pointer-events: all !important;
    }

    /* Nav links in overlay: large, centered */
    .navbar-collapse .navbar-nav {
        align-items: center !important;
        width: 100% !important;
        flex-direction: column !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .navbar-collapse .navbar-nav .nav-item {
        width: 100%;
        text-align: center;
    }

    .navbar-collapse .navbar-nav .nav-link {
        font-size: 1.8rem !important;
        font-family: 'Playfair Display', 'PlayfairDisplay Fallback', serif !important;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        margin: 0.4rem 0 !important;
        padding: 0.6rem 1rem !important;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease !important;
        display: block;
        width: 100%;
    }

    .navbar-collapse.show .navbar-nav .nav-link {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }

    /* Stagger animations */
    .navbar-collapse.show .nav-item:nth-child(1) .nav-link {
        transition-delay: 0.07s;
    }

    .navbar-collapse.show .nav-item:nth-child(2) .nav-link {
        transition-delay: 0.13s;
    }

    .navbar-collapse.show .nav-item:nth-child(3) .nav-link {
        transition-delay: 0.19s;
    }

    .navbar-collapse.show .nav-item:nth-child(4) .nav-link {
        transition-delay: 0.25s;
    }

    .navbar-collapse.show .nav-item:nth-child(5) .nav-link {
        transition-delay: 0.31s;
    }

    .navbar-collapse.show .nav-item:nth-child(6) .nav-link {
        transition-delay: 0.37s;
    }

    /* Lang switcher in overlay: centered, bigger */
    .mobile-lang-switcher {
        margin-top: 3rem;
        display: flex !important;
        gap: 20px;
        align-items: center;
        justify-content: center;
        /* ← center, not right-aligned */
        width: 100%;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease 0.43s, transform 0.4s ease 0.43s;
    }

    .navbar-collapse.show .mobile-lang-switcher {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }

    .mobile-lang-switcher a {
        color: #a0a0a0;
        font-family: 'Playfair Display', 'PlayfairDisplay Fallback', serif;
        font-weight: 700;
        font-size: 1.5rem;
        /* bigger than before */
        text-decoration: none;
        transition: color 0.3s;
        text-transform: uppercase;
    }

    .mobile-lang-switcher a:hover,
    .mobile-lang-switcher a.active {
        color: #b68a52;
    }

    .mobile-lang-switcher span {
        color: rgba(255, 255, 255, 0.25);
        font-size: 1.2rem;
    }

    /* Desktop-only lang switcher must be HIDDEN in overlay */
    .navbar-collapse .language_links.premium-lang-header {
        display: none !important;
    }

    /* Hamburger stays above overlay */
    .navbar-toggler {
        z-index: 100001 !important;
        position: relative !important;
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
    }

    /* Hero on tablet landscape */
    .first_section {
        min-height: auto;
        padding-top: 130px !important;
        padding-bottom: 60px !important;
    }

    .first_title h1,
    .header .first_section .first_title h1 {
        font-size: clamp(2.2rem, 5vw, 3.5rem) !important;
    }

    /* Grids: 2 columns on tablet landscape */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }

.reviews-grid {
grid-template-columns: repeat(2, 1fr);
}

/* Second section photo on tablet */
.second_section {
height: auto !important;
}

.who_are_we_images {
min-height: 450px;
margin-top: 2rem !important;
}

.premium-image-wrapper {
padding: 20px clamp(20px, 4vw, 50px);
}

.who_are_we_images .premium-image {
height: 100%;
max-height: 500px;
}

.map-wrapper,
    .map-wrapper iframe {
        min-height: 350px;
    }
}

/* =============================================================
BREAKPOINT: ≤ 768px (Tablet Portrait) - Blurred background
============================================================= */
@media (max-width: 768px) {

  /* Hero: full-height with blurred background */
  .first_section {
    min-height: auto;
    padding-top: 180px !important;
    padding-bottom: 60px !important;
    background-image:
      linear-gradient(rgba(17, 17, 17, 0.85), rgba(17, 17, 17, 0.90)),
      url('../img/Main_photo.webp');
    background-size: cover;
    background-position: center bottom;
    filter: blur(0px);
  }
  
  /* Add blur effect to background image only */
  .first_section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/Main_photo.webp');
    background-size: cover;
    background-position: center bottom;
    filter: blur(3px);
    z-index: 0;
    opacity: 0.3;
  }
  
  .first_section .container {
    position: relative;
    z-index: 2;
  }

/* Text centered on mobile */
  .first_title {
    text-align: center !important;
    margin: 0 auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .first_title h1,
  .header .first_section .first_title h1 {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Trust bar centered on mobile */
  .trust-bar {
    justify-content: center !important;
    gap: 1.5rem !important;
  }
  
  .trust-item {
    align-items: center !important;
    text-align: center !important;
  }

  /* Contact form full width on mobile */
  .sixth_section .col-md-10.offset-md-1,
  #sixth_section .col-md-10.offset-md-1,
  section#sixth_section .col-12 + div {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    max-width: 100% !important;
  }
  
  /* Premium form full width */
  .premium-form {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

    /* Services: 2 columns */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Reviews: 2 columns */
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Features: 4 → 2 columns */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Section headings */
    .section_text h2,
    .premium-heading {
        font-size: clamp(1.8rem, 5vw, 2.5rem) !important;
    }

    /* Contact form */
    .col-md-10.offset-md-1 {
        width: 100% !important;
        margin-left: 0 !important;
        padding: 0 !important;
    }

    /* Footer */
    .footer-contact-info {
        text-align: center;
        margin-bottom: 2rem;
    }

    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .social-links-premium {
        justify-content: center;
    }

    .map-wrapper,
    .map-wrapper iframe {
        min-height: 280px;
    }
}

/* =============================================================
   BREAKPOINT: ≤ 576px (Mobile Landscape / Large Phone)
   ============================================================= */
@media (max-width: 576px) {

    .first_section {
        padding-top: 180px !important;
        padding-bottom: 40px !important;
        min-height: auto !important;
    }

    .trust-bar {
        gap: 1rem 2rem !important;
        max-width: 100% !important;
    }

    /* CTA button: full width */
    .communication_button a,
    .btn-premium {
        width: 100% !important;
        min-width: unset;
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
        justify-content: center;
    }

    /* Services: 1 column */
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    /* Features: 2 columns */
    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem;
    }

/* Reviews: 1 column */
.reviews-grid {
grid-template-columns: 1fr !important;
gap: 1rem;
}

/* Second section photo on mobile */
.who_are_we_images {
min-height: 350px !important;
margin-top: 2rem !important;
}

.premium-image-wrapper {
padding: 15px !important;
}

.who_are_we_images .premium-image {
height: 100%;
width: auto;
max-width: 100%;
max-height: 400px;
}

/* Contact form */
    .premium-form {
        padding: 1.5rem 1rem !important;
        border-radius: 8px;
    }

    /* Submit button row: stack vertically */
    .premium-form .d-flex.justify-content-between {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    /* Footer */
    .premium-footer {
        text-align: center;
    }

    .footer-heading {
        display: block;
        text-align: center;
    }

    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .social-links-premium {
        justify-content: center;
        gap: 8px;
    }

    .map-wrapper,
    .map-wrapper iframe {
        min-height: 250px;
    }

    .language_links.premium-lang {
        justify-content: center !important;
        margin-top: 1rem;
    }

    .section {
        padding: 50px 15px !important;
    }
}

/* =============================================================
   BREAKPOINT: ≤ 480px (Standard Mobile Portrait)
   ============================================================= */
@media (max-width: 480px) {

    .first_title h1,
    .header .first_section .first_title h1 {
        font-size: clamp(2.2rem, 9vw, 2.8rem) !important;
        line-height: 1.2 !important;
    }

    .trust-bar {
        gap: 0.5rem !important;
        justify-content: space-between !important;
        max-width: 100% !important;
        flex-wrap: nowrap !important;
        /* подпись «Успешных решений» упиралась в самый край экрана */
        padding-right: 0.75rem !important;
    }

    .trust-item {
        min-width: 0;
        flex: 1;
        text-align: center;
    }

    .trust-item .number {
        font-size: 1.8rem !important;
    }

    .trust-item .label {
        font-size: 0.65rem !important;
        letter-spacing: 0 !important;
        word-break: break-word;
    }

    /* Logo */
    .premium-logo-title {
        font-size: 0.9rem !important;
        white-space: nowrap;
        line-height: 1.25;
        max-width: none;
    }

    .premium-logo-icon img {
        width: 34px !important;
        max-width: 34px !important;
        min-width: 34px !important;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .reviews-grid {
        grid-template-columns: 1fr !important;
    }

    .review-card {
        padding: 1.5rem !important;
    }

    .section_text p,
    .who_are_we_text p {
        font-size: 0.95rem !important;
        line-height: 1.65;
    }

    /* Mobile overlay menu: slightly smaller links */
    .navbar-collapse .navbar-nav .nav-link {
        font-size: 1.5rem !important;
        margin: 0.3rem 0 !important;
    }

    .mobile-lang-switcher a {
        font-size: 1.2rem;
    }
}

/* =============================================================
   BREAKPOINT: ≤ 375px (Small Mobile)
   ============================================================= */
@media (max-width: 375px) {

    .first_title h1,
    .header .first_section .first_title h1 {
        font-size: clamp(1.9rem, 9vw, 2.4rem) !important;
    }

    .trust-item {
        min-width: 0;
        flex: 1 1 80px;
    }

    .trust-item .number {
        font-size: 1.6rem !important;
    }

    .service-card {
        padding: 2rem 1.5rem !important;
    }

    .feature-item {
        padding: 1.5rem 1rem !important;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    .premium-logo-subtitle {
        display: none;
    }
}

/* Узкие телефоны: логотип с крупным названием выталкивал кнопку меню
   за край экрана (на 320 px — на 69 px, кнопка становилась недоступна).
   Ужимаем название и иконку, логотипу разрешаем сжиматься. */
@media (max-width: 420px) {

    .premium-logo {
        margin-right: 0.5rem !important;
        min-width: 0;
    }

    .premium-logo-title {
        font-size: 0.74rem !important;
        letter-spacing: 0.02em;
    }

    .premium-logo-icon img {
        width: 30px !important;
        max-width: 30px !important;
        min-width: 30px !important;
    }

    .navbar-toggler {
        margin-left: auto !important;
        margin-right: 0 !important;
        flex: 0 0 auto;
    }
}

@media (max-width: 340px) {

    .premium-logo-title {
        font-size: 0.66rem !important;
    }
}

/* =============================================================
BREAKPOINT: 1920-2559px (Full HD)
============================================================= */
@media (min-width: 1920px) and (max-width: 2559px) {
/* Second section photo — только тонкая настройка если нужно */
}

/* =============================================================
BREAKPOINT: 1200-1919px (Средние экраны)
============================================================= */
@media (min-width: 1200px) and (max-width: 1919px) {
/* меньше рамки */
.premium-image-wrapper {
padding: 5px 8px !important;
}
}

/* =============================================================
BREAKPOINT: 1200-1439px (около 1024-1200)
============================================================= */
@media (min-width: 1200px) and (max-width: 1439px) {
/* ещё меньше рамки */
.premium-image-wrapper {
padding: 5px 5px !important;
}
}

/* =============================================================
BREAKPOINT: 1440-1919px (1440p)
============================================================= */
@media (min-width: 1440px) and (max-width: 1919px) {
/* меньше рамки */
.premium-image-wrapper {
padding: 8px 10px !important;
}
}

/* =============================================================
BREAKPOINT: ≥ 2560px (2K / Ultra Wide)
============================================================= */
@media (min-width: 2560px) {
  .first_section {
    padding-top: 25vh !important;
  }

  /* Fix hero photo positioning for 2K - exactly as 2559px */
  .hero-photo-container {
    right: 0 !important;
    width: auto !important;
    top: 80px !important;
    height: calc(100% - 80px) !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: flex-end !important;
  }

  .hero-photo {
    height: 100% !important;
    width: auto !important;
    max-width: none !important;
    transform: translateX(25%) scale(1.12) translateY(-5%) !important;
    object-position: right bottom !important;
    object-fit: contain !important;
  }

  /* Text block - exactly as 2559px, no constraints */
  .first_title {
    padding-left: clamp(3rem, 6vw, 8rem) !important;
    max-width: 55% !important;
  }

  .first_title h1,
  .header .first_section .first_title h1 {
    font-size: clamp(3rem, 2.5vw, 4rem) !important;
    line-height: 1.2 !important;
    margin-bottom: 2rem !important;
  }

  /* Trust bar - allow wrapping like at 2559px */
  .trust-bar {
    gap: 3rem !important;
    padding: 2.5rem 0 !important;
    margin: 3.5rem 0 4rem !important;
    flex-wrap: wrap !important;
    max-width: max-content !important;
  }

  .trust-item .number {
    font-size: clamp(3rem, 2.5vw, 4rem) !important;
  }

  .trust-item .label {
    font-size: clamp(1rem, 0.8vw, 1.3rem) !important;
    margin-top: 10px;
  }

  .communication_button a,
  .btn-premium {
    font-size: 1.2rem !important;
    padding: 22px 60px !important;
    min-width: 280px;
  }

  .scrolling span {
    font-size: 1rem;
  }

  /* Navbar scaling for 2K */
  .premium-logo-icon img {
    width: 50px !important;
  }

  .premium-logo-title {
    font-size: 1.3rem !important;
  }

  .premium-logo-subtitle {
    font-size: 0.85rem !important;
  }

  .navbar-nav .nav-link {
    font-size: 1rem !important;
    padding-left: 1.2rem !important;
    padding-right: 1.2rem !important;
  }

  .language_links.premium-lang-header a,
  .language_links.premium-lang-header span {
    font-size: 1rem !important;
  }

  /* 2K: меньше рамки */
  .premium-image-wrapper {
    padding: 10px 15px !important;
  }
}

/* =============================================================
BREAKPOINT: ≥ 3840px (4K Monitors)
============================================================= */
@media (min-width: 3840px) {
  .first_section {
    padding-top: 28vh !important;
  }

  /* Фото на 4K: ведём себя как на 2K — снимок горизонтальный, поэтому
     ограничение ширины контейнера ужимало его до четверти высоты экрана. */
  .hero-photo-container {
    right: 0 !important;
    width: auto !important;
    max-width: none !important;
    top: 80px !important;
    height: calc(100% - 80px) !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: flex-end !important;
  }

  .hero-photo {
    height: 100% !important;
    width: auto !important;
    max-width: none !important;
    transform: translateX(25%) scale(1.12) translateY(-5%) !important;
    object-position: right bottom !important;
    object-fit: contain !important;
  }

  /* Ensure text doesn't overlap with photo */
  .first_title {
    padding-left: 8% !important;
    padding-right: 40% !important;
    max-width: 100% !important;
  }

  .first_title h1,
  .header .first_section .first_title h1 {
    font-size: clamp(5rem, 4vw, 8rem) !important;
    margin-bottom: 4rem !important;
  }

  .trust-bar {
    gap: 4rem !important;
    padding: 3rem 0 !important;
    margin: 4rem 0 5rem !important;
    border-top: 2px solid rgba(182, 138, 82, 0.3);
    border-bottom: 2px solid rgba(182, 138, 82, 0.3);
  }

  .trust-item .number {
    font-size: clamp(4rem, 3vw, 6rem) !important;
  }

  .trust-item .label {
    font-size: clamp(1.2rem, 1vw, 1.6rem) !important;
    margin-top: 15px;
  }

  .communication_button a,
  .btn-premium {
    font-size: 1.6rem !important;
    padding: 30px 80px !important;
    min-width: 360px;
  }

  .scrolling span {
    font-size: 1.3rem;
  }

  /* Navbar scaling for 4K */
  .premium-logo-icon img {
    width: 70px !important;
  }

  .premium-logo-title {
    font-size: 1.8rem !important;
  }

  .premium-logo-subtitle {
    font-size: 1.2rem !important;
  }

  .navbar-nav .nav-link {
    font-size: 1.4rem !important;
    padding-left: 1.8rem !important;
    padding-right: 1.8rem !important;
  }

  .language_links.premium-lang-header a,
  .language_links.premium-lang-header span {
    font-size: 1.4rem !important;
  }
}

/* =============================================================
UTILITY
============================================================= */
.accent-text {
    color: var(--accent, #b68a52);
}
/* Длинные одиночные слова в подписях (например «Полная конфиденциальность»)
   не должны вылезать за узкую колонку на телефонах. Рвём слово только когда
   оно совсем не влезает: word-break + hyphens резали по слогам почти каждый
   заголовок плитки («Чест-ные пер-спективы»), и блок выглядел дёшево. */
.feature-title,
.service-content h3,
.review-author {
    overflow-wrap: break-word;
    hyphens: manual;
}

/* На телефоне плитка всего ~133 px по тексту — крупный заголовок в неё
   не помещался целым словом. */
@media (max-width: 576px) {
    .feature-title {
        font-size: clamp(0.92rem, 4vw, 1.25rem) !important;
        line-height: 1.3;
    }
}

/* =============================================================
   ЕДИНАЯ СЕТКА КОНТЕНТА НА ШИРОКИХ ЭКРАНАХ
   Вторая секция главной наследовала max-width: 100% и растягивалась
   на всю ширину монитора, тогда как соседние секции стояли по 1600px, —
   на 2K блоки заметно разъезжались. Приводим все контентные контейнеры
   к одной ширине и центру.
   ============================================================= */
.main .section > .container,
.main .section .container:not(.container-fluid),
.first_section > .container,
.premium-footer > .container {
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

/* На очень широких мониторах даём контенту дышать: полоса шире,
   пустых полей по краям меньше. !important — чтобы перебить
   инлайновый max-width: 1600px в разметке страниц. */
@media (min-width: 2400px) {
    .main .section > .container,
    .main .section .container:not(.container-fluid),
    .main .page-section > .container,
    .page-cta > .container,
    .page-hero > .container,
    .first_section > .container,
    .premium-footer > .container {
        max-width: 1900px !important;
    }
}

/* Логотип в подвале: на планшете он не влезал в узкую колонку, поэтому
   разбивка перенесена на брейкпоинт lg. Здесь просто страхуем от переполнения. */
.premium-logo-footer {
    max-width: 100%;
}

.premium-footer .premium-logo-title,
.premium-footer .premium-logo-subtitle {
    overflow-wrap: break-word;
}

/* Заголовок первого экрана на очень широких мониторах упирался в жёсткие
   600px и переполнял свой блок. */
@media (min-width: 2400px) {
    .first_title h1,
    .header .first_section .first_title h1 {
        max-width: 1100px;
    }
}

/* На 4K контенту тесно в полосе 1900px: даём шире, иначе половина экрана пустая. */
@media (min-width: 3000px) {
    .main .section > .container,
    .main .section .container:not(.container-fluid),
    .main .page-section > .container,
    .page-cta > .container,
    .page-hero > .container,
    .first_section > .container,
    .premium-footer > .container {
        max-width: 2400px !important;
    }
}

/* Текст главной на 4K: базовые 16px выглядели мелко на таком экране. */
@media (min-width: 3000px) {
    .who_are_we_text p,
    .who_are_we_text li,
    .section_text p,
    .service-content p,
    .review-text,
    .footer-text,
    .copyright-text {
        font-size: 1.35rem !important;
        line-height: 1.85 !important;
    }

    .service-content h3,
    .feature-title,
    .review-author {
        font-size: 1.6rem !important;
    }

    .premium-heading,
    .section_text h2 {
        font-size: 3.6rem !important;
    }
}
