/* ==========================================================================
   Gagyi Zoltán – maszkfaragó népi iparművész
   ========================================================================== */

@font-face {
    font-family: "Fraunces";
    src: url("../fonts/fraunces.woff2") format("woff2");
    font-weight: 300 700;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Fraunces";
    src: url("../fonts/fraunces-latin-ext.woff2") format("woff2");
    font-weight: 300 700;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Inter";
    src: url("../fonts/inter.woff2") format("woff2");
    font-weight: 400 700;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Inter";
    src: url("../fonts/inter-latin-ext.woff2") format("woff2");
    font-weight: 400 700;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --bg: #14110f;
    --bg-alt: #1b1714;
    --surface: #231e1a;
    --line: #3a3029;
    --text: #efe7dc;
    --muted: #b3a595;
    /* Egyetlen bordó kiemelőszín: gombok, menüjelölő, linkek aláhúzása.
       A világosabb árnyalat ugyanez a szín, csak a sötét háttéren jobban látszik. */
    --accent: #a8322a;
    --accent-bright: #c4453a;
    --wood: #c9a06a;

    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --radius: 20px;      /* egységes lekerekítés mindenhol */
    --radius-sm: 15px;    /* másik elemen belül ülő elemekhez (pl. kiválasztott fül) */
    --container: 1180px;
    --gutter: clamp(16px, 4vw, 40px);
    --header-h: 68px;

    color-scheme: dark;
}

/* ---------- Alapok ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
    -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 1.0625rem/1.7 var(--font-body);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--text); text-decoration-color: var(--accent-bright); text-decoration-thickness: 2px; text-underline-offset: 4px; transition: color .2s; }
a:hover { color: var(--accent-bright); }

:focus-visible { outline: 2px solid var(--wood); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin: 0 0 .5em;
    font-variation-settings: "opsz" 144;
}
h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h3 { font-size: 1.375rem; font-variation-settings: "opsz" 36; }
p { margin: 0 0 1.1em; }

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}
.container.narrow { max-width: 820px; }

.section { padding-block: clamp(56px, 6vw, 88px); }

.eyebrow {
    font: 600 .8125rem/1.2 var(--font-body);
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--wood);
    margin: 0 0 1rem;
}

.sr-only, .skip-link:not(:focus) {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
    position: fixed; top: 12px; left: 12px; z-index: 100;
    background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: var(--radius);
}

.icon { flex-shrink: 0; }

/* ---------- Gombok ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    min-height: 48px;
    padding: 0 1.5rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font: 600 1rem/1 var(--font-body);
    text-decoration: none;
    transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-bright); color: #fff; }

/* ---------- Fejléc ---------- */

.site-header {
    position: fixed; inset: 0 0 auto; z-index: 50;
    height: var(--header-h);
    transition: background-color .3s, box-shadow .3s;
}
.site-header.is-scrolled, .site-header.is-open {
    background: rgba(20, 17, 15, .96);
    box-shadow: 0 1px 0 var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand {
    font: 500 1.375rem/1 var(--font-display);
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
    /* a nyitóképnél rejtve (ott nagyban látszik), aktív menüpontnál beúszik */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .4s, transform .4s, visibility .4s;
}
.site-header.has-active .brand { opacity: 1; visibility: visible; transform: none; }
.brand:hover { color: var(--text); }

.site-nav { position: relative; display: flex; align-items: center; gap: 2px; }
.site-nav a {
    position: relative; z-index: 1;
    color: #fff;
    text-decoration: none;
    font-size: .9375rem;
    font-weight: 500;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    transition: color .3s;
}
.site-nav a:hover, .site-nav a.is-active { color: #fff; }

/* Asztali nézet: áttetsző kapszula, az aktív pont mögé bordó kapszula csúszik (helyét a site.js állítja) */
@media (min-width: 761px) {
    .site-nav {
        padding: 5px;
        border-radius: var(--radius);
        background: rgba(20, 17, 15, .55);
        border: 1px solid rgba(239, 231, 220, .35);
        box-shadow: 0 8px 24px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .06);
        transition: background-color .4s, border-color .4s, box-shadow .4s;
    }
    .site-nav a:hover:not(.is-active) { background: rgba(239, 231, 220, .07); }

    /* A nyitóképen nincs keret és háttér, csak a feliratok, hogy beleolvadjon a képbe;
       görgetés után (sötét fejlécnél) jelenik meg a kapszula */
    .site-header:not(.is-scrolled) .site-nav {
        background: transparent;
        border-color: transparent;
        box-shadow: none;
    }
    .site-header:not(.is-scrolled) .site-nav a {
        text-shadow: 0 1px 12px rgba(0, 0, 0, .7), 0 1px 2px rgba(0, 0, 0, .6);
    }
}

.nav-indicator {
    position: absolute; left: 0; top: 5px; bottom: 5px;
    width: var(--w, 0);
    border-radius: var(--radius-sm);
    background: var(--accent); /* ugyanaz a bordó, mint a gomboké */
    transform: translateX(var(--x, 0));
    opacity: 0;
    pointer-events: none;
    transition: transform .45s cubic-bezier(.65, 0, .35, 1), width .45s cubic-bezier(.65, 0, .35, 1), opacity .3s;
}
.site-nav.has-active .nav-indicator { opacity: 1; }
.site-nav.no-anim .nav-indicator { transition: opacity .3s; }

.nav-toggle {
    display: none;
    width: 44px; height: 44px;
    align-items: center; justify-content: center;
    background: none; border: 0; color: var(--text); cursor: pointer;
    margin-right: -8px;
}

@media (max-width: 760px) {
    .nav-toggle { display: inline-flex; }
    .site-nav {
        position: fixed; top: var(--header-h); left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        padding: 8px var(--gutter) 20px;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 16px 32px rgba(0, 0, 0, .5);
        transform: translateY(-8px); opacity: 0; visibility: hidden;
        transition: opacity .2s, transform .2s, visibility .2s;
    }
    .site-header.is-open .site-nav { transform: none; opacity: 1; visibility: visible; }
    .site-nav a { padding: 14px 4px; border-radius: 0; font-size: 1.0625rem; border-bottom: 1px solid var(--line); transition: color .25s, padding-left .25s, box-shadow .25s; }
    .site-nav a.is-active { color: var(--text); padding-left: 14px; box-shadow: inset 3px 0 var(--accent); }
    .nav-indicator { display: none; }
}

/* ---------- Nyitókép ---------- */

.hero {
    position: relative;
    min-height: 100svh;
    display: flex; align-items: flex-end;
    padding-block: calc(var(--header-h) + 40px) clamp(80px, 12vh, 140px);
    background:
        linear-gradient(180deg, rgba(20, 17, 15, .55) 0%, rgba(20, 17, 15, .2) 35%, rgba(20, 17, 15, .75) 75%, var(--bg) 100%),
        linear-gradient(90deg, rgba(20, 17, 15, .7) 0%, rgba(20, 17, 15, 0) 70%),
        var(--hero-image) var(--hero-pos, center) / cover no-repeat;
}
.hero-inner { position: relative; }
.hero h1 {
    font-size: clamp(3.25rem, 11vw, 8.5rem);
    font-weight: 400;
    line-height: .95;
    letter-spacing: -0.025em;
    margin-bottom: .3em;
    text-wrap: balance;
}
.hero .eyebrow { font-size: clamp(.8125rem, 1.6vw, .9375rem); }
.hero-tagline {
    max-width: 34rem;
    font-size: clamp(1.0625rem, 2vw, 1.25rem);
    color: #e3d9cc;
    margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.scroll-hint {
    position: absolute; left: 50%; bottom: 24px;
    translate: -50% 0;
    color: var(--muted);
    padding: 10px;
    animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(6px); } }
@media (max-height: 620px) { .scroll-hint { display: none; } }

/* ---------- Rólam ---------- */

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: clamp(40px, 7vw, 96px);
    align-items: start;
}
.about-text p:not(.eyebrow) { color: #ddd2c4; }
/* Sorkizárt bekezdések (elválasztással); telefonon a keskeny sor miatt balra zárt marad */
@media (min-width: 600px) {
    .about-text p:not(.eyebrow) { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
}
/* Paszpartuszerű keret: a kép körül egyenletes térköz, vékony fa színű vonal */
.about-figure {
    margin: 0;
    position: sticky; top: calc(var(--header-h) + 24px);
    padding: 12px;
    border: 1px solid rgba(201, 160, 106, .45);
    border-radius: var(--radius);
}
.about-figure img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: calc(var(--radius) - 12px); /* a keret belső sarkával párhuzamos */
}
/* „Teljes kép” beállításnál vágás nélkül, a kép saját arányában */
.about-figure.is-full img { aspect-ratio: auto; }
@media (max-width: 860px) {
    .about-grid { grid-template-columns: 1fr; }
    .about-figure { position: relative; top: 0; order: -1; padding: 8px; border-radius: var(--radius); }
    .about-figure img { aspect-ratio: 4 / 3; }
}

/* ---------- Kiemelések ---------- */

.highlights { padding-top: 0; padding-bottom: clamp(48px, 5vw, 72px); }
.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
@media (max-width: 960px) { .cards { grid-template-columns: 1fr; } }

.card {
    display: flex; flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px 28px;
}
.card p { color: var(--muted); }
.card-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px;
    border-radius: var(--radius);
    background: rgba(201, 160, 106, .12);
    color: var(--wood);
    margin-bottom: 20px;
}
/* Szöveges link a menüjelölőhöz hasonló bordó vonallal */
.card-link {
    align-self: flex-start;
    margin-top: auto;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--accent);
    color: var(--text);
    font-weight: 600; font-size: .9375rem;
    text-decoration: none;
    transition: color .2s, border-color .2s;
}
.card-link:hover { color: var(--accent-bright); border-color: var(--accent-bright); }

.countdown-date { font-weight: 600; color: var(--text) !important; }
.countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 4px 0 24px;
}
.countdown span {
    display: flex; flex-direction: column; align-items: center;
    padding: 12px 4px 10px;
    border-radius: var(--radius);
    background: rgba(0, 0, 0, .25);
    font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.countdown b {
    font: 500 clamp(1.5rem, 3vw, 2rem)/1.1 var(--font-display);
    font-variant-numeric: tabular-nums;
    color: var(--text);
    letter-spacing: 0; text-transform: none;
}

/* ---------- Galéria ---------- */

.gallery-section { background: var(--bg-alt); }

.section-head {
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
    gap: 16px 32px;
    margin-bottom: 40px;
}
.section-head h2 { margin: 0; }

.tabs {
    position: relative;
    display: inline-flex;
    padding: 4px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
}
.tabs button {
    position: relative; z-index: 1;
    border: 0; background: none; color: var(--muted);
    font: 500 .9375rem/1 var(--font-body);
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color .2s, color .2s;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: #fff; }
/* JS nélkül a kiválasztott fül saját háttért kap; JS-sel a csúszó jelölő veszi át */
.tabs:not(.has-indicator) button[aria-selected="true"] { background: var(--accent); }

/* A kiválasztott fül mögé csúszó bordó jelölő (helyét a site.js állítja) */
.tabs-indicator {
    position: absolute; left: 0; top: 4px; bottom: 4px;
    width: var(--w, 0);
    border-radius: var(--radius-sm);
    background: var(--accent);
    transform: translateX(var(--x, 0));
    transition: transform .45s cubic-bezier(.65, 0, .35, 1), width .45s cubic-bezier(.65, 0, .35, 1);
    pointer-events: none;
}
.tabs.no-anim .tabs-indicator { transition: none; }

/* Csoportváltáskor a képek finoman beúsznak */
.is-entering .gallery-item, .gallery-item.is-revealing { animation: gallery-in .5s cubic-bezier(.2, .7, .3, 1) both; }
@keyframes gallery-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* Egyenletes képrács: minden kép egyforma méretű, a teljes kép a nagyítóban látszik */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.gallery-panel[hidden] { display: none; }

/* „Továbbiak betöltése”: JS-sel csak az első adag látszik (JS nélkül minden kép) */
.js .gallery-item.is-more { display: none; }
/* amíg van még kép, az utolsó sor alja elhalványul, jelezve, hogy a galéria folytatódik */
.js .gallery-panel.has-more .gallery {
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 230px), transparent 100%);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 230px), transparent 100%);
}
.gallery-more {
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    margin-top: 28px;
    text-align: center;
}
html:not(.js) .gallery-more { display: none; }
.gallery-more[hidden] { display: none; }
.gallery-progress {
    width: min(320px, 70%); height: 4px;
    border-radius: 4px;
    background: var(--line);
    overflow: hidden;
}
.gallery-progress span {
    display: block; height: 100%;
    border-radius: 4px;
    background: var(--accent);
    transition: width .6s cubic-bezier(.65, 0, .35, 1);
}
.gallery-count { margin: 0; color: var(--muted); font-size: .9375rem; font-variant-numeric: tabular-nums; }
.gallery-more-btn { min-width: 260px; }
.gallery-more-btn[hidden] { display: none; } /* a .btn display-e ne írja felül a rejtést */

/* képszám a fülön */
.tab-count {
    display: inline-block;
    min-width: 22px;
    margin-left: 6px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(239, 231, 220, .1);
    font-size: .75rem; font-weight: 600; line-height: 1;
    font-variant-numeric: tabular-nums;
    vertical-align: 1px;
    transition: background-color .3s;
}
.tabs button[aria-selected="true"] .tab-count { background: rgba(255, 255, 255, .22); }
@media (max-width: 960px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; } }

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--surface);
}
.gallery-item img {
    width: 100%; height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform .5s ease, filter .3s;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-caption {
    position: absolute; inset: auto 0 0;
    padding: 28px 14px 12px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .75));
    color: #fff; font-size: .875rem; line-height: 1.4;
    opacity: 0; transition: opacity .25s;
}
.gallery-item:hover .gallery-caption, .gallery-item:focus-visible .gallery-caption { opacity: 1; }
@media (hover: none) { .gallery-caption { opacity: 1; } }


/* ---------- Kiállítások: vízszintes idővonal ---------- */

.tl-controls { display: flex; gap: 8px; }
.tl-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: border-color .2s, background-color .2s, opacity .2s;
}
.tl-btn:hover:not(:disabled) { border-color: var(--accent-bright); background: rgba(168, 50, 42, .15); }
.tl-btn:disabled { opacity: .3; cursor: default; }
.tl-controls[hidden] { display: none; }

/* Évszám-sáv: gyors ugrás bármelyik évre */
.tl-years {
    position: relative;
    display: flex; gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 0 28px;
    padding: 4px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
}
.tl-years::-webkit-scrollbar { display: none; }
.tl-years button {
    position: relative; z-index: 1;
    flex: 1 0 auto;
    min-width: 52px;
    padding: 8px 10px;
    border: 0; border-radius: var(--radius-sm);
    background: none;
    color: var(--muted);
    font: 500 .875rem/1 var(--font-body);
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: background-color .25s, color .25s;
}
.tl-years button:hover { color: var(--text); }
.tl-years button.is-past { color: #d8c9b8; }
.tl-years button.is-active { color: #fff; }
.tl-years:not(.has-indicator) button.is-active { background: var(--accent); }
/* Az aktív év mögé csúszó bordó jelölő (helyét a site.js állítja) */
.tl-years-indicator {
    position: absolute; left: 0; top: 4px; bottom: 4px;
    width: var(--w, 0);
    border-radius: var(--radius-sm);
    background: var(--accent);
    transform: translateX(var(--x, 0));
    transition: transform .45s cubic-bezier(.65, 0, .35, 1), width .45s cubic-bezier(.65, 0, .35, 1);
    pointer-events: none;
}
.tl-years.no-anim .tl-years-indicator { transition: none; }

.tl-track {
    overflow-x: auto;
    scrollbar-width: none;
    cursor: grab;
    padding: 8px 0 12px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 72px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 72px), transparent 100%);
}
.tl-track::-webkit-scrollbar { display: none; }
.tl-track.is-dragging { cursor: grabbing; user-select: none; }
.tl-track:focus-visible { outline-offset: -2px; }

.tl-list {
    --dot-y: 70px;
    position: relative;
    display: flex; gap: 28px;
    width: max-content;
    list-style: none;
    margin: 0;
    padding: 0 88px 0 16px;
}
/* az alapvonal és a bordó kitöltés */
.tl-list::before, .tl-list::after {
    content: "";
    position: absolute; left: 0; top: var(--dot-y);
    height: 2px;
    border-radius: 2px;
}
.tl-list::before { right: 0; background: var(--line); }
.tl-list::after {
    width: var(--fill, 0px);
    background: linear-gradient(90deg, rgba(168, 50, 42, .15), var(--accent) 120px);
    box-shadow: 0 0 12px rgba(196, 69, 58, .45);
    transition: width .6s cubic-bezier(.65, 0, .35, 1);
}

.tl-item {
    position: relative;
    flex: none;
    width: 270px;
    cursor: pointer;
}
.tl-year {
    display: block;
    height: 52px;
    font: 500 2.5rem/1 var(--font-display);
    font-variant-numeric: lining-nums;
    color: var(--muted);
    transition: color .4s, transform .4s;
    transform-origin: left bottom;
}
.tl-dot {
    position: absolute; left: 0; top: calc(var(--dot-y) - 8px);
    z-index: 1;
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 2px solid #5a4c40;
    background: var(--bg);
    transition: background-color .4s, border-color .4s, box-shadow .4s, transform .4s;
}
.tl-card {
    list-style: none;
    margin: 46px 0 0;
    padding: 20px 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color .4s, transform .4s, box-shadow .4s;
}
.tl-card li { font-size: 1rem; line-height: 1.5; }
.tl-card li + li { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

.tl-item.is-past .tl-year { color: var(--wood); }
.tl-item.is-past .tl-dot { border-color: var(--accent); background: var(--accent); }
.tl-item.is-active .tl-year { color: var(--text); transform: scale(1.08); }
.tl-item.is-active .tl-dot {
    border-color: var(--accent-bright);
    background: var(--accent);
    transform: scale(1.2);
    box-shadow: 0 0 0 6px rgba(168, 50, 42, .22), 0 0 20px rgba(196, 69, 58, .7);
}
.tl-item.is-active .tl-card {
    border-color: rgba(196, 69, 58, .55);
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .35);
}
.tl-item:hover:not(.is-active) .tl-year { color: var(--text); }

/* Telefonon és keskeny tableten kisebb, tömörebb idővonal */
@media (max-width: 760px) {
    .tl-list { --dot-y: 46px; gap: 14px; padding-right: 48px; }
    .tl-item { width: min(62vw, 220px); }
    .tl-year { height: 34px; font-size: 1.5rem; }
    .tl-dot { width: 14px; height: 14px; top: calc(var(--dot-y) - 6px); }
    .tl-card { margin-top: 30px; padding: 12px 14px; border-radius: var(--radius-sm); }
    .tl-card li { font-size: .875rem; line-height: 1.45; }
    .tl-card li + li { margin-top: 8px; padding-top: 8px; }
    .tl-years { margin-bottom: 20px; padding: 3px; }
    .tl-years-indicator { top: 3px; bottom: 3px; }
    .tl-years button { min-width: 44px; padding: 6px 8px; font-size: .8125rem; }
    .tl-btn { width: 40px; height: 40px; }
    .tl-item.is-active .tl-dot { box-shadow: 0 0 0 4px rgba(168, 50, 42, .22), 0 0 14px rgba(196, 69, 58, .6); }
}

/* ---------- Elérhetőség ---------- */

.contact { background: var(--bg-alt); }

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 24px;
    margin-top: 40px;
    align-items: stretch;
}
@media (max-width: 860px) { .contact-layout { grid-template-columns: 1fr; } }

/* Bal oldal: térkép + „Látogass el a műhelybe” */
.visit-card {
    display: flex; flex-direction: column;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.visit-map { flex: 1; min-height: 240px; line-height: 0; }
.visit-map iframe {
    width: 100%; height: 100%; min-height: 240px;
    border: 0;
    filter: grayscale(.7) invert(.9) hue-rotate(180deg) contrast(.9);
}
.visit-body { padding: 26px 28px 28px; border-top: 1px solid var(--line); }
.visit-body h3 { font-size: 1.75rem; margin: 0 0 8px; }
.visit-body p { color: var(--muted); margin: 0 0 20px; max-width: 46ch; }
.visit-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-outline { border-color: rgba(239, 231, 220, .45); color: var(--text); }
.btn-outline:hover { border-color: var(--accent-bright); color: var(--text); }

/* Jobb oldal: elérhetőségi lista */
.contact-list {
    list-style: none;
    margin: 0;
    padding: 6px 28px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: flex; flex-direction: column; justify-content: center;
}
.contact-list > li { border-bottom: 1px solid var(--line); }
.contact-list > li:last-child { border-bottom: 0; }
.contact-row {
    display: flex; align-items: center; gap: 18px;
    padding: 22px 0;
}
.contact-row { color: var(--text); text-decoration: none; }
.contact-row:hover { color: var(--text); }
.contact-icon {
    flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px;
    border-radius: var(--radius-sm);
    /* alapból aranybarna, mint a kártyák ikonjai; rámutatáskor bordó */
    background: rgba(201, 160, 106, .12);
    color: var(--wood);
    transition: background-color .25s, color .25s;
}
.contact-row > div { min-width: 0; }
.contact-label {
    display: block;
    margin-bottom: 6px;
    font: 600 .75rem/1 var(--font-body);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--wood);
}
.contact-value { display: block; font-size: 1.0625rem; overflow-wrap: break-word; }
.contact-value a { color: var(--text); text-decoration: none; }
.contact-value a:hover { color: var(--accent-bright); }
.contact-value .sep { margin: 0 8px; color: var(--muted); }
.contact-value.nowrap, .contact-value a[href^="tel:"] { white-space: nowrap; }
.contact-arrow { margin-left: auto; color: var(--muted); transition: transform .25s, color .25s; }
a.contact-row:hover .contact-icon { background: var(--accent); color: #fff; }
a.contact-row:hover .contact-arrow { color: var(--text); transform: translateX(4px); }

@media (max-width: 600px) {
    .contact-list { padding: 4px 18px; }
    .contact-row { gap: 14px; padding: 18px 0; }
    .contact-icon { width: 42px; height: 42px; }
    .contact-value { font-size: 1rem; }
    .visit-body { padding: 22px 20px 24px; }
    .visit-body h3 { font-size: 1.5rem; }
}

/* ---------- Lábléc ---------- */

.site-footer { border-top: 1px solid var(--line); padding-block: 28px; color: var(--muted); font-size: .875rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer-inner p { margin: 0; }

/* ---------- Képnézegető ---------- */

.lightbox {
    width: 100vw; height: 100dvh;
    max-width: none; max-height: none;
    margin: 0; padding: 0;
    border: 0;
    background: rgba(10, 8, 7, .96);
    color: var(--text);
    overflow: hidden;
}
.lightbox::backdrop { background: rgba(10, 8, 7, .9); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox figure {
    margin: 0;
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    padding: 64px 72px 48px;
    max-width: 100%; max-height: 100%;
}
.lightbox img {
    max-width: 100%;
    max-height: calc(100dvh - 150px);
    width: auto; height: auto;
    object-fit: contain;
    border-radius: var(--radius);
    user-select: none;
    touch-action: pan-y;
}
.lightbox figcaption { color: var(--muted); text-align: center; min-height: 1.5em; }
.lb-btn {
    position: absolute;
    display: inline-flex; align-items: center; justify-content: center;
    width: 52px; height: 52px;
    border-radius: var(--radius);
    border: 0;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    cursor: pointer;
    transition: background-color .2s;
}
.lb-btn:hover { background: rgba(255, 255, 255, .18); }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 14px; top: 50%; translate: 0 -50%; }
.lb-next { right: 14px; top: 50%; translate: 0 -50%; }
.lb-counter { position: absolute; top: 28px; left: 24px; font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
    .lightbox figure { padding: 64px 8px 24px; }
    .lb-prev, .lb-next { top: auto; bottom: 16px; translate: none; }
    .lightbox img { max-height: calc(100dvh - 190px); }
}
