html,
body {
    height: 100%;
    margin: 0;
    scroll-behavior: smooth;
}

main {
    flex: 1;
}
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    padding-top: 55px;   /* Topbar height */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header{
    --page-header-image: url("images/faculty-banner.jpg");
}

/* Prevent Layout Shift */
.main-content {
    margin-top: 55px;
}

/* Page section animation */
.page-section {
    display: none;
}

.page-section.active-section {
    display: block;
    animation: fadeIn 0.4s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(7px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


@keyframes fadeOut {
    0% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        display: none;
    }
}

.teachers-section {
    padding: 50px 20px;
    text-align: center;

}

.section-title {
    font-size: 32px;
    margin-bottom: 30px;
    font-weight: 700;
    color: #003e7f;
}

.teacher-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:30px;
    width:90%;
    max-width:1200px;
    margin:0 auto;
}

/* Responsive for smaller screens */
@media (max-width: 1000px) {
    .teacher-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .teacher-grid {
        grid-template-columns: 1fr;
    }
}

.teacher-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform .3s ease, box-shadow .3s ease;
    opacity: 0;
    transform: translateY(40px);
    height: 250px;
    width: 75%;
    margin-bottom: 50px;
}

.teacher-card.show {
    opacity: 1;
    transform: translateY(0);
}

.teacher-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.teacher-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.teacher-card h3 {
    margin: 5px 0;
    font-size: 20px;
    font-weight: 600;
}

.teacher-card p {
    font-size: 16px;
    color: #555;
}

.footer {
    background: #004d99;
    color: white;
    text-align: center;
    padding: 15px;
    margin-top: auto;
    width: 100%;
    box-sizing: border-box;
}

.footer p {
    margin: 0;
}

/* =====================================================
   MOBILE RESPONSIVE OVERRIDES
   Desktop rules above are untouched.
   ===================================================== */
@media (max-width: 600px) {
    .teacher-card {
        width: 100%;
        height: auto;
        padding-bottom: 15px;
    }

    .teacher-card img {
        height: 200px;
    }

    .section-title {
        font-size: 24px;
    }
}