/* =====================================================
   MOBILE APP-STYLE NAVIGATION
   End Of Life Memorials
   Drop-in module — does not require changing existing
   navbar/dashboard-header/tabs markup. Injected elements
   are created by mobile-nav.js.
   Include AFTER style.css:
   <link rel="stylesheet" href="/mobile-nav.css">
   ===================================================== */

/* Hamburger button (injected by JS) */
.eol-hamburger {
    display: none;
    position: relative;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    z-index: 220;
    flex-shrink: 0;
}

/* When open, pull hamburger out of the header flow and
   pin it to the top-right of the drawer so the X sits
   neatly above drawer content, not on top of it. */
.eol-hamburger.is-open {
    position: fixed;
    top: 18px;
    right: 18px;
}

.eol-hamburger span {
    display: block;
    position: absolute;
    left: 8px;
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.eol-hamburger span:nth-child(1) { top: 12px; }
.eol-hamburger span:nth-child(2) { top: 19px; }
.eol-hamburger span:nth-child(3) { top: 26px; }

.eol-hamburger.is-open span:nth-child(1) {
    top: 19px;
    transform: rotate(45deg);
}
.eol-hamburger.is-open span:nth-child(2) {
    opacity: 0;
}
.eol-hamburger.is-open span:nth-child(3) {
    top: 19px;
    transform: rotate(-45deg);
}

/* Off-canvas drawer */
.eol-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: min(78vw, 320px);
    background: var(--bg-card, #fff);
    box-shadow: -8px 0 30px rgba(44, 62, 58, 0.18);
    z-index: 210;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 84px var(--space-lg, 24px) var(--space-lg, 24px);
    overflow-y: auto;
}

.eol-drawer.is-open {
    transform: translateX(0);
}

.eol-drawer-label {
    font-family: var(--font-body);
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-soft);
    margin: var(--space-md, 16px) 0 var(--space-sm, 8px);
}

.eol-drawer-label:first-child {
    margin-top: 0;
}

.eol-drawer a.btn,
.eol-drawer a.tab {
    display: block;
    width: 100%;
    text-align: left;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.eol-drawer a.tab {
    padding: 12px 14px;
    border-radius: var(--radius-md, 8px);
    color: var(--text-dark);
    text-decoration: none;
    background: var(--bg-section, #F4F1EB);
    font-family: var(--font-body);
    font-size: 14px;
}

.eol-drawer a.tab.active {
    background: var(--sage-tint, #E9F0EC);
    color: var(--sage-dark, #6B8A7A);
    font-weight: 600;
}

/* Backdrop */
.eol-overlay {
    position: fixed;
    inset: 0;
    background: rgba(44, 62, 58, 0.35);
    backdrop-filter: blur(2px);
    z-index: 205;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.eol-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* Lock background scroll while drawer open */
body.eol-no-scroll {
    overflow: hidden;
}

/* =====================================================
   BREAKPOINT — app-style behaviour under 768px
   ===================================================== */
@media (max-width: 768px) {
    .eol-hamburger {
        display: flex;
    }

    /* Hide the original inline nav actions; they live in the drawer instead */
    .navbar-content > .nav-buttons,
    .dashboard-header-content > .nav-buttons {
        display: none;
    }

    .navbar-content,
    .dashboard-header-content {
        position: relative;
    }

    /* Dashboard tab bar is desktop-only. On mobile/smart devices the
       same sections are reached via the drawer's "Sections" list
       instead, so the tab strip is hidden rather than shown twice. */
    .tabs {
        display: none;
    }

    .dashboard-header-content h1 {
        font-size: 20px;
    }

    .dashboard-header-content p {
        font-size: 13px;
    }

    /* The fixed navbar is shorter on mobile (no nav-buttons,
       just logo + hamburger ≈ 70px). Make sure page content
       below it isn't hidden behind it. */
    .hero {
        padding-top: 140px;
    }

    .lp-hero .wrap {
        padding-top: 100px;
    }

    .dashboard-header {
        margin-top: 70px;
    }
}