/* ==========================================================================
   Mobile Menu — concept-image style (slide-in panel, X close, orange accent)
   File path: child-theme/assets/css/mobile-nav.css
   ========================================================================== */

:root {
    --mm-brand:        #FCAF17;
    --mm-brand-hover:  #D26818;
    --mm-text:         #1F2937;
    --mm-text-muted:   #6B7280;
    --mm-section:      #9CA3AF;
    --mm-border:       #E5E7EB;
    --mm-bg:           #FFFFFF;
    --mm-overlay:      rgba(0, 0, 0, 0.45);
    --mm-shadow:       0 10px 30px rgba(0, 0, 0, 0.12);
    --mm-panel-w:      min(86vw, 380px);
    --mm-pad-x:        20px;
}

/* --------------------------------------------------------------------------
   Hamburger button
   -------------------------------------------------------------------------- */
.mm-toggle-btn {
    display: none;
    background: transparent;
    border: 0;
    padding: 16px;
    cursor: pointer;
    color: var(--mm-text);
    border-radius: 8px;
}
.mm-toggle-btn:hover,
.mm-toggle-btn:focus-visible {
    background: #F3F4F6;
    outline: none;
}
.mm-toggle-btn__icon {
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
}
.mm-toggle-btn__icon span {
    display: block;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

/* --------------------------------------------------------------------------
   Overlay backdrop
   -------------------------------------------------------------------------- */
.mm-overlay {
    position: fixed;
    inset: 0;
    background: var(--mm-overlay);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
    z-index: 998;
}
.mm-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* --------------------------------------------------------------------------
   Off-canvas panel
   -------------------------------------------------------------------------- */
.mm {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: var(--mm-panel-w);
    background: var(--mm-bg);
    box-shadow: var(--mm-shadow);
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.16,.84,.44,1);
    z-index: 999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.mm[hidden] { display: none; }
.mm.is-open { transform: translateX(0); }

body.mm-is-open { overflow: hidden; }

/* --------------------------------------------------------------------------
   Header — just the close button
   -------------------------------------------------------------------------- */
.mm__header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 16px var(--mm-pad-x) 8px;
    flex-shrink: 0;
}
.mm__close {
    background: transparent;
    border: 0;
    padding: 8px;
    color: var(--mm-text);
    cursor: pointer;
    border-radius: 8px;
    display: inline-flex;
    transition: background-color .15s ease;
}
.mm__close:hover,
.mm__close:focus-visible {
    background: #F3F4F6;
    outline: none;
}

/* --------------------------------------------------------------------------
   Scrollable menu body
   -------------------------------------------------------------------------- */
.mm__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0 var(--mm-pad-x);
    -webkit-overflow-scrolling: touch;
}
.mm__list,
.mm__submenu {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.mm__list > .mm__item,
.mm__submenu > .mm__item {
    list-style: none;
}

/* --------------------------------------------------------------------------
   Top-level rows
   -------------------------------------------------------------------------- */
.mm__item {
    position: relative;
    border-bottom: 1px solid var(--mm-border);
}
.mm__item:last-child { border-bottom: 0; }

.mm__item--depth-0 > .mm__link {
    display: flex;
    align-items: center;
    padding: 18px 0;
    font-size: 17px;
    font-weight: 500;
    color: var(--mm-text);
    text-decoration: none;
    line-height: 1.3;
    cursor: pointer;
    transition: color .15s ease;
}

/* Active page (current URL) */
.mm__item--depth-0.mm__item--current > .mm__link,
.mm__link--current {
    color: var(--mm-brand);
    font-weight: 600;
}

/* Expanded parent — title turns orange */
.mm__item--has-children.is-expanded > .mm__link {
    color: var(--mm-brand);
    font-weight: 600;
}

.mm__link:hover,
.mm__link:focus-visible {
    color: var(--mm-brand);
    outline: none;
}

/* --------------------------------------------------------------------------
   Submenu toggle button (chevron)
   -------------------------------------------------------------------------- */
.mm__item--has-children {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "link toggle"
        "sub  sub";
    align-items: center;
}
.mm__item--has-children > .mm__link    { grid-area: link; }
.mm__item--has-children > .mm__toggle  { grid-area: toggle; }
.mm__item--has-children > .mm__submenu { grid-area: sub; }

.mm__toggle {
    background: transparent;
    border: 0;
    padding: 12px 0 12px 12px;
    cursor: pointer;
    color: var(--mm-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color .15s ease;
}

/* Chevron also turns orange when expanded or active */
.mm__item--current > .mm__toggle,
.mm__item--has-children.is-expanded > .mm__toggle {
    color: var(--mm-brand);
}

.mm__chevron {
    transition: transform .25s ease;
}
.mm__toggle[aria-expanded="true"] .mm__chevron {
    transform: rotate(180deg);
}

/* --------------------------------------------------------------------------
   Submenu container — collapsed by default
   -------------------------------------------------------------------------- */
.mm__submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
}
.mm__item--has-children.is-expanded > .mm__submenu {
    padding-bottom: 16px;
}

/* --------------------------------------------------------------------------
   Section labels (optional)
   -------------------------------------------------------------------------- */
.mm__item--section {
    border-bottom: 0;
}
.mm__item--section .mm__section-label {
    display: block;
    padding: 16px 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--mm-section);
    letter-spacing: 0.01em;
}
.mm__submenu > .mm__item--section:not(:first-child) .mm__section-label {
    border-top: 1px solid var(--mm-border);
    margin-top: 8px;
    padding-top: 18px;
}

/* --------------------------------------------------------------------------
   Submenu links
   -------------------------------------------------------------------------- */
.mm__submenu .mm__link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 400;
    color: var(--mm-text);
    text-decoration: none;
}
.mm__submenu .mm__item {
    border-bottom: 0;
}

/* Icon placeholders (only used if icon-xxx classes are set) */
.mm__icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.85;
}

/* --------------------------------------------------------------------------
   Footer CTA
   -------------------------------------------------------------------------- */
.mm__footer {
    flex-shrink: 0;
    padding: 16px var(--mm-pad-x) 24px;
    border-top: 1px solid var(--mm-border);
}
.mm__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 20px;
    background: var(--mm-brand);
    color: #fff !important;
    text-decoration: none;
    border-radius: 9999px;
    font-size: 16px;
    font-weight: 600;
    transition: background-color .15s ease, transform .1s ease;
}
.mm__cta:hover,
.mm__cta:focus-visible {
    background: var(--mm-brand-hover);
    outline: none;
}
.mm__cta:active { transform: scale(.98); }

/* --------------------------------------------------------------------------
   Show / hide between mobile and desktop
   -------------------------------------------------------------------------- */
@media (max-width: 1024.98px) {
    .mm-toggle-btn { display: inline-flex; }

    .main-navigation > #primary-menu,
    .main-navigation > .menu {
        display: none !important;
    }

    .menu-toggle#menu-toggle-btn { display: none !important; }
}

@media (min-width: 1025px) {
    .mm-toggle-btn,
    .mm,
    .mm-overlay {
        display: none !important;
    }
}