 :root {

    --bg-color: #050510;

    --bg-darker: #020205;

    --accent: #4d79ff;

    --text-color: #ffffff;

    --glass: rgba(255, 255, 255, 0.05);

}



body {

    background-color: var(--bg-color);

    color: var(--text-color);

    font-family: 'Montserrat', sans-serif;

    overflow-x: hidden;

}



#preloader {

    position: fixed; top: 0; left: 0; width: 100%; height: 100%;

    background: #000; z-index: 9999; display: flex; justify-content: center; align-items: center; transition: 0.5s;

}

.loader-text { font-size: 3rem; font-weight: 900; animation: blink 1s infinite; }

@keyframes blink { 0%, 100% {opacity:0.2} 50% {opacity:1} }



.section-padding { padding: 100px 0; }

.bg-darker { background-color: var(--bg-darker); }

.color-accent { color: var(--accent); }



/* NAVBAR */

.navbar { transition: 0.3s; padding: 20px 0; }

.navbar.scrolled { background: rgba(5,5,16,0.95); padding: 10px 0; backdrop-filter: blur(10px); }

.nav-link { color: #fff !important; margin-left: 20px; transition: 0.3s; }

.nav-link:hover { color: var(--accent) !important; }



/* HERO */

.hero-section {

    height: 100vh;

    background: url('https://images.unsplash.com/photo-1492684223066-81342ee5ff30?q=80&w=1000') no-repeat center center/cover;

    position: relative;

}

.overlay { position: absolute; top:0; left:0; width:100%; height:100%; background: linear-gradient(to bottom, rgba(5,5,16,0.6), var(--bg-color)); }

.glitch { font-size: 8rem; text-shadow: 2px 2px var(--accent); font-weight: 900; }



/* CARDS */

.card-big { height: 600px; transition: 0.4s; position: relative; overflow: hidden; }

.bg-img { width: 100%; height: 100%; object-fit: cover; position: absolute; top:0; left:0; transition: 0.5s; }

.card-big:hover .bg-img { transform: scale(1.05); }

.gradient-bottom { background: linear-gradient(to top, #000 0%, rgba(0,0,0,0.8) 40%, transparent 100%); position: absolute; bottom:0; left:0; width: 100%; padding: 40px; z-index: 2; }



.card-small { height: 190px; background: var(--glass); border: 1px solid rgba(255,255,255,0.1); transition: 0.3s; margin-bottom: 20px; overflow: hidden; }

.card-small:hover { border-color: var(--accent); transform: translateX(5px); }



/* NEWS & JOURNAL */

.news-item { background: #0f0f1a; border-radius: 15px; overflow: hidden; height: 100%; border: 1px solid rgba(255,255,255,0.05); }

.news-thumb { height: 250px; width: 100%; object-fit: cover; }



.featured-journal-block { position: relative; padding: 60px 0; overflow: hidden; border-radius: 20px; }

.journal-page { background: #fff; padding: 40px; border-radius: 2px; position: relative; z-index: 2; max-width: 800px; margin: 0 auto; color: #333; }

.tape { position: absolute; width: 120px; height: 40px; background: rgba(255,255,255,0.3); backdrop-filter: blur(5px); z-index: 3; }

.tape-1 { top: -10px; left: -30px; transform: rotate(-30deg); }

.tape-2 { bottom: -10px; right: -30px; transform: rotate(-30deg); }

.featured-bg-blur { position: absolute; top:0; left:0; width:100%; height:100%; filter: blur(50px) brightness(0.3); background-size: cover; z-index: 1; }



/* COMMUNITY ANIMATION */

.collective-wrapper { position: relative; overflow: hidden; cursor: pointer; }

.collective-img { transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); filter: grayscale(30%); }

.collective-wrapper:hover .collective-img { transform: scale(1.08); filter: grayscale(0%); }

.collective-overlay { background: radial-gradient(circle, rgba(77, 121, 255, 0.2) 0%, rgba(5, 5, 16, 0.6) 100%); opacity: 0; transition: 0.5s; }

.collective-wrapper:hover .collective-overlay { opacity: 1; }



/* DEV REKLAMA */

.floating-dev-badge { position: fixed; bottom: 20px; right: 20px; background: rgba(77, 121, 255, 0.2); backdrop-filter: blur(10px); border: 1px solid var(--accent); padding: 10px 20px; border-radius: 50px; color: #fff; text-decoration: none; z-index: 1000; display: flex; align-items: center; gap: 10px; font-weight: 700; transition: 0.3s; }

.floating-dev-badge:hover { background: var(--accent); transform: scale(1.1); color: #fff; }



.dev-signature { display: inline-block; padding: 8px 20px; border: 1px solid rgba(255,255,255,0.1); border-radius: 30px; background: rgba(255,255,255,0.05); }

.dev-name { font-weight: 900; color: #fff; }



/* OTHER */

.reveal { opacity: 0; transform: translateY(30px); transition: 0.8s; }

.reveal.active { opacity: 1; transform: translateY(0); }

.btn-primary-custom { background: var(--accent); color: #fff; border: none; padding: 15px 40px; border-radius: 50px; font-weight: 700; transition: 0.3s; }

.btn-outline-custom { border: 2px solid #fff; color: #fff; padding: 15px 40px; border-radius: 50px; font-weight: 700; text-decoration: none; }

.form-control { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: #fff; }



/* SOCIAL MEDIA BUTTONS */

.social-links-wrapper { display: flex; justify-content: center; gap: 15px; }



.social-btn {

    display: flex;

    justify-content: center;

    align-items: center;

    width: 45px;

    height: 45px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.05); /* Ефект скла */

    border: 1px solid rgba(255, 255, 255, 0.1);

    color: #fff;

    font-size: 1.2rem;

    transition: all 0.3s ease;

    text-decoration: none;

}



.social-btn:hover {

    background: var(--accent);

    border-color: var(--accent);

    color: #fff;

    transform: translateY(-3px);

    box-shadow: 0 0 15px rgba(77, 121, 255, 0.5);

}



/* ——————————————————————————————————————————————————————————————————————————

   АДАПТИВНІСТЬ (RESPONSIVENESS)

   —————————————————————————————————————————————————————————————————————————— */



@media (max-width: 991px) {

    .glitch { font-size: 5rem; }

    .card-big { height: 450px; margin-bottom: 20px; }

}



@media (max-width: 768px) {

    .section-padding { padding: 60px 0; }

    .glitch { font-size: 3.5rem; }

   

    /* ГОЛОВНИЙ ФІКС ДЛЯ ВІТАЛІЯ ІВАНОВИЧА */

    .card-big {

        height: 500px !important;

        display: block !important;

        visibility: visible !important;

        opacity: 1 !important;

    }



    .card-big .bg-img {

        position: absolute;

        width: 100%;

        height: 100%;

        object-fit: cover;

    }



    .gradient-bottom {

        padding: 30px 20px !important;

        background: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.8) 50%, transparent 100%) !important;

        display: flex !important;

        flex-direction: column;

        justify-content: flex-end;

    }



    .card-big h3 { font-size: 1.6rem !important; margin-bottom: 5px; }



    .card-small {

        height: auto !important;

        min-height: 150px;

        flex-direction: column;

    }

    .card-small .img-wrapper,

    .card-small .text-wrapper {

        width: 100% !important;

        text-align: center !important;

    }

   

    .journal-page { padding: 20px; margin: 0 10px; }

}



@media (max-width: 480px) {

    .glitch { font-size: 2.8rem; }

    .display-4 { font-size: 1.8rem; }

   

    .card-big { height: 400px !important; }

   

    .btn-primary-custom, .btn-outline-custom {

        width: 100%;

        margin-bottom: 10px;

        margin-right: 0 !important;

    }



    .floating-dev-badge {

        padding: 8px 12px;

        font-size: 11px;

        bottom: 15px;

        right: 10px;

    }

}

/* Сітка для 5 елементів */
.col-lg-2-custom {
    flex: 0 0 auto;
    width: 20%;
}

@media (max-width: 1200px) { .col-lg-2-custom { width: 25%; } } /* 4 в ряд */
@media (max-width: 992px) { .col-lg-2-custom { width: 33.33%; } } /* 3 в ряд */
@media (max-width: 576px) { .col-lg-2-custom { width: 50%; } } /* 2 в ряд на мобілках */

.vol-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    overflow: hidden;
    height: 100%;
    transition: 0.4s;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.vol-img-box {
    width: 100%;
    height: 300px; /* Збільшив висоту для масштабності */
    overflow: hidden;
}

.vol-card:hover {
    transform: translateY(-12px);
    border-color: var(--accent);
    background: rgba(77, 121, 255, 0.05);
}

.vol-info {
    padding: 20px 10px;
    text-align: center;
}

.vol-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.vol-role {
    color: var(--accent);
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.vol-location {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.img-fit {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.vol-card:hover .img-fit {
    transform: scale(1.1);
}

/* --- VOLUNTEERS SECTION (ВСТАВИТИ В КІНЕЦЬ) --- */

.col-lg-2-custom {
    flex: 0 0 auto;
    width: 20%;
}

@media (max-width: 1200px) { .col-lg-2-custom { width: 25%; } } 
@media (max-width: 992px) { .col-lg-2-custom { width: 33.33%; } } 
@media (max-width: 576px) { .col-lg-2-custom { width: 50%; } } 

.vol-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    overflow: hidden;
    height: 100%;
    transition: 0.4s;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 20px;
}

.vol-img-box {
    width: 100%;
    height: 250px; 
    overflow: hidden;
}

.vol-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    background: rgba(77, 121, 255, 0.05);
}

.vol-info {
    padding: 15px;
    text-align: center;
}

.vol-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: #fff;
}

.vol-role {
    color: var(--accent);
    font-size: 0.75rem;
   
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.vol-location {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

.extra-small {
    font-size: 0.7rem;
}

/* Фікс для картинок волонтерів */
.vol-img-box .img-fit {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}


.council-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    transition: 0.4s ease;
}

.council-img-box {
    width: 100%;
    height: 320px; /* Велика висота для чітких фото */
    overflow: hidden;
}

.council-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
}

.council-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 15px;
}

.council-info {
    padding: 15px;
    text-align: center;
}

/* ФІКС ДЛЯ ОДНАКОВИХ КАРТОК ВОЛОНТЕРІВ */

/* 1. Робимо всі колонки волонтерів однакової висоти в ряду */
#volunteers .row {
    display: flex;
    flex-wrap: wrap;
}

/* 2. Сама картка: фіксуємо мінімальну висоту, щоб вони були як одна */
.volunteer-card, .vol-card {
    display: flex;
    flex-direction: column;
    height: 100%; /* Займає всю висоту колонки */
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    transition: 0.3s;
}

/* 3. ФОТО: Це найголовніше. Фіксуємо висоту, щоб не «рвало» сітку */
.vol-img-wrap, .vol-img-box {
    width: 100%;
    height: 250px; /* Однакова висота для всіх фото */
    overflow: hidden;
    background: #000;
}

.vol-img-wrap img, .vol-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* ОБОВ'ЯЗКОВО: фото заповнює блок, не розтягуючись */
    object-position: center top; /* Пріоритет на обличчя */
}

/* 4. ТЕКСТ: вирівнюємо контент всередині */
.volunteer-card div:last-child, .vol-info {
    padding: 15px;
    flex-grow: 1; /* Розтягує текстовий блок, якщо імена короткі */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Додатково: щоб на мобільних фото не були занадто дрібними */
@media (max-width: 576px) {
    .vol-img-wrap, .vol-img-box {
        height: 200px;
    }
}



/* УНІВЕРСАЛЬНИЙ ФІКС ДЛЯ ВСІХ КАРТОК (Волонтери + Рада) */

/* 1. Робимо контейнер карток гнучким */
.vol-card, .council-card {
    display: flex;
    flex-direction: column;
    height: 100%; /* Картка розтягується на всю доступну висоту */
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s ease;
}

/* 2. Фіксуємо висоту фото (найважливіше!) */
.vol-img-box, .council-img-box {
    width: 100%;
    height: 280px; /* Всі фото будуть строго такої висоти */
    overflow: hidden;
    position: relative;
    background: #000;
}

.vol-img-box img, .council-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Фото заповнює блок без деформації */
    object-position: center top; /* Пріоритет на обличчя */
}

/* 3. Вирівнюємо текстовий блок */
.vol-info, .council-info {
    padding: 15px;
    text-align: center;
    flex-grow: 1; /* Текст займає весь вільний простір, підтягуючи низ карток */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 4. Прибираємо "скачки" на мобільних */
@media (max-width: 576px) {
    .vol-img-box, .council-img-box {
        height: 220px;
    }
    .vol-name, .council-name {
        font-size: 1rem;
    }
}


/* Стилі для секції Адміністрація (3 в ряд) */
.partner-card {
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.partner-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent) !important;
}

.partner-img-wrapper img {
    border: 3px solid rgba(77, 121, 255, 0.5);
    padding: 5px;
    background: rgba(255, 255, 255, 0.05);
}

.bg-dark-glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
}

/* РОБИМО ВЕСЬ ТЕКСТ ПІД ФОТО БІЛИМ */

/* 1. Імена в усіх типах карток */
.vol-name, 
.council-name, 
.card-modern h5, 
.card-modern h6,
.partner-card h3 {
    color: #ffffff !important;
    opacity: 1 !important;
}

/* 2. Опис та посади (якщо хочеш їх теж білими, а не акцентними) */
.vol-location, 
.council-location, 
.text-white-50, 
.extra-small {
    color: #ffffff !important;
    opacity: 0.9 !important; /* Трохи м'якший білий для опису */
}

/* 3. Текст цитат в Адміністрації */
.partner-card p {
    color: #ffffff !important;
}

/* ЕЛЕГАНТНИЙ ТЕКСТ ДЛЯ ОПИСУ ТА ПОСАД */

/* 1. Посади (під іменем) */
.vol-role, 
.council-role, 
.text-accent {
    color: rgba(255, 255, 255, 0.7) !important; /* Напівпрозорий білий */
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    opacity: 1 !important;
}

/* 2. Опис та локація (с. Дубове тощо) */
.vol-location, 
.council-location, 
.text-white-50, 
.extra-small {
    color: rgba(255, 255, 255, 0.4) !important; /* Ще більш непримітний */
    font-size: 0.75rem !important;
    font-weight: 300 !important;
    line-height: 1.4 !important;
}

/* 3. Маленький штрих: тонка лінія розділення в Адміністрації */
.partner-card h3::after {
    content: '';
    display: block;
    width: 30px;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 10px auto;
}

/* 4. Прибираємо зайвий жирний шрифт з цитат */
.partner-card .text-white-50 {
    font-style: italic;
    letter-spacing: 0.2px;
}


/* ФІКС КОЛЬОРУ ТЕКСТУ ДЛЯ ВСІХ БРАУЗЕРІВ ТА МОБІЛОК */

/* Білий колір для посад (Волонтер, Член ради тощо) */
.vol-role, 
.council-role, 
.text-accent,
[class*="role"],
.partner-card .text-uppercase {
    color: rgba(255, 255, 255, 0.8) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.8) !important; /* Фікс для мобільного Chrome */
    opacity: 1 !important;
}

/* Білий колір для локацій та описів (с. Дубове, цитати) */
.vol-location, 
.council-location, 
.text-white-50, 
.extra-small,
.partner-card p {
    color: rgba(255, 255, 255, 0.5) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.5) !important; /* Фікс для мобільного Chrome */
    opacity: 1 !important;
}

/* Якщо текст в Адміністрації все ще чорний - цей блок його доб'є */
#partners p, 
#youth-council p, 
#volunteers p {
    color: rgba(255, 255, 255, 0.6) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.6) !important;
}



/* ЯДЕРНИЙ ФІКС: ПРИМУСОВИЙ БІЛИЙ КОЛІР ДЛЯ ВСЬОГО ТЕКСТУ */

/* 1. Лідери змін (праві картки) */
.card-modern p, 
.card-modern span, 
.card-modern div {
    color: #e0e0e0 !important; /* Світло-сірий, майже білий */
    -webkit-text-fill-color: #e0e0e0 !important; /* Для Chrome/Safari */
    opacity: 1 !important; /* Прибираємо прозорість */
}

/* 2. Заголовки (Імена) - чисто білі */
.card-modern h6, 
.card-modern h5, 
.card-modern h4,
.card-modern h3 {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* 3. Волонтери та Рада (опис) */
.vol-info p, 
.council-info p,
.vol-location, 
.council-location {
    color: #cccccc !important; /* Трохи темніший білий для другорядного тексту */
    -webkit-text-fill-color: #cccccc !important;
    opacity: 1 !important;
}

/* 4. Адміністрація (цитати) */
.partner-card p,
.partner-card .small {
    color: #dcdcdc !important;
    -webkit-text-fill-color: #dcdcdc !important;
}

.news-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}