/* teachers.css - Стили для страницы преподавателей */

/* Герой-секция для преподавателей */
.hero-teachers {
    background: linear-gradient(rgba(0, 62, 83, 0.9), rgba(45, 63, 102, 0.9)), url('../images/teachers-bg.jpg');
    background-size: cover;
    background-position: center;
    padding: 180px 0 100px;
}

/* О команде */
.team-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.team-intro-content h2 {
    color: var(--primary-color);
    font-size: 32px;
    margin-bottom: 20px;
    font-weight: 700;
}

.team-intro-content > p {
    color: var(--text-dark);
    font-size: 18px;
    margin-bottom: 25px;
    line-height: 1.6;
}

.team-features {
    list-style: none;
    margin-bottom: 30px;
}

.team-features li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    color: var(--text-dark);
    line-height: 1.5;
}

.team-features i {
    color: var(--accent-color);
    margin-top: 3px;
    flex-shrink: 0;
}

.team-mission {
    background: var(--light-blue);
    padding: 25px 30px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.team-mission h3 {
    color: var(--primary-color);
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 600;
}

.team-mission h3:last-child {
    margin-bottom: 0;
}

.team-intro-image {
    height: 400px;
    background: linear-gradient(135deg, var(--light-blue), #d4eaf0);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.team-intro-image i {
    font-size: 80px;
    margin-bottom: 20px;
}

.team-intro-image p {
    font-size: 18px;
    font-weight: 600;
}

/* Фильтры преподавателей */
.teacher-filters {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px 30px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.filter-group h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-btn {
    background: var(--white);
    color: var(--text-dark);
    border: 2px solid rgba(0, 62, 83, 0.2);
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Сетка преподавателей */
.teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.teacher-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 62, 83, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%; /* чтобы карточка растягивалась на всю высоту сетки */
}

.teacher-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 62, 83, 0.15);
}

.teacher-card-header {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 30px 30px 20px;
    color: var(--white);
}

.teacher-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 15px;
}

.teacher-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teacher-status {
    position: absolute;
    top: 25px;
    right: 25px;
    background: var(--accent-color);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.teacher-name h3 {
    font-size: 18px;
    margin-bottom: 5px;
    font-weight: 600;
}

.teacher-name p {
    opacity: 0.9;
    font-size: 13px;
}

.teacher-info {
    display: flex;
    justify-content: space-between;
    padding: 20px 30px;
    background: var(--light-blue);
    border-bottom: 1px solid rgba(0, 62, 83, 0.1);
}

.teacher-experience,
.teacher-languages {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 12.5px;
}

.teacher-specializations {
    padding: 20px 30px 0;
}

.teacher-specializations h4 {
    color: var(--text-dark);
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}

.specialization-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.tag-delf {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

.tag-ege {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.tag-business {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.tag-beginner {
    background: rgba(111, 66, 193, 0.1);
    color: #6f42c1;
}

.tag-native {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.tag-advanced {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

.tag-conversation {
    background: rgba(253, 126, 20, 0.1);
    color: #fd7e14;
}

.tag-translation {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

.tag-children {
    background: rgba(232, 62, 140, 0.1);
    color: #e83e8c;
}

.tag-methodology {
    background: rgba(32, 201, 151, 0.1);
    color: #20c997;
}

.tag-professional {
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.teacher-bio {
    padding: 20px 30px;
    color: var(--text-light);
    line-height: 1.6;
    border-bottom: 1px solid rgba(0, 62, 83, 0.1);
    flex-grow: 1; /* био занимает всё доступное место, прижимая кнопки вниз */
}

.teacher-actions {
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto; /* кнопки приклеиваются к низу */
    padding-top: 20px; /* оставляем отступ, если он уже есть — уберите дублирование */
}

.teacher-button {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: block;
}

.teacher-button:hover {
    background: #002a3a;
    color: var(--white);
}

.teacher-more {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.teacher-more:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Примечание о вакансиях */
.teachers-note {
    background: var(--light-blue);
    border-radius: var(--border-radius);
    padding: 25px 30px;
    margin-top: 50px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.note-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.note-content h4 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 600;
}

.note-content p {
    color: var(--text-dark);
    line-height: 1.5;
}

/* Достижения */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.achievement-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 62, 83, 0.1);
    transition: var(--transition);
}

.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 62, 83, 0.15);
}

.achievement-icon {
    width: 60px;
    height: 60px;
    background: var(--light-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary-color);
    font-size: 24px;
}

.achievement-number {
    font-size: 40px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1;
}

.achievement-text {
    color: var(--text-dark);
    font-weight: 500;
}

/* Модальное окно */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 30px;
    color: var(--text-dark);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.modal-body {
    padding: 40px;
}

/* Форма пробного урока (аналогично другим страницам) */
.trial-form-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.trial-form-text h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--white);
}

.trial-form-text p {
    font-size: 18px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.trial-form-text ul {
    list-style: none;
    margin-top: 30px;
}

.trial-form-text li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
}

.trial-form-text i {
    color: var(--accent-color);
}

.trial-form {
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.trial-form input,
.trial-form select {
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
}

.trial-form button {
    margin-top: 10px;
}

.form-note {
    font-size: 12px;
    text-align: center;
    margin-top: 15px;
    opacity: 0.7;
}

/* Адаптивность */
@media (max-width: 992px) {
    .team-intro {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .teachers-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .trial-form-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .teacher-filters {
        padding: 20px;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .teachers-note {
        flex-direction: column;
        text-align: center;
    }
    
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-body {
        padding: 30px 20px;
    }
}

@media (max-width: 576px) {
    .teachers-grid {
        grid-template-columns: 1fr;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .teacher-card-header {
        padding: 20px;
    }
    
    .teacher-info,
    .teacher-specializations,
    .teacher-bio,
    .teacher-actions {
        padding: 15px 20px;
    }
    
    .trial-form {
        padding: 25px;
    }
}







/* ===== УЛУЧШЕННОЕ МОДАЛЬНОЕ ОКНО ===== */
#teacherModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#teacherModal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 32px;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(0, 62, 83, 0.25);
    position: relative;
    animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideIn {
    from { transform: translateY(30px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary-color);
    transition: all 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(90deg);
}

/* Шапка модалки */
.teacher-modal-header {
    display: flex;
    gap: 30px;
    padding: 30px 30px 20px;
    background: linear-gradient(135deg, #f5f9fc, #ffffff);
    border-bottom: 1px solid rgba(0,62,83,0.08);
}

.teacher-modal-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid white;
    box-shadow: 0 10px 25px rgba(0,62,83,0.15);
}

.teacher-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teacher-modal-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.teacher-modal-info h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 6px;
    line-height: 1.2;
}

.teacher-title {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 12px;
    font-weight: 500;
}

.teacher-modal-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
    font-size: 15px;
}

.stat i {
    color: var(--accent-color);
    width: 18px;
}

/* Контент */
.teacher-modal-content {
    padding: 20px 30px;
}

.modal-section {
    margin-bottom: 28px;
}

.modal-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-section h3 i {
    color: var(--accent-color);
    font-size: 18px;
}

.modal-section p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-dark);
    margin: 0;
}

.modal-section ul {
    margin: 0;
    padding-left: 20px;
}

.modal-section li {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-dark);
    margin-bottom: 6px;
}

/* Теги специализации */
.teacher-modal-content .specialization-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.teacher-modal-content .tag {
    background: rgba(0,62,83,0.06);
    color: var(--primary-color);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    border: none;
}

/* Кнопка в модалке */
.teacher-modal-actions {
    padding: 20px 30px 30px;
}

.teacher-modal-actions .cta-button {
    width: 100%;
    padding: 14px 28px;
    font-size: 16px;
    border-radius: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    transition: all 0.2s;
}

.teacher-modal-actions .cta-button:hover {
    background: #002a3a;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,62,83,0.2);
}

/* Адаптация */
@media (max-width: 768px) {
    .teacher-modal-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }
    
    .teacher-modal-stats {
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        border-radius: 24px;
    }
    
    .teacher-modal-info h2 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .teacher-modal-header {
        padding: 25px 20px 15px;
    }
    
    .teacher-modal-content {
        padding: 15px 20px;
    }
    
    .teacher-modal-actions {
        padding: 15px 20px 25px;
    }
}

/* ===== КНОПКИ ПРЕПОДАВАТЕЛЕЙ — ПРИЖАТЫ К НИЗУ ===== */
.teacher-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100%;
}

.teacher-bio {
    flex: 1 1 auto !important;  /* занимает всё свободное место */
    margin-bottom: 0;
}

.teacher-actions {
    margin-top: auto !important; /* прижимает кнопки вниз */
    padding-top: 20px;           /* отступ от био, если нужен */
}