@charset "UTF-8";

/* ========================================================================
   Montserrat — self-hosted (no dependency on Google Fonts)
   ======================================================================== */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(assets/fonts/montserrat-400-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(assets/fonts/montserrat-400-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(assets/fonts/montserrat-400-cyrillic.woff2) format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(assets/fonts/montserrat-400-cyrillic-ext.woff2) format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(assets/fonts/montserrat-500-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(assets/fonts/montserrat-500-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(assets/fonts/montserrat-500-cyrillic.woff2) format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(assets/fonts/montserrat-500-cyrillic-ext.woff2) format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(assets/fonts/montserrat-600-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(assets/fonts/montserrat-600-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(assets/fonts/montserrat-600-cyrillic.woff2) format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(assets/fonts/montserrat-600-cyrillic-ext.woff2) format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(assets/fonts/montserrat-700-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(assets/fonts/montserrat-700-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(assets/fonts/montserrat-700-cyrillic.woff2) format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(assets/fonts/montserrat-700-cyrillic-ext.woff2) format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}


/* ========================================================================
   Design tokens
   ======================================================================== */
:root {
    --bg: #0b1723;
    --bg-card: #1c2836;
    /* Card surfaces: static (non-clickable) cards use the flat --bg-card;
       clickable cards use a distinctly brighter gradient + active tone, for
       clear visual separation. */
    --card-clickable: linear-gradient(135deg, #243a57 0%, #2f4c70 100%);
    --card-clickable-active: #37577f;
    /* Hover surface — a *gradient* (same structure as --card-clickable) so the
       background transition interpolates cleanly. Swapping gradient→solid on
       hover can't be animated and makes the bevel/frame flicker. */
    --card-clickable-hover: linear-gradient(135deg, #2c4665 0%, #3a5c85 100%);
    --card-shadow: inset 0 2px 0 var(--border), inset -2px 0 0 var(--border);
    /* Clickable cards: a light top/right bevel (white, so it reads on the
       brighter surface — #2e3a54 would look muddy there) plus a drop shadow
       to lift them off the page. */
    --card-shadow-clickable:
        inset 0 2px 0 rgba(255, 255, 255, .13),
        inset -2px 0 0 rgba(255, 255, 255, .07),
        0 4px 12px rgba(0, 0, 0, .28);
    /* Lifted hover: brighter bevel + deeper drop shadow, paired with a small
       translateY so the card clearly reacts to the pointer. */
    --card-shadow-clickable-hover:
        inset 0 2px 0 rgba(255, 255, 255, .18),
        inset -2px 0 0 rgba(255, 255, 255, .10),
        0 12px 26px rgba(0, 0, 0, .42);
    /* Drop shadows: resting + hover lift — hero photo, PDF buttons, callback panel */
    --shadow: 0 4px 10px rgba(0, 0, 0, .25);
    --shadow-hover: 0 6px 14px rgba(0, 0, 0, .35);
    --text: #fff;
    --text-muted: #5a7088;
    --accent: #2a68ac;
    --accent-bright: #3487e2;
    --accent-soft: #4f97e3;
    /* Diagonal accent gradients — buttons, the phone pill, lightbox controls
       and footer socials; --grad-accent-hover is their hover/active surface. */
    --grad-accent: linear-gradient(135deg, var(--accent), var(--accent-bright));
    /* Hover surface for accent controls. Same two-stop 135deg structure as
       --grad-accent, so the browser interpolates the transition smoothly —
       swapping to a flat colour (image → none) makes the button flash. */
    --grad-accent-hover: linear-gradient(135deg, var(--accent-bright), var(--accent-light));
    /* Links — one consistent treatment everywhere */
    --link: var(--accent-bright);
    --link-hover: var(--text);
    /* Surfaces / overlays beyond the base cards. Popups/dialogs sit over
       the dark overlay — keep opaque, translucent white goes muddy there. */
    --bg-popup: #fff;                       /* credentials tooltip, modal */
    --bg-overlay: rgba(11, 23, 35, .92);    /* lightbox backdrop */
    /* Text on coloured / overlay surfaces */
    --text-on-accent: #fff;
    --text-on-overlay: rgba(255, 255, 255, .75);
    /* Lines, bevels, rings */
    --border: #2e3a54;
    --bevel-light: rgba(255, 255, 255, .06);
    --ring-light: rgba(255, 255, 255, .12);
    /* Accent extras */
    --accent-light: #6cabf1;
    /* Metallic-silver fill for the laurel wreaths (the numbers inside use the
       accent-blue gradient), so each stat reads as an award. */
    --laurel-grad: linear-gradient(135deg, #d3d9e0, #8b97a6);
    /* Colour of the shine band sweeping across the header phone digits. */
    --phone-shine: var(--accent);
    /* Form controls (callback modal) */
    --input-bg: rgba(255, 255, 255, .06);
    --input-border: var(--border);
    --focus-ring: rgba(42, 104, 172, .18);
    --focus-ring-danger: rgba(212, 73, 76, .22);
    --underline-soft: rgba(79, 151, 227, .35);
    --star: #f5b50a;
    --danger: #d4494c;
    --success: #2e9e5b;
    /* Elevation — drop shadows for specific surfaces */
    --shadow-menu: 0 12px 30px rgba(0, 0, 0, .4);
    --shadow-card-open: 0 12px 30px rgba(0, 0, 0, .25);
    /* Transparent twin — keep geometry in sync with --shadow-card-open. */
    --shadow-card-open-off: 0 12px 30px transparent;
    --shadow-popup: 0 20px 60px rgba(0, 0, 0, .65);
    --shadow-lightbox: 0 30px 80px rgba(0, 0, 0, .6);
    --shadow-avatar-rim: inset 0 0 0 1px rgba(0, 0, 0, .28), inset 0 2px 3px -1px rgba(0, 0, 0, .26);
    /* Raised "volume" shared by the primary CTA buttons and the mobile phone
       pill: inset bevels + a tight drop shadow + a same-hue blue glow. */
    --cta-volume-shadow:
        inset 0 2px 0 rgba(255, 255, 255, .28),
        inset 0 -2px 0 rgba(0, 0, 0, .14),
        0 8px 16px -12px rgba(0, 0, 0, .8),
        0 12px 16px -12px rgba(52, 135, 226, .6);
    --cta-volume-shadow-hover:
        inset 0 2px 0 rgba(255, 255, 255, .3),
        inset 0 -2px 0 rgba(0, 0, 0, .14),
        0 10px 18px -12px rgba(0, 0, 0, .85),
        0 16px 22px -12px rgba(52, 135, 226, .68);
    --cta-volume-shadow-active:
        inset 0 2px 0 rgba(255, 255, 255, .2),
        inset 0 -1px 0 rgba(0, 0, 0, .12),
        0 4px 10px -8px rgba(0, 0, 0, .7),
        0 6px 12px -10px rgba(52, 135, 226, .5);
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --gutter: 25px;
    /* Responsive grid: columns shrink and gutters get proportionally
       smaller as the screen narrows (overridden per breakpoint below). */
    --container-w: 1050px;
    --grid-cols: 12;
    --grid-gap: 24px;
    --transition: .15s ease-out;
    /* Slower speed for card lifts / burger morph / accordion glyphs. */
    --transition-md: .2s ease-out;
    --font-main: 'Montserrat', sans-serif;
    --font-head: var(--font-main);
}

/* SVG icon sprite — kept out of layout flow. */
.svg-sprite { position: absolute; }

/* ========================================================================
   Reset / base
   ======================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    /* `clip` hides horizontal overflow WITHOUT turning <html> into a
       scroll container — `hidden` here breaks iOS momentum scrolling and
       makes vertical scroll feel like it sticks. `hidden` is the fallback
       for browsers without `clip` (Safari < 16). */
    overflow-x: hidden;
    overflow-x: clip;
    background: var(--bg);
    color: var(--text);
}

body {
    margin: 0;
    min-width: 360px;
    overflow-x: hidden;
    overflow-x: clip;
    font-family: var(--font-main);
    font-weight: 500;
    background-color: var(--bg);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28'><path transform='translate(12.2 12) scale(.1)' fill='%23ffffff' fill-opacity='.04' d='M17.876 40l-.738-.323C7.943 35.656 0 32.183 0 20.203V0h35.753v20.203c0 11.98-7.942 15.453-17.138 19.474l-.739.323z'/></svg>");
    background-size: 28px 28px;
}

body * {
    font-family: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--link);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--link-hover);
}

button {
    font: inherit;
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
    padding: 0;
}

p {
    margin: 0;
}

.h2 {
    color: var(--text);
    font-family: var(--font-head);
    font-size: 35px;
    line-height: 43px;
    margin: 0;
    font-weight: 600;
}

/* ========================================================================
   Layout: site wrapper + body container
   ======================================================================== */
/* Responsive grid tokens — columns + gutter + container width per range.
   Desktop 12 / tablet 8 / mobile 4 columns; gutter 24 → 20 → 16 → 12. */
@media (max-width: 1279px) {
    :root {
        --container-w: min(960px, calc(100vw - 48px));
        --grid-cols: 8;
        --grid-gap: 20px;
    }
}
@media (max-width: 1023px) {
    :root {
        /* Fluid tablet width (caps at 920px) — no narrow column with huge gutters. */
        --container-w: min(920px, calc(100vw - 64px));
    }
}
@media (max-width: 767px) {
    :root {
        --container-w: 100%;
        --grid-cols: 4;
        --grid-gap: 16px;
    }
}
@media (max-width: 479px) {
    :root { --grid-gap: 12px; }
}

.site-wrapper {
    width: var(--container-w);
    min-width: 320px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

@media (max-width: 767px) {
    .h2 {
        font-size: 20px;
        line-height: 28px;
    }
}

/* ========================================================================
   Header
   ======================================================================== */
.header {
    position: relative;
    z-index: 5;
    padding-bottom: 7px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-right: 10px;
    text-decoration: none;
    border-radius: var(--radius-xs);
}

.logo:focus-visible,
.menu__link:focus-visible,
.contacts__phone:focus-visible,
.header__burger:focus-visible,
.callback-btn:focus-visible {
    outline: 2px solid var(--accent-bright);
    outline-offset: 3px;
}

.menu__link {
    color: var(--link);
    font-size: 15px;
    line-height: 1.2;
    padding: 14px 12px;
    text-decoration: none;
    transition: color var(--transition);
    white-space: nowrap;
}

.menu__link:hover {
    color: var(--link-hover);
}

/* ---------- Burger button + mobile menu overlay ---------- */
.header__burger {
    display: none;
    width: 36px;
    height: 36px;
    margin-left: 8px;
    position: relative;
}

.header__burger span {
    position: absolute;
    left: 8px;
    right: 8px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform var(--transition-md), opacity var(--transition-md), top var(--transition-md);
}

.header__burger span:nth-child(1) { top: 11px; }
.header__burger span:nth-child(2) { top: 17px; }
.header__burger span:nth-child(3) { top: 23px; }

.header__burger[aria-expanded="true"] span:nth-child(1) {
    top: 17px;
    transform: rotate(45deg);
}
.header__burger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.header__burger[aria-expanded="true"] span:nth-child(3) {
    top: 17px;
    transform: rotate(-45deg);
}

.header .site-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding-top: 40px;
    padding-bottom: 30px;
}

.menu {
    display: flex;
    align-items: center;
    transform: translateY(3px);
}

@keyframes phone-shine {
    0%    { background-position: 0% 0; }
    33.3% { background-position: 100% 0; }
    100%  { background-position: 100% 0; }
}

@media (max-width: 1279px) {
    .menu {
        position: absolute;
        top: 100%;
        /* Full viewport width on every mobile/tablet size (break out of the
           centered container, which is narrower than the viewport above
           768px). */
        left: 50%;
        right: auto;
        width: 100vw;
        transform: translateX(-50%);
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 8px var(--gutter) 16px;
        background-color: var(--bg);
    }

    .menu.menu--open {
        display: flex;
    }

    .menu__link {
        margin: 0;
        padding: 14px 4px;
        font-size: 16px;
        line-height: 1.2;
        color: var(--text);
    }

    .header__burger {
        display: block;
    }

    .header .site-wrapper {
        position: relative;
    }

    /* When the mobile menu is open the header + dropdown read as one solid
       sheet: the header takes the panel background and lifts above the dimming
       backdrop (z-index), so it sits over both the menu and the darkened site. */
    .header:has(.menu--open) {
        background-color: var(--bg);
        z-index: 50;
    }

    /* Dark, blurred backdrop over the rest of the site — same treatment as the
       form modal. Sits below the header/menu sheet (z 50) but above the page. */
    .menu-backdrop {
        position: fixed;
        inset: 0;
        z-index: 40;
        background: var(--bg-overlay);
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
        opacity: 0;
        visibility: hidden;
        transition: opacity var(--transition), visibility var(--transition);
    }

    body.menu-open .menu-backdrop {
        opacity: 1;
        visibility: visible;
    }
}

/* ========================================================================
   Contacts (phone + callback button)
   ======================================================================== */
.contacts {
    display: flex;
    align-items: center;
}

/* Desktop only: match the .menu optical nudge so the phone sits exactly on
   the inline nav line (below 1280 the nav is a burger — nothing to align to). */
@media (min-width: 1280px) {
    .contacts {
        transform: translateY(3px);
    }
}

.contacts__phone-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 20px;
    line-height: 1.2;
}

/* Diagonal blue shine that sweeps across the phone digits. Two layers
   are clipped to the text: a solid base in the original color, and a
   narrow blue band that travels from right to left across that base. */
.contacts__phone {
    color: var(--text);
    font-size: 22px;
    line-height: 27px;
    text-align: right;
    display: inline-flex;
    align-items: center;
    pointer-events: none;
    cursor: default;
    /* Single opaque gradient (dark → shine band → dark). Two stacked layers
       left a dark rim on the digits: the light shine sat on top of the dark
       base, and at the anti-aliased glyph edges the top layer's partial
       coverage let the dark base bleed through as an outline. One gradient
       fills every pixel, so the edges anti-alias cleanly. */
    background-image:
        linear-gradient(115deg,
            var(--text) 0%, var(--text) 44%,
            var(--phone-shine) 48%,
            var(--phone-shine) 52%,
            var(--text) 56%, var(--text) 100%);
    background-size: 350% 100%;
    background-position: 0% 0;
    background-repeat: no-repeat;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: phone-shine 4.5s linear infinite;
}

@media (max-width: 767px) {
    .header .site-wrapper {
        padding: 12px var(--gutter);
        flex-wrap: nowrap;
        gap: 10px;
    }

    .logo {
        flex: 0 0 auto;
    }

    .logo img {
        width: 130px;
        height: auto;
    }

    .contacts {
        margin-left: auto;
        gap: 6px;
    }

    .contacts__phone-wrap {
        align-items: center;
        margin-right: 10px;   /* space between the phone and the burger */
    }

    .contacts__phone {
        /* Blue pill — reset the desktop shine/text-clip effect and use the
           brand gradient, matching the other accent controls. */
        background-color: transparent;
        background-image: var(--grad-accent);
        background-clip: border-box;
        -webkit-background-clip: border-box;
        -webkit-text-fill-color: currentColor;
        animation: none;
        /* White digits — the pill sits on the accent gradient, so the themed
           --text (dark in the light theme) is unreadable here. */
        color: var(--text-on-accent);
        font-size: 15px;
        line-height: 18px;
        font-weight: 600;
        text-align: center;
        white-space: nowrap;   /* keep the number on a single line */
        border-radius: var(--radius-md);
        padding: 7px 14px;     /* compact 32px pill height */
        /* Same raised "volume" as the "Заказать консультацию" CTA. */
        box-shadow: var(--cta-volume-shadow);
        transition: background var(--transition), transform var(--transition),
            box-shadow var(--transition);
        pointer-events: auto;
        cursor: pointer;
    }

    /* Rises on hover/focus, presses in on active — matching the CTA. */
    .contacts__phone:hover,
    .contacts__phone:focus {
        color: var(--text-on-accent);
        background: var(--grad-accent-hover);
        transform: translateY(-1px);
        box-shadow: var(--cta-volume-shadow-hover);
    }

    .contacts__phone:active {
        color: var(--text-on-accent);
        background: var(--grad-accent-hover);
        transform: translateY(1px);
        box-shadow: var(--cta-volume-shadow-active);
    }
}

@media (max-width: 479px) {
    .header .site-wrapper {
        padding: 10px 14px;
        gap: 8px;
    }
    .logo img { width: 96px; }
    .contacts { gap: 4px; }
    .contacts__phone {
        font-size: 13px;
        line-height: 16px;
        padding: 7px 11px;
        border-radius: var(--radius-md);
    }
    .header__burger {
        width: 32px;
        height: 32px;
        margin-left: 4px;
    }
    .header__burger span { left: 6px; right: 6px; }
    /* Re-center the three lines for the shorter 32px button (the base 11/17/23
       positions are tuned for the 36px button and would otherwise sit ~2px
       below the logo / phone, which all center on the row). */
    .header__burger span:nth-child(1) { top: 9px; }
    .header__burger span:nth-child(2) { top: 15px; }
    .header__burger span:nth-child(3) { top: 21px; }
    /* Keep the open "X" centered too. */
    .header__burger[aria-expanded="true"] span:nth-child(1),
    .header__burger[aria-expanded="true"] span:nth-child(3) { top: 15px; }
}

/* ========================================================================
   Hero (titling)
   ======================================================================== */
.titling {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.titling__left {
    flex-basis: 54%;
}

.titling__right {
    flex-basis: 45%;
    display: flex;
    /* Column: circular portrait on top, name + firm caption below it. */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    position: relative;
    z-index: 1;
}

/* Name + firm caption under the hero portrait. */
.titling__ident {
    text-align: center;
}

.titling__name {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
}

.titling__cred {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-muted);
}

/* On large screens the palace/region part drops to its own line. */
@media (min-width: 1024px) {
    .titling__cred-region {
        display: block;
    }
}

@media (min-width: 1024px) {
    /* Header floats over the hero (it's transparent on desktop), so the
       hero owns the full viewport height — no header space is reserved. */
    .header {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
    }
    .titling {
        /* Fill the screen, but don't over-stretch on tall desktop monitors. */
        --hero-h: min(100dvh, 1080px);
        min-height: var(--hero-h);
        align-items: stretch;
        margin-top: 0;
    }
    .titling__left {
        /* Section spans the whole screen, so centering lands the text on
           the true vertical center of the viewport (50vh); nudged 15px down. */
        margin-top: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 24px 0;
        transform: translateY(15px);
    }
    .titling__right {
        flex-grow: 1;
        min-height: 0;
    }
    /* Scoped one level deeper than the base `.titling__photo` rule so this
       desktop cap wins the cascade over the later-in-source base rule. */
    .titling__right .titling__photo {
        /* The circle: a bit larger on desktop, but never taller than the
           hero minus the floating header. */
        width: min(88%, 460px, calc(var(--hero-h) - var(--header-h, 107px) - 60px));
    }
}

.titling__photo {
    /* Square portrait cropped to a circle. */
    width: min(82%, 420px);
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    /* Centered in the column (was right-aligned with a 40px gutter). */
    margin: 0 auto;
    box-shadow: var(--shadow);
}

.scroll-hint {
    position: fixed;
    bottom: 44px;
    /* Centered horizontally on screen. */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    pointer-events: none;
    z-index: 4;
    transition: opacity .12s ease-out;
}

.scroll-hint__icon {
    flex: 0 0 24px;
    width: 24px;
    height: 38px;
    background: url(assets/icons/mouse.svg) no-repeat center / contain;
}

.scroll-hint.is-hidden {
    opacity: 0;
}

@media (max-width: 1023px) {
    .scroll-hint { display: none; }
}

/* The hero caps at 1080px tall, so on taller screens the scroll hint
   (the mouse icon) would float detached at the bottom — hide it. */
@media (min-height: 1081px) {
    .scroll-hint { display: none; }
}

.pros {
    position: relative;
    z-index: 3;
}

.titling__title {
    margin-bottom: 25px;
    font-size: 31px;
    line-height: 1.2;
}

.titling__title span {
    display: block;
}

.titling__description {
    color: var(--text);
    font-size: 18px;
    line-height: 1.55;
}

.titling__intro {
    margin: 0 0 14px;
}

.titling__cta-line {
    /* Sits just below the hero CTA button. */
    margin: 16px 0 0;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 500;
    color: var(--text-muted);
    font-style: italic;
}

/* Primary hero CTA — sits above the closing line, larger than the header pill.
   (Its raised "volume" box-shadow is defined with the other key CTAs below.) */
.callback-btn.callback-btn--hero {
    margin-top: 24px;
    padding: 15px 38px;
    font-size: 18px;
    border-radius: var(--radius-md);
}

@media (min-width: 1024px) {
    .callback-btn.callback-btn--hero {
        margin-top: 28px;
    }
}

@media (max-width: 1023px) {
    .callback-btn.callback-btn--hero {
        margin-top: 14px;
        padding: 13px 30px;
        font-size: 16px;
    }
}

.titling__list {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}

.titling__list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 8px;
}

.titling__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .6em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-bright);
    animation: bullet-pulse 1.8s ease-in-out infinite;
}

/* Pulsing halo around the hero bullets. */
@keyframes bullet-pulse {
    0%, 100% { box-shadow: 0 0 0 2px var(--focus-ring); }
    50%      { box-shadow: 0 0 0 6px var(--focus-ring); }
}

@media (max-width: 1023px) {
    .titling {
        margin-top: 0;
        margin-bottom: 32px;
    }

    .titling__title {
        font-size: 26px;
        margin-bottom: 18px;
    }

    .titling__left {
        margin-top: 48px;
        flex-basis: 60%;
    }

    .titling__right {
        margin-top: 20px;
        flex-basis: 36%;
        min-height: 0;
    }

    .titling__description {
        font-size: 15px;
        line-height: 1.45;
    }

    .titling__intro,
    .titling__cta-line {
        margin-bottom: 12px;
    }

    .titling__list {
        margin-bottom: 14px;
    }

    .titling__list li {
        margin-bottom: 6px;
    }
}

@media (max-width: 767px) {
    .titling {
        margin-top: 24px;       /* push the hero away from the header */
        margin-bottom: 0;       /* photo sits right above the regalia card */
        flex-direction: column;
        align-items: center;
    }

    .titling__right {
        order: 1;
        flex-basis: auto;
        width: 100%;
        height: auto;
        margin: 32px auto 40px;
        gap: 12px;
    }

    /* Enlarged portrait on mobile. */
    .titling__right .titling__photo {
        width: 224px;
        height: 224px;
    }

    .titling__name {
        font-size: 18px;
    }

    .titling__left {
        order: 0;
        flex-basis: 100%;
        margin-top: 0;
        width: 100%;
    }

    .titling__title {
        font-size: 23px;
        line-height: 1.15;
        margin-bottom: 16px;
    }

    .titling__description {
        font-size: 14px;
        line-height: 1.4;
    }

    .titling__intro,
    .titling__cta-line {
        margin-bottom: 10px;
    }

    .titling__cta-line {
        font-size: 15px;
    }

    .titling__list {
        margin-bottom: 12px;
    }

    .titling__list li {
        margin-bottom: 4px;
        padding-left: 20px;
    }

    .titling__list li::before {
        width: 7px;
        height: 7px;
        top: .5em;
    }
}

/* ========================================================================
   Pros (counters)
   ======================================================================== */
.pros__about {
    color: var(--text);
}

.pros__credentials {
    font-size: 14px;
    line-height: round(1.75em, 1px);
    color: var(--text);
}

/* Space the four regalia lines apart so the block reads a touch airier. */
.pros__credentials + .pros__credentials {
    margin-top: 7px;
}

.pros__cred {
    position: relative;
    display: inline-block;
}

.pros__cred-link {
    cursor: pointer;
    color: var(--text);
    /* Two stacked underlines: a faint static base (always visible, so the
       word still reads as interactive) and a bright blue line that draws
       in from the left on hover/open. */
    background-image:
        linear-gradient(var(--link), var(--link)),
        linear-gradient(var(--underline-soft), var(--underline-soft));
    background-repeat: no-repeat;
    background-size: 0% 2px, 100% 1px;
    background-position: 0 100%, 0 100%;
    padding-bottom: 3px;
    /* The bright bar "loads" left→right while the image is being revealed. */
    transition: background-size .5s ease-out;
}

.pros__cred.is-open .pros__cred-link {
    background-size: 100% 2px, 100% 1px;
}

.pros__cred-popup {
    position: absolute;
    bottom: calc(100% + 14px);
    left: 50%;
    transform: translate(-50%, 4px);
    background: var(--bg-popup);
    padding: 10px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-popup);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition), visibility .15s;
    z-index: 50;
}

/* Flipped variant: shown below the link when there's no room above. */
.pros__cred-popup--below {
    bottom: auto;
    top: calc(100% + 14px);
    transform: translate(-50%, -4px);
}

.pros__cred-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    /* --arrow-x keeps the arrow over the link when the popup is nudged
       sideways to stay within the viewport (set by JS). */
    transform: translateX(calc(-50% + var(--arrow-x, 0px)));
    border: 8px solid transparent;
    border-top-color: var(--bg-popup);
}

/* Arrow points up when the popup is below the link. */
.pros__cred-popup--below::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: var(--bg-popup);
}

.pros__cred-popup img {
    display: block;
    width: 500px;
    max-width: 90vw;
    height: auto;
    border-radius: var(--radius-xs);
}

.pros__cred-popup--xl img { width: 560px; }
.pros__cred-popup--md img { width: 440px; }

/* Portrait A4 certificates (Поощрялся / Награждался) — equal size */
.pros__cred-popup--portrait img {
    width: 230px;
    max-height: 54vh;
    object-fit: contain;
}

.pros__cred.is-open .pros__cred-popup {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
    /* Wait for the underline bar to finish "loading" before revealing. */
    transition-delay: .5s;
}

@media (max-width: 767px) {
    .pros__credentials {
        font-size: 12px;
        line-height: round(1.7em, 1px);
    }
}

.pros__container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-lg);
    /* Static (non-clickable) card — flat surface. */
    background: var(--bg-card);
    box-shadow: var(--card-shadow);
}

/* Both breakpoint branches used to re-declare the column layout — it is
   the same at every width, so it lives here. */
.pros-item {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
}

.pros__items {
    display: flex;
    align-items: flex-start;
}

/* Desktop & tablet-landscape (≥1024): laurels row on the left, name +
   credentials text on the right — one level. */
@media (min-width: 1024px) {
    .pros__container {
        flex-direction: row-reverse;
        flex-wrap: nowrap;
        gap: 24px;
        padding: 32px 32px;
    }

    .pros__items {
        flex: 0 0 auto;
    }

    .pros__about {
        flex: 0 0 auto;
        text-align: right;
        padding: 0;
        margin: 0;
    }

    .pros__credentials {
        line-height: round(1.8em, 1px);
        white-space: nowrap;
    }

    .pros__credentials + .pros__credentials {
        margin-top: 9px;
    }

    .pros-item {
        flex: 0 0 auto;
        text-align: center;
        width: 160px;
    }

    .pros-item__descr {
        line-height: round(1.35em, 1px);
    }
}

.pros-item__digit {
    position: relative;
    width: 258px;
    height: 113px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
    margin-bottom: 4px;
    padding-bottom: 4px;
}

/* The wreath is painted as a CSS mask over a gold fill, so its colour is
   driven from CSS (var(--laurel-grad)) rather than baked into the SVG. Each
   variant supplies its own wreath shape via --laurel-img. */
.pros-item__digit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--laurel-grad);
    -webkit-mask: var(--laurel-img) center / contain no-repeat;
    mask: var(--laurel-img) center / contain no-repeat;
}

.pros-item__num {
    position: relative;   /* sit above the masked wreath */
    z-index: 1;
    font-size: 35px;
    font-weight: 700;
    line-height: round(1em, 1px);
    background-image: linear-gradient(135deg, var(--accent-light), var(--accent-bright));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.pros-item__digit--second { --laurel-img: url(assets/icons/laurel1.svg); }
.pros-item__digit--third  { --laurel-img: url(assets/icons/laurel2.svg); }
.pros-item__digit--fourth { --laurel-img: url(assets/icons/laurel3.svg); }

/* The 4th laurel holds "300+" (4 glyphs incl. the plus) — keep it visually
   inside the wreath arcs by tightening glyph spacing and dialing the size
   down to ~80% of the 2-digit siblings at every breakpoint. */
.pros-item__digit--fourth .pros-item__num {
    font-size: 28px;             /* ≥1280 desktop (siblings 35) */
    letter-spacing: -.02em;
}
@media (min-width: 1024px) and (max-width: 1279px) {
    .pros-item__digit--fourth .pros-item__num { font-size: 24px; }   /* siblings 30 */
}
@media (max-width: 1023px) {
    .pros-item__digit--fourth .pros-item__num { font-size: 22px; }   /* siblings 28 */
}
@media (max-width: 767px) {
    .pros-item__digit--fourth .pros-item__num { font-size: 16px; }   /* siblings 20 */
}

.pros-item__descr {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: 12px;
    line-height: round(1.4em, 1px);
    color: var(--text-muted);
}

@media (max-width: 1023px) {
    .pros__container {
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
        padding: 20px 24px 24px;
        gap: 24px;   /* more breathing room below the embossed divider */
    }

    .pros__about {
        padding-bottom: 16px;
        /* Right-align the regalia text in the stacked layout (tablet-portrait,
           768–1023) — phones (≤767) override this back to left below. */
        text-align: right;
        /* Divider between the regalia text and the counters. Only in the
           stacked layout (tablet/mobile) — on desktop the about block is a side
           column and the divider looks out of place. Coloured to match the
           credential-link underlines in this block. */
        border-bottom: 1px solid var(--underline-soft);
    }

    .pros__items {
        justify-content: space-around;
        gap: 8px;
        width: 100%;
    }

    .pros-item {
        flex: 0 1 auto;
        justify-content: flex-start;
    }

    .pros-item__digit {
        width: 210px;
        height: 92px;
        margin-bottom: 4px;
    }

    .pros-item__num {
        font-size: 28px;
    }
}

/* 1024–1279: same one-level row layout as desktop, but the container is only
   960px wide here — scale the laurels down and tighten gaps so the wreaths +
   the nowrap credentials column fit without overflowing. */
@media (min-width: 1024px) and (max-width: 1279px) {
    .pros__container {
        gap: 24px;
        padding: 24px 24px;
    }

    .pros-item {
        width: 150px;
    }

    .pros-item__digit {
        width: 185px;
        height: 81px;
    }

    .pros-item__num {
        font-size: 30px;
    }

    .pros-item__descr {
        font-size: 11px;
    }

    .pros__credentials {
        font-size: 13px;
    }
}

/* All main sections share the same ≤767 side gutter. Declared before the
   ≤479 overrides below and at the file tail, which narrow it to 12px. */
@media (max-width: 767px) {
    .titling,
    .pros,
    .practices,
    .reviews,
    .qualification,
    .footer {
        padding-left: var(--gutter);
        padding-right: var(--gutter);
    }

    .pros__container {
        padding: 16px 10px 18px;
        gap: 20px;   /* more breathing room below the embossed divider */
    }

    .pros__about {
        padding-bottom: 12px;
        text-align: left;   /* left-align the regalia text on mobile */
        /* Inset via margin (not padding) so the divider (border-bottom) shrinks
           to the text width instead of spanning the full card. The ≤479 rule
           overrides this with its own value. */
        margin-left: 8px;
        margin-right: 8px;
        padding-left: 0;
        padding-right: 0;
    }

    .pros__items {
        gap: 4px;
    }

    .pros-item {
        flex: 1 1 0;
        min-width: 0;
    }

    .pros-item__digit {
        width: 100%;
        max-width: 132px;   /* let the wreath fill the available item width */
        height: 58px;
        padding-bottom: 3px;
        margin-bottom: 3px;
    }

    .pros-item__num {
        font-size: 20px;
    }

    .pros-item__descr {
        font-size: 10px;
        line-height: round(1.25em, 1px);
        letter-spacing: .04em;
    }
}

/* Small phones: give the laurel medals more room (trim padding/gaps,
   drop the width cap, taller box) so the wreaths read bigger — the
   number size stays the same. */
@media (max-width: 479px) {
    .pros {
        padding-left: 12px;
        padding-right: 12px;
    }

    .pros__container {
        padding-left: 4px;
        padding-right: 4px;
    }

    /* Keep the container narrow so the laurels stay wide, but inset the
       regalia text (and its divider) so neither hugs the card edge. */
    .pros__about {
        margin-left: 14px;
        margin-right: 14px;
        padding-left: 0;
        padding-right: 0;
    }

    .pros__items {
        gap: 2px;
    }

    .pros-item__digit {
        max-width: none;
        height: 66px;
        /* The item is already full-width here, so grow the wreath past the
           box edges (its art has side whitespace) to read larger. */
        background-size: 118%;
    }
}

/* ========================================================================
   Practices accordion
   ======================================================================== */
/* The three main content sections share one vertical-rhythm ladder
   (150 -> 110 -> 80 as the viewport narrows). */
.practices,
.reviews,
.qualification {
    margin-top: 150px;
}

@media (max-width: 1279px) {
    .practices,
    .reviews,
    .qualification {
        margin-top: 110px;
    }
}

@media (max-width: 767px) {
    .practices,
    .reviews,
    .qualification {
        margin-top: 80px;
    }
}

.practices__title {
    margin-bottom: 24px;
}

.practices__items {
    display: block;
    width: 100%;
}

/* Clickable cards — the shared diagonal-gradient surface that brightens
   and lifts on hover. Per-card padding/radius/shadow variations stay in
   each card's own rule. */
.practice-item,
.rating-card,
.qualification__link,
.qualification__see-all {
    background: var(--card-clickable);
    transition: transform var(--transition-md), box-shadow var(--transition-md), background var(--transition-md);
}

.rating-card,
.qualification__link,
.qualification__see-all {
    box-shadow: var(--card-shadow-clickable);
}

/* Gradient→gradient (both --card-clickable*) interpolates cleanly — no
   frame flicker. Lift + deeper shadow make the hover clearly readable.
   (.practice-item has its own is-closed-scoped hover below.) */
.rating-card:hover,
.qualification__link:hover,
.qualification__see-all:hover {
    background: var(--card-clickable-hover);
    box-shadow: var(--card-shadow-clickable-hover);
    transform: translateY(-4px);
}

.practice-item {
    display: block;
    border-radius: var(--radius-lg);
    /* The transparent 4th layer matches the expanded state's layer count so
       the box-shadow transition interpolates cleanly (mismatched layer
       counts leave a "stuck" shadow). */
    box-shadow: var(--card-shadow-clickable), var(--shadow-card-open-off);
    margin-bottom: 12px;
    overflow: hidden;
    position: relative;
}

/* Closed cards lift on hover, like the certificate/rating tiles. Open cards
   already sit lifted (--shadow-card-open), so they don't move. */
.practice-item.is-closed:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-clickable-hover), var(--shadow-card-open-off);
}

.practice-item:not(.is-closed) {
    /* Only the drop shadow lifts to signal the card is open. */
    box-shadow: var(--card-shadow-clickable), var(--shadow-card-open);
}

.practice-item__summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 50px 18px 22px;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px 16px;
    position: relative;
    color: var(--text);
    user-select: none;
}

.practice-item__summary::-webkit-details-marker {
    display: none;
}

.practice-item__summary:hover {
    background-color: var(--card-clickable-active);
}

.practice-item__title {
    color: var(--text);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.3;
    flex: 1 1 60%;
    min-width: 0;
}

.practice-item__result {
    color: var(--accent-soft);
    font-size: 14px;
    line-height: 1.4;
    flex: 0 0 auto;
    margin-right: 8px;
    white-space: nowrap;
}

/* + / − accordion glyph */
.practice-item__icon {
    position: absolute;
    top: 50%;
    right: 22px;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
}

.practice-item__icon::before,
.practice-item__icon::after {
    content: '';
    position: absolute;
    background: var(--accent-soft);
    border-radius: 1px;
    transition: transform var(--transition-md);
}

.practice-item__icon::before {
    /* horizontal bar */
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    margin-top: -1px;
}

.practice-item__icon::after {
    /* vertical bar */
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    margin-left: -1px;
}

.practice-item:not(.is-closed) .practice-item__icon::after {
    transform: scaleY(0);
}

/* The body height is animated by JS via the .is-closed class + inline
   height. When collapsed the body is also `inert` (out of the tab order and
   the a11y tree) and the summary's aria-expanded reflects the real state. */
.practice-item__body {
    overflow: hidden;
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    transition: height .35s cubic-bezier(.2,.0,.2,1);
}

.practice-item.is-closed .practice-item__body {
    height: 0;
}

.practice-item__body-inner {
    /* Two columns: copy on the left, PDF button pinned right. The copy keeps
       to its own column and never runs under the button. */
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 18px;
    align-items: start;
    padding: 18px 22px 22px;
    border-top: 1px solid var(--border);
}

.practice-item__body-inner > p,
.practice-item__body-inner > ul {
    grid-column: 1;
}

.practice-item__body p {
    margin: 0 0 12px;
}

.practice-item__body ul {
    margin: 0 0 12px 18px;
    padding: 0;
}

.practice-item__body li {
    margin-bottom: 4px;
}

.practice-item__btn {
    display: flex;
    align-items: center;
    gap: 10px;
    /* Pinned to the right column so the copy never runs under it. */
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    padding: 12px 22px;
    width: fit-content;
    border-radius: var(--radius-sm);
    background: var(--grad-accent);
    /* White text on the accent fill — same as the "Ещё кейсы" button. */
    color: var(--text-on-accent);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    transition: background var(--transition);
}

/* Leading document icon — makes it obvious the link opens a real file. */
.practice-item__btn::before {
    content: "";
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3v4a1 1 0 0 0 1 1h4'/%3E%3Cpath d='M17 21H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7l5 5v11a2 2 0 0 1-2 2z'/%3E%3Cpath d='M9 13h6M9 17h6'/%3E%3C/svg%3E") no-repeat center / contain;
}

.practice-item__btn:hover {
    color: var(--text-on-accent);
}

@media (max-width: 767px) {
    .practice-item__summary {
        padding: 14px 42px 14px 16px;
        gap: 6px 12px;
        flex-wrap: wrap;
    }

    .practice-item__title {
        font-size: 15px;
        flex-basis: 100%;
    }

    .practice-item__result {
        font-size: 13px;
        flex-basis: 100%;
        white-space: normal;
    }

    .practice-item__icon {
        right: 16px;
    }

    .practice-item__body {
        font-size: 14px;
        line-height: 1.55;
    }

    .practice-item__body-inner {
        /* Stack on mobile: button on top, copy below. */
        display: block;
    }

    .practice-item__btn {
        margin: 0 0 16px;
        font-size: 14px;
        padding: 8px 18px;
    }
}

/* "More cases" reveal — a pseudo-link (dashed underline), not a filled button. */
.practices__more-btn {
    display: block;
    width: fit-content;
    margin: 44px auto 0;
    padding: 12px 30px;
    color: var(--link);
    font-weight: 600;
    border: 2px solid var(--link);
    border-radius: var(--radius-md);
    transition: color var(--transition), border-color var(--transition);
}

.practices__more-btn:hover {
    color: var(--link-hover);
    border-color: var(--link-hover);
}

/* [hidden] must out-rank the author `display` values these elements carry
   (the .practices__more wrapper has none — the UA default covers it). */
.practices__more-btn[hidden],
.cert-lightbox[hidden],
.callback-modal[hidden] {
    display: none;
}

/* ========================================================================
   Reviews
   ======================================================================== */
.reviews__head {
    margin-bottom: 24px;
}

.reviews__title {
    margin-bottom: 0;
}

/* Overall-rating card — lives in the reviews grid after the 5th review,
   same footprint as a review card. Blue gradient on hover (like buttons). */
.rating-card {
    grid-column: span 4;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    border-radius: var(--radius-lg);
    padding: 22px;
    color: var(--text);
    text-decoration: none;
}

/* It's an <a> — keep the text colour from swapping to the link hover. */
.rating-card:hover {
    color: var(--text);
}

.rating-card__value {
    font-size: 24px;
    font-weight: 600;
    line-height: round(1.1em, 1px);
    color: var(--link);
    transition: color var(--transition);
}

/* Small-caps micro-label, shared with the "+N сертификатов" tile. */
.rating-card__label,
.qualification__see-all-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .06em;
    opacity: .85;
}

.rating-card__label {
    line-height: round(1.35em, 1px);
}

/* Corner arrow. Selector also includes .icon so its size wins over the
   base .icon rule that's declared later in the file. */
.rating-card__icon.icon {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 21px;
    height: 21px;
    color: var(--link);
    transition: transform var(--transition-md), color var(--transition);
}

/* Corner arrow nudges up-right on hover — the original "Все отзывы" dynamic. */
.rating-card:hover .rating-card__icon {
    transform: translate(2px, -2px);
}

/* Blue by default (like a link), brightening to the lighter link-hover tone
   on hover — label and corner arrow alike. */
.rating-card:hover .rating-card__value,
.rating-card:hover .rating-card__icon {
    color: var(--link-hover);
}


.icon-star {
    display: inline-block;
    width: 16px;
    height: 16px;
    fill: var(--star);
    stroke: none;
    flex: 0 0 16px;
}

/* Lucide outline icons (stroke-based) */
.icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

/* The site 12/8/4-column grid, shared by every grid container. */
.reviews__grid,
.footer__grid,
.debug-grid__inner {
    display: grid;
    grid-template-columns: repeat(var(--grid-cols), 1fr);
    gap: var(--grid-gap);
}

.reviews__empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
}

.review-card {
    grid-column: span 4;
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* Static (non-clickable) card — flat surface, same as the regalia card. */
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    padding: 22px;
    color: inherit;
    position: relative;
}

.review-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.review-card__head-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.review-card__avatar {
    position: relative;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 50%;
    /* Explicit blue ring around the avatar — thin, standard-blue. */
    border: 1px solid var(--accent);
    background-color: var(--avatar-bg, var(--accent));
    color: var(--text-on-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    overflow: hidden;
    /* Lit lower lip of the engraved rim — same light value as the regalia
       divider. The dark groove itself is drawn on ::after (above the photo). */
    box-shadow: 0 1px 0 var(--bevel-light);
}

/* Pressed-in / engraved rim, matching the regalia divider. Drawn on ::after
   so it sits ON TOP of the avatar photo — an inset shadow on the parent would
   be hidden behind the (opaque, z-index:1) image, leaving photo avatars flat. */
.review-card__avatar::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
    box-shadow: var(--shadow-avatar-rim);
}

.review-card__avatar-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 1;
}

.review-card__avatar-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-card__author {
    color: var(--text);
    font-size: 15px;
    line-height: round(1.2em, 1px);
}

.review-card__stars {
    display: flex;
    gap: 3px;
    margin-top: 2px;
}

.review-card__text {
    color: var(--text);
    font-size: 14px;
    line-height: round(1.55em, 1px);
    margin: 0;
    /* Clamp to 5 lines + "…" */
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 767px) {

    /* card span 4 on the 4-column mobile grid → 1 per row */
    .review-card { padding: 18px; }
    .rating-card { padding: 22px 18px; }
}

/* ========================================================================
   Qualification list
   ======================================================================== */
.qualification__head {
    margin-bottom: 24px;
}

.qualification__list {
    list-style: none;
    margin: 0;
    padding: 0;
    /* Real grid so the tiles line up with the site's 12-col grid exactly
       (a repeat(N,1fr) grid with the same gap == N/… spans of the site grid;
       6 tiles = 2 cols each). */
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--grid-gap);
}

.qualification__item {
    margin: 0;
    padding: 0;
    min-width: 0;
}

.qualification__link {
    display: flex;
    flex-direction: column;
    color: var(--text);
    border-radius: var(--radius-md);
    padding: 8px;
    width: 100%;
    text-align: left;
}

.qualification__link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.qualification__thumb {
    width: 100%;
    border-radius: var(--radius-xs);
    display: block;
    /* Thin outline ring, matching the review-card avatars. */
    box-shadow: 0 0 0 1px var(--ring-light);
}

.qualification__see-all {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    /* Fill the <li>, which flex-stretches to the certificate tiles' height
       in the same row — so the tile matches them exactly (no aspect-ratio). */
    height: 100%;
    padding: 12px;
    border-radius: var(--radius-md);
    color: var(--text);
    line-height: 1.1;
    text-align: center;
    overflow: hidden;
}

.qualification__see-all-count {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    color: var(--link);
    transition: color var(--transition);
}

/* Blue by default (like a link), brightening on hover — same as the reviews card. */
.qualification__see-all:hover .qualification__see-all-count {
    color: var(--link-hover);
}

@media (max-width: 1279px) {
    .qualification__list {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Hide last 2 visible certs (4th, 5th) on tablet & smaller — keep 3 + see-all = 4 tiles, 1 row */
    .qualification__list > .qualification__item:nth-child(4),
    .qualification__list > .qualification__item:nth-child(5) {
        display: none;
    }
}

@media (max-width: 767px) {
    /* 2 per row → each tile spans 2 of the 4 grid columns (stays on grid). */
    .qualification__list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================================================
   Certificate lightbox
   ======================================================================== */
/* Fullscreen overlay shell — shared by the lightbox and the callback
   modal; only stacking (and the modal's padding) differ per overlay. */
.cert-lightbox,
.callback-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert-lightbox {
    z-index: 1000;
}

/* The container only holds focus for a11y — no visible ring on it. */
.cert-lightbox:focus {
    outline: none;
}

.cert-lightbox__backdrop,
.callback-modal__backdrop {
    position: absolute;
    inset: 0;
    background: var(--bg-overlay);
}

.cert-lightbox__backdrop {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: zoom-out;
}

.cert-lightbox__inner {
    position: relative;
    z-index: 1;
    max-width: min(90vw, 900px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.cert-lightbox__img {
    max-width: 100%;
    max-height: 78vh;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lightbox);
    background: var(--bg-card);
    display: block;
}

.cert-lightbox__counter {
    color: var(--text-on-overlay);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .03em;
    font-variant-numeric: tabular-nums;
}

.cert-lightbox__close,
.cert-lightbox__btn {
    position: absolute;
    z-index: 2;
    /* Bare white glyph — no background, no shadow (it sits on the dark backdrop). */
    color: var(--text-on-accent);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: .85;
    transition: opacity var(--transition);
}

.cert-lightbox__close:hover,
.cert-lightbox__btn:hover:not(:disabled) {
    opacity: 1;
}

.cert-lightbox__close .icon {
    width: 26px;
    height: 26px;
    stroke-width: 2.5;
}

/* Slider prev/next arrows — 3× the close glyph. */
.cert-lightbox__btn .icon {
    width: 78px;
    height: 78px;
    stroke-width: 2.5;
}

.cert-lightbox__close {
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
}

.cert-lightbox__btn {
    top: 50%;
    transform: translateY(-50%);
    width: 78px;
    height: 78px;
}

.cert-lightbox__btn--prev { left: 24px; }
.cert-lightbox__btn--next { right: 24px; }

/* Chevrons aren't visually centered in their viewBox — shift each
   slightly in the direction they point so the arrowhead sits at
   the optical centre of the round button. */
.cert-lightbox__btn--prev .icon { transform: translateX(-2px); }
.cert-lightbox__btn--next .icon { transform: translateX(2px); }

/* Scroll lock while either overlay is open (classes toggled from JS). */
body.cert-lightbox-open,
body.callback-open,
body.privacy-open,
body.menu-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .cert-lightbox__btn--prev { left: 8px; }
    .cert-lightbox__btn--next { right: 8px; }
    .cert-lightbox__close {
        top: 10px;
        right: 10px;
    }
    .cert-lightbox__inner {
        max-width: 94vw;
        gap: 10px;
    }
    .cert-lightbox__img {
        max-height: 72vh;
    }
}

/* ========================================================================
   Callback ("Заказать звонок") — trigger buttons + modal form
   ======================================================================== */
.callback-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: var(--grad-accent);
    color: var(--text-on-accent);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
    border-radius: var(--radius-md);
    transition: background var(--transition);
}

.footer__phone-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
}

/* Standalone CTA sitting just above the footer — same filled-accent look as
   the "Ещё кейсы" button (.practices__more-btn). */
.prefooter-cta {
    display: block;
    width: fit-content;
    margin: 96px auto 0;
    padding: 12px 28px;
    background: var(--grad-accent);
    color: var(--text-on-accent);
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: background var(--transition);
}

@media (max-width: 767px) {
    .prefooter-cta { margin-top: 64px; }
}

/* Callback trigger inside the nav (styled by .menu__link). Hidden on the
   desktop inline bar — there's no header CTA, the hero button covers it;
   shown inside the burger dropdown (≤1279) where the menu becomes a panel. */
.menu__callback {
    display: none;
    text-align: left;
}

@media (max-width: 1279px) {
    .menu__callback { display: block; }
}

/* ---- Modal ---- */
/* The overlay shell (position/centering) and the backdrop base are shared
   with the cert lightbox — see the "Fullscreen overlay shell" rule there. */
.callback-modal {
    z-index: 60;
    padding: 20px;
}

.callback-modal__backdrop {
    cursor: pointer;
    /* Same blurred backdrop as the cert lightbox. */
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.callback-modal__panel {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: var(--bg-popup);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-hover);
    padding: 36px 36px 40px;
}

/* Nudge the form panel a touch above the vertical centre. */
.js-callback-modal .callback-modal__panel {
    transform: translateY(-20px);
}

/* Close icon sits just outside the panel — above AND to the right of its
   top-right corner, white on the dark backdrop. */
.callback-modal__close {
    position: absolute;
    top: auto;
    right: -44px;
    bottom: calc(100% + 8px);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-on-accent);
    opacity: .85;
    transition: opacity var(--transition);
}

/* On phones the panel is near full-width — keep the close simply above the
   top-right corner so it never runs off the screen edge. */
@media (max-width: 767px) {
    .callback-modal__close {
        right: 0;
    }
}

.callback-modal__close:hover {
    opacity: 1;
}

.callback-modal__close .icon {
    width: 26px;
    height: 26px;
    stroke-width: 2.5;
}

.callback-modal__title {
    /* Close now sits outside the panel, so the title uses full width. */
    margin: 0 0 6px;
    font-size: 18px;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--text);
}

.callback-modal__hint {
    margin: 0 0 24px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-muted);
}

/* Form fills the panel; the inputs + button are capped narrower and
   left-aligned, while the policy line below spans the full width (so it wraps
   to two lines). */
.callback-form {
    margin: 0;
}

/* Honeypot — kept in the layout for bots but hidden from people and AT. */
.callback-form__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.callback-form__field {
    display: block;
    position: relative;
    /* Reserve room for the (absolutely-positioned) error so showing it never
       reflows the form. */
    margin-bottom: 24px;
}

.callback-form__label {
    display: block;
    /* Nudge right to line up with the error text below (which sits at left: 2px). */
    padding-left: 2px;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.callback-form__input {
    width: 100%;
    padding: 11px 14px;
    font: inherit;
    font-size: 15px;
    color: var(--text);
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.callback-form__input::placeholder {
    color: var(--text-muted);
    opacity: .7;
}

.callback-form__input:focus {
    outline: none;
    border-color: var(--accent-bright);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

/* Invalid state — set from JS (not :invalid, which fires before typing). */
.callback-form__input.is-invalid {
    border-color: var(--danger);
}

/* Focused invalid field: pink ring instead of the default blue one. */
.callback-form__input.is-invalid:focus {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px var(--focus-ring-danger);
}

/* Per-field error — absolutely placed in the reserved gap under the input, so
   it never pushes the layout. */
.callback-form__error {
    position: absolute;
    top: 100%;
    left: 2px;
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.2;
    color: var(--danger);
}

.callback-form__error[hidden] {
    display: none;
}

.callback-form__submit {
    display: block;
    width: 100%;
    /* Sits a touch below the phone field. Collapses with the field's 24px
       bottom margin, so the larger value wins. */
    margin-top: 32px;
    padding: 13px 20px;
    background: var(--grad-accent);
    color: var(--text-on-accent);
    font-weight: 600;
    font-size: 15px;
    border-radius: var(--radius-md);
    transition: background var(--transition), opacity var(--transition);
}

.callback-form__submit:disabled {
    opacity: .6;
    cursor: default;
}

.callback-form__policy {
    margin: 12px 0 0;
    line-height: 1.45;
    font-size: 12px;
    color: var(--text-muted);
}

.callback-form__policy a {
    color: var(--link);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---- Modal views: form / success / error ---- */
.callback-modal__view[hidden] {
    display: none;
}

/* Success & error screens replace the form in the same panel. */
.callback-result {
    text-align: center;
    padding: 6px 0 2px;
}

.callback-result__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 50%;
    color: var(--text-on-accent);
}

.callback-result__icon .icon {
    width: 32px;
    height: 32px;
    stroke-width: 2.5;
}

.callback-result__icon--ok  { background: var(--success); }
.callback-result__icon--err { background: var(--danger); }

.callback-result__title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
}

.callback-result__text {
    margin: 0 auto 22px;
    max-width: 320px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-muted);
}

.callback-result__text a {
    color: var(--link);
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
}

/* Same filled-accent CTA look as the submit button. */
.callback-result__btn {
    display: inline-block;
    min-width: 200px;
    padding: 13px 28px;
    background: var(--grad-accent);
    color: var(--text-on-accent);
    font-weight: 600;
    font-size: 15px;
    border-radius: var(--radius-md);
    transition: background var(--transition);
}

.callback-result__btn:hover {
    background: var(--grad-accent-hover);
}

/* ---- Privacy-policy page (privacy.html) ---- */
.policy {
    max-width: 760px;
    margin: 40px auto 80px;
    padding: 0 var(--gutter);
    color: var(--text);
}

/* ≥1024 the header is position:absolute (floats over the hero on the main
   page) — on the policy page the content must clear it manually. */
@media (min-width: 1024px) {
    .policy {
        margin-top: 150px;
    }
}

.policy__title {
    font-size: 28px;
    line-height: 1.25;
    margin: 0 0 8px;
}

.policy h2 {
    font-size: 18px;
    line-height: 1.3;
    margin: 28px 0 10px;
}

.policy p,
.policy li {
    font-size: 15px;
    line-height: 1.6;
}

.policy p {
    margin: 0 0 12px;
}

.policy ul {
    margin: 0 0 12px;
    padding-left: 22px;
}

/* ---- Privacy policy shown in a modal (opened from the callback form) ---- */
.privacy-modal {
    /* Above the callback modal (z-index 60) it is opened from. */
    z-index: 70;
}

.privacy-modal__panel {
    max-width: 640px;
    max-height: 85vh;
    padding: 0;
    /* overflow visible so the outside close icon isn't clipped; the body below
       rounds/clips its own corners instead. */
    display: flex;
    flex-direction: column;
}

.privacy-modal__body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
    padding: 32px 28px;
}

.privacy-modal__body:focus {
    outline: none;
}

.privacy-modal__loading {
    margin: 0;
    color: var(--text-muted);
    font-size: 15px;
}

/* Neutralise the standalone-page layout of the injected .policy content so it
   fits the modal (higher specificity beats the base rule + its media query). */
.privacy-modal__body .policy {
    max-width: none;
    margin: 0;
    padding: 0;
}

.privacy-modal__body .policy__title {
    font-size: 22px;
}

/* ========================================================================
   Footer
   ======================================================================== */
.footer {
    position: relative;
    /* The prefooter CTA now owns the gap above the footer. */
    margin-top: 48px;
    /* padding, not margin: a bottom margin collapses out of <body> and
       exposes a strip of the bare <html> background below the page. */
    padding-bottom: 80px;
    padding-top: 40px;
    /* No own background — the footer sits directly on the page backdrop. */
}

/* 12 cols: 3 across (4+4+4). Tablet 8 cols: brand full row, then 4+4.
   Mobile 4 cols: everything stacks (span 4). */
.footer__col--brand { grid-column: span 4; }
.footer__col:nth-child(2) { grid-column: span 4; }
.footer__col:nth-child(3) { grid-column: span 4; }

.footer__col {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer__logo {
    width: 170px;
    height: 40px;
    display: block;
}

.footer__tagline {
    color: var(--text-muted);
    font-size: 13px;
    line-height: round(1.45em, 1px);
    max-width: 260px;
}

.footer__heading {
    color: var(--text);
    font-size: 14px;
    line-height: round(1.2em, 1px);
    margin: 0;
    height: 40px;
    padding-bottom: 1px;
    display: flex;
    align-items: flex-end;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.footer__item {
    /* Same link colour as the header nav links. */
    color: var(--link);
    font-size: 14px;
    line-height: round(1.45em, 1px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: color var(--transition);
}

.footer__item:hover {
    color: var(--link-hover);
}

/* Phone link is dialable only on phones; inert on desktop/tablet. */
.footer__item[href^="tel:"] {
    pointer-events: none;
    cursor: default;
}

/* The stroke comes from the base .icon rule's `stroke: currentColor`, so
   colouring the icon is enough — no separate stroke declarations. */
.footer__icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin-top: 2px;
    color: var(--accent);
    transition: color var(--transition);
}

.footer__item:hover .footer__icon {
    color: var(--accent-bright);
}

.footer__socials {
    display: flex;
    gap: 18px;
    margin-top: 4px;
}

.footer__social {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--grad-accent);
    position: relative;
    /* Resting shadow comes from the shared CTA-volume rule below. */
}

/* Shared hover for every accent-gradient control. A brighter gradient of
   the same two-stop 135deg structure as --grad-accent, so the transition
   interpolates smoothly (a flat colour would make the buttons flash).
   NB: not .contacts__phone — its pill variant has a scoped ≤767 hover, and
   on desktop it is shine-clipped text. */
.practice-item__btn:hover,
.prefooter-cta:hover,
.callback-btn:hover,
.callback-form__submit:hover,
.footer__social:hover {
    background: var(--grad-accent-hover);
}

/* ------------------------------------------------------------------------
   Raised "volume" on the key blue CTAs (à la the pdf.net "Choose file" button):
   a top inset highlight + bottom inset shadow give the pill a bevelled edge,
   and a tight drop shadow plus a same-hue coloured glow lift it off the page.
   The button rises on hover and presses in on :active.
   ------------------------------------------------------------------------ */
.callback-btn.callback-btn--hero,
.prefooter-cta,
.footer__social {
    box-shadow: var(--cta-volume-shadow);
    transition: background var(--transition), transform var(--transition),
        box-shadow var(--transition), opacity var(--transition);
}

.callback-btn.callback-btn--hero:hover,
.prefooter-cta:hover,
.footer__social:hover {
    transform: translateY(-1px);
    box-shadow: var(--cta-volume-shadow-hover);
}

.callback-btn.callback-btn--hero:active,
.prefooter-cta:active,
.footer__social:active {
    transform: translateY(1px);
    box-shadow: var(--cta-volume-shadow-active);
}

.footer__social::before {
    content: '';
    position: absolute;
    inset: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 18px 18px;
}

.footer__social--wa::before { background-image: url(assets/icons/whatsapp.svg); }
.footer__social--tg::before { background-image: url(assets/icons/telegram.svg); }
.footer__social--vk::before {
    background-image: url(assets/icons/vk.svg);
    background-size: 20px 20px;
}

@media (max-width: 1279px) {
    .footer {
        margin-top: 44px;
    }

    /* 8-column tablet grid: brand full row, links/contacts 4 + 4 */
    .footer__col--brand { grid-column: span 8; }
    .footer__col:nth-child(2) { grid-column: span 4; }
    .footer__col:nth-child(3) { grid-column: span 4; }
}

@media (max-width: 767px) {
    .footer {
        margin-top: 36px;
        padding-top: 30px;
    }

    /* 4-column mobile grid: every column spans the full row → stacked.
       (Resets the tablet `brand span 8`, which would otherwise create
       implicit columns and break the layout.) */
    .footer__col--brand,
    .footer__col:nth-child(2),
    .footer__col:nth-child(3) {
        grid-column: span 4;
    }

    /* On phones the number can actually be dialed. */
    .footer__item[href^="tel:"] {
        pointer-events: auto;
        cursor: pointer;
    }

}

/* ========================================================================
   Clickable controls — +4px invisible hit area for easier hover / tap
   ======================================================================== */
.logo,
.menu__link,
.contacts__phone,
.footer__item,
.practices__more-btn,
.prefooter-cta,
.practice-item__btn {
    position: relative;
}

.logo::after,
.header__burger::after,
.menu__link::after,
.contacts__phone::after,
.footer__item::after,
.footer__social::after,
.practices__more-btn::after,
.prefooter-cta::after,
.practice-item__btn::after,
.cert-lightbox__btn::after,
.cert-lightbox__close::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
}

/* ========================================================================
   Background blur orbs — two giant blurred colored circles that slowly
   drift across the page as decorative animated glow
   ======================================================================== */
.blur {
    position: fixed;
    z-index: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
}

.blur::after,
.blur::before {
    content: '';
    display: block;
    width: 690px;
    height: 690px;
    position: absolute;
    border-radius: 50%;
    opacity: .25;
    filter: blur(120px);
}

.blur::after {
    background: var(--text-muted);
    left: -200px;
    top: -200px;
}

.blur::before {
    background: var(--accent);
    right: -200px;
    bottom: -200px;
}

@media (min-width: 1280px) {
    .blur {
        animation: blur 50s infinite;
        will-change: transform;
    }
}

@media (max-width: 1279px) {
    .blur {
        display: none;
    }
}

/* Transform-only (no left/top) so the drift stays on the compositor and
   doesn't trigger layout/paint every frame — much smoother on scroll. */
@keyframes blur {
    0%   { transform: translate3d(0, 0, 0)        rotate(0deg); }
    50%  { transform: translate3d(25vw, 25vh, 0)  rotate(180deg); }
    100% { transform: translate3d(0, 0, 0)        rotate(360deg); }
}

/* ========================================================================
   Debug bar: 8px grid overlay, viewport presets, cron trigger
   ======================================================================== */
/* 12-column layout grid that mirrors .site-wrapper at every breakpoint */
.debug-grid {
    position: fixed;
    inset: 0;
    z-index: 998;
    pointer-events: none;
    display: none;
}
.debug-grid.is-on { display: block; }

.debug-grid__inner {
    width: var(--container-w);
    min-width: 320px;
    height: 100%;
    margin: 0 auto;
}

/* Mirror the section side-gutter when the container is full-width. */
@media (max-width: 767px) {
    .debug-grid__inner { padding: 0 var(--gutter); }
}
@media (max-width: 479px) {
    .debug-grid__inner { padding: 0 12px; }
}

.debug-grid__col {
    background: rgba(255, 0, 128, .08);
    border-left: 1px solid rgba(255, 0, 128, .35);
    border-right: 1px solid rgba(255, 0, 128, .35);
}

.debug-bar {
    position: fixed;
    right: 12px;
    bottom: 12px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    background: var(--bg-overlay);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
    font: 11px/1 var(--font-main);
    color: var(--text-on-accent);
}

.debug-bar__group {
    display: flex;
    gap: 2px;
    padding: 0 4px;
    border-left: 1px solid rgba(255, 255, 255, .15);
    border-right: 1px solid rgba(255, 255, 255, .15);
}

.debug-bar__btn {
    appearance: none;
    padding: 6px 10px;
    border-radius: 999px;
    white-space: nowrap;
    transition: background-color var(--transition);
}
.debug-bar__btn:hover { background: rgba(255, 255, 255, .1); }
.debug-bar__btn.is-on { background: rgba(42, 104, 172, .8); }
.debug-bar__btn.is-loading { opacity: .7; cursor: progress; }
.debug-bar__btn.is-ok      { background: rgba(40, 130, 70, .8); }
.debug-bar__btn.is-error   { background: rgba(160, 50, 60, .8); }

.debug-bar__meta {
    padding: 0 8px;
    color: rgba(255, 255, 255, .65);
    min-width: 72px;
    text-align: center;
}

/* ========================================================================
   Small-phone gutter: align all main sections to the same 12px side
   gutter as .pros (placed last so it wins over the 25px ≤767 rules).
   ======================================================================== */
@media (max-width: 479px) {
    .practices,
    .reviews,
    .qualification,
    .footer {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* Hero text sits a bit further from the edge, in line with the
       inset of the review-card text rather than hugging the screen. */
    .titling {
        padding-left: 24px;
        padding-right: 24px;
    }
}
