/**
 * B2C Site Header — premium travel layout
 * Isolated from legacy new_style.css via #header.b2c-header
 */

#header.b2c-header {
    --hdr-brand: #531524;
    --hdr-brand-dark: #3d101b;
    --hdr-brand-soft: rgba(83, 21, 36, 0.08);
    --hdr-text: #0f172a;
    --hdr-muted: #64748b;
    --hdr-border: rgba(15, 23, 42, 0.08);
    --hdr-height: 76px;
    --hdr-font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

    position: sticky;
    top: 0;
    z-index: 1100;
    font-family: var(--hdr-font);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--hdr-border);
    transition: box-shadow 0.25s ease, background 0.25s ease;
}

#header.b2c-header.is-scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
}

#header.b2c-header .b2c-header__shell {
    width: 100%;
}

#header.b2c-header .container {
    max-width: 1280px;
}

#header.b2c-header .b2c-header__navbar {
    min-height: var(--hdr-height);
    align-items: center;
}

/* Logo */
#header.b2c-header .b2c-header__brand {
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

#header.b2c-header .b2c-header__brand img {
    display: block;
    height: 36px;
    width: auto;
    max-width: 132px;
}

/* Mobile toggler — hidden on desktop */
#header.b2c-header .b2c-header__toggler {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    margin-left: auto;
    border: none;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s;
}

@media (min-width: 992px) {
    #header.b2c-header .b2c-header__toggler {
        display: none !important;
    }
}

#header.b2c-header .b2c-header__toggler:hover {
    background: var(--hdr-brand-soft);
}

#header.b2c-header .b2c-header__toggler span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 0 auto;
    background: var(--hdr-text);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

#header.b2c-header .b2c-header__toggler.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

#header.b2c-header .b2c-header__toggler.is-open span:nth-child(2) {
    opacity: 0;
}

#header.b2c-header .b2c-header__toggler.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Menu layout */
#header.b2c-header .b2c-header__menu {
    align-items: center;
}

@media (min-width: 992px) {
    #header.b2c-header .b2c-header__menu {
        flex-grow: 1;
    }
}

/* Nav links — centered on desktop */
#header.b2c-header .b2c-header__links {
    gap: 2px;
    margin: 0;
    padding: 0;
}

@media (min-width: 992px) {
    #header.b2c-header .b2c-header__links {
        gap: 4px;
    }
}

#header.b2c-header .b2c-header__links .nav-item {
    margin: 0;
}

#header.b2c-header .b2c-header__link {
    position: relative;
    padding: 10px 14px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    letter-spacing: -0.01em;
    color: var(--hdr-muted) !important;
    border-radius: 8px;
    transition: color 0.15s ease;
    white-space: nowrap;
}

#header.b2c-header .b2c-header__link:hover {
    color: var(--hdr-brand) !important;
    background: transparent !important;
}

#header.b2c-header .b2c-header__link.is-active {
    color: var(--hdr-brand) !important;
    font-weight: 600 !important;
}

#header.b2c-header .b2c-header__link.is-active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 4px;
    height: 2px;
    background: var(--hdr-brand);
    border-radius: 2px;
}

@media (min-width: 992px) {
    #header.b2c-header .b2c-header__link.is-active::after {
        bottom: 6px;
    }
}

/* Actions */
#header.b2c-header .b2c-header__actions {
    gap: 4px;
    margin: 0;
    padding: 0;
}

#header.b2c-header .b2c-header__actions .nav-item {
    margin: 0;
}

#header.b2c-header .b2c-header__divider {
    display: inline-block;
    width: 1px;
    height: 24px;
    background: var(--hdr-border);
    margin: 0 8px;
}

#header.b2c-header .b2c-header__lang {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 8px 12px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--hdr-muted) !important;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
}

#header.b2c-header .b2c-header__lang i {
    font-size: 15px;
    color: var(--hdr-brand);
    opacity: 0.85;
}

#header.b2c-header .b2c-header__lang:hover {
    color: var(--hdr-brand) !important;
    background: var(--hdr-brand-soft) !important;
}

#header.b2c-header .b2c-header__signin {
    padding: 8px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--hdr-text) !important;
    border-radius: 10px;
    transition: color 0.15s, background 0.15s;
}

#header.b2c-header .b2c-header__signin:hover {
    color: var(--hdr-brand) !important;
    background: var(--hdr-brand-soft) !important;
}

#header.b2c-header .b2c-header__cta {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 10px 20px !important;
    margin-left: 4px;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    color: #fff !important;
    background: linear-gradient(135deg, var(--hdr-brand) 0%, var(--hdr-brand-dark) 100%) !important;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(83, 21, 36, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#header.b2c-header .b2c-header__cta:hover {
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(83, 21, 36, 0.34);
}

/* User profile */
#header.b2c-header .b2c-header__profile {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    padding: 4px 14px 4px 4px !important;
    border: 1px solid var(--hdr-border);
    border-radius: 999px;
    background: #fff !important;
    color: var(--hdr-text) !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

#header.b2c-header .b2c-header__profile:hover,
#header.b2c-header .b2c-header__profile:focus {
    border-color: rgba(83, 21, 36, 0.25);
    box-shadow: 0 0 0 3px var(--hdr-brand-soft);
    outline: none;
    color: var(--hdr-text) !important;
    text-decoration: none;
}

#header.b2c-header .b2c-header__profile.dropdown-toggle::after {
    margin-left: 2px;
    border-top-color: var(--hdr-muted);
}

#header.b2c-header .b2c-header__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--hdr-brand) 0%, #7a2127 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#header.b2c-header .b2c-header__avatar--lg {
    width: 42px;
    height: 42px;
    font-size: 16px;
}

#header.b2c-header .b2c-header__name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#header.b2c-header .b2c-header__dropdown {
    min-width: 240px;
    padding: 8px;
    margin-top: 10px;
    border: 1px solid var(--hdr-border);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
}

#header.b2c-header .b2c-header__dropdown-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 4px;
}

#header.b2c-header .b2c-header__dropdown-head strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--hdr-text);
    line-height: 1.3;
}

#header.b2c-header .b2c-header__dropdown-head small {
    display: block;
    font-size: 12px;
    color: var(--hdr-muted);
}

#header.b2c-header .b2c-header__dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    border-radius: 8px;
}

#header.b2c-header .b2c-header__dropdown .dropdown-item i {
    width: 16px;
    color: var(--hdr-muted);
    font-size: 14px;
}

#header.b2c-header .b2c-header__dropdown .dropdown-item:hover {
    background: var(--hdr-brand-soft);
    color: var(--hdr-brand);
}

#header.b2c-header .b2c-header__dropdown .dropdown-item:hover i {
    color: var(--hdr-brand);
}

#header.b2c-header .b2c-header__dropdown .dropdown-item.text-danger:hover {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626 !important;
}

#header.b2c-header .b2c-header__dropdown .dropdown-divider {
    margin: 6px 0;
    border-color: var(--hdr-border);
}

/* Mobile */
@media (max-width: 991px) {
    #header.b2c-header {
        --hdr-height: 64px;
    }

    #header.b2c-header .b2c-header__menu {
        padding: 12px 0 16px;
        margin-top: 8px;
        border-top: 1px solid var(--hdr-border);
    }

    #header.b2c-header .b2c-header__links {
        margin-bottom: 8px;
    }

    #header.b2c-header .b2c-header__link {
        padding: 12px 4px !important;
        font-size: 15px !important;
    }

    #header.b2c-header .b2c-header__link.is-active::after {
        left: 4px;
        bottom: 8px;
    }

    #header.b2c-header .b2c-header__actions {
        padding-top: 12px;
        border-top: 1px solid var(--hdr-border);
        flex-direction: column;
        align-items: stretch !important;
        width: 100%;
    }

    #header.b2c-header .b2c-header__actions .nav-item {
        width: 100%;
    }

    #header.b2c-header .b2c-header__lang,
    #header.b2c-header .b2c-header__signin,
    #header.b2c-header .b2c-header__cta {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    #header.b2c-header .b2c-header__cta {
        margin: 8px 0 0;
    }

    #header.b2c-header .b2c-header__profile {
        width: 100%;
        justify-content: flex-start;
    }

    #header.b2c-header .b2c-header__name {
        max-width: none;
        flex: 1;
    }
}
