/* ============================================================================
   Kék Kémiai Kft. – publikus stíluslap (VILÁGOS téma)
   ----------------------------------------------------------------------------
   Témasemleges: az oldal-specifikus accent színeket a layout injektálja a
   :root-ba (--accent, --accent-hover, --accent-ink) a config theme blokkjából.
   Az itt definiált világos alap-tokenek és a sötét sáv/lábléc (--dark-*)
   tokenek MINDEN oldalon azonosak. Mobil-first.
   ========================================================================== */

:root {
    /* --- Közös VILÁGOS tokenek (publikus felület) --- */
    --bg: #FFFFFF;
    --bg-alt: #F4F6F9;
    --surface: #FFFFFF;
    --text: #1A2230;
    --text-muted: #5B6673;
    --border: #E4E8EE;
    --card-shadow: 0 2px 10px rgba(20, 30, 50, .06);
    --card-shadow-hover: 0 10px 26px rgba(20, 30, 50, .12);

    /* --- Sötét kapcsolati sáv + lábléc tokenek (közös) --- */
    --dark-bg: #021d3e;
    --dark-surface: #0a2a52;
    --dark-text: #F5F7FA;
    --dark-text-muted: #9FB0C0;
    --dark-border: rgba(255, 255, 255, .12);

    /* --- Accent fallback (a layout felülírja a configból) --- */
    --accent: #F58742;
    --accent-hover: #E0722F;
    --accent-ink: #BE5319;        /* link/szöveg világos háton, AA */
    --accent-contrast: #10233d;   /* pill gomb felirata világos accenten (AA) */

    --radius-card: 12px;
    --radius-input: 8px;
    --maxw: 1200px;
}

/* --- Alap reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* biztonsági háló a vízszintes túlcsordulás ellen */
}
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
    font-family: 'Bebas Neue', system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.05;
    color: var(--text);
    margin: 0 0 .6rem;
    font-weight: 400;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1rem; }

a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.1rem; }

/* --- Skip link (akadálymentesség) --- */
.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--accent); color: var(--accent-contrast);
    padding: .6rem 1rem; border-radius: 0 0 8px 0; z-index: 200; font-weight: 700;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ============================================================================
   Pill gombok
   ========================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .72rem 1.5rem;
    border: none; border-radius: 50px;
    /* Tudatos döntés: világos accent töltés (#F58742) fehér felirattal, a
       márka-megjelenés kedvéért (a fehér itt nem éri el az AA 4.5:1-et). */
    background: var(--accent); color: #fff;
    font-family: 'Open Sans', sans-serif; font-weight: 700; font-size: 1rem;
    text-decoration: none; cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover {
    background: var(--accent-hover); color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 135, 66, .35);
}
.btn:active { transform: translateY(0); }
.btn.small { padding: .5rem 1rem; font-size: .9rem; }

/* ============================================================================
   Sticky fejléc (VILÁGOS)
   ========================================================================== */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(8px);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid transparent;
    transition: box-shadow .2s ease, border-color .2s ease;
}
.site-header.scrolled {
    box-shadow: 0 2px 14px rgba(20, 30, 50, .08);
    border-bottom-color: var(--border);
}
.site-header .container {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 70px; gap: 1rem;
}
.brand {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(1.2rem, 3.6vw, 2rem); letter-spacing: 1px; line-height: 1.02;
    text-decoration: none; min-width: 0;
}
/* Egyszínű márka-kék (navy), végig – a „— TOPIC" rész sem tér el. */
.brand, .brand:hover, .brand * { color: #021d3e; }
.site-header .btn { flex: 0 0 auto; }

/* ============================================================================
   Fő tartalom keret
   ========================================================================== */
main { display: block; }
.section { padding: 2.5rem 0; }
.section-alt { background: var(--bg-alt); }

/* Ideiglenes placeholder a 6. lépéshez (a főoldal tartalma a 7. lépésben jön) */
.placeholder-note {
    border: 1px dashed var(--border); border-radius: var(--radius-card);
    background: var(--bg-alt); padding: 2rem; text-align: center; color: var(--text-muted);
}

/* Kártya alapstílus (a 7–8. lépés használja) */
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-card); box-shadow: var(--card-shadow);
    overflow: hidden; transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-hover); }

.badge-new {
    display: inline-block; padding: .15rem .6rem; border-radius: 50px;
    background: var(--accent); color: var(--accent-contrast);
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
}

/* --- 3:2 képkeret (egységes kártya-thumb, Imagick thumb VAGY CSS cover) --- */
.ratio-3-2 {
    position: relative; width: 100%; aspect-ratio: 3 / 2;
    background: var(--bg-alt); overflow: hidden;
}
.ratio-3-2 img { width: 100%; height: 100%; object-fit: cover; }
.ratio-3-2.placeholder {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--bg-alt), #e9edf3);
    color: var(--accent-ink);
    font-family: 'Bebas Neue', sans-serif; font-size: 2.4rem; letter-spacing: 2px;
}

/* ============================================================================
   Kiemelt cikk blokk (a főoldal nagy felső eleme)
   ========================================================================== */
.featured {
    display: grid; grid-template-columns: 1fr; gap: 0;
    margin-bottom: 2.5rem;
}
.featured .featured-media { position: relative; }
.featured .badge-new { position: absolute; top: 1rem; left: 1rem; z-index: 2; }
.featured .featured-body { padding: 1.6rem 0 0; }
.featured .featured-body h2 { margin-bottom: .5rem; }
.featured .post-meta { margin-bottom: .8rem; }
.featured .excerpt { color: var(--text-muted); margin-bottom: 1.2rem; font-size: 1.05rem; }

/* --- Cikk meta (szerző + dátum) --- */
.post-meta { color: var(--text-muted); font-size: .88rem; }
.post-meta .author { font-weight: 600; color: var(--text); }
.post-meta .sep { margin: 0 .45rem; opacity: .5; }

.read-more {
    display: inline-flex; align-items: center; gap: .4rem;
    color: var(--accent-ink); font-weight: 700; text-decoration: none;
}
.read-more:hover { color: var(--accent-hover); }
.read-more::after { content: "→"; transition: transform .15s ease; }
.read-more:hover::after { transform: translateX(3px); }

/* ============================================================================
   3 oszlopos cikk-grid
   ========================================================================== */
.post-grid {
    display: grid; grid-template-columns: 1fr; gap: 1.5rem;
    list-style: none; margin: 0; padding: 0;
}
.post-card { display: flex; flex-direction: column; position: relative; }
.post-card .badge-new { position: absolute; top: .8rem; left: .8rem; z-index: 2; }
.post-card a.card-link { text-decoration: none; color: inherit; display: block; }
.post-card .card-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .5rem; }
.post-card h3 { margin: 0; }
.post-card h3 a { color: var(--text); text-decoration: none; }
.post-card h3 a:hover { color: var(--accent-ink); }
.post-card .excerpt { color: var(--text-muted); font-size: .95rem; margin: 0; }
.post-card .post-meta { margin-top: auto; }

/* --- Üres állapot --- */
.empty-state {
    text-align: center; padding: 3rem 1rem; color: var(--text-muted);
    border: 1px dashed var(--border); border-radius: var(--radius-card); background: var(--bg-alt);
}

/* ============================================================================
   Lapozás
   ========================================================================== */
.pagination {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: .4rem; margin-top: 2.5rem;
}
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 42px; height: 42px; padding: 0 .8rem;
    border: 1px solid var(--border); border-radius: 50px;
    text-decoration: none; color: var(--text); font-weight: 600; background: var(--surface);
}
.pagination a:hover { border-color: var(--accent); color: var(--accent-ink); }
.pagination .current { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.pagination .disabled { opacity: .4; pointer-events: none; }
.pagination .gap { border: none; background: none; min-width: auto; }

/* ============================================================================
   Cikkoldal (2/3 + 1/3)
   ========================================================================== */
.article-layout {
    display: grid; grid-template-columns: 1fr; gap: 2.5rem;
    align-items: start;
}
.article-header h1 { margin-bottom: .6rem; }
.article-header .post-meta { margin-bottom: 1.4rem; font-size: .95rem; }
.article-hero { margin: 0 0 1.8rem; border-radius: var(--radius-card); overflow: hidden; border: 1px solid var(--border); }

/* Cikk tartalom tipográfia (sanitizált HTML) */
.article-content { font-size: 1.06rem; line-height: 1.75; color: var(--text); }
.article-content > *:first-child { margin-top: 0; }
.article-content h2 { margin: 2rem 0 .8rem; font-size: 1.7rem; }
.article-content h3 { margin: 1.6rem 0 .6rem; font-size: 1.3rem; }
.article-content p { margin: 0 0 1.15rem; }
.article-content ul, .article-content ol { margin: 0 0 1.15rem; padding-left: 1.4rem; }
.article-content li { margin: .35rem 0; }
.article-content a { color: var(--accent-ink); text-decoration: underline; }
.article-content a:hover { color: var(--accent-hover); }
.article-content strong { font-weight: 700; }
.article-content em { font-style: italic; }
.article-content img {
    max-width: 100%; height: auto; display: block;
    margin: 1.5rem auto; border-radius: 10px; border: 1px solid var(--border);
}
/* Bekezdés-igazítás: a TinyMCE inline `text-align`-t ad a blokk-elemre (p/h2/h3/li/
   blockquote); ez natívan érvényesül. A képnek nincs külön igazítása (mindig blokk,
   középre a fenti szabállyal). */
.article-content blockquote {
    margin: 1.5rem 0; padding: .6rem 1.2rem;
    border-left: 4px solid var(--accent); background: var(--bg-alt);
    border-radius: 0 8px 8px 0; color: var(--text-muted); font-style: italic;
}
.article-content blockquote p:last-child { margin-bottom: 0; }

/* Ajánlott cikkek oldalsáv */
.article-aside .aside-title {
    font-family: 'Bebas Neue', sans-serif; text-transform: uppercase; letter-spacing: 1px;
    font-size: 1.25rem; margin: 0 0 1rem; padding-bottom: .5rem; border-bottom: 2px solid var(--accent);
}
.reco-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.reco-card { display: flex; gap: .8rem; align-items: center; }
.reco-card .reco-thumb { flex: 0 0 96px; width: 96px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.reco-card .reco-thumb.placeholder { font-size: 1.3rem; }
.reco-card .reco-body { min-width: 0; }
.reco-card .reco-body a {
    color: var(--text); text-decoration: none; font-weight: 700; font-size: .95rem;
    display: block; line-height: 1.3;
}
.reco-card .reco-body a:hover { color: var(--accent-ink); }
.reco-card .reco-date { color: var(--text-muted); font-size: .82rem; margin-top: .2rem; }

/* ============================================================================
   Sötét kapcsolati / ajánlatkérő sáv (#ajanlatkero) – az EGYETLEN sötét sáv
   a publikus oldalon. Tartalmát a 9. lépés tölti meg; itt a keret + tokenek.
   ========================================================================== */
.contact-band {
    background: var(--dark-bg);
    color: var(--dark-text);
    padding: 3rem 0;
    scroll-margin-top: 76px; /* sticky fejléc alá ugorjon */
}
.contact-band h2 {
    color: var(--dark-text); font-size: 1.7rem; margin: 0 0 1.2rem;
    padding-bottom: .5rem; border-bottom: 2px solid var(--accent); display: inline-block;
}
.contact-band a { color: var(--accent); }
.contact-band .req { color: var(--accent); }
.contact-band .contact-grid {
    display: grid; grid-template-columns: 1fr; gap: 2.5rem;
}

/* Bal: közvetlen kapcsolat */
.contact-info { list-style: none; margin: 0 0 1.3rem; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.contact-info .person { font-weight: 700; font-size: 1.1rem; color: var(--dark-text); margin-bottom: .3rem; }
.contact-info li { display: flex; align-items: center; gap: .7rem; }
.contact-info a { color: var(--dark-text); text-decoration: none; }
.contact-info a:hover { color: var(--accent); text-decoration: underline; }
.contact-info .ico { flex: 0 0 auto; color: var(--accent); display: inline-flex; }
.contact-info .ico svg { width: 20px; height: 20px; display: block; }
.contact-lead { color: var(--dark-text-muted); line-height: 1.6; }

/* Jobb: űrlap */
.contact-form label { display: block; margin: 0 0 .35rem; font-weight: 600; font-size: .92rem; color: var(--dark-text); }
.contact-form .field { margin-bottom: 1rem; }
.contact-form .form-row { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
.contact-band input,
.contact-band textarea {
    width: 100%; padding: .7rem .8rem;
    background: var(--dark-surface); color: var(--dark-text);
    border: 1px solid var(--dark-border); border-radius: var(--radius-input);
    font-family: inherit; font-size: 1rem;
}
.contact-band input::placeholder, .contact-band textarea::placeholder { color: var(--dark-text-muted); }
.contact-band input:focus,
.contact-band textarea:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245, 135, 66, .25);
}
.contact-band input[aria-invalid="true"],
.contact-band textarea[aria-invalid="true"] { border-color: #ff8a80; }
.contact-form .field-error { color: #ff8a80; font-size: .82rem; margin: .3rem 0 0; }
.contact-band input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .9; cursor: pointer; }

/* Honeypot – vizuálisan és AT elől is rejtve, de a botok kitöltik */
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* GDPR checkbox */
.contact-form .gdpr { display: flex; align-items: flex-start; gap: .6rem; margin: .3rem 0 1.2rem; }
.contact-form .gdpr input { width: auto; margin-top: .25rem; }
.contact-form .gdpr label { margin: 0; font-weight: 400; font-size: .9rem; line-height: 1.45; color: var(--dark-text-muted); }

/* Állapot-üzenetek a szekció tetején */
.form-alert { padding: .8rem 1rem; border-radius: 8px; margin-bottom: 1.2rem; font-size: .95rem; }
.form-alert.success { background: rgba(63,185,80,.18); border: 1px solid rgba(63,185,80,.5); color: #b6f0bf; }
.form-alert.error { background: rgba(248,81,73,.15); border: 1px solid rgba(248,81,73,.5); color: #ffc2bd; }

.contact-band .muted { color: var(--dark-text-muted); }

/* ============================================================================
   Lábléc (SÖTÉT)
   ========================================================================== */
.site-footer {
    background: var(--dark-bg);
    color: var(--dark-text-muted);
    border-top: 1px solid var(--dark-border);
    padding: 1.6rem 0;
    font-size: .9rem;
}
.site-footer .container {
    display: grid; grid-template-columns: 1fr; gap: .8rem;
    justify-items: center; text-align: center;
}
.site-footer .copyright { color: var(--dark-text-muted); }
.site-footer .footer-center { display: flex; flex-wrap: wrap; gap: 1.2rem; justify-content: center; }
.site-footer .footer-right { color: var(--dark-text-muted); }
.site-footer a { color: var(--dark-text); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }

/* ============================================================================
   Reszponzív töréspontok
   ========================================================================== */
@media (min-width: 640px) {
    .post-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 700px) {
    .contact-band .contact-grid { grid-template-columns: 1fr 1fr; }
    .contact-form .form-row { grid-template-columns: 1fr 1fr; }
    /* Lábléc: bal copyright / közép linkek / jobb Marketix */
    .site-footer .container { grid-template-columns: 1fr auto 1fr; align-items: center; }
    .site-footer .footer-left { justify-self: start; text-align: left; }
    .site-footer .footer-center { justify-self: center; }
    .site-footer .footer-right { justify-self: end; text-align: right; }
    /* Kiemelt blokk: bal kép (3:2), jobb szöveg */
    .featured { grid-template-columns: 1.15fr 1fr; gap: 2rem; align-items: center; }
    .featured .featured-body { padding: 0; }
}
@media (min-width: 980px) {
    .post-grid { grid-template-columns: repeat(3, 1fr); }
    /* Cikkoldal: 2/3 fő + 1/3 oldalsáv, az oldalsáv sticky */
    .article-layout { grid-template-columns: 2fr 1fr; gap: 3rem; }
    .article-aside { position: sticky; top: 86px; }
}

/* Kis képernyő: a fejléc cégnév + gomb ne csorduljon túl */
@media (max-width: 430px) {
    .site-header .container { min-height: 58px; gap: .6rem; }
    .brand { font-size: 1.2rem; }
    .site-header .btn { padding: .55rem 1rem; font-size: .9rem; }
    .placeholder-note { padding: 1.4rem; }
}
