/* ==========================================================================
   ПРЕМІАЛЬНІ СТИЛІ СТОРІНКИ "ЗАХОДИ ТА ПОДІЇ" (styleevents.css)
   БЛАКИТНО-БІЛА ПАЛІТРА (Electric Cyan & Ice White) + ФІКС ГОРИЗОНТАЛЬНОГО СКРОЛУ
   ========================================================================== */
:root {
    --brand-dark-blue: #0B132B; /* Щонайглибший преміальний фон */
    --brand-navy: #1C2541;      /* Начений синій */
    --brand-cyan: #0EA5E9;      /* Яскравий блакитно-блакитний (Cyan) */
    --brand-cyan-hover: #0284C7;
    --brand-sky: #38BDF8;       /* Небесно-блакитний акцент */
    --brand-cyan-glow: rgba(14, 165, 233, 0.4);
    --text-white: #FFFFFF;
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

/* ФІКС: БОРОТЬБА ЗІ ЗСУВОМ ВПРАВО */
html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative;
}

html {
    scroll-behavior: smooth;
    font-family: var(--font-main);
    background-color: var(--brand-dark-blue);
    color: var(--text-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* ФОНОВІ СЯЮЧІ СФЕРИ (БЕЗ ВИХОДУ ЗА МЕЖІ ЕКРАНА) */
.ambient-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(130px);
    pointer-events: none;
    z-index: 1;
    max-width: 100vw;
}

.sphere-1 {
    top: 100px;
    left: 0;
    width: 350px;
    height: 350px;
    background: rgba(14, 165, 233, 0.18);
}

.sphere-2 {
    top: 600px;
    right: 0;
    width: 350px;
    height: 350px;
    background: rgba(56, 189, 248, 0.12);
}

/* Скляні панелі */
.glass {
    background: rgba(11, 19, 43, 0.85);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 15px 45px rgba(11, 19, 43, 0.35);
}

/* ШАПКА */
.main-header { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; padding: 16px 0; }
.header-limit { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.nav-container { display: flex; justify-content: space-between; align-items: center; padding: 12px 24px; border-radius: 20px; }
.logo a { font-size: 1.25rem; font-weight: 800; color: #FFF; text-decoration: none; }
.logo .gold-text { color: var(--brand-sky); text-shadow: 0 0 10px rgba(56, 189, 248, 0.4); }
.nav-menu { display: flex; list-style: none; gap: 24px; }
.nav-link { color: rgba(255, 255, 255, 0.85); text-decoration: none; font-size: 0.88rem; font-weight: 600; transition: var(--transition-smooth); }
.nav-link.active, .nav-link:hover { color: var(--brand-sky); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch { background: none; border: none; color: #FFF; font-weight: 700; cursor: pointer; }

/* PAGE HERO */
.page-hero { padding: 160px 0 30px 0; text-align: center; position: relative; z-index: 10; }

.hero-badge-gold {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: var(--brand-sky);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.badge-pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--brand-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--brand-cyan);
}

.page-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: #FFFFFF;
    margin: 10px 0 16px 0;
    letter-spacing: -1px;
}

.page-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: #94A3B8;
    max-width: 760px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 1. ПАНЕЛЬ ФІЛЬТРІВ */
.events-main-section { padding: 30px 0 100px 0; position: relative; z-index: 10; }

.events-filter-bar {
    border-radius: 28px;
    padding: 20px 24px;
    margin-bottom: 44px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.status-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #94A3B8;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--brand-cyan);
    color: #FFFFFF;
    border-color: var(--brand-cyan);
    box-shadow: 0 6px 20px var(--brand-cyan-glow);
}

.filter-selects {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.custom-select {
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.25);
    background: rgba(28, 37, 65, 0.9);
    color: #FFFFFF;
    font-size: 0.88rem;
    font-weight: 700;
    outline: none;
    cursor: pointer;
    max-width: 100%;
}

.custom-select option { background: #0B132B; color: #FFF; }

/* 2. СІТКА КАРТОК ПОДІЙ */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 32px;
    margin-bottom: 90px;
}

.event-card {
    border-radius: 28px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    border: 1px solid rgba(56, 189, 248, 0.18);
}

.event-card:hover {
    transform: translateY(-8px);
    border-color: var(--brand-sky);
    box-shadow: 0 20px 50px rgba(14, 165, 233, 0.25);
}

.event-cover {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.event-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.event-card:hover .event-cover img { transform: scale(1.06); }

.cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 19, 43, 0.2) 0%, rgba(11, 19, 43, 0.85) 100%);
}

.event-status-tag {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.status-upcoming { background: var(--brand-cyan); color: #FFF; }
.status-regular { background: #2ECC71; color: #FFF; }

.event-format-tag {
    position: absolute;
    bottom: 14px;
    left: 14px;
    background: rgba(11, 19, 43, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #FFF;
    padding: 5px 14px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 700;
}

.event-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.event-meta {
    display: flex;
    gap: 16px;
    font-size: 0.82rem;
    color: var(--brand-sky);
    font-weight: 800;
    margin-bottom: 10px;
}

.event-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #FFF;
    margin-bottom: 10px;
    line-height: 1.35;
}

.event-desc {
    font-size: 0.9rem;
    color: #CBD5E1;
    line-height: 1.55;
    margin-bottom: 24px;
    flex-grow: 1;
}

.event-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 18px;
}

.event-location {
    font-size: 0.8rem;
    color: #94A3B8;
    font-weight: 600;
}

/* 4. АРХІВ ТА РЕЗУЛЬТАТИ */
.archive-section-block {
    margin-bottom: 90px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 80px;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 30px;
}

.archive-card {
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(56, 189, 248, 0.15);
}

.archive-cover {
    position: relative;
    aspect-ratio: 16/9;
}

.archive-cover img { width: 100%; height: 100%; object-fit: cover; }

.archive-badge {
    position: absolute;
    top: 14px; right: 14px;
    background: rgba(11, 19, 43, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #2ECC71; padding: 4px 12px;
    border-radius: 12px; font-size: 0.72rem; font-weight: 800;
}

.archive-body { padding: 28px; }
.archive-date { font-size: 0.8rem; color: #94A3B8; font-weight: 600; }
.archive-title { font-size: 1.15rem; font-weight: 800; color: #FFF; margin: 6px 0 16px 0; }

.impact-stats-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.impact-pill {
    background: rgba(14, 165, 233, 0.18);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: var(--brand-sky);
    font-size: 0.78rem;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
}

.card-link { color: var(--brand-sky); text-decoration: none; font-weight: 800; font-size: 0.88rem; }

/* 5. КАРТА ТА ПІДПИСКА */
.event-interactive-wrapper {
    border-radius: 32px;
    padding: 44px;
    border: 1px solid rgba(56, 189, 248, 0.22);
}

.interactive-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.box-title { font-size: 1.35rem; font-weight: 800; color: #FFF; margin-bottom: 8px; }
.box-desc { font-size: 0.9rem; color: #94A3B8; margin-bottom: 20px; line-height: 1.55; }

.mini-map-preview {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 190px;
}

.mini-map-preview img { width: 100%; height: 100%; object-fit: cover; }
.map-dark-overlay { position: absolute; inset: 0; background: rgba(11, 19, 43, 0.5); }

.map-overlay-btn {
    position: absolute;
    bottom: 18px; left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

.sub-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.sub-form input {
    flex-grow: 1;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.25);
    background: rgba(11, 19, 43, 0.8);
    color: #FFF;
    outline: none;
    font-size: 0.9rem;
    max-width: 100%;
}

.sub-form input:focus { border-color: var(--brand-sky); }

.telegram-bot-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: #CBD5E1;
    flex-wrap: wrap;
}

/* 3. МОДАЛЬНЕ ВІКНО З СКРОЛЛОМ */
.event-modal {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(11, 19, 43, 0.92);
    backdrop-filter: blur(20px);
    display: flex; align-items: center; justify-content: center;
    padding: 16px; opacity: 0; visibility: hidden;
    transition: var(--transition-smooth);
}

.event-modal.active { opacity: 1; visibility: visible; }

.event-modal-content {
    width: 100%; max-width: 920px;
    max-height: 88vh; overflow-y: auto;
    border-radius: 32px; padding: 36px 28px;
    position: relative;
    border: 1px solid rgba(56, 189, 248, 0.25);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7);
}

.event-modal-content::-webkit-scrollbar { width: 6px; }
.event-modal-content::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
.event-modal-content::-webkit-scrollbar-thumb { background: var(--brand-cyan); border-radius: 10px; }

.event-modal-close {
    position: absolute; top: 18px; right: 20px;
    background: none; border: none; color: #FFF;
    font-size: 2.2rem; cursor: pointer; transition: var(--transition-smooth);
}

.event-modal-close:hover { color: var(--brand-sky); }

.event-modal-header { margin-bottom: 24px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); padding-bottom: 20px; }
.modal-event-title { font-size: 1.5rem; font-weight: 800; color: #FFF; margin: 10px 0; }
.modal-meta-row { display: flex; gap: 20px; font-size: 0.9rem; color: var(--brand-sky); font-weight: 800; flex-wrap: wrap; }

.event-modal-body {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 28px;
}

.modal-info-col h4 { font-size: 1.05rem; color: #FFF; margin: 16px 0 8px 0; font-weight: 800; }
.modal-info-col p { font-size: 0.92rem; color: #CBD5E1; line-height: 1.6; }

.agenda-list { list-style: none; margin-top: 10px; }
.agenda-list li { font-size: 0.88rem; color: #E2E8F0; margin-bottom: 10px; padding-left: 16px; position: relative; line-height: 1.5; }
.agenda-list li::before { content: '•'; position: absolute; left: 0; color: var(--brand-sky); font-weight: 800; }

.action-tools-row { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.share-buttons { display: flex; gap: 12px; align-items: center; font-size: 0.85rem; color: #94A3B8; flex-wrap: wrap; }
.share-icon { color: var(--brand-sky); text-decoration: none; font-weight: 800; }

.modal-form-col {
    padding: 24px;
    border-radius: 24px;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.modal-form-col h3 { font-size: 1.2rem; color: #FFF; margin-bottom: 4px; font-weight: 800; }
.form-sub { font-size: 0.82rem; color: #94A3B8; margin-bottom: 18px; }

.form-group { margin-bottom: 14px; text-align: left; }
.form-group label { display: block; font-size: 0.8rem; color: #CBD5E1; margin-bottom: 6px; font-weight: 700; }
.form-group input {
    width: 100%; padding: 12px 16px;
    border-radius: 12px; border: 1px solid rgba(56, 189, 248, 0.25);
    background: rgba(11, 19, 43, 0.85); color: #FFF; outline: none; font-size: 0.9rem;
}

.form-group input:focus { border-color: var(--brand-sky); }
.btn-full { width: 100%; margin-top: 10px; }

/* КНОПКИ */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 14px 26px; border-radius: 14px; font-weight: 800; font-size: 0.9rem; text-decoration: none; cursor: pointer; transition: var(--transition-smooth); white-space: nowrap; }
.btn-sm { padding: 9px 16px; font-size: 0.8rem; border-radius: 10px; }
.btn-glass { background: rgba(255,255,255,0.1); color: #FFF; border: 1px solid rgba(255,255,255,0.22); }
.btn-glass:hover { background: rgba(255,255,255,0.2); }
.btn-gold { background: var(--brand-cyan); color: #FFF; border: none; box-shadow: 0 4px 15px rgba(14, 165, 233, 0.35); }
.btn-gold:hover { background: var(--brand-cyan-hover); box-shadow: 0 8px 25px var(--brand-cyan-glow); transform: translateY(-2px); }

.btn-pulse { animation: btnPulse 2s infinite; }

@keyframes btnPulse {
    0% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.5); }
    70% { box-shadow: 0 0 0 14px rgba(14, 165, 233, 0); }
    100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
}

/* МОБІЛЬНИЙ АДАПТИВ ТА ФІКС ЗСУВУ ВПРАВО */
.mobile-menu-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; }
.mobile-menu-toggle .bar { width: 22px; height: 2px; background-color: #FFF; }

@media (max-width: 992px) {
    .interactive-grid, .event-modal-body { grid-template-columns: 1fr !important; }
    .nav-menu { display: none; position: fixed; top: 75px; left: 16px; right: 16px; background: rgba(11, 19, 43, 0.98); border-radius: 20px; flex-direction: column; padding: 24px; gap: 16px; border: 1px solid rgba(56, 189, 248, 0.25); }
    .nav-menu.active { display: flex; }
    .mobile-menu-toggle { display: flex; }

    .nav-actions { display: flex !important; align-items: center !important; gap: 8px !important; }
    .nav-actions .btn { display: inline-flex !important; padding: 6px 12px !important; font-size: 0.75rem !important; border-radius: 8px !important; }
}

@media (max-width: 576px) {
    .container { padding: 0 16px; }
    .events-filter-bar { flex-direction: column; align-items: stretch; padding: 16px; }
    .filter-selects { flex-direction: column; }
    .custom-select { width: 100%; }
    .sub-form { flex-direction: column; }
    .event-interactive-wrapper { padding: 24px 16px; }
    .event-modal-content { padding: 24px 16px; }
    .btn { width: 100%; } /* Повноширинні кнопки під палець */
}