:root {
    --bg-dark: #ffffff;
    /* WHITE Background */
    --text-main: #233D4D;
    /* Dark Blue/Grey */
    --text-muted: #586e7c;
    /* Muted Slate */
    --primary: #215E61;
    /* Teal */
    --secondary: #233D4D;
    /* Dark Blue (Secondary) */
    --accent: #FE7F2D;
    /* Orange */

    /* Using #FFFFFF for card backgrounds/surfaces */
    --glass-bg: #ffffff;
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 2px 4px -1px rgba(0, 0, 0, 0.03);

    --card-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Global Scrollbar Standard - Force Override */
*::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
}

*::-webkit-scrollbar-track {
    background: transparent !important;
}

*::-webkit-scrollbar-thumb {
    background: var(--primary) !important;
    border-radius: 3px !important;
}

/* Responsive Table */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-bottom: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
    /* For Firefox */
}

.table-responsive::-webkit-scrollbar {
    height: 6px !important;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: var(--primary) !important;
    border-radius: 3px;
}

/* Compact Table Fixes */
.compact-table td,
.compact-table th {
    color: var(--text-main) !important;
    /* Force visibility */
    vertical-align: middle;
}

/* Ensure sticky columns don't hide content behind transparency */
.compact-table th:first-child,
.compact-table td:first-child {
    background: #ffffff !important;
    /* Force solid white background */
    z-index: 10 !important;
    /* Ensure on top */
    position: sticky;
    left: 0;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    /* Separator */
}

/* Specific fix for numeric cells */
.compact-table td:not(:first-child) {
    color: var(--text-main) !important;
    font-weight: 500;
}

/* MOBILE TABLE FIXES */
@media (max-width: 768px) {

    .compact-table th:first-child,
    .compact-table td:first-child {
        max-width: 140px !important;
        /* Cap width to allow data to be seen */
        min-width: 100px !important;
        /* Ensure it doesn't get too thin */
        white-space: normal !important;
        /* Force text wrap */
        word-wrap: break-word !important;
        font-size: 0.85rem !important;
        /* Reduce font size */
        padding: 0.5rem !important;
        /* Reduce padding */
        line-height: 1.2 !important;
    }

    .compact-table td,
    .compact-table th {
        padding: 0.5rem !important;
        /* Reduce global cell padding on mobile */
    }
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    max-width: 100%;
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    position: relative;
}

/* Background Shapes - pinned to body */
.bg-shape {
    display: none;
    /* Remove background blobs */
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.4;
    animation: drift 20s infinite alternate;
    /* Ensure shapes don't trigger scroll even if fixed */
    max-width: 100vw;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    bottom: 10%;
    right: -50px;
    animation-delay: -5s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: 40%;
    left: 30%;
    animation-delay: -10s;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, 50px) scale(1.1);
    }
}

/* Navigation */
.glass-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;

    /* Navbar Reset for Enterprise White Look */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 0;
    margin: 0;
    padding: 1rem 5%;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.logo {
    color: #1a1a1a !important;
    /* Dark Black */
}

.highlight {
    color: var(--primary);
    /* Teal Accent for "Explorer" */
}

#header-inst-name {
    display: inline-block;
    max-width: 50vw; /* Limit to 50% of viewport to leave room for buttons */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

@media (max-width: 768px) {
    #header-inst-name {
        max-width: 60vw; /* Slightly more space on mobile if needed */
    }
}

/* Button Styling for Sign In / Sign Up */
.btn-nav {
    text-decoration: none;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-signin {
    color: var(--primary);
    background: transparent;
    border: 1px solid var(--primary);
}

.btn-signin:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(33, 94, 97, 0.2);
}

.btn-signup {
    background: var(--primary);
    color: #f8f9fa !important;
    /* Off White Text */
    border: 1px solid var(--primary);
}

.btn-signup:hover {
    background: #1a4a4d;
    box-shadow: 0 4px 12px rgba(33, 94, 97, 0.2);
}

.nav-links a {
    color: rgba(255, 255, 255, 0.8);
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
    font-weight: 700;
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
}

.highlight {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.btn-nav {
    background: var(--primary);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    color: white !important;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

/* Hero Section */
.hero-section {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 5rem;
}

.hero-content h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.1;
    margin-bottom: 1rem;
    max-width: 95%;
    margin-left: auto;
    margin-right: auto;
}

.gradient-text {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 20px;
}

/* Glass Components */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.section {
    margin-bottom: 6rem;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60%;
    height: 4px;
    background: var(--secondary);
    border-radius: 2px;
    margin-top: 5px;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.facilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.facility-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
}

.facility-item:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--primary);
}

/* Stats (Hero) */
.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
}

.stat-box {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Placements */
.placement-layout {
    display: flex;
    gap: 3rem;
}

.placement-stats {
    flex: 1;
}

.recruiters-cloud {
    flex: 1;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.year-badge {
    background: var(--bg-dark);
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    color: var(--secondary);
    font-weight: bold;
}

.pct-bar-bg {
    flex-grow: 1;
    height: 8px;
    background: #334155;
    margin: 0 1rem;
    border-radius: 4px;
    overflow: hidden;
}

.pct-bar-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--accent));
    border-radius: 4px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.tag {
    background: rgba(14, 165, 233, 0.1);
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

/* Split Section */
.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.scroll-card {
    height: auto;
    overflow: visible;
    padding-right: 10px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.aid-item {
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--secondary);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0 10px 10px 0;
}

.aid-title {
    font-weight: bold;
    color: var(--text-main);
    display: block;
    margin-bottom: 0.3rem;
}

.aid-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* CTA Section styles */
.cta-section {
    /* Removed background from section, moved to cards */
    background: transparent;
    padding: 0 20px;
    margin-top: -2rem;
    margin-bottom: 4rem;
    position: relative;
    z-index: 10;
}

.cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.cta-card {
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    color: white;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cta-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.card-predict {
    background: linear-gradient(135deg, #10b981, #3b82f6);
    /* Emerald to Blue */
}

.card-cutoffs {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    /* Purple to Pink */
}

.cta-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.cta-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.cta-card p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.btn-cta {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-glow {
    background: white;
    color: #10b981;
}

.btn-glow:hover {
    background: #ecfdf5;
    color: #059669;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: white;
}

.btn-outline:hover {
    background: white;
    color: #8b5cf6;
}

@media (max-width: 768px) {
    .cta-grid {
        grid-template-columns: 1fr;
        /* Stack on mobile */
        gap: 1.5rem;
    }

    .cta-card {
        padding: 2rem;
    }
}

/* Fees */
.fee-card table {
    width: 100%;
    border-collapse: collapse;
}

.fee-card td {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.fee-card tr:last-child td {
    border-bottom: none;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--secondary);
    padding-top: 1.5rem;
}

/* Contact */
.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-links a {
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary);
}

.contact-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.contact-item {
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}

.btn-cta:hover {
    transform: scale(1.05);
    color: var(--secondary);
}

/* Responsive */
/* Responsive */
/* Responsive */
@media (max-width: 768px) {
    .glass-nav {
        flex-direction: row;
        /* Horizontal for logo + burger */
        justify-content: space-between;
        padding: 1.5rem;
        align-items: center;
    }

    .hamburger {
        display: block;
    }

    .nav-links {
        display: flex;
        flex-direction: row;
        width: auto;
        position: static;
        background: transparent;
        padding: 0;
        box-shadow: none;
        border: none;
        gap: 0.5rem;
        flex-wrap: wrap;
        /* Allow buttons to wrap */
        justify-content: flex-end;
        /* Align right or center */
    }

    .glass-nav {
        flex-wrap: wrap;
        /* Allow entire nav to wrap */
        gap: 1rem;
    }

    .nav-links.active {
        display: flex;
        /* Show when active */
    }

    .hero-content h1 {
        font-size: clamp(2rem, 10vw, 3rem);
        word-wrap: break-word;
        /* Prevent long words causing scroll */
        padding: 0 10px;
    }

    .hero-section {
        min-height: auto;
        padding: 8rem 0 4rem;
        /* Remove side padding on section to use container padding */
        overflow-x: hidden;
        /* Double safety */
    }

    .container {
        padding: 2rem 15px;
        /* Use 15px standard mobile padding */
        width: 100%;
        overflow-x: hidden;
    }

    .grid-2,
    .split-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .placement-layout {
        flex-direction: column;
        display: flex;
        /* Ensure it stays flex but vertical */
        gap: 2rem;
    }

    /* Styles for filters, grid, and comparison bar */
    .filter-group-mobile {
        display: none;
        /* Hidden by default on desktop */
    }

    .filter-toggle-button {
        display: none;
        /* Hidden by default on desktop */
        background: var(--primary);
        color: white;
        padding: 0.75rem 1.25rem;
        border-radius: 8px;
        font-weight: 600;
        cursor: pointer;
        margin-bottom: 1.5rem;
        text-align: center;
    }

    .institutes-grid-mobile {
        grid-template-columns: 1fr;
        /* Stack on mobile */
    }

    .comparison-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: var(--primary);
        color: white;
        padding: 1rem 2rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        transform: translateY(100%);
        transition: transform 0.3s ease-out;
    }

    .comparison-bar.active {
        transform: translateY(0);
    }

    .comparison-bar-count {
        font-weight: 700;
        font-size: 1.1rem;
    }

    .comparison-bar-actions button {
        background: white;
        color: var(--primary);
        padding: 0.6rem 1.2rem;
        border-radius: 6px;
        font-weight: 600;
        margin-left: 1rem;
        cursor: pointer;
        border: none;
    }

    .comparison-bar-actions button:hover {
        opacity: 0.9;
    }

    .section-title {
        font-size: 1.8rem;
        /* Slightly smaller */
    }

    /* Improve Stat Rows on Mobile */
    .stat-row {
        flex-wrap: nowrap;
        padding: 0.8rem;
    }

    .pct-bar-bg {
        margin: 0 0.5rem;
        min-width: 0;
        /* Allow shrinking */
    }

    .year-badge {
        font-size: 0.8rem;
        padding: 0.2rem 0.5rem;
    }

    .hero-stats {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }

    .stat-box {
        min-width: 120px;
        /* Ensure stats have room */
    }

    .social-links {
        justify-content: center;
        flex-wrap: wrap;
        /* Wrap if too many */
    }

    .contact-grid {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        flex-direction: column;
        align-items: center;
    }
}

/* Enterprise Landing Page Styles */

/* Layout */
.app-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    gap: 2rem;
    min-height: 100vh;
}

/* Sidebar */
/* Sidebar & Accordion Styling */
/* Sidebar & Accordion Styling */
.filter-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
    height: calc(100vh - 110px);
    overflow-y: auto;
    background: white;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    margin-right: 2rem;
    /* Visible by default */
    opacity: 1;
    transform: none;
    visibility: visible;
    transition: width 0.3s ease, padding 0.3s ease, opacity 0.2s ease, margin 0.3s ease;
}

/* Hidden State */
.app-container.sidebar-hidden .filter-sidebar {
    width: 0;
    padding: 0;
    margin-right: 0;
    opacity: 0;
    visibility: hidden;
    border: none;
}

/* Sidebar Open State */
.app-container.sidebar-open .filter-sidebar {
    width: 280px;
    padding: 1.5rem 1rem;
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    margin-right: 2rem;
    /* Add spacing when open */
}

/* Toggle Button Styling */
.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.2s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary);
}

.filter-group {
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 0.5rem;
}

.filter-group:last-child {
    border-bottom: none;
}

/* Accordion Summary Styling */
.filter-title {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.9rem;
    list-style: none;
    /* Hide default marker */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Left align content */
    padding: 0.8rem 0.5rem;
    border-radius: 6px;
    transition: background 0.2s;
}

/* Hide default marker in Webkit */
.filter-title::-webkit-details-marker {
    display: none;
}

.filter-title:hover {
    background: rgba(33, 94, 97, 0.05);
    color: var(--primary);
}

.filter-title i {
    margin-right: 0.8rem;
    color: var(--primary);
    width: 20px;
    text-align: center;
}

/* Custom Chevron */
.filter-title::after {
    content: '\f078';
    /* FontAwesome Chevron Down */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.7rem;
    transition: transform 0.3s;
    color: var(--text-muted);
    margin-left: auto;
    /* Push to right */
}

details[open] .filter-title::after {
    transform: rotate(180deg);
}

/* Accordion Content */
.filter-content {
    padding: 0.5rem 0.5rem 1rem 0.5rem;
    max-height: 250px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(33, 94, 97, 0.1) transparent;
}

.filter-option {
    display: flex;
    align-items: center;
    margin-bottom: 0.6rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.2s;
}

.filter-option:hover {
    color: var(--primary);
}

.filter-option input {
    margin-right: 0.8rem;
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

/* Main Content */
.main-content {
    flex-grow: 1;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.search-bar {
    width: 100%;
    max-width: 500px;
    padding: 0.8rem 1.2rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
    background: white;
}

.search-bar:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.sort-dropdown {
    padding: 0.8rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-main);
    background-color: white;
    cursor: pointer;
    outline: none;
    min-width: 180px;
}

.sort-dropdown:focus {
    border-color: var(--primary);
}

/* Active Filters */
.active-filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    min-height: 0;
    position: relative;
    overflow: visible !important;
    z-index: 999;
    /* Collapsed when empty */
}

.active-filters-container:not(:empty) {
    margin-bottom: 1rem;
}

.filter-pill {
    background: #e0f2fe;
    /* Light Blue */
    color: #0369a1;
    /* Dark Blue */
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #bae6fd;
}

.filter-pill .remove-filter {
    cursor: pointer;
    font-size: 0.9em;
    opacity: 0.7;
    transition: opacity 0.2s;
}

color: #0c4a6e;
}

/* Filter Dropdown (Overflow) */
.filter-more-group {
    position: relative;
    display: inline-block;
}

.filter-more-btn {
    background: #e0f2fe;
    color: #0369a1;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.85rem;
    border: 1px solid #bae6fd;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-dropdown {
    display: none;
    /* Hidden by default */
    position: absolute;
    top: 100%;
    left: auto;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.5rem;
    width: 250px;
    /* Wider */
    z-index: 1000;
    /* Ensure on top */
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-more-group.active .filter-dropdown {
    display: flex !important;
}

.filter-dropdown .filter-pill {
    /* Adjust styles for inside dropdown if needed */
    margin: 0.25rem;
    width: max-content;
}

/* Compact Grid */
.institutes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    /* Wider Cards */
    gap: 1.5rem;
}

.compact-card {
    background: white;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.compact-card:hover {
    box-shadow: var(--card-hover-shadow);
    transform: translateY(-2px);
    border-color: rgba(254, 127, 45, 0.3);
}

/* Social Icons */
.card-socials {
    display: flex;
    gap: 0.8rem;
    margin-top: 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.social-icon {
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: all 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.03);
}

/* Brand Colors on Hover */
.social-icon.fa-facebook:hover {
    color: #1877F2;
    background: rgba(24, 119, 242, 0.1);
}

.social-icon.fa-twitter:hover,
.social-icon.fa-x-twitter:hover {
    color: #1DA1F2;
    background: rgba(29, 161, 242, 0.1);
}

.social-icon.fa-instagram:hover {
    color: #E4405F;
    background: rgba(228, 64, 95, 0.1);
}

.social-icon.fa-linkedin:hover {
    color: #0A66C2;
    background: rgba(10, 102, 194, 0.1);
}

.social-icon.fa-youtube:hover {
    color: #FF0000;
    background: rgba(255, 0, 0, 0.1);
}

.social-icon.fa-globe:hover {
    color: var(--primary);
    background: rgba(33, 94, 97, 0.1);
}

.location-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #dc2626;
    /* Red 600 */
    margin-bottom: 0.5rem;
}

.compact-card {
    background: linear-gradient(145deg, #ffffff, #f5f7fa);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.compact-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--primary);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.inst-logo {
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--primary);
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1;
}

.cta-card-inline {
    background: #FFFDE7;
    /* Lighter Yellow (Material 50) */
    color: var(--text-main);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    box-shadow: var(--card-hover-shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.cta-card-inline h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    color: #854d0e;
    /* Dark Yellow */
}

.cta-card-inline p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    line-height: 1.4;
    color: #713f12;
}

.cta-card-inline .btn-cta {
    background: var(--primary);
    /* Match Header Button */
    color: white;
    font-weight: 700;
    width: auto;
    align-self: flex-start;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.2s;
}

.cta-card-inline .btn-cta:hover {
    background: #1a4a4d;
    /* Darker Teal */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 94, 97, 0.2);
}

.inst-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 1rem;
    line-height: 1.4;
    text-decoration: none;
    display: block;
}

.card-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0;
    border-bottom: none;
}

.metric-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.metric-value {
    font-weight: 700;
    color: var(--secondary);
    font-size: 1.1rem;
}

.card-actions {
    margin-top: auto;
    display: flex;
    justify-content: flex-start;
    /* Align button to left */
    align-items: center;
}

.btn-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-view:hover {
    background: rgba(33, 94, 97, 0.05);
}

.btn-chances {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    background: var(--accent);
    border: 1px solid var(--accent);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(254, 127, 45, 0.3);
    width: 65%;
    /* Half width */
}

.btn-chances:hover {
    background: #c2410c;
    /* Darker Orange/Red */
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(254, 127, 45, 0.4);
}

.compare-check {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #dc2626;
    /* Red 600 */
    cursor: pointer;
    font-weight: 500;
}

/* Custom Checkbox */
.compare-check input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid #dc2626;
    border-radius: 4px;
    margin-right: 0.5rem;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.compare-check input[type="checkbox"]:checked {
    background-color: #dc2626;
}

.compare-check input[type="checkbox"]:checked::after {
    content: '\2713';
    /* Checkmark */
    font-size: 11px;
    color: white;
    font-weight: 700;
}


/* Compare Bar */
.compare-bar {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    background: var(--secondary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
}

.compare-bar.active {
    transform: translateX(-50%) translateY(0);
}

.selected-count {
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
}

.btn-compare-action {
    background: white;
    color: var(--secondary);
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-compare-action:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* Tags */
.tag-pill {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: #f1f5f9;
    color: var(--text-muted);
    border-radius: 4px;
    font-size: 0.75rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
        padding: 1rem;
    }

    .filter-sidebar {
        width: 100%;
        position: relative;
        top: 0;
        height: auto;
        margin-bottom: 2rem;
    }
}

/* Explicit Section Styling */
.section {
    position: relative;
    padding: 2rem 0;
}

.glass-card {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    /* Subtle shadow */
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

/* Mobile Responsiveness Improvements */
@media (max-width: 768px) {
    .app-container {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .active-filters-container {
        margin-top: 0.5rem;
    }

    /* Fix Dropdown Overflow */
    .filter-dropdown {
        width: 85vw;
        max-width: 300px;
        left: auto;
        right: 0;
        position: absolute;
    }

    header {
        padding: 0.8rem 1rem;
        margin: 0;
        top: 0;
        border-radius: 0;
    }

    .main-content {
        width: 100%;
    }

    /* Mobile Sidebar: Stacked */
    .filter-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        margin-right: 0;
        margin-bottom: 2rem;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        /* Ensure visible */
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    /* Collapse Sidebar on Mobile */
    .app-container.sidebar-hidden .filter-sidebar {
        height: 0;
        margin-bottom: 0;
        padding: 0;
        border: none;
        overflow: hidden;
        opacity: 0;
    }
}


/* Ensure Sidebar Toggle in Nav is Visible */
#sidebar-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    background: transparent;
    border: none;
    font-size: 1.2rem;
    padding: 0.5rem;
    cursor: pointer;
    margin-right: 1rem;
}

/* Custom Sort Dropdown Styles */
.custom-sort-container {
    position: relative;
    width: 200px;
    /* Default Desktop Width */
    min-width: 0;
    cursor: pointer;
    box-sizing: border-box;
    z-index: 50;
}

.sort-trigger {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    /* Reverted to Glass */
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    /* Reverted text */
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.sort-trigger:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
}

.sort-trigger i {
    color: var(--text-muted);
    /* Reverted icon */
}

.sort-options {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--primary);
    /* Green/Teal Background requested */
    border: 1px solid var(--primary);
    border-radius: 8px;
    margin-top: 0.5rem;
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: none;
    /* Solid color */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

.sort-options.show {
    display: flex;
}

.sort-item {
    padding: 0.8rem 1rem;
    color: white;
    /* White text requested */
    transition: all 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sort-item:last-child {
    border-bottom: none;
}

.sort-item:hover {
    background: rgba(0, 0, 0, 0.1);
    /* Darken on hover */
    color: white;
}

.sort-item.selected {
    background: rgba(0, 0, 0, 0.2);
    /* Darker for selected */
    color: white;
    font-weight: 600;
}

color: var(--primary);
font-weight: 500;
}

/* Base Button Reset */
button.sort-trigger {
    background: transparent;
    text-align: left;
}

/* Mobile Search Header & Sort Fix */
@media (max-width: 768px) {
    .search-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        /* Fix spacing logic */
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        overflow: visible !important;
        /* Critical for dropdowns */
    }

    .custom-sort-container {
        width: 100%;
        /* Full width on mobile */
    }

    .sort-trigger,
    .sort-item {
        font-size: 0.85rem !important;
        /* Scale down text */
        padding: 0.7rem 0.8rem !important;
        /* Scale down padding */
    }
}

/* Page Sidebar Navigation */
.nav-links-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link {
    display: block;
    padding: 0.8rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary);
    transform: translateX(5px);
}

.sidebar-link.active {
    background: rgba(33, 94, 97, 0.1);
    color: var(--primary);
    font-weight: 600;
}

/* Sticky Tabs Navigation */
.tabs-container {
    position: sticky;
    top: 70px;
    /* Height of glass-nav */
    left: 0;
    width: 100%;
    z-index: 90;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.5rem 2rem;
    margin-top: 0;
    box-shadow: 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

/* Ensure content doesn't hide behind fixed tabs */
main.container {
    padding-top: 0;
}

.tabs-scroll {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    padding: 0.2rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    align-items: center;
}

.tabs-scroll::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    /* Chip Shape */
    transition: all 0.2s ease;
    font-weight: 500;
}

.tab-btn:hover {
    color: var(--primary);
    background: rgba(33, 94, 97, 0.05);
}

.tab-btn.active {
    background: #e0f7fa;
    /* Light Blue Chip Background */
    color: var(--primary);
    font-weight: 600;
    box-shadow: none;
}

.tab-btn.active::after {
    display: none;
}

/* Compact Rankings Table */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.compact-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    white-space: nowrap;
}

.compact-table th,
.compact-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.compact-table th {
    background: rgba(0, 0, 0, 0.02);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.compact-table tr:last-child td {
    border-bottom: none;
}

.compact-table tr:hover {
    background: rgba(0, 0, 0, 0.01);
}



/* Tab Content Visibility */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
    padding-bottom: 3rem;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Extra Small Screens (< 400px) */
@media (max-width: 400px) {

    /* 1. Header: Stack Buttons or Shrink */
    .nav-links {
        gap: 0.5rem;
        justify-content: center;
    }

    .btn-nav {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        width: 100%;
        /* Full width buttons */
        text-align: center;
    }

    /* 2. Grid: Fix Card Overflow */
    .institutes-grid {
        grid-template-columns: 1fr;
        /* Force single column matching width */
    }

    .compact-card {
        padding: 1rem;
        /* Less padding */
    }

    /* 3. Container Padding */
    .app-container {
        padding: 0.5rem !important;
        /* Maximize space */
    }

    /* 4. Institute Logo/Text */
    .inst-name {
        font-size: 1rem;
    }

    .location-row {
        font-size: 0.75rem;
    }

    /* 5. Metrics Stack */
    .card-metrics {
        gap: 0.5rem;
    }

    .metric-value {
        font-size: 1rem;
    }
}

/* --- New Additions for Hero Socials & Gallery --- */

/* Hero Social Icons */
.hero-social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1.1rem;
}

.hero-social-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Contact Dropdown */
.contact-dropdown-container {
    position: relative;
    display: inline-block;
}

.contact-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 12px;
    min-width: 250px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    text-align: left;
    display: none;
    /* Toggled via JS */
}

.contact-dropdown.visible {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.contact-dropdown p,
.contact-dropdown a {
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    display: block;
    text-decoration: none;
}

.contact-dropdown i {
    width: 20px;
    color: var(--primary);
    text-align: center;
    margin-right: 8px;
}

/* Gallery Carousel */
.gallery-carousel {
    position: relative;
    width: 100%;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.carousel-btn:hover {
    background: var(--primary);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-counter {
    position: absolute;
    bottom: 10px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    pointer-events: none;
}

.gallery-grid-split {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile default */
    gap: 2rem;
}

@media (min-width: 768px) {
    .gallery-grid-split {
        grid-template-columns: 1fr 1fr;
    }
}

/* Lightbox */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox-overlay.visible {
    display: flex;
}

.lightbox-img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
}

/* --- Mobile Optimization --- */

/* (c) Read More / Truncate Styles */
.truncate-box {
    position: relative;
    max-height: 120px;
    /* Approx 4-5 lines */
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.truncate-active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.95));
    /* Adjust if background isn't white */
    pointer-events: none;
}

.truncate-box.expanded {
    max-height: 2000px;
    /* Large enough */
}

.truncate-box.expanded::after {
    display: none;
}

.read-more-btn {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0;
}

/* (d) Left Side Floater (Mobile Only) */
.mobile-floater {
    position: fixed;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    /* Hidden by default */
    flex-direction: column;
    gap: 15px;
    z-index: 999;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 12px 6px;
    border-radius: 30px;
    box-shadow: 2px 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.float-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
    border: 1px solid var(--glass-border);
}

@media (max-width: 768px) {

    /* (b) Natural Flow: Hide Tabs, Show All Content */
    .tabs-container {
        display: none !important;
    }

    .tab-content {
        display: block !important;
        margin-bottom: 3rem;
        animation: none !important;
    }

    /* Hide specific sections if they are empty or redundant in flow? No, showing all. */
    /* Rankings logic sets display manually. We removed that. */

    /* (d) Show Floater */
    .mobile-floater {
        display: flex;
    }

    /* (a) Eliminate Horizontal Scroll */
    body,
    html {
        overflow-x: hidden;
        width: 100%;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
        width: 100%;
        overflow-x: hidden;
    }

    .glass-card,
    .section {
        width: 100%;
        overflow-x: hidden;
        /* Prevent internal overflow causing page scroll */
    }

    /* Allow tables to scroll internally */
    .table-responsive {
        overflow-x: auto;
    }

    /* Fix Hero Title overflow */
    h1 {
        word-wrap: break-word;
    }
}

/* --- Refinements --- */

/* 1. Mobile Website Button Width */
@media (max-width: 768px) {
    .hero-content .btn-nav {
        width: auto !important;
        display: inline-flex !important;
        padding: 0.6rem 1.5rem !important;
        font-size: 0.95rem;
    }
}

/* 2. CTA Cards Lighter Colors (Aligned to Theme) */
.card-predict {
    background: linear-gradient(135deg, #e1f5fe 0%, #b3e5fc 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: var(--text-main);
}

.card-cutoffs {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: var(--text-main);
}

.card-predict h3,
.card-cutoffs h3 {
    color: var(--primary);
    /* Ensure titles are visible on light bg */
}

.card-predict p,
.card-cutoffs p {
    color: var(--text-muted);
}

.card-predict .cta-icon,
.card-cutoffs .cta-icon {
    background: rgba(255, 255, 255, 0.6);
    color: var(--primary);
}

/* --- Refinements 2 (CTA Updates) --- */

/* (a) Even Lighter CTA Card Colors */
.card-predict {
    background: linear-gradient(135deg, #f8feff 0%, #eefcff 100%) !important;
    border: 1px solid rgba(33, 94, 97, 0.1) !important;
}

.card-cutoffs {
    background: linear-gradient(135deg, #fdfaff 0%, #faefff 100%) !important;
    border: 1px solid rgba(33, 94, 97, 0.1) !important;
}

/* (b) Remove White Background from Icons */
.cta-card .cta-icon {
    background: transparent !important;
    box-shadow: none !important;
    font-size: 2rem !important;
    /* Make slightly larger since no bg */
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    margin-bottom: 1rem !important;
    display: inline-block !important;
}

/* (c) Uniform Button Style for Both Cards */
.cta-card .btn-cta {
    background: white !important;
    color: var(--primary) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
    font-weight: 600 !important;
    padding: 0.6rem 1.5rem !important;
    border-radius: 50px !important;
    text-transform: none !important;
    width: auto !important;
    display: inline-block !important;
    margin-top: auto !important;
    /* Push to bottom if flex */
}

.cta-card .btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1) !important;
}

/* --- Gist / Institute at a Glance Redesign --- */
.gist-premium-card {
    background: linear-gradient(120deg, #e0f2f1 0%, #f3e5f5 100%);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.6);
    margin-top: 2rem;
}

.gist-premium-card::before {
    /* Decorative Circle */
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(33, 94, 97, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.gist-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.gist-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.gist-summary {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-main);
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.gist-highlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.gist-highlight-card {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: transform 0.3s, box-shadow 0.3s;
}

.gist-highlight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    background: white;
}

.gist-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(33, 94, 97, 0.2);
}

.gist-text {
    font-weight: 500;
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .gist-premium-card {
        padding: 1.5rem;
    }

    .gist-title {
        font-size: 1.5rem;
    }

    .gist-highlight-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Academic Cards Refinement --- */
.academic-card {
    background: #f9fbfd !important;
    /* Very subtle off-white/blueish tint */
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-left: none !important;
    transition: all 0.3s ease;
    padding: 1.5rem !important;
}

.academic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    background: white !important;
    border: 1px solid var(--primary) !important;
    /* Green border on hover */
}

.academic-title {
    color: var(--text-main) !important;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.academic-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--secondary);
    margin-top: 5px;
    border-radius: 2px;
}

/* --- Infrastructure Grid (Campus Life) - Colorful Refinement --- */
.infra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.2rem;
    margin-bottom: 3rem;
}

.infra-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #f9fbfd 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 2.5rem 1rem;
    min-height: 160px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

/* Base Icon Style */
.infra-box i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Default fallback */
    color: var(--secondary);
}

.infra-text {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

/* Hover Effects */
.infra-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    background: white;
}

.infra-box:hover i {
    transform: scale(1.15) rotate(5deg);
}

/* Colorful Cycle (Icon Color + Border Color) */
/* 1. Teal/Primary */
.infra-box:nth-child(4n+1) i {
    color: #009688;
}

.infra-box:nth-child(4n+1):hover {
    border: 2px solid #009688;
}

/* 2. Orange/Accent */
.infra-box:nth-child(4n+2) i {
    color: #ff9800;
}

.infra-box:nth-child(4n+2):hover {
    border: 2px solid #ff9800;
}

/* 3. Blue/Info */
.infra-box:nth-child(4n+3) i {
    color: #2196f3;
}

.infra-box:nth-child(4n+3):hover {
    border: 2px solid #2196f3;
}

/* 4. Purple/Secondary */
.infra-box:nth-child(4n+4) i {
    color: #9c27b0;
}

.infra-box:nth-child(4n+4):hover {
    border: 2px solid #9c27b0;
}

/* --- Student Activities Mosaic Grid --- */
.mosaic-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 Columns on Desktop */
    gap: 1.5rem;
    grid-auto-flow: dense;
    margin-bottom: 2rem;
}

.mosaic-item {
    background: white;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 200px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.mosaic-item:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.mosaic-item h4 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
    position: relative;
    z-index: 1;
}

.mosaic-item p {
    font-size: 1rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
    opacity: 0.9;
}

/* --- Shapes & Colors Variations --- */

/* 1. Teal Leaf (Top Left-Bottom Right) */
.mosaic-item:nth-child(5n+1) {
    background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
    border-radius: 40px 4px 40px 4px;
    color: #00695c;
    grid-row: span 1;
}

/* 2. Purple Leaf (Top Right-Bottom Left) */
.mosaic-item:nth-child(5n+2) {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border-radius: 4px 40px 4px 40px;
    color: #6a1b9a;
}

/* 3. Orange Rounded (Full Round) */
.mosaic-item:nth-child(5n+3) {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-radius: 30px;
    color: #ef6c00;
    /* Make this one span full width if it's the 3rd item? */
    grid-column: span 2;
}

/* 4. Blue Arch (Top Round) */
.mosaic-item:nth-child(5n+4) {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 30px 30px 4px 4px;
    color: #1565c0;
}

/* 5. Red Bowl (Bottom Round) */
.mosaic-item:nth-child(5n+5) {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-radius: 4px 4px 30px 30px;
    color: #c62828;
}

/* Mobile: Reset Spans & Columns */
@media (max-width: 768px) {
    .mosaic-grid {
        grid-template-columns: 1fr;
    }

    .mosaic-item:nth-child(n) {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }
}

/* --- Student Activities Mosaic Grid V2 (Watermarks) --- */
.mosaic-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 Columns standard */
    gap: 1.5rem;
    grid-auto-flow: dense;
    margin-bottom: 2rem;
}

.mosaic-item {
    background: white;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center content vertically */
    min-height: 200px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    /* Clean rounded rects */
    border: 1px solid rgba(0, 0, 0, 0.03);
}

/* The Big Rectangle (Hero) - First Item */
.mosaic-item:first-child {
    grid-column: span 2;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    /* Blue */
    color: #0d47a1;
    min-height: 280px;
}

.mosaic-item:first-child h4 {
    font-size: 2rem;
}

.mosaic-item:first-child p {
    font-size: 1.1rem;
    max-width: 80%;
}

/* Smaller Rectangles */
.mosaic-item:nth-child(2) {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
    color: #880e4f;
}

/* Pink */
.mosaic-item:nth-child(3) {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    color: #4a148c;
}

/* Purple */
.mosaic-item:nth-child(4) {
    background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
    color: #004d40;
}

/* Teal */
.mosaic-item:nth-child(5) {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #e65100;
}

/* Orange */

.mosaic-item:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    z-index: 2;
}

.mosaic-item h4 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
    position: relative;
    z-index: 2;
}

.mosaic-item p {
    font-size: 0.95rem;
    line-height: 1.6;
    position: relative;
    z-index: 2;
    opacity: 0.95;
    font-weight: 500;
}

/* Watermark Icon */
.watermark-icon {
    position: absolute;
    bottom: -20px;
    right: -20px;
    font-size: 9rem;
    opacity: 0.15;
    transform: rotate(-10deg);
    z-index: 1;
    transition: transform 0.4s ease;
    pointer-events: none;
}

.mosaic-item:hover .watermark-icon {
    transform: rotate(0deg) scale(1.1);
    opacity: 0.2;
}

/* Mobile: Stack everything */
@media (max-width: 768px) {
    .mosaic-grid {
        grid-template-columns: 1fr;
    }

    .mosaic-item:first-child {
        grid-column: span 1;
    }
}

/* --- Ranking Trend Indicators --- */
.rank-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 8px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.dot-green {
    background-color: #2e7d32;
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.2);
}

.dot-red {
    background-color: #c62828;
    box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.2);
}

.dot-orange {
    background-color: #ef6c00;
    box-shadow: 0 0 0 2px rgba(239, 108, 0, 0.2);
}

/* --- Gallery Numbered Indicators --- */
.gallery-indicators {
    display: flex;
    justify-content: center;
    gap: 15px;
    /* Space between circles */
    margin-top: 1.5rem;
    align-items: center;
    min-height: 60px;
}

.indicator-circle {
    width: 35px;
    height: 35px;
    background: #f5f5f5;
    color: var(--text-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.indicator-circle:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.indicator-circle.active {
    width: 55px;
    height: 55px;
    background: var(--accent);
    /* Orange */
    color: white;
    font-size: 1.3rem;
    /* Larger font */
    box-shadow: 0 10px 20px rgba(255, 152, 0, 0.25);
    border: none;
    order: 1;
    /* Ensure centering logic works if using flex order, but we update DOM */
}

/* --- Gallery Carousel V2 (Consistent & Animated) --- */

.gallery-carousel {
    position: relative;
    width: 100%;
    /* Fixed aspect ratio container could be better, but we stick to fixed height for now */
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    /* Unified shadow */
    background: #000;
    /* Dark background for media */
}

/* Ensure consistent slide sizing */
.carousel-slide {
    width: 100%;
    background: #000;
}

.carousel-slide img,
.carousel-slide iframe {
    width: 100%;
    height: 350px;
    /* Unified Taller Height */
    object-fit: cover;
    /* Images cover */
    display: block;
    border: none;
}

/* Caption box consistent */
.slide-caption-box {
    padding: 1rem;
    background: white;
    /* Always white bg for text */
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    min-height: 80px;
    /* Ensure buttons don't overlap differently */
}

/* Navigation Buttons - Consistent Positioning */
.carousel-btn {
    position: absolute;
    top: 50%;
    /* Center relative to CONTAINER */
    transform: translateY(-100%);
    /* Adjust up slightly to be in media area */
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 10;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-100%) scale(1.1);
}

.carousel-prev {
    left: 15px;
}

.carousel-next {
    right: 15px;
}


/* --- Animated Indicator Track --- */
.gallery-indicators-container {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    height: 60px;
    overflow: hidden;
    /* Mask */
    position: relative;
    /* Width for 3 items: (35px + 15px gap) * 3 = ~150px. 
       Active is 55px. So 55 + 35 + 35 + gaps. 
       Let's make it wide enough for 5 items visually but mask to 3? 
       Actually, just let it be mask-less if we center nicely?
       User said: "scrolled number change should give the feeling that it has moved from left to right"
       We need a mask + transform.
    */
    width: 260px;
    /* Approx width for 3-5 items */
    margin-left: auto;
    margin-right: auto;
    /* Fade edges */
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 20%, black 80%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, black 20%, black 80%, transparent 100%);
}

.indicator-track {
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 0 50%;
    /* Center padding to make calculation easier? No, standard flex */
}

.indicator-circle {
    /* Same style as before, just ensuring flex-shrink: 0 */
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #f0f0f0;
    color: var(--text-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.indicator-circle.active {
    width: 55px;
    height: 55px;
    background: var(--accent);
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 10px 20px rgba(255, 152, 0, 0.25);
}

/* --- Gallery Carousel V3 (Unified & Consistent) --- */

/* Wrapper Card: Contains both Slider and Indicators */
.gallery-card-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    overflow: hidden;
    /* Ensure borders clip */
    border: 1px solid rgba(0, 0, 0, 0.03);
}

/* Slider Viewport (Images/Videos) */
.gallery-slider-viewport {
    position: relative;
    width: 100%;
    /* Fixed height for media area? Let slide handle it */
    overflow: hidden;
    background: #000;
}

/* Buttons inside Viewport */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) !important;
    /* Force center vertically in viewport */
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 10;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -30px;
    /* Offset for text height? No, center on media. Media is 350px. Center ~175px */
}

/* Ensure consistent slide sizing */
.carousel-slide {
    width: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.carousel-slide img,
.carousel-slide iframe {
    width: 100%;
    height: 350px;
    /* Fixed Media Height */
    object-fit: cover;
    display: block;
    border: none;
    vertical-align: top !important;
    /* Fix inline gap */
    margin: 0;
    padding: 0;
}

/* Text area below media */
.slide-caption-box {
    padding: 1rem 1.5rem;
    background: white;
    min-height: 70px;
    /* Consistent text height */
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

/* Indicators Container (Integrated at bottom of card) */
.gallery-indicators-container {
    background: #f8f9fa;
    /* Slightly off-white footer */
    padding: 1rem 0;
    display: flex;
    justify-content: center;
    overflow: hidden;
    position: relative;
    width: 100%;
    /* Mask for fading edges */
    -webkit-mask-image: linear-gradient(90deg, transparent 5%, black 25%, black 75%, transparent 95%);
    mask-image: linear-gradient(90deg, transparent 5%, black 25%, black 75%, transparent 95%);
}

.indicator-track {
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* No padding, calculated in JS */
}

.indicator-circle {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #fff;
    color: var(--text-muted);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.indicator-circle.active {
    width: 50px;
    /* Slightly smaller than before for cleaner look */
    height: 50px;
    background: var(--accent);
    color: white;
    font-size: 1.15rem;
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.3);
    border: none;
}

/* --- Gallery Carousel V4 (Window of 5) --- */

.gallery-indicators-container {
    background: #f8f9fa;
    padding: 1rem 0;
    display: flex;
    justify-content: center;
    /* Center content if track is small */
    position: relative;
    width: 320px;
    /* Force distinct width for ~5 items (55px * 5 = 275 + margins) */
    max-width: 90%;
    /* Mobile responsive */
    margin: 0 auto;
    /* Center the container itself */
    overflow: hidden;

    /* Fade edges */
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 15%, black 85%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, black 15%, black 85%, transparent 100%);
}

.indicator-track {
    display: flex;
    align-items: center;
    gap: 15px;
    /* Gap between bubbles */
    padding: 0 10px;
    /* Inner padding */
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    width: max-content;
    /* Ensure it takes full width of circles */
}

/* Bubbles - Same as V3 */
.indicator-circle {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #fff;
    color: var(--text-muted);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator-circle.active {
    width: 50px;
    height: 50px;
    background: var(--accent);
    color: white;
    font-size: 1.15rem;
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.3);
    border: none;
}

/* --- Gallery Carousel V5 (Static Layout + Scale) --- */

.gallery-indicators-container {
    background: #f8f9fa;
    padding: 1.5rem 0;
    /* More padding for scale */
    display: flex;
    justify-content: center;
    position: relative;
    width: 320px;
    max-width: 90%;
    margin: 0 auto;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 15%, black 85%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, black 15%, black 85%, transparent 100%);
}

.indicator-track {
    display: flex;
    align-items: center;
    gap: 15px;
    /* Fixed Gap */
    padding: 0 10px;
    /* Fixed Padding */
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    /* Width will now be constant: Padding*2 + N*40 + (N-1)*15 */
}

.indicator-circle {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #fff;
    color: var(--text-muted);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Bouncy scale */
    transform-origin: center center;
    z-index: 1;
    /* Default z-index */
    position: relative;
}

.indicator-circle.active {
    /* No Layout Change */
    width: 40px;
    height: 40px;

    /* Visual Change Only */
    transform: scale(1.3);
    background: var(--accent);
    color: white;
    font-size: 1rem;
    /* Adjust font to look good scaled (1rem * 1.3 = 1.3rem) */
    box-shadow: 0 10px 20px rgba(255, 152, 0, 0.3);
    border: none;
    z-index: 2;
    /* On top */
}

/* --- Gallery CSS Fix (Reset Order) --- */
.indicator-circle.active {
    order: 0 !important;
    /* Fix jumping issue caused by legacy styles */
}

/* --- Gallery Race Condition Fix --- */
.indicator-track.no-transition {
    transition: none !important;
}

/* --- Gallery Alignment Fix --- */
.gallery-indicators-container {
    justify-content: flex-start !important;
    /* Force Left Align for JS Math */
}

/* --- Mobile Optimization --- */

/* (c) Read More / Truncate Styles */
.truncate-box {
    position: relative;
    max-height: 120px;
    /* Approx 4-5 lines */
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.truncate-active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.95));
    /* Adjust if background isn't white */
    pointer-events: none;
}

.truncate-box.expanded {
    max-height: 2000px;
    /* Large enough */
}

.truncate-box.expanded::after {
    display: none;
}

.read-more-btn {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0;
}

/* (d) Left Side Floater (Mobile Only) */
.mobile-floater {
    position: fixed;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    /* Hidden by default */
    flex-direction: column;
    gap: 15px;
    z-index: 999;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 12px 6px;
    border-radius: 30px;
    box-shadow: 2px 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.float-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
    border: 1px solid var(--glass-border);
}

@media (max-width: 768px) {

    /* (b) Natural Flow: Hide Tabs, Show All Content */
    .tabs-container {
        display: none !important;
    }

    .tab-content {
        display: block !important;
        margin-bottom: 3rem;
        animation: none !important;
    }

    /* Hide specific sections if they are empty or redundant in flow? No, showing all. */
    /* Rankings logic sets display manually. We removed that. */

    /* (d) Show Floater */
    .mobile-floater {
        display: flex;
    }

    /* (a) Eliminate Horizontal Scroll */
    body,
    html {
        overflow-x: hidden;
        width: 100%;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
        width: 100%;
        overflow-x: hidden;
    }

    .glass-card,
    .section {
        width: 100%;
        overflow-x: hidden;
        /* Prevent internal overflow causing page scroll */
    }

    /* Allow tables to scroll internally */
    .table-responsive {
        overflow-x: auto;
    }

    /* Fix Hero Title overflow */
    h1 {
        word-wrap: break-word;
    }
}

/* --- Student Activities Layout V3 (2x2 + Hero) --- */

.activities-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 1.8fr;
    /* Tall Card (Left) vs 2x2 Grid (Right) */
    gap: 1.5rem;
    align-items: stretch;
}

/* Tall Hero Card */
.activities-hero {
    height: 100%;
    min-height: 400px;
    /* Base height */
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.activities-hero:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* 2x2 Grid Section */
.activities-quad-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1.5rem;
    height: 100%;
}

/* Square Items */
.activities-square {
    aspect-ratio: 1 / 1;
    /* Force Square */
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

/* Base Card Styles extended from existing classes */
.std-card-base {
    background: white;
    border-radius: 16px;
    /* Soft R */
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

/* Hover Effects */
.activities-square:hover {
    transform: translateY(-5px) rotate(1deg);
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Typography & Icons */
.std-icon-large {
    font-size: 7rem;
    position: absolute;
    bottom: -1rem;
    right: -1rem;
    opacity: 0.05;
    transform: rotate(-15deg);
    transition: all 0.4s ease;
}

.activities-square:hover .std-icon-large,
.activities-hero:hover .std-icon-large {
    opacity: 0.15;
    transform: rotate(0deg) scale(1.1);
}

.std-icon-main {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hero Specifics */
.activities-hero .std-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2.5rem;
    position: relative;
    z-index: 2;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.4));
}

.activities-hero .hero-bg-icon {
    font-size: 15rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-10deg);
    opacity: 0.03;
    color: var(--primary);
    transition: transform 0.5s;
    z-index: 1;
}

.activities-hero:hover .hero-bg-icon {
    transform: translate(-50%, -50%) rotate(0deg) scale(1.1);
    opacity: 0.06;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .activities-wrapper {
        grid-template-columns: 1fr;
    }

    .activities-hero {
        min-height: 250px;
        aspect-ratio: auto;
    }

    .activities-quad-grid {
        grid-template-columns: 1fr 1fr;
        /* Keep 2x2 squares on mobile? Or stack? 2x2 is usually fine on mobile unless very small */
    }

    @media (max-width: 480px) {
        .activities-quad-grid {
            grid-template-columns: 1fr;
            /* Stack squares on very small screens */
            aspect-ratio: auto;
        }

        .activities-square {
            aspect-ratio: auto;
            min-height: 150px;
        }
    }
}

/* --- Pin-up Boards CSS --- */

.gist-wrapper {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    /* Text Left, Boards Right */
    gap: 3rem;
    align-items: start;
    margin-bottom: 4rem;
    /* Reverting to original spacing as requested */
    position: relative;
    z-index: 5;
    width: 100%;
    /* Use full available width */
}

.pin-boards-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1rem;
    position: relative;
}

.pin-note {
    background: #fffbef;
    /* Light Yellow Paper */
    padding: 1.5rem;
    border-radius: 2px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    transform: rotate(-1deg);
    transition: transform 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.pin-note:nth-child(even) {
    transform: rotate(1deg);
    background: #f0fdf4;
    /* Light Green Paper alternate */
}

.pin-note:hover {
    transform: rotate(0deg) scale(1.02);
    z-index: 5;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* The Pin Graphic */
.pin-graphic {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 30% 30%, #ff6b6b, #c0392b);
    border-radius: 50%;
    box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.pin-graphic::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    transform: translate(-30%, -60%);
}

.pin-header {
    text-align: center;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 1rem;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px dashed rgba(0, 0, 0, 0.1);
    padding-bottom: 0.5rem;
}

.pin-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pin-item {
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.2rem;
    line-height: 1.4;
    color: #4b5563;
}

.pin-item::before {
    content: '•';
    color: var(--primary);
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
}

.pin-date {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 2px;
}

@media (max-width: 768px) {
    .gist-wrapper {
        grid-template-columns: 1fr;
    }

    .pin-boards-container {
        flex-direction: column;
        /* Stack vertically instead of scroll */
        padding-bottom: 0;
        gap: 2rem;
    }

    .pin-note {
        width: 100%;
        min-width: 0;
        /* Allow shrinking */
    }
}

/* --- Gist / Institute at a Glance Styles (Restored & Optimized) --- */

.gist-premium-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.gist-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.gist-icon-box {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 10px rgba(33, 94, 97, 0.2);
}

.gist-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    color: var(--text-main);
    line-height: 1.2;
}

.gist-summary {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* Highlights Grid - Auto Fit for Split Layout */
.gist-highlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
    margin-top: auto;
    /* Push to bottom if space permits */
}

.gist-highlight-card {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.8rem;
    transition: transform 0.2s, background 0.2s;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.gist-highlight-card:hover {
    transform: translateY(-3px);
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.08);
}

.gist-highlight-card .gist-icon-box {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    background: rgba(33, 94, 97, 0.1);
    color: var(--primary);
    box-shadow: none;
}

.gist-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.3;
}

.btn-pin-subscribe {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(33, 94, 97, 0.2);
}

.btn-pin-subscribe:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(33, 94, 97, 0.3);
    background: #1a4a4d;
}

/* --- Student Activities V3 Layout --- */

.activities-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: stretch;
}

@media (max-width: 768px) {
    .activities-wrapper {
        grid-template-columns: 1fr;
    }
}

.std-card-base {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    /* solid border for crispness */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    /* minimal shadow */
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    isolation: isolate;
}

.std-card-base:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.activities-hero {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* Text at bottom */
    min-height: 400px;
    /* Tall */
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    /* Subtle Green tint */
}

/* Watermark Icon */
.hero-bg-icon {
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 15rem;
    color: rgba(33, 94, 97, 0.05);
    /* Primary very faint */
    z-index: -1;
    transform: rotate(15deg);
}

.std-content {
    position: relative;
    z-index: 2;
}

.std-icon-main {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: block;
}

/* Right Side Grid */
.activities-quad-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Force 2 columns */
    gap: 1.5rem;
    grid-auto-rows: 1fr;
    /* Equal height rows */
}

/* 
   User Request: 'if its spills over a third row dont extend the 1st element'
   This means we DO NOT want grid-column: 1 / -1 for the last child.
   So we just leave it default.
*/

.activities-square {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
    min-height: 180px;
}

.std-icon-large {
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 6rem;
    color: rgba(0, 0, 0, 0.03);
    transform: rotate(10deg);
}

.activities-square .std-icon-main {
    font-size: 2rem;
    margin-bottom: 0.8rem;
}