/* ==========================================================
   HAMASTA MEDIA — mobile menu (includes/mobile-menu.php)
   ========================================================== */

/* ── Hamburger button (lines are added by the menu script) ── */
.hamburger-btn.hmm-burger {
    position: relative; width: 44px !important; height: 44px !important; padding: 0 !important;
    border-radius: 14px !important; border: 1px solid rgba(15, 23, 42, 0.08) !important;
    background: #fff !important; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .15s;
    -webkit-tap-highlight-color: transparent;
}
.hamburger-btn.hmm-burger:hover { border-color: rgba(128, 0, 0, 0.25) !important; box-shadow: 0 6px 18px rgba(128, 0, 0, 0.12); }
.hamburger-btn.hmm-burger:active { transform: scale(.94); }
.hamburger-btn.hmm-burger span {
    display: block; height: 2px; border-radius: 2px; background: #1c1f26;
    transition: transform .3s cubic-bezier(.6,0,.2,1), opacity .2s, width .3s;
}
.hamburger-btn.hmm-burger span:nth-child(1) { width: 20px; }
.hamburger-btn.hmm-burger span:nth-child(2) { width: 14px; margin-left: 6px; background: #800000; }
.hamburger-btn.hmm-burger span:nth-child(3) { width: 20px; }
.hamburger-btn.hmm-burger:hover span:nth-child(2) { width: 20px; margin-left: 0; }
.hamburger-btn.hmm-burger:focus-visible { outline: 2px solid #800000; outline-offset: 3px; }

/* ── Scrim + panel ── */
.hmm-scrim {
    position: fixed; inset: 0; z-index: 3000;
    background: rgba(10, 12, 18, 0.45);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    opacity: 0; transition: opacity .3s ease;
}
.hmm-scrim[hidden] { display: none; }
.hmm {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 3001;
    width: min(88vw, 400px);
    display: flex; flex-direction: column;
    background:
        radial-gradient(420px 220px at 100% 0%, rgba(128, 0, 0, 0.07), transparent 70%),
        #fbfaf9;
    color: #1c1f26;
    font-family: 'Outfit', 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
    box-shadow: -24px 0 60px rgba(10, 12, 18, 0.22);
    border-radius: 24px 0 0 24px;
    transform: translateX(105%);
    transition: transform .42s cubic-bezier(.22, .9, .25, 1);
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    visibility: hidden;
}
html.hmm-open .hmm-scrim { opacity: 1; }
html.hmm-open .hmm { transform: none; visibility: visible; }
html.hmm-open, html.hmm-open body { overflow: hidden; }
.hmm a { text-decoration: none; color: inherit; }

/* Header */
.hmm-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 18px 14px 20px; }
.hmm-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hmm-brand img { width: 40px; height: 40px; border-radius: 12px; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.hmm-brand strong { display: block; font-size: 16px; font-weight: 800; letter-spacing: .3px; color: #0b7fc0; line-height: 1.1; }
.hmm-brand strong em { font-style: normal; color: #be1622; }
.hmm-brand small { display: block; font-size: 10.5px; color: #8a8f99; font-weight: 600; margin-top: 2px; white-space: nowrap; }
.hmm-close {
    position: relative; width: 42px; height: 42px; flex: none; border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.08); background: #fff; cursor: pointer;
    transition: transform .25s, background .2s;
}
.hmm-close span { position: absolute; left: 50%; top: 50%; width: 16px; height: 2px; border-radius: 2px; background: #1c1f26; }
.hmm-close span:first-child { transform: translate(-50%, -50%) rotate(45deg); }
.hmm-close span:last-child { transform: translate(-50%, -50%) rotate(-45deg); }
.hmm-close:hover { background: #800000; transform: rotate(90deg); }
.hmm-close:hover span { background: #fff; }

/* Scrollable body */
.hmm-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 18px 18px; -webkit-overflow-scrolling: touch; }

.hmm-search { position: relative; margin: 2px 0 16px; }
.hmm-search i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #9aa0aa; font-size: 14px; pointer-events: none; }
.hmm-search input {
    width: 100%; height: 48px; padding: 0 16px 0 42px; border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.09); background: #fff; color: #1c1f26;
    font: inherit; font-size: 15px; outline: none; transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none; appearance: none;
}
.hmm-search input:focus { border-color: #800000; box-shadow: 0 0 0 4px rgba(128, 0, 0, 0.1); }

/* Links */
.hmm-nav { display: flex; flex-direction: column; gap: 2px; }
.hmm-link {
    width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 12px; border-radius: 14px;
    background: none; border: 0; font: inherit; font-size: 16.5px; font-weight: 600; color: #1c1f26; text-align: left; cursor: pointer;
    transition: background .2s, color .2s;
}
.hmm-link i {
    width: 38px; height: 38px; flex: none; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid rgba(15, 23, 42, 0.06); color: #6b7280; font-size: 15px;
    transition: background .2s, color .2s, border-color .2s;
}
.hmm-link span { flex: 1; }
.hmm-link:hover, .hmm-link:focus-visible { background: rgba(128, 0, 0, 0.05); outline: none; }
.hmm-link:hover i { color: #800000; }
.hmm-link.is-active { color: #800000; }
.hmm-link.is-active i { background: #800000; border-color: #800000; color: #fff; box-shadow: 0 6px 14px rgba(128, 0, 0, 0.25); }
.hmm-tag { font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #15803d; background: #dcfce7; padding: 3px 8px; border-radius: 20px; }
.hmm-caret {
    width: 9px; height: 9px; border-right: 2px solid #9aa0aa; border-bottom: 2px solid #9aa0aa;
    transform: rotate(45deg) translate(-2px, -2px); transition: transform .3s; margin-right: 6px;
}
.hmm-group.is-open .hmm-caret { transform: rotate(-135deg) translate(-2px, -2px); border-color: #800000; }

/* Accordion */
.hmm-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s ease; }
.hmm-sub > * { overflow: hidden; }
.hmm-group.is-open .hmm-sub { grid-template-rows: 1fr; }
.hmm-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 6px 0 64px; }
.hmm-group.is-open .hmm-chips { padding-top: 4px; padding-bottom: 12px; }
.hmm-chip {
    padding: 8px 13px; border-radius: 30px; font-size: 13px; font-weight: 600; color: #374151;
    background: #fff; border: 1px solid rgba(15, 23, 42, 0.09); transition: all .2s;
}
.hmm-chip:hover { border-color: #800000; color: #800000; }
.hmm-chip.is-active { background: #800000; border-color: #800000; color: #fff; }
.hmm-sublist { list-style: none; margin: 0; padding: 0 6px 0 64px; }
.hmm-group.is-open .hmm-sublist { padding-top: 2px; padding-bottom: 10px; }
.hmm-sublist a { display: block; padding: 9px 0; font-size: 14.5px; font-weight: 500; color: #4b5563; border-bottom: 1px dashed rgba(15, 23, 42, 0.08); }
.hmm-sublist li:last-child a { border-bottom: 0; }
.hmm-sublist a:hover { color: #800000; }

/* Calls to action */
.hmm-cta { display: grid; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(15, 23, 42, 0.07); }
.hmm-account { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.hmm-btn {
    display: flex; align-items: center; justify-content: center; gap: 9px; height: 50px; border-radius: 14px;
    font-size: 15px; font-weight: 700; transition: transform .15s, box-shadow .2s, background .2s;
}
.hmm-btn:active { transform: scale(.98); }
.hmm-btn-primary { background: linear-gradient(135deg, #800000, #b0121f); color: #fff !important; box-shadow: 0 10px 24px rgba(128, 0, 0, 0.28); }
.hmm-btn-ghost { background: #fff; color: #800000 !important; border: 1.5px solid rgba(128, 0, 0, 0.35); }
.hmm-btn-soft { background: rgba(15, 23, 42, 0.04); color: #1c1f26 !important; font-size: 14px; height: 46px; }
.hmm-me {
    grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px;
    background: #fff; border: 1px solid rgba(15, 23, 42, 0.08);
}
.hmm-avatar { width: 40px; height: 40px; border-radius: 50%; background: #800000; color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.hmm-me span:nth-child(2) { flex: 1; min-width: 0; }
.hmm-me strong { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hmm-me small { font-size: 12px; color: #8a8f99; }
.hmm-me > i { color: #800000; }

/* Footer */
.hmm-foot { padding: 14px 20px 18px; border-top: 1px solid rgba(15, 23, 42, 0.07); display: flex; align-items: center; justify-content: center; }
.hmm-social { flex-wrap: wrap; justify-content: center; }
.hmm-social { display: flex; gap: 6px; }
.hmm-social a {
    width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    color: #4b5563; background: #fff; border: 1px solid rgba(15, 23, 42, 0.08); font-size: 14px; transition: all .2s;
}
.hmm-social a:hover { background: #800000; border-color: #800000; color: #fff; }
.hmm-foot p { margin: 0; font-size: 11px; color: #9aa0aa; white-space: nowrap; }

/* Staggered entrance */
.hmm .hmm-search, .hmm .hmm-nav > *, .hmm .hmm-cta, .hmm .hmm-account { opacity: 0; transform: translateX(18px); transition: opacity .35s ease, transform .45s cubic-bezier(.22,.9,.25,1); }
html.hmm-open .hmm .hmm-search, html.hmm-open .hmm .hmm-nav > *, html.hmm-open .hmm .hmm-cta, html.hmm-open .hmm .hmm-account { opacity: 1; transform: none; }
html.hmm-open .hmm .hmm-search { transition-delay: .08s; }
html.hmm-open .hmm .hmm-nav > *:nth-child(1) { transition-delay: .11s; }
html.hmm-open .hmm .hmm-nav > *:nth-child(2) { transition-delay: .14s; }
html.hmm-open .hmm .hmm-nav > *:nth-child(3) { transition-delay: .17s; }
html.hmm-open .hmm .hmm-nav > *:nth-child(4) { transition-delay: .20s; }
html.hmm-open .hmm .hmm-nav > *:nth-child(5) { transition-delay: .23s; }
html.hmm-open .hmm .hmm-nav > *:nth-child(6) { transition-delay: .26s; }
html.hmm-open .hmm .hmm-nav > *:nth-child(7) { transition-delay: .29s; }
html.hmm-open .hmm .hmm-cta { transition-delay: .32s; }
html.hmm-open .hmm .hmm-account { transition-delay: .35s; }

@media (max-width: 360px) {
    .hmm-account { grid-template-columns: 1fr; }
    .hmm-foot { flex-direction: column; }
}
@media (min-width: 992px) { .hmm, .hmm-scrim { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
    .hmm, .hmm-scrim, .hmm *, .hamburger-btn.hmm-burger span { transition: none !important; }
}
