/* ==========================================================
   _MOBILE.CSS
   ========================================================== */

/* ── OVERLAY — gäller alla skärmstorlekar ─────────────────────────────── */
.slideout-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    visibility: hidden;
    z-index: 9000;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.slideout-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ── SLIDE-OUT MENY — gäller alla skärmstorlekar ─────────────────────── */
.slideout-navigation {
    position: fixed;
    top: 0; right: 0;
    width: 100%; max-width: 420px;
    height: 100vh;
    background: #efefef;
    z-index: 99999;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(.2,.8,.2,1), visibility 0s linear 0.4s;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}
.slideout-navigation.is-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.4s cubic-bezier(.2,.8,.2,1), visibility 0s;
}
.inside-navigation {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 24px 32px 40px;
    box-sizing: border-box;
    overflow-y: auto;
    position: relative;
}

/* ── STÄNGKNAPP ───────────────────────────────────────────────────────── */
.studiokl-close-btn {
    position: absolute;
    top: 15px; right: 15px;
    z-index: 100000;
    padding: 10px;
    border-radius: 10px;
    background: rgba(239,239,239,0.2);
    backdrop-filter: blur(6px);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease 0.3s;
}
.slideout-navigation.is-open .studiokl-close-btn { opacity: 1; }
.studiokl-close-btn svg { width: 24px; height: 24px; color: #000; }

/* ── LOGOTYP I MENYN ─────────────────────────────────────────────────── */
.off-canvas-logo { margin-bottom: 48px; padding-top: 8px; }
.off-canvas-logo img { max-width: 80px; }

/* ── MENY-LISTA ──────────────────────────────────────────────────────── */
.mobile-menu-list { list-style: none; margin: 0; padding: 0; }
.mobile-menu-list li a {
    display: block;
    padding: 12px 0;
    color: #000 !important;
    font-size: 20px;
    font-family: var(--font-display);
    text-decoration: none;
    transition: opacity 0.2s ease;
}
.mobile-menu-list li a:hover { opacity: 0.55; }

/* Aktiv/nuvarande sida */
.mobile-menu-list .current-menu-item > a,
.mobile-menu-list .current-menu-ancestor > a,
.mobile-menu-list .current_page_item > a {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.sub-menu { display: none; padding-left: 15px; }
.sf-dropdown-open > .sub-menu { display: block; }

/* ── DÖLJ HAMBURGAREN NÄR MENYN ÄR ÖPPEN ────────────────────────────── */
.mobile-menu-open .menu-toggle { opacity: 0 !important; pointer-events: none !important; }


/* ==========================================================
   MOBILSPECIFIKA OVERRIDES  (max 767px)
   ========================================================== */
@media (max-width: 767px) {
    :root { --padding-x: 16px; }

    html, body { overflow-x: hidden !important; }

    .header-inner {
        height: auto !important;
        padding: 15px var(--padding-x) !important;
        flex-wrap: nowrap;
    }
    .site-logo img { max-height: 50px !important; }

    /* Dölj desktop-nav, visa hamburgare */
    .main-navigation { display: none !important; }
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: fixed !important;
        top: 15px; right: 15px;
        z-index: 9500;
        padding: 10px;
        border-radius: 10px;
        background: rgba(239,239,239,0.2) !important;
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        border: none;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        transition: opacity 0.2s ease;
    }
    .menu-toggle svg { width: 24px; height: 24px; display: block; color: #000; }

    .inside-navigation { padding: 20px var(--padding-x) 30px; }
}