/* Public — mobile-first, синьо-жовта палітра за замовчуванням */
@font-face {
    font-family: "Manrope";
    src: local("Manrope"), local("Segoe UI");
    font-display: swap;
}

:root {
    --color-primary: #0057B8;
    --color-secondary: #FFD700;
    --color-accent: #0A2F5C;
    --color-bg: #f5f7fb;
    --color-surface: #ffffff;
    --color-text: #1a1f2e;
    --color-muted: #5c6578;
    --radius: 10px;
    --shadow: 0 8px 24px rgba(10, 47, 92, 0.08);
    --font-main: "Manrope", "Segoe UI", sans-serif;
    --container: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-main);
    color: var(--color-text);
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(0, 87, 184, 0.12), transparent 60%),
        radial-gradient(900px 500px at 100% 0%, rgba(255, 215, 0, 0.18), transparent 55%),
        var(--color-bg);
    line-height: 1.55;
    min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration-thickness: 1px; }
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 3px solid var(--color-secondary);
    outline-offset: 2px;
}

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.skip-link {
    position: absolute; left: -9999px; top: 0; background: var(--color-accent); color: #fff; padding: .75rem 1rem; z-index: 1000;
}
.skip-link:focus { left: 0; }

.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }

.site-header {
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(10,47,92,.08);
    position: sticky; top: 0; z-index: 50;
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; min-height: 4rem;
}
.logo { display: inline-flex; align-items: center; text-decoration: none; color: var(--color-accent); font-weight: 700; }
.logo-text { font-size: 1.05rem; letter-spacing: -.01em; }
.logo-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(10, 47, 92, 0.08);
}

.nav-toggle {
    display: inline-flex; flex-direction: column; gap: 5px;
    background: transparent; border: 0; padding: .5rem; cursor: pointer;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--color-accent); }

.site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--color-surface); padding: 1rem; box-shadow: var(--shadow);
}
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.site-nav a { text-decoration: none; color: var(--color-text); font-weight: 600; }
.header-cta { margin-top: 1rem; display: inline-flex; }

@media (min-width: 840px) {
    .nav-toggle { display: none; }
    .site-nav {
        display: flex !important; position: static; background: transparent;
        box-shadow: none; padding: 0; align-items: center; gap: 1.5rem;
    }
    .site-nav ul { display: flex; gap: 1.25rem; }
    .header-cta { margin-top: 0; }
}

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: .5rem; padding: .7rem 1.2rem; border-radius: 999px;
    border: 2px solid transparent; font-weight: 700; text-decoration: none;
    cursor: pointer; font: inherit;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-accent); }
.btn-secondary { background: var(--color-secondary); color: var(--color-accent); }
.btn-link { border-radius: 0; padding: 0; color: var(--color-primary); background: transparent; }

.hero {
    padding: 3.5rem 0 2.5rem;
    background:
        linear-gradient(135deg, rgba(0,87,184,.92), rgba(10,47,92,.88)),
        url('/assets/img/hero-placeholder.svg') center/cover;
    color: #fff;
}
.hero h1 { margin: 0 0 .75rem; font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.15; max-width: 16ch; }
.hero-lead { margin: 0 0 1.5rem; max-width: 40ch; opacity: .95; font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.section { padding: 2.5rem 0; }
.prose h1, .prose h2 { color: var(--color-accent); line-height: 1.2; }
.content-html p { margin: 0 0 1rem; }

.site-footer {
    margin-top: 3rem; background: var(--color-accent); color: #e8eef8; padding: 2.5rem 0 1.5rem;
}
.site-footer a { color: var(--color-secondary); }
.footer-grid { display: grid; gap: 1.5rem; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.2fr 1fr; } }
.footer-bottom { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.15); }
.footer-socials, .footer-links { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: .5rem; }

/* Alerts (public forms) */
.alert { padding: .85rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; }
.alert-error { background: #fef3f2; color: #b42318; border: 1px solid #fecdca; }
.alert-success { background: #ecfdf3; color: #067647; border: 1px solid #abefc6; }

/* Заголовок секції з посиланням "детальніше" */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.hero-lead-sm { margin-top: -.5rem; }

/* Картки (звіти, галерея) */
.cards-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 1.5rem; }
.card { display: block; background: var(--color-surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: inherit; }
.card-img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.card-body { padding: 1rem 1.1rem; }
.card-body h3 { margin: 0 0 .4rem; color: var(--color-accent); font-size: 1.05rem; }
.card-body p { margin: 0 0 .5rem; color: var(--color-muted); font-size: .92rem; }
.card-body time { font-size: .8rem; color: var(--color-muted); }

/* Фільтри категорій */
.filter-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.chip { padding: .4rem .9rem; border-radius: 999px; background: #fff; text-decoration: none; color: var(--color-text); font-size: .85rem; font-weight: 600; box-shadow: 0 2px 8px rgba(10,47,92,.06); }
.chip.is-active { background: var(--color-primary); color: #fff; }

/* Пагінація */
.pagination { display: flex; gap: .4rem; margin-top: 2rem; flex-wrap: wrap; }
.page-link { display: inline-flex; min-width: 2.2rem; height: 2.2rem; align-items: center; justify-content: center; border-radius: 8px; background: #fff; text-decoration: none; color: var(--color-text); font-weight: 700; }
.page-link.is-active { background: var(--color-primary); color: #fff; }

/* Лайтбокс — сітка мініатюр */
.lightbox-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin-top: 1.25rem; }
.lightbox-thumb { position: relative; display: block; border-radius: 8px; overflow: hidden; aspect-ratio: 1; }
.lightbox-thumb img { width: 100%; height: 100%; object-fit: cover; }
.play-badge { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(10,47,92,.35); color: #fff; font-size: 1.4rem; }

.lightbox-overlay { position: fixed; inset: 0; background: rgba(5,15,30,.92); z-index: 2000; display: flex; align-items: center; justify-content: center; }
.lightbox-stage { max-width: min(92vw, 1100px); max-height: 88vh; }
.lightbox-stage img, .lightbox-stage video { max-width: 100%; max-height: 88vh; border-radius: 8px; }
.lightbox-close { position: absolute; top: 1rem; right: 1rem; background: rgba(255,255,255,.15); color: #fff; border: 0; width: 2.4rem; height: 2.4rem; border-radius: 999px; font-size: 1.5rem; cursor: pointer; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.15); color: #fff; border: 0; width: 2.6rem; height: 2.6rem; border-radius: 999px; font-size: 1.6rem; cursor: pointer; }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
body.lightbox-open { overflow: hidden; }

/* Відео */
.video-embed, .video-embed-frame { position: relative; width: 100%; aspect-ratio: 16/9; margin: 1.25rem 0; border-radius: var(--radius); overflow: hidden; background: #000; }
.video-embed-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Поширення запису */
.share-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; font-size: .9rem; }
.share-row a { text-decoration: none; font-weight: 700; }
.btn-text { background: transparent; border: 0; color: var(--color-primary); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }

/* Форми (контакти, волонтер, донат) */
.two-col { display: grid; gap: 2rem; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } }
.form-card { background: var(--color-surface); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); display: grid; gap: 1rem; }
.form-card label { display: grid; gap: .35rem; font-weight: 600; font-size: .92rem; }
.form-card input[type="text"], .form-card input[type="email"], .form-card input[type="tel"],
.form-card input[type="number"], .form-card input[type="password"], .form-card select, .form-card textarea {
    width: 100%; padding: .65rem .8rem; border: 1px solid #d5deec; border-radius: 8px; font: inherit;
}
.checkbox-label { display: flex !important; flex-direction: row; align-items: flex-start; gap: .5rem; font-weight: 500 !important; font-size: .88rem !important; }
.checkbox-label input { margin-top: .2rem; }
.field-error { color: #b42318; font-weight: 600; }
.hp-field { position: absolute; left: -9999px; top: -9999px; }

/* Донат */
.method-option { display: block; border: 1px solid #d5deec; border-radius: 10px; padding: .75rem .9rem; cursor: pointer; }
.method-option input { margin-right: .5rem; }
.method-option-title { font-weight: 700; }
.method-option-desc { display: block; font-size: .82rem; color: var(--color-muted); margin-top: .2rem; }
.narrow { max-width: 560px; }
.pay-box { margin-top: 1.25rem; }
.pay-requisites, .pay-crypto, .pay-link { display: grid; gap: .6rem; }
.pay-row { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem .8rem; background: #f5f7fb; border-radius: 8px; align-items: center; flex-wrap: wrap; }
.pay-row strong[data-copy] { cursor: pointer; text-decoration: underline dotted; }
.pay-row strong.is-copied::after { content: " ✓"; color: #067647; }
.pay-crypto-row { flex-direction: column; align-items: flex-start; }
.pay-qr { margin-top: .5rem; }
.pay-qr img { border-radius: 8px; }
.pay-redirect-form { display: grid; gap: .75rem; }

/* Секції головної */
.stats-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-top: 1.25rem; text-align: center; }
.stat-item-value { display: block; font-size: 2rem; font-weight: 800; color: var(--color-primary); }
.stat-item-label { display: block; color: var(--color-muted); font-size: .9rem; }
.section-help, .section-cta, .section-contacts { background: #fff; border-radius: var(--radius); padding: 2rem; }
.help-methods { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1rem 0; }
.help-method-chip { padding: .4rem .9rem; border-radius: 999px; background: #f5f7fb; font-size: .85rem; font-weight: 600; }
.section-cta { background: linear-gradient(135deg, var(--color-primary), var(--color-accent)); color: #fff; text-align: center; }
.section-cta a { color: var(--color-accent); }
.partners-row { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; margin-top: 1rem; }
.partners-row img { max-height: 56px; }

/* Документи */
.documents-list { list-style: none; padding: 0; display: grid; gap: .5rem; }
.documents-list a { text-decoration: none; font-weight: 600; }

/* Карта */
.map-embed { margin-top: 1rem; border-radius: var(--radius); overflow: hidden; }
.map-embed iframe { width: 100%; min-height: 280px; border: 0; }

/* Кукі-банер */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; background: var(--color-accent); color: #fff; z-index: 500; box-shadow: 0 -8px 24px rgba(0,0,0,.15); }
.cookie-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; flex-wrap: wrap; }
.cookie-inner p { margin: 0; font-size: .9rem; }
