/* ===== Alap layout + HEADER (stabil, reszponzív) ===== */
:root {
    /* Hűvös gyöngyház-fehér paletta */
    --surface: #ECF2F9;
    /* fő felület (láthatóan kékes-fehér) */
    --surface-2: #F6FAFF;
    /* kártya/belső sáv */
    --line: #DCE6F3;
    /* finom kontúr */
    --ink: #1B2430;
    /* szöveg - jó kontraszt a hűvös háttéren */
    --muted: #5A6A7C;
    /* másodlagos szöveg */
    --container: 1240px;
    --gap: 22px;
    --header-h: 64px;
    --radius: 14px;
    /* Hűvös, rétegelt árnyék (elegáns “lebegés”) */
    --shadow-1: 0 18px 38px rgba(16, 24, 40, .08), 0 4px 16px rgba(16, 24, 40, .06), 0 0 0 1px rgba(226, 234, 244, .95);
    /* peremfény */
    /* Akcent (metal-zöld) marad */
    --accent: #1F5A22;
    --accent-ink: #0f2f14;
    /* FÁS HEADER */
    --hdr-overlay: .35;
    --hdr-img: url("/assets/img/header/header-wood-1440x360.webp");
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
}

/* ---------- Konténerek ---------- */
.inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gap);
}

.maincontainer {
    min-height: calc(100vh - var(--header-h));
    padding-top: var(--header-h);
}

/* ===== HEADER (alap üveges – CSAK ha NEM .is-wood) ===== */
.site-header:not(.is-wood) {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(140%) blur(8px);
    -webkit-backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid var(--line);
}

.inner.header {
    display: flex;
    align-items: center;
    height: 100%;
}

/* márka */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    text-decoration: none;
    color: var(--ink);
    -webkit-tap-highlight-color: transparent;
}

.brand:focus-visible {
    outline: 2px solid rgba(31, 90, 34, .35);
    outline-offset: 3px;
    border-radius: 10px;
}

.brand-mark {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #C62828, var(--accent));
    box-shadow: var(--shadow-1);
    flex: 0 0 22px;
}

.brand-name {
    font-size: 14px;
    letter-spacing: .2px;
}

/* nyelvváltó */
.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-switch {
    display: flex;
    gap: 6px;
}

.lang-switch .lang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 26px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-size: 12px;
    line-height: 1;
    text-decoration: none;
    color: var(--ink);
    background: var(--surface);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.lang-switch .lang:hover {
    transform: translateY(-1px);
    border-color: #d6d8dc;
    box-shadow: 0 6px 12px rgba(0, 0, 0, .06);
}

.lang-switch .lang:focus-visible {
    outline: 2px solid rgba(31, 90, 34, .45);
    outline-offset: 2px;
}

.lang-switch .lang.is-active {
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 700;
    box-shadow: 0 0 0 3px rgba(31, 90, 34, .12);
}

/* ===== Lábléc ===== */
.site-footer {
    border-top: 1px solid var(--line);
    background: var(--surface-2);
    margin-top: 48px;
}

.inner.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px var(--gap);
    font-size: 12px;
    color: var(--muted);
}

/* ===== Tartalom ===== */
.section {
    padding: clamp(36px, 6vw, 72px) 0;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(14px, 2vw, 20px);
}

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    box-shadow: var(--shadow-1);
}

h1,
h2,
h3 {
    margin: .6em 0 .4em
}

p {
    margin: .5em 0;
    color: var(--ink)
}

.muted {
    color: var(--muted)
}

/* ===== Reszponzív ===== */
@media (max-width:1024px) {
    .grid-3 {
        grid-template-columns: 1fr 1fr
    }
}

@media (max-width:740px) {
    .grid-3 {
        grid-template-columns: 1fr
    }

    .lang-switch .lang {
        min-width: auto
    }
}

@media (prefers-reduced-motion:reduce) {
    .lang-switch .lang {
        transition: none
    }
}

/* ====================================================================== FÁS, FIX HEADER (a kép garantáltan látszik) ====================================================================== */
#siteHeader.site-header.is-wood {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999 !important;
    height: var(--header-h);
    /* Ne nullázd a background-imaget shorthanddel */
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: none !important;
    /* A fa háttér KÖTELEZŐ */
    background-image: var(--hdr-img) !important;
    background-size: cover !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;
    background-attachment: scroll !important;
    box-shadow: rgba(6, 24, 44, .40) 0 0 0 2px, rgba(6, 24, 44, .65) 0 4px 6px -1px, rgba(255, 255, 255, .08) 0 1px 0 inset;
    isolation: isolate;
    /* ::before overlay külön réteg */
}

/* Overlay a fa fölött */
#siteHeader.site-header.is-wood::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(0, 0, 0, var(--hdr-overlay));
    pointer-events: none;
}

/* Tartalom a fedés felett + világos kontraszt */
#siteHeader.site-header.is-wood .inner.header {
    position: relative;
    z-index: 1;
}

#siteHeader.site-header.is-wood .brand,
#siteHeader.site-header.is-wood .brand:visited {
    color: #fff;
}

#siteHeader.site-header.is-wood .brand-name {
    color: #fff;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
}

#siteHeader.site-header.is-wood .brand-mark {
    box-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

#siteHeader.site-header.is-wood .lang-switch .lang {
    color: #fff;
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .28);
}

#siteHeader.site-header.is-wood .lang-switch .lang:hover {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .45);
    transform: translateY(-1px);
}

#siteHeader.site-header.is-wood .lang-switch .lang.is-active {
    background: rgba(255, 255, 255, .22);
    border-color: rgba(255, 255, 255, .65);
    color: #fff;
    box-shadow: none;
}

/* Overlay erősség osztályok */
.site-header.is-wood.ov-0 {
    --hdr-overlay: 0
}

.site-header.is-wood.ov-20 {
    --hdr-overlay: .20
}

.site-header.is-wood.ov-35 {
    --hdr-overlay: .35
}

.site-header.is-wood.ov-50 {
    --hdr-overlay: .50
}

.site-header.is-wood.ov-70 {
    --hdr-overlay: .70
}

.site-header.is-wood.ov-100 {
    --hdr-overlay: 1
}

/* Reszponzív fa-kép */
@media (max-width: 767.98px) {
    :root {
        --hdr-img: url("/assets/img/header/header-768x240.webp");
    }
}

@media (min-width: 768px) and (max-width: 1439.98px) {
    :root {
        --hdr-img: url("/assets/img/header/header-1200x300.webp");
    }
}

@media (min-width: 1900px) and (max-width: 2399.98px) {
    :root {
        --hdr-img: url("/assets/img/header/header-1920x420.webp");
    }
}

@media (min-width: 2400px) and (max-width: 2879.98px) {
    :root {
        --hdr-img: url("/assets/img/header/header-2560x540.webp");
    }
}

@media (min-width: 2880px) and (max-width: 3839.98px) {
    :root {
        --hdr-img: url("/assets/img/header/header-2880x600.webp");
    }
}

@media (min-width: 3840px) {
    :root {
        --hdr-img: url("/assets/img/header/header-3840x960.webp");
    }
}


/* Extra hely a glass mobil dokk alatt */
@media (max-width: 820px) {
    .maincontainer {
        padding-bottom: 90px;
        /* dokk magassága + kis tartalék */
    }
}