/* ============================================================
   TRISTAN HOLDINGS UK — header.css  |  Redesign v3.0
   New: Transparent-to-glass header, pill nav, sleek dropdowns
   ============================================================ */

/* ============================================================
   TOP BAR
   ============================================================ */
.th-top-bar {
    display: none;
    background: rgba(2, 11, 20, 0.98);
    border-bottom: 1px solid rgba(201, 162, 77, 0.10);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1002;
    font-size: 0.78rem;
    font-family: 'Inter', sans-serif;
    transition: transform 0.35s ease;
}

.th-top-bar.hidden {
    transform: translateY(-100%);
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    gap: 16px;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.5);
    flex-wrap: wrap;
}

.top-bar-left a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.top-bar-left a:hover { color: var(--th-gold); }
.top-bar-left .sep { opacity: 0.2; }

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.tb-badge {
    color: rgba(255, 255, 255, 0.55);
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
}

.tb-badge i { color: var(--th-gold); font-size: 0.72rem; }

.tb-cta {
    background: linear-gradient(135deg, var(--th-gold), var(--th-gold-light));
    color: var(--th-navy-deep) !important;
    padding: 5px 14px;
    border-radius: 100px;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.25s;
    white-space: nowrap;
}

.tb-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(201, 162, 77, 0.35);
}

/* ============================================================
   MAIN HEADER — Transparent → Solid Glass
   ============================================================ */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 18px 0;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* On tablet/desktop, header sits below the fixed top bar */
@media (min-width: 768px) {
    header { top: 38px; }
    header.sticky { top: 0; }
}

/* Scrolled / solid state */
header.sticky {
    padding: 12px 0;
    background: rgba(2, 11, 20, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom-color: rgba(201, 162, 77, 0.12);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* ============================================================
   LOGO
   ============================================================ */
.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--th-gold), var(--th-gold-light));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 1.4rem;
    color: var(--th-navy-deep);
    flex-shrink: 0;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(201, 162, 77, 0.25);
}

.logo:hover .logo-icon {
    transform: rotate(-3deg) scale(1.05);
    box-shadow: 0 6px 20px rgba(201, 162, 77, 0.4);
}

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

.logo-main {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--th-gold);
    font-size: 1.15rem;
    letter-spacing: 2px;
}

.logo-sub {
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 3px;
    margin-top: 3px;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}

/* Image / SVG logo variants */
.logo-img {
    max-height: 44px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2));
    transition: transform 0.3s, filter 0.3s;
}
.logo:hover .logo-img {
    transform: scale(1.03);
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}

.logo-svg-wrap {
    display: flex;
    align-items: center;
    max-height: 44px;
}
.logo-svg-wrap svg {
    max-height: 44px;
    width: auto;
    display: block;
}

/* ============================================================
   NAVIGATION — Mobile slide-out panel
   ============================================================ */
#mainNav {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(340px, 85vw);
    height: 100dvh;
    height: 100vh;
    background: linear-gradient(180deg, #071A2F 0%, #020B14 100%);
    border-left: 1px solid rgba(201, 162, 77, 0.15);
    padding: 90px 24px 36px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: right 0.45s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1003;
}

#mainNav.active { right: 0; }

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.3px;
    padding: 14px 16px;
    border-radius: 12px;
    transition: all 0.25s ease;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}

.nav-link i.fa-chevron-down {
    font-size: 0.65rem;
    transition: transform 0.3s ease;
    margin-left: auto;
    opacity: 0.6;
}

.nav-link:hover,
.nav-item.active .nav-link {
    color: var(--th-gold);
    background: rgba(201, 162, 77, 0.08);
}

/* ============================================================
   MOBILE DROPDOWN
   ============================================================ */
.mega-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    display: none;
    padding: 8px;
    margin-top: 4px;
    width: 100%;
}

.nav-item.has-dropdown.open > .mega-menu { display: block; }

.mega-menu-simple ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-simple ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    border-left: 2px solid transparent;
}

.mega-menu-simple ul li a i {
    width: 18px;
    color: var(--th-gold);
    font-size: 0.85rem;
    flex-shrink: 0;
    opacity: 0.8;
}

.mega-menu-simple ul li a:hover {
    background: rgba(201, 162, 77, 0.08);
    color: var(--th-gold);
    border-left-color: var(--th-gold);
    padding-left: 18px;
}

.mega-menu-full { width: 100%; }
.mega-menu-header { display: none; }
.mega-footer { display: none; }

.mega-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
}

.mega-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 2px solid transparent;
}

.mega-item i {
    font-size: 1rem;
    color: var(--th-gold);
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.8;
}

.mega-item div strong {
    display: block;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.mega-item div span {
    display: block;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.74rem;
    margin-top: 2px;
}

.mega-item:hover {
    background: rgba(201, 162, 77, 0.08);
    border-left-color: var(--th-gold);
}

.mega-item:hover div strong { color: var(--th-gold); }

/* ============================================================
   HEADER CTA
   ============================================================ */
.header-cta { display: none; flex-shrink: 0; }

/* ============================================================
   MOBILE TOGGLE — Animated hamburger
   ============================================================ */
.mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    padding: 10px 11px;
    z-index: 1001;
    margin-left: auto;
    border-radius: 10px;
    transition: all 0.3s;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
}

.mobile-toggle:hover { border-color: rgba(201, 162, 77, 0.4); }

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--th-white);
    border-radius: 2px;
    transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: center;
    margin: 0 auto;
}

.mobile-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.mobile-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   NAV OVERLAY
   ============================================================ */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1002;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.nav-overlay.active { display: block; }

/* ============================================================
   FLOATING ENQUIRY BUTTON
   ============================================================ */
#floatEnquiry {
    position: fixed;
    bottom: 78px;
    right: 16px;
    background: linear-gradient(135deg, var(--th-gold), var(--th-gold-light));
    color: var(--th-navy-deep);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 990;
    box-shadow: 0 8px 24px rgba(201, 162, 77, 0.4);
    transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
    font-size: 1.1rem;
}

#floatEnquiry span {
    display: none;
    font-size: 0.68rem;
    font-weight: 700;
    margin-top: 2px;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.3px;
}

/* ============================================================
   RESPONSIVE — 768px+ (Tablet)
   ============================================================ */
@media (min-width: 768px) {
    .th-top-bar { display: block; }
    .header-inner { gap: 28px; }
    header { padding: 20px 0; }
    header.sticky { padding: 14px 0; }
}

/* ============================================================
   RESPONSIVE — 992px+ (Desktop)
   ============================================================ */
@media (min-width: 992px) {
    .mobile-toggle { display: none; }
    .header-cta { display: flex; }

    header { padding: 22px 0; }
    header.sticky { padding: 14px 0; }

    .header-inner { gap: 36px; }

    /* Inline horizontal nav */
    #mainNav {
        position: static;
        right: auto;
        width: auto;
        height: auto;
        background: transparent;
        border: none;
        padding: 0;
        overflow: visible;
        transition: none;
        margin-left: auto;
    }

    .nav-list {
        flex-direction: row;
        align-items: center;
        gap: 4px;
    }

    /* Pill-style nav links */
    .nav-link {
        font-size: 0.84rem;
        padding: 10px 16px;
        border-radius: 100px;
        position: relative;
        font-weight: 600;
        letter-spacing: 0.4px;
        text-transform: uppercase;
        font-size: 0.78rem;
    }

    .nav-link i.fa-chevron-down {
        margin-left: 0;
        font-size: 0.6rem;
        opacity: 0.5;
    }

    .nav-link:hover,
    .nav-item.active .nav-link {
        color: var(--th-gold);
        background: rgba(201, 162, 77, 0.1);
    }

    /* Logo on desktop */
    .logo-icon { width: 44px; height: 44px; font-size: 1.5rem; border-radius: 11px; }
    .logo-main { font-size: 1.22rem; letter-spacing: 2.5px; }

    /* Desktop dropdown base */
    .mega-menu {
        position: absolute;
        top: calc(100% + 14px);
        left: 50%;
        transform: translateX(-50%) translateY(10px);
        background: rgba(7, 26, 47, 0.98);
        border: 1px solid rgba(201, 162, 77, 0.15);
        border-radius: 16px;
        padding: 8px;
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(201, 162, 77, 0.05);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
        z-index: 999;
        display: block;
    }

    /* Arrow pointer on dropdown */
    .mega-menu::before {
        content: '';
        position: absolute;
        top: -6px;
        left: 50%;
        transform: translateX(-50%) rotate(45deg);
        width: 12px;
        height: 12px;
        background: rgba(7, 26, 47, 0.98);
        border-left: 1px solid rgba(201, 162, 77, 0.15);
        border-top: 1px solid rgba(201, 162, 77, 0.15);
    }

    .nav-item.has-dropdown { position: relative; }

    .nav-item.has-dropdown:hover .nav-link i.fa-chevron-down {
        transform: rotate(180deg);
        opacity: 1;
    }

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

    /* Simple dropdown */
    .mega-menu-simple {
        width: 280px;
        left: 0;
        transform: translateY(10px);
        padding: 8px;
    }

    .mega-menu-simple::before {
        left: 30px;
        transform: translateX(0) rotate(45deg);
    }

    .mega-menu-simple:hover,
    .nav-item.has-dropdown:hover > .mega-menu-simple {
        transform: translateY(0);
    }

    .mega-menu-simple ul li a {
        font-size: 0.86rem;
        padding: 11px 14px;
        border-radius: 10px;
    }

    /* Full mega menu */
    .mega-menu-full {
        width: 600px;
        left: 50%;
        transform: translateX(-50%) translateY(10px);
        padding: 20px;
    }

    .nav-item.has-dropdown:hover > .mega-menu-full {
        transform: translateX(-50%) translateY(0);
    }

    .mega-menu-header {
        display: block;
        padding: 0 8px 14px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        margin-bottom: 14px;
    }

    .mega-menu-header h4 {
        font-family: 'Playfair Display', serif;
        color: var(--th-gold);
        font-size: 0.95rem;
        margin-bottom: 4px;
    }

    .mega-menu-header p {
        color: rgba(255, 255, 255, 0.4);
        font-size: 0.76rem;
        margin: 0;
    }

    .mega-grid { grid-template-columns: 1fr 1fr; gap: 3px; }

    .mega-item {
        padding: 12px 14px;
        border-radius: 12px;
        border-left: 2px solid transparent;
    }

    .mega-item:hover {
        background: rgba(201, 162, 77, 0.08);
        border-left-color: var(--th-gold);
        transform: translateX(4px);
    }

    .mega-footer {
        display: block;
        margin-top: 14px;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        text-align: right;
    }

    .mega-footer a {
        color: var(--th-gold);
        text-decoration: none;
        font-size: 0.82rem;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        transition: gap 0.2s;
        font-family: 'Inter', sans-serif;
    }

    .mega-footer a:hover { gap: 10px; }

    /* Floating enquiry */
    #floatEnquiry { bottom: 84px; right: 24px; width: 54px; height: 54px; }
    #floatEnquiry:hover { width: 120px; border-radius: 27px; }
    #floatEnquiry:hover span { display: block; }
}

/* ============================================================
   RESPONSIVE — 1200px+ (Wide desktop)
   ============================================================ */
@media (min-width: 1200px) {
    .header-inner { gap: 44px; }
    .nav-link { font-size: 0.8rem; padding: 10px 18px; }
    .mega-menu-full { width: 660px; }
}
