/* ========================================
   SRBSGC - Seth Ram Bahadur Singh Gujarati College
   Main Stylesheet
   ======================================== */

/* ----------------------------------------
   CSS Custom Properties (Color Scheme from Logo)
   ---------------------------------------- */
:root {
    /* Primary Colors */
    --primary-teal: #0a7377;
    --primary-teal-dark: #065558;
    --primary-teal-light: #0d9298;
    --primary-teal-ultra-light: #e8f4f5;

    /* Secondary Colors */
    --secondary-maroon: #8b1a32;
    --secondary-maroon-dark: #6d1427;
    --secondary-maroon-light: #a82040;
    --secondary-maroon-ultra-light: #fdf2f4;

    /* Accent Colors */
    --accent-gold: #e8a520;
    --accent-gold-dark: #c98c18;
    --accent-gold-light: #f4b73d;

    /* Premium Neutral Colors - Warm Tones */
    --white: #ffffff;
    --cream: #fefdfb;
    --cream-warm: #faf8f5;
    --off-white: #f7f5f2;
    --light-gray: #ebe8e4;
    --gray: #6c757d;
    --dark-gray: #2d3436;
    --charcoal: #1e272e;
    --black: #141414;

    /* Navbar specific */
    --navbar-bg: linear-gradient(180deg, #fefdfb 0%, #faf8f5 100%);
    --navbar-border: rgba(139, 26, 50, 0.08);
    --dropdown-bg: #fefdfb;
    --mobile-menu-bg: linear-gradient(180deg, #fefdfb 0%, #f7f5f2 100%);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-teal) 0%, var(--primary-teal-dark) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--secondary-maroon) 0%, var(--secondary-maroon-dark) 100%);
    --gradient-gold: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-dark) 100%);
    --gradient-warm: linear-gradient(135deg, #fefdfb 0%, #f7f5f2 100%);

    /* Shadows - Warmer tones */
    --shadow-sm: 0 2px 4px rgba(45, 52, 54, 0.06);
    --shadow-md: 0 4px 16px rgba(45, 52, 54, 0.08);
    --shadow-lg: 0 8px 30px rgba(45, 52, 54, 0.12);
    --shadow-xl: 0 12px 50px rgba(45, 52, 54, 0.16);
    --shadow-dropdown: 0 10px 40px rgba(139, 26, 50, 0.12), 0 4px 12px rgba(0, 0, 0, 0.05);

    /* Typography - System Font Stacks (Local) */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-secondary: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Spacing */
    --container-max-width: 1400px;
    --topbar-height: 40px;
    --navbar-height: 85px;
}

/* ----------------------------------------
   CSS Reset & Base Styles
   ---------------------------------------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    min-height: 100vh;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-teal) var(--off-white);
}

body {
    font-family: var(--font-secondary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
    min-height: 100vh;
    -webkit-user-select: none;
    /* Safari */
    -ms-user-select: none;
    /* IE 10 and IE 11 */
    user-select: none;
    /* Standard syntax */
}

/* ----------------------------------------
   Custom Scrollbar
   ---------------------------------------- */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--off-white);
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary-teal);
    border-radius: 6px;
    border: 3px solid var(--off-white);
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-teal-dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul,
ol {
    list-style: none;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ----------------------------------------
   Container
   ---------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ========================================
   SCROLL REVEAL ANIMATIONS
   ======================================== */
.reveal {
    opacity: 0.01;
    /* Prevent GPU freeze */
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}



.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

.delay-400 {
    transition-delay: 400ms;
}

/* ========================================
   POSTER POPUP MODAL
   ======================================== */
.poster-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(5px);
}

.poster-modal.show {
    display: flex;
    opacity: 1;
}

.poster-modal-content {
    background: var(--white);
    padding: 0;
    border-radius: 12px;
    /* Desktop: Uncapped width, locked to 96vh height */
    width: auto;
    max-width: 95vw;
    height: 96vh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.poster-modal.show .poster-modal-content {
    transform: scale(1);
}

.poster-slider {
    position: relative;
    /* Sizing is constrained strictly by height and aspect ratio for desktop */
    height: 100%;
    width: auto;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 12px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.poster-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Tight padding pushes the image to the maximum possible boundaries */
    padding: 30px 40px 20px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out;
}

.poster-slide.active {
    opacity: 1;
    visibility: visible;
}

.poster-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.1));
}

/* Close button */
.poster-close {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--cream-warm);
    color: var(--secondary-maroon);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.poster-close:hover {
    background: var(--secondary-maroon);
    color: var(--white);
    transform: rotate(90deg) scale(1.1);
}

/* Arrows */
.poster-prev,
.poster-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--cream-warm);
    color: var(--charcoal);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: none;
    font-size: 0.9rem;
}

.poster-prev:hover,
.poster-next:hover {
    background: var(--primary-teal);
    color: var(--white);
    transform: translateY(-50%) scale(1.05);
}

.poster-prev {
    left: 4px;
}

.poster-next {
    right: 4px;
}

/* Dots */
.poster-dots {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.poster-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.poster-dot.active {
    background: var(--secondary-maroon);
    transform: scale(1.3);
}

@media(max-width: 600px) {
    .poster-modal-content {
        width: 95vw;
        height: auto;
    }

    .poster-slider {
        width: 100%;
        height: 90vh;
        /* Pushed height up! */
        aspect-ratio: auto;
    }

    .poster-slide {
        padding: 30px 24px 24px 24px;
        /* Tightest possible frame on mobile */
    }

    .poster-prev,
    .poster-next {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .poster-close {
        width: 28px;
        height: 28px;
        top: 6px;
        right: 6px;
    }

    .poster-prev {
        left: 0px;
    }

    .poster-next {
        right: 0px;
    }
}

/* ========================================
   TOPBAR / QUICKBAR STYLES
   ======================================== */
.topbar {
    background: var(--gradient-secondary);
    color: var(--white);
    height: var(--topbar-height);
    position: relative;
    z-index: 1000;
    overflow: hidden;
}

.topbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.05) 50%,
            transparent 100%);
    pointer-events: none;
}

.topbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Topbar Left Section */
.topbar-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.topbar-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    transition: all var(--transition-fast);
}

.topbar-item:hover {
    color: var(--accent-gold);
}

.topbar-item i,
.topbar-item svg {
    font-size: 0.875rem;
    color: var(--accent-gold);
}

.topbar-divider {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.2);
}

/* Topbar Right Section */
.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Social Links */
.topbar-social {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: 0.8125rem;
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--accent-gold);
    color: var(--secondary-maroon-dark);
    transform: translateY(-2px);
}

/* Quick Links */
.topbar-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0;
    position: relative;
    transition: color var(--transition-fast);
}

.topbar-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-gold);
    transition: width var(--transition-fast);
}

.topbar-link:hover {
    color: var(--accent-gold);
}

.topbar-link:hover::after {
    width: 100%;
}

/* Topbar CTA Button */
.topbar-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-gold);
    color: var(--secondary-maroon-dark);
    padding: 0.375rem 1rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.topbar-cta:hover {
    background: var(--accent-gold-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(232, 165, 32, 0.3);
}

/* No commented-out code */

/* ========================================
   MAIN NAVBAR STYLES - PREMIUM DESIGN
   ======================================== */
.navbar {
    background: var(--navbar-bg);
    border-bottom: 1px solid var(--navbar-border);
    position: sticky;
    top: 0;
    z-index: 999;
    transition: all var(--transition-normal);
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-maroon) 0%, var(--primary-teal) 50%, var(--accent-gold) 100%);
    opacity: 0.6;
}

.navbar.scrolled {
    box-shadow: var(--shadow-lg);
}

.navbar.scrolled::after {
    opacity: 1;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
    height: var(--navbar-height);
}

/* Logo */
.navbar-logo {
    display: flex;
    align-items: center;
    z-index: 1001;
}

.navbar-logo img {
    height: 60px;
    /* Slightly bigger as requested */
    width: auto;
    transition: all var(--transition-fast);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

.navbar-logo:hover img {
    transform: scale(1.03);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
}

/* Navigation Menu */
.navbar-menu {
    display: flex;
    align-items: center;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Nav Items */
.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--charcoal);
    border-radius: 8px;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0.375rem;
    left: 1.25rem;
    right: 1.25rem;
    height: 2px;
    background: var(--primary-teal);
    transform: scaleX(0);
    transition: transform var(--transition-fast);
    border-radius: 2px;
}

.nav-link:hover {
    color: var(--primary-teal);
    background: var(--primary-teal-ultra-light);
}

.nav-link:hover::before {
    transform: scaleX(1);
}

.nav-item.has-dropdown>.nav-link:hover::before {
    transform: scaleX(0);
}

/* Dropdown Arrow Animation - Fixed */
.dropdown-icon {
    font-size: 0.6rem;
    color: var(--gray);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), color var(--transition-fast);
    margin-left: 0.125rem;
}

.nav-item.has-dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
    color: var(--primary-teal);
}

/* Dropdown Menu - Premium Style with proper spacing */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    min-width: 260px;
    background: var(--dropdown-bg);
    border-radius: 0 0 16px 16px;
    box-shadow: var(--shadow-dropdown);
    padding: 0.75rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-normal);
    z-index: 1000;
    border: 1px solid rgba(139, 26, 50, 0.08);
}

/* Invisible bridge to prevent gap issues */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 0;
    right: 0;
    height: 16px;
    background: transparent;
}

.nav-item.has-dropdown:hover>.dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.125rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark-gray);
    border-radius: 10px;
    transition: all var(--transition-fast);
    position: relative;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--accent-gold);
    border-radius: 0 3px 3px 0;
    transition: height var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--gradient-primary);
    color: var(--white);
    transform: translateX(4px);
}

.dropdown-item:hover::before {
    height: 60%;
}

/* Nested Dropdown */
.has-nested {
    position: relative;
}

.nested-icon {
    font-size: 0.6rem;
    color: var(--gray);
    transition: all var(--transition-bounce);
}

.has-nested:hover .nested-icon {
    transform: translateX(4px);
    color: var(--white);
}

.nested-menu {
    position: absolute;
    top: -0.75rem;
    left: calc(100% + 8px);
    min-width: 220px;
    background: var(--dropdown-bg);
    border-radius: 0 16px 16px 0;
    box-shadow: var(--shadow-dropdown);
    padding: 0.75rem;
    opacity: 0;
    visibility: hidden;
    transform: translateX(15px);
    transition: all var(--transition-normal);
    z-index: 1001;
    border: 1px solid rgba(139, 26, 50, 0.06);
}

.nested-menu::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 0;
    bottom: 0;
    width: 8px;
    background: transparent;
}

.has-nested:hover>.nested-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Hamburger Toggle Button */
.navbar-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: var(--cream-warm);
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    /* Slightly smaller radius for smaller box */
    cursor: pointer;
    z-index: 1003;
    position: relative;
    padding: 0;
    /* Remove padding to let flexbox center perfectly */
    transition: background 0.3s ease, border-color 0.3s ease;
    /* Only animate colors on container */
    gap: 5px;
    /* Slightly smaller gap */
}

.navbar-toggle:hover {
    background: var(--primary-teal-ultra-light);
    border-color: var(--primary-teal);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: var(--charcoal);
    border-radius: 2px;
    transition: all 0.3s ease;
    /* Use margin for spacing in flex column instead of absolute positioning */
    position: static;
    transform: none;
}

/* Hamburger to X Animation when Active */
.navbar-toggle.active {
    background: var(--secondary-maroon);
    border-color: var(--secondary-maroon);
    /* Removed container rotation */
}

.navbar-toggle.active .hamburger-line {
    background: var(--white);
    position: absolute;
    /* Revert to absolute for the X shape */
    left: 50%;
    top: 50%;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    /* smooth transition for lines */
}

/* 
 * Rotate lines to create X + 360 spin effect 
 * 45deg + 360deg = 405deg
 * -45deg + 360deg = 315deg (or -405deg for counter spin)
 */
.navbar-toggle.active .hamburger-line:nth-child(1) {
    transform: translate(-50%, -50%) rotate(405deg);
}

.navbar-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translate(-50%, -50%) scaleX(0) rotate(360deg);
}

.navbar-toggle.active .hamburger-line:nth-child(3) {
    transform: translate(-50%, -50%) rotate(-405deg);
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Tablet & Below */
@media (max-width: 992px) {
    .topbar-links {
        display: none;
    }

    .topbar-left {
        gap: 1rem;
    }

    /* Hide email text on tablet, but keep phone visible */
    .topbar-item.topbar-email span {
        display: none;
    }

    .topbar-item.topbar-email {
        gap: 0;
    }

    /* Navbar Mobile Styles */
    .navbar-toggle {
        display: flex;
    }

    .navbar::after {
        height: 2px;
    }

    /* Fixed header layer - stays above mobile menu */
    .navbar {
        z-index: 1005;
    }

    .navbar-container {
        height: 80px;
        padding: 0 1.25rem;
        position: relative;
        z-index: 1005;
    }

    .navbar-logo {
        z-index: 1006;
    }

    .navbar-logo img {
        height: 40px;
    }

    /* Full Screen Mobile Menu - starts right below navbar (80px + 3px border) */
    .navbar-menu {
        position: fixed;
        top: 83px;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        background: var(--mobile-menu-bg);
        display: none;
        flex-direction: column;
        padding: 0;
        margin: 0;
        opacity: 0;
        visibility: hidden;
        transform: translateX(100%);
        transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.4s ease;
        z-index: 1000;
        overflow: hidden;
    }

    .navbar-menu.active {
        display: flex;
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
        overflow: hidden;
    }

    /* Remove the pseudo header - navbar itself will be the header */
    .navbar-menu::before {
        display: none;
    }

    /* When menu is active - navbar becomes sticky header with maroon border */
    body.menu-open .navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: linear-gradient(180deg, var(--cream) 0%, var(--cream-warm) 100%);
        border-bottom: 3px solid var(--secondary-maroon);
        z-index: 1010;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

    body.menu-open .navbar::after {
        opacity: 0;
    }

    /* Keep logo in normal position */
    body.menu-open .navbar-logo img {
        filter: none;
    }

    body.menu-open .navbar-toggle {
        background: var(--secondary-maroon);
        border-color: var(--secondary-maroon);
    }

    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }

    /* Menu list styling - scrollable */
    .navbar-nav {
        flex: 1;
        display: block;
        width: 100%;
        padding: 0 1rem;
        padding-bottom: 80px;
        margin: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .nav-item {
        border-bottom: 1px solid var(--light-gray);
    }

    /* Remove top border from first item */
    .nav-item:first-child {
        border-top: none;
    }

    .nav-link {
        display: flex;
        align-items: center;
        padding: 1.125rem 0.5rem;
        font-size: 1.125rem;
        font-weight: 600;
        color: var(--charcoal);
        justify-content: space-between;
        border-radius: 0;
        background: transparent;
        overflow: visible;
    }

    .nav-link::before {
        display: none;
    }

    .nav-link:hover {
        background: transparent;
        color: var(--secondary-maroon);
    }

    .dropdown-icon {
        font-size: 0.65rem;
        color: var(--white);
        background: var(--secondary-maroon);
        padding: 0.5rem;
        border-radius: 50%;
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.4s ease, background 0.3s ease, box-shadow 0.3s ease;
        transform: rotate(0deg) !important;
        z-index: 5;
        position: relative;
    }

    /* Disable hover rotation on mobile */
    .nav-item.has-dropdown:hover .dropdown-icon {
        transform: rotate(0deg) !important;
        color: var(--white);
    }

    /* Only rotate when dropdown-open class is present */
    .nav-item.has-dropdown.dropdown-open>.nav-link .dropdown-icon {
        transform: rotate(180deg) !important;
        background: var(--primary-teal);
        color: var(--white);
        box-shadow: 0 2px 8px rgba(0, 128, 128, 0.3);
    }

    /* Mobile Dropdown - Accordion Style */
    .dropdown-menu {
        position: static !important;
        min-width: 100%;
        box-shadow: none;
        border-radius: 12px;
        border: none;
        padding: 0;
        margin: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        transform: none !important;
        background: var(--primary-teal-ultra-light);
        transition: max-height 0.4s ease-in-out, padding 0.3s ease, margin 0.3s ease;
    }

    .dropdown-menu::before {
        display: none;
    }

    /* Disable hover on mobile - only click works */
    .nav-item.has-dropdown:hover>.dropdown-menu {
        max-height: 0;
        padding: 0;
    }

    /* Click to expand dropdown */
    .nav-item.has-dropdown.dropdown-open>.dropdown-menu {
        max-height: 2000px;
        padding: 0.75rem;
        margin: 0.5rem 0;
    }

    .dropdown-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.875rem 1rem;
        font-size: 1rem;
        color: var(--charcoal);
        border-radius: 8px;
        background: transparent;
        overflow: visible;
    }

    .dropdown-item::before {
        display: none;
    }

    .dropdown-item:hover {
        background: var(--primary-teal);
        color: var(--white);
        transform: none;
    }

    /* Nested Menu Mobile */
    .nested-menu {
        position: static !important;
        min-width: 100%;
        box-shadow: none;
        border-radius: 8px;
        border: none;
        padding: 0;
        margin: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        transform: none !important;
        background: var(--cream-warm);
        transition: max-height 0.4s ease-in-out, padding 0.3s ease, margin 0.3s ease;
    }

    .nested-menu::before {
        display: none;
    }

    /* Disable hover on mobile - only click works */
    .has-nested:hover>.nested-menu {
        max-height: 0;
        padding: 0;
    }

    /* Click to expand nested dropdown */
    .has-nested.nested-open>.nested-menu {
        max-height: 800px;
        padding: 0.5rem;
        margin: 0.5rem 0 0 0;
    }

    .nested-icon {
        font-size: 0.55rem;
        color: var(--charcoal);
        background: var(--accent-gold);
        padding: 0.375rem;
        border-radius: 50%;
        width: 24px;
        height: 24px;
        min-width: 24px;
        min-height: 24px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.4s ease, background 0.3s ease;
        transform: rotate(0deg) !important;
        z-index: 5;
        position: relative;
    }

    /* Disable hover rotation on mobile for nested */
    .has-nested:hover .nested-icon {
        transform: rotate(0deg) !important;
    }

    /* Only rotate when nested-open class is present */
    .has-nested.nested-open .nested-icon {
        transform: rotate(-90deg) !important;
        background: var(--primary-teal);
        color: var(--white);
    }

    .nested-menu .dropdown-item {
        padding: 0.75rem 1rem;
        font-size: 0.9375rem;
        background: transparent;
    }

    .nested-menu .dropdown-item:hover {
        background: var(--accent-gold);
        color: var(--charcoal);
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --topbar-height: 36px;
    }

    .topbar-container {
        padding: 0 1rem;
    }

    .topbar-left {
        gap: 0.75rem;
    }

    .topbar-divider {
        display: none;
    }

    /* Keep phone number visible with text */
    .topbar-item.topbar-phone span {
        display: inline;
        font-size: 0.75rem;
    }

    .topbar-social {
        gap: 0.5rem;
    }

    .social-link {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }

    .topbar-cta {
        padding: 0.25rem 0.75rem;
        font-size: 0.75rem;
    }

    .topbar-cta span {
        display: none;
    }

    /* Navbar adjustments */
    .navbar-container {
        height: 65px;
        padding: 0 1rem;
    }

    .navbar-logo img {
        height: 48px;
    }

    .navbar-menu {
        top: 68px;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .navbar-menu::before {
        display: none;
    }

    .navbar-nav {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 100px;
    }

    .navbar-toggle {
        width: 42px;
        height: 42px;
    }

    .nav-link {
        font-size: 1rem;
        padding: 1rem 0.5rem;
    }
}

/* Very Small Screens */
@media (max-width: 480px) {
    .topbar-cta {
        display: none;
    }

    /* Hide email completely on very small screens */
    .topbar-item.topbar-email {
        display: none;
    }

    /* Ensure phone stays visible */
    .topbar-item.topbar-phone {
        display: flex;
    }

    .topbar-item.topbar-phone span {
        display: inline;
    }

    .navbar-logo img {
        height: 40px;
    }

    .nav-link {
        font-size: 1rem;
    }

    .dropdown-item {
        font-size: 0.9375rem;
    }
}



/* ========================================
   FOOTER
   ======================================== */
#footer {
    background:
        linear-gradient(rgba(139, 26, 50, 0.85),
            rgba(139, 26, 50, 0.85)),
        url('/Images/Footer.png') center/cover no-repeat;
    background-attachment: fixed;
    color: var(--white);
    position: relative;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Footer wave divider - white fill to blend with cream alumni section */
#footer .custom-shape-divider-top .shape-fill {
    fill: var(--cream-warm);
}

.custom-shape-divider-top.white-fill path {
    fill: #ffffff !important;
}

.footer-content {
    padding: 5.5rem 0 1rem;
    /* Increased top padding for more space below wave */
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* Footer Column Styling */
.footer-column h3 {
    font-family: var(--font-primary);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.4rem;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent-gold);
}

/* Logo & About Column */
.footer-logo {
    width: 200px;
    margin-bottom: 0.75rem;
    /* Removed filter - logo now visible */
}

.footer-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.75rem;
}

.footer-tagline {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

/* Social Media */
.footer-social {
    display: flex;
    gap: 0.6rem;
}

.footer-social a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--accent-gold);
    color: var(--secondary-maroon);
    transform: translateY(-3px);
}

/* Quick Links & Contact - Side by Side */
.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.footer-links>div {
    min-width: 0;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links ul li {
    margin-bottom: 0.6rem;
}

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links ul li a:hover {
    color: var(--accent-gold);
    padding-left: 5px;
}

/* Contact Info */
.footer-contact li {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.footer-contact li i {
    color: var(--accent-gold);
    font-size: 0.9rem;
    flex-shrink: 0;
    /* Ensure icon roughly matches text line height visual */
    transform: translateY(2px);
}

.footer-contact li span {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Google Map */
.map-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin-top: 1rem;
}

.map-container iframe {
    display: block;
    filter: grayscale(20%) contrast(1.1);
    border: 0;
}

/* Copyright Bar */
.footer-bottom {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.25rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin: 0.2rem 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
}

.footer-credit {
    font-size: 0.8rem !important;
}

.footer-credit i {
    color: var(--accent-gold);
    margin: 0 0.25rem;
}

/* Responsive Footer */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }

    .footer-about {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    /* Mobile Reordering: Links â†’ Logo â†’ Map â†’ Copyright */
    .footer-about {
        order: 2;
    }

    .footer-links {
        order: 1;
        grid-template-columns: 1fr;
        /* Stack Quick Links and Contact vertically on mobile */
        gap: 1.5rem;
    }

    .footer-map {
        order: 3;
    }

    .footer-content {
        padding: 5rem 0 1rem;
        /* Increased mobile top padding for more space below wave */
    }

    .footer-logo {
        width: 140px;
        /* Larger on mobile for better visibility */
        margin-bottom: 0.5rem;
        display: block;
    }

    .footer-description,
    .footer-tagline {
        word-wrap: break-word;
        overflow-wrap: break-word;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .map-container iframe {
        height: 180px;
        /* Decreased size slightly */
        width: 100%;
        max-width: 100%;
    }

    /* Fix bottom white/gradient gap */
    .footer-bottom {
        margin-bottom: 0;
    }
}