/*
 * Ravar Municipality — Step 1 header identity
 * Visual language: minimal municipal UI with subtle Ravar-carpet influence.
 * Scope: topbar + header + primary navigation only.
 * Backend/database/admin are untouched.
 */
:root {
    --header-ivory: #fbf8ef;
    --header-ivory-2: #f7f2e7;
    --header-green: #063f3b;
    --header-green-deep: #032f2c;
    --header-gold: #c79a3c;
    --header-line: rgba(166, 127, 55, .24);
}

.site-header {
    background: rgba(251,248,239,.97);
    box-shadow: 0 1px 0 rgba(85, 68, 36, .08);
    backdrop-filter: saturate(135%) blur(18px);
}

.site-header.is-scrolled {
    background: rgba(251,248,239,.985);
    box-shadow: 0 16px 48px rgba(3,48,44,.10);
}

/* Top bar: deliberately generous scale, but still quiet. */
.topbar {
    min-height: 48px;
    background: linear-gradient(100deg, var(--header-green-deep), #075149 52%, var(--header-green));
    color: #fff;
}

.topbar::after {
    opacity: .045;
    background-size: 86px 100%;
}

.topbar-inner {
    min-height: 48px;
    font-size: 13.5px;
    gap: 26px;
}

.topbar .ui-icon {
    color: #e4bc63;
}

.pulse-dot {
    background: #e3ba5c;
    box-shadow: 0 0 0 0 rgba(227,186,92,.44);
}

/* This strip is a real crop from the user-provided Ravar carpet reference. */
.carpet-header-border {
    height: 10px;
    width: 100%;
    border-top: 1px solid rgba(199,154,60,.38);
    border-bottom: 1px solid rgba(199,154,60,.34);
    background-image:
        linear-gradient(rgba(255,252,244,.08), rgba(255,252,244,.08)),
        url('../images/ravar-carpet-header-border.webp');
    background-position: center;
    background-repeat: repeat-x;
    background-size: auto 100%;
    box-shadow: inset 0 1px rgba(255,255,255,.45);
}

/* Brand block: same strong scale as approved preview. */
.brand-row {
    position: relative;
    isolation: isolate;
    min-height: 124px;
    padding-block: 14px;
}

.brand-row::before,
.brand-row::after {
    content: "";
    position: absolute;
    top: 7px;
    z-index: -1;
    width: 145px;
    height: 112px;
    background: url('../images/ravar-carpet-corner.png') center/contain no-repeat;
    opacity: .58;
    pointer-events: none;
}

.brand-row::before {
    right: -34px;
    transform: scaleX(-1);
}

.brand-row::after {
    left: -34px;
}

.brand {
    min-width: 340px;
    gap: 22px;
}

.brand-mark {
    width: 86px;
    height: 86px;
    flex: 0 0 86px;
    border-radius: 28px;
    background: transparent;
    box-shadow: none;
}

.brand-mark::before {
    inset: -3px;
    border: 1px solid rgba(199,154,60,.58);
    border-radius: 30px;
    transform: rotate(0deg);
}

.brand-mark::after {
    content: "";
    position: absolute;
    inset: 7px;
    border: 1px solid rgba(6,63,59,.10);
    border-radius: 22px;
}

.brand img {
    width: 80px;
    height: 80px;
    padding: 4px;
    border-radius: 22px;
}

.brand-copy strong {
    color: var(--header-green);
    font-family: NianExtraBold, Nian, Tahoma, sans-serif;
    font-size: 31px;
    line-height: 1.28;
    letter-spacing: -.45px;
}

.brand-copy small {
    margin-top: 4px;
    color: #aa7723;
    font-family: NianSemiBold, Nian, Tahoma, sans-serif;
    font-size: 13.5px;
    letter-spacing: 0;
}

.header-utility {
    gap: 12px;
}

.utility-chip {
    min-height: 48px;
    padding: 9px 16px;
    border-color: rgba(115,91,43,.14);
    border-radius: 15px;
    color: var(--header-green);
    background: rgba(255,255,255,.60);
    font-size: 13.5px;
    box-shadow: 0 6px 18px rgba(61,49,26,.035);
}

.utility-chip-gold {
    color: #6b4a0d;
    border-color: rgba(199,154,60,.25);
    background: rgba(255,249,234,.75);
}

/* Main nav: no filled pills; emphasis comes from typography + a small carpet-like diamond. */
.nav-layer {
    position: relative;
    border-top: 1px solid rgba(121,92,39,.10);
    border-bottom: 1px solid rgba(121,92,39,.15);
    background: rgba(251,248,239,.96);
}

.nav-layer::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 50%;
    width: 96px;
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(199,154,60,.72), transparent);
}

.nav-shell {
    min-height: 64px;
    gap: 24px;
}

.main-nav {
    gap: 8px;
}

.main-nav a {
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    padding: 10px 15px 13px;
    border-radius: 0;
    color: #344b46;
    font-size: 15.5px;
    font-family: NianSemiBold, Nian, Tahoma, sans-serif;
    font-weight: 600;
    background: transparent !important;
}

.main-nav a::after {
    right: 50%;
    left: auto;
    bottom: 5px;
    width: 38px;
    height: 1px;
    border-radius: 0;
    background: linear-gradient(90deg, transparent, var(--header-gold), transparent);
    transform: translateX(50%) scaleX(0);
}

.main-nav a::before {
    content: "";
    position: absolute;
    right: 50%;
    bottom: 1px;
    width: 7px;
    height: 7px;
    border: 1px solid var(--header-gold);
    background: var(--header-ivory);
    transform: translateX(50%) rotate(45deg) scale(0);
    transition: transform .28s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--header-green);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    transform: translateX(50%) scaleX(1);
}

.main-nav a:hover::before,
.main-nav a.active::before {
    transform: translateX(50%) rotate(45deg) scale(1);
}

.nav-contact {
    min-height: 46px;
    padding: 9px 15px;
    border: 1px solid rgba(199,154,60,.34);
    border-radius: 14px;
    color: var(--header-green);
    background: rgba(255,255,255,.62);
    box-shadow: 0 7px 20px rgba(61,49,26,.045);
    font-size: 13.5px;
}

.nav-contact .ui-icon {
    color: var(--header-gold);
}

.menu-button {
    width: 52px;
    height: 52px;
    border: 1px solid rgba(199,154,60,.34);
    border-radius: 16px;
    color: #efd183;
    background: var(--header-green);
    box-shadow: 0 10px 24px rgba(6,63,59,.16);
}

/* Tablet: preserve the approved large visual scale; only utilities collapse. */
@media (max-width: 1100px) {
    .brand-row::before,
    .brand-row::after {
        width: 118px;
        opacity: .46;
    }

    .brand {
        min-width: 290px;
    }

    .brand-copy strong {
        font-size: 27px;
    }
}

@media (max-width: 900px) {
    .topbar-inner {
        min-height: 46px;
    }

    .brand-row {
        min-height: 108px;
        padding-block: 10px;
    }

    .brand-row::before,
    .brand-row::after {
        width: 96px;
        height: 92px;
        top: 8px;
        opacity: .35;
    }

    .brand {
        min-width: 0;
        gap: 15px;
    }

    .brand-mark {
        width: 72px;
        height: 72px;
        flex-basis: 72px;
        border-radius: 23px;
    }

    .brand img {
        width: 67px;
        height: 67px;
        border-radius: 18px;
    }

    .brand-copy strong {
        font-size: 24px;
    }

    .brand-copy small {
        font-size: 12.5px;
    }

    /* Geometry of the drawer remains controlled by mobile-overflow-fix.css. */
    .nav-layer {
        background: var(--header-ivory) !important;
        border-left: 1px solid rgba(199,154,60,.22) !important;
        box-shadow: -24px 0 60px rgba(3,48,44,.16) !important;
    }

    .nav-layer::before {
        display: none;
    }

    .main-nav a {
        min-height: 54px;
        padding: 11px 14px;
        border-bottom: 1px solid rgba(121,92,39,.08);
        font-size: 16px;
    }

    .main-nav a::after,
    .main-nav a::before {
        display: none;
    }

    .main-nav a.active {
        color: var(--header-green);
        background: rgba(199,154,60,.08) !important;
    }
}

@media (max-width: 680px) {
    .topbar {
        min-height: 42px;
    }

    .topbar-inner {
        min-height: 42px;
        font-size: 12px;
    }

    .carpet-header-border {
        height: 8px;
    }

    .brand-row {
        min-height: 100px;
        gap: 12px;
    }

    .brand-row::before {
        right: -28px;
        width: 82px;
        height: 82px;
        opacity: .27;
    }

    .brand-row::after {
        display: none;
    }

    .brand {
        gap: 13px;
        max-width: calc(100% - 66px);
    }

    .brand-mark {
        width: 66px;
        height: 66px;
        flex: 0 0 66px;
    }

    .brand img {
        width: 61px;
        height: 61px;
    }

    .brand-copy strong {
        font-size: 21px !important;
        line-height: 1.25;
        white-space: nowrap;
    }

    .brand-copy small {
        display: block !important;
        max-width: 180px;
        margin-top: 2px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 10.5px;
    }

    .menu-button {
        width: 52px;
        height: 52px;
        flex: 0 0 52px;
    }
}

@media (max-width: 380px) {
    .brand-row {
        min-height: 96px;
    }

    .brand-mark {
        width: 62px !important;
        height: 62px !important;
        flex: 0 0 62px !important;
    }

    .brand img {
        width: 57px !important;
        height: 57px !important;
    }

    .brand-copy strong {
        font-size: 19px !important;
    }

    .brand-copy small {
        max-width: 150px;
        font-size: 10px;
    }

    .menu-button {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
    }
}
