/*
 * Українці Поруч — Chrome (nav + footer) — єдиний стиль на ВСІХ сторінках
 * Підключається через functions.php для будь-якої сторінки (головна, категорія, single, page).
 * Використовує префікс .ukr-site — клас body додається в header.php.
 */

/* ===== Base reset для нашого chrome ===== */
body.ukr-site { margin: 0; padding: 0; background: #f8f7f3; }
body.ukr-site .site { font-family: 'Georgia', serif; color: #1a1a2e; }

/* Приховуємо старий Astra header/footer — ми рендеримо свій */
body.ukr-site .ast-primary-header-bar,
body.ukr-site .ast-header-break-point .main-header-bar,
body.ukr-site #masthead,
body.ukr-site .site-header,
body.ukr-site .site-footer,
body.ukr-site #colophon,
body.ukr-site .ast-desktop-header,
body.ukr-site .ast-mobile-header,
body.ukr-site #ast-hf-mobile-trigger { display: none !important; }

/* skip-link */
body.ukr-site .skip-link.screen-reader-text {
    position: absolute !important;
    left: -9999px !important;
    top: auto; width: 1px; height: 1px; overflow: hidden;
}
body.ukr-site .skip-link.screen-reader-text:focus {
    left: 10px !important; top: 10px !important;
    width: auto !important; height: auto !important;
    padding: 8px 12px; background: #0057B7; color: #fff;
    z-index: 9999; border-radius: 4px;
}

/* ===== Nav (sticky topbar) ===== */
.ukr-site .nav {
    background: #fff;
    border-bottom: 1px solid #e8e4dc;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.ukr-site .logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.ukr-site .logo-icon-img {
    width: 36px; height: 36px;
    display: block;
    transition: transform .25s ease;
}
.ukr-site .logo:hover .logo-icon-img { transform: scale(1.08) rotate(-3deg); }
@keyframes ukr-heart-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.18); }
}
.ukr-heart-pulsing { animation: ukr-heart-pulse 0.7s ease-in-out infinite; }

/* Heart confetti for waitlist success */
.ukr-confetti {
    position: fixed; inset: 0; pointer-events: none; z-index: 99999;
    overflow: hidden;
}
.ukr-confetti__heart {
    position: absolute; top: -40px;
    font-size: 22px; line-height: 1;
    animation: ukr-confetti-fall linear forwards;
    text-shadow: 0 1px 2px rgba(0,0,0,.15);
    user-select: none;
}
@keyframes ukr-confetti-fall {
    0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
    80%  { opacity: 1; }
    100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .ukr-confetti { display: none; }
    .ukr-heart-pulsing { animation: none; }
}

/* ===== 404 page ===== */
.ukr-404 {
    background: linear-gradient(180deg, #f8f7f3 0%, #fff 100%);
    padding: 60px 20px 80px;
    min-height: 65vh;
}
.ukr-404__inner {
    max-width: 720px; margin: 0 auto; text-align: center;
}
.ukr-404__heart {
    margin: 0 auto 18px; width: 120px; height: 120px;
    animation: ukr-heart-pulse 2.4s ease-in-out infinite;
}
.ukr-404__heart img { display: block; width: 100%; height: 100%; }
.ukr-404__code {
    font-family: 'Georgia', serif;
    font-size: 84px; font-weight: 700;
    color: #0057B7; letter-spacing: -3px;
    line-height: 1; margin-bottom: 8px;
    background: linear-gradient(135deg, #0057B7 0%, #FFD700 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.ukr-404__title {
    font-family: 'Georgia', serif;
    font-size: 30px; font-weight: 700; color: #1a1a2e;
    margin: 0 0 12px;
}
.ukr-404__sub {
    font-size: 16px; color: #555;
    max-width: 540px; margin: 0 auto 28px; line-height: 1.55;
}
.ukr-404__search {
    display: flex; gap: 8px; max-width: 520px; margin: 0 auto 32px;
    background: #fff; border: 2px solid #e8e4dc; border-radius: 12px;
    padding: 6px; transition: border-color .2s;
}
.ukr-404__search:focus-within { border-color: #0057B7; }
.ukr-404__input {
    flex: 1; border: 0; outline: 0; padding: 10px 14px;
    font-size: 15px; background: transparent;
    font-family: 'Helvetica Neue', sans-serif;
}
.ukr-404__submit {
    display: inline-flex; align-items: center; gap: 6px;
    background: #0057B7; color: #fff; border: 0;
    padding: 10px 18px; border-radius: 8px; cursor: pointer;
    font-weight: 600; font-size: 14px;
    transition: background .2s;
}
.ukr-404__submit:hover { background: #003d7a; }
.ukr-404__topics-label {
    font-size: 13px; color: #888; text-transform: uppercase;
    letter-spacing: 1px; margin-bottom: 14px;
}
.ukr-404__topics {
    display: flex; flex-wrap: wrap; gap: 10px;
    justify-content: center; margin-bottom: 32px;
}
.ukr-404__topic {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 16px; border-radius: 24px;
    background: #fff; border: 1px solid #e8e4dc;
    color: #1a1a2e; text-decoration: none; font-size: 14px;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.ukr-404__topic:hover {
    transform: translateY(-2px); border-color: #0057B7;
    box-shadow: 0 4px 12px rgba(0,87,183,.15);
}
.ukr-404__topic-icon { font-size: 18px; }
.ukr-404__actions {
    display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
.ukr-404__btn {
    display: inline-block; padding: 12px 24px; border-radius: 8px;
    text-decoration: none; font-weight: 600; font-size: 14px;
    transition: transform .2s;
}
.ukr-404__btn:hover { transform: translateY(-1px); }
.ukr-404__btn--primary { background: #0057B7; color: #fff; }
.ukr-404__btn--ghost { background: #fff; color: #0057B7; border: 2px solid #0057B7; }
/* ===== Article reading-progress bar (single posts) ===== */
.ukr-read-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0;
    background: linear-gradient(90deg, #0057B7 0%, #FFD700 100%);
    z-index: 9999; transition: width .12s linear;
    box-shadow: 0 1px 3px rgba(0,87,183,.30);
}
.ukr-read-time {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 13px; color: #666; margin-left: 12px;
    font-family: 'Helvetica Neue', sans-serif;
}
.ukr-read-time::before { content: '⏱'; font-size: 14px; }
.ukr-single__meta .ukr-read-time { color: rgba(255,255,255,.92); }

@media (max-width: 600px) {
    .ukr-404 { padding: 40px 16px 60px; }
    .ukr-404__heart { width: 90px; height: 90px; }
    .ukr-404__code { font-size: 64px; }
    .ukr-404__title { font-size: 24px; }
    .ukr-404__search { flex-direction: column; }
    .ukr-404__submit { justify-content: center; }
}
.ukr-site .logo-text {
    font-size: 18px; font-weight: 700;
    color: #0057B7; letter-spacing: -0.3px;
    font-family: 'Georgia', serif;
}
.ukr-site .logo-text span { color: #FFD700; }
.ukr-site .nav-links {
    display: flex; gap: 24px; font-size: 13px;
    font-family: 'Helvetica Neue', sans-serif;
}
.ukr-site .nav-links a { color: #555; text-decoration: none; }
.ukr-site .nav-links a:hover { color: #0057B7; }
.ukr-site .nav-cta {
    background: #0057B7; color: #fff !important;
    padding: 7px 16px; border-radius: 6px;
    font-weight: 600; font-size: 12px;
}
.ukr-site .nav-cta:hover { background: #004a99; color: #fff !important; }

/* Burger toggle (mobile only) */
.ukr-site .nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    width: 44px; height: 44px;
    padding: 0;
    cursor: pointer;
    flex-direction: column;
    align-items: center; justify-content: center;
    gap: 4px;
}
.ukr-site .nav-toggle-bar {
    display: block;
    width: 18px; height: 2px;
    background: #0057B7; border-radius: 2px;
}
.ukr-site .nav-toggle:hover { border-color: #0057B7; }

/* ===== Footer v6 (5-column + mini-Impressum) ===== */
.footer { background: #1a1a2e; padding: 48px 32px 24px; }
.footer-inner { max-width: 1240px; margin: 0 auto; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr 1.1fr;
    gap: 32px;
    margin-bottom: 28px;
}
.footer-col nav { display: flex; flex-direction: column; gap: 8px; }
.footer-col nav a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 13px;
    font-family: 'Helvetica Neue', sans-serif;
    transition: color 0.15s;
}
.footer-col nav a:hover { color: #FFD700; }
.footer-col-title {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    font-family: 'Helvetica Neue', sans-serif;
}
.footer-logo {
    color: #fff; font-size: 18px; font-weight: 700;
    margin-bottom: 6px;
    font-family: 'Georgia', serif;
}
.footer-logo span { color: #FFD700; }
.footer-desc {
    color: rgba(255,255,255,0.45);
    font-size: 13px;
    font-family: 'Helvetica Neue', sans-serif;
    line-height: 1.5;
    margin-bottom: 16px;
}
.footer-impressum {
    background: rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    font-family: 'Helvetica Neue', sans-serif;
    line-height: 1.5;
}
.footer-impressum strong {
    color: rgba(255,255,255,0.55);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.footer-impressum a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
}
.footer-impressum a:hover { color: #FFD700; }
.footer-legal-strip {
    background: rgba(0,0,0,0.25);
    border-radius: 10px;
    padding: 10px 18px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    align-items: center;
}
.fls-label {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    font-weight: 700;
    font-family: 'Helvetica Neue', sans-serif;
}
.footer-legal-strip a {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    font-family: 'Helvetica Neue', sans-serif;
}
.footer-legal-strip a:hover { color: #FFD700; }
.footer-line {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: rgba(255,255,255,0.3);
    font-size: 12px;
    font-family: 'Helvetica Neue', sans-serif;
    flex-wrap: wrap;
    gap: 8px;
}
.footer-line a {
    color: rgba(255,255,255,0.45);
    text-decoration: none;
}
.footer-line a:hover { color: #FFD700; }

/* ===== Cookie Banner ===== */
.cookie-banner {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #1a1a2e;
    color: #fff;
    padding: 20px 24px;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}
.cb-icon { font-size: 28px; margin-bottom: 6px; }
.cb-title {
    font-size: 16px; font-weight: 700;
    margin-bottom: 6px;
    font-family: 'Georgia', serif;
}
.cb-text {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    line-height: 1.5;
    margin-bottom: 14px;
    font-family: 'Helvetica Neue', sans-serif;
    max-width: 700px;
}
.cb-text a { color: #FFD700; text-decoration: underline; }
.cb-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cb-btn {
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid rgba(255,255,255,0.25);
    font-family: 'Helvetica Neue', sans-serif;
    transition: all 0.15s;
}
.cb-reject { background: transparent; color: #fff; }
.cb-reject:hover { border-color: #fff; }
.cb-settings { background: transparent; color: #fff; }
.cb-settings:hover { border-color: #FFD700; color: #FFD700; }
.cb-accept { background: #0057B7; color: #fff; border-color: #0057B7; }
.cb-accept:hover { background: #004a99; }

/* Cookie modal */
.cookie-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(10,20,40,0.55);
    display: flex;
    align-items: center; justify-content: center;
    z-index: 10000;
    padding: 20px;
}
.cookie-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 480px; width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
}
.cm-title {
    font-size: 20px; font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
    font-family: 'Georgia', serif;
}
.cm-sub {
    font-size: 13px; color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
    font-family: 'Helvetica Neue', sans-serif;
}
.cm-group {
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
}
.cm-group-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cm-group-name {
    font-size: 14px; font-weight: 600;
    color: #1a1a2e;
    font-family: 'Helvetica Neue', sans-serif;
}
.cm-always {
    color: #22c55e;
    font-weight: 800;
    font-size: 11px;
}
.cm-group-desc {
    font-size: 12px; color: #888;
    margin-top: 6px;
    line-height: 1.4;
    font-family: 'Helvetica Neue', sans-serif;
}
.cm-switch {
    width: 44px; height: 24px;
    background: #ddd;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}
.cm-switch::after {
    content: '';
    width: 18px; height: 18px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 3px; left: 3px;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.cm-switch.on { background: #0057B7; }
.cm-switch.on::after { transform: translateX(20px); }
.cm-switch.locked { background: #22c55e; pointer-events: none; }
.cm-switch.locked::after { transform: translateX(20px); }
.cm-actions {
    display: flex; gap: 10px;
    margin-top: 18px;
}
.cm-btn {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Helvetica Neue', sans-serif;
    border: none;
}
.cm-save { background: #f5f5f5; color: #333; }
.cm-save:hover { background: #e8e8e8; }
.cm-accept-all { background: #0057B7; color: #fff; }
.cm-accept-all:hover { background: #004a99; }

/* ===== Responsive nav/footer ===== */
@media (max-width: 760px) {
    .ukr-site .nav { padding: 0 16px; position: relative; }
    .ukr-site .nav-toggle { display: inline-flex; }
    .ukr-site .nav-links {
        display: none;
        position: absolute;
        top: 60px; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        background: #fff;
        border-bottom: 1px solid #e8e4dc;
        box-shadow: 0 8px 16px rgba(0,0,0,0.08);
        padding: 12px 16px;
        gap: 2px;
        z-index: 99;
    }
    .ukr-site .nav-links.is-open { display: flex; }
    .ukr-site .nav-links a {
        padding: 12px 8px;
        font-size: 15px;
        border-bottom: 1px solid #f0ede5;
    }
    .ukr-site .nav-links a:last-child { border-bottom: none; }
    .ukr-site .nav-links .nav-cta {
        margin-top: 8px;
        text-align: center;
        border-bottom: none;
        color: #fff !important;
    }
    .footer { padding: 32px 16px 20px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .footer-line { flex-direction: column; align-items: flex-start; }
    .cookie-banner { padding: 16px; }
    .cb-actions { flex-direction: column; }
    .cb-btn { width: 100%; text-align: center; }
}

/* Footer tablet */
@media (min-width: 761px) and (max-width: 980px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 981px) and (max-width: 1199px) {
    .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; }
    .footer-col--legal-de, .footer-col--legal-extra { grid-column: span 1; }
}
.footer-impressum { font-size: 11px; line-height: 1.5; color: rgba(255,255,255,0.55); margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.08); }
.footer-impressum strong { color: rgba(255,255,255,0.75); display: block; margin-bottom: 4px; }
.footer-impressum a { color: rgba(255,255,255,0.6); }
.footer-impressum a:hover { color: #FFD700; }
