.all-categories {
width: 100%;
}

.teacher-stats {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.stat-item {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

.stat-label {
    font-size: 14px;
    color: #7f8c8d;
}

.teacher-filters {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#teacher-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

#teacher-filter-form select,
#teacher-filter-form input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

#teacher-filter-form button {
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

#teacher-filter-form button[type="reset"] {
    background-color: #e74c3c;
}

.teacher-category {
    margin-bottom: 40px;
}

.teacher-category h2 {
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--wp--preset--color--tertiary), var(--wp--preset--color--primary));
    border-radius: 15px;
    padding: 15px;
    color: white;
}

.teacher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 20px;
}

.teacher-card {
    display: flex;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.teacher-card:hover {
    transform: translateY(-5px);
}

.teacher-photo {
    flex: 0 0 250px;
}

.teacher-photo img {
    width: 248px;
    border-radius: 10px;
    object-fit: cover;
}

.teacher-info {
    flex: 1;
    padding: 15px;
}

.teacher-info h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 23px;
}

.info-section {
    margin-bottom: 15px;
}

.info-section h4 {
    margin: 10px 0 5px 0;
    font-size: 14px;
    color: #7f8c8d;
}

.info-bubble {
    display: inline-block;
    background-color: #f0f8ff;
    padding: 5px 10px;
    margin: 3px;
    border-radius: 15px;
    font-size: 13px;
    color: #2c3e50;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.modal-info-bubble {
    display: inline-block;
    background-color: #f0f8ff;
    padding: 5px 10px;
    margin: 3px;
    border-radius: 15px;
    font-size: 16px;
    color: #2c3e50;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.info-bubble.full-width {
    width: 100%;
    margin-bottom: 10px;
}

.position {
    background-color: #e3f2fd;
    font-weight: bold;
    font-size: 16px;
}

.subject {
    background-color: #e8f5e9;
}

.program {
    background-color: #fff3e0;
}

.qualification {
    background-color: #f3e5f5;
}

.degree {
    background-color: #e0f7fa;
}

.title {
    background-color: #fff8e1;
}

.education {
    display: block;
    margin: 5px 0;
    padding: 8px;
    border-radius: 8px;
    background-color: #e8eaf6;
}

.retraining {
    display: block;
    margin: 5px 0;
    padding: 8px;
    border-radius: 8px;
    background-color: #f1f8e9;
}

.qualification-improvement {
    display: block;
    margin: 5px 0;
    padding: 8px;
    border-radius: 8px;
    background-color: #ffebee;
}

.experience {
    background-color: #e0f2f1;
    font-weight: bold;
}

@media (max-width: 767px) {
    .teacher-card {
        flex-direction: column;
    }
    
    .teacher-photo {
        flex: 0 0 auto;
        height: 200px;
        display: contents;
    }
    
    .teacher-grid {
        grid-template-columns: 1fr;
    }
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.category-button {
    padding: 8px 12px;
    border: none;
    border-radius: 20px;
    background-color: #e0e0e0;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.category-button:hover {
    background-color: #d0d0d0;
}

.category-button.active {
    background-color: #3498db;
    color: white;
}

.category-button.all-categories {
    background-color: #2c3e50;
    color: white;
}

/* Modal Styles */
.teacher-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 1000px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: fixed;
    right: calc(25% + 25px);
    top: 10%;
    z-index: 1001;
    display: flex;
}

.modal-info-section h4 {
    margin: 10px 0 5px 0;
    font-size: 18px;
    color: #7f8c8d;
}

.modal-teacher-card {
    display: flex;
    gap: 20px;
}

.modal-teacher-photo img {
    width: 315px;
    border-radius: 10px;
    object-fit: cover;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .modal-teacher-card {
        flex-direction: column;
        margin-top: 25px;
    }

    .modal-teacher-photo {
        flex: 0 0 auto;
        height: 150px;
        display: contents;
    }

    .close-modal {
        right: 3%;
        top: 6%;
        width: 36px;
        height: 36px;
        font-size: 28px;
    }
}

.teacher-stats-filter {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stats-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-filter-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background-color: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 90px;
}

.stat-filter-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #4a90e2;
}

.stat-filter-button.active {
    background-color: #4a90e2;
    color: white;
    border-color: #4a90e2;
}

.stat-filter-button.active .stat-number,
.stat-filter-button.active .stat-label {
    color: white;
}

.stat-filter-button .stat-number {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.stat-filter-button .stat-label {
    font-size: 14px;
    color: #666;
    line-height: 1.3;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stats-filter-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .stat-filter-button {
        padding: 12px;
        min-height: 80px;
    }
    
    .stat-filter-button .stat-number {
        font-size: 20px;
    }
    
    .stat-filter-button .stat-label {
        font-size: 12px;
    }
}