/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* ===== ROOT STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #057cd8;
    --primary-dark: #0462ad;
    --secondary-color: #d4a574;
    --accent-color: #2c5aa0;
    --nav-color: #000080;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== FOCUS STYLES (Keyboard Accessibility) ===== */
*:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.tab-btn:focus-visible,
.sub-tab-btn:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

.prev-btn:focus-visible,
.next-btn:focus-visible {
    outline: 2px solid white;
    outline-offset: -2px;
}

/* Skip link for keyboard users */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    z-index: 10000;
    border-radius: 0 0 5px 5px;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

body {
    font-family: 'Jost', 'Segoe UI', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== NAVIGATION ===== */
.announcement-strip {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 24px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    z-index: 1001;
}

.strip-approvals {
    opacity: 0.92;
    font-weight: 500;
}

.strip-codes {
    white-space: nowrap;
}

.navbar {
    background-color: var(--bg-white);
    color: var(--text-dark);
    padding: 0.5rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-logo img {
    height: 90px;
    width: auto;
}

.nav-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.nav-links {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.3rem 1.4rem;
    max-width: 720px;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    background: none; /* Background is now handled by slides and overlay */
    overflow: hidden;
    color: white;
    padding: 0;
    text-align: center;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 15px solid var(--primary-color);
    border-bottom: 15px solid var(--primary-color);
    margin: 0;
}

/* Gradient Overlay (Stays on top of images, behind text) */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: auto;
    height: 100%;
    background: linear-gradient(120deg, rgba(26, 58, 82, 0.2) 0%, rgba(44, 90, 160, 0.2) 100%);
    z-index: -1;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: auto;
    height: 100%;
    z-index: -2;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2.5s ease-in-out, transform 2.5s ease-in-out; /* Smooth fade transition */
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1.05); /* Subtle zoom effect */
    transition: opacity 2.5s ease-in-out, transform 8s linear;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.hero-logo {
    position: absolute;
    top: 0px;
    left: 30px;
    width: 120px;
    height: auto;
    z-index: 10;
}

.banner-text h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.banner-text h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.banner-text p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.95;
}

.banner-text .admissions-open {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.banner-text .admissions-open a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.banner-text .admissions-open a:hover {
    color: var(--bg-white);
}

/* ===== PAGE HEADER (For sub-pages) ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    padding: 30px 20px;
    color: white;
    text-align: center;
}

.page-header .quote {
    display: block;
    margin-top: 15px;
    font-style: italic;
    font-size: 1.1rem;
    opacity: 0.9;
}

.page-header .quote span {
    display: block;
    margin-top: 10px;
    font-size: 1rem;
    font-style: normal;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #c29462;
    transform: translateY(-2px);
}

/* ===== ANNOUNCEMENTS ===== */
.announcements {
    background-color: var(--bg-light);
    padding: 40px 20px;
}

.announcements .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 30px;
}

.announcement-item {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    border-left: 5px solid var(--secondary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.announcement-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.announcement-item p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ===== ABOUT SECTION ===== */
.about {
    padding: 80px 20px;
    background-color: white;
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 50px;
}

.about-text {
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: center;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1.05rem;
}

.about-link {
    display: inline-block;
    margin-top: 10px;
    padding: 12px 28px;
    background-color: var(--primary-color);
    color: #ffffff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.about-link:hover {
    background-color: var(--primary-dark);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    gap: 24px;
}

.stat {
    text-align: center;
    padding: 20px;
    background-color: var(--bg-light);
    border-radius: 8px;
}

.stat h3 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.stat p {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* ===== HOD PROFILE ===== */
.hod-profile {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 40px;
    margin-top: 20px;
    align-items: start;
}

.hod-photo {
    text-align: center;
}

.hod-photo img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    margin-bottom: 12px;
}

.hod-photo h4 {
    color: var(--primary-color);
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.hod-photo p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
}

.hod-section {
    margin-bottom: 20px;
}

.hod-section h4 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 4px;
}

.hod-section p,
.hod-section li {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 0.95rem;
}

.hod-section ul {
    padding-left: 20px;
}

.hod-section li {
    margin-bottom: 6px;
}

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

    .hod-photo img {
        max-width: 180px;
    }
}

/* ===== LEADERSHIP SECTION ===== */
.leadership {
    padding: 80px 20px;
    background-color: var(--bg-light);
}

.leadership h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 50px;
}

.leadership-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.leader-card {
    background-color: var(--bg-white);
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    overflow: hidden;
    width: 240px;
    max-width: 100%;
}

.leader-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.leader-photo {
    padding: 20px 20px 0 20px;
}

.leader-photo img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center top;
    border: 8px solid white;
    box-shadow: 0 0 0 1px var(--secondary-color), 0 4px 10px rgba(0,0,0,0.1);
}

.leader-photo img.headroom {
    object-fit: contain;
    background-color: var(--bg-white);
}

.leader-info {
    padding: 20px;
}

.leader-info h3 {
    margin-bottom: 5px;
    color: var(--primary-color);
}

/* ===== PROGRAMS SECTION ===== */
.programs {
    background-color: var(--bg-white);
    padding: 80px 20px;
}

.programs h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 50px;
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 30px;
}

.program-card {
    background-color: var(--primary-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.program-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background-color: var(--primary-dark, #004a7c);
}

.program-card h3 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

a.program-card {
    text-decoration: none;
    color: #ffffff;
    display: flex;
}

.program-card p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
}

.program-card .intake {
    display: inline-block;
    background-color: rgba(255, 220, 60, 0.2);
    color: #ffe44d;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 3px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 220, 60, 0.5);
    text-shadow: 0 0 8px rgba(255, 220, 60, 0.4);
}

/* ===== FACILITIES SECTION ===== */
.facilities {
    padding: 80px 20px;
    background-color: var(--bg-white);
}

.facilities h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 50px;
}

.facilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 30px;
}

.facility-card {
    background-color: var(--primary-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    text-align: center;
}

a.facility-card {
    text-decoration: none;
    color: #ffffff;
    display: block;
}

.facility-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    background-color: var(--primary-dark, #004a7c);
}

.facility-card h3 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.facility-card p,
.facility-card li {
    color: rgba(255, 255, 255, 0.85);
}

.facility-card ul {
    text-align: left;
    padding-left: 20px;
    margin-top: 10px;
}

.placement-facility-card {
    padding-bottom: 0;
    overflow: hidden;
}

.placement-strip {
    margin: 20px -30px -1px;
    border-radius: 0 0 8px 8px;
}

.placement-strip .photo-strip-inner img {
    height: 160px;
}

/* ===== PLACEMENTS SECTION ===== */
.placements {
    padding: 80px 20px;
    background-color: var(--bg-light);
}

.placements h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 50px;
}

.placement-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.placement-content p {
    margin-bottom: 40px;
    color: var(--text-light);
    font-size: 1.1rem;
}

.placement-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.placement-stat-card {
    background-color: white;
    padding: 20px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    min-width: 200px;
}

.placement-stat-card h3 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.recruiters-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.recruiter-badge {
    background-color: white;
    padding: 10px 20px;
    border-radius: 50px;
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* ===== FACILITIES GRID (placements photo cards) ===== */
.facilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 20px;
    margin-top: 20px;
}

.facility-img-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: center;
}

.facility-img-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.facility-img-card p {
    padding: 10px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

/* ===== ADMISSIONS SECTION ===== */
.admissions {
    padding: 80px 20px;
    background-color: var(--bg-light);
}

.admissions h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 50px;
}

.admissions-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.admission-info ol {
    margin-left: 20px;
}

.admission-info li {
    margin-bottom: 15px;
    color: var(--text-light);
    line-height: 1.8;
}

.admission-form {
    background-color: var(--bg-white);
    padding: 40px;
    border-radius: 8px;
}

.admission-form h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.admission-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.admission-form input,
.admission-form select {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.admission-form input:focus,
.admission-form select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 5px rgba(212, 165, 116, 0.3);
}

/* ===== CONTACT SECTION ===== */
.contact {
    padding: 80px 20px;
    background-color: var(--bg-white);
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 50px;
}

.contact-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.contact-map {
    height: 420px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: 30px;
}

.contact-item {
    background-color: var(--primary-color);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
}

.contact-item h4 {
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.contact-item p {
    color: rgba(255, 255, 255, 0.85);
}

.contact-item a {
    color: rgba(255, 255, 255, 0.85);
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.footer-links {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .announcement-strip {
        flex-direction: column;
        gap: 2px;
        text-align: center;
        padding: 4px 12px;
        font-size: 0.72rem;
    }

    .nav-logo img {
        height: 52px;
    }

    .contact-map {
        height: 280px;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-white);
        flex-direction: column;
        gap: 0;
        padding: 10px 20px;
        z-index: 999;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        max-height: 80vh;
        overflow-y: auto;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 12px 0;
        border-bottom: 1px solid var(--border-color);
        font-size: 1rem;
        color: var(--nav-color);
    }

    .banner-text h1 {
        font-size: 2rem;
    }

    .banner-text h2 {
        font-size: 1.2rem;
    }

    .banner-text p {
        font-size: 1rem;
        margin-bottom: 15px;
    }

    .banner-text .admissions-open {
        font-size: 1.2rem;
    }

    .admissions-content {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 30px 15px;
        min-height: 350px;
    }

    .hero-logo {
        width: 80px;
        left: 10px;
        top: 5px;
    }

    .about,
    .programs,
    .admissions,
    .contact,
    .facilities,
    .placements {
        padding: 50px 15px;
    }

    .page-header {
        padding: 25px 15px;
    }

    .about h2,
    .programs h2,
    .admissions h2,
    .contact h2,
    .leadership h2,
    .facilities h2,
    .placements h2 {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .dept-content {
        padding: 30px 15px;
    }

    .contact-footer {
        flex-direction: column;
        gap: 20px;
    }

    /* Carousel buttons always visible on touch devices */
    .prev-btn, .next-btn {
        opacity: 1;
        pointer-events: auto;
        padding: 12px;
        font-size: 16px;
    }

    /* Tab buttons: horizontal scroll on mobile */
    .tab-buttons {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        gap: 5px;
        padding-bottom: 10px;
        scrollbar-width: none;
    }

    .tab-buttons::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        white-space: nowrap;
        padding: 8px 14px;
        font-size: 0.95rem;
        flex-shrink: 0;
    }

    .sub-tab-buttons {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .sub-tab-buttons::-webkit-scrollbar {
        display: none;
    }

    .sub-tab-btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 6px 14px;
        font-size: 0.85rem;
    }

    /* Activity cards */
    .activity-card {
        padding: 20px 15px;
        margin-bottom: 25px;
    }

    .activity-header h3 {
        font-size: 1.2rem !important;
    }

    /* Placement stat cards */
    .placement-stat-card {
        min-width: unset;
        width: 100%;
        padding: 15px 20px;
    }

    .placement-stat-card h3 {
        font-size: 2rem;
    }

    .placement-stats {
        flex-direction: column;
        gap: 15px;
    }

    /* Admission form */
    .admission-form {
        padding: 25px 20px;
    }

    /* Back to top button */
    #back-to-top {
        width: 46px;
        height: 46px;
        font-size: 22px;
        line-height: 46px;
        bottom: 20px;
        right: 20px;
    }

    /* Leadership grid */
    .leadership-grid {
        gap: 20px;
    }

    .leader-card {
        width: 200px;
    }

    /* Footer */
    .footer-links {
        gap: 12px;
        font-size: 0.9rem;
    }

    /* Program cards */
    .program-card {
        padding: 20px;
    }

    .facility-card {
        padding: 20px;
    }

    /* Inline flex HoD profile - stack on mobile */
    .dept-content [style*="display: flex"][style*="gap: 20px"] {
        flex-direction: column !important;
        align-items: center !important;
    }

    .dept-content [style*="display: flex"][style*="gap: 20px"] img {
        max-width: 160px !important;
        width: 100% !important;
        height: auto !important;
    }
}

@media (max-width: 480px) {
    .banner-text h1 {
        font-size: 1.4rem;
    }

    .banner-text h2 {
        font-size: 1rem;
    }

    .banner-text .admissions-open {
        font-size: 1rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .page-header p {
        font-size: 0.9rem;
    }

    .hero {
        min-height: 280px;
    }

    .hero-logo {
        width: 60px;
        left: 8px;
        top: 5px;
    }

    .programs-grid,
    .announcements .container,
    .facilities-grid {
        grid-template-columns: 1fr;
    }

    .stat h3 {
        font-size: 2rem;
    }

    .about h2,
    .programs h2,
    .admissions h2,
    .contact h2,
    .leadership h2,
    .facilities h2,
    .placements h2 {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }

    .about,
    .programs,
    .admissions,
    .contact,
    .facilities,
    .placements {
        padding: 35px 12px;
    }

    .dept-content {
        padding: 20px 12px;
    }

    .container {
        padding: 0 12px;
    }

    .activity-card {
        padding: 15px 12px;
    }

    .announcement-item {
        padding: 18px;
    }

    .recruiter-badge {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .topper-info h3 {
        font-size: 1.1rem;
    }

    .content-caption {
        font-size: 0.85rem;
        padding: 8px 10px;
    }

    /* Contact items on index page */
    .contact-info {
        grid-template-columns: 1fr;
    }
}

/* ===== DEPARTMENT PAGE STYLES ===== */
.dept-content {
    padding: 80px 20px;
}

.dept-content h2, .dept-content h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.dept-content h3 {
    margin-top: 30px;
    font-size: 1.5rem;
}

.dept-content p {
    margin-bottom: 15px;
    color: var(--text-light);
}

.dept-content ul {
    margin-left: 20px;
    margin-bottom: 20px;
    color: var(--text-light);
}

.dept-content li {
    margin-bottom: 10px;
}

/* ===== TABLES ===== */
.table-container {
    overflow-x: auto;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.committee-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    text-align: left;
    min-width: 600px; /* Ensures table doesn't squish too much on mobile */
}

.committee-table th,
.committee-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.committee-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    white-space: nowrap;
}

.committee-table tr:nth-child(even) {
    background-color: var(--bg-light);
}

.committee-table tr:hover {
    background-color: rgba(212, 165, 116, 0.1); /* Light gold tint on hover */
}

/* ===== TOPPERS CAROUSEL ===== */
.toppers-section {
    padding: 40px 0 0 0;
    background-color: var(--bg-white);
}

.toppers-carousel {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    aspect-ratio: 16/9;
    display: grid;
}

.topper-slide {
    grid-area: 1 / 1;
    width: 100%;
    height: 100%;
    position: relative;
    opacity: 0;
    transform: scale(1);
    transition: opacity 1s ease-in-out, transform 7s linear;
}

.topper-slide.active {
    opacity: 1;
    transform: scale(1.05);
    z-index: 1;
}

.topper-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #f4f4f4;
}

/* Variable-height carousel: sizes to the tallest image instead of a fixed aspect ratio */
.toppers-carousel.auto-height {
    aspect-ratio: unset;
}

.toppers-carousel.auto-height .topper-slide {
    height: auto;
}

.toppers-carousel.auto-height .topper-slide img {
    height: auto;
    display: block;
}

.topper-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(26, 58, 82, 0.85);
    color: white;
    padding: 15px;
    text-align: center;
    display: none;
}

.topper-info h3 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--secondary-color);
}

.prev-btn, .next-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    background-color: rgba(0,0,0,0.3);
    border: none;
    transition: 0.3s;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
}

.next-btn {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev-btn {
    left: 0;
    border-radius: 0 3px 3px 0;
}

.prev-btn:hover, .next-btn:hover {
    background-color: rgba(0,0,0,0.8);
}

.toppers-carousel:hover .prev-btn,
.toppers-carousel:hover .next-btn,
.content-carousel:hover .prev-btn,
.content-carousel:hover .next-btn {
    opacity: 1;
    pointer-events: auto;
}

@keyframes fade {
  from {opacity: 0.4}
  to {opacity: 1}
}

/* ===== PHOTO STRIP CAROUSEL ===== */
.photo-strip-section {
    padding: 30px 0;
    background: var(--bg-light);
    overflow: hidden;
}

.photo-strip-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.photo-strip-track {
    overflow: hidden;
    width: 100%;
}

.photo-strip-inner {
    display: flex;
    gap: 12px;
    width: max-content;
    will-change: transform;
}

.photo-strip-inner:hover {
    animation-play-state: paused;
}

.photo-strip-inner img {
    height: 220px;
    width: auto;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

@keyframes photo-strip-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== CONTENT CAROUSEL (For Activities/Events) ===== */
.content-carousel {
    position: relative;
    max-width: 100%;
    margin: 0 auto 30px auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: grid;
}

.content-slide {
    grid-area: 1 / 1;
    width: 100%;
    position: relative;
    opacity: 0;
    transform: scale(1);
    transition: opacity 1s ease-in-out, transform 7s linear;
}

.content-slide.active {
    opacity: 1;
    transform: scale(1.05);
    z-index: 1;
}

.content-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.content-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 15px;
    text-align: center;
    font-size: 1rem;
    display: none;
}


/* ===== TABS ===== */
.tab-container {
    margin-top: 20px;
}

.tab-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.tab-btn:hover, .tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active {
    border-bottom-color: var(--secondary-color);
}

.tab-content {
    display: none;
    animation: fade 0.5s;
}

.tab-content.active {
    display: block;
}

/* ===== SUB-TABS (Nested Tabs) ===== */
.sub-tab-container {
    margin-top: 10px;
}

.sub-tab-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.sub-tab-btn {
    padding: 8px 20px;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-dark);
}

.sub-tab-btn:hover, .sub-tab-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.sub-tab-content {
    display: none;
    animation: fade 0.5s;
}

.sub-tab-content.active {
    display: block;
}

/* ===== BACK TO TOP BUTTON ===== */
#back-to-top {
    display: none; /* Hidden by default */
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 9999;
    font-size: 30px;
    border: none;
    outline: none;
    background-color: var(--secondary-color);
    color: white;
    cursor: pointer;
    width: 60px;
    height: 60px;
    padding: 0;
    text-align: center;
    line-height: 60px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: var(--transition);
}

#back-to-top:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}

/* ===== ACTIVITY CARDS (NSS/Events) ===== */
.activity-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    padding: 30px;
    margin-bottom: 40px;
    border-left: 5px solid var(--primary-color);
    transition: transform 0.3s ease;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 15px;
}

.activity-date {
    background-color: var(--bg-light);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}
