
/* ============================================
   DD TOURS — PREMIUM SMART NAVIGATION
   Colours: Navy #001524 | Gold #DDB57A
============================================ */

:root {
    --nav-gold: #DDB57A;
    --nav-navy: #001524;
    --nav-white: #FFFFFF;
    --nav-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.site-header,
.site-header * {
    box-sizing: border-box;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;

    width: 100%;
    padding: 0;
background-color: rgba(0, 0, 0, 0);
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.05));;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);

    transform: translateY(0);
    transition:
        top 0.45s var(--nav-ease),
        left 0.45s var(--nav-ease),
        width 0.45s var(--nav-ease),
        background 0.35s ease,
        border-color 0.35s ease,
        border-radius 0.45s var(--nav-ease),
        box-shadow 0.35s ease,
        transform 0.4s var(--nav-ease);
    will-change: transform;
}

/* Prevent the header from affecting normal document flow.
   The homepage hero starts behind the transparent header. */

.site-header .navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;

    width: 90%;
    max-width: 1500px;
    min-height: 100px;
    margin: 0 auto;

    transition:
        min-height 0.4s var(--nav-ease),
        width 0.4s var(--nav-ease);
}

/* ============================================
   LOGO
============================================ */

.site-header .brand {
    position: relative;
    z-index: 2;

    display: inline-flex;
    align-items: center;
    flex-shrink: 0;

    text-decoration: none;
}

.site-header .brand__logo {
    display: block;
    width: 190px;
    height: 65px;

    object-fit: contain;
    object-position: left center;

    transition:
        width 0.35s var(--nav-ease),
        height 0.35s var(--nav-ease),
        opacity 0.25s ease;
}

.site-header .brand:hover .brand__logo {
    opacity: 0.88;
}

/* ============================================
   NAVIGATION LINKS
============================================ */

.site-header .navbar__menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(16px, 2vw, 30px);
}

.site-header .navbar__link {
    position: relative;
    display: inline-flex;
    align-items: center;

    padding: 12px 0;

    color: rgba(255, 255, 255, 0.94);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;

    transition:
        color 0.25s ease,
        opacity 0.25s ease;
}

/* Animated gold underline */

.site-header .navbar__link::after {
    position: absolute;
    right: 0;
    bottom: 4px;
    left: 0;

    height: 1px;

    background: var(--nav-gold);
    content: "";

    transform: scaleX(0);
    transform-origin: right center;

    transition: transform 0.3s var(--nav-ease);
}

.site-header .navbar__link:hover,
.site-header .navbar__link:focus-visible {
    color: var(--nav-gold);
}

.site-header .navbar__link:hover::after,
.site-header .navbar__link:focus-visible::after {
    transform: scaleX(1);
    transform-origin: left center;
}

/* Optional active page class */
.site-header .navbar__link.is-active {
    color: var(--nav-gold);
}

.site-header .navbar__link.is-active::after {
    transform: scaleX(1);
    transform-origin: left center;
}

/* ============================================
   PLAN YOUR TRIP BUTTON
============================================ */

.site-header .navbar__cta {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-shrink: 0;

    min-height: 48px;
    padding: 0 20px;

    border: 1px solid var(--nav-gold);
    border-radius: 2px;

    background: var(--nav-gold);
    color: var(--nav-navy);

    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;

    cursor: pointer;

    transition:
        color 0.3s ease,
        background 0.3s ease,
        border-color 0.3s ease,
        transform 0.3s var(--nav-ease);
}

.site-header .navbar__cta:hover {
    border-color: var(--nav-gold);
    background: transparent;
    color: var(--nav-white);
}

.site-header .navbar__cta:active {
    transform: scale(0.97);
}

.site-header .navbar__cta-icon {
    display: inline-block;
    font-size: 19px;
    font-weight: 400;
    line-height: 1;

    transition: transform 0.3s var(--nav-ease);
}

.site-header .navbar__cta:hover .navbar__cta-icon {
    transform: translate(3px, -3px);
}

/* ============================================
   SMART SCROLL STATE
   Applied after the page is scrolled
============================================ */

.site-header.is-scrolled {
    top: 12px;
    left: 50%;

    width: min(94%, 1460px);

    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 5px;

    background: rgba(0, 21, 36, 0.91);

    box-shadow:
        0 10px 35px rgba(0, 0, 0, 0.13),
        0 2px 8px rgba(0, 0, 0, 0.08);

    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);

    transform: translateX(-50%);
}

.site-header.is-scrolled .navbar {
    width: 94%;
    min-height: 76px;
}

.site-header.is-scrolled .brand__logo {
    width: 165px;
    height: 54px;
}

.site-header.is-scrolled .navbar__cta {
    min-height: 43px;
}

/* Hide header when scrolling down */
.site-header.is-hidden {
    transform: translateY(calc(-100% - 20px));
    pointer-events: none;
}

/* Keep horizontal centring when hidden in scrolled state */
.site-header.is-scrolled.is-hidden {
    transform: translate(-50%, calc(-100% - 20px));
}

/* ============================================
   MOBILE MENU TOGGLE
============================================ */

.site-header .navbar__toggle {
    position: relative;
    z-index: 10002;

    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;

    width: 44px;
    height: 44px;
    padding: 9px;

    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 3px;

    background: rgba(0, 21, 36, 0.18);
    cursor: pointer;

    transition:
        background 0.25s ease,
        border-color 0.25s ease;
}

.site-header .navbar__toggle:hover {
    border-color: var(--nav-gold);
    background: rgba(221, 181, 122, 0.12);
}

.site-header .navbar__toggle span {
    display: block;
    width: 21px;
    height: 2px;

    border-radius: 2px;
    background: var(--nav-white);

    transition:
        transform 0.3s var(--nav-ease),
        opacity 0.2s ease,
        width 0.25s ease;
}

.site-header .navbar__toggle span:nth-child(2) {
    width: 15px;
    margin-left: 6px;
}

.site-header .navbar__toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-header .navbar__toggle[aria-expanded="true"] span:nth-child(2) {
    width: 21px;
    margin-left: 0;
    opacity: 0;
}

.site-header .navbar__toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   TABLET + MOBILE NAVIGATION
============================================ */

@media (max-width: 900px) {
    .site-header .navbar {
        width: 90%;
        min-height: 82px;
        gap: 18px;
    }

    .site-header .brand__logo {
        width: 165px;
        height: 58px;
    }

    .site-header .navbar__toggle {
        display: flex;
    }

    .site-header .navbar__menu {
        position: absolute;
        top: calc(100% + 1px);
        right: 0;
        left: 0;
        z-index: 10001;

        display: flex;
        align-items: stretch;
        flex-direction: column;
        gap: 0;

        max-height: calc(100svh - 100px);
        padding: 12px 5% 24px;
        overflow-y: auto;

        border: 1px solid rgba(255, 255, 255, 0.08);
        border-top: 0;
        border-radius: 0 0 5px 5px;

        background: rgba(0, 21, 36, 0.98);
        box-shadow: 0 18px 35px rgba(0, 0, 0, 0.20);

        visibility: hidden;
        opacity: 0;
        pointer-events: none;

        transform: translateY(-8px);

        transition:
            opacity 0.25s ease,
            transform 0.3s var(--nav-ease),
            visibility 0.25s ease;
    }

    .site-header .navbar__menu.is-open {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .site-header .navbar__link {
        display: flex;
        width: 100%;
        padding: 16px 0;

        border-bottom: 1px solid rgba(255, 255, 255, 0.09);

        color: rgba(255, 255, 255, 0.94);
        font-size: 14px;
    }

    .site-header .navbar__link::after {
        display: none;
    }

    .site-header .navbar__link:hover,
    .site-header .navbar__link.is-active {
        color: var(--nav-gold);
    }

    .site-header .navbar__cta {
        align-self: flex-start;
        margin-top: 20px;
        min-height: 46px;
    }

    .site-header.is-scrolled .navbar {
        width: 94%;
        min-height: 70px;
    }

    .site-header.is-scrolled .brand__logo {
        width: 150px;
        height: 50px;
    }

    /* Expanded menu should remain visually attached to header */
    .site-header.is-scrolled .navbar__menu {
        border-radius: 0 0 5px 5px;
    }
}

/* ============================================
   SMALL MOBILE
============================================ */

@media (max-width: 480px) {
    .site-header .navbar {
        width: 92%;
        min-height: 76px;
    }

    .site-header .brand__logo {
        width: 145px;
        height: 50px;
    }

    .site-header .navbar__toggle {
        width: 42px;
        height: 42px;
    }

    .site-header.is-scrolled {
        top: 8px;
        width: calc(100% - 20px);
    }

    .site-header.is-scrolled .navbar {
        width: 94%;
        min-height: 66px;
    }

    .site-header.is-scrolled .brand__logo {
        width: 135px;
        height: 46px;
    }

    .site-header .navbar__menu {
        padding-right: 6%;
        padding-left: 6%;
    }
}

/* ============================================
   KEYBOARD ACCESSIBILITY
============================================ */

.site-header a:focus-visible,
.site-header button:focus-visible {
    outline: 2px solid var(--nav-gold);
    outline-offset: 4px;
}

/* ============================================
   REDUCED MOTION
============================================ */

@media (prefers-reduced-motion: reduce) {
    .site-header,
    .site-header *,
    .site-header *::before,
    .site-header *::after {
        scroll-behavior: auto !important;
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}
