:root {
    --header-height: 86px;
    --header-radius: 22px;
    --header-border: rgba(15, 23, 42, 0.08);
    --header-bg: rgba(255, 255, 255, 0.72);
    --header-bg-strong: rgba(255, 255, 255, 0.92);
    --header-text: var(--dark, #111827);
    --header-text-soft: var(--text-soft, #5f6b7a);
    --header-accent: var(--accent, #f59e0b);
    --header-accent-dark: var(--accent-dark, #d97706);
    --header-shadow:
        0 12px 34px rgba(15, 23, 42, 0.08),
        0 2px 10px rgba(15, 23, 42, 0.04);
    --header-shadow-hover:
        0 18px 44px rgba(15, 23, 42, 0.12),
        0 4px 14px rgba(15, 23, 42, 0.06);
}

/* =========================
   Header shell
========================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1100;
    padding: 12px 0 0;
    background: transparent;
}

.site-header::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 100%;
    background: linear-gradient(180deg, rgba(244, 245, 247, 0.88), rgba(244, 245, 247, 0.46), transparent);
    pointer-events: none;
    z-index: -1;
}

.header-inner {
    min-height: var(--header-height);
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto minmax(220px, 1fr);
    align-items: center;
    gap: 18px;
    padding: 10px 18px;
    border: 1px solid var(--header-border);
    border-radius: 26px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.76), rgba(255,255,255,0.58)),
        linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(255, 255, 255, 0.18));
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    box-shadow: var(--header-shadow);
}

.header-nav-shell {
    margin-top: -1px;
    position: relative;
    z-index: 0;
    width: fit-content;
}

.header-contacts {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
}

/* =========================
   Brand
========================= */

.brand {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex-shrink: 0;
    justify-self: center;
}



.brand-mark img {
    width: 100%;
    height: auto;
    max-height: 34px;
    object-fit: contain;
    display: block;
    -webkit-font-smoothing: antialiased;
    image-rendering: -webkit-optimize-contrast;
    filter: drop-shadow(0 1px 0 rgba(255,255,255,0.45));
}

/* =========================
   Main nav
========================= */

.main-nav {
    min-width: 0;
    padding: 10px 18px 14px;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-top: none;
    border-radius: 0 0 24px 24px;
    background:
        linear-gradient(180deg, rgba(250, 180, 36, 0.96), rgba(234, 138, 18, 0.94)),
        linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
    box-shadow:
        0 18px 34px rgba(217, 119, 6, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.main-nav ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li {
    flex: 0 0 auto;
}

.main-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 15px;
    border-radius: 999px;
    color: rgba(17, 24, 39, 0.82);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.18);
    transition:
        color 0.24s ease,
        background 0.24s ease,
        border-color 0.24s ease,
        transform 0.24s ease,
        box-shadow 0.24s ease;
}

.main-nav a:hover {
    color: #111827;
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(255, 255, 255, 0.34);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

/* =========================
   Right side actions
========================= */

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
    flex-shrink: 0;
}

.header-phones {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-phones .phone {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.header-phones .phone i {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.phone-number {
    display: block;
    min-width: 0;
}

.phone--primary {
    border: 1px solid rgba(255, 255, 255, 0.26);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.04)),
        linear-gradient(135deg, rgba(245, 158, 11, 0.94), rgba(217, 119, 6, 0.88));
    color: #fffdf8;
    box-shadow:
        0 12px 28px rgba(245, 158, 11, 0.18),
        inset 0 1px 0 rgba(255,255,255,0.24);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.phone--secondary {
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.76);
    color: var(--header-accent-dark);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.phone--primary:hover,
.phone--secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--header-shadow-hover);
}

/* =========================
   CTA button in header
========================= */

.header-actions .btn.btn-primary {
    min-height: 46px;
    padding: 0 18px;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* =========================
   Burger
========================= */

.nav-toggle {
    display: none;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.84);
    border-radius: 14px;
    padding: 10px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.nav-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--header-text);
    border-radius: 999px;
    margin: 5px 0;
}

/* =========================
   Overlay menu
========================= */

.nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: block;
    padding: 28px 20px;
    overflow-y: auto;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.96)),
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 22%);
    color: #fff;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.nav-overlay[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.nav-overlay-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.nav-overlay-list {
    max-width: 960px;
    margin: 70px auto 0;
    transform: translateY(18px);
    opacity: 0;
    transition: transform 0.32s ease, opacity 0.32s ease;
}

.nav-overlay[aria-hidden="false"] .nav-overlay-list {
    transform: translateY(0);
    opacity: 1;
}

.nav-overlay-list ul {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
}

.nav-overlay-list li {
    margin: 14px 0;
}

.nav-overlay-list a {
    color: #fff;
    font-size: clamp(1.45rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    text-decoration: none;
}

.nav-phones{
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Navigation hover accent */
.main-nav a {
    transition: color 0.18s ease, background 0.18s ease;
}

.main-nav a:hover {
    color: var(--header-text);
}


.nav-overlay-contact {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.78);
    font-size: 1rem;
}

.nav-address,
.nav-hours {
    margin-bottom: 10px;
}

.nav-phones a {
    color: var(--header-accent);
    font-weight: 800;
}

.nav-open {
    overflow: hidden;
}

/* =========================
   Desktop adaptation 981–1420
========================= */

@media (min-width: 981px) and (max-width: 1420px) {
    .header-inner {
        grid-template-columns: minmax(220px, 1fr) auto minmax(180px, 1fr);
        gap: 14px;
        padding: 10px 14px;
    }

    .main-nav ul {
        gap: 6px;
        row-gap: 8px;
    }

    .main-nav a {
        min-height: 40px;
        padding: 0 12px;
        font-size: 0.86rem;
    }

    .header-actions {
        gap: 8px;
    }

    .header-phones {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .header-phones .phone {
        width: 100%;
        min-height: 40px;
        padding: 0 12px;
        font-size: 0.82rem;
    }

    .header-actions .btn.btn-primary {
        min-height: 42px;
        padding: 0 14px;
        font-size: 0.84rem;
    }
}

@media (min-width: 1181px) and (max-width: 1420px) {
    .header-inner {
        grid-template-columns: minmax(260px, 1fr) auto minmax(220px, 1fr);
    }


    .header-phones .phone {
        width: auto;
    }
}

/* =========================
   Tablet / mobile
========================= */

@media (max-width: 980px) {
    .header-inner {
        grid-template-columns: auto auto;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 14px;
    }

    .header-contacts {
        display: none;
    }

    .brand {
        justify-self: start;
    }

    .header-nav-shell {
        display: none;
    }

    .main-nav {
        position: absolute;
        top: calc(100% + 8px);
        left: 16px;
        right: 16px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: 0.25s ease;
        background: var(--header-bg-strong);
        padding: 12px;
        border: 1px solid rgba(15, 23, 42, 0.08);
        border-top: 1px solid rgba(15, 23, 42, 0.08);
        border-radius: 20px;
        box-shadow: var(--header-shadow);
    }

    .main-nav.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .main-nav a {
        display: flex;
        justify-content: flex-start;
        min-height: 44px;
        padding: 0 14px;
        border-radius: 14px;
        background: rgba(255,255,255,0.6);
    }

    .nav-toggle {
        display: block;
        margin-left: auto;
    }

    .header-actions {
        display: none;
    }
}

@media (max-width: 560px) {
    .site-header {
        padding: 8px 0;
    }

    .header-inner {
        min-height: 72px;
        border-radius: 18px;
        padding: 8px 12px;
    }

    .brand-mark img {
        max-height: 28px;
    }

    .nav-toggle {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    .nav-overlay {
        padding: 22px 16px;
    }

    .nav-overlay-list {
        margin-top: 58px;
    }
}
