/* Загальні скидання */
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: "Inter", sans-serif;
    background-color: #f9f9f9;
    color: #333;
}
/* Опціонально, якщо використовуєте блокування прокрутки з JS для мобільного меню:
body.no-scroll {
    overflow: hidden;
}
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Секція Hero з відео YouTube */
.video-hero-section {
    position: relative;
    width: 100%;
    height: 100vh; 
    overflow: hidden; 
    background-color: #000; 
}

.youtube-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none; 
}

.hero-youtube-iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw; 
    height: 56.25vw; /* 100vw * 9/16 */
    min-width: 100vw; 
    min-height: 100vh; 
    transform: translate(-50%, -50%);
}

@media (orientation: portrait) {
    .hero-youtube-iframe {
        /* Для кращого покриття у портретній орієнтації, якщо потрібно */
        /* width: 177.77vh; */ /* 100vh * 16/9 */
        /* height: 100vh; */
    }
}

.video-overlay-content {
    position: relative; 
    z-index: 2; 
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.65); 
    color: #ffffff;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 30px;
    max-width: 800px;
    font-family: "Inter", sans-serif;
    text-shadow: 0px 1px 6px rgba(0, 0, 0, 0.8); 
}

.hero-button {
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    /* Успадковує стилі від .more-button нижче */
}

/* Загальний контейнер для основного контенту після hero */
#main-content {
    padding-top: 40px; /* Може бути непотрібним, якщо хедер sticky і не перекриває */
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    color: #333;
    text-align: center;
}

/* Останні новини (для секції .news-section) */
.news-section {
    padding: 40px 20px;
    background-color: #f9f9f9;
}

.news-container { /* Контейнер для карток новин у секції Останні новини */
    display: flex;
    justify-content: center; 
    gap: 30px; 
    margin-bottom: 30px;
    flex-wrap: wrap;
    max-width: 1200px; 
    margin-left: auto;
    margin-right: auto;
}

.news-card { /* Стилі для карток в .news-container */
    flex: 1 1 300px; 
    max-width: 400px; 
    min-height:320px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); 
    display: flex; 
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.news-card img {
    width: 100%;
    height: 200px; 
    object-fit: cover;
}

.news-card h3 {
    padding: 20px 20px 10px; 
    font-size: 20px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.news-card p { /* Для короткого опису, якщо він буде в .news-card */
    padding: 0 20px 20px;
    color: #666;
    font-size: 15px; 
    line-height: 1.6; 
    flex-grow: 1; 
}

.more-news {
    display: flex;
    justify-content: center;
    margin-top: 20px; 
}

/* Загальні стилі для кнопок "дізнатися більше" */
.more-button, .more-button-news, .hero-button { 
    display: inline-block; 
    background: linear-gradient(to right, #2e71ba, #283594); 
    color: white !important;
    text-decoration: none;
    padding: 15px 40px; 
    border-radius: 30px; 
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none; 
    cursor: pointer; 
}

.more-button:hover, .more-button-news:hover, .hero-button:hover {
    transform: translateY(-3px); 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); 
}

.more-button-news { /* Специфічні налаштування, якщо потрібні */
    padding: 15px 50px; 
}


/* Секція "Актуальні новини" (раніше "Цікаві факти") */
.facts-section { 
    padding: 60px 20px;
    background-color: #fff; 
}

.facts-container { /* Контейнер для трьох карток новин */
    display: flex;
    justify-content: space-around; 
    gap: 30px; 
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap; 
}

/* Стилі для карток новин всередині .facts-container */
.news-card-in-facts {
    flex: 1 1 300px; 
    max-width: 360px; 
    background-color: #ffffff; 
    border-radius: 8px;
    overflow: hidden; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card-in-facts:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.news-card-link-wrapper { 
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1; 
}

.news-card-in-facts .news-card-image-container {
    width: 100%;
    height: 200px; 
    overflow: hidden; 
}

.news-card-in-facts .news-card-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-in-facts .news-card-date {
    font-size: 0.85em;
    color: #777;
    margin-bottom: 8px; 
    padding: 15px 20px 0; /* Падінг зверху і з боків, знизу 0 */
}

.news-card-in-facts h3 {
    padding: 8px 20px 15px; /* Адаптовані падінги з урахуванням дати */
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0; 
    line-height: 1.4;
    flex-grow: 1; 
}


/* Досягнення кафедри */
.achievements-section {
    padding: 60px 0; 
    background-color: #f0f4f8; 
    overflow: hidden; 
}

.achievements-container {
    display: flex;
    flex-direction: row;
    overflow-x: auto; 
    justify-content: center; 
    gap: 30px;
    padding: 20px; 
    -webkit-overflow-scrolling: touch; 
    scrollbar-width: thin; 
    scrollbar-color: #0052CC #f0f4f8; 
}

.achievements-container::-webkit-scrollbar {
    height: 8px;
}

.achievements-container::-webkit-scrollbar-track {
    background: #e0e4e8; 
    border-radius: 4px;
}

.achievements-container::-webkit-scrollbar-thumb {
    background-color: #0052CC; 
    border-radius: 4px;
}

.achievement-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 280px; 
    flex-shrink: 0; 
}

.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.achievement-card img {
    width: 60px; 
    height: 60px;
    margin-bottom: 15px; 
}

.achievement-card h3 {
    font-size: 18px; 
    font-weight: 600;
    margin-bottom: 10px;
    color: #0052CC; 
}

.achievement-card p {
    color: #555; 
    font-size: 14px; 
    line-height: 1.5;
}

/* Ключові показники */
.indicators-section {
    padding: 60px 20px;
    background-color: #0052CC;
    color: #fff;
}

.indicators-section .section-title {
    color: #fff;
}

.indicators-container {
    display: flex;
    justify-content: space-around;
    max-width: 1000px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 20px;
}

.indicator {
    text-align: center;
    padding: 20px;
    flex-basis: 200px;
    flex-grow: 1;
}

.indicator h3 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 8px;
}

.indicator p {
    font-size: 17px;
    font-weight: 400;
    opacity: 0.9;
}

/* Адаптивні стилі */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 40px;
        max-width: 600px;
    }
    .section-title {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 32px;
        max-width: 90%;
    }
    .hero-button { /* Загальний стиль для .more-button тепер застосовується */
        padding: 12px 30px;
        font-size: 16px;
    }
    .news-container, .facts-container, .indicators-container {
        flex-direction: column;
        align-items: center;
    }
    .news-card, .news-card-in-facts { /* Додано .news-card-in-facts */
        flex-basis: auto;
        width: 90%;
        max-width: 400px; /* Обмеження для карток в стовпець */
    }
    
    .indicator {
        flex-basis: 100%;
    }
    .indicator h3 {
        font-size: 40px;
    }
    .indicator p {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 26px;
    }
    .section-title {
        font-size: 24px;
    }
    .news-card h3, .news-card-in-facts h3 { /* Додано .news-card-in-facts */
        font-size: 18px;
    }
    .news-card p {
        font-size: 14px;
    }
    .news-card-in-facts .news-card-date {
        font-size: 0.8em;
    }
    .achievement-card h3 {
        font-size: 17px;
    }
    .achievement-card p {
        font-size: 14px;
    }
     .indicator h3 {
        font-size: 36px;
    }
    .indicator p {
        font-size: 15px;
    }
}

/* Анімації */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Темний оверлей для кращої читабельності */
        .video-hero-section::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.3);
            z-index: 2;
            pointer-events: none;
        }

        /* АДАПТИВНІСТЬ */

        /* Великі екрани (1920px+) */
        @media (min-width: 1920px) {
            .hero-title {
                font-size: 4.5rem;
            }
            .hero-button {
                padding: 18px 40px;
                font-size: 1.2rem;
            }
        }

        /* Середні десктопи (1200px - 1919px) */
        @media (max-width: 1919px) and (min-width: 1200px) {
            .hero-title {
                font-size: 3.2rem;
            }
        }

        /* Малі десктопи та великі планшети (992px - 1199px) */
        @media (max-width: 1199px) and (min-width: 992px) {
            .hero-title {
                font-size: 2.8rem;
            }
            .hero-button {
                padding: 14px 30px;
                font-size: 1rem;
            }
        }

        /* Планшети (768px - 991px) */
        @media (max-width: 991px) and (min-width: 768px) {
            .hero-title {
                font-size: 2.4rem;
                margin-bottom: 1.8rem;
            }
            .hero-button {
                padding: 12px 28px;
                font-size: 1rem;
            }
            .video-overlay-content {
                padding: 0 30px;
            }
        }

        /* Великі телефони та малі планшети (576px - 767px) */
        @media (max-width: 767px) and (min-width: 576px) {
            .hero-title {
                font-size: 2rem;
                line-height: 1.3;
                margin-bottom: 1.5rem;
            }
            .hero-button {
                padding: 12px 25px;
                font-size: 0.95rem;
            }
            .video-overlay-content {
                padding: 0 25px;
            }
        }

        /* Малі телефони (до 575px) */
        @media (max-width: 575px) {
            .video-hero-section {
                height: 100vh;
            }
            
            .hero-title {
                font-size: 1.6rem;
                line-height: 1.3;
                margin-bottom: 1.2rem;
            }
            
            .hero-button {
                padding: 10px 20px;
                font-size: 0.9rem;
            }
            
            .video-overlay-content {
                padding: 0 20px;
            }
        }

        /* Дуже малі телефони (до 375px) */
        @media (max-width: 375px) {
            .hero-title {
                font-size: 1.4rem;
                margin-bottom: 1rem;
            }
            
            .hero-button {
                padding: 8px 18px;
                font-size: 0.85rem;
            }
            
            .video-overlay-content {
                padding: 0 15px;
            }
        }

        /* Спеціальні налаштування для відео на мобільних */
        @media (max-width: 768px) {
            .youtube-video-wrapper video {
                min-width: 100%;
                min-height: 100%;
                width: 100vw;
                height: 100vh;
                object-fit: cover;
            }
        }

        /* Вертикальна орієнтація */
        @media (orientation: portrait) and (max-width: 768px) {
            .video-hero-section {
                height: 100vh;
            }
            
            .youtube-video-wrapper video {
                width: 100vw;
                height: 100vh;
                object-fit: cover;
            }
        }


/* Горизонтальна орієнтація на мобільних */
        @media (orientation: landscape) and (max-height: 500px) {
            .hero-title {
                font-size: 1.8rem;
                margin-bottom: 1rem;
            }
            
            .hero-button {
                padding: 8px 20px;
                font-size: 0.9rem;
            }
        }

        /* Налаштування для iOS Safari */
        @supports (-webkit-touch-callout: none) {
            .video-hero-section {
                height: 100vh;
                height: -webkit-fill-available;
            }
            
            .youtube-video-wrapper video {
                object-fit: cover;
                width: 100%;
                height: 100%;
            }
        }

        /* Поліпшення для малих екранів */
        @media (max-width: 480px) {
            .video-hero-section::before {
                background: rgba(0, 0, 0, 0.4);
            }
            
            .hero-title {
                text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
            }
        }