/* Header: brand colours, centered links, underline hover, destinations mega menu */
:root {
    --brand: #1a2a6c;
    --accent: #c4871c;
    --surface: #f4f6fb;
    --soft: #e9f1fb;
    --line: #dfe3f0;
    --header-side: 220px; /* equal width for logo and button columns = true centered links */
}

/* Link colours (same navy on hover and active; the gold line shows state) */
.navbar {
    --bs-navbar-color: var(--brand);
    --bs-navbar-hover-color: var(--brand);
    --bs-navbar-active-color: var(--brand);
}

/* Gold button */
.btn-gold {
    background: #d3890a;
    border-color: #d3890a;
    color: #fff;
}

.btn-gold:hover,
.btn-gold:focus {
    background: #a87214;
    border-color: #a87214;
    color: #fff;
}

/* Mega menu card */
.mega-menu {
    padding: 1.5rem;
    box-shadow: 0 12px 32px rgba(26, 42, 108, .15);
}

.dest-title {
    color: var(--brand);
    letter-spacing: .02em;
}

.dest-title::after {
    content: "";
    display: block;
    width: 36px;
    height: 2px;
    margin-top: .5rem;
    background: var(--accent);
}

.dest-link {
    color: var(--brand);
    border-bottom: 1px solid var(--line);
}

.dest-link .arrow {
    transition: transform .2s ease;
}

.dest-link:hover {
    color: var(--accent);
}

.dest-link:hover .arrow {
    transform: translateX(4px);
}

.dest-all {
    background: var(--soft);
    color: var(--brand);
    transition: background .2s;
}

.dest-all:hover {
    background: #dbe8f8;
    color: var(--brand);
}

/* ---------- Desktop (1200px and up) ---------- */
@media (min-width: 1200px) {

    /* Logo left */
    .header-brand {
        flex: 0 0 var(--header-side);
        margin-right: 0;
    }

    /* Collapse area: links centre, button right */
    .navbar-collapse {
        display: flex !important;
        flex-grow: 1;
        align-items: center;
    }

    .header-links {
        flex: 1 1 auto;
        flex-direction: row;
        align-items: center;
        column-gap: .75rem;
    }

    .header-cta {
        flex: 0 0 var(--header-side);
        display: flex;
        justify-content: flex-end;
    }

    /* Underline grows from 0 to full width */
    .navbar .nav-link {
        position: relative;
        padding: .5rem .9rem;
    }

    .navbar .nav-link::before {
        content: "";
        position: absolute;
        left: .9rem;
        right: .9rem;
        bottom: .2rem;
        height: 2px;
        background: var(--accent);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform .3s ease;
    }

    .navbar .nav-link:hover::before,
    .navbar .nav-link.active::before,
    .navbar .dropdown:hover>.nav-link::before {
        transform: scaleX(1);
    }

    /* No caret on desktop; the menu opens on hover */
    .navbar .dropdown-toggle::after {
        display: none;
    }

    .navbar .dropdown:hover>.dropdown-menu {
        display: block;
    }

    .mega-menu {
        top: 100%;
        left: 80%;
        transform: translateX(-50%);
        width: 640px;
        margin-top: 1.4rem;
    }

    /* Invisible bridge so the menu stays open while the mouse moves down to it */
    .mega-menu::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: -1.4rem;
        height: 1.4rem;
    }

    /* Two columns with a divider between them */
    .dest-col:first-child {
        padding-right: 1.5rem;
    }

    .dest-col+.dest-col {
        padding-left: 1.5rem;
        border-left: 1px solid var(--line);
    }

    .dest-col a:last-child {
        border-bottom: 0;
    }
}

/* ---------- Tablet and mobile (below 1200px): hamburger menu ---------- */
@media (max-width: 1199.98px) {

    .navbar-collapse {
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        padding: .75rem 0 1rem;
    }

    .header-links {
        align-items: stretch;
    }

    .navbar .nav-link {
        padding: .75rem .25rem;
        border-bottom: 1px solid var(--line);
    }

    /* Country links use a single stacked column on smaller screens */
    .navbar .dropdown-menu.mega-menu {
        position: static;
        float: none;
        width: 100%;
        margin: 0;
        padding: 1rem .5rem .25rem 1rem;
        box-shadow: none;
        background: var(--surface);
        border-radius: .75rem !important;
    }

    .dest-title {
        display: block;
        font-size: .8rem;
        margin-bottom: .5rem !important;
    }

    .dest-col {
        width: 100%;
    }

    .dest-link {
        padding-top: .65rem !important;
        padding-bottom: .65rem !important;
    }

    .dest-col:last-child a:last-child {
        border-bottom: 0;
    }

    /* Button full width at the bottom of the menu */
    .header-cta {
        margin-top: 1rem;
    }

    .header-cta .btn {
        display: block;
        width: 100%;
    }
}