/* =========================
   TEACHERS
   ========================= */

   .teachers {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 30px 80px;
}

.teachers > h1 {
    margin: 0 0 15px;
    font-size: 42px;
}

.page-intro {
    max-width: 700px;
    margin: 0;
    color: #666;
    line-height: 1.7;
}

.teachers-section {
    margin-top: 60px;
}


/* =========================
   GRID
   ========================= */

.teachers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}


/* =========================
   CARD
   ========================= */

.teacher-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid #ddd;
    transition: 0.3s ease;
}

.teacher-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.teacher-card img {
    display: block;
    width: 100%;
    height: 500px;
    object-fit:contain;
}

.teacher-info {
    padding: 22px;
}

.teacher-info h2 {
    margin: 0 0 7px;
    font-size: 21px;
}

.subject {
    margin: 0 0 8px;
    font-weight: 600;
}

.teacher-position {
    margin: 0;
    color: #666;
}


/* =========================
   PAGINATION
   ========================= */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 45px;
}

.pagination button {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;

    border: 1px solid #ccc;
    background: white;

    cursor: pointer;
    transition: 0.2s ease;
}

.pagination button:hover:not(:disabled) {
    background: #eee;
}

.pagination button.active {
    background: #111;
    color: white;
    border-color: #111;
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#page-numbers {
    display: flex;
    gap: 8px;
}

.error {
    color: #c00;
}


/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 900px) {

    .teachers-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}


@media (max-width: 650px) {

    .teachers {
        padding: 35px 18px 60px;
    }

    .teachers > h1 {
        font-size: 34px;
    }

    .teachers-grid {
        grid-template-columns: 1fr;
    }

    .teacher-card img {
        height: 280px;
    }

}