/* =====================================================================
   LooseMap — Navbar refinements (loaded after the layout's inline <style>)
   - animated gold underline on links
   - "Discover" rich dropdown panel (replaces the old plain "More" menu)
   - pill search + "Write for us" CTA
   - soft shadow once the page is scrolled
   NOTE: no backdrop-filter on the navbar on purpose — it would break the
   position:fixed full-width mega menus.
   ===================================================================== */

.eh-navbar { box-shadow: inset 0 -1px 0 rgba(255,255,255,.06); transition: box-shadow .25s ease; }
.eh-navbar.is-scrolled { box-shadow: inset 0 -1px 0 rgba(255,255,255,.06), 0 10px 28px rgba(0,0,0,.28); }

/* ---------- Links: animated underline ---------- */
.eh-navbar .nav-link { position: relative; transition: color .2s ease; }
@media (min-width: 992px) {
    .eh-navbar .nav-link::before {
        content: ''; position: absolute; left: .5rem; right: .5rem; bottom: .12rem; height: 2px; border-radius: 2px;
        background: var(--eh-gold); transform: scaleX(0); transform-origin: left center; transition: transform .25s ease;
    }
    .eh-navbar .nav-link:hover::before,
    .eh-navbar .nav-link.show::before,
    .eh-navbar .nav-link.text-warning::before { transform: scaleX(1); }
}

/* ---------- Discover panel ---------- */
.eh-dd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.eh-dd-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px;
    color: var(--eh-ink); text-decoration: none; transition: background .2s ease;
}
.eh-dd-item:hover, .eh-dd-item.is-active { background: var(--eh-cream); color: var(--eh-ink); }
.eh-dd-icon {
    flex: 0 0 44px; height: 44px; border-radius: 13px; background: var(--eh-ink); color: var(--eh-gold);
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem;
    transition: background .2s ease, color .2s ease;
}
.eh-dd-item:hover .eh-dd-icon, .eh-dd-item.is-active .eh-dd-icon { background: var(--eh-gold); color: var(--eh-ink); }
.eh-dd-item strong { display: block; font-size: .92rem; line-height: 1.25; }
.eh-dd-item small { display: block; font-size: .74rem; line-height: 1.3; color: #6b7280; }
.eh-dd-foot {
    display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding: 11px 14px;
    border-radius: 14px; background: rgba(217,164,65,.14); color: var(--eh-ink); font-size: .86rem; font-weight: 500; text-decoration: none;
    transition: background .2s ease;
}
.eh-dd-foot:hover { background: var(--eh-gold); color: var(--eh-ink); }

@keyframes ehDdIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (min-width: 992px) {
    .navbar-expand-lg .navbar-nav .dropdown-menu.eh-dd-panel {
        top: calc(100% + 12px); left: 50%; right: auto; margin: 0; transform: translateX(-50%);
        width: 440px; padding: 10px; background: #fff; border: 1px solid rgba(20,32,43,.08); border-radius: 20px;
        box-shadow: 0 24px 48px rgba(10,15,20,.28);
    }
    .navbar-expand-lg .navbar-nav .dropdown-menu.eh-dd-panel.show { animation: ehDdIn .22s ease both; }
    /* invisible bridge so hover isn't lost crossing the gap, plus a small pointer arrow */
    .eh-dd-panel::before { content: ''; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
    .eh-dd-panel::after {
        content: ''; position: absolute; top: -7px; left: 50%; width: 12px; height: 12px; margin-left: -6px;
        background: #fff; border-left: 1px solid rgba(20,32,43,.08); border-top: 1px solid rgba(20,32,43,.08);
        transform: rotate(45deg); border-top-left-radius: 3px;
    }
}

/* ---------- Search pill + CTA ---------- */
.eh-nav-search { position: relative; display: flex; align-items: center; margin: 0; }
.eh-nav-search i { position: absolute; left: 14px; color: var(--eh-gold); font-size: .85rem; pointer-events: none; }
.eh-nav-search input {
    width: 100%; min-width: 0; height: 38px; padding: 0 14px 0 36px; border-radius: 50px; font-size: .88rem; color: #fff;
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); -webkit-appearance: none; appearance: none;
    transition: width .25s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.eh-nav-search input::placeholder { color: #9fb0bf; }
.eh-nav-search input:focus { outline: none; background: rgba(255,255,255,.14); border-color: var(--eh-gold); box-shadow: 0 0 0 .2rem rgba(217,164,65,.2); }

.eh-nav-cta {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem; height: 38px; padding: 0 1.1rem;
    border-radius: 50px; background: var(--eh-gold); color: var(--eh-ink) !important; font-weight: 600; font-size: .86rem;
    text-decoration: none; white-space: nowrap; transition: transform .2s ease, box-shadow .2s ease;
}
.eh-nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(217,164,65,.35); }

@media (min-width: 992px) {
    .eh-nav-search { width: 150px; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* tight width: CTA collapses to an icon button */
    .eh-nav-cta { width: 38px; padding: 0; }
    .eh-nav-cta span { display: none; }
}
@media (min-width: 1200px) {
    .eh-nav-search { width: 210px; }
    .eh-nav-search:focus-within { width: 250px; }
}

/* ---------- Mobile (collapsed menu) ---------- */
@media (max-width: 991.98px) {
    .eh-nav-right { margin-top: 1rem; padding-bottom: .5rem; }
    .eh-nav-search { width: 100%; }
    .eh-nav-cta { width: 100%; }

    .eh-dd-grid { grid-template-columns: 1fr; gap: 2px; }
    .navbar-collapse .eh-dd-panel { padding: .5rem; }
    .navbar-collapse .eh-dd-item { color: #fff; }
    .navbar-collapse .eh-dd-item:hover, .navbar-collapse .eh-dd-item.is-active { background: rgba(255,255,255,.08); color: var(--eh-gold); }
    .navbar-collapse .eh-dd-icon { background: rgba(255,255,255,.1); }
    .navbar-collapse .eh-dd-item small { color: #a9b3bf; }
    .navbar-collapse .eh-dd-foot { background: rgba(217,164,65,.16); color: #fff; }
}

/* =====================================================================
   MEGA MENUS (Explore / Popular Cities) — dark panel + blurred photo backdrop
   ===================================================================== */
.eh-navbar .nav-link:focus { outline: none; box-shadow: none; }
.eh-navbar .nav-link:focus-visible { outline: 2px solid var(--eh-gold); outline-offset: 2px; border-radius: 8px; box-shadow: none; }

.dropdown-menu.eh-mega-full.mg-panel {
    background: var(--eh-ink); padding: 1.75rem 0 2rem; overflow: hidden;
    border-top: 1px solid rgba(255,255,255,.06);
}
/* blurred photo behind everything, then a dark gradient so text always reads */
.mg-bg { position: absolute; inset: -60px; background: var(--mg-bg, none) center/cover no-repeat; filter: blur(34px) saturate(1.35); opacity: .42; pointer-events: none; }
.mg-panel::before { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(100deg, rgba(20,32,43,.96) 0%, rgba(20,32,43,.76) 50%, rgba(20,32,43,.94) 100%); }
.mg-inner { position: relative; z-index: 1; }
.mg-panel.show .mg-inner { animation: ehMegaIn .28s ease both; }
@keyframes ehMegaIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.eh-mega-full.mg-panel h6 { color: var(--eh-gold); font-size: .72rem; letter-spacing: .16em; margin-bottom: .9rem; }
.mg-panel .eh-mega-viewall { margin-top: 1rem; }

.mg-grid { display: grid; grid-template-columns: 240px 1fr 240px; gap: 2rem; align-items: stretch; }
.mg-grid.mg-no-right { grid-template-columns: 240px 1fr; }

/* featured photo cards */
.eh-mega-full .mg-banner { aspect-ratio: auto; min-height: 320px; height: 100%; border-radius: 18px; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 16px 36px rgba(0,0,0,.35); }
.eh-mega-full .mg-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mg-cap {
    position: absolute; left: 10px; right: 10px; bottom: 10px; padding: .65rem .85rem; border-radius: 14px;
    background: rgba(10,15,20,.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: flex; flex-direction: column; gap: .1rem;
}
.mg-cap-eyebrow { font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--eh-gold); font-weight: 700; }
.mg-cap strong { font-size: .92rem; font-weight: 600; color: #fff; }
.mg-cap strong i { display: inline-block; transition: transform .2s ease; }
.mg-banner:hover .mg-cap strong i { transform: translateX(4px); }
.mg-cap small { font-size: .74rem; color: #b9c5d1; }

/* Explore: states + discover + trending chips */
.mg-cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 2rem; }
.mg-states { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.mg-state {
    display: flex; align-items: center; gap: .5rem; padding: .55rem .8rem; border-radius: 12px;
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
    color: #e7edf3; text-decoration: none; font-size: .9rem; transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.mg-state i { color: var(--eh-gold); font-size: .78rem; }
.mg-state:hover { background: rgba(217,164,65,.18); border-color: rgba(217,164,65,.5); color: #fff; transform: translateX(3px); }

.mg-disc { display: grid; gap: .35rem; }
.mg-disc-item { display: flex; align-items: center; gap: .75rem; padding: .5rem .6rem; border-radius: 14px; color: #fff; text-decoration: none; transition: background .2s ease; }
.mg-disc-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.mg-disc-icon { flex: 0 0 38px; height: 38px; border-radius: 11px; background: rgba(217,164,65,.16); color: var(--eh-gold); display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; transition: background .2s ease, color .2s ease; }
.mg-disc-item:hover .mg-disc-icon { background: var(--eh-gold); color: var(--eh-ink); }
.mg-disc-item strong { display: block; font-size: .9rem; font-weight: 600; line-height: 1.2; }
.mg-disc-item small { display: block; font-size: .72rem; color: #9fb0bf; }

.mg-trend { margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px solid rgba(255,255,255,.1); }
.mg-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.mg-chips a { padding: .3rem .85rem; border-radius: 50px; font-size: .82rem; color: #e7edf3; border: 1px solid rgba(255,255,255,.16); text-decoration: none; transition: all .2s ease; }
.mg-chips a:hover { background: var(--eh-gold); border-color: var(--eh-gold); color: var(--eh-ink); }
.mg-chips a.is-more { border-style: dashed; color: var(--eh-gold); }
.mg-chips a.is-more:hover { color: var(--eh-ink); }

/* Popular Cities: tiles with round photo avatars */
.mg-cities { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem .75rem; }
@media (min-width: 1200px) { .mg-cities { grid-template-columns: repeat(3, 1fr); } }
.mg-city {
    display: flex; align-items: center; gap: .7rem; padding: .5rem .65rem; border-radius: 14px;
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); color: #fff; text-decoration: none;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.mg-city:hover { background: rgba(217,164,65,.18); border-color: rgba(217,164,65,.5); color: #fff; transform: translateY(-2px); }
.mg-city-av { flex: 0 0 42px; height: 42px; border-radius: 50%; background-size: cover; background-position: center; border: 2px solid rgba(255,255,255,.22); display: inline-flex; align-items: center; justify-content: center; font-family: 'Playfair Display', serif; font-weight: 700; color: #fff; }
.mg-city strong { display: block; font-size: .9rem; font-weight: 600; line-height: 1.2; }
.mg-city small { display: block; font-size: .72rem; color: #9fb0bf; }

/* ---------- Mobile: simple stacked list inside the collapsed menu ---------- */
@media (max-width: 991.98px) {
    .mg-bg, .mg-panel::before { display: none; }
    .dropdown-menu.eh-mega-full.mg-panel { padding: .9rem 0; background: #1c2b38; }
    .mg-panel.show .mg-inner { animation: none; }
    .mg-grid, .mg-grid.mg-no-right { display: block; }
    .mg-cols { grid-template-columns: 1fr; gap: 1rem; }
    .mg-cities { grid-template-columns: 1fr 1fr; }
    .mg-trend { margin-top: 1rem; }
}