/* Scroll-anchoring kikapcsolása ezen a publikus nézeten: a fejléc magasságának
   változása ne tolja vissza a dokumentum scroll pozícióját, ne legyen ciklus. */
html {
    overflow-anchor: none;
}

/* MIKSZ – eredeti graffiti emblémára épített, görgetésre zsugorodó fejléc.
   Nincs fekete logókártya: a háttér a weboldal világos alapszíne. */
.site-header.miksz-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 250, 242, .97);
    border-bottom: 1px solid rgba(105, 82, 60, .16);
    box-shadow: 0 8px 24px rgba(49, 37, 28, .045);
    transition: box-shadow .25s ease, background-color .25s ease;
    isolation: isolate;
}

.site-header.miksz-header .nav-enhanced {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    width: min(calc(100% - 32px), 1320px);
    height: clamp(440px, 44vw, 530px);
    min-height: 0;
    gap: 0;
    padding: 12px 0 16px;
    transition: height .3s cubic-bezier(.2,.7,.2,1), padding .3s ease;
}

.site-header.miksz-header .brand-with-logo {
    position: absolute;
    inset: 4px 0 auto;
    z-index: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: none;
    height: calc(100% - 110px);
    flex: 0 0 auto;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    line-height: 0;
}

.site-header.miksz-header .brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.site-header.miksz-header .brand-mark img {
    display: block;
    width: min(100%, 1160px);
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
    transition: width .3s ease, max-height .3s ease;
}

/* A navigáció *a logós felületen* helyezkedik el, nem külön fejlécsorban. */
.site-header.miksz-header .public-menu {
    position: relative;
    z-index: 3;
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 6px;
    padding: 10px;
    margin: 0;
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 21px;
    background: linear-gradient(115deg, rgba(255,251,245,.85), rgba(255,255,255,.73));
    box-shadow: 0 12px 34px rgba(35, 24, 14, .12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.site-header.miksz-header .public-menu .top-link,
.site-header.miksz-header .public-menu .menu-group-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    width: auto;
    padding: 9px 13px;
    border: 1px solid rgba(118, 94, 74, .14);
    border-radius: 12px;
    background: rgba(255,255,255,.86);
    box-shadow: 0 3px 9px rgba(42,30,20,.05);
    color: #3d332d;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.site-header.miksz-header .public-menu .top-link:hover,
.site-header.miksz-header .public-menu .top-link.is-active,
.site-header.miksz-header .public-menu .menu-group-toggle:hover,
.site-header.miksz-header .public-menu .menu-group-toggle.is-active {
    transform: translateY(-2px);
    background: #fff;
    border-color: rgba(120, 88, 49, .3);
    box-shadow: 0 6px 14px rgba(42,30,20,.12);
}

.site-header.miksz-header .public-menu .menu-group {
    padding-bottom: 0;
}

.site-header.miksz-header .public-menu .menu-dropdown {
    z-index: 110;
    background: #fffcf7;
    box-shadow: 0 18px 40px rgba(35,24,14,.18);
}

@media (min-width: 961px) {
    .site-header.miksz-header .public-menu .menu-group:focus-within .menu-dropdown {
        display: block;
        opacity: 1;
        visibility: visible;
    }
}

.site-header.miksz-header .header-session.public-header-session {
    width: auto;
    margin: 0 0 0 3px;
    padding: 0;
    border: 0;
    flex: 0 0 auto;
}

.site-header.miksz-header .account-toggle-fancy {
    min-height: 43px;
    padding: 4px 9px 4px 5px;
    border-radius: 13px;
    background: rgba(255,255,255,.95);
}

.site-header.miksz-header .account-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

.site-header.miksz-header .menu-toggle {
    z-index: 5;
}

/* Csukott, tapadó fejléc lefelé görgetve. */
.site-header.miksz-header.is-compact {
    background: rgba(255,250,242,.98);
    box-shadow: 0 9px 27px rgba(35,24,14,.13);
}

.site-header.miksz-header.is-compact .nav-enhanced {
    height: 76px;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
}

.site-header.miksz-header.is-compact .brand-with-logo {
    position: relative;
    inset: auto;
    width: 124px;
    height: 64px;
    flex: 0 0 124px;
}

.site-header.miksz-header.is-compact .brand-mark img {
    width: 124px;
    height: 64px;
    max-height: 64px;
}

.site-header.miksz-header.is-compact .public-menu {
    flex: 1 1 auto;
    width: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    min-width: 0;
    padding: 0;
    gap: 3px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.site-header.miksz-header.is-compact .public-menu .top-link,
.site-header.miksz-header.is-compact .public-menu .menu-group-toggle {
    min-height: 37px;
    padding: 6px 8px;
    border-radius: 10px;
    font-size: clamp(10px, .86vw, 12px);
}

.site-header.miksz-header.is-compact .menu-group-toggle::after {
    margin-left: 4px;
}

.site-header.miksz-header.is-compact .header-session.public-header-session {
    margin-left: 2px;
}

.site-header.miksz-header.is-compact .account-toggle-fancy {
    min-height: 37px;
    padding: 2px 3px;
    gap: 0;
}

.site-header.miksz-header.is-compact .account-avatar {
    width: 32px;
    height: 32px;
}

.site-header.miksz-header.is-compact .account-user-lines,
.site-header.miksz-header.is-compact .account-points-pill {
    display: none;
}

/* Tableten/telefonon a navigáció nyitható panel, kompakt állapotban is. */
@media (max-width: 960px) {
    .site-header.miksz-header .nav-enhanced {
        height: clamp(210px, 45vw, 305px);
        flex-direction: row;
        justify-content: flex-end;
        align-items: flex-end;
        padding: 9px 0 12px;
    }

    .site-header.miksz-header .brand-with-logo {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        flex: 0 0 auto;
    }

    .site-header.miksz-header .brand-mark img {
        width: min(100%, 660px);
        height: 100%;
        max-height: 100%;
    }

    .site-header.miksz-header .menu-toggle {
        position: relative;
        display: inline-flex;
        justify-content: center;
        align-items: center;
        margin-left: auto;
        border-color: rgba(120,99,72,.25);
        background: rgba(255,255,255,.96);
        box-shadow: 0 5px 14px rgba(35,24,14,.11);
    }

    .site-header.miksz-header .public-menu,
    .site-header.miksz-header.is-compact .public-menu {
        position: absolute;
        top: calc(100% - 1px);
        bottom: auto;
        left: 0;
        right: 0;
        z-index: 10;
        display: none;
        width: 100%;
        max-height: calc(100vh - 95px);
        overflow-x: hidden;
        overflow-y: auto;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: flex-start;
        gap: 7px;
        padding: 12px;
        margin: 0;
        border: 1px solid #e8dbcb;
        border-radius: 0 0 18px 18px;
        background: rgba(255,250,242,.98);
        box-shadow: 0 16px 30px rgba(35,24,14,.16);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .site-header.miksz-header .public-menu.is-open,
    .site-header.miksz-header.is-compact .public-menu.is-open {
        display: flex;
    }

    .site-header.miksz-header .public-menu .top-link,
    .site-header.miksz-header .public-menu .menu-group-toggle,
    .site-header.miksz-header.is-compact .public-menu .top-link,
    .site-header.miksz-header.is-compact .public-menu .menu-group-toggle {
        width: 100%;
        min-height: 45px;
        justify-content: space-between;
        text-align: left;
        padding: 10px 13px;
        font-size: 14px;
    }

    .site-header.miksz-header .public-menu .menu-group {
        width: 100%;
    }

    .site-header.miksz-header .public-menu .menu-dropdown {
        position: static;
        width: 100%;
        min-width: 0;
        margin: 6px 0 0;
        box-shadow: none;
    }

    .site-header.miksz-header .header-session.public-header-session,
    .site-header.miksz-header.is-compact .header-session.public-header-session {
        width: 100%;
        margin: 3px 0 0;
    }

    .site-header.miksz-header .account-toggle-fancy {
        width: 100%;
        justify-content: flex-start;
    }

    .site-header.miksz-header.is-compact .nav-enhanced {
        height: 68px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 6px 0;
    }

    .site-header.miksz-header.is-compact .brand-with-logo {
        position: relative;
        inset: auto;
        width: 150px;
        height: 56px;
        flex: 0 0 150px;
    }

    .site-header.miksz-header.is-compact .brand-mark img {
        width: 150px;
        height: 56px;
        max-height: 56px;
    }

    .site-header.miksz-header.is-compact .menu-toggle {
        margin-left: auto;
    }

    .site-header.miksz-header.is-compact .public-menu {
        top: 100%;
    }

    .site-header.miksz-header.is-compact .account-user-lines {
        display: grid;
    }

    .site-header.miksz-header.is-compact .account-points-pill {
        display: inline-flex;
    }
}

@media (max-width: 420px) {
    .site-header.miksz-header .nav-enhanced {
        height: 210px;
    }
    .site-header.miksz-header.is-compact .nav-enhanced {
        height: 64px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-header.miksz-header .nav-enhanced,
    .site-header.miksz-header .brand-mark img,
    .site-header.miksz-header .public-menu .top-link,
    .site-header.miksz-header .public-menu .menu-group-toggle {
        transition: none;
    }
}
