@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=JetBrains+Mono:wght@400;500&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', Arial, sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
    z-index: 20;
}


.hero {
    background: url("/images/neural_banner_1.jpg") no-repeat top right;
    color: #fff;
    text-align: center;
    padding: 6rem 2rem;
    z-index: 19;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.phero {
    text-align: center;
    
}

.btn {
    background: #ffc107;
    color: #000;
    padding: 0.8rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
}

.btn:hover {
    background: #ffb300;
}


section {
    padding: 4rem 0;
    position: relative;
}

section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    font-weight: 600;
    color: #2c3e50;
    position: relative;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 2px;
}


.team {
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.team::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23f5f5f5' fill-opacity='0.5'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    z-index: 1;
}

.team .container {
    position: relative;
    z-index: 2;
}

.team h2 {
    color: #2c3e50;
}

.team h2::after {
    background: linear-gradient(90deg, #3498db, #2980b9);
}

.team-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.team-group {
    background: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(52, 152, 219, 0.2);
    border-radius: 20px;
    padding: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.team-group:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(52, 152, 219, 0.2);
    background: rgba(248, 249, 250, 1);
    border-color: #3498db;
}

.group-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(52, 152, 219, 0.3);
}

.group-members {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.group-member {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(52, 152, 219, 0.1);
    transition: all 0.2s ease;
}

.group-member:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(52, 152, 219, 0.3);
    transform: translateX(5px);
}

.group-member h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.group-member p {
    font-size: 0.9rem;
    color: #5a6c7d;
    line-height: 1.4;
    margin: 0;
}


.news {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    position: relative;
    overflow: hidden;
}

.news::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23e3f2fd' fill-opacity='0.3'%3E%3Cpath d='M40 40c0-11.046-8.954-20-20-20s-20 8.954-20 20 8.954 20 20 20 20-8.954 20-20zm20 0c0-11.046-8.954-20-20-20s-20 8.954-20 20 8.954 20 20 20 20-8.954 20-20z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    z-index: 1;
}

.news .container {
    position: relative;
    z-index: 2;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.news-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 20px;
    transition: all 0.4s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.news-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #e74c3c, #f39c12, #f1c40f);
}

.news-item:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: #e74c3c;
    box-shadow: 0 20px 50px rgba(231, 76, 60, 0.2);
}

.news-item h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.news-item p {
    color: #5a6c7d;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.news-item span {
    display: block;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #95a5a6;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
    background: rgba(52, 152, 219, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 15px;
    text-align: center;
}


.contact {
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23f5f5f5' fill-opacity='0.5'%3E%3Cpath d='M50 50c0-13.807-11.193-25-25-25s-25 11.193-25 25 11.193 25 25 25 25-11.193 25-25zm25 0c0-13.807-11.193-25-25-25s-25 11.193-25 25 11.193 25 25 25 25-11.193 25-25z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    z-index: 1;
}

.contact .container {
    position: relative;
    z-index: 2;
}

.contact h2 {
    color: #2c3e50;
}

.contact h2::after {
    background: linear-gradient(90deg, #3498db, #2980b9);
}

.contact-content {
    background: rgba(248, 249, 250, 0.8);
    padding: 3rem 2rem;
    border-radius: 25px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(52, 152, 219, 0.2);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.contact p {
    text-align: center;
    margin: 1rem 0;
    font-size: 1rem;
    color: #2c3e50;
    font-weight: 400;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    display: inline-block;
}

.contact a:hover {
    color: #2980b9;
    background: rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

.about {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: hidden;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M20 20c0-5.5-4.5-10-10-10s-10 4.5-10 10 4.5 10 10 10 10-4.5 10-10zm10 0c0-5.5-4.5-10-10-10s-10 4.5-10 10 4.5 10 10 10 10-4.5 10-10z'/%3E%3C/g%3E%3C/svg%3E") repeat;
    z-index: 1;
}

.about .container {
    position: relative;
    z-index: 2;
}

.about .phero {
    font-size: 1.3rem;
    font-weight: 400;
    color: #34495e;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.about-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem 1.5rem;
    border-radius: 20px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 500;
    color: #2c3e50;
    transition: all 0.4s ease;
    cursor: default;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.1), transparent);
    transition: left 0.6s ease;
}

.about-item:hover::before {
    left: 100%;
}

.about-item:hover {
    transform: translateY(-10px) scale(1.03);
    background: rgba(255, 255, 255, 1);
    border-color: #3498db;
    box-shadow: 0 20px 50px rgba(52, 152, 219, 0.2);
    font-size: 1.25rem;
}

.about-item p {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: 400;
    margin-top: 0.5rem;
    font-style: italic;
}

.about .p__hero {
    text-align: center;
}

/* BCI Types Section */
.bci-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.bci-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem 1.5rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s ease;
    cursor: default;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.bci-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.1), transparent);
    transition: left 0.6s ease;
}

.bci-item:hover::before {
    left: 100%;
}

.bci-item:hover {
    transform: translateY(-10px) scale(1.03);
    background: rgba(255, 255, 255, 1);
    border-color: #3498db;
    box-shadow: 0 20px 50px rgba(52, 152, 219, 0.2);
}

.bci-item h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.bci-item p {
    font-size: 0.95rem;
    color: #5a6c7d;
    line-height: 1.6;
    text-align: left;
    font-style: normal;
    margin-top: 0;
}

/* How it works section */
.how-it-works {
    margin-top: 4rem;
}

.how-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2rem;
    position: relative;
}

.how-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 2px;
}

.how-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.how-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}


 .how-image {
    width: 100%;
    height: 200px;
    margin-bottom: 1rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    /* Видаляємо display: flex; та gap: 10px; звідси! */
}



.how-image img {
    width: 100%; /* Забезпечує, що одне зображення займає весь простір */
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.how-item:hover .how-image img {
    transform: scale(1.05);
}

.how-item:hover {
    transform: translateY(-5px);
    border-color: #3498db;
    box-shadow: 0 15px 35px rgba(52, 152, 219, 0.2);
}

.how-item h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.8rem;
}

.how-item p {
    font-size: 0.9rem;
    color: #5a6c7d;
    line-height: 1.5;
    margin: 0;
}


.how-item.application {
    grid-column: 1 / -1; /* Займає обидві колонки */
    max-width: none;     /* Знімаємо обмеження максимальної ширини */
    margin: 0;           /* Знімаємо примусове центрування */
}

.how-item.application .how-image {
    display: flex; /* Увімкнути гнучке розміщення */
    gap: 10px;     /* Проміжок між двома зображеннями */
}


.how-item.application .how-image img {
    width: calc(50% - 5px); /* Кожне зображення займає 50% від ширини мінус половина проміжку */
    /* Можна також просто використовувати flex-basis: 50%; width: 50%; */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .bci-types {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 2rem 0;
    }
    
    .bci-item {
        padding: 1.5rem;
    }
    
    .how-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .how-item.application {
        grid-column: 1;
        max-width: none;
    }
    
    .how-title {
        font-size: 1.5rem;
    }
    
    .how-image {
        height: 150px;
    }
}

/* Language Switcher Styles */
.language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.language-switcher a {
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.language-switcher a:hover {
    background: rgba(0, 0, 0, 0.7);
    color: #ffc107;
}


@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    section h2 {
        font-size: 2rem;
    }
    
    .team-groups {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .team-group {
        padding: 1.5rem;
    }
    
    .about-grid,
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .about-item,
    .news-item {
        padding: 1.5rem;
    }
    
    .contact-content {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }
    
    .about .p__hero {
        font-size: 1.1rem;
        padding: 0 1rem;
        text-align: center;
    }
}