/* ═══════════════════════════════════════════════════════════
   Summerland Mega Menu — Frontend v3
   Matches new class-menu-renderer.php HTML structure
   ═══════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Custom Properties ─────────────────────────────────────── */
:root {
    --smm-primary:      #10847E;
    --smm-hover-bg:     rgba(16, 132, 126, 0.12);
    --smm-text:         #222222;
    --smm-hover-text:   #10847E;
    --smm-radius:       40px;
    --smm-font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --smm-bg:           #ffffff;
    --smm-dropdown-bg:  #ffffff;
    --smm-dropdown-shadow: 0 8px 32px rgba(0,0,0,0.10);
    --smm-mobile-breakpoint: 992px;
}

/* ── Nav Bar Shell ─────────────────────────────────────────── */
.smm-bar {
    width: 100%;
    background: var(--smm-bg);
    position: relative;        /* anchor for absolute dropdowns */
    z-index: 9000;
    box-sizing: border-box;
    /* NO border-bottom — dropdown appears seamlessly below */
}

/* ── Desktop Nav: <nav class="smm-nav"> ────────────────────── */
.smm-nav {
    display: block;
    margin: 0;
    padding: 0;
}

/* ── Nav List: <ul class="smm-nav-list"> ── THE KEY FIX ────── */
.smm-nav-list {
    display: flex;              /* ← horizontal row */
    align-items: center;
    flex-wrap: nowrap;
    list-style: none;
    margin: 0;
    padding: 0 16px;
    gap: 0;
}

/* ── Top-level Item: <li class="smm-item"> ─────────────────── */
.smm-item {
    position: static;
    list-style: none;
    flex-shrink: 0;
}

/* ── Nav Link: <a class="smm-link"> ───────────────────────── */
.smm-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 12px;
    border-radius: var(--smm-radius);
    font-family: var(--smm-font);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--smm-text) !important;
    text-decoration: none !important;
    white-space: nowrap;
    position: relative;
    transition: color 0.2s ease, background-color 0.2s ease;
    line-height: 1;
}

/* Pill hover pseudo-element */
.smm-link::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--smm-radius);
    background-color: var(--smm-primary);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}
.smm-link-text { position: relative; z-index: 1; }

/* Hide icons on desktop; hide dropdown arrow */
.smm-nav .smm-item-icon { display: none !important; }
.smm-arrow { display: none !important; }

/* ── Hover & active: teal pill ─────────────────────────────── */
.smm-item:hover > .smm-link::before,
.smm-item.smm-current > .smm-link::before { opacity: 0.15; }
.smm-item:hover > .smm-link,
.smm-item.smm-current > .smm-link { color: var(--smm-hover-text) !important; }

/* ── Simple Dropdown: <ul class="smm-dropdown"> ────────────── */
.smm-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: auto;
    min-width: 220px;
    background: var(--smm-dropdown-bg);
    border-radius: 12px;
    box-shadow: var(--smm-dropdown-shadow);
    border: 1px solid #f0f0f0;
    z-index: 9999;
    list-style: none;
    margin: 4px 0 0;
    padding: 8px 0;
}
.smm-has-dropdown:hover > .smm-dropdown { display: block; }
.smm-dropdown-item { list-style: none; }
.smm-dropdown-link {
    display: block;
    padding: 9px 18px;
    font-family: var(--smm-font);
    font-size: 13px;
    font-weight: 400;
    color: #444 !important;
    text-decoration: none !important;
    transition: color 0.15s, background 0.15s;
}
.smm-dropdown-link:hover { color: var(--smm-primary) !important; background: var(--smm-hover-bg); }

/* ── Mega Dropdown ─────────────────────────────────────── */
.smm-mega-dropdown {
    display: none;
    position: fixed;           /* break out of any Elementor container */
    left: 0;
    right: 0;
    /* top is set dynamically by JS */
    background: #ffffff;
    border-bottom: 1px solid #eeeeee;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    z-index: 99999;
}
/* JS adds .smm-open to show */
.smm-mega-dropdown.smm-open { display: block; }
/* Remove old CSS-only hover rule — handled by JS now */

/* ── Page overlay (grey dim behind mega dropdown) ───────────── */
.smm-page-overlay {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.32);
    z-index: 8998;   /* below nav (9000) and dropdown (9999), above page */
    pointer-events: none;
    /* top is set dynamically by JS to sit below the nav bar */
}
.smm-page-overlay.smm-overlay-visible { display: block; }

.smm-mega-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 28px 30px 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 0 40px;
}
.smm-mega-column { min-width: 180px; flex: 1; padding: 0 8px 12px 0; }

/* Column heading */
.smm-mega-heading,
.smm-mega-heading-link {
    display: block;
    font-family: var(--smm-font) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: #1a1a1a !important;
    margin: 0 0 12px !important;
    padding: 0 0 8px !important;
    text-decoration: none !important;
}
.smm-mega-heading-link:hover { color: var(--smm-primary) !important; }

/* Column links */
.smm-mega-links { list-style: none; margin: 0; padding: 0; }
.smm-mega-link-item { list-style: none; margin: 0; padding: 0; }
.smm-mega-link {
    display: block;
    font-family: var(--smm-font) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #444 !important;
    text-decoration: none !important;
    padding: 4px 0 !important;
    transition: color 0.15s !important;
    line-height: 1.5 !important;
}
.smm-mega-link:hover { color: var(--smm-primary) !important; }

/* ── Mobile Toggle (hidden desktop) ───────────────────────── */
.smm-mobile-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 14px;
    font-family: var(--smm-font);
    font-size: 13px;
    font-weight: 600;
    color: var(--smm-text);
    cursor: pointer;
    margin: 8px 16px;
}
.smm-hamburger { display: flex; flex-direction: column; gap: 4px; }
.smm-hamburger span { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }

/* ── Mobile Panel ──────────────────────────────────────────── */
.smm-mobile-panel {
    display: block;
    position: fixed;
    top: 0; left: 0;
    width: 85%;
    max-width: 340px;
    height: 100%;
    background: #fff;
    z-index: 99999;
    overflow-y: auto;
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.smm-mobile-panel.smm-panel-open { transform: translateX(0); }
.smm-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky; top: 0; background: #fff; z-index: 1;
}
.smm-mobile-title { font-family: var(--smm-font); font-size: 15px; font-weight: 700; color: #1a1a1a; }
.smm-mobile-close { background: none; border: none; cursor: pointer; color: #666; padding: 4px; border-radius: 6px; display: flex; }
.smm-mobile-body { padding: 8px 0; }

/* Mobile items */
.smm-mob-item { border-bottom: 1px solid #f5f5f5; }
.smm-mob-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    cursor: pointer;
}
/* Both <a class="smm-mob-label"> and plain anchors */
.smm-mob-label,
.smm-mob-top a {
    flex: 1;
    font-family: var(--smm-font);
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a !important;
    text-decoration: none !important;
}
.smm-mob-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    background: rgba(16, 132, 126, 0.10);
    border-radius: 10px;
    flex-shrink: 0;
    color: var(--smm-primary);
}
.smm-mob-icon svg { width: 20px; height: 20px; stroke: var(--smm-primary); }
.smm-mob-toggle {
    background: none; border: none;
    cursor: pointer; padding: 4px;
    color: #999;
    display: flex; align-items: center;
    transition: transform 0.2s;
}
.smm-mob-toggle.open { transform: rotate(180deg); }
.smm-mob-cols { display: none; padding: 0 0 8px; }
.smm-mob-cols.open { display: block; }
.smm-mob-col-heading {
    font-family: var(--smm-font);
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--smm-primary);
    padding: 10px 20px 4px;
}
.smm-mob-col-link {
    display: block;
    font-family: var(--smm-font);
    font-size: 13px; color: #555;
    padding: 6px 28px;
    text-decoration: none;
}
.smm-mob-col-link:hover { color: var(--smm-primary); }

/* Overlay */
.smm-mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 99998; }
.smm-mobile-overlay.smm-overlay-open { display: block; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 992px) {
    .smm-nav    { display: none; }
    .smm-mobile-toggle { display: flex; }
}
@media (min-width: 993px) {
    .smm-mobile-toggle { display: none !important; }
    .smm-mobile-panel,
    .smm-mobile-overlay { display: none !important; }
    .smm-mobile-panel.smm-panel-open { display: block !important; }
}
