@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;600&display=swap');

body {
    margin: 0;
    font-family: "Comfortaa", sans-serif;
    background: #f0f4f8;
    color: #000;
}

/* Заголовок страницы */
.pageTitle {
    text-align: center;
    margin-top: 90px; /* компенсируем высоту панели */
    font-size: 36px;
    color: #000000;
}

/* Сетка сотрудников */
.teamGrid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: auto;
}

/* Карточка сотрудника */
.teamCard {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    cursor: pointer;
    flex: 1 1 200px;   /* каждая карточка минимум 200px */
    max-width: 250px; /* но не шире 250px */
}

.teamCard:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.25);
}

.teamCard img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.teamCard .teamContent {
    padding: 15px;
}

.teamCard .teamName {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #000000;
}

.teamCard .teamPosition {
    font-size: 16px;
    color: #333;            
    margin-bottom: 5px;
}

.teamCard .teamExperience {
    font-size: 14px;
    color: #555;
}

/* 📱 телефоны */
@media (max-width: 600px) {
    .teamCard {
        flex: 1 1 calc(50% - 20px); /* 2 карточки в ряд */
        max-width: calc(50% - 20px);
    }
}




.title {
    font-size: 32px;
    margin-bottom: 30px;
    color: #222;
    text-align: center;
}

/* === Контейнер карточек === */
.teachers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* === Карточка === */
.teacher-card {
    cursor: pointer;
    position: relative;
    flex: 1 1 calc(33.333% - 25px); /* ровно 3 карточки в ряд */
    max-width: calc(33.333% - 25px);
    aspect-ratio: 1 / 1;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.teacher-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* === Фото === */
.teacher-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.85);
    transition: filter 0.3s ease;
}

.teacher-card:hover img {
    filter: brightness(1);
}

/* === Информация === */
.teacher-info {
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 12px;
    text-align: center;
    backdrop-filter: blur(3px);
}

.teacher-info h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.teacher-info p {
    margin: 4px 0;
    font-size: 14px;
    color: #ddd;
}

.teacher-info .date {
    font-size: 12px;
    color: #bbb;
}

/* === 📱 АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ === */
@media (max-width: 900px) {
    .teacher-card {
        flex: 1 1 calc(50% - 20px); /* по 2 карточки в ряд */
        max-width: calc(50% - 20px);
    }
}

@media (max-width: 600px) {
    .teacher-card {
        flex: 1 1 100%; /* по одной карточке */
        max-width: 100%;
    }

    .teacher-info {
        background: rgba(0, 0, 0, 0.35); /* более прозрачный, чтобы фото видно */
    }

    .teacher-info h3 {
        font-size: 16px;
    }

    .teacher-info p {
        font-size: 13px;
    }

    .teacher-info .date {
        font-size: 12px;
    }
}

/* ===== Модальное окно ===== */
.teacher-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  z-index: 999;
  backdrop-filter: blur(4px);
}

.teacher-modal.show { display: flex; }

.teacher-modal-content {
  padding: 10px;
  position: relative;
  background: #fff;
  border-radius: 20px;
  max-width: 600px;
  width: 90%;
  animation: zoomIn 0.3s ease;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

.teacher-modal-content img {
  width: 60%;
  border-radius: 20px;
  height: 300px;
  object-fit: cover;
  display: flex;
  margin-right: auto;
  margin-left: auto;
}

.modal-info {
  padding: 20px;
  text-align: center;
}

.modal-info h2 {
  margin-bottom: 8px;
  font-size: 22px;
  color: #222;
}

.modal-info p {
  margin: 6px 0;
  font-size: 15px;
  color: #444;
}

.modal-info blockquote {
  margin-top: 12px;
  font-style: italic;
  color: #666;
}

.teacher-modal .close {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 28px;
  cursor: pointer;
  color: #fff;
  background: rgba(0,0,0,0.4);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  text-align: center;
  line-height: 30px;
  transition: 0.2s;
}

.teacher-modal .close:hover { background: rgba(0,0,0,0.6); }

@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}


.butt{
    align-items: center;
    padding-right:20px;
    padding-left:20px;
    border-radius: 12px;
    font-weight: bold;
    background-color: black;
    color: white;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    font-size: 25px;

    padding-right: 100px;
    transition: 0.2s;
}

.butt:hover{
    padding-right: 20px;
}