/* ===================================================================
   0. ROOT VARIABLES & GLOBAL STYLES
   =================================================================== */

:root {
    /* -- Colors -- */
    --primary-color: #003366;
    --primary-color-dark: #002244;
    --primary-color-light: #eef5ff;
    --secondary-color: #E67E22;
    --secondary-color-dark: #d35400;
    
    /* -- Text & Backgrounds -- */
    --text-color: #333;
    --text-color-light: #555;
    --text-color-footer: #a9c2d8;
    --text-color-white: #ffffff;
    --bg-color: #f9f9f9;
    --bg-color-light: #f8f9fa;
    --bg-color-white: #ffffff;
    --border-color: #eee;
    
    /* -- Fonts -- */
    --font-primary: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --font-secondary: 'Tiro Devanagari Hindi', serif;

    /* -- Layout -- */
    --border-radius: 8px;
    --shadow-light: 0 4px 12px rgba(0,0,0,0.05);
    --shadow-medium: 0 5px 15px rgba(0,0,0,0.08);
    --shadow-heavy: 0 8px 20px rgba(0,0,0,0.1);
    
    /* -- Breakpoints (min-width) -- */
    --mq-tablet: 768px;
    --mq-desktop: 1024px;
}

/* --- Global Reset & Body --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px; /* 1rem = 16px */
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Global Justification (from original) --- */
.content-section p, .content-section li, .content-box p,
.content-box li, .about-content p, .content-text p,
.dean-details p, .university-description p, .dean-bio p {
    text-align: justify; text-justify: inter-word; /* Improves spacing on mobile */
}
/* --- 4. PRINT STYLES (Implicit in old sites, needed for Dean Profiles) --- */
@media print {
    .site-header, .main-nav, .site-footer, .college-nav, .btn {
        display: none !important; /* Hide nav/buttons on print */
    }
    .dean-profile-wrapper {
        flex-direction: row !important; /* Always print profile side-by-side */
        border: none;
    }
    .dean-bio {
        margin-top: 0;
    }
}
/* ===================================================================
   2. HOMEPAGE: SLIDESHOW & SECTIONS
   =================================================================== */

/* --- Slideshow --- */
.slideshow-container {
    width: 100%;
    /* Default for Desktop: Taller to show detail */
    height: 60vh; 
    min-height: 400px;
    max-height: 800px; /* Prevents it from becoming too massive on huge screens */
}

.swiper {
    width: 100%;
    height: 100%;
    border-radius: 0px; /* Optional: Adds nice rounded corners */
    overflow: hidden;
}

.swiper-slide {
    text-align: center;
    font-size: 1.125rem;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.swiper-slide img, .swiper-slide video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swiper-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.4)); /* Better readability */
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 1rem;
    width: 80%; /* Limits width on desktop */
    max-width: 800px;
    text-align: center;
    /* Prevent text from overflowing */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.swiper-button-next, .swiper-button-prev {
    color: var(--text-color-white, #fff); /* Added fallback color */
    /* Make buttons smaller on default (mobile) */
    transform: scale(0.7); 
}

.swiper-pagination-bullet-active {
    background: var(--text-color-white, #fff);
}

/* --- Section Backgrounds --- */
.section-bg-light {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    max-width: 1200px;
    margin: 30px auto; /* Added vertical margin */
}

.section-title {
    margin-top: 0;
    margin-bottom: 30px !important;
    text-align: center;
    color: var(--primary-color, #333);
    font-family: 'Merriweather', serif;
    font-weight: 700;
    line-height: 1.3;
    font-size: 2rem; /* Default Desktop Size */
}

/* =========================================
   MOBILE RESPONSIVE MEDIA QUERIES 
   ========================================= */

@media (max-width: 768px) {
    /* 1. Adjust Slideshow Height for Mobile */
    .slideshow-container {
        /* On mobile, we often want 16:9 or 4:3 ratio rather than viewport height */
        height: auto; 
        aspect-ratio: 4 / 3; /* Modern CSS for maintaining ratio */
        min-height: 350px; /* Fallback for older browsers */
        max-height: none;
    }

    /* 2. Resize Caption */
    .swiper-caption {
        bottom: 0; /* Stick to bottom */
        width: 100%; /* Full width */
        border-radius: 0;
        padding: 8px 10px;
        font-size: 0.85rem; /* Smaller text */
        background: rgba(0, 0, 0, 0.7); /* Solid background for readability */
        -webkit-line-clamp: 2; /* Limit to 2 lines */
    }

    /* 3. Adjust Navigation Buttons */
    .swiper-button-next, .swiper-button-prev {
        display: none; /* Often hidden on mobile to show more image; users swipe instead */
    }

    /* 4. Adjust Section Padding */
    .section-bg-light {
        padding: 20px 15px; /* Reduce padding to save screen space */
        margin: 15px 0;
        border-radius: 0; /* Remove rounded corners on full-width mobile */
        box-shadow: none; /* Simpler look */
    }

    /* 5. Adjust Typography */
    .section-title {
        font-size: 1.5rem; /* Smaller heading */
        margin-bottom: 20px !important;
    }
}

/* Extra small devices (phones, 480px and down) */
@media (max-width: 480px) {
    .slideshow-container {
        min-height: 220px;
    }
    
    .section-title {
        font-size: 1.35rem;
    }
    
    .swiper-caption {
        font-size: 0.75rem;
        padding: 6px;
    }
}

/* --- 3. MOBILE ADJUSTMENTS --- */
@media (max-width: 768px) {
      .section-title {
        margin-bottom: 15px !important;
        font-size: 1.5rem;
    }
}

/* --- Profile Cards (Governor, VC) --- */
.image-row-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1.875rem; /* 30px */
    margin-bottom: 2.5rem;
}
.profile-card, .profile-card2 {
    text-align: center;
    flex-basis: 300px;
    flex-grow: 1;
    max-width: 350px;
}
.profile-card2 {
    max-width: 450px;
}
.profile-image {
    width: 200px; 
    height: 200px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--shadow-light);
    margin-bottom: 1rem;
}
.profile-image2 {
    width: 100%;
    max-width: 400px;
    height: 250px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--shadow-light);
    margin-bottom: 1rem;
}
.profile-caption {
    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1.4;
}
.caption-line-1 {
    color: var(--primary-color);
}
.caption-line-2 {
    color: var(--secondary-color);
}
.university-description {
    width: auto;
    margin: 0 auto;
    line-height: 1.6;
    font-size: 1.1rem;
}

/* --- University Pillars (Teaching, Research) --- */
.university-pillars {
    display: grid;
    grid-template-columns: 1fr; /* Mobile: 1 column */
    gap: 1.875rem;
    margin: 1.875rem auto; /* <-- FIX: Changed margin */
    width: 90%;           /* <-- FIX: Added this */
    max-width: 1200px;    /* <-- FIX: Added this */
}
.pillar-card {
    background: var(--bg-color-white);
    padding: 1.875rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    text-align: center;
    border-top: 4px solid var(--secondary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pillar-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}
.pillar-card i {
    color: var(--primary-color);
    margin-bottom: 1rem;
}
.pillar-card h3 {
    margin-top: 0;
    color: var(--text-color);
}
.pillar-card p {
    font-size: 0.95rem;
    color: var(--text-color-light);
}
.btn-pillar {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1.25rem;
    background: var(--primary-color);
    color: var(--text-color-white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: background-color 0.3s;
}
.btn-pillar:hover {
    background: var(--secondary-color);
}

/* --- Stats Section --- */
.stats-section {
    padding: 1.0rem 0;
    text-align: center;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem;
}
.stat-card {
    background: var(--bg-color-white);
    border-radius: var(--border-radius);
    padding: 1.75rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-light);
    border-top: 4px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}
.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #222;
    margin: 0;
    line-height: 1.2;
}
.stat-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color-light);
    margin: 0.25rem 0 0 0;
}

/* --- Video Section --- */
.video-section-wrapper {
    padding: 1.0rem 0;
    text-align: center;
}
.video-responsive-embed {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}
.video-responsive-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
/* =========================================
   QUICK LINKS GRID (Animated Mobile & Desktop)
   ========================================= */

/* 1. Container */
.quick-links-grid {
    padding: 20px 15px;
    margin-bottom: 3rem;
    background-color: #f4f6f9;
    max-width: 1200px;
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin: 0 auto;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Mobile Default: 2 Cols */
    gap: 15px; /* Slightly tighter gap for mobile */
    width: 100%;
    margin: 0 auto;
}

/* 2. The Card (Hidden State) */
.quick-link-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%; 
    min-height: 120px; 
    padding: 1.5rem 1rem;
    
    background: #ffffff;
    border-radius: 15px; 
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.02);
    
    /* --- MODIFIED: Default Light Grey Bottom Line --- */
    border-bottom: 3px solid #e0e0e0; 
    
    /* --- ANIMATION PREP --- */
    opacity: 0; /* Invisible initially */
    transform: translateY(30px); /* Pushed down slightly */
    
    /* Smooth Transition for Animation & Touch */
    /* Added 'border-bottom-color' to the transition list */
    transition: 
        opacity 0.6s ease-out, 
        transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        box-shadow 0.2s ease,
        background-color 0.2s ease,
        border-bottom-color 0.3s ease; 
}

/* 3. The Card (Visible State - Triggered by JS) */
.quick-link-card.in-view {
    opacity: 1;
    transform: translateY(0); /* Flies into place */
}

/* 4. Content Styling */
.quick-link-card i {
    font-size: 2.5rem; /* Good size for mobile */
    margin-bottom: 0.8rem;
    display: inline-block;
    background: -webkit-linear-gradient(45deg, #333, #666);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.quick-link-card span {
    color: #444;
    font-size: 0.95rem; /* Readable on mobile */
    font-weight: 700;
    line-height: 1.3;
}

/* =========================================
   INTERACTION STATES (Desktop & Mobile)
   ========================================= */

/* Desktop Hover: Lift Up */
@media (hover: hover) {
    .quick-link-card:hover {
        transform: translateY(-8px) !important; /* Override animation position */
        box-shadow: 0 15px 30px rgba(0,0,0,0.1);
        z-index: 10;
    }
}

/* Mobile Touch: Press Down (Tactile Feel) */
.quick-link-card:active {
    transform: scale(0.96) !important; /* Shrink slightly on tap */
    background-color: #f0f0f0;
    transition: transform 0.1s;
}

/* =========================================
   COLOR CYCLING (Hover/Active Only)
   ========================================= */

/* Cycle 1: Blue/Purple */
.quick-link-card:nth-child(4n+1) i { 
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
}
/* Color fills only on Hover or Active */
.quick-link-card:nth-child(4n+1):hover, 
.quick-link-card:nth-child(4n+1):active { 
    border-bottom-color: #4facfe; 
}

/* Cycle 2: Orange/Red */
.quick-link-card:nth-child(4n+2) i { 
    background: linear-gradient(135deg, #ff0844 0%, #ffb199 100%); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
}
.quick-link-card:nth-child(4n+2):hover, 
.quick-link-card:nth-child(4n+2):active { 
    border-bottom-color: #ff0844; 
}

/* Cycle 3: Green/Teal */
.quick-link-card:nth-child(4n+3) i { 
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
}
.quick-link-card:nth-child(4n+3):hover, 
.quick-link-card:nth-child(4n+3):active { 
    border-bottom-color: #43e97b; 
}

/* Cycle 4: Purple/Pink */
.quick-link-card:nth-child(4n+4) i { 
    background: linear-gradient(135deg, #c471f5 0%, #fa71cd 100%); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
}
.quick-link-card:nth-child(4n+4):hover, 
.quick-link-card:nth-child(4n+4):active { 
    border-bottom-color: #c471f5; 
}

/* =========================================
   MEDIA QUERIES (Larger Screens)
   ========================================= */
@media (min-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(4, 1fr); /* 4 Columns on Desktop */
        gap: 25px;
    }
    .quick-link-card {
        padding: 2rem 1rem;
    }
    .quick-link-card i {
        font-size: 3.5rem;
    }
    .quick-link-card span {
        font-size: 1.1rem;
    }
}

/* --- TRENDING COURSES SECTION --- */
.trending-courses-section {
    padding: 2.5rem 0;
    background-color: #f0f4f8; 
}

/* 1. SWIPER CONTAINER */
.courses-swiper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px; /* Important: Padding inside so shadows don't clip */
    padding-bottom: 40px; 
    background: transparent !important; /* Ensure no background color on container */
}

.courses-swiper .swiper-wrapper {
    display: flex;
    align-items: stretch; /* EQUAL HEIGHT FIX */
}

.courses-swiper .swiper-slide {
    height: auto; 
    display: flex;
    background: transparent !important;
    padding: 5px; /* Tiny padding prevents clipping of hover effects */
}

/* 2. COURSE CARD (Black Corner Fixes Applied) */
.course-card {
    width: 100%;
    height: 100%; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    
    background: #ffffff; /* Ensure Card is White */
    border-radius: 12px; /* Smoother radius */
    
    /* FIX: Soft shadow prevents dark borders */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05); 
    border: none; 
    
    /* FIX: These two lines cure the "Black Corner" glitch on most browsers */
    transform: translateZ(0); 
    -webkit-backface-visibility: hidden;
    
    overflow: hidden; 
    position: relative; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px); 
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* 3. HOVER TOP LINE (Visibility Improved) */
.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px; /* Made slightly thicker for visibility */
    background: transparent; 
    z-index: 20; /* FIX: High Z-Index ensures it sits ON TOP of the image */
    transition: background 0.3s ease;
}

/* 4. CARD CONTENT */
.course-image-wrapper {
    width: 100%;
    padding: 2.5rem 0;
    background-color: #e6f0f7; 
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 140px;
    position: relative;
    z-index: 1; /* Lower Z-Index so top line sits above it */
}

.course-icon {
    font-size: 3.5rem;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.course-title {
    font-size: 1.3rem; 
    font-weight: 700;
    color: #333;
    padding: 1.5rem 1.5rem 0.5rem; 
    margin-bottom: 0;
    line-height: 1.4;
    flex-grow: 1; 
}

.course-type {
    font-size: 0.9rem;
    color: #003366; 
    font-weight: 700;
    padding: 0 1.5rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.course-detail {
    font-size: 0.85rem;
    color: #666;
    padding: 0 1.5rem 1.5rem;
    flex-grow: 1;
}

.course-detail span {
    display: inline-block; 
    margin-right: 0.8rem;
    white-space: nowrap; 
}

/* 5. BUTTON */
.btn { 
    display: inline-block;
    background-color: #003366; 
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
    margin: 0 1.5rem 1.5rem; 
    align-self: flex-start; 
    margin-top: auto; 
}

.btn:hover {
    background-color: #002244; 
}

/* =========================================
   COLOR LOGIC (Hover Lines)
   ========================================= */
.swiper-slide:nth-child(6n+1) .course-icon { color: #003366; }
.swiper-slide:nth-child(6n+1) .course-card:hover::before { background: #003366; }

.swiper-slide:nth-child(6n+2) .course-icon { color: #E67E22; }
.swiper-slide:nth-child(6n+2) .course-card:hover::before { background: #E67E22; }

.swiper-slide:nth-child(6n+3) .course-icon { color: #28a745; }
.swiper-slide:nth-child(6n+3) .course-card:hover::before { background: #28a745; }

.swiper-slide:nth-child(6n+4) .course-icon { color: #007bff; }
.swiper-slide:nth-child(6n+4) .course-card:hover::before { background: #007bff; }

/* --- DESKTOP VIEW FIXES --- */
@media (min-width: 1024px) {
    .courses-swiper {
        padding-bottom: 20px !important;
    }
    .courses-swiper .swiper-pagination {
        display: none; 
    }
}
/* --- Scrolling Tenders/Circulars --- */
.scrolling-section {
    display: flex;
    flex-direction: column; /* Mobile: Stack */
    gap: 1.875rem;
    margin: 1.875rem 0;
}
.scrolling-box {
    background: var(--bg-color-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    flex: 1;
    overflow: hidden;
}
.scrolling-box-header {
    color: var(--text-color-white);
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.scrolling-box-header h3 {
    margin: 0;
    font-size: 1.1em;
}
.view-all-btn {
    color: var(--text-color-white);
    text-decoration: none;
    font-size: 0.9em;
}
.scrolling-box.box-circulars .scrolling-box-header {
    background-color: var(--primary-color);
}
.scrolling-box.box-tenders .scrolling-box-header {
    background-color: #c9302c;
}
.scrolling-content {
    height: 300px; /* Fixed height */
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
}
.scrolling-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
    position: absolute;
    width: 100%;
}
.scrolling-content ul.is-animated {
    animation: scroll-up 25s linear infinite;
}
.scrolling-content ul.is-animated:hover {
    animation-play-state: paused;
}
@keyframes scroll-up {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}
.scrolling-content li {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}
.scrolling-content li a {
    text-decoration: none;
    color: var(--text-color);
    display: block;
}
.scrolling-content li a:hover .item-title {
    color: var(--primary-color);
}
.item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}
.item-date {
    font-weight: 600;
    color: var(--text-color-light);
}
.item-office {
    color: #888;
}
.item-title {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
}

/* --- News/Events Tabs --- */
.news-events-section {
    background: var(--bg-color-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    margin-bottom: 1.875rem;
}
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    overflow-x: auto;
}
.tab-link {
    padding: 0.625rem 1.25rem;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 1.1em;
    font-weight: 500;
    color: var(--text-color-light);
    position: relative;
    transition: color 0.3s;
    white-space: nowrap;
    margin-bottom: -2px;
}
.tab-link.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
}
.tab-content {
    display: none;
    padding: 1.25rem 0 0 0;
}
.tab-content.active {
    display: block;
}
.announcement-card {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    transition: background-color 0.3s;
}
.announcement-card:hover {
    background-color: var(--bg-color);
}
.announcement-date {
    background: #f0f0f0;
    color: var(--text-color-light);
    text-align: center;
    padding: 0.625rem;
    border-radius: 5px;
    min-width: 60px;
}
.announcement-date .month {
    display: block;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}
.announcement-date .day {
    display: block;
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary-color);
}
.announcement-details h4 {
    margin: 0 0 5px 0;
}
.announcement-details h4 a {
    text-decoration: none;
    color: var(--text-color);
}
.announcement-details h4 a:hover {
    color: var(--secondary-color);
}
.announcement-details p {
    margin: 0;
    font-size: 0.9em;
    color: var(--text-color-light);
}
/* --- Homepage (TABLET) --- */
@media (min-width: 768px) {
    .slideshow-container {
        height: 70vh; /* 70% viewport height */
    }
    .swiper-caption {
        font-size: 1.2rem;
        width: auto;
        max-width: 80%;
    }
    .university-pillars {
        grid-template-columns: repeat(3, 1fr);
    }
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .scrolling-section {
        flex-direction: row; /* Side-by-side */
    }
}
/* --- Homepage (DESKTOP) --- */
@media (min-width: 1024px) {
    .slideshow-container {
        height: 800px;
    }
    .grid-container {
        grid-template-columns: repeat(4, 1fr);
    }
    .courses-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .messages-quicklinks-section {
        display: flex; /* Revert to old flex layout */
        flex-wrap: wrap;
        gap: 1.875rem;
    }
    .message-card {
        flex: 1;
        min-width: 300px;
    }
    /* Re-introduce old quick links panel */
    .quick-links-panel {
        display: flex;
        flex-direction: column;
        background: var(--primary-color);
        padding: 1.25rem;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow-light);
        flex-basis: 300px;
        max-height: 430px;
    }
    .quick-links-panel h3 {
        color: var(--text-color-white);
        margin-top: 0;
        border-bottom: 2px solid #004488;
        padding-bottom: 0.625rem;
        margin-bottom: 0.625rem;
    }
    .quick-links-panel ul {
        list-style: none;
        padding: 0;
        margin: 0;
        overflow-y: auto;
        flex-grow: 1;
    }
    .quick-links-panel li a {
        color: var(--text-color-white);
        text-decoration: none;
        display: block;
        padding: 0.625rem 0;
        border-bottom: 1px solid #004488;
        transition: padding-left 0.2s ease, background-color 0.2s ease;
    }
    .quick-links-panel li a:hover {
        padding-left: 0.625rem;
        background: #004488;
    }
}



/* ===================================================================
   3. GENERIC PAGE STYLES (About, Contact, etc.)
   =================================================================== */

.page-container {
    padding: 2.5rem 0;
}

/* --- Page Title Header --- */
.page-title {
    text-align: center;
    padding: 1.875rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-color), #004a99);
    border-radius: var(--border-radius);
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-light);
}
.page-title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    background: linear-gradient(180deg, #ffffff, #e0e0e0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}
.page-title p {
    font-size: 1rem;
    color: var(--text-color-footer);
    max-width: 700px;
    margin: 0.625rem auto 0;
    text-align: center; /* Override justify */
}

/* --- Content Wrappers (for 2-col layouts) --- */
.about-wrapper, .contact-wrapper, .content-wrapper {
    display: grid;
    grid-template-columns: 1fr; /* Mobile: 1 column */
    gap: 2.5rem;
    background: var(--bg-color-white);
    padding: 1.875rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}
.about-content h2, .content-box h2 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1.25rem;
    font-size: 1.8em;
}
.about-content p, .about-content li, .content-text p {
    line-height: 1.8;
    color: var(--text-color-light);
}
.about-content ul {
    list-style-type: none;
    padding-left: 0;
}
.about-content ul li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 0.625rem;
}
.about-content ul li::before {
    content: '✔';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}
.about-image img, .content-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.about-image img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.image-caption-prompt {
    text-align: center;
    color: #888;
    font-style: italic;
    font-size: 0.9em;
    margin-top: 0.625rem;
}

/* --- Single Column Content Box (Objectives) --- */
.content-box {
    margin-top: 2.5rem;
    background: var(--bg-color-white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}
.objectives-list {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}
.objectives-list li {
    font-size: 1em;
    line-height: 1.8;
    color: var(--text-color-light);
    padding-left: 35px;
    position: relative;
    margin-bottom: 1rem;
}
.objectives-list li::before {
    content: "\f058";
    font-family: "Font Awesome 6 Free";
    position: absolute;
    left: 0;
    top: 3px;
    font-size: 1.2em;
    font-weight: 900; color: var(--secondary-color);
}

/* --- Contact Page Specifics --- */
.contact-info h2, .contact-form h2 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1.25rem;
}
.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
    color: var(--text-color-light);
}
.info-item i {
    font-size: 1.5em;
    color: var(--secondary-color);
    margin-top: 5px;
}
.info-item p {
    margin: 0;
    line-height: 1.6;
}
.map-container {
    margin-top: 1.875rem;
    border-radius: var(--border-radius);
    overflow: hidden;
}
.map-container iframe {
    width: 100%;
    height: 250px;
    border: 0;
}
.modern-form .form-group {
    margin-bottom: 1.25rem;
}
.modern-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #444;
}
.modern-form input[type="text"],
.modern-form input[type="email"],
.modern-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1em;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.modern-form input[type="text"]:focus,
.modern-form input[type="email"]:focus,
.modern-form textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.2);
}
.submit-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--text-color-white);
    padding: 0.75rem 1.875rem;
    border: none;
    border-radius: 50px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.submit-btn:hover {
    background-color: var(--secondary-color);
}
.form-message {
    padding: 1rem;
    margin-bottom: 1.25rem;
    border-radius: 5px;
    border: 1px solid transparent;
    text-align: left;
}
.form-message.success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}
.form-message.error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* --- Image Modal (Lightbox) --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}
.modal-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 900px;
    animation-name: zoom;
    animation-duration: 0.4s;
}
.modal-caption {
    margin: 1.25rem auto 0;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    font-size: 1.2em;
}
@keyframes zoom {
    from {transform:scale(0)}
    to {transform:scale(1)}
}
.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}
.close:hover, .close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* --- Generic Pages (TABLET & DESKTOP) --- */
@media (min-width: 768px) {
    .page-title h1 {
        font-size: 3rem;
    }
    .page-title p {
        font-size: 1.1rem;
    }
    .about-wrapper {
        grid-template-columns: 1.2fr 1fr;
    }
    .content-wrapper {
        grid-template-columns: 1fr 1fr;
    }
    .contact-wrapper {
        grid-template-columns: 1fr 1fr;
    }
}
@media (min-width: 1024px) {
    .page-title h1 {
        font-size: 3.5rem;
    }
}


//* ===================================================================
   4. COLLEGE & DIRECTORY PAGES (Refined & Fixed)
   =================================================================== */

/* --- 1. GLOBAL SCROLL FIX (Crucial for Sticky Headers) --- */
html {
    scroll-behavior: smooth;
    /* This forces the browser to stop scrolling 140px above the target ID */
    /* This prevents titles from hiding behind your sticky header */
    scroll-padding-top: 140px; 
}

/* --- 2. COLLEGE GRID --- */
.college-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile Default: 1 Column */
    gap: 1.875rem;
}

.college-category-card {
    background: var(--bg-color-white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    border-top: 4px solid var(--primary-color);
    transition: transform 0.3s ease;
}
/* Hover effect for cards */
.college-category-card:hover {
    transform: translateY(-5px);
}

.college-category-card h2 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}

.college-category-card ul { list-style: none; padding: 0; margin: 0; }

.college-category-card li {
    padding: 0.6rem 0;
    color: var(--text-color-light);
    font-size: 0.95rem;
    border-bottom: 1px solid #f0f0f0;
    transition: padding-left 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

.college-category-card li:hover {
    color: var(--primary-color);
    padding-left: 5px;
    background-color: #f9f9f9;
}
.college-category-card li:last-child { border-bottom: none; }


/* --- 3. RESPONSIVE TABLES (Directory) --- */
.directory-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: var(--bg-color-light);
    border-radius: var(--border-radius);
}

/* Mobile Table View (Card Style) */
.responsive-table { width: 100%; border-collapse: collapse; }
.responsive-table thead { display: none; /* Hide headers on mobile */ }

.responsive-table tr {
    display: block;
    margin-bottom: 1.5rem;
    background: var(--bg-color-white);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    overflow: hidden;
}

.responsive-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}
.responsive-table td:last-child { border-bottom: none; }

/* This adds the label before the value on mobile */
.responsive-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 1rem;
    text-transform: uppercase;
    font-size: 0.85rem;
}


/* --- 4. COLLEGE PAGE LAYOUT (Mobile First) --- */

/* --- 4. COLLEGE PAGE LAYOUT (Mobile First) --- */

.college-slideshow-container {
    position: relative; /* <--- CRITICAL FIX: Anchors the arrows here */
    width: 100%;        /* Ensures it spans the full width available */
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    overflow: hidden;   /* Keeps content inside rounded corners */
}

/* Add this right after .college-slideshow-container to style the arrows specifically */
.college-slideshow-container .swiper-button-next, 
.college-slideshow-container .swiper-button-prev {
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.3); /* Adds a dark circle background */
    width: 40px;
    height: 40px;
    border-radius: 50%;
    z-index: 10;
}

.college-slideshow-container .swiper-button-next::after, 
.college-slideshow-container .swiper-button-prev::after {
    font-size: 1.2rem;
    font-weight: bold;
}

.college-layout-grid {
    display: flex;
    flex-direction: column; /* Mobile: Stack vertically */
    gap: 20px;
}

/* Mobile Sticky Navigation Bar */
.college-nav {
    position: sticky;
    top: 60px; /* Adjusts to sit below your main header */
    z-index: 900;
    background: var(--bg-color-white);
    
    display: flex;
    flex-direction: row;
    overflow-x: auto; /* Horizontal Scroll */
    white-space: nowrap;
    
    padding: 10px;
    border-radius: 0; /* Flat on mobile */
    border-bottom: 2px solid var(--primary-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

.college-nav a {
    padding: 8px 15px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    border-radius: 4px;
    margin-right: 10px;
    background: #f4f4f4;
    font-size: 1.0rem;
    transition: all 0.3s;
}

.college-nav a.active {
    background-color: var(--primary-color);
    color: #fff;
}

/* Content Sections */
.content-section {
    padding: 1.5rem;
    margin-bottom: 20px;
    background: var(--bg-color-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    font-size: 1rem
    
    /* Specific anchor offset for this section */
    scroll-margin-top: 140px; 
}

/* Dean Profile (Mobile) */
.dean-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}
.dean-profile img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}


/* ===================================================================
   DESKTOP OVERRIDES (Min-Width 1024px)
   =================================================================== */
/* This fixes the sidebar being horizontal on desktop */

@media (min-width: 1024px) {

    /* 1. Layout Grid: Sidebar | Content */
    .college-layout-grid {
        display: grid;
        grid-template-columns: 280px 1fr; /* Sidebar width fixed */
        gap: 30px;
        align-items: start; /* Prevents sidebar stretching */
    }

    /* 2. Sidebar Transformation (Vertical) */
    .college-nav {
        flex-direction: column; /* Vertical Stack */
        overflow-x: hidden;
        overflow-y: auto;
        max-height: 80vh;
        
        position: sticky;
        top: 120px; /* Sits below desktop header */
        
        padding: 15px;
        border: 1px solid #eee;
        border-radius: 8px;
        border-bottom: none;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        margin-bottom: 0;
    }

    .college-nav a {
        display: block;
        width: 100%;
        margin-bottom: 5px;
        background: transparent;
        border-left: 4px solid transparent;
        border-radius: 0 4px 4px 0;
    }

    .college-nav a:hover {
        background-color: #f0f4ff;
        color: var(--primary-color);
    }

    .college-nav a.active {
        background-color: #eef5ff;
        color: var(--primary-color);
        border-left-color: var(--primary-color);
    }

    /* 3. Dean Profile (Side by Side) */
    .dean-profile {
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
        gap: 20px;
    }
    .dean-profile img {
        width: 150px;
        height: 180px;
        border-radius: 8px; /* Rectangle with rounded corners on desktop */
        margin-bottom: 0;
    }

    /* 4. College Grid Columns */
    .college-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 Columns on PC */
    }

    /* 5. Table Desktop View (Normal Table) */
    .responsive-table { display: table; }
    .responsive-table thead { display: table-header-group; }
    .responsive-table tr { display: table-row; border: none; box-shadow: none; margin-bottom: 0; }
    .responsive-table th, .responsive-table td { display: table-cell; text-align: left; padding: 12px 15px; border-bottom: 1px solid #ddd; }
    .responsive-table th { background: var(--primary-color); color: #fff; }
    .responsive-table td::before { display: none; } /* Hide mobile labels */
    
    /* 6. Scroll Adjustment */
    .content-section {
        scroll-margin-top: 130px; /* Fine-tune desktop scroll stop */
    }
}

/* --- Org Chart --- */
.org-chart-container {
    background: var(--bg-color-white);
    padding: 1.875rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    overflow-x: auto;
}
.org-chart {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 100%;
}
.org-chart ul {
    padding-left: 0;
    margin: 0;
    display: flex;
    position: relative;
    flex-direction: column;
    transition: opacity 0.3s;
}
.org-chart ul.collapsed {
    display: none;
}
.org-chart li {
    list-style-type: none;
    position: relative;
    padding: 5px 0 5px 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
/* Vertical Lines */
.org-chart li::before {
    content: '';
    position: absolute;
    border-left: 2px solid #ccc;
    width: 0;
    height: 100%;
    top: -20px;
    left: -10px;
}
.org-chart li:first-child::before { top: 20px; height: calc(100% - 20px); }
.org-chart li:last-child::before { height: 40px; }
.org-chart li::after { display: none; }
.org-chart ul ul::before {
    content: '';
    position: absolute;
    border-left: 2px solid #ccc;
    width: 0;
    height: 100%;
    left: -10px;
    top: 0;
}
.org-chart > ul > li::before { display: none; }
/* Branch Colors */
.branch-deans ul::before, .branch-deans li::before { border-color: #28a745; }
.branch-directors ul::before, .branch-directors li::before { border-color: #007bff; }
.branch-officers ul::before, .branch-officers li::before { border-color: #fd7e14; }
/* Nodes */
.org-chart li span,
.org-chart li a {
    border: 1px solid #ccc;
    padding: 0.625rem 1rem;
    display: inline-flex;
    align-items: center;
    border-radius: 5px;
    background-color: var(--bg-color-white);
    color: var(--text-color);
    min-width: 120px;
    text-align: left;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-decoration: none;
    position: relative;
}
.org-chart li span:hover,
.org-chart li a:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    border-color: var(--secondary-color);
}
.toggle-btn {
    margin-left: auto;
    padding-left: 1rem;
    font-family: monospace;
    font-weight: bold;
    font-size: 1.2em;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--primary-color);
}
/* Node Colors */
.org-chart .level-1 { background-color: #adb5bd; color: #fff; border-color: #6c757d;}
.org-chart .level-2 { background-color: #6c757d; color: #fff; border-color: #495057;}
.org-chart .branch-green { background-color: #d4edda; color: #155724; border-color: #c3e6cb;}
.org-chart .node-blue { background-color: #cfe2ff; color: #0c5460; border-color: #b8daff;}

/* --- PDF Viewer --- */
.tabs-container {
    justify-content: center;
    margin-bottom: 1.25rem;
}
.pdf-viewer-container {
    background: var(--bg-color-light);
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}
.pdf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: var(--text-color-white);
    flex-wrap: wrap;
    gap: 1rem;
}
.toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.page-info {
    font-weight: 500;
    margin: 0 0.3rem;
}
.pdf-tool-btn {
    background: transparent;
    border: none;
    color: var(--text-color-white);
    padding: 0.5rem 0.625rem;
    border-radius: 5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
    text-decoration: none;
    font-size: 1em;
}
.pdf-tool-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
}
.download-btn {
    background-color: var(--secondary-color);
}
.download-btn:hover {
    background-color: var(--secondary-color-dark);
}
.pdf-canvas-wrapper {
    display: flex;
    justify-content: center;
    padding: 1.25rem;
    overflow-x: auto;
}
#pdf-canvas {
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    max-width: 100%; /* Ensure canvas is responsive */
}
.pdf-loader {
    padding: 3rem;
    text-align: center;
    font-size: 1.2em;
    color: var(--text-color-light);
}

/* --- College/Directory (TABLET) --- */
/* =========================================
   FIX 3: INNER PAGE DEAN PROFILE WRAPPER
   ========================================= */

/* --- Mobile Layout (Default) --- */
.dean-profile-wrapper {
    display: flex;
    flex-direction: column; /* Stack vertically on phone */
    align-items: center;
    text-align: center;
    gap: 1.875rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.dean-profile-photo img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--bg-color-white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.dean-profile-info h2 {
    margin-top: 0;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.dean-profile-info .dean-title {
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 1rem;
    display: block;
}

.dean-contact-info p {
    display: flex;
    align-items: center;
    justify-content: center; /* Center text on mobile */
    gap: 10px;
    color: var(--text-color-light);
}
.dean-divider {
    border: 0;
    height: 1px;
    background-color: var(--border-color);
    margin: 1rem 0;
    width: 100%;
}

.dean-bio {
    margin-top: 1.875rem;
    text-align: justify;
}

.dean-bio h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.dean-contact-info p {
    margin: 0.5rem 0;
    font-size: 1rem;
    color: var(--text-color-light);
    display: flex;
    align-items: center;
    justify-content: center; /* Center on mobile */
    gap: 10px;
}

.dean-contact-info i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}
/* --- Desktop Layout (Screens wider than 768px) --- */
@media (min-width: 768px) {
    .dean-profile-wrapper {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
    }

    .dean-profile-photo {
        flex-shrink: 0;
        margin-right: 20px;
    }

    .dean-profile-info {
        flex-grow: 1;
    }

    .dean-contact-info p {
        justify-content: flex-start; /* Left align on Desktop */
    }
}

/* --- College/Directory (DESKTOP) --- */
@media (min-width: 1024px) {
    .college-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    /* Responsive Table (Desktop) */
    .responsive-table {
        border-radius: var(--border-radius);
        overflow: hidden;
    }
    .responsive-table thead {
        display: table-header-group;
        background-color: var(--primary-color);
        color: var(--text-color-white);
    }
    .responsive-table tr {
        display: table-row;
        margin-bottom: 0;
        border: none;
        box-shadow: none;
    }
    .responsive-table th, .responsive-table td {
        display: table-cell;
        padding: 1rem;
        text-align: left;
    }
    .responsive-table th {
        font-size: 0.9em;
        letter-spacing: 0.1em;
        text-transform: uppercase;
    }
    .responsive-table tbody tr {
        border-bottom: 1px solid #e0e0e0;
    }
    .responsive-table tbody tr:nth-child(even) {
        background-color: var(--bg-color-light);
    }
    .responsive-table tbody tr:hover {
        background-color: #f0f5fa;
    }
    .responsive-table td::before {
        display: none; /* Hide data-label */
    }
    
    /* College Page (Desktop) */
    .college-layout-grid {
        grid-template-columns: 250px 1fr;
    }
    .college-nav {
        position: sticky;
        top: 110px; /* Space for sticky nav */
        flex-direction: column;
        overflow-x: hidden;
        margin-bottom: 0;
        padding: 1rem;
    }
    .college-nav a {
        white-space: normal;
    }
    .college-nav a.active {
        border-left: 3px solid var(--secondary-color);
    }
    .content-section {
        scroll-margin-top: 120px;
    }
}


/* ===================================================================
   5. FOOTER
   =================================================================== */

.site-footer {
    background-color: var(--primary-color);
    color: var(--text-color-footer);
    padding: 3rem 0 0;
    font-size: 0.95em;
    border-top: 3px solid var(--secondary-color);
}
.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    padding-bottom: 2.5rem;
}
.footer-column {
    flex: 1;
    min-width: 250px; /* Allow stacking */
}
.footer-column h4 {
    color: var(--text-color-white);
    font-size: 1.2em;
    margin-top: 0;
    margin-bottom: 1.25rem;
    padding-bottom: 0.625rem;
    border-bottom: 1px solid #004a99;
    position: relative;
}
.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--secondary-color);
}
.footer-column p {
    line-height: 1.8;
}
.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-column ul li a {
    color: var(--text-color-footer);
    text-decoration: none;
    display: block;
    padding: 0.5rem 0;
    transition: color 0.3s ease, padding-left 0.3s ease;
}
.footer-column ul li a:hover {
    color: var(--text-color-white);
    padding-left: 0.5rem;
}
.footer-column .social-icons {
    margin-top: 1.25rem;
}
.footer-column .social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color-white);
    border-radius: 50%;
    margin-right: 0.625rem;
    text-decoration: none;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.footer-column .social-icons a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}
.footer-column p i {
    margin-right: 0.625rem;
    color: var(--secondary-color);
}
.footer-bottom {
    background-color: var(--primary-color);
    color: white;
    padding: 1.25rem 0;
    text-align: center;
    font-size: 0.9em;
    border-top: 1px solid #004a99;
    border-top: 1px solid var(--secondary-color);
}


/* ===================================================================
   6. UTILITY & ADMIN
   =================================================================== */

/* --- Placeholder for Dragging --- */
.slide-placeholder {
    height: 70px;
    background-color: #f0f8ff;
    border: 2px dashed #c1e0ff;
}
.drag-handle:hover {
    background-color: #f4f4f4;
}
.drag-handle {
    touch-action: none; /* Prevents screen scrolling while dragging an item */
    user-select: none;  /* Prevents highlighting text while dragging */
    cursor: grab;
}
.drag-handle:active {
    cursor: grabbing;
}
/* =========================================
   FIX 1: SLIDESHOW DRAG & DROP UTILITIES
   ========================================= */
.slideshow-container, 
.slide-list-container { 
    /* distinct fix: prevents the dragged item from being cut off */
    overflow: visible !important; 
}

/* The item strictly while it is being dragged */
.ui-sortable-helper {
    display: table; /* or block, ensures it keeps shape */
    background: #ffffff;
    width: 100% !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    opacity: 0.95;
    z-index: 9999 !important; /* Forces it to front */
    cursor: grabbing;
}

/* The empty space where the item will land */
.slide-placeholder {
    height: 80px;
    background-color: #f0f8ff;
    border: 2px dashed #c1e0ff;
    margin-bottom: 15px;
    border-radius: 8px;
    visibility: visible !important;
}
/* =========================================
   FIX 2: TEACHING & NON-TEACHING TABS
   ========================================= */
.staff-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.25rem;
    overflow-x: auto;
}

.staff-tab-btn {
       padding: 12px 20px;
    font-size: 1rem;
    font-weight: 500;
    color: #666; /* Gray for inactive */
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent; /* Hidden border to prevent jumping */
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7; /* Slightly dim inactive tabs */
}

.staff-tab-btn.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
}
/* Hover State */
.staff-tab-btn:hover {
    opacity: 1;
    background-color: #f9f9f9;
    color: var(--primary-color);
}

/* --- ACTIVE / SELECTED STATE --- */
.staff-tab-btn.active {
    color: var(--primary-color);       /* Dark Blue Text */
    border-bottom: 3px solid var(--secondary-color); /* Orange Bottom Line */
    font-weight: 700;                  /* Bold Text */
    opacity: 1;                        /* Full Visibility */
    background-color: transparent;
}

/* LOGIC: Hide content by default, Show only when active */
.staff-tab-content {
    display: none; 
    padding-top: 1.25rem;
    animation: fadeIn 0.4s ease-in-out;
}

.staff-tab-content.active {
    display: block; /* Logic to show the tab */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
/* =========================================
   STATS SECTION: COLORFUL MATCH
   ========================================= */

/* 1. Dark Blue */
.stat-card:nth-child(4n+1) {
    border-top-color: #003366 !important;
}
.stat-card:nth-child(4n+1) .stat-number {
    color: #003366;
}

/* 2. Orange */
.stat-card:nth-child(4n+2) {
    border-top-color: #E67E22 !important;
}
.stat-card:nth-child(4n+2) .stat-number {
    color: #E67E22;
}

/* 3. Green */
.stat-card:nth-child(4n+3) {
    border-top-color: #28a745 !important;
}
.stat-card:nth-child(4n+3) .stat-number {
    color: #28a745;
}

/* 4. Red (or Light Blue) */
.stat-card:nth-child(4n+4) {
    border-top-color: #dc3545 !important; /* Red to match patterns */
}
.stat-card:nth-child(4n+4) .stat-number {
    color: #dc3545;
}

/* Hover Animation: Lift Up */
.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.15); /* Deeper shadow on hover */
}
/* =========================================
   UNIVERSITY PILLARS: COLORFUL MATCH
   ========================================= */

/* 1. Teaching (Blue) */
.pillar-card:nth-child(1) {
    border-top-color: #003366 !important;
}
.pillar-card:nth-child(1) i {
    color: #003366 !important;
}
.pillar-card:nth-child(1) .btn-pillar {
    background-color: #003366;
}
.pillar-card:nth-child(1) .btn-pillar:hover {
    background-color: #002244;
}

/* 2. Research (Orange) */
.pillar-card:nth-child(2) {
    border-top-color: #E67E22 !important;
}
.pillar-card:nth-child(2) i {
    color: #E67E22 !important;
}
.pillar-card:nth-child(2) .btn-pillar {
    background-color: #E67E22;
}
.pillar-card:nth-child(2) .btn-pillar:hover {
    background-color: #d35400;
}

/* 3. Extension (Green) */
.pillar-card:nth-child(3) {
    border-top-color: #28a745 !important;
}
.pillar-card:nth-child(3) i {
    color: #28a745 !important;
}
.pillar-card:nth-child(3) .btn-pillar {
    background-color: #28a745;
}
.pillar-card:nth-child(3) .btn-pillar:hover {
    background-color: #1e7e34;
}

/* Hover Animation */
.pillar-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
/* =========================================
   FIX: TAB SCROLLBAR ISSUE
   ========================================= */
.staff-tabs, .tabs {
    overflow-y: hidden !important; /* Strictly hide vertical scrollbar */
    overflow-x: auto; /* Allow horizontal scrolling if needed */
    border-bottom: 1px solid #e0e0e0; /* Light grey line across full width */
    
    /* OPTIONAL: Hide the scrollbar visuals entirely for a cleaner look 
       (Users can still swipe left/right on mobile) */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* Hide scrollbar for Chrome/Safari/Opera */
.staff-tabs::-webkit-scrollbar, 
.tabs::-webkit-scrollbar {
    display: none;
}
