/**
 * mobile-v2.css
 * Plasticglas.ru — Mobile / Tablet responsive reflow of the existing desktop site.
 * Scope: ALL rules apply only below the desktop master breakpoint (max-width: 1199.98px),
 * except pure custom-property declarations (harmless at any width) and the two universal
 * `!important` overrides explicitly called out below (tablet scale-bug neutralisation,
 * legacy burger hide) which must win the cascade at 992-1199 without touching legacy style.css.
 * Desktop (>=1200px) is NOT touched by this file.
 *
 * This is a plain responsive adaptation, not a redesign: same 10 sections, same order, same
 * copy, same images — only geometry/columns/typography scale change. No mobile-only art
 * direction, no decorative animation scenes, no invented layouts.
 */

/* ------------------------------------------------------------------------------------------------ Design tokens */
:root {
    --mv2-pad: clamp(20px, 6vw, 32px);
    --mv2-section-py: clamp(40px, 8vw, 72px);
    --mv2-radius: 10px;
    --mv2-gap: 16px;
    --mv2-btn-h: 52px;
    --mv2-header-h: 68px;
    --mv2-header-h-compact: 56px;

    --mv2-navy: #1C316A;
    --mv2-navy-deep: #16264f;
    --mv2-navy-mid: #29396F;
    --mv2-ink: #3d434f;

    --mv2-h1: clamp(28px, 8vw, 40px);
    --mv2-eyebrow: clamp(13px, 3.4vw, 15px);
    --mv2-h2: clamp(22px, 6vw, 30px);
    --mv2-h3: clamp(16px, 4vw, 18px);
    --mv2-body: clamp(15px, 4vw, 16px);

    --mv2-ease: cubic-bezier(.22, .68, 0, 1);
}

/* =================================================================================================
   0. GLOBAL RESET / SCROLL BEHAVIOUR (<1200)
   ================================================================================================= */
@media (max-width: 1199.98px) {
    html {
        scroll-behavior: auto;
        overflow-x: hidden !important;
    }
    body {
        overflow-x: hidden !important;
        width: auto !important;
        height: auto !important;
    }
    body.menu-opened,
    body.mv2-menu-open {
        overflow: hidden !important;
        height: 100vh !important;
    }

    img {
        max-width: 100%;
    }

    /* Never allow a horizontal scrollbar to appear on mobile/tablet */
    .site-block,
    .container-fluid {
        max-width: 100%;
        overflow-x: hidden;
    }
}

/* =================================================================================================
   1. CRITICAL BUG FIXES — isolated overrides, no legacy file edits
   ================================================================================================= */

/* 1a. Legacy burger (#mobile-menu-switcher) is superseded by the new mv2 header everywhere. */
#mobile-menu-switcher {
    display: none !important;
}

/* 1b. Neutralise style.css:997 tablet scale bug (992px-1199px) for the new vertical layout. */
@media screen and (min-width: 992px) and (max-width: 1199.98px) {
    .site-block {
        transform: none !important;
        transform-origin: initial !important;
    }
    #block-production.site-block-7,
    #block-production.site-block-7 .wrap {
        transform: none !important;
    }
}

/* =================================================================================================
   2. SITE-BLOCK BASE — turn the desktop horizontal engine off, restore normal vertical document flow.
   Height is driven by content everywhere except the Hero (see §4), never forced to 100vh.
   ================================================================================================= */
@media (max-width: 1199.98px) {
    .site-block {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        display: block;
    }
    .site-block .container-fluid,
    .site-block .container-fluid .row,
    .site-block .container-fluid .row .col-12 {
        height: auto;
    }
    .site-block .wrap {
        display: block;
        height: auto;
    }
    .site-block .wrap .inner {
        width: 100%;
        display: block;
    }
    .site-block .container-fluid {
        padding-left: var(--mv2-pad);
        padding-right: var(--mv2-pad);
    }
    .site-block .container-fluid .container-fluid {
        padding-left: 0;
        padding-right: 0;
    }
    /* Desktop decorative absolute-position layers (sphere/pipes/luminare background graphics)
       aren't part of the readable content — hide them, the real product/luminaire photos carry it. */
    #block-products .animation-block,
    #block-opportunities.site-block-8 .luminare {
        display: none;
    }
}

/* =================================================================================================
   3. MOBILE HEADER (mv2-header) + FULLSCREEN MENU (mv2-menu) — kept from the previous pass, it works.
   ================================================================================================= */
#mv2-header,
#mv2-menu {
    display: none;
}

@media (max-width: 1199.98px) {
    #mv2-header {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 900;
        height: var(--mv2-header-h);
        background: transparent;
        transition: height .3s var(--mv2-ease), background-color .3s var(--mv2-ease), box-shadow .3s var(--mv2-ease);
    }
    #mv2-header .mv2-header-inner {
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 var(--mv2-pad);
    }
    #mv2-header .mv2-logo {
        display: inline-flex;
        align-items: center;
        height: 60%;
    }
    #mv2-header .mv2-logo img {
        height: 100%;
        width: auto;
        display: block;
    }

    #mv2-header.is-scrolled {
        height: var(--mv2-header-h-compact);
        background-color: rgba(28, 49, 106, 0.88);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    }
    @supports ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
        #mv2-header.is-scrolled {
            background-color: rgba(28, 49, 106, 0.62);
            -webkit-backdrop-filter: blur(14px) saturate(140%);
            backdrop-filter: blur(14px) saturate(140%);
        }
    }

    .mv2-burger {
        position: relative;
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        border: 0;
        background: rgba(255, 255, 255, 0.12);
        border-radius: 50%;
        padding: 0;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    #mv2-header.is-scrolled .mv2-burger,
    body.mv2-menu-open .mv2-burger {
        background: rgba(255, 255, 255, 0.18);
    }
    .mv2-burger span {
        position: absolute;
        left: 12px;
        width: 20px;
        height: 2px;
        background: #fff;
        border-radius: 2px;
        transition: transform .35s var(--mv2-ease), opacity .25s ease, top .35s var(--mv2-ease);
    }
    .mv2-burger span:nth-child(1) { top: 16px; }
    .mv2-burger span:nth-child(2) { top: 21px; }
    .mv2-burger span:nth-child(3) { top: 26px; }
    body.mv2-menu-open .mv2-burger span:nth-child(1) {
        top: 21px;
        transform: rotate(45deg);
    }
    body.mv2-menu-open .mv2-burger span:nth-child(2) {
        opacity: 0;
    }
    body.mv2-menu-open .mv2-burger span:nth-child(3) {
        top: 21px;
        transform: rotate(-45deg);
    }

    #mv2-menu {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 890;
        background: linear-gradient(165deg, var(--mv2-navy-deep) 0%, var(--mv2-navy) 65%, var(--mv2-navy-mid) 100%);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity .35s var(--mv2-ease), visibility 0s linear .35s, transform .35s var(--mv2-ease);
        display: flex;
        flex-direction: column;
        padding: calc(var(--mv2-header-h) + 20px) var(--mv2-pad) 32px;
        overflow-y: auto;
    }
    body.mv2-menu-open #mv2-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
        transition: opacity .35s var(--mv2-ease), visibility 0s linear 0s, transform .35s var(--mv2-ease);
    }
    .mv2-menu-nav {
        display: flex;
        flex-direction: column;
        gap: 4px;
        margin-top: auto;
    }
    .mv2-menu-link {
        display: block;
        padding: 14px 2px;
        color: #fff;
        font-family: Montserrat-SemiBold, Montserrat-Medium, sans-serif;
        font-size: clamp(24px, 8vw, 32px);
        text-transform: uppercase;
        border-bottom: 1px solid rgba(255, 255, 255, 0.14);
        opacity: 0;
        transform: translateY(14px);
        transition: opacity .4s var(--mv2-ease), transform .4s var(--mv2-ease);
    }
    body.mv2-menu-open .mv2-menu-link {
        opacity: 1;
        transform: translateY(0);
    }
    .mv2-menu-link:nth-child(1) { transition-delay: .05s; }
    .mv2-menu-link:nth-child(2) { transition-delay: .10s; }
    .mv2-menu-link:nth-child(3) { transition-delay: .15s; }
    .mv2-menu-link:nth-child(4) { transition-delay: .20s; }

    .mv2-menu-contacts {
        margin-top: 28px;
        opacity: 0;
        transform: translateY(14px);
        transition: opacity .4s var(--mv2-ease) .22s, transform .4s var(--mv2-ease) .22s;
    }
    body.mv2-menu-open .mv2-menu-contacts {
        opacity: 1;
        transform: translateY(0);
    }
    .mv2-menu-contacts a.phone,
    .mv2-menu-contacts a.email {
        display: inline-block;
        color: #fff;
        font-family: Montserrat-Bold, sans-serif;
        font-size: 20px;
        margin-bottom: 6px;
    }

    .mv2-menu-cta {
        display: block;
        margin-top: 22px;
        padding: 0 24px;
        height: var(--mv2-btn-h);
        line-height: var(--mv2-btn-h);
        text-align: center;
        color: var(--mv2-navy-deep);
        background: #fff;
        font-family: Montserrat-Medium, sans-serif;
        font-size: 16px;
        letter-spacing: .02em;
        text-transform: uppercase;
        border-radius: 30px;
        cursor: pointer;
        opacity: 0;
        transform: translateY(14px);
        transition: opacity .4s var(--mv2-ease) .28s, transform .4s var(--mv2-ease) .28s, background-color .25s ease;
    }
    body.mv2-menu-open .mv2-menu-cta {
        opacity: 1;
        transform: translateY(0);
    }
    .mv2-menu-cta:active {
        background: #e9e9e9;
    }
}

/* Old header/menu/footer-nav markup stays fully hidden below 1200 (superseded by mv2-header) */
@media (max-width: 1199.98px) {
    #header,
    #footer,
    .btn-scroll {
        display: none !important;
    }
}

/* =================================================================================================
   4. SCREEN 01 — HERO (patch 04: bigger product composition, H1 clears the fixed header, and a
   single controlled H1 reveal that replaces the desktop's infinite word-carousel on mobile)
   ================================================================================================= */
@media (max-width: 1199.98px) {
    #first-screen {
        padding-top: calc(var(--mv2-header-h) + 28px);
        padding-bottom: 32px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        min-height: 100vh;
        min-height: 100svh;
    }
    /* #first-screen's real flex children are .animation-block and .container-fluid (.wrap is
       nested two levels deeper and is NOT itself a flex item, so ordering it had no effect) —
       order the actual children explicitly: headline/text first, product composition below it. */
    #first-screen > .animation-block {
        order: 2;
    }
    #first-screen > .container-fluid {
        order: 1;
    }
    #first-screen h1 {
        font-size: var(--mv2-h1);
        line-height: 1.12;
        text-align: left;
    }
    #first-screen h2 {
        margin-top: 14px;
        font-size: var(--mv2-h2);
        line-height: 1.3;
        text-align: left;
        opacity: .85;
    }

    /* Product composition — occupies roughly the lower 45-55% of the Hero viewport */
    #first-screen .animation-block {
        position: relative !important;
        visibility: visible !important;
        pointer-events: none;
        top: auto;
        left: auto;
        width: 100%;
        height: clamp(320px, 55vh, 480px);
        margin-top: 16px;
        overflow: hidden;
    }
    #first-screen .animation-block img {
        position: absolute !important;
        width: auto;
        max-width: none;
        height: auto;
        margin: 0 !important;
        opacity: 1;
        filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.22));
    }
    /* Seven real product shots, varied scale, controlled overlap — same assets as desktop Hero. */
    #first-screen .animation-block .prod1-2 {
        top: 0%;
        left: 2%;
        width: 60%;
        z-index: 26;
    }
    #first-screen .animation-block .prod6 {
        top: 0%;
        right: -8%;
        left: auto;
        width: 44%;
        z-index: 25;
    }
    #first-screen .animation-block .prod4 {
        top: 6%;
        right: 4%;
        left: auto;
        width: 26%;
        z-index: 27;
    }
    #first-screen .animation-block .prod7 {
        top: 36%;
        left: -10%;
        width: 52%;
        z-index: 20;
    }
    #first-screen .animation-block .prod3 {
        top: 44%;
        left: 32%;
        width: 36%;
        z-index: 21;
    }
    #first-screen .animation-block .prod5 {
        bottom: 4%;
        right: -6%;
        left: auto;
        width: 34%;
        z-index: 22;
    }
    #first-screen .animation-block .prod8 {
        bottom: -2%;
        left: 4%;
        width: 58%;
        z-index: 19;
    }
}
@media (max-width: 400px) {
    /* Smallest phones: same seven items, just trimmed a touch so nothing crowds the edges —
       never hidden outright, every item stays recognisable. */
    #first-screen .animation-block .prod1-2 { width: 56%; }
    #first-screen .animation-block .prod6 { width: 40%; right: -10%; }
    #first-screen .animation-block .prod4 { width: 23%; }
    #first-screen .animation-block .prod7 { width: 48%; left: -12%; }
    #first-screen .animation-block .prod3 { width: 32%; left: 34%; }
    #first-screen .animation-block .prod5 { width: 30%; right: -8%; }
    #first-screen .animation-block .prod8 { width: 54%; }
}

/* ---- H1 reveal: the ONE meaningful Hero effect on mobile, self-contained (does not depend on
   #first-screen.active / .passive or the desktop word-carousel keyframes). Two lines fade + rise
   in once, in sequence, then stay put. The desktop's infinite rotating-word animation is switched
   off below 1200px and replaced with this single controlled reveal. ---- */
@media (max-width: 1199.98px) {
    /* Kill the desktop infinite per-letter carousel entirely on mobile/tablet. */
    #first-screen h1.animated span.frst span,
    #first-screen h1.animated span.scnd span,
    #first-screen h1.animated span.trd span {
        animation: none !important;
    }
    /* Line 1: "Требуются" — independent of .active/.passive, starts hidden, JS flips it in. */
    #first-screen h1.animated .anim1 {
        opacity: 0;
        transform: translateY(16px);
        transition: opacity .5s var(--mv2-ease), transform .5s var(--mv2-ease);
    }
    #first-screen.mv2-h1-ready h1.animated .anim1 {
        opacity: 1;
        transform: translateY(0);
    }
    /* Line 2: the first rotating phrase ("профили?") — shown as one static line, not rotated;
       .scnd/.trd stay hidden (their own base rule already keeps them display:none/opacity:0). */
    #first-screen h1.animated span.frst span {
        opacity: 1 !important;
    }
    #first-screen h1.animated span.frst {
        display: inline-block;
        opacity: 0;
        transform: translateY(16px);
        transition: opacity .5s var(--mv2-ease) .18s, transform .5s var(--mv2-ease) .18s;
    }
    #first-screen.mv2-h1-ready h1.animated span.frst {
        opacity: 1;
        transform: translateY(0);
    }
}
@media (prefers-reduced-motion: reduce) {
    #first-screen h1.animated .anim1,
    #first-screen h1.animated span.frst {
        opacity: 1 !important;
        transform: none !important;
        transition-duration: .01ms !important;
    }
}

/* =================================================================================================
   5. SCREENS 02-05 — PRODUCTS
   Plain reflow: existing mobile product photo, headline, description, characteristics, CTA — in
   that order, stacked. No decorative circles/cards beyond what the photo itself already contains,
   no collapsed/hidden specs, no per-screen background treatment.
   ================================================================================================= */
@media (max-width: 1199.98px) {
    #block-products {
        padding-top: var(--mv2-section-py);
        padding-bottom: var(--mv2-section-py);
    }
    #block-products .mobile-image {
        margin-bottom: 24px;
    }
    #block-products .mobile-image img {
        display: block;
        width: 100%;
        height: auto;
        margin-bottom: 0;
    }
    #block-products h1 {
        font-size: var(--mv2-eyebrow);
        letter-spacing: .08em;
        margin-bottom: 14px;
    }
    #block-products h2 {
        font-size: var(--mv2-h2);
        line-height: 1.22;
    }
    #block-products p {
        font-size: var(--mv2-body);
        line-height: 1.55;
    }
    #block-products h3 {
        font-size: var(--mv2-h3);
    }
    #block-products .row .col-12.col-lg-6 + .col-12.col-lg-6 {
        margin-top: 18px;
    }
    #block-products ul.circle {
        margin-top: 18px;
    }
    #block-products .download-catalog {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: var(--mv2-btn-h);
        margin-top: 26px;
        font-size: 15px;
        border-radius: 30px;
    }
    #mounting-boxes {
        position: relative;
        top: auto;
    }
}

/* =================================================================================================
   6. SCREEN 06 — PRODUCTION (existing Slick slider stays interactive, plain responsive sizing)
   ================================================================================================= */
@media (max-width: 1199.98px) {
    #block-production.site-block-6 {
        padding-top: var(--mv2-section-py);
        padding-bottom: calc(var(--mv2-section-py) + 24px);
    }
    #block-production .production-slider {
        padding: 0;
        margin-bottom: 48px;
    }
    #block-production .production-slider .slick-list .slick-slide img {
        width: 100%;
        height: auto;
        display: block;
    }
    #block-production .production-slider .slick-btn {
        bottom: -40px;
        width: 44px;
        height: 44px;
        padding: 0 !important;
        background-position: center !important;
        background-size: 18px !important;
        background-color: rgba(255, 255, 255, 0.08);
        border-radius: 50%;
        text-indent: -9999px;
        overflow: hidden;
    }
    #block-production .production-slider .slick-btn.slick-btn-prev { left: 0; }
    #block-production .production-slider .slick-btn.slick-btn-next { right: 0; }
    #block-production .production-slider .slick-count {
        left: 50%;
        bottom: -32px;
        transform: translateX(-50%);
        font-size: 15px;
        letter-spacing: .05em;
    }
    #block-production h1 {
        font-size: var(--mv2-eyebrow);
        letter-spacing: .08em;
    }
    #block-production h2 {
        font-size: var(--mv2-h2);
    }
    #block-production p {
        font-size: var(--mv2-body);
        line-height: 1.55;
    }
}

/* =================================================================================================
   7. SCREEN 07 — AUTOMATED CUT
   The long-pipe photo as a plain responsive image. No travel/mask/reveal animation.
   ================================================================================================= */
@media (max-width: 1199.98px) {
    #block-production.site-block-7 {
        padding-top: var(--mv2-section-py);
        padding-bottom: var(--mv2-section-py);
        background-image: none !important;
    }
    #block-production.site-block-7 h1 {
        font-size: var(--mv2-eyebrow);
        letter-spacing: .08em;
    }
    #block-production.site-block-7 h2 {
        font-size: var(--mv2-h2);
    }
    #block-production.site-block-7 p,
    #block-production.site-block-7 ul li {
        font-size: var(--mv2-body);
        line-height: 1.55;
    }
    /* Long pipe sits below the text, in its own clipped container so it can run wider than the
       viewport (the visual continues past both edges) without ever causing page overflow. */
    #block-production.site-block-7 .animation-block {
        display: block !important;
        position: relative !important;
        visibility: visible !important;
        top: auto;
        left: auto;
        width: 100%;
        height: auto;
        margin-top: 32px;
        overflow: hidden;
    }
    #block-production.site-block-7 .animation-block img.long-pipe {
        position: relative;
        display: block;
        width: 132vw;
        max-width: none;
        height: auto;
        margin-left: -30vw;
        transform: none;
        opacity: 1;
    }
}

/* =================================================================================================
   8. SCREEN 08 — LUMINAIRE / PROPERTIES
   The finished luminaire photo (the desktop's own final-state asset) as a plain responsive image,
   shown before the text so it reads clearly on a narrow screen. No assembly animation.
   ================================================================================================= */
@media (max-width: 1199.98px) {
    #block-opportunities.site-block-8 {
        padding-top: var(--mv2-section-py);
        padding-bottom: var(--mv2-section-py);
    }
    #block-opportunities.site-block-8 h1 {
        font-size: var(--mv2-eyebrow);
        letter-spacing: .08em;
    }
    #block-opportunities.site-block-8 h2 {
        font-size: var(--mv2-h2);
    }
    #block-opportunities.site-block-8 p {
        font-size: var(--mv2-body);
        line-height: 1.6;
    }
    #block-opportunities.site-block-8 .container-fluid .container-fluid > .row {
        display: flex;
        flex-direction: column;
    }
    #block-opportunities.site-block-8 .col-12.col-xl-6.text-center {
        order: -1;
        margin-bottom: 24px;
    }
    #block-opportunities.site-block-8 img.lumi {
        display: block;
        width: 100%;
        max-width: 420px;
        height: auto;
        margin: 0 auto;
    }
}

/* =================================================================================================
   9. SCREEN 09 — APPLICATIONS (existing Slick slider stays interactive, plain responsive sizing)
   ================================================================================================= */
@media (max-width: 1199.98px) {
    #block-opportunities.site-block-9 {
        padding-top: var(--mv2-section-py);
        padding-bottom: calc(var(--mv2-section-py) + 24px);
    }
    #block-opportunities.site-block-9 h1 {
        font-size: var(--mv2-eyebrow);
        letter-spacing: .08em;
    }
    #block-opportunities.site-block-9 h2 {
        font-size: var(--mv2-h2);
    }
    #block-opportunities.site-block-9 p {
        font-size: var(--mv2-body);
        line-height: 1.55;
    }
    #block-opportunities.site-block-9 .opportunities-slider {
        margin-top: 26px;
        margin-bottom: 40px;
        padding: 0;
    }
    #block-opportunities.site-block-9 .opportunities-slider .slick-list .slick-slide img {
        width: 100%;
        height: auto;
        display: block;
    }
    #block-opportunities.site-block-9 .opportunities-slider .slick-arrow {
        width: 40px;
        height: 40px;
        top: auto;
        bottom: -40px;
        margin-top: 0;
        background-color: rgba(61, 67, 79, 0.08);
        background-size: 16px !important;
        background-position: center !important;
        border-radius: 50%;
    }
    #block-opportunities.site-block-9 .opportunities-slider .slick-prev {
        left: 0;
    }
    #block-opportunities.site-block-9 .opportunities-slider .slick-next {
        right: 0;
    }
    .mv2-slide-count {
        position: absolute;
        left: 50%;
        bottom: -34px;
        transform: translateX(-50%);
        color: var(--mv2-ink);
        font-family: Gotham-Book, sans-serif;
        font-size: 15px;
        letter-spacing: .05em;
    }
    .mv2-slide-count b {
        font-family: Gotham-Bold, sans-serif;
    }
}

/* =================================================================================================
   10. SCREEN 10 — CONTACTS / FORM
   Natural document order (contacts info incl. map, then the request form) — matches the existing
   two-column desktop structure once stacked. No invented UI.
   ================================================================================================= */
@media (max-width: 1199.98px) {
    #block-contacts {
        padding-top: var(--mv2-section-py);
        padding-bottom: 64px;
    }
    #block-contacts h1 {
        font-size: var(--mv2-eyebrow);
    }
    #block-contacts .row .col-12.col-md-6 {
        margin-bottom: 22px;
    }
    #block-contacts h2 {
        font-size: var(--mv2-h2);
        margin-top: 12px;
    }
    #block-contacts h3 {
        font-size: 15px;
    }
    #block-contacts p.contacts a {
        font-size: 17px;
    }
    #block-contacts > .container-fluid > .row > .col-12.col-md-6:first-child > .row > .col-12:nth-last-child(2),
    #block-contacts > .container-fluid > .row > .col-12.col-md-6:first-child > .row > .col-12:last-child {
        margin-bottom: 0;
    }

    #wpa-yandex-map,
    #ymap {
        width: 100%;
        height: 280px;
        border-radius: var(--mv2-radius);
        overflow: hidden;
        touch-action: pan-y;
    }

    .wpa-lead-form .wpa-lead-input,
    .wpa-lead-form .wpa-lead-textarea,
    #block-contacts .wpa-lead-input,
    #block-contacts .wpa-lead-textarea {
        width: 100%;
        min-height: 48px;
        padding: 12px 16px;
        font-size: 16px;
        margin-bottom: var(--mv2-gap);
        box-sizing: border-box;
    }
    .wpa-lead-form textarea.wpa-lead-textarea {
        min-height: 110px;
    }
    .wpa-lead-form .wpa-button,
    .main-btn,
    #block-contacts .wpa-button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: var(--mv2-btn-h);
        font-size: 17px;
        border-radius: 30px;
    }
    .wpa-lead-form .wpa-button-wrap {
        margin-top: 6px;
    }
}

/* =================================================================================================
   11. TABLET LAYOUT (768px – 1199.98px)
   Only where two columns fit naturally: product screens (image | content) and the luminaire screen
   (visual | properties). Everything else keeps the phone flow, just with more width and larger type.
   Bootstrap's own .row is already a flex container — this only widens the breakpoint at which its
   col-xl-6 children go side by side, from 1200px down to 768px, using the columns' own built-in
   gutter padding as the gap (no extra column-gap needed, so no overflow-wrap surprises).
   ================================================================================================= */
@media (min-width: 768px) and (max-width: 1199.98px) {
    :root {
        --mv2-pad: clamp(32px, 4.6vw, 56px);
        --mv2-h1: clamp(36px, 4.4vw, 50px);
        --mv2-h2: clamp(28px, 3.2vw, 36px);
        --mv2-h3: clamp(17px, 1.8vw, 20px);
        --mv2-body: clamp(16px, 1.6vw, 18px);
        --mv2-eyebrow: 15px;
    }

    /* Screens 02-05: image | content, side by side */
    #block-products .container-fluid .container-fluid > .row > .col-12.col-xl-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    #block-products .mobile-image {
        margin-bottom: 0;
    }
    #block-products .container-fluid .container-fluid > .row {
        align-items: center;
    }
    #block-products h1 { margin-bottom: 18px; }

    /* Screen 08: luminaire visual | properties, side by side */
    #block-opportunities.site-block-8 .container-fluid .container-fluid > .row {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        column-gap: clamp(24px, 4vw, 48px);
    }
    #block-opportunities.site-block-8 .col-12.col-xl-6 {
        flex: 0 0 50%;
        max-width: 50%;
        min-width: 0;
    }
    #block-opportunities.site-block-8 .col-12.col-xl-6.text-center {
        margin-bottom: 0;
    }

    /* Contacts: bigger map (info/map and form already go side by side via Bootstrap's own col-md-6 at 768+) */
    #wpa-yandex-map,
    #ymap {
        height: 320px;
    }
}

/* =================================================================================================
   12. TOUCH TARGETS / ACCESSIBILITY / FOCUS
   ================================================================================================= */
@media (max-width: 1199.98px) {
    a, button, .download-catalog, .back-btn, .slick-arrow, .slick-btn, .mv2-menu-link, .mv2-menu-cta {
        -webkit-tap-highlight-color: rgba(28, 49, 106, 0.15);
    }
    .mv2-burger:focus-visible,
    .mv2-menu-link:focus-visible,
    .mv2-menu-cta:focus-visible,
    .download-catalog:focus-visible,
    .wpa-lead-input:focus-visible,
    .wpa-lead-textarea:focus-visible {
        outline: 2px solid #fff;
        outline-offset: 2px;
    }
}

/* Reduced motion: only the menu/header still animate — collapse those to instant */
@media (prefers-reduced-motion: reduce) {
    .mv2-menu-link,
    .mv2-menu-contacts,
    .mv2-menu-cta,
    #mv2-header {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}


/* ================================================================================================
   HERO MOBILE COMPOSITION — FINAL LOCKED PNG PATCH
   Source: original approved desktop Plasticglas Hero product composition.
   Mobile/tablet uses ONE precomposed transparent PNG; individual Hero product layers are hidden.
   Desktop >=1200 remains untouched.
   ================================================================================================ */
@media (max-width: 1199.98px) {
    #first-screen .animation-block {
        background-image: url("../images/mobile-v2/hero-mobile-composition.png") !important;
        background-repeat: no-repeat !important;
        background-position: center top !important;
        background-size: contain !important;
        height: clamp(320px, 47vh, 470px) !important;
        margin-top: 14px !important;
        overflow: hidden !important;
    }

    #first-screen .animation-block > img {
        display: none !important;
    }
}

@media (max-width: 430px) {
    #first-screen .animation-block {
        height: 370px !important;
        background-size: 116% auto !important;
        background-position: center 0 !important;
    }
}

@media (min-width: 431px) and (max-width: 767.98px) {
    #first-screen .animation-block {
        height: 430px !important;
        background-size: min(112%, 620px) auto !important;
        background-position: center 0 !important;
    }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    #first-screen .animation-block {
        height: clamp(440px, 50vh, 620px) !important;
        background-size: min(88vw, 900px) auto !important;
        background-position: center top !important;
    }
}


/* ================================================================================================
   HERO MOBILE CTA PATCH — single CTA on the first screen only.
   ================================================================================================ */
@media (max-width: 1199.98px) {
    #first-screen .mv2-hero-cta {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 48px;
        padding: 0 26px;
        margin-top: 22px;
        margin-bottom: 6px;
        border: 0;
        border-radius: 999px;
        background: #F39200;
        color: #ffffff;
        font-size: 18px;
        font-weight: 700;
        line-height: 1;
        text-align: center;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
        cursor: pointer;
        position: relative;
        z-index: 3;
    }
    #first-screen .animation-block {
        margin-top: 26px !important;
    }
}

@media (max-width: 430px) {
    #first-screen .mv2-hero-cta {
        min-height: 46px;
        padding: 0 22px;
        font-size: 17px;
    }
}


/* ================================================================================================
   HERO MINIMAL SWAP PATCH — exact previous composition preserved.
   Only changes:
   1) product block appears first, directly under the mobile header;
   2) original text block follows below;
   3) second equal "Скачать каталог" button added beside the existing request CTA.
   ================================================================================================ */
@media (max-width: 1199.98px) {
    #first-screen {
        padding-top: var(--mv2-header-h) !important;
    }

    /* Exact same existing blocks; only their order is swapped. */
    #first-screen > .animation-block {
        order: 1 !important;
        margin-top: 0 !important;
    }

    #first-screen > .container-fluid {
        order: 2 !important;
        margin-top: 16px !important;
    }

    #first-screen .mv2-hero-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
        max-width: 344px;
        margin-top: 22px;
        position: relative;
        z-index: 3;
    }

    #first-screen .mv2-hero-cta,
    #first-screen .mv2-hero-catalog {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 48px;
        padding: 0 14px;
        margin: 0;
        border-radius: 999px;
        box-sizing: border-box;
        font-size: 14px;
        line-height: 1;
        text-align: center;
        text-decoration: none;
        white-space: nowrap;
        cursor: pointer;
    }

    /* Existing Plasticglas CTA orange from the original theme. */
    #first-screen .mv2-hero-cta {
        border: 0;
        background: #FD8900 !important;
        color: #ffffff !important;
        box-shadow: none;
    }

    #first-screen .mv2-hero-catalog {
        border: 1px solid #ffffff;
        background: #ffffff;
        color: #1C316A !important;
    }
}

@media (max-width: 430px) {
    #first-screen .mv2-hero-actions {
        max-width: 100%;
    }

    #first-screen .mv2-hero-cta,
    #first-screen .mv2-hero-catalog {
        min-height: 46px;
        padding: 0 10px;
        font-size: 13px;
    }
}


/* ================================================================================================
   iPHONE HERO FIT PATCH — complete static H1 + safe visible CTAs.
   Existing product composition, header, CTA colors/actions and all other sections stay unchanged.
   ================================================================================================ */
@media (max-width: 1199.98px) {
    #first-screen h1.animated .mv2-static-types {
        display: inline !important;
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    #first-screen {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
    }

    #first-screen .mv2-hero-actions {
        margin-bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* iPhone-class portrait: preserve the same PNG composition, only give it a shorter viewport slot. */
@media (max-width: 430px) and (max-height: 900px) {
    #first-screen .animation-block {
        height: 292px !important;
        background-size: 108% auto !important;
        background-position: center top !important;
    }

    #first-screen > .container-fluid {
        margin-top: 10px !important;
    }

    #first-screen h1 {
        font-size: clamp(25px, 7.2vw, 29px) !important;
        line-height: 1.06 !important;
    }

    #first-screen h2 {
        margin-top: 13px !important;
        font-size: clamp(18px, 5vw, 21px) !important;
        line-height: 1.18 !important;
    }

    #first-screen .mv2-hero-actions {
        margin-top: 16px !important;
    }
}

/* FINAL MOBILE HERO HEIGHT HOTFIX — remove forced viewport-height tail on phones. */
@media (max-width: 767.98px) {
    #first-screen {
        min-height: auto !important;
        height: auto !important;
        padding-bottom: 24px !important;
    }

    #first-screen .mv2-hero-actions {
        margin-bottom: 0 !important;
    }
}
