.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
    padding-top: 60px;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 900px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
}

.modal-content img {
    max-width: 350px;
    margin-left: 30px;
    border-radius: 8px;
}

.modal-content .modal-text {
    max-width: 500px;
}

.modal-content h2 {
    font-size: 26px;
    color: #333;
    margin-bottom: 15px;
}

.modal-content p {
    font-size: 18px;
    color: #555;
    line-height: 1.6;
}


.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 25px;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
@media (max-width: 768px) {
    .modal-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 90%;
    }

    .modal-content img {
        margin-left: 0;
        margin-bottom: 20px;
        max-width: 100%;
    }

    .modal-content h2 {
        font-size: 24px;
    }

    .modal-content p {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .modal-content h2 {
        font-size: 22px; 
    }

    .modal-content p {
        font-size: 16px;
    }
}

.team-section {
    padding: 60px 20px;
    background: #fff;
}

.team-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 30px;
    color: #2a2a2a;
}

.team-description {
    max-width: 800px;
    margin: 0 auto 50px;
    text-align: center;
    line-height: 1.6;
    color: #555;
}

.team-members {
    display: flex;
    flex-wrap: nowrap; /* Чтобы все карточки шли в одну строку */
    overflow-x: auto;  /* Горизонтальная прокрутка */
    gap: 16px;          /* Отступы между карточками (можете изменить) */
    padding-bottom: 10px; /* Чтобы скролл не прилипал */
    scroll-behavior: smooth; /* Плавный скроллинг (по желанию) */
}

.member-card {
    text-align: center;
    cursor: pointer;
    min-width: 300px;   /* Минимальная ширина карточки */
    background: #fff;   /* Просто пример фона */
    border-radius: 8px; /* Радиус углов */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* Легкая тень */
}

.member-photo img {
    width: 100%;
    height: auto;
    object-fit: contain; 
    transition: transform 0.3s ease;
}

.member-photo {
    overflow: hidden;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.member-photo:hover img {
    transform: scale(1.05);
}

.member-position {
    font-size: 16px;
    color: #666;
    margin-bottom: 5px;
}

.member-name {
    font-size: 20px;
    color: #333;
    margin: 0;
}
.member-info:hover .member-position,
.member-info:hover .member-name {
    color: #007bff; 
}

@media (max-width: 1024px) {
    .team-members {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px 20px;
    }

    .member-photo {
        height: auto;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 28px;
    }

    .team-members {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

    .member-photo {
        height: auto; 
    }
}

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

    .member-name {
        font-size: 18px;
    }
}