/* ── 1. Mobile navigation ─────────────────────────────────── */
.mobile-nav {
    display: block;
    background: rgba(73,108,190,.9);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 2px 12px rgba(0,0,50,.15);
    font-family: Verdana, Geneva, sans-serif;
    font-size: 14px;
    margin-bottom: 5px;
    overflow: hidden;
}

.mobile-nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    float: right;
    margin: 5px 5px 6px;
    padding: 6px 10px;
    background: rgba(255,255,255,.2);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    font-weight: bold;
}
.mobile-nav-btn:hover { background: rgba(255,255,255,.35); }

.mobile-nav-label { text-shadow: 0 1px 3px #000; }

.mobile-nav-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 22px;
}
.mobile-nav-icon span {
    display: block;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
}
.mobile-nav-btn.is-open .mobile-nav-icon span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-nav-btn.is-open .mobile-nav-icon span:nth-child(2) { opacity: 0; }
.mobile-nav-btn.is-open .mobile-nav-icon span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav::after { content: ''; display: table; clear: both; }

.mobile-nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    float: left;
    margin: 6px 0 6px 8px;
    text-decoration: none;
    color: #fff;
    line-height: 1.2;
}
.mobile-nav-brand-logo { border-radius: 3px; flex-shrink: 0; }
.mobile-nav-brand-main {
    display: block;
    font-weight: bold;
    font-size: 13px;
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.mobile-nav-brand-sub {
    display: block;
    font-size: 13px;
    text-shadow: 0 1px 2px rgba(0,0,0,.4);
}

.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    clear: both;
    background: rgba(50,75,160,.55);
}
.mobile-nav-list[aria-hidden="true"] { display: none; }
.mobile-nav-list[aria-hidden="false"] { display: block; }
.mobile-nav-list li { display: block; }
.mobile-nav-list a {
    display: block;
    padding: 6px 12px;
    margin: 2px 5px;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
}
.mobile-nav-list a:hover { background: rgba(255,255,255,.2); color: #fff; }

/* ── 2. Above-the-fold mobile overrides ───────────────────── */
/* Hide desktop header on mobile to prevent brief flash */
#header { display: none; }

/* Mobile content flow: single-column */
#content { width: 100%; margin-top: 0; padding-top: 4px; }
#colOne { display: none; }
#colTwo { float: none; width: 100%; }

/* Hero: mobile aspect ratio so CLS is reserved correctly */
.site-hero { max-width: 390px; margin-top: 0; }
.site-hero .hero-container {
    width: 390px;
    max-width: 100%;
    height: 220px;
    aspect-ratio: 390 / 220;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
    gap: 8px;
    padding: 0;
}
.site-hero .heroimage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

/* Mobile search form visibility (moved here so visible before main CSS) */
.mobile-search-form {
    display: block;
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    margin: 0 auto;
    width: 82%;
    max-width: 82%;
    background: rgba(255,255,255,.95);
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
    font-size: 11px;
    overflow: visible;
    z-index: 50;
}

/* Footer: small padding tweak */
#footer { padding: 14px 10px; }
.one { margin-top: 0; margin-left: 5px; margin-right: 5px; padding-top: 5px; }

/* ── 3. Disable backdrop-filter on mobile ─────────────────────
   `backdrop-filter: blur()` is GPU-expensive on phones and
   hurts INP/scrolling. Opaque fallback looks identical at
   these small sizes. */
.mobile-nav,
.filters,
.sort-button,
.fc8-am.yes,
.desktop_submit-btn,
.site-hero .mobile-search-form,
.msf-filter-panel,
nav[aria-label^="Szűrés"] a,
.site-hero .hero-overlay {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
/* Bump opaqueness slightly where the blur was carrying contrast */
.site-hero .mobile-search-form { background: rgba(255,255,255,.95) !important; }
.msf-filter-panel { background: #fff !important; }
