/* =========================================================
   EASE MY HOLIDAY HEADER + FOUR-COLUMN MEGA MENU
   Brand palette preserved: navy, gold, white, WhatsApp green
========================================================= */
:root {
    --primary: #082c4c;
    --primary-dark: #051d33;
    --gold: #d7ad45;
    --gold-light: #f0cf78;
    --white: #ffffff;
    --text: #17202a;
    --light-bg: #f7f9fc;
    --whatsapp: #25d366;
    --header-border: rgba(8, 44, 76, .10);
}

* { box-sizing: border-box; }
body { margin: 0; font-family: "Poppins", Arial, sans-serif; padding-top: 82px; }
a { text-decoration: none; }
button { font: inherit; }

/* Header */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    width: 100%; height: 82px;
    z-index: 9999;
    background: rgba(255,255,255,.97);
    border-bottom: 1px solid var(--header-border);
    transition: height .25s ease, box-shadow .25s ease, background .25s ease;
}
.site-header.scrolled {
    height: 70px;
    background: rgba(255,255,255,.99);
    box-shadow: 0 8px 28px rgba(0,0,0,.08);
}
.header-container {
    width: 100%; max-width: 1500px; height: 100%;
    margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 18px;
}

/* Logo */
.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; min-width: 0; }
.brand-logo {
    width: 52px; height: 52px; flex: 0 0 52px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; border-radius: 50%; background: #fff;
}
.brand-logo img { display: block; width: 100%; height: 100%; object-fit: fill; border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-text strong { color: var(--primary); font-size: 17px; font-weight: 800; letter-spacing: .1px; white-space: nowrap; }
.brand-text small { margin-top: 5px; color: #7b8794; font-size: 9px; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; }

/* Main navigation */
.main-nav { display: flex; align-items: center; justify-content: center; gap: 1px; min-width: 0; }
.main-nav > a,
.nav-mega-btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    gap: 6px; padding: 10px 9px; border: 0; background: transparent;
    color: #273746; font-family: inherit; font-size: 13px; font-weight: 600;
    white-space: nowrap; cursor: pointer; transition: color .2s ease;
}
.main-nav > a::after {
    content: ""; position: absolute; left: 50%; bottom: 2px; width: 0; height: 2px;
    transform: translateX(-50%); background: var(--gold); transition: width .2s ease;
}
.main-nav > a:hover, .main-nav > a.active,
.nav-mega-btn:hover, .nav-mega-btn.active, .nav-item.open > .nav-mega-btn { color: var(--primary); }
.main-nav > a:hover::after, .main-nav > a.active::after { width: 52%; }
.nav-mega-btn i { font-size: 9px; transition: transform .2s ease; }
.nav-item.open > .nav-mega-btn i { transform: rotate(180deg); }
.nav-item.has-mega { position: static; }

/* Call and WhatsApp buttons */
.header-actions { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.call-btn, .whatsapp-btn {
    min-height: 40px; display: inline-flex; align-items: center; justify-content: center;
    gap: 7px; padding: 0 12px; border-radius: 8px; font-size: 11px; font-weight: 700;
    white-space: nowrap; transition: transform .2s ease, box-shadow .2s ease;
}
.call-btn { color: var(--primary); background: #fff; border: 1px solid rgba(8,44,76,.2); }
.call-btn span { font-size: 16px; }
.whatsapp-btn { color: #fff; background: var(--whatsapp); box-shadow: 0 5px 15px rgba(37,211,102,.2); }
.whatsapp-btn i { font-size: 16px; }
.call-btn:hover, .whatsapp-btn:hover { transform: translateY(-1px); }

/* Mobile toggle */
.menu-toggle {
    display: none; width: 42px; height: 42px; flex: 0 0 42px;
    padding: 9px; border: 0; border-radius: 8px; background: var(--primary);
    cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.menu-toggle span { width: 22px; height: 2px; background: #fff; border-radius: 3px; transition: transform .2s ease, opacity .2s ease; }
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   DESKTOP MEGA MENU - reference screenshot style
========================================================= */
.mega-panel.mega-panel-columns {
    position: absolute; top: 100%; left: 0; right: 0;
    width: 100%; max-width: 100%; max-height: calc(100vh - 82px); max-height: calc(100dvh - 82px);
    margin: 0; padding: 14px 22px 20px; transform: none;
    display: block; overflow-x: hidden; overflow-y: auto;
    background: #fff; border: 1px solid rgba(8,44,76,.08); border-top: 1px solid #eee;
    border-radius: 0 0 8px 8px; box-shadow: 0 14px 35px rgba(8,44,76,.12);
}
.mega-panel.mega-panel-columns[hidden] { display: none !important; }
.mega-destination-grid {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 30px; align-items: start; width: 100%; min-width: 0;
}
.mega-destination-column { width: 100%; min-width: 0; }
.mega-destination-link {
    display: flex !important; align-items: center; justify-content: space-between; gap: 8px;
    width: 100%; min-width: 0; min-height: 37px; margin: 0; padding: 8px 4px !important;
    color: #626262 !important; background: transparent; border-bottom: 1px solid #eee;
    font-size: 13px !important; font-weight: 400 !important; line-height: 1.5;
    text-decoration: none; overflow-wrap: anywhere; box-sizing: border-box;
    transition: color .2s ease, padding-left .2s ease;
}
.mega-destination-link span { min-width: 0; }
.mega-destination-link i { flex: 0 0 auto; font-size: 9px; color: var(--gold); opacity: 0; transition: opacity .2s ease; }
.mega-destination-link::after { display: none !important; content: none !important; }
.mega-destination-link:hover { color: var(--primary) !important; padding-left: 8px !important; }
.mega-destination-link:hover i { opacity: 1; }
.mega-featured-clean {
    display: none; flex-wrap: wrap; align-items: center; gap: 8px 22px;
    padding: 0 4px 12px; margin-bottom: 8px; background: transparent; border-bottom: 1px solid #eee;
}
.mega-featured-clean a { padding: 0 !important; color: var(--primary) !important; font-size: 13px !important; font-weight: 600 !important; }
.mega-featured-clean a::after { display: none !important; }
.mega-empty { display: flex; flex-direction: column; gap: 6px; padding: 16px 4px; color: #626262; font-size: 13px; }
.mega-empty strong { color: var(--primary); }

/* Laptop */
@media (min-width: 901px) and (max-width: 1250px) {
    .header-container { padding: 0 16px; gap: 10px; }
    .brand-logo { width: 45px; height: 45px; flex-basis: 45px; }
    .brand-text strong { font-size: 14px; }
    .brand-text small { font-size: 8px; letter-spacing: .5px; }
    .main-nav > a, .nav-mega-btn { padding: 9px 6px; font-size: 11px; }
    .call-btn, .whatsapp-btn { padding: 0 9px; }
    .mega-panel.mega-panel-columns { padding-left: 16px; padding-right: 16px; }
    .mega-destination-grid { column-gap: 18px; }
    .mega-destination-link { font-size: 12px !important; }
}

/* Tablet and mobile navigation */
@media (max-width: 900px) {
    body { padding-top: 70px; }
    .site-header { height: 70px; }
    .site-header.scrolled { height: 66px; }
    .header-container { padding: 0 14px; gap: 9px; }
    .brand { gap: 8px; }
    .brand-logo { width: 43px; height: 43px; flex-basis: 43px; }
    .brand-text strong { font-size: 14px; }
    .brand-text small { font-size: 7px; letter-spacing: .6px; }
    .menu-toggle { display: flex; }
    .header-actions { margin-left: auto; gap: 5px; }
    .call-btn, .whatsapp-btn { width: 37px; min-height: 37px; height: 37px; padding: 0; border-radius: 50%; }
    .call-btn b, .whatsapp-btn b { display: none; }

    .main-nav {
        position: fixed; top: 70px; left: 0; right: 0; width: 100%; max-height: calc(100vh - 70px); max-height: calc(100dvh - 70px);
        display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
        padding: 12px 16px 22px; gap: 0; overflow-x: hidden; overflow-y: auto;
        background: #fff; box-shadow: 0 15px 35px rgba(0,0,0,.1);
        opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-10px);
        transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
    }
    .main-nav.active { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
    .main-nav > a { display: flex; width: 100%; justify-content: flex-start; padding: 13px 10px; border-bottom: 1px solid #edf0f3; font-size: 14px; }
    .main-nav > a::after { display: none; }
    .main-nav > a.active { background: rgba(215,173,69,.10); border-radius: 6px; }
    .nav-item.has-mega { width: 100%; border-bottom: 1px solid #edf0f3; }
    .nav-mega-btn { width: 100%; justify-content: space-between; padding: 13px 10px; font-size: 14px; }
    .mega-panel.mega-panel-columns {
        position: static; inset: auto; width: 100%; max-width: 100%; max-height: none;
        display: block; padding: 8px 10px 14px; margin: 0; transform: none; overflow: visible;
        background: #fff; border: 0; border-radius: 0; box-shadow: none;
    }
    .mega-destination-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
    .mega-destination-column { min-width: 0; }
    .mega-destination-link { min-height: 40px; padding: 9px 2px !important; font-size: 12px !important; }
    .mega-destination-link i { display: none; }
    .mega-featured-clean { gap: 10px; padding: 8px 0 12px; }
    .mega-featured-clean a { font-size: 12px !important; }
}

@media (max-width: 500px) {
    .header-container { padding: 0 10px; gap: 6px; }
    .brand-logo { width: 39px; height: 39px; flex-basis: 39px; }
    .brand-text strong { font-size: 12px; }
    .brand-text small { display: none; }
    .header-actions { gap: 4px; }
    .call-btn, .whatsapp-btn { width: 34px; height: 34px; min-height: 34px; }
    .menu-toggle { width: 38px; height: 38px; flex-basis: 38px; }
    .menu-toggle span { width: 20px; }
    .mega-destination-grid { column-gap: 12px; }
    .mega-destination-link { font-size: 11px !important; line-height: 1.45; }
    .mega-panel.mega-panel-columns { padding-left: 8px; padding-right: 8px; }
}

/* =========================================================
   MOBILE MEGA MENU: SHOW ABOUT 14 PACKAGES, THEN SCROLL
   Two columns x seven visible rows; desktop remains unchanged.
========================================================= */
@media (max-width: 900px) {
    .mega-panel.mega-panel-columns {
        max-height: none;
    }

    .mega-destination-grid {
        /* Seven package rows per column (about 14 links visible). */
        max-height: 294px;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: var(--gold) #f0f2f5;
        align-items: start;
        padding-right: 4px;
    }

    .mega-destination-column {
        align-self: start;
        min-height: 0;
    }

    .mega-destination-link {
        min-height: 40px;
    }

    .mega-destination-grid::-webkit-scrollbar {
        width: 5px;
    }

    .mega-destination-grid::-webkit-scrollbar-track {
        background: #f0f2f5;
        border-radius: 10px;
    }

    .mega-destination-grid::-webkit-scrollbar-thumb {
        background: var(--gold);
        border-radius: 10px;
    }
}

@media (max-width: 420px) {
    .mega-destination-grid {
        max-height: 280px;
    }
}
