/* ==========================================================================
   1. VARIABLES & BASE SETUP (Figma Design System)
   ========================================================================== */
@font-face {
    font-family: 'Vinnytsia Sans';
    src: url('../fonts/VinnytsiaSans-Regular.woff2') format('woff2');
    font-weight: 400;
}
@font-face {
    font-family: 'Vinnytsia Sans';
    src: url('../fonts/VinnytsiaSans-Bold.woff2') format('woff2');
    font-weight: 700;
}
@font-face {
    font-family: 'Mariupol';
    src: url('../fonts/Mariupol-Regular.woff2') format('woff2');
    font-weight: 400;
}
@font-face {
    font-family: 'Mariupol';
    src: url('../fonts/Mariupol-Bold.woff2') format('woff2');
    font-weight: 700;
}

:root {
    --dark-brown: #030114; 
    --teal: #009180;
    --mint: #81C49F;
    --orange: #EF7B24;
    --red: #CE3629;
    --white: #FFFFFF;
    --cream: #EDF0C9;
    --paper: #f7f8ea;
    --ink: #1d1d1b;
    
    --display: 'Vinnytsia Sans', sans-serif;
    --body: 'Mariupol', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--body);
    background: var(--paper);
    color: var(--ink);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; transition: opacity .2s; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ==========================================================================
   2. BUTTONS & SHARED UI
   ========================================================================== */
.btn {
    font-family: var(--body);
    font-weight: 700;
    font-size: 15px;
    padding: 16px 32px;
    border-radius: 100px;
    text-decoration: none;
    display: inline-block;
    transition: transform .18s ease, box-shadow .18s ease;
    border: 2px solid transparent;
    cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { 
    background: var(--teal); 
    color: var(--white); 
    box-shadow: 0 10px 30px rgba(0, 145, 128, .35); 
}
.btn-ghost { 
    border-color: rgba(129, 196, 159, .5); 
    color: var(--cream); 
}
.btn-ghost:hover { 
    border-color: var(--mint); 
    background: rgba(129, 196, 159, .08); 
}
.btn-dark { 
    background: var(--dark-brown); 
    color: var(--cream); 
    box-shadow: 0 10px 24px rgba(3, 1, 20, .35); 
}
.btn-dark:hover { background: #161233; }

.btn-orange-glow {
    background: var(--orange) !important;
    color: #000000 !important;
    border-radius: 100px;
    box-shadow: 0 0 25px rgba(239, 123, 36, 0.5);
    text-transform: uppercase;
    font-weight: 800;
    border: none;
}
.btn-orange-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 35px rgba(239, 123, 36, 0.75);
}

.btn-outline-white {
    background: transparent !important;
    color: var(--white) !important;
    border: 1px solid var(--white) !important;
    border-radius: 100px;
    text-transform: uppercase;
    font-weight: 700;
}
.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.12) !important;
}

.eyebrow {
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
    font-size: 12.5px;
    color: var(--mint);
    margin-bottom: 14px;
    display: block;
    font-family: var(--body);
}

/* ==========================================================================
   3. NAVIGATION & FOOTER
   ========================================================================== */
.topbar {
    position: fixed; 
    top: 0; left: 0; right: 0; 
    z-index: 1000; 
    padding: 18px 0; 
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}
.topbar .wrap { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
}
.topbar-logo { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    font-family: var(--display); 
    font-weight: 700; 
    color: var(--white); 
    font-size: 15px; 
    letter-spacing: .02em; 
    text-transform: uppercase; 
}
.topbar-logo img { width: 34px; height: 34px; object-fit: contain; }
.topbar nav { display: flex; gap: 30px; align-items: center; }
.topbar nav a { 
    color: var(--white); 
    font-size: 14px; 
    font-weight: 600; 
    opacity: .85; 
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.topbar nav a:hover { opacity: 1; color: var(--mint); }
.topbar nav a.lang-pill {
    background: var(--white);
    color: #000000;
    padding: 6px 14px;
    border-radius: 20px;
    margin-left: 10px;
    font-weight: 800;
    opacity: 1;
}

@media (max-width: 768px){ .topbar nav { display: none; } }

footer { 
    background: #000000; 
    padding: 70px 0 34px; 
    position: relative; 
    overflow: hidden; 
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
}
.footer-top { 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-start; 
    gap: 40px; 
    flex-wrap: wrap; 
    padding-bottom: 48px; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); 
}
.footer-logo { display: flex; align-items: center; gap: 12px; }
.footer-logo img { width: 46px; }
.footer-logo span { 
    font-family: var(--display); 
    font-weight: 700; 
    color: var(--white); 
    font-size: 16px; 
    text-transform: uppercase; 
    letter-spacing: .02em; 
}
.footer-tag { max-width: 280px; color: rgba(255, 255, 255, 0.6); font-size: 14px; line-height: 1.6; }
.footer-links { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-links h5 { 
    font-family: var(--body); 
    font-size: 12px; 
    letter-spacing: .16em; 
    text-transform: uppercase; 
    color: var(--orange); 
    margin-bottom: 16px; 
}
.footer-links a { display: block; color: rgba(255, 255, 255, 0.75); font-size: 14.5px; margin-bottom: 10px; }
.footer-links a:hover { color: var(--white); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 26px; flex-wrap: wrap; gap: 14px; }
.footer-bottom p { color: rgba(255, 255, 255, 0.45); font-size: 13px; }

/* ==========================================================================
   4. HERO SECTION WITH ANIMATED TWINKLING STARS
   ========================================================================== */
.hero {
    position: relative; 
    min-height: 100vh;
    background-color: #000000;
    color: var(--white);
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center;
    padding: 120px 24px 80px; 
    overflow: hidden;
}

/* Star layer pseudo-elements (Emoji Stars) */
.hero::before,
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

/* Layer 1: Slow fading emoji constellation */
.hero::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='500' height='500'%3E%3Ctext x='70' y='90' font-size='20'%3E✨%3C/text%3E%3Ctext x='260' y='220' font-size='22'%3E⭐%3C/text%3E%3Ctext x='410' y='120' font-size='16'%3E🌟%3C/text%3E%3Ctext x='160' y='400' font-size='20'%3E✨%3C/text%3E%3Ctext x='430' y='420' font-size='18'%3E⭐%3C/text%3E%3C/svg%3E");
    background-size: 500px 500px;
    animation: twinkle-slow 6s ease-in-out infinite alternate;
}

/* Layer 2: Offset constellation with different timings and coordinates */
.hero::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='620' height='620'%3E%3Ctext x='140' y='180' font-size='22'%3E⭐%3C/text%3E%3Ctext x='320' y='80' font-size='18'%3E✨%3C/text%3E%3Ctext x='510' y='270' font-size='20'%3E🌟%3C/text%3E%3Ctext x='80' y='500' font-size='18'%3E✨%3C/text%3E%3Ctext x='360' y='540' font-size='22'%3E⭐%3C/text%3E%3C/svg%3E");
    background-size: 620px 620px;
    animation: twinkle-fast 4s ease-in-out infinite alternate;
    animation-delay: 1.5s;
}

@keyframes twinkle-slow {
    0%   { opacity: 0.15; transform: scale(0.96); }
    50%  { opacity: 0.9; }
    100% { opacity: 0.10; transform: scale(1.02); }
}

@keyframes twinkle-fast {
    0%   { opacity: 0.85; }
    40%  { opacity: 0.1; }
    75%  { opacity: 0.75; }
    100% { opacity: 0.2; }
}

.hero-inner { 
    position: relative; 
    z-index: 5; 
    max-width: 820px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.75rem;
}

.hero-title { 
    font-family: var(--display); 
    font-weight: 800; 
    color: var(--white); 
    font-size: clamp(32px, 4vw, 48px); 
    line-height: 1.15; 
    text-transform: uppercase; 
    letter-spacing: 0.02em;
}

.hero-logo-ring { 
    position: relative; 
    width: 290px; 
    height: 290px; 
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.5rem 0;
}

.hero-logo-ring img.center-logo { 
    width: 100%; 
    height: auto; 
    object-fit: contain; 
    position: relative; 
    z-index: 3; 
    border: none !important;
    border-radius: 0 !important;
}

.orbit { 
    position: absolute; 
    inset: 0; 
    animation: spin 60s linear infinite; 
}
.orbit.rev { 
    animation-direction: reverse; 
    animation-duration: 90s; 
}

.spin-item {
    position: absolute;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.4));
    animation: spin-rev 60s linear infinite; 
}
.orbit.rev .spin-item { animation: spin 90s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-rev { to { transform: rotate(-360deg); } }

.hero p.sub { 
    font-family: var(--body);
    font-size: 13px; 
    line-height: 1.7; 
    color: var(--white); 
    max-width: 700px; 
    margin: 0; 
    font-weight: 500; 
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.92;
}

.hero-ctas { 
    display: flex; 
    gap: 18px; 
    justify-content: center; 
    flex-wrap: wrap; 
    margin-top: 0.5rem;
}

.hero-bottom-left {
    position: absolute;
    bottom: 40px;
    left: 40px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    color: var(--white);
    font-family: var(--display);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: left;
    line-height: 1.4;
    z-index: 10;
}
.hero-bottom-left .vertical-line {
    width: 2px;
    height: 40px;
    background: var(--white);
}

.hero-bottom-right {
    position: absolute;
    bottom: 40px;
    right: 40px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 18px 24px;
    border-radius: 8px;
    text-align: left;
    max-width: 320px;
    font-family: var(--body);
    color: var(--white);
    z-index: 10;
}
.widget-label {
    font-family: var(--display);
    color: rgba(255, 255, 255, 0.65);
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 700;
}
.widget-date {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    margin-bottom: 4px;
}
.widget-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}
.widget-loc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 900px) {
    .hero-bottom-left, .hero-bottom-right {
        position: static;
        margin-top: 2rem;
    }
}

/* ==========================================================================
   5. SECTIONS, HEADERS & 3x2 PROGRAM CARDS (Restored)
   ========================================================================== */
section { 
    position: relative; 
    padding: 100px 0 110px; 
}

.about, .program { 
    background: var(--cream); 
    color: var(--ink);
}

.section-head { 
    max-width: 640px; 
    margin-bottom: 56px; 
}
.section-head .eyebrow {
    color: var(--teal);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
    margin-bottom: 14px;
    display: block;
}
.section-head h2 { 
    font-family: var(--display); 
    font-weight: 700; 
    font-size: clamp(30px, 4vw, 44px); 
    line-height: 1.08; 
    color: var(--dark-brown); 
    text-transform: uppercase; 
}
.section-head p { 
    margin-top: 18px; 
    font-size: 17px; 
    line-height: 1.7; 
    color: #3b3b38; 
}

/* 3x2 Dark Cards Container */
.cards { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 2px; 
    background: rgba(3, 1, 20, 0.18); 
    border-radius: 22px; 
    overflow: hidden; 
}
.card { 
    background: var(--dark-brown); 
    padding: 44px 32px; 
    transition: background .25s ease; 
    display: flex; 
    flex-direction: column; 
    gap: 18px; 
}
.card:hover { 
    background: #141033; 
}
.card h3 { 
    font-family: var(--display); 
    font-size: 19px; 
    color: var(--white); 
    font-weight: 600; 
    line-height: 1.3; 
}
.card p { 
    font-size: 15px; 
    line-height: 1.65; 
    color: rgba(255, 255, 255, 0.76); 
}

@media (max-width: 900px){ .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px){ .cards { grid-template-columns: 1fr; } }

/* ==========================================================================
   6. DETAILS SECTION ("ДЕ І КОЛИ" Upcoming Event)
   ========================================================================== */
.details { 
    background: var(--cream); 
    padding: 100px 0 130px; 
    color: var(--ink);
}
.details-card { 
    background: var(--paper); 
    border-radius: 28px; 
    padding: 60px; 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 50px; 
    box-shadow: 0 30px 70px rgba(0, 0, 0, .08); 
    position: relative; 
    overflow: hidden; 
}
.details-card::before { 
    content: ""; 
    position: absolute; 
    inset: 0; 
    border: 1px solid rgba(0, 0, 0, .08); 
    border-radius: 28px; 
    pointer-events: none; 
}
.detail-item { 
    display: flex; 
    gap: 18px; 
    align-items: flex-start; 
    margin-bottom: 28px; 
}
.detail-item .dot { 
    width: 44px; 
    height: 44px; 
    border-radius: 12px; 
    background: rgba(0, 145, 128, .14); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    flex-shrink: 0; 
}
.detail-item h4 { 
    font-family: var(--display); 
    font-size: 12.5px; 
    letter-spacing: .14em; 
    text-transform: uppercase; 
    color: var(--teal); 
    margin-bottom: 6px; 
}
.detail-item p { 
    font-size: 19px; 
    font-weight: 700; 
    color: var(--ink); 
    line-height: 1.4; 
}
.details-right { 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    gap: 22px; 
}

@media (max-width: 860px){ 
    .details-card { grid-template-columns: 1fr; padding: 38px 26px; } 
}

/* ==========================================================================
   7. BLOG & FEED PAGES
   ========================================================================== */
.blog-feed { 
    display: flex; 
    flex-direction: column; 
    width: 100%; 
    max-width: 1180px; 
    margin: 130px auto 40px; 
}
.blog-card { 
    display: flex; 
    flex-direction: row; 
    height: 33.33vh; 
    min-height: 280px; 
    border-bottom: 1px solid rgba(0, 0, 0, .1); 
    background-color: var(--paper); 
    overflow: hidden; 
    transition: background .2s ease; 
}
.blog-card:hover { background-color: var(--cream); }

.blog-image { 
    flex: 1; 
    background-color: transparent !important; 
    overflow: hidden; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
}
.blog-image img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.blog-text { 
    flex: 1; 
    padding: 2rem 4rem; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: flex-start; 
    gap: 12px; 
    overflow-y: auto; 
    color: var(--ink);
}
.blog-text h2 { 
    font-family: var(--display); 
    font-size: 1.8rem; 
    margin-bottom: 10px; 
    color: var(--ink); 
}
.blog-text h2 a { color: var(--ink); transition: color .3s ease; }
.blog-text h2 a:hover { color: var(--orange); }

.badge-ui { 
    display: inline-block; 
    background: var(--teal); 
    color: var(--white); 
    padding: 4px 10px; 
    border-radius: 6px; 
    font-size: 0.85rem; 
    font-weight: 800; 
    margin-bottom: 12px; 
    width: max-content; 
    font-family: var(--display); 
    text-transform: uppercase; 
}

.post-detail-container { 
    max-width: 1180px; 
    margin: 3rem auto; 
    padding: 0 32px; 
    display: flex; 
    gap: 3rem; 
    align-items: flex-start; 
}
.post-media { 
    flex: 1; 
    position: sticky; 
    top: 120px; 
    border-radius: 24px; 
    overflow: hidden; 
    background-color: transparent !important; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    box-shadow: 0 20px 50px rgba(0, 0, 0, .2); 
}
.post-media img { 
    width: 100%; 
    height: auto; 
    object-fit: contain; 
}
.post-content { 
    flex: 1.2; 
    padding-bottom: 40px; 
    color: var(--ink);
}
.post-content h1 { 
    font-family: var(--display); 
    font-size: 2.8rem; 
    line-height: 1.1; 
    margin-bottom: 15px; 
    color: var(--dark-brown); 
    text-transform: uppercase; 
}
.post-content .meta { 
    font-weight: 600; 
    color: var(--orange); 
    margin-bottom: 2rem; 
    padding-bottom: 1rem; 
    border-bottom: 1px solid rgba(0, 0, 0, .1); 
    letter-spacing: 0.05em; 
}
.content-section { 
    font-size: 17px; 
    line-height: 1.8; 
    color: var(--ink); 
    margin-bottom: 2.5rem; 
}
.content-section h3 { 
    font-family: var(--display); 
    font-size: 1.5rem; 
    margin-bottom: 1rem; 
    color: var(--teal); 
    text-transform: uppercase; 
}

@media (max-width: 768px) {
    .blog-card { flex-direction: column; height: 100vh; }
    .blog-image { flex: 0 0 45%; }
    .blog-text { flex: 0 0 55%; padding: 1.5rem; }
    .post-detail-container { flex-direction: column; }
    .post-media { position: relative; top: 0; }
}