/* =========================================================
   TAN24 — базовые стили + HEADER
   ========================================================= */

:root {
    --blue: #2563eb;
    --blue-dark: #1e3a8a;
    --blue-light: #dbeafe;
    --blue-pale: #93c5fd;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #ffffff;
    --bg-soft: #eff6ff;
    --bg-page: #eef2f7;
    --bg-partners: #e4eaf3;
    --footer: #111827;
    --footer-box: #1f2937;
    --footer-padding: 24px;
    --footer-gap: 36px;
    --footer-font: 13.5px;
    --footer-heading: 12px;
    --footer-small: 12.5px;
    --footer-tracking: .09em;
    --footer-bottom-padding: 10px;
    --footer-line-width: 1px;
    --footer-decoration-width: 900px;
    --footer-decoration-height: 305px;
    --footer-icon-size: 20px;
    --whatsapp: #25d366;

    --font: "Geologica", -apple-system, "Segoe UI", Arial, sans-serif;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 14px;
    --space-4: 22px;
    --space-5: 44px;
    --space-6: 56px;

    --radius-1: 8px;
    --radius-2: 12px;
    --radius-3: 14px;
    --container: 1240px;

    --hero-background: url("/static/img/hero_bg.png");
    --hero-overlay: linear-gradient(90deg, rgba(30, 58, 138, 0.96), rgba(30, 58, 138, 0.72) 55%, rgba(30, 58, 138, 0.42));
    --hero-pattern: radial-gradient(circle, rgba(255, 255, 255, 0.13) 1.2px, transparent 1.2px);
    --adv-pattern: radial-gradient(circle, rgba(255, 255, 255, 0.10) 1px, transparent 1px);
    --text-on-dark: #ffffff;
    --text-on-dark-muted: rgba(255, 255, 255, 0.72);
    --hero-text: rgba(255, 255, 255, 0.82);
    --hero-badge-bg: rgba(255, 255, 255, 0.12);
    --hero-badge-line: rgba(255, 255, 255, 0.20);
    --outline-light: rgba(255, 255, 255, 0.45);
    --section-accent: #2f6fd0;
    --partners-line: #d4dce8;
    --partner-line: #dde3ec;
    --card-shadow: 0 6px 18px rgba(37, 99, 235, 0.12);
    --adv-shadow: 0 12px 26px rgba(30, 58, 138, 0.28);
}


/* ---------- RESET ---------- */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* ---------- БАЗОВЫЕ СТИЛИ ---------- */

body {
    min-width: 320px;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

button,
input,
textarea,
select {
    font: inherit;
}


/* ---------- ОБЩИЙ КОНТЕЙНЕР ---------- */

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}


/* =========================================================
   HEADER
   ========================================================= */

.header {
    height: 74px;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 0;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}

.header__in {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 74px;
}


/* ---------- Logo ---------- */

.logo {
    flex: none;
}

.logo img {
    height: 100px;
    display: block;
}


/* ---------- Navigation ---------- */

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 4px;
    min-width: 0;
    flex: none;
}

.nav > a,
.nav__catalog {
    display: block;
    padding: 9px 11px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    font-family: inherit;
    font-size: 14.5px;
    line-height: 20px;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.nav > a:hover,
.nav__catalog:hover {
    background: var(--bg-soft);
    color: var(--blue);
}

.nav > a.is-active,
.nav__catalog.is-active {
    background: var(--blue-light);
    color: var(--blue);
    font-weight: 600;
}

.nav__catalog {
    font-weight: 600;
}

.nav__catalog::after {
    content: "  ▾";
    color: var(--muted);
    font-size: 12px;
}

.nav__catalog.is-open::after {
    content: "  ×";
    color: var(--muted);
    font-size: 16px;
}


/* ---------- Mega menu ---------- */

.mega-menu {
    position: relative;
    flex: none;
}

.mega-menu__panel {
    position: fixed;
    top: 74px;
    right: 0;
    left: 0;
    z-index: 51;
    padding: 24px max(24px, calc((100vw - var(--container)) / 2 + 24px)) 30px;
    background: var(--bg);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);

    transition:
        opacity 0.16s ease,
        transform 0.16s ease,
        visibility 0.16s;
}

@media (min-width: 1200px) {
    .mega-menu__panel {
        max-height: calc(100vh - 74px);
        max-height: calc(100dvh - 74px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

/* Открытие выполняется JavaScript через .is-open. */
.mega-menu.is-open .mega-menu__panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.mega-menu__columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px 40px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mega-menu__column {
    min-width: 0;
}

.mega-menu__title {
    display: block;
    margin-bottom: 9px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

.mega-menu__list,
.mega-menu__sublist {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mega-menu__item {
    margin-top: 6px;
}

.mega-menu__link,
.mega-menu__sublink {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
    text-decoration: none;
}

.mega-menu__sublist {
    margin: 4px 0 0 11px;
    padding-left: 9px;
    border-left: 2px solid var(--blue-light);
}

.mega-menu__subitem {
    margin-top: 4px;
}

.mega-menu__sublink {
    color: #9ca3af;
    font-size: 12.5px;
}

.mega-menu__title:hover,
.mega-menu__link:hover,
.mega-menu__sublink:hover {
    color: var(--blue);
}


/* ---------- Search ---------- */

.search {
    position: relative;
    margin-left: auto;
    width: 260px;
    flex: none;
}

.search__icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 14px;
    line-height: 1;
}

.search__input {
    width: 100%;
    height: 40px;
    padding: 0 76px 0 36px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg-soft);
    color: var(--ink);
    font-family: inherit;
    font-size: 14.5px;
    outline: none;
}

.search__input::placeholder {
    color: #9ca3af;
}

.search__input:focus {
    border-color: var(--blue);
    background: #fff;
}

.search__btn {
    position: absolute;
    right: 5px;
    top: 5px;
    height: 30px;
    padding: 0 12px;
    border: none;
    border-radius: 6px;
    background: var(--blue-light);
    color: var(--blue-dark);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s;
}

.search__btn:hover {
    background: var(--blue-pale);
}


/* ---------- Right side ---------- */

.header__right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: none;
}


/* ---------- Phone ---------- */

.phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ink);
    font-size: 14.5px;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
}

.phone:hover {
    color: var(--blue);
}


/* ---------- Buttons ---------- */

.btn {
    display: inline-block;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

.btn--primary {
    background: var(--blue);
    color: #fff;
    transition: background-color 0.15s, box-shadow 0.15s;
}

.btn--primary:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.24);
}

.btn--ghost {
    background: var(--bg);
    color: var(--ink);
    border-color: var(--bg);
}

.btn--outline-light {
    background: transparent;
    color: var(--text-on-dark);
    border-color: var(--outline-light);
}


.header__burger {
    display: none;
}

@media (max-width: 1199px) {
    .header .logo {
        order: -2;
    }

    .header__burger {
        order: -1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: none;
        height: 44px;
        gap: 4px;
        padding: 0 6px;
        font-size: 13px;
        white-space: nowrap;
        cursor: pointer;
    }

    .header a:focus-visible,
    .header button:focus-visible {
        outline: 2px solid var(--blue);
        outline-offset: 2px;
    }

    .header .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        margin: 0;
        padding: 12px 24px;
        max-height: calc(100vh - var(--header-height, 74px));
        max-height: calc(100dvh - var(--header-height, 74px));
        overflow-y: auto;
        overscroll-behavior: contain;
        background: var(--bg);
        border-top: 1px solid var(--line);
        box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);
    }

    .header .nav.is-open {
        display: block;
    }

    .header .nav > a,
    .header .nav__catalog {
        width: 100%;
        min-height: 44px;
        text-align: left;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .header .mega-menu__panel {
        display: none;
        position: static;
        padding: 12px;
        transform: none;
        box-shadow: none;
    }

    .header .mega-menu.is-open .mega-menu__panel {
        display: block;
    }

    .header .mega-menu__columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 959px) {
    .header {
        height: auto;
    }

    .header .header__in {
        height: auto;
        flex-wrap: wrap;
        gap: 8px 12px;
        padding-top: 8px;
        padding-bottom: 12px;
    }

    .header .logo {
        margin-right: 0;
    }

    .header .logo img {
        height: 54px;
    }

    .header__right {
        display: contents;
    }

    .header .phone {
        order: 1;
        flex: none;
        margin-left: auto;
        height: 44px;
    }

    .header .header__right > .btn {
        order: 2;
        flex: none;
        white-space: nowrap;
    }

    .header .search {
        order: 4;
        flex: 0 0 100%;
        width: 100%;
        min-width: 0;
        margin-left: 0;
    }

    .header .search__input {
        min-width: 0;
        font-size: 16px;
    }
}

@media (max-width: 767px) {
    .header .header__in {
        display: grid;
        grid-template-columns: auto auto minmax(0, 1fr) auto;
        padding-right: 16px;
        padding-left: 16px;
        column-gap: 8px;
    }

    .header .logo {
        grid-column: 1;
        grid-row: 1;
    }

    .header__burger {
        grid-column: 2;
        grid-row: 1;
    }

    .header .phone {
        grid-column: 3 / -1;
        grid-row: 1;
    }

    .header .search {
        grid-column: 1 / 4;
        grid-row: 2;
        width: 100%;
    }

    .header .header__right > .btn {
        grid-column: 4;
        grid-row: 2;
        order: 5;
        padding: 10px 12px;
        font-size: 14px;
    }

    .header .search__icon {
        display: none;
    }

    .header .search__input {
        padding-left: 10px;
        padding-right: 60px;
    }

    .header .search__btn {
        padding: 0 8px;
    }

    .header .nav {
        padding-right: 16px;
        padding-left: 16px;
    }

    .header .mega-menu__columns {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* =========================================================
   HOME
   ========================================================= */

.hero {
    position: relative;
    overflow: hidden;
    background-color: var(--blue-dark);
    background-image: var(--hero-background);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.hero::before {
    position: absolute;
    inset: 0;
    content: "";
    background-image: var(--hero-overlay), var(--hero-pattern);
    background-size: auto, 26px 26px;
    pointer-events: none;
}

.hero__inner {
    position: relative;
    z-index: 1;
    padding-top: 46px;
    padding-bottom: 50px;
}

.hero__badge {
    display: inline-block;
    margin-bottom: 14px;
    padding: 6px 14px;
    border: 1px solid var(--hero-badge-line);
    border-radius: 99px;
    background: var(--hero-badge-bg);
    color: var(--text-on-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.hero__title {
    max-width: 780px;
    color: var(--text-on-dark);
    font-size: 46px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.12;
}

.hero__accent {
    color: var(--blue-pale);
}

.hero__text {
    max-width: 600px;
    margin-top: 18px;
    color: var(--hero-text);
    font-size: 16px;
    line-height: 1.55;
}

.hero__actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

@media (max-width: 1199px) {
    .hero--home .hero__inner {
        padding-top: clamp(36px, 3.84vw, 46px);
        padding-bottom: clamp(40px, 4.17vw, 50px);
    }

    .hero--home .hero__title {
        font-size: clamp(38px, 3.84vw, 46px);
        overflow-wrap: anywhere;
    }
}

@media (max-width: 959px) {
    .hero--home .hero__inner {
        padding-top: clamp(30px, 3.75vw, 36px);
        padding-bottom: clamp(34px, 4.17vw, 40px);
    }

    .hero--home .hero__title {
        font-size: clamp(34px, 3.96vw, 38px);
    }
}

@media (max-width: 767px) {
    .hero--home .hero__inner {
        padding: clamp(28px, 4vw, 30px) 16px clamp(32px, 4.5vw, 34px);
    }

    .hero--home .hero__title {
        font-size: clamp(28px, 4.44vw, 34px);
        line-height: 1.18;
        letter-spacing: -0.5px;
    }

    .hero--home .hero__title br,
    .hero--home .hero__text br {
        display: none;
    }

    .hero--home .hero__text {
        margin-top: 16px;
        overflow-wrap: anywhere;
    }

    .hero--home .hero__actions {
        margin-top: 24px;
        flex-wrap: wrap;
    }

    .hero--home .hero__actions .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        max-width: 100%;
        text-align: center;
        overflow-wrap: anywhere;
    }
}

.catalog-section {
    padding-top: 40px;
    padding-bottom: 56px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    scroll-margin-top: 86px;
}

.catalog-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 26px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--line);
}

.catalog-section__title {
    color: var(--ink);
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.catalog-card {
    display: flex;
    flex-direction: column;
    min-height: 150px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-2);
    background: var(--bg);
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.catalog-card__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius-1);
    margin-bottom: var(--space-3);
}

.catalog-card:hover {
    border-color: var(--blue);
    box-shadow: var(--card-shadow);
    transform: translateY(-3px);
}

.catalog-card__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
}

.catalog-card__title {
    color: var(--ink);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

@media (max-width: 959px) {
    .catalog-section .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 599px) {
    .catalog-section {
        padding-top: 28px;
        padding-bottom: 36px;
    }

    .catalog-section > .container {
        padding-right: 16px;
        padding-left: 16px;
    }

    .catalog-section__head {
        margin-bottom: 20px;
        padding-bottom: 12px;
    }

    .catalog-section .catalog-grid {
        gap: 8px;
    }

    .catalog-section .catalog-card {
        padding: 10px;
    }

    .catalog-section .catalog-card__image {
        margin-bottom: 10px;
    }

    .catalog-section .catalog-card__title {
        font-size: 14px;
        line-height: 1.4;
    }
}

.advantages {
    padding-top: 48px;
    padding-bottom: 56px;
    background: var(--bg-soft);
}

.advantages > .container {
    max-width: none;
}

.advantages .section-description {
    max-width: 760px;
    margin: 0 auto 28px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.55;
    text-align: center;
}

.section-subtitle {
    max-width: 760px;
    margin: 0 auto 28px;
    color: var(--section-accent);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
}

.adv {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.adv__item {
    position: relative;
    min-height: 174px;
    overflow: hidden;
    padding: 22px;
    border-radius: var(--radius-3);
    background: var(--blue-dark);
    transition: background-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.adv__item::before {
    position: absolute;
    inset: 0;
    content: "";
    background-image: var(--adv-pattern);
    background-size: 18px 18px;
    pointer-events: none;
}

.adv__item:hover {
    background: var(--blue);
    box-shadow: var(--adv-shadow);
    transform: translateY(-3px);
}

.adv__content {
    position: relative;
    z-index: 1;
}

.adv__title {
    color: var(--text-on-dark);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.adv__text {
    margin-top: 8px;
    color: var(--text-on-dark-muted);
    font-size: 13.5px;
    line-height: 1.5;
}

@media (max-width: 767px) {
    .advantages .adv {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .advantages .adv__item {
        min-height: 0;
        padding: 14px;
    }

    .advantages .adv__title {
        font-size: 15px;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }

    .advantages .adv__item p {
        display: none;
    }
}

@media (max-width: 479px) {
    .advantages .adv {
        gap: 8px;
    }

    .advantages .adv__item {
        padding: 10px;
    }

    .advantages .adv__title {
        font-size: 14px;
    }
}

.partners-section {
    padding-top: 44px;
    padding-bottom: 48px;
    border-top: 1px solid var(--partners-line);
    background: var(--bg-partners);
}

.partners-carousel {
    display: flex;
    align-items: center;
    gap: 12px;
}

.partners {
    display: flex;
    flex: 1;
    min-width: 0;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.partners::-webkit-scrollbar {
    display: none;
}

.partner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 calc((100% - 48px) / 5);
    min-width: 0;
    height: 100px;
    padding: 16px;
    scroll-snap-align: start;
    border: 1px solid var(--partner-line);
    border-radius: var(--radius-2);
    background: var(--bg);
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.partner:hover {
    border-color: var(--blue);
    box-shadow: var(--card-shadow);
}

.partner img {
    width: 100%;
    max-width: 140px;
    height: 64px;
    object-fit: contain;
}

.partners-arrow {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--partner-line);
    border-radius: 50%;
    background: var(--bg);
    color: var(--blue-dark);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.partners-arrow:hover:not(:disabled) {
    border-color: var(--blue);
    color: var(--blue);
}

.partners-arrow:disabled {
    opacity: 0.35;
    cursor: default;
}

.partners-arrow:focus-visible,
.partners:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

@media (max-width: 767px) {
    .partner {
        flex-basis: calc((100% - 24px) / 3);
        padding: 8px;
    }
}

@media (max-width: 479px) {
    .partner {
        flex-basis: calc((100% - 12px) / 2);
    }
}


/* Mobile spacing and typography for the home sections only. */
@media (max-width: 767px) {
    .hero--home .hero__inner {
        padding-top: 24px;
        padding-bottom: 28px;
    }

    .hero--home .hero__title {
        font-size: clamp(26px, calc(22px + 1.3vw), 32px);
        line-height: 1.2;
    }

    .hero--home .hero__text {
        margin-top: 12px;
        font-size: 15px;
        line-height: 1.5;
    }

    .hero--home .hero__actions {
        margin-top: 18px;
    }

    .catalog-section,
    .advantages,
    .partners-section {
        padding-top: 28px;
        padding-bottom: 28px;
    }

    .catalog-section > .container,
    .advantages > .container,
    .partners-section > .container {
        padding-right: 16px;
        padding-left: 16px;
    }

    .catalog-section__title {
        font-size: clamp(22px, 3.4vw, 26px);
    }

    .catalog-section__head {
        margin-bottom: 16px;
        padding-bottom: 10px;
    }

    .catalog-section .catalog-card {
        min-height: 0;
        padding: clamp(10px, 1.8vw, 14px);
    }

    .catalog-section .catalog-card__image {
        margin-bottom: 8px;
    }

    .catalog-section .catalog-card__title {
        font-size: clamp(14px, 2.1vw, 16px);
        line-height: 1.4;
    }

    .advantages .section-subtitle,
    .partners-section .section-subtitle {
        font-size: clamp(20px, 2.9vw, 22px);
        line-height: 1.3;
    }

    .advantages .section-subtitle {
        margin-bottom: 10px;
    }

    .advantages .section-description {
        margin-bottom: 16px;
        font-size: 15px;
        line-height: 1.5;
    }

    .advantages .adv__item {
        padding: clamp(10px, 1.8vw, 14px);
    }

    .advantages .adv__title {
        font-size: clamp(14px, 2vw, 15px);
    }

    .partners-section .section-subtitle {
        margin-bottom: 16px;
    }
}

@media (max-width: 479px) {
    .hero--home .hero__inner {
        padding-top: 22px;
        padding-bottom: 24px;
    }

    .catalog-section,
    .advantages,
    .partners-section {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .catalog-section__head,
    .partners-section .section-subtitle {
        margin-bottom: 14px;
    }
}

.whatsapp-float {
    position: fixed;
    right: calc(24px + env(safe-area-inset-right, 0px));
    bottom: calc(124px + env(safe-area-inset-bottom, 0px));
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--whatsapp);
    color: var(--text-on-dark);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    transition: transform 0.18s, box-shadow 0.18s;
}

.whatsapp-float svg {
    width: 30px;
    height: 30px;
}

.whatsapp-float:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.whatsapp-float:focus-visible {
    outline: 3px solid var(--blue-dark);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .whatsapp-float {
        transition: none;
    }
}

/* ---------- City selector ---------- */

.header .city-selector {
    display: none;
}

.city-selector {
    position: relative;
    flex: none;
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
}

.city-selector__current {
    display: block;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: default;
}

.city-selector__current::after {
    content: " ▾";
    font-size: 10px;
}

.city-selector__list {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 2;
    min-width: 100%;
    margin: 0;
    padding: 6px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    list-style: none;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: 0.15s;
}

.city-selector:hover .city-selector__list,
.city-selector:focus-within .city-selector__list {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.city-selector__link {
    display: block;
    padding: 6px 8px;
    border-radius: 5px;
    color: var(--ink);
    text-decoration: none;
}

.city-selector__link:hover,
.city-selector__item--active .city-selector__link {
    background: var(--blue-light);
    color: var(--blue);
}


/* ---------- Accessibility ---------- */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* ---------- Footer ---------- */

.footer {
    position: relative;
    overflow: hidden;
    padding-top: var(--footer-padding);
    background: var(--footer);
    color: var(--text-on-dark);
    font-size: var(--footer-font);
    line-height: 1.55;
}

.footer::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: var(--footer-decoration-width);
    height: var(--footer-decoration-height);
    background: url("/static/img/badger_footer.svg") no-repeat center / contain;
    opacity: .09;
    pointer-events: none;
}

.footer > .container {
    position: relative;
    z-index: 1;
}

.footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr);
    gap: var(--footer-gap);
    padding-bottom: var(--space-5);
    overflow-wrap: anywhere;
}

.footer__logo {
    display: inline-block;
}

.footer__logo img {
    height: 100px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer__description {
    margin-top: var(--space-3);
    color: var(--text-on-dark-muted);
}

.footer__title {
    margin-bottom: var(--space-4);
    font-size: var(--footer-heading);
    font-weight: 700;
    letter-spacing: var(--footer-tracking);
    text-transform: uppercase;
}

.footer__list,
.footer__contacts {
    display: grid;
    gap: var(--space-2);
}

.footer__contacts {
    font-style: normal;
}

.footer a:hover,
.footer a:focus-visible {
    color: var(--blue-pale);
}

.footer a:focus-visible {
    outline: var(--footer-line-width) solid var(--blue-pale);
    outline-offset: var(--space-1);
}

.footer__socials {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-4);
}

.footer__social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--space-5);
    height: var(--space-5);
    border-radius: var(--radius-1);
    background: var(--footer-box);
}

.footer__social:hover,
.footer__social:focus-visible {
    background: var(--blue);
    color: var(--text-on-dark);
}

.footer__social svg {
    width: var(--footer-icon-size);
    height: var(--footer-icon-size);
}

.footer__bottom {
    display: flex;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--footer-bottom-padding) 0;
    border-top: var(--footer-line-width) solid var(--footer-box);
    color: var(--text-on-dark-muted);
    font-size: var(--footer-small);
}

@media (max-width: 1100px) {
    .footer::before {
        display: none;
    }
}

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

    .footer__grid {
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding-bottom: 12px;
    }

    .footer__grid > nav,
    .footer__description {
        display: none;
    }

    .footer__logo img {
        height: 64px;
    }

    .footer__socials {
        margin-top: 8px;
        flex-wrap: wrap;
    }

    .footer__title {
        margin-bottom: 8px;
    }

    .footer__contacts {
        gap: 0;
        overflow-wrap: anywhere;
    }

    .footer__contacts a,
    .footer__bottom > a {
        display: flex;
        align-items: center;
        min-height: 44px;
        overflow-wrap: anywhere;
    }

    .footer__bottom {
        flex-direction: column-reverse;
        gap: 4px;
        padding: 8px 0 16px;
        overflow-wrap: anywhere;
    }
}

/* ---------- Desktop catalog ---------- */
.catalog-page {
    padding: 0 0 56px;
    min-height: 480px;
    background: var(--bg);
}

.catalog-page__intro {
    padding: 30px 0;
    margin-bottom: 18px;
    background: var(--hero-overlay) center / cover no-repeat,
                var(--blue-dark) url("../img/category.png") center / cover no-repeat;
    color: var(--text-on-dark);
}

.catalog-page__intro .container > :last-child { margin-bottom: 0; }

.catalog-page .breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--text-on-dark-muted);
    font-size: 13px;
    line-height: 1.5;
}

.catalog-page .breadcrumbs > * + *::before {
    content: "/";
    margin-right: 8px;
    color: var(--text-on-dark-muted);
}

.catalog-page .breadcrumbs [aria-current] { color: var(--text-on-dark); }
.catalog-page__title {
    margin-bottom: 24px;
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.5px;
}

.catalog-page__children {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.catalog-page__children a {
    padding: 12px 18px;
    border: 1px solid var(--outline-light);
    background: var(--hero-badge-bg);
    border-radius: var(--radius-1);
    font-size: 14px;
    line-height: 1.4;
}

.catalog-page__children a:hover {
    border-color: var(--blue);
    background: var(--bg-soft);
}

.catalog-page__city {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-bottom: 18px;
    padding: 8px 0;
    font-size: 14px;
}

.catalog-page .city-selector__current {
    padding: 8px 4px;
    border: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--blue);
    background: var(--bg);
    cursor: pointer;
}

/* Непрерывная область наведения между переключателем и списком. */
.catalog-page .city-selector__list::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    height: 7px;
}

.catalog-page__table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-2);
}

.catalog-page__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    line-height: 1.5;
}

.catalog-page__table th,
.catalog-page__table td {
    padding: 16px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.catalog-page__table th {
    background: var(--bg-page);
    color: var(--muted);
    font-weight: 500;
    white-space: nowrap;
}

.catalog-page__table th a { display: inline-block; }
.catalog-page__table th[aria-sort] { color: var(--blue); background: var(--blue-light); }
.catalog-page__table th:nth-last-child(2),
.catalog-page__table td:nth-last-child(2) { text-align: right; white-space: nowrap; }
.catalog-page__table td:nth-last-child(2) { font-weight: 600; }
.catalog-page__table td:last-child { text-align: right; }
.catalog-page__table tr:last-child td { border-bottom: 0; }
.catalog-page__table tbody tr:hover { background: var(--bg-soft); }
.catalog-page__table td:last-child a {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid var(--blue-light);
    border-radius: var(--radius-1);
    color: var(--blue);
    font-weight: 500;
}
.catalog-page__table td:last-child a:hover { background: var(--blue); color: var(--bg); }
.catalog-page .pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 26px;
    font-size: 14px;
    color: var(--muted);
}
.catalog-page .pagination a {
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-1);
    color: var(--blue);
}
.catalog-page .pagination a:hover { background: var(--bg-soft); border-color: var(--blue); }
.catalog-page__query { margin: -10px 0 24px; color: var(--text-on-dark-muted); }
.catalog-page__empty { padding: 24px 0; color: var(--muted); line-height: 1.6; }
.catalog-page a:hover { color: var(--blue); }
.catalog-page a:focus-visible,
.catalog-page [tabindex]:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.catalog-page .breadcrumbs a:hover { color: var(--blue-pale); }
.catalog-page__intro a:focus-visible { outline-color: var(--blue-pale); }

@media (max-width: 1199px) {
    .catalog-page--category .catalog-page__intro {
        padding: clamp(24px, 2.5vw, 30px) 0;
    }

    .catalog-page--category .catalog-page__title {
        font-size: clamp(30px, 3vw, 36px);
        overflow-wrap: anywhere;
    }

    .catalog-page--category .breadcrumbs > *,
    .catalog-page--category .catalog-page__children a {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 959px) {
    .catalog-page .catalog-page__gost {
        display: none;
    }

    .catalog-page .catalog-page__table th,
    .catalog-page .catalog-page__table td {
        padding: 12px 8px;
    }

    .catalog-page--category .catalog-page__intro {
        padding: 22px 0;
    }

    .catalog-page--category .catalog-page__title {
        font-size: clamp(28px, 3.13vw, 30px);
    }
}

@media (max-width: 767px) {
    .catalog-page .catalog-page__steel {
        display: none;
    }

    .catalog-page > .container,
    .catalog-page--category .catalog-page__intro > .container {
        padding-right: 12px;
        padding-left: 12px;
    }

    .catalog-page--category .catalog-page__intro {
        padding: 18px 0;
        margin-bottom: 12px;
    }

    .catalog-page--category .catalog-page__title {
        font-size: clamp(24px, 3.65vw, 28px);
        margin-bottom: 16px;
    }

    .catalog-page--category .breadcrumbs {
        margin-bottom: 14px;
    }

    .catalog-page--category .catalog-page__children {
        gap: 8px;
    }

    .catalog-page--category .catalog-page__children a {
        padding: 10px 12px;
    }

    .catalog-page .catalog-page__city {
        flex-wrap: wrap;
        margin-bottom: 12px;
    }

    .catalog-page .catalog-page__table th,
    .catalog-page .catalog-page__table td {
        padding: 10px 4px;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .catalog-page .catalog-page__table th:nth-last-child(2),
    .catalog-page .catalog-page__table td:nth-last-child(2) {
        width: 76px;
    }

    .catalog-page .catalog-page__table th:nth-last-child(6),
    .catalog-page .catalog-page__table td:nth-last-child(6) {
        min-width: 44px;
    }

    .catalog-page .catalog-page__table th:last-child,
    .catalog-page .catalog-page__table td:last-child {
        width: 52px;
    }

    .catalog-page .catalog-page__table td:last-child a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        font-size: 24px;
        line-height: 1;
    }

    .catalog-page .catalog-page__add-label {
        display: none;
    }

    .catalog-page [data-order-add]::after {
        content: "+";
    }

    .catalog-page .pagination {
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 18px;
    }
}

/* ---------- Desktop order ---------- */
.order {
    --order-error: #b91c1c;
    padding-bottom: var(--space-6);
    background: var(--bg);
    font-size: 14px;
    line-height: 1.5;
}

.order__intro {
    position: relative;
    isolation: isolate;
    padding: var(--space-6) max(24px, calc((100% - var(--container)) / 2 + 24px));
    background: var(--blue-dark) url("../img/order.png") center / cover no-repeat;
    color: var(--text-on-dark);
}

.order__intro::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    background-image: var(--hero-overlay), var(--hero-pattern);
    background-size: auto, 26px 26px;
    pointer-events: none;
}

.order__title {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.5px;
}

.order__description {
    margin-top: 18px;
    color: var(--hero-text);
    font-size: 16px;
    line-height: 1.55;
}

.order__items,
.order__contacts {
    min-width: 0;
    padding: 0;
    border: 0;
    margin-bottom: 30px;
}

.order__contacts .order__fields {
    padding: var(--space-4);
    border-radius: var(--radius-2);
    background: var(--bg-partners);
}

.order__contacts > .order__legend {
    position: relative;
    top: 16px;
    padding-top: var(--space-4);
}

.order__legend {
    width: 100%;
    margin-bottom: 18px;
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
}

.order__list:has(.order-row) {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-2);
}

.order .order-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px auto;
    align-items: center;
    gap: var(--space-4);
    padding: 16px 14px;
    border-bottom: 1px solid var(--line);
}

.order .order-row:last-child { border-bottom: 0; }
.order .order-row:hover { background: var(--bg-soft); }
.order-row__info { min-width: 0; }
.order-row__name {
    display: block;
    margin-bottom: var(--space-1);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.order-row__specs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-3);
    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.order-row__quantity {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    align-items: center;
    gap: var(--space-1) var(--space-2);
}

.order-row__label {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 13px;
}

.order-row__unit { overflow-wrap: anywhere; }
.order .order-row__remove,
.order .order__add {
    background: var(--blue);
    color: #fff;
    transition: background-color 0.15s, box-shadow 0.15s;
    font-size: 14px;
    font-weight: 500;
}

.order .order-row__remove { padding: 8px 12px; }
.order__add { margin-top: 18px; }
.order .order-row__remove:hover,
.order .order__add:hover { border-color: var(--blue); background: var(--bg-soft); color: var(--ink); }

.order__empty {
    padding: var(--space-4);
    border: 1px solid var(--line);
    border-radius: var(--radius-2);
    background: var(--bg-soft);
    color: var(--muted);
}

.order__fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-4);
    padding-top: var(--space-4);
}

.order__field--wide { grid-column: 1 / -1; }
.order__label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
}

.order__field input,
.order__field textarea,
.order-row__input {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-1);
    background: var(--bg-soft);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.5;
}

.order-row__input { background: var(--bg); }
.order__field textarea {
    display: block;
    height: 120px;
    min-height: 100px;
    resize: vertical;
}

.order__field input:focus,
.order__field textarea:focus,
.order-row__input:focus {
    outline: 2px solid var(--blue-light);
    outline-offset: 1px;
    border-color: var(--blue);
    background: var(--bg);
}

.order .errorlist {
    margin-top: var(--space-2);
    color: var(--order-error);
    font-size: 13px;
    font-weight: 500;
}

.order__contacts > .errorlist { margin: 0 0 var(--space-3); }
.order__field--error input,
.order__field--error textarea { border-color: var(--order-error); }
.order__messages { margin-bottom: var(--space-4); }
.order__message {
    padding: var(--space-3) 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-1);
    background: var(--bg-soft);
}
.order__message + .order__message { margin-top: var(--space-2); }
.order__message--error { border-color: var(--order-error); color: var(--order-error); }
.order__note { margin-bottom: 18px; color: var(--muted); }
.order .btn { cursor: pointer; }
.order .btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

@media (max-width: 959px) {
    .order .order-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px 16px;
    }

    .order .order-row__info {
        grid-column: 1 / -1;
    }

    .order .order-row__name {
        overflow-wrap: break-word;
        word-break: normal;
    }

    .order .order-row__quantity {
        width: min(100%, 240px);
        min-width: 0;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .order .order-row__unit {
        max-width: 64px;
    }

    .order .order-row__remove {
        align-self: end;
        min-height: 44px;
    }

    .order .order__fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .order .order__field {
        min-width: 0;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 767px) {
    .order > .container,
    .order .order__intro > .container {
        padding-right: 16px;
        padding-left: 16px;
    }

    .order .order__intro {
        padding: 28px 0;
    }

    .order .order-row {
        padding: 14px 12px;
        gap: 12px;
    }

    .order .order-row__name {
        font-size: 16px;
    }

    .order .order__fields {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .order .order__contacts .order__fields {
        padding: 16px;
    }

    .order .order__field input,
    .order .order__field textarea,
    .order .order-row__input {
        font-size: 16px;
        min-height: 44px;
    }

    .order .order__legend {
        font-size: 20px;
    }

    .order .order__add,
    .order .order__submit {
        max-width: 100%;
        min-height: 44px;
        white-space: normal;
    }
}

/* ---------- Order confirmation ---------- */
.order-done {
    position: relative;
    isolation: isolate;
    padding: var(--space-6) max(24px, calc((100% - var(--container)) / 2 + 24px));
    background: var(--blue-dark) url("../img/order_done.jpg") center / cover no-repeat;
    color: var(--text-on-dark);
}

.order-done::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    background-image: var(--hero-overlay), var(--hero-pattern);
    background-size: auto, 26px 26px;
    pointer-events: none;
}

.order-done__title {
    max-width: 780px;
    font-size: 46px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.12;
}

.order-done__text {
    max-width: 600px;
    margin-top: 18px;
    color: var(--hero-text);
    font-size: 16px;
    line-height: 1.55;
}

.order-done__link {
    display: inline-block;
    margin-top: 28px;
    padding: 11px 18px;
    border: 1px solid var(--bg);
    border-radius: var(--radius-1);
    background: var(--bg);
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
    transition: background-color .15s, color .15s;
}

.order-done__link:hover {
    background: var(--bg-soft);
    color: var(--blue);
}

.order-done__link:focus-visible {
    outline: 2px solid var(--blue-pale);
    outline-offset: 3px;
}

@media (max-width: 1199px) {
    .order-done {
        padding-top: clamp(36px, 4.67vw, 56px);
        padding-bottom: clamp(36px, 4.67vw, 56px);
    }

    .order-done__title {
        font-size: clamp(34px, 3.84vw, 46px);
        overflow-wrap: anywhere;
    }
}

@media (max-width: 767px) {
    .order-done {
        padding: 32px 16px;
    }

    .order-done__title {
        font-size: clamp(28px, 4.44vw, 34px);
        line-height: 1.2;
        letter-spacing: -0.5px;
    }

    .order-done__text {
        margin-top: 12px;
        font-size: 15px;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    .order-done__link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        max-width: 100%;
        margin-top: 20px;
        padding: 10px 16px;
        text-align: center;
    }
}

@media (max-width: 479px) {
    .order-done {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .order-done__title {
        font-size: clamp(26px, 7.47vw, 28px);
    }

    .order-done__link {
        margin-top: 18px;
    }
}


/* =========================================================
   ABOUT
   ========================================================= */

.about-hero {
    padding: 64px max(24px, calc((100% - var(--container)) / 2 + 24px));
    background-color: var(--blue-dark);
    background-image: var(--hero-overlay), var(--hero-pattern), url("/static/img/about.PNG");
    background-position: center;
    background-repeat: no-repeat, repeat, no-repeat;
    background-size: cover, 26px 26px, cover;
}

.about-hero h1 {
    max-width: 780px;
    color: var(--text-on-dark);
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.12;
}

.about-hero p {
    max-width: 600px;
    margin-top: 18px;
    color: var(--hero-text);
    font-size: 16px;
    line-height: 1.55;
}

.about-mission {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--space-4);
}

.about-mission > h2,
.about-team__title {
    margin-bottom: var(--space-2);
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--line);
}

.about-mission__content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    align-items: center;
    gap: var(--space-6);
    margin: 0 auto;
    padding: 0;
}

.about-mission__content > p {
    min-width: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.75;
}

.about-mission__accent {
    color: var(--blue);
}

.about-mission__logo {
    width: 80%;
    height: auto;
}

.about-team {
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    scroll-margin-top: 86px;
}

.team__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.team-card {
    display: flex;
    flex-direction: column;
    min-height: 150px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-2);
    background: var(--bg);
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.team-card:hover {
    border-color: var(--blue);
    box-shadow: var(--card-shadow);
    transform: translateY(-3px);
}

.team-card__photo {
    width: 100%;
    aspect-ratio: 9 / 12;
    object-fit: cover;
    border-radius: var(--radius-1);
    margin-bottom: var(--space-3);
}

.team-card__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
}

.team-card__name {
    color: var(--ink);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.team-card__phone {
    color: var(--blue);
    font-size: 14px;
    font-weight: 600;
}

.team-card__position {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.team-card__phone:hover {
    color: var(--blue-dark);
}

.team-card__phone:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

.about-team .team__grid {
    grid-template-columns: minmax(0, 1fr);
}

.about-team .team-card {
    flex-direction: row;
    align-items: center;
    gap: var(--space-4);
}

.about-team .team-card__photo {
    flex: 0 0 90px;
    width: 90px;
    height: 120px;
    margin-bottom: 0;
}

.about-team .team-card__content {
    min-width: 0;
    justify-content: center;
    gap: var(--space-2);
    overflow-wrap: anywhere;
}

.about-team__intro {
    margin-bottom: var(--space-2);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.75;
}

.about-team__detail {
    margin-bottom: var(--space-2);
    color: var(--muted);
    font-size: 16px;
    line-height: 1.75;
}


@media (max-width: 1199px) {
    .about-hero {
        padding-top: clamp(36px, 4vw, 48px);
        padding-bottom: clamp(36px, 4vw, 48px);
    }

    .about-hero h1,
    .about-hero p,
    .about-mission > h2,
    .about-mission__content > p {
        overflow-wrap: anywhere;
    }

    .about-mission__content {
        grid-template-columns: minmax(0, 1fr) 180px;
        gap: 28px;
    }

    .about-team .team__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-team .team-card {
        min-width: 0;
        min-height: 0;
        padding: 16px;
        gap: 12px;
        align-items: flex-start;
    }

    .about-team .team-card__photo {
        flex-basis: 80px;
        width: 80px;
        height: auto;
        aspect-ratio: 3 / 4;
        object-fit: cover;
    }
}

@media (max-width: 767px) {
    .about-hero {
        padding: 28px 16px;
    }

    .about-hero h1 {
        font-size: clamp(26px, 4vw, 30px);
        line-height: 1.2;
        letter-spacing: -0.5px;
    }

    .about-hero p {
        margin-top: 12px;
        font-size: 15px;
        line-height: 1.5;
    }

    .about-hero br,
    .about-mission br,
    .about-team br {
        display: none;
    }

    .about-mission {
        padding: 24px 16px;
    }

    .about-mission > h2,
    .about-team__title {
        margin-bottom: 12px;
        padding-bottom: 10px;
        font-size: clamp(20px, 3vw, 23px);
        line-height: 1.3;
    }

    .about-mission__content {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .about-mission__content > p,
    .about-team__intro,
    .about-team__detail {
        font-size: 15px;
        line-height: 1.6;
        overflow-wrap: anywhere;
    }

    .about-mission__logo {
        width: 96px;
        justify-self: center;
    }

    .about-team {
        padding: 8px 0 24px;
    }

    .about-team > .container {
        padding-right: 16px;
        padding-left: 16px;
    }

    .about-team__detail {
        margin-bottom: 16px;
    }

    .about-team .team__grid {
        gap: 12px;
    }

    .about-team .team-card {
        padding: 14px;
    }

    .about-team .team-card__photo {
        flex-basis: 72px;
        width: 72px;
    }

    .about-team .team-card__content {
        gap: 6px;
    }

    .about-team .team-card__name {
        font-size: 16px;
        line-height: 1.35;
    }

    .about-team .team-card__position,
    .about-team .team-card__email {
        font-size: 14px;
        line-height: 1.5;
    }
}

@media (max-width: 599px) {
    .about-team .team__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 479px) {
    .about-hero {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .about-team .team__grid {
        gap: 10px;
    }
}

/* =========================================================
   CONTACTS
   ========================================================= */

.contacts-hero {
    padding: 46px 0 50px;
    background-color: var(--blue-dark);
    background-image: var(--hero-overlay), var(--hero-pattern), url("/static/img/contacts.PNG");
    background-position: center, center, center calc(50% + 90px);
    background-repeat: no-repeat, repeat, no-repeat;
    background-size: cover, 26px 26px, cover;
}

.contacts-hero h1 {
    max-width: 780px;
    color: var(--text-on-dark);
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.12;
}

.contacts-hero p {
    max-width: 600px;
    margin-top: 18px;
    color: var(--hero-text);
    font-size: 16px;
    line-height: 1.55;
}

.contacts {
    padding: 40px 0 56px;
    background: var(--bg);
}

.contacts > .container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 14px;
}

.contacts__item {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-2);
    background: var(--bg);
    transition: border-color 0.18s, box-shadow 0.18s;
}

.contacts__item:hover {
    border-color: var(--blue);
    box-shadow: var(--card-shadow);
}

.contacts__item h2 {
    margin-bottom: 14px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.contacts__item a,
.contacts__item address {
    font-size: 16px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.contacts__item a {
    color: var(--blue);
    font-weight: 600;
}

.contacts__item a:hover {
    color: var(--blue-dark);
}

.contacts__item address {
    font-style: normal;
}

.contacts__item p {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.5;
}

.contacts__socials {
    display: flex;
    grid-column: 1 / -1;
    gap: 8px;
}

.contacts__social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-1);
    background: var(--bg-soft);
    color: var(--text-on-dark);
    transition: background-color 0.18s;
}

.contacts__social:hover {
    background: var(--blue-light);
}

.contacts__social img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.contacts a:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 4px;
}

.contacts__map {
    grid-column: 1 / -1;
    min-width: 0;
    margin-top: 8px;
}

.contacts-map > .container {
    padding: 0 24px;
}

.contacts-map__frame {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-2);
    background: var(--bg-soft);
}

.contacts-map__frame iframe {
    display: block;
    width: 100%;
    height: 280px;
    border: 0;
}

@media (min-width: 768px) and (max-width: 1199px) {
    .contacts > .container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .contacts > .container {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .contacts-hero {
        padding: 28px 0 32px;
        overflow-wrap: anywhere;
    }

    .contacts-hero h1 {
        font-size: 28px;
        letter-spacing: -0.5px;
    }

    .contacts-hero p {
        margin-top: 12px;
        font-size: 15px;
    }

    .contacts {
        padding: 24px 0 32px;
    }

    .contacts__item {
        padding: 16px;
        overflow-wrap: anywhere;
    }

    .contacts__item h2,
    .contacts__item h3 {
        margin-bottom: 10px;
        font-size: 16px;
        line-height: 1.3;
    }

    .contacts__item a,
    .contacts__item address {
        font-size: 15px;
    }

    .contacts__item p {
        margin-top: 6px;
        font-size: 13px;
    }

    .contacts__socials {
        flex-wrap: wrap;
    }

    .contacts__social,
    .contacts__social img {
        width: 48px;
        height: 48px;
    }

    .contacts__social {
        flex: 0 0 48px;
    }

    .contacts__map {
        margin-top: 0;
    }

    .contacts-map > .container {
        padding: 0;
    }

    .contacts-map__frame iframe {
        height: 220px;
    }
}

@media (max-width: 479px) {
    .contacts-hero {
        padding: 24px 0;
    }

    .contacts-hero h1 {
        font-size: 26px;
    }

    .contacts-hero > .container,
    .contacts > .container {
        padding-inline: 16px;
    }

    .contacts {
        padding: 20px 0 24px;
    }

    .contacts > .container {
        gap: 12px;
    }

    .contacts__item {
        padding: 14px;
    }

    .contacts-map__frame iframe {
        height: 180px;
    }
}


/* =========================================================
   PRIVACY
   ========================================================= */

.privacy-hero {
    padding: 46px 0 50px;
    background-color: var(--blue-dark);
    background-image: var(--hero-overlay), var(--hero-pattern), url("/static/img/privacy.PNG");
    background-position: center;
    background-repeat: no-repeat, repeat, no-repeat;
    background-size: cover, 26px 26px, cover;
}

.privacy-hero h1 {
    max-width: 900px;
    color: var(--text-on-dark);
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.privacy-hero p {
    max-width: 600px;
    margin-top: 18px;
    color: var(--hero-text);
    font-size: 16px;
    line-height: 1.55;
}

.privacy {
    padding: 40px 0 56px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
}

.privacy p {
    max-width: 900px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.75;
}

.privacy h2 {
    margin-top: 32px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--line);
    color: var(--ink);
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 800;
    line-height: 1.2;
}

.privacy a {
    color: var(--blue);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.privacy a:hover {
    color: var(--blue-dark);
    text-decoration: underline;
}

.privacy a:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 4px;
}

@media (max-width: 767px) {
    .privacy-hero {
        padding: 28px 0 32px;
    }

    .privacy-hero > .container,
    .privacy > .container {
        padding-right: 16px;
        padding-left: 16px;
    }

    .privacy-hero h1 {
        font-size: clamp(22px, 3.65vw, 28px);
        line-height: 1.2;
        letter-spacing: -0.5px;
    }

    .privacy-hero p {
        margin-top: 12px;
        font-size: 15px;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    .privacy {
        padding: 28px 0 32px;
    }

    .privacy p {
        line-height: 1.65;
        overflow-wrap: anywhere;
    }

    .privacy p + p {
        margin-top: 12px;
    }

    .privacy h2 {
        margin-top: 20px;
        margin-bottom: 10px;
        padding-bottom: 8px;
        font-size: clamp(20px, 3vw, 23px);
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .privacy > .container > h2:first-child {
        margin-top: 0;
    }
}

@media (max-width: 479px) {
    .privacy-hero {
        padding: 24px 0;
    }

    .privacy {
        padding: 24px 0 28px;
    }
}


/* =========================================================
   SERVICES
   ========================================================= */

.services-hero {
    padding: 46px 0 50px;
    background-color: var(--blue-dark);
    background-image: var(--hero-overlay), var(--hero-pattern), url("/static/img/services.png");
    background-position: center;
    background-repeat: no-repeat, repeat, no-repeat;
    background-size: cover, 26px 26px, cover;
}

.services-hero h1 {
    max-width: 780px;
    color: var(--text-on-dark);
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.12;
}

.services-hero p {
    max-width: 600px;
    margin-top: 18px;
    color: var(--hero-text);
    font-size: 16px;
    line-height: 1.55;
}

.services {
    padding: 48px 0 56px;
    background: var(--bg-soft);
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.services__item {
    min-width: 0;
    min-height: 174px;
    padding: 22px;
    border-radius: var(--radius-3);
    background-color: var(--blue-light);
    background-image: var(--adv-pattern);
    background-size: 18px 18px;
    transition: background-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.services__item:hover {
    background-color: var(--bg);
    box-shadow: var(--card-shadow);
    transform: translateY(-3px);
}

.services__item h2 {
    color: var(--blue-dark);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.services__item p {
    margin-top: 8px;
    color: var(--ink);
    font-size: 13.5px;
    line-height: 1.5;
}

@media (max-width: 1199px) {
    .services-hero {
        padding: clamp(32px, 3.84vw, 46px) 0 clamp(36px, 4.17vw, 50px);
    }

    .services-hero h1,
    .services__item p {
        overflow-wrap: anywhere;
    }

    .services__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .services-hero {
        padding: 28px 0 32px;
    }

    .services-hero > .container,
    .services > .container {
        padding-right: 16px;
        padding-left: 16px;
    }

    .services-hero h1 {
        font-size: clamp(26px, 4vw, 30px);
        line-height: 1.2;
        letter-spacing: -0.5px;
    }

    .services-hero p {
        margin-top: 12px;
        font-size: 15px;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    .services {
        padding: 28px 0;
    }

    .services__grid {
        gap: 12px;
    }

    .services__item {
        min-height: 0;
        padding: 16px;
    }

    .services__item h2 {
        font-size: 16px;
        line-height: 1.35;
    }

    .services__item p {
        margin-top: 6px;
        font-size: 15px;
    }
}

@media (max-width: 599px) {
    .services__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 479px) {
    .services-hero,
    .services {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .services__grid {
        gap: 10px;
    }

    .services__item {
        padding: 14px;
    }
}

/* =========================================================
   NEWS
   ========================================================= */
.news-page {
    padding-top: var(--space-4);
    padding-bottom: var(--space-6);
}

.news-page .breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    color: var(--muted);
    font-size: 14px;
}

.news-page .breadcrumbs > * + *::before {
    content: "/";
    margin-right: var(--space-2);
}

.news-page h1 {
    margin-bottom: var(--space-4);
    overflow-wrap: anywhere;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-3);
}

.news-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-2);
    background: var(--bg);
    display: flex;
    flex-direction: column;
    padding: var(--space-4);
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.news-card:hover {
    border-color: var(--blue);
    box-shadow: var(--card-shadow);
    transform: translateY(-3px);
}

.news-card__image {
    width: 100%;
    height: 20vh;
    object-fit: cover;
    border-radius: var(--radius-1);
    margin-bottom: var(--space-3);
}

.news-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    flex: 1;
    overflow-wrap: anywhere;
}

.news-card h2 {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.news-page time {
    color: var(--muted);
    font-size: 14px;
}

.news-card p, .news-detail__content p {
    line-height: 1.7;
    margin-bottom: var(--space-3);
}

.news-card__more {
    font-size: 14px;
    margin-top: auto;
    color: var(--blue);
    font-weight: 600;
}

.news-page a:hover {
    color: var(--blue);
}

.news-page a:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

.news-page .pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    margin-top: var(--space-5);
}

.news-page .pagination a {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--line);
    border-radius: var(--radius-1);
    color: var(--blue);
}

.news-detail__image {
    width: 100%;
    max-height: 640px;
    object-fit: contain;
    margin-top: var(--space-4);
    border-radius: var(--radius-2);
}

.news-detail__content {
    max-width: 840px;
    margin-top: var(--space-4);
    overflow-wrap: anywhere;
}

@media (max-width: 1199px) {
    .news-detail .breadcrumbs {
        overflow-wrap: anywhere;
    }

    .news-detail .breadcrumbs > * {
        min-width: 0;
        max-width: 100%;
    }

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

    .news-detail .news-detail__image {
        max-height: none;
    }
}

@media (max-width: 767px) {
    .news-detail {
        padding-top: 18px;
        padding-bottom: 32px;
    }

    .news-detail .breadcrumbs {
        gap: 6px;
        margin-bottom: 14px;
        font-size: 13px;
        line-height: 1.5;
    }

    .news-detail h1 {
        margin-bottom: 12px;
        font-size: 28px;
        line-height: 1.2;
    }

    .news-detail > time {
        font-size: 14px;
        line-height: 1.5;
    }

    .news-detail .news-detail__image,
    .news-detail .news-detail__content {
        margin-top: 16px;
    }

    .news-detail .news-detail__content {
        font-size: 16px;
        line-height: 1.6;
    }

    .news-detail__content p {
        margin-bottom: 12px;
        line-height: inherit;
    }

    .news-detail__content h2,
    .news-detail__content h3 {
        margin: 20px 0 10px;
        line-height: 1.3;
    }

    .news-detail__content h2 {
        font-size: 22px;
    }

    .news-detail__content h3 {
        font-size: 19px;
    }

    .news-detail__content ul,
    .news-detail__content ol {
        margin: 12px 0;
        padding-inline-start: 24px;
    }

    .news-detail__content ul {
        list-style: disc;
    }

    .news-detail__content ol {
        list-style: decimal;
    }

    .news-detail__content li + li {
        margin-top: 6px;
    }

    .news-detail__content a {
        color: var(--blue);
        text-decoration: underline;
        text-underline-offset: 3px;
    }

    .news-detail__content blockquote {
        margin: 16px 0;
        padding-inline-start: 14px;
        border-inline-start: 3px solid var(--line);
    }

    .news-detail__content figure {
        max-width: 100%;
        margin: 16px 0;
    }

    .news-detail__content figcaption {
        margin-top: 8px;
        font-size: 14px;
        line-height: 1.5;
    }

    .news-detail__content > :first-child {
        margin-top: 0;
    }

    .news-detail__content > :last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 479px) {
    .news-detail {
        padding: 16px 16px 24px;
    }

    .news-detail h1 {
        font-size: 26px;
    }

    .news-detail__content h2 {
        font-size: 20px;
    }
}


.news-list {
    padding: 0;
}

.news-hero {
    --hero-background: url("../img/news.png");
}

.news-hero h1 {
    max-width: 780px;
    margin-bottom: 0;
    color: var(--text-on-dark);
    font-size: clamp(32px, 4vw, 46px);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.12;
}

.news-hero .breadcrumbs {
    color: var(--text-on-dark-muted);
}

.news-hero .breadcrumbs [aria-current] {
    color: var(--text-on-dark);
}

.news-hero a:hover {
    color: var(--blue-pale);
}

.news-hero a:focus-visible {
    outline-color: var(--blue-pale);
}

.news-section {
    padding-top: 40px;
    padding-bottom: 56px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
}

@media (max-width: 1199px) {
    .news-list .news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .news-list .hero__inner {
        padding-top: 28px;
        padding-bottom: 32px;
    }

    .news-list .news-hero h1 {
        font-size: 28px;
        letter-spacing: -0.5px;
    }

    .news-list .breadcrumbs {
        margin-bottom: 14px;
        font-size: 13px;
        overflow-wrap: anywhere;
    }

    .news-list .news-section {
        padding: 24px 0 32px;
    }

    .news-list .news-grid {
        gap: 12px;
    }

    .news-list .news-card {
        min-width: 0;
        padding: 16px;
    }

    .news-list .news-card__image {
        height: auto;
        aspect-ratio: 16 / 9;
        margin-bottom: 10px;
    }

    .news-list .news-card__body {
        gap: 10px;
        font-size: 15px;
    }

    .news-list .news-card h2 {
        font-size: 16px;
    }

    .news-list time {
        font-size: 13px;
    }

    .news-list .news-card p {
        margin-bottom: 8px;
        line-height: 1.55;
    }

    .news-list .news-card p:last-child {
        margin-bottom: 0;
    }

    .news-list .pagination {
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 24px;
        font-size: 14px;
    }
}

@media (max-width: 599px) {
    .news-list .news-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 479px) {
    .news-list .container {
        padding-inline: 16px;
    }

    .news-list .hero__inner {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .news-list .news-hero h1 {
        font-size: 26px;
    }

    .news-list .news-section {
        padding: 20px 0 24px;
    }

    .news-list .news-card {
        padding: 14px;
    }
}

/* =========================================================
   ERROR PAGES — 404 / 500
   ========================================================= */
.error-page {
    display: flex;
    align-items: center;
    min-height: 60vh;
    padding: 72px 0;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, var(--bg-soft), var(--bg));
    text-align: center;
}

.error-page__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.error-page__code {
    margin-bottom: var(--space-4);
    color: var(--blue);
    font-size: clamp(96px, 15vw, 180px);
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 1;
}

.error-page__title {
    max-width: 720px;
    color: var(--blue-dark);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.error-page__text {
    max-width: 540px;
    margin-top: var(--space-3);
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
}

.error-page__link {
    max-width: 100%;
    margin-top: var(--space-5);
    white-space: normal;
}

.error-page__link:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 4px;
}

@media (max-width: 600px) {
    .error-page {
        padding: 48px 0;
    }
}
