/* ---------------------------------------------------------- Загальні стилі ---------------------------------------------------------- */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, rgba(0, 91, 200, 0.15) 0%, rgba(255, 255, 0, 0.15) 100%);
    color: #000;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

#index_main{
    margin-bottom: 60px;
}

/* ---------------------------------------------------------- Шапка (Header) ---------------------------------------------------------------- */
header {
    border-bottom: 1px solid #cce0ff;
    background-color: transparent; 
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.site-logo {
    max-width: 400px;
    min-width: 200px;
    width: 300px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 15px;
    margin: 0;
    padding: 0;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
}

nav ul li a {
    display: block;
    text-align: center;
    line-height: 1.3;
    padding: 8px 12px;
    border-radius: 5px;
}

nav ul li a:hover {
    color: #0056b3;
    background-color:#999;
}

.lang-flags {
    display: flex;
    gap: 15px; 
}

.lang-flags a{
    padding: 8px 12px; 
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.lang-flags a:hover{
    background-color:#999;
}

/* ----------------------------------------------------------- Головна секція (Hero) ---------------------------------------------------------- */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 60px 0;
}

.hero-logos img {
    width: 200px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.hero-text {
    max-width: 600px;
    flex: 1;
}

.hero-text h1 {
    font-size: 32px;
    line-height: 1.3;
    margin-bottom: 20px;
}

.hero-image {
    background-image: url("image/EG_1.png");
    flex: 1;
    width: 100%;
    min-height: 350px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-logos {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hero-logos p {
    font-size: 10px;
    color: #555;
    max-width: 250px;
}

.logo-placeholder {
    width: 250px; 
    height: 250px; 
    border-radius: 50%; 
    border: 5px solid #0056b3; 
    background: #fff; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: bold; 
    color: #0056b3;
    text-align: center;
}

/* ---------------------------------------------------------- Цілі проекту (Objectives) ---------------------------------------------------------- */
.objectives-section {
    padding: 40px 0;
    text-align: center;
}

.objectives-section h2 {
    font-size: 30px;
    margin-bottom: 40px;
}

.objectives-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    text-align: left;
}

.objective-card {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.objective-card h3 {
    margin-top: 0;
    font-size: 24px;
    margin-bottom: 10px;
}

.objective-card p {
    font-size: 19px;
    line-height: 1.5;
    color: #333;
}

/* ---------------------------------------------------------- Консорціум (Слайдер) ---------------------------------------------------------- */
.consortium {
    text-align: center;
    padding: 60px 0;
}

.consortium h2 {
    font-size: 30px;
    margin-bottom: 40px;
}

.slider-container {
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden; 
    padding: 10px 0;
}

.slider-track {
    display: flex;
    align-items: center;
    gap: 30px;
}

.slide {
    min-width: 150px;
    height: 100px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.slide img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

@media (max-width: 1024px) {
    .slide {
        min-width: 120px;
        height: 80px;
    }
    .slider-track {
        gap: 15px;
    }
}

/* ---------------------------------------------------------- Інформація про проект ---------------------------------------------------------- */
.project-info {
    display: flex;
    justify-content: center;
    gap: 80px;
    padding: 40px 0;
    text-align: center;
}

.project-info div h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.project-info div p {
    font-size: 12px;
    color: #555;
    margin: 0;
}

/* ---------------------------------------------------------- Партнери (Partners) ---------------------------------------------------------- */
.partners-section {
    padding: 40px 0;
}

.partners-section h2 {
    font-size: 28px; 
    font-weight: bold;
    color: #000000;
    margin-bottom: 10px;
    line-height: 1.2;
}

.partners-note {
    display: block;
    font-size: 12px;
    color: #888888;
    margin-top: 0;
    margin-bottom: 40px;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 60px;
    align-items: start;
}

/* ---------------------------------------------------------- Партнери (Акордеон) ---------------------------------------------------------- */
.partner-item {
    border-bottom: 2px solid #000080;
    padding-bottom: 15px;
}

.partner-item h4 {
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    margin: 0 0 10px 0;
}

.partner-item a {
    font-size: 12px;
    font-weight: bold;
    text-decoration: underline;
}

.full-width {
    grid-column: 1 / -1;
}

.partner-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    cursor: pointer;
}

.partner-header h4 {
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    margin: 0;
    flex: 1;
    padding-right: 15px;
}

.toggle-btn {
    background: none;
    border: none;
    font-size: 16px;
    color: #000080;
    cursor: pointer;
    padding: 0 5px;
    transition: transform 0.3s ease;
}

.partner-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, margin-top 0.4s ease, opacity 0.4s ease;
    opacity: 0;
}

.partner-content p {
    font-size: 13px;
    line-height: 1.6;
    color: #333;
    margin: 10px 0;
}

.partner-content a {
    color: #000080;
    text-decoration: none;
    font-weight: bold;
}

.partner-content a:hover {
    text-decoration: underline;
}

.partner-item.active .toggle-btn {
    transform: rotate(180deg); 
}

.partner-item.active .partner-content {
    max-height: 300px; 
    opacity: 1;
}

/* =========================================
   СТОРІНКА: КОНТАКТИ (Contact Us)
   ========================================= */

.contact-page-header {
    padding: 60px 0 40px;
}

.contact-page-header h1 {
    font-size: 56px;
    font-weight: 800;
    margin: 10px 0 40px;
    line-height: 1.1;
    letter-spacing: -1px;
}

.contact-persons {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 50px;
}

.person-card .person-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.person-card .person-email {
    color: #0055ff;
    font-size: 16px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.person-card .person-email:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* Адаптивність для контактів */
@media (max-width: 1024px) {
    .contact-page-header h1 {
        font-size: 38px;
    }
}

/* =========================================
   СТОРІНКА: НАША КОМАНДА (Our Team)
   ========================================= */

.team-header {
    padding: 60px 0 50px;
}

.team-header h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    margin: 10px 0 20px;
    max-width: 600px;
}

.team-header .team-subtitle {
    font-size: 14px;
    color: #666;
    max-width: 450px;
    line-height: 1.5;
}

.team-flex {
    display: flex;
    flex-direction: column;
    gap: 60px 40px;
    padding-top: 40px;
    border-top: 1px solid #eee;
    margin-bottom: 100px;
}

.team-card {
    text-align:left;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white;
    border-radius: 40px;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 30px;
    margin-top: 30px;
    margin-bottom: 30px;
    box-sizing: border-box;
}

.team-card p{
    margin-bottom: 15px;
    line-height: 1.6;
}

.member-photo {
    width: 180px;
    height: 180px;
    object-fit:contain;
    margin-top: 20px;
}

.member-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #000;
}

@media (max-width: 1024px) {
    .team-flex {
        gap: 40px 20px;
    }
    
    .team-header h1 {
        font-size: 36px;
    }
}

@media (max-width: 600px) {    
    .member-photo {
        width: 150px;
        height: 150px;
    }
}

/* ---------------------------------------------------------- Підвал (Footer) ---------------------------------------------------------- */
.site-footer {
    width: 100%;
    background-color: #e8e8e8;
    padding: 60px 0;
    margin-top: 0 !important;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    max-width: 1200px; 
}

.footer-left h3{
    font-size: 20px;
    margin-bottom: 10px;
    margin-top: 0;
}

.footer-left p{
    font-size: 10px;
    color: #555;
    max-width: 250px;
}

.footer-right ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.footer-right ul li a {
    font-size: 10px;
    text-decoration: underline;
}
/* ---------------------------------------------------------- сторінка без наповнення ---------------------------------------------------------- */
.no-filling{
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 50px;
}
/* =========================================
   СТОРІНКА: ПРО ПРОЄКТ (About the project)
   ========================================= */

.about-hero {
    padding: 60px 0 20px;
}

.pre-title {
    font-size: 14px;
    color: #555;
    text-transform: uppercase;
}

.about-hero h1 {
    font-size: 42px;
    margin: 15px 0;
    line-height: 1.1;
    color: #000;
}

.about-meta {
    display: flex;
    gap: 50px;
    align-items: center;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    padding: 30px 0;
    margin-bottom: 40px;
}

.meta-title {
    flex: 0 0 20%;
    font-size: 20px;
    text-transform: uppercase;
    margin: 0;
}

.meta-desc {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    font-style: italic;
}

.project-info-simple {
    display: flex;
    justify-content: space-between;
    text-align: center;
    margin-bottom: 60px;
    padding: 0 50px;
}

.info-column strong {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
}

.info-column span {
    font-size: 12px;
    color: #555;
}

.section-title {
    text-align: center;
    font-size: 18px;
    font-weight: normal;
    margin-bottom: 30px;
    margin-top: 50px;
}

.left-align {
    text-align: left;
    font-size: 20px;
}

.card-number {
    display: block;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 10px;
}

.objective-card p {
    font-size: 13px;
    margin: 0;
    line-height: 1.4;
}

.results-list {
    display: flex;
    flex-direction: column;
}

.result-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px 0;
    border-top: 2px solid #002288;
}

.result-item:last-child {
    border-bottom: 2px solid #002288;
}

.result-num {
    font-size: 24px;
    font-weight: bold;
    color: #000;
    min-width: 30px;
}

.result-item p {
    margin: 0;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.5;
    max-width: 800px;
}

.contact-banner-wrapper {
    background-color: #120099;
    padding: 60px 0;
    margin-top: 80px;
    color: white;
    margin-bottom: 0 !important;
}

.contact-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-banner-text h2 {
    font-size: 40px;
    margin: 0 0 15px;
    font-weight: normal;
    line-height: 1.1;
}

.contact-banner-text p {
    font-size: 12px;
    margin: 0;
    opacity: 0.8;
}

.contact-banner .contact-btn {
    background: #0055ff;
    color: white;
    border: none;
    padding: 12px 30px;
    cursor: pointer;
    border-radius: 4px; 
    font-size: 14px;
    transition: background 0.3s;
}

.contact-banner .contact-btn:hover {
    background: #0044cc;
}

/* =========================================
   СТОРІНКА: НОВИНИ ТА ПОДІЇ
   ========================================= */

.page-content {
    padding: 40px 20px 80px;
    min-height: 60vh;
}

.page-title {
    font-size: 36px;
    margin-bottom: 40px;
    color: #000;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.news-image-wrapper {
    width: 100%;
    height: 220px;
    background-color: #eee;
    overflow: hidden;
}

.news-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-text-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; 
}

.news-meta {
    font-size: 12px;
    font-weight: bold;
    color: #0055aa;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-title {
    font-size: 18px;
    line-height: 1.3;
    margin: 0 0 15px;
    color: #1a1a1a;
}

.news-excerpt {
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    margin: 0 0 20px;
    flex-grow: 1;
}

.read-more-link {
    font-size: 14px;
    font-weight: bold;
    color: #000;
    text-decoration: none;
    align-self: flex-start;
    transition: color 0.2s;
}

.read-more-link:hover {
    color: #0055aa;
    text-decoration: underline;
}

@media (max-width: 1024px) {
    .about-meta {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    .project-info-simple {
        flex-direction: column;
        gap: 20px;
    }
    .contact-banner {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
}

/* =========================================
   СТОРІНКА ОДНІЄЇ НОВИНИ
   ========================================= */

.news-detail-page {
    padding: 60px 20px;
    display: flex;
    justify-content: center;
}

.news-article-content {
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 25px; 
}

.article-title {
    font-size: 32px;
    color: #000;
    text-align: center; 
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.article-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin: 0;
    text-align: justify;
}

.article-img {
    width: 100%; 
    height: auto;
    border-radius: 8px; 
    object-fit: cover;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 30px;
    border-top: 1px solid #ddd;
}

.back-btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: transparent;
    border: 2px solid #0055aa;
    color: #0055aa;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background-color: #0055aa;
    color: #fff;
}

.article-meta-text {
    font-size: 16px;
    color: #333;
}

@media (max-width: 1024px) {
    .article-title {
        font-size: 26px;
    }
    .article-footer {
        flex-direction: column; 
        gap: 20px;
        align-items: center;
    }
}

/* =========================================
   ГАМБУРГЕР МЕНЮ (Комп'ютерна версія)
   ========================================= */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 100; 
}

.hamburger .bar {
    width: 30px;
    height: 3px;
    background-color: #000;
    transition: all 0.3s ease;
}

#nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* =========================================
   АДАПТИВНІСТЬ ДЛЯ МОБІЛЬНИХ ПРИСТРОЇВ
   ========================================= */
@media (max-width: 1024px) {
    .header-inner {
        flex-direction: row;
        justify-content: space-between;
        flex-wrap: wrap;
        position: relative;
    }
    
    .site-logo {
        width: 100px;
        min-width: 100px;
    }

    nav ul {
        flex-direction: column;
        gap: 20px;
    }

    #nav-menu {
        display: none;
        width: 100%; 
        text-align: center;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    #nav-menu.active {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding: 40px 0;
        gap: 30px;
    }

    .hero-text h1 {
        font-size: 26px;
    }

    .hero-logos {
        flex-direction: column;
        justify-content: center;
    }
    
    .hero-logos p {
        text-align: center;
    }

    .lang-flags {
        justify-content: center;
        margin-top: 10px;
        padding-top: 20px;
        border-top: 1px solid #ddd;
        width: 80%;
    }

    .objectives-grid {
        grid-template-columns: 1fr;
    }

    .project-info {
        flex-direction: column;
        gap: 30px;
    }

    .partners-grid {
        grid-template-columns: 1fr;
    }
    
    .full-width {
        grid-column: auto;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .footer-left p {
        margin: 0 auto;
    }
    
    .footer-right ul {
        justify-content: center;
    }
}
