/* === ТЕМА И БАЗОВЫЕ НАСТРОЙКИ === */
:root {
    --bg: #f7f7f5;
    --card: #ffffff;
    --ink: #1f2a2e;
    --muted: #6a7a75;
    --brand-1: #256e5b; /* глубокий нефрит */
    --brand-2: #3ea46f; /* травяной акцент */
    --brand-3: #bfe6d2; /* светлый акцент */
    --line: #e6eee9;
    --focus: #3a7bd5;
    --shadow-sm: 0 4px 14px rgba(21, 29, 33, .06);
    --shadow-md: 0 12px 36px rgba(21, 29, 33, .08);
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        animation: none !important;
        transition: none !important;
    }
}

body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background: radial-gradient(1200px 800px at 10% -10%, #eaf5ee 0%, transparent 50%), var(--bg);
    color: var(--ink);
    margin: 0;
    padding: 0;
    line-height: 1.75;
    font-size: 17px;
}

/* === ХЕДЕР === */
header {
    background: linear-gradient(90deg, var(--brand-1) 0%, var(--brand-2) 100%);
    padding: 1.25rem 0;
    color: #fff;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 5;
}

.header-container {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0 1.25rem;
}

.header-container img {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .12));
    transition: transform .25s ease;
}

.header-container img:hover {
    transform: scale(1.02);
}

/* HEADER */
header {
    background: linear-gradient(90deg, #2e7d5c 0%, #3ea46f 100%);
    padding: 14px 0;
    color: #fff;
    box-shadow: 0 4px 14px rgba(21, 29, 33, .06);
    position: sticky;
    top: 0;
    z-index: 5;
}

.header-container {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between; /* чтобы пилл был справа */
    gap: 1rem;
    padding: 0 1rem;
}

.header-container img {
    max-width: 180px;
    height: auto;
}

/* Пилл "вчерашняя дата · Reklama" */
.header-right {
    display: flex;
    align-items: center;
}

.ad-pill {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    background: #ffffff; /* белый для читаемости */
    color: #184e42;
    border: 1px solid rgba(0, 0, 0, .08);
    padding: .4rem .7rem;
    border-radius: 999px;
    font-size: .92rem;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
    line-height: 1;
}

.ad-pill::before { /* иконка-календарь */
    content: "📅";
    font-size: 1rem;
    line-height: 1;
}

.ad-pill .sep {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2e7d5c;
    display: inline-block;
}

/* Ссылки — курсор */
a {
    cursor: pointer;
}

/* Тултип карты — плавный показ/скрытие */
.map-tooltip {
    opacity: 0;
    display: none;
}

.map-tooltip.is-visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}
/* === МОБИЛЬНЫЙ ХЕДЕР === */
@media (max-width: 640px) {
    .header-container {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: .75rem;
        padding: .75rem 1rem 1rem;
    }

    .header-container img {
        max-width: 150px;
    }

    .ad-pill {
        font-size: .85rem;
        padding: .35rem .6rem;
        border-radius: 14px;
        background: rgba(255,255,255,.95);
        color: #184e42;
        border: 1px solid rgba(0,0,0,.06);
        box-shadow: 0 2px 8px rgba(0,0,0,.08);
    }

    .ad-pill::before {
        font-size: .9rem;
    }

    header {
        padding-top: .75rem;
        padding-bottom: .75rem;
    }
}



/* === СТАТЬЯ === */
/* === СТАТЬЯ: обновлённый вид === */
.cz-article {
    max-width: 860px;
    margin: 2.25rem auto;
    padding: clamp(1.25rem, 2.8vw, 2rem);
    background: var(--card);
    border-radius: 22px; /* более округлая карта */
    border: 1px solid var(--line);
    box-shadow: 0 20px 50px rgba(21, 29, 33, .08);
    position: relative;
    isolation: isolate;
}

.cz-article::before { /* тонкий акцентный штрих сверху */
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    height: 6px;
    width: 42%;
    background: linear-gradient(90deg, var(--brand-2), transparent);
    border-top-left-radius: 22px;
}

/* Заголовок */
.cz-article__title {
    font-size: clamp(2rem, 4vw, 2.6rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -.02em;
    margin: 0 0 .75rem 0;
    color: #0e1b14;
    position: relative;
}

.cz-article__title::after { /* «кисть» под заголовком */
    content: "";
    display: block;
    height: 8px;
    width: 120px;
    margin-top: .6rem;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--brand-3), transparent 85%);
}

/* Лид-абзац (первый абзац) */
.cz-article > p:first-of-type {
    font-size: clamp(1.05rem, 2.2vw, 1.15rem);
    line-height: 1.85;
    color: #1d312a;
    background: linear-gradient(180deg, #f4fbf7, #ffffff);
    border: 1px solid var(--line);
    border-left: 6px solid var(--brand-2);
    padding: .9rem 1rem;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    margin: 1.25rem 0 1rem;
}

.cz-article > p:first-of-type::first-letter { /* drop-cap */
    float: left;
    font-weight: 800;
    font-size: 2.2em;
    line-height: .9;
    padding: .08em .14em 0 0;
    color: var(--brand-1);
}

/* Базовые абзацы */
.cz-article p {
    margin: 0 0 1.15rem 0;
    font-size: 1rem;
    color: #2a3430;
}

/* Изображение — рамка и подпрыгивание */
.cz-article img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 20px;
    border: 1px solid var(--line);
    box-shadow: 0 16px 40px rgba(21, 29, 33, .10);
    transition: transform .35s ease, box-shadow .35s ease;
    margin: 1.2rem 0 0;
}

.cz-article img:hover {
    transform: translateY(-3px);
    box-shadow: 0 26px 60px rgba(21, 29, 33, .14);
}

/* Подзаголовки — маркеры секций */
.cz-article h2 {
    font-size: clamp(1.25rem, 2.4vw, 1.5rem);
    margin: 2.1rem 0 .5rem;
    color: #11241b;
    font-weight: 800;
    letter-spacing: .1px;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.cz-article h2::before {
    content: "";
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--brand-2), var(--brand-1));
    box-shadow: 0 0 0 6px rgba(62, 164, 111, .12);
}

/* Декоративный разделитель между блоками текста */
.cz-article h2 + p::before {
    content: "";
    display: block;
    height: 1px;
    margin: .6rem 0 1rem;
    background: linear-gradient(90deg, rgba(62, 164, 111, .35), rgba(62, 164, 111, 0));
    border-radius: 1px;
}

/* Акцентные карточки для важных частей (применится к "Jak funguje…" и "Závěr") */
.cz-article h2:has(+ p + p + p),
.cz-article h2:has(+ p) {
    scroll-margin-top: 90px; /* якоря, если появятся */
}

.cz-article h2 + p + p {
    background: linear-gradient(180deg, #f6fbf8, #ffffff);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    border-radius: 14px;
    padding: .9rem 1rem;
}

/* Сноски/примечания — более мелкий текст (если появятся) */
.cz-article small, .cz-article .note {
    color: #6b7a74;
    font-size: .92rem;
}

/* Клики по ссылкам внутри статьи — более явная обратная связь */
.cz-article a {
    position: relative;
}

.cz-article a:hover::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: currentColor;
    opacity: .25;
    border-radius: 2px;
}

/* Мобильная полировка */
@media (max-width: 720px) {
    .cz-article {
        border-radius: 18px;
    }

    .cz-article__title::after {
        width: 90px;
    }

    .cz-article > p:first-of-type {
        border-left-width: 5px;
    }
}


/* === ФУТЕР === */
footer {
    background: linear-gradient(0deg, #eef6f1 0%, #f7fbf9 100%);
    padding: 2.25rem 1rem;
    font-size: .95rem;
    color: #45524e;
    text-align: center;
    border-top: 1px solid var(--line);
    margin-top: 3rem;
}

.footer__links {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem 1.25rem;
}

.footer__links a {
    color: var(--brand-1);
    text-decoration: none;
    font-weight: 600;
    padding: .35rem .6rem;
    border-radius: 8px;
    transition: background .2s ease, color .2s ease, transform .2s ease;
    outline-offset: 2px;
}

.footer__links a:hover {
    background: #e6f3eb;
    transform: translateY(-1px);
    text-decoration: none;
}

.footer__links a:focus-visible {
    outline: 2px solid var(--focus);
}

.footer__disclaimer {
    font-size: .9rem;
    color: #5e6a66;
    line-height: 1.6;
    max-width: 720px;
    margin: .25rem auto 0;
}

.footer__legal {
    color: #61706b;
    line-height: 1.6;
    max-width: 820px;
    padding: 12px 0 0;
    margin: 0 auto;
    border-top: 1px dashed var(--line);
}

/* === МОДАЛКИ === */
/* ===== MODALS (updated) ===== */
.modal {
    display: none;                /* показывается через JS */
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(10, 18, 15, 0.55);   /* тёмный оверлей */
    backdrop-filter: blur(2px);
    padding: 28px 16px;
    overflow: auto;
}

.modal-content {
    background: #ffffff;
    margin: max(5vh, 40px) auto;
    max-width: 720px;
    width: 100%;
    border-radius: 18px;
    padding: clamp(18px, 2.4vw, 28px);
    line-height: 1.7;
    color: #1e2a27;
    border: 1px solid #e7efe9;
    box-shadow: 0 30px 80px rgba(6, 21, 17, 0.18);
    outline: none;                /* фокус ловим на контейнер */
}

.modal h2 {
    margin: 0 0 .75rem 0;
    font-size: clamp(1.25rem, 2.2vw, 1.6rem);
    font-weight: 800;
    color: #0f241c;
}

.modal h3 {
    margin: 1.2rem 0 .3rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #153628;
}

.modal p { margin: .6rem 0; }
.modal ul {
    margin: .4rem 0 .9rem 1.1rem;
    padding: 0;
}
.modal li { margin: .25rem 0; }

.modal a {
    color: #2e7d5c;
    text-decoration: underline;
}

.close {
    position: absolute;
    right: 14px;
    top: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: #f2f6f4;
    color: #173a2c;
    font-size: 22px;
    line-height: 36px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,.08) inset;
    transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.close:hover { background: #e7f1ec; transform: scale(1.05); }
.close:active { transform: scale(.98); }

@media (max-width: 520px) {
    .modal-content { border-radius: 14px; padding: 18px; }
    .close { right: 8px; top: 8px; }
}

/* ===== COOKIE SIDE PANEL (non-blocking) ===== */
.cookie-panel{
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1200;
    width: min(380px, calc(100vw - 24px));
    background: #ffffff;
    border: 1px solid #e6efe9;
    border-radius: 14px;
    box-shadow: 0 14px 44px rgba(7,25,18,.18);
    padding: 14px 14px 12px 14px;
    font-size: 14px;
    color: #1f2e28;
    display: none;   /* показываем через JS при первом визите */
}

.cookie-panel h3{
    margin: 0 0 .35rem 0;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 800;
    color: #0f241c;
}

.cookie-desc{ margin: 0 0 .5rem 0; color:#3a4a44; line-height:1.6; }

.cookie-group{
    display: grid; gap: 8px; margin: 8px 0 10px;
    border-top: 1px dashed #e2ece6; padding-top: 8px;
}
.cookie-row{
    display: grid; grid-template-columns: 1fr auto; align-items: center;
    gap: 10px; background: #f8fbf9; border: 1px solid #eaf2ee; border-radius: 10px; padding: 8px 10px;
}
.cookie-row strong{ display:block; font-weight:700; color:#143a2b; }
.cookie-row small{ display:block; color:#5d6a65; font-size:12.5px; }

.cookie-row input[type="checkbox"]{
    width: 42px; height: 24px; appearance: none; border-radius: 999px; outline: none;
    position: relative; cursor: pointer; background: #dfe8e3; transition: background .2s ease;
}
.cookie-row input[type="checkbox"]::after{
    content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
    border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s ease;
}
.cookie-row input[type="checkbox"]:checked{ background: #2e7d5c; }
.cookie-row input[type="checkbox"]:checked::after{ transform: translateX(18px); }
.cookie-row input[disabled]{ opacity: .7; cursor: not-allowed; }

.cookie-actions{
    display:flex; gap:8px; justify-content: flex-end; align-items: center; margin-top: 6px;
}
.btn{
    border: 1px solid #d9e8e1; background: #eef6f1; color:#123927;
    padding: 8px 12px; border-radius: 10px; cursor: pointer; font-weight: 600;
    transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0); }
.btn.primary{ background: linear-gradient(90deg,#2e7d5c,#3ea46f); color:#fff; border-color: transparent; }
.btn.ghost{ background: #fff; border-color: #dfe8e3; color:#2b3a34; }

.cookie-note{
    margin: 8px 2px 0; font-size: 12.5px; color:#5a6a64; text-align: right;
}
.cookie-note a{ color:#2e7d5c; text-decoration: underline; }

.cookie-close{
    position:absolute; top:6px; right:6px; width:28px; height:28px;
    border:0; border-radius:8px; background:#f1f6f3; color:#1f3a2e; cursor:pointer;
    font-size:18px; line-height:28px; box-shadow: inset 0 0 0 1px #e4efe9;
}
.cookie-close:hover{ background:#e8f2ed; }
@media (max-width: 520px){
    .cookie-panel{ right: 10px; left: 10px; width: auto; }
}



/* === АНИМАЦИИ ОБЩИЕ === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === ДОСТУПНОСТЬ И ФОКУСЫ === */
:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

/* === НЕБОЛЬШИЕ УТИЛИТЫ ДЛЯ СЕТКИ === */
@media (max-width: 720px) {
    .header-container {
        padding: 0 .9rem;
    }

    .cz-article {
        margin: 1.25rem .75rem;
    }

    .map-box {
        margin: 1.75rem .5rem;
    }
}

/* === УБИРАЕМ ДУБЛИРУЮЩЕЕСЯ ОБЪЯВЛЕНИЕ ССЫЛОК === */
.footer__links a {
    /* уже объявлено выше; это правило оставлено для совместимости с исходником */
}

/* ==== ДОП. ПОЛИРОВКА ССЫЛОК В ТЕКСТЕ === */
.cz-article a {
    color: var(--brand-1);
    text-decoration-color: color-mix(in srgb, var(--brand-1) 50%, transparent);
    text-underline-offset: 3px;
    transition: text-decoration-color .2s ease, color .2s ease, background .2s ease;
}

.cz-article a:hover {
    color: #184e42;
    text-decoration-color: currentColor;
    background: linear-gradient(0deg, #ecf7f1, transparent 60%);
    border-radius: 6px;
}
