/* ==========================================================================
   Site Header — AKFA-inspired
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(23, 23, 23, 0.0);
    backdrop-filter: blur(0);
    transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

.site-header.header-scrolled {
    background: rgba(23, 23, 23, 0.95);
    backdrop-filter: blur(14px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.site-header.header-light {
    background: rgba(255, 255, 255, 0.0);
}

.site-header.header-light.header-scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.header-shell {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-block .logo { margin: 0; }
.brand-block .logoLink { display: block; line-height: 0; }

.brand-block img {
    height: 44px;
    width: auto;
    display: block;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-name {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--color-white);
    transition: color 0.3s ease;
}

.brand-tagline {
    font-size: 0.65rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 2px;
    transition: color 0.3s ease;
}

.header-light .brand-name { color: var(--color-gray-900); }
.header-light .brand-tagline { color: rgba(0, 0, 0, 0.6); }

.nav-area {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-main {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-item { position: relative; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 18px;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.nav-link:hover,
.nav-link.active,
.nav-item.active > .nav-link {
    color: var(--color-white);
}

.nav-link.active::after,
.nav-item.active > .nav-link::after {
    content: '';
    display: block;
    position: absolute;
    bottom: 6px;
    left: 18px;
    right: 18px;
    height: 1px;
    background: var(--color-red);
}

.header-light .nav-link { color: rgba(0, 0, 0, 0.75); }
.header-light .nav-link:hover,
.header-light .nav-link.active { color: var(--color-gray-900); }

.nav-chevron {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.nav-item.has-dropdown:hover .nav-chevron { transform: rotate(180deg); }

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 280px;
    background: var(--color-gray-900);
    padding: 16px 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.nav-item.has-dropdown:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-link {
    display: block;
    padding: 12px 24px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease, padding 0.2s ease;
}

.nav-dropdown-link:hover,
.nav-dropdown-link.active {
    color: var(--color-white);
    background: rgba(214, 40, 40, 0.18);
    padding-left: 30px;
}

.topbar-icons {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 24px;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.header-light .topbar-icons { border-left-color: rgba(0, 0, 0, 0.1); }

.icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: 6px 10px;
    transition: opacity 0.2s ease;
}

.icon-link:hover { opacity: 0.7; }

.icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-wrapper img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.icon-label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
    font-weight: 500;
}

.header-light .icon-label { color: rgba(0, 0, 0, 0.6); }

.nav-toggle {
    display: none;
    width: 36px;
    height: 36px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.nav-toggle-inner {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
}

.nav-toggle-line {
    width: 100%;
    height: 2px;
    background: var(--color-white);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.header-light .nav-toggle-line { background: var(--color-gray-900); }

.nav-toggle.active .nav-toggle-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active .nav-toggle-line:nth-child(2) { opacity: 0; }
.nav-toggle.active .nav-toggle-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: 420px;
    background: var(--color-gray-900);
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.3);
}

.mobile-nav-panel.active { transform: translateX(0); }

.mobile-nav-content {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 20px;
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.mobile-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-brand img {
    height: 36px;
    width: auto;
}

.mobile-brand-name {
    display: block;
    font-size: 0.85rem;
    color: var(--color-white);
    font-weight: 700;
}

.mobile-brand-tagline {
    display: block;
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.mobile-nav-close {
    width: 36px;
    height: 36px;
    color: var(--color-white);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-close:hover {
    background: var(--color-red);
    border-color: var(--color-red);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mobile-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 4px;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-white);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex: 1;
    transition: color 0.2s ease, padding 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--color-red);
}

.mobile-link-arrow { color: rgba(255, 255, 255, 0.4); }

.mobile-sub-toggle {
    width: 44px;
    height: 44px;
    color: var(--color-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.3s ease;
}

.mobile-nav-item.open .mobile-sub-toggle { transform: rotate(180deg); }

.mobile-sub-links {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.mobile-nav-item.open .mobile-sub-links { max-height: 600px; }

.mobile-sub-link {
    display: block;
    padding: 14px 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: color 0.2s ease, padding 0.2s ease;
}

.mobile-sub-link:hover,
.mobile-sub-link.active {
    color: var(--color-red);
    padding-left: 30px;
}

.mobile-nav-footer {
    display: flex;
    gap: 16px;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-icon-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-white);
    text-decoration: none;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: background 0.2s ease;
}

.mobile-icon-link img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.mobile-icon-link:hover { background: var(--color-red); }

@media (max-width: 1100px) {
    .nav-main { display: none; }
    .topbar-icons { display: none; }
    .nav-area { display: none; }
    .nav-toggle { display: flex; }
    .header-shell {
        justify-content: flex-start;
        gap: 14px;
    }
}

@media (max-width: 640px) {
    .header-shell {
        height: 70px;
        padding: 0 16px;
    }
    .brand-block img { height: 36px; }
    .brand-name { font-size: 0.8rem; }
    .brand-tagline { font-size: 0.6rem; }
}
