/* MUFEPREC - Teachers Page CSS */
/* File Location: css/teachers.css */

/* ===== TEACHERS HERO SECTION ===== */
.teachers-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #004494 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.teachers-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" opacity="0.05"><polygon points="0,100 1000,0 1000,100"/></svg>');
    background-size: cover;
}

.teachers-hero .hero-content {
    position: relative;
    z-index: 2;
}

.teachers-hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out;
}

.teachers-hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.teachers-hero .hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.teachers-hero .stat-item {
    text-align: center;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.teachers-hero .stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-color);
    display: block;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.teachers-hero .stat-label {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

/* ===== TEACHER FILTERS SECTION ===== */
.teacher-filters {
    background: white;
    padding: 3rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.filter-header {
    text-align: center;
    margin-bottom: 2rem;
}

.filter-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.filter-header p {
    color: #666;
    font-size: 1.1rem;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: white;
    border: 2px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    color: var(--text-color);
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 86, 179, 0.3);
}

.filter-btn i {
    font-size: 1.1rem;
}

/* ===== TEACHERS GRID SECTION ===== */
.teachers-section {
    padding: 4rem 0;
    background: var(--secondary-color);
}

.teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* ===== TEACHER CARDS ===== */
.teacher-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.teacher-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.teacher-card.hidden {
    display: none;
}

/* ===== TEACHER IMAGE ===== */
.teacher-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.teacher-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.teacher-card:hover .teacher-image img {
    transform: scale(1.05);
}

.teacher-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.8) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.teacher-card:hover .teacher-overlay {
    opacity: 1;
}

.teacher-overlay .btn {
    transform: translateY(20px);
    transition: transform 0.3s ease 0.1s;
}

.teacher-card:hover .teacher-overlay .btn {
    transform: translateY(0);
}

/* ===== TEACHER INFO ===== */
.teacher-info {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.teacher-info h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.teacher-title {
    color: #666;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* ===== TEACHER CREDENTIALS ===== */
.teacher-credentials {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.credential {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #555;
}

.credential i {
    color: var(--primary-color);
    width: 16px;
}

/* ===== TEACHER RATING ===== */
.teacher-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    display: flex;
    gap: 2px;
}

.stars i {
    color: #ffc107;
    font-size: 0.9rem;
}

.rating-text {
    font-size: 0.85rem;
    color: #666;
}

/* ===== TEACHER SPECIALTIES ===== */
.teacher-specialties {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.specialty {
    background: rgba(0, 86, 179, 0.1);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(0, 86, 179, 0.2);
}

/* ===== TEACHER ACTIONS ===== */
.teacher-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.teacher-actions .btn {
    flex: 1;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.teacher-actions .btn i {
    font-size: 0.8rem;
}

/* ===== LOADING AND EMPTY STATES ===== */
.loading-state,
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.empty-state i {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

/* ===== TEACHER EXCELLENCE SECTION ===== */
.teacher-excellence {
    padding: 5rem 0;
    background: white;
}

.excellence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.excellence-item {
    text-align: center;
    padding: 2rem 1rem;
}

.excellence-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #004494);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.excellence-item h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.excellence-item p {
    color: #666;
    line-height: 1.6;
}

/* ===== TEACHERS CTA SECTION ===== */
.teachers-cta {
    background: var(--gradient);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.teachers-cta .cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.teachers-cta .cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.teachers-cta .cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== TEACHER MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease-out;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: var(--gradient);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 2rem;
    max-height: 70vh;
    overflow-y: auto;
}

/* ===== TEACHER PROFILE CONTENT ===== */
.teacher-profile {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.teacher-profile-image {
    width: 150px;
    height: 150px;
    border-radius: 15px;
    overflow: hidden;
    flex-shrink: 0;
}

.teacher-profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teacher-profile-info h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.teacher-profile-info .teacher-title {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1rem;
}

.teacher-profile-info .teacher-credentials {
    margin-bottom: 1rem;
}

.teacher-profile-info .teacher-rating {
    margin-bottom: 1rem;
}

.teacher-bio {
    background: var(--secondary-color);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.teacher-bio h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.teacher-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.detail-section h5 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.detail-section ul {
    list-style: none;
    padding: 0;
}

.detail-section ul li {
    padding: 0.3rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.detail-section ul li:last-child {
    border-bottom: none;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.modal-actions .btn {
    padding: 0.8rem 1.5rem;
}

/* ===== ANIMATIONS ===== */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .teachers-hero h1 {
        font-size: 2.2rem;
    }
    
    .teachers-hero .hero-stats {
        gap: 2rem;
    }
    
    .teachers-hero .stat-number {
        font-size: 2rem;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .teachers-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .teacher-card {
        margin: 0 1rem;
    }
    
    .teacher-info {
        padding: 1.5rem;
    }
    
    .teacher-actions {
        flex-direction: column;
    }
    
    .excellence-grid {
        grid-template-columns: 1fr;
    }
    
    .teachers-cta .cta-content h2 {
        font-size: 2rem;
    }
    
    .teachers-cta .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .teacher-profile {
        flex-direction: column;
        text-align: center;
    }
    
    .teacher-profile-image {
        width: 120px;
        height: 120px;
        margin: 0 auto;
    }
    
    .teacher-details {
        grid-template-columns: 1fr;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .teachers-hero {
        padding: 3rem 0;
    }
    
    .teachers-hero h1 {
        font-size: 1.8rem;
    }
    
    .teacher-filters {
        padding: 2rem 0;
    }
    
    .teachers-section {
        padding: 3rem 0;
    }
    
    .teacher-card {
        margin: 0 0.5rem;
    }
    
    .teacher-info {
        padding: 1rem;
    }
    
    .teacher-actions .btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .excellence-item {
        padding: 1.5rem 0.5rem;
    }
    
    .excellence-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .teacher-bio {
        padding: 1rem;
    }
}

/* ===== ACCESSIBILITY ===== */
.filter-btn:focus,
.teacher-actions .btn:focus,
.modal-close:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.teacher-card:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}

/* ===== PRINT STYLES ===== */
@media print {
    .teacher-filters,
    .teachers-cta,
    .modal,
    .chatbot-container {
        display: none !important;
    }
    
    .teacher-card {
        break-inside: avoid;
        margin-bottom: 2rem;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .teachers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .teacher-card {
        border: 2px solid var(--text-color);
    }
    
    .filter-btn {
        border-width: 3px;
    }
    
    .specialty {
        border-width: 2px;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .teacher-card,
    .filter-btn,
    .teacher-image img,
    .modal {
        transition: none;
    }
    
    .teachers-hero h1,
    .teachers-hero p,
    .teachers-hero .stat-item {
        animation: none;
    }
}