/**
 * Government Polytechnic Korea Baikunthpur (C.G.)
 * Main stylesheet – premium government institution UI
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    --primary-dark: #0a2463;
    --primary-mid: #1e3a8a;
    --primary-light: #3b82f6;
    --accent-light: #60a5fa;
    --accent-sky: #93c5fd;
    --gradient-dark: linear-gradient(135deg, #0a2463 0%, #1e40af 50%, #2563eb 100%);
    --gradient-light: linear-gradient(135deg, #3b82f6 0%, #60a5fa 50%, #93c5fd 100%);
    /* Hero overlay (lower opacity to keep slider images clearer) */
    --gradient-hero: linear-gradient(135deg, rgba(10, 36, 99, 0.65) 0%, rgba(30, 58, 138, 0.55) 100%);
    --white: #ffffff;
    --off-white: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-600: #475569;
    --gray-800: #1e293b;
    --shadow-sm: 0 2px 8px rgba(10, 36, 99, 0.08);
    --shadow-md: 0 8px 24px rgba(10, 36, 99, 0.12);
    --shadow-lg: 0 16px 48px rgba(10, 36, 99, 0.16);
    --shadow-hover: 0 20px 40px rgba(37, 99, 235, 0.25);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Poppins', sans-serif;
    --navbar-height: 56px;
}

/* ==========================================================================
   Base
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.polykorea-body {
    font-family: var(--font);
    color: var(--gray-800);
    background: var(--off-white);
    overflow-x: hidden;
    line-height: 1.7;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

/* ==========================================================================
   Page Loader
   ========================================================================== */
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--gradient-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-spinner {
    text-align: center;
}

.loader-ring {
    width: 56px;
    height: 56px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin: 0 auto 1rem;
}

.loader-text {
    color: var(--white);
    font-weight: 600;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Top Header – white background
   ========================================================================== */
.top-header {
    background: var(--white);
    color: var(--primary-dark);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.top-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Logo + title row – left aligned, text beside logo */
.header-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0;
}

@media (min-width: 576px) {
    .header-brand {
        gap: 0.85rem;
        padding: 0.75rem 0;
    }
}

@media (min-width: 768px) {
    .header-brand {
        gap: 1.15rem;
        padding: 0.85rem 0;
    }
}

.header-logo-link {
    display: block;
    line-height: 0;
}

.college-logo {
    display: block;
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--white);
    transition: var(--transition);
}

@media (min-width: 576px) {
    .college-logo {
        width: 68px;
        height: 68px;
    }
}

@media (min-width: 768px) {
    .college-logo {
        width: 80px;
        height: 80px;
    }
}

.header-logo-link:hover .college-logo {
    transform: scale(1.03);
    filter: drop-shadow(0 4px 12px rgba(37, 99, 235, 0.25));
}

.header-brand-text {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.college-main-title {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.college-title-en {
    display: block;
    font-size: clamp(0.72rem, 2.6vw, 1.15rem);
    color: var(--primary-dark);
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.college-title-hi {
    display: block;
    font-size: clamp(0.66rem, 2.35vw, 0.95rem);
    font-weight: 600;
    color: var(--primary-mid);
    line-height: 1.35;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

@media (min-width: 768px) {
    .college-title-en {
        font-size: clamp(0.95rem, 1.8vw, 1.2rem);
        line-height: 1.25;
    }

    .college-title-hi {
        font-size: clamp(0.82rem, 1.55vw, 1rem);
        line-height: 1.3;
    }
}

.college-address {
    font-size: clamp(0.7rem, 1.6vw, 0.82rem);
    color: var(--gray-600);
    font-weight: 400;
    margin-top: 0.3rem !important;
    line-height: 1.45;
    max-width: 42rem;
}

.college-address i {
    color: var(--primary-light);
    margin-right: 0.25rem;
    flex-shrink: 0;
}

.footer-logo {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 4px;
}

/* ==========================================================================
   Navbar – blue gradient background
   ========================================================================== */
.main-navbar {
    background: var(--gradient-dark);
    box-shadow: var(--shadow-md);
    padding: 0;
    transition: var(--transition);
    border-bottom: none;
}

.main-navbar.navbar-scrolled {
    background: linear-gradient(135deg, #0a2463 0%, #1e3a8a 45%, #2563eb 100%);
    box-shadow: var(--shadow-lg);
}

.main-navbar .navbar-nav {
    gap: 0.15rem;
}

@media (min-width: 992px) {
    .main-navbar .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
    }

    .main-navbar .main-nav-list {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .main-navbar .nav-link-contact {
        margin-left: 0.75rem;
    }
}

.main-navbar .nav-link {
    color: rgba(255, 255, 255, 0.92) !important;
    font-weight: 500;
    font-size: 0.88rem;
    padding: 0.85rem 0.75rem !important;
    position: relative;
    white-space: nowrap;
}

.main-navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0.35rem;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
    transform: translateX(-50%);
}

.main-navbar .nav-link:hover::after,
.main-navbar .nav-link.active::after {
    width: 70%;
}

.main-navbar .nav-link:hover,
.main-navbar .nav-link.active {
    color: var(--white) !important;
}

.main-navbar .dropdown-toggle::after {
    border-top-color: rgba(255, 255, 255, 0.85);
}

/* Desktop: Bootstrap caret on dropdown toggles (not underline) */
@media (min-width: 992px) {
    .main-navbar .nav-link.dropdown-toggle::after {
        display: inline-block !important;
        position: static;
        width: auto;
        height: auto;
        background: none;
        transform: none;
        margin-left: 0.35em;
        vertical-align: 0.15em;
    }

    .main-navbar .nav-link.dropdown-toggle:hover::after,
    .main-navbar .nav-link.dropdown-toggle.active::after {
        width: auto;
    }
}

.main-navbar .nav-link-contact {
    background: var(--white);
    color: var(--primary-dark) !important;
    border-radius: 8px;
    margin-left: 0.5rem;
    padding: 0.6rem 1.2rem !important;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.main-navbar .nav-link-contact::after {
    display: none;
}

.main-navbar .nav-link-contact:hover {
    background: var(--accent-sky);
    color: var(--primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.main-navbar .nav-link-contact.active {
    background: var(--accent-sky);
    color: var(--primary-dark) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.main-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

/* Dropdown – glassmorphism */
.dropdown-menu-glass {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    margin-top: 0.25rem !important;
    animation: dropdownFade 0.3s ease;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu-glass .dropdown-item {
    border-radius: 8px;
    padding: 0.55rem 1rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--gray-800);
    transition: var(--transition);
}

.dropdown-menu-glass .dropdown-item:hover,
.dropdown-menu-glass .dropdown-item.active {
    background: var(--gradient-light);
    color: var(--white);
    transform: translateX(4px);
}

/* Sub-dropdown (dropend) */
.dropdown-submenu.dropend > .dropdown-menu {
    z-index: 1060;
}

@media (min-width: 992px) {
    .dropdown-submenu.dropend:hover > .dropdown-menu,
    .dropdown-submenu.dropend.show > .dropdown-menu {
        display: block;
        left: 100%;
        top: 0;
        margin-left: 0.15rem;
    }

    .dropdown-submenu.dropend {
        position: relative;
    }
}

.dropdown-submenu .dropdown-toggle::after {
    margin-left: auto;
    float: right;
    margin-top: 0.35rem;
}

/* Mobile – single full-width menu bar (toggle + dropdown in one block) */
@media (max-width: 991.98px) {
    .main-navbar .navbar-wrap {
        padding: 0;
        max-width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    /* Hide menu links until toggle opens */
    .main-navbar .navbar-collapse:not(.show) {
        display: none !important;
    }

    /* One menu button – full width, no second bar */
    .main-navbar .mobile-menu-btn {
        width: 100%;
        min-height: 56px;
        margin: 0;
        padding: 1rem 1.15rem;
        border: none;
        border-radius: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: transparent;
        box-shadow: none;
    }

    .main-navbar .mobile-menu-btn:focus {
        box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
    }

    .main-navbar .mobile-menu-btn[aria-expanded="true"] .mobile-menu-btn-arrow {
        transform: rotate(180deg);
    }

    .mobile-menu-btn-label {
        color: var(--white);
        font-size: 1rem;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
    }

    .mobile-menu-btn-label .bi-list {
        font-size: 1.35rem;
    }

    .mobile-menu-btn-arrow {
        color: var(--white);
        font-size: 1.1rem;
        transition: transform 0.3s ease;
    }

    /* Menu links – same navbar, no separate background strip */
    .main-navbar .navbar-collapse.show {
        width: 100%;
        max-height: 78vh;
        overflow-y: auto;
        background: transparent;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        padding: 0.5rem 1rem 1.5rem !important;
    }

    .main-navbar .navbar-nav {
        width: 100%;
        gap: 0.25rem;
    }

    .main-navbar .nav-link {
        padding: 1rem 1rem !important;
        font-size: 0.95rem;
        border-radius: 8px;
    }

    .main-navbar .nav-link:hover,
    .main-navbar .nav-link.active {
        background: rgba(255, 255, 255, 0.1);
    }

    /* Hide underline effect only; keep dropdown arrows */
    .main-navbar .nav-link:not(.dropdown-toggle)::after {
        display: none;
    }

    /* Dropdown parent items – clear chevron indicator */
    .main-navbar .nav-link.dropdown-toggle,
    .main-navbar .dropdown-menu .dropdown-item.dropdown-toggle {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        width: 100%;
    }

    .main-navbar .nav-link.dropdown-toggle::after,
    .main-navbar .dropdown-item.dropdown-toggle::after {
        display: none !important;
    }

    .main-navbar .nav-chevron {
        flex-shrink: 0;
        font-size: 1.1rem;
        opacity: 0.9;
        transition: transform 0.25s ease;
        margin-left: auto;
    }

    .main-navbar .nav-item.dropdown.show > .nav-link.dropdown-toggle .nav-chevron,
    .main-navbar .dropdown-submenu.show > .dropdown-item.dropdown-toggle .nav-chevron {
        transform: rotate(180deg);
    }

    .main-navbar .nav-item.dropdown > .nav-link.dropdown-toggle {
        font-weight: 600;
    }

    .main-navbar .nav-item.has-submenu > .nav-link.dropdown-toggle::before {
        content: '';
        display: inline-block;
        width: 4px;
        height: 1rem;
        background: var(--accent-sky);
        border-radius: 2px;
        margin-right: 0.15rem;
        flex-shrink: 0;
    }

    .main-navbar .dropdown-menu-glass:not(.show) {
        display: none !important;
    }

    .main-navbar .dropdown-menu-glass.show {
        display: block !important;
    }

    .main-navbar .dropdown-menu-glass {
        position: static !important;
        transform: none !important;
        width: 100%;
        margin-top: 0.35rem !important;
        margin-bottom: 0.35rem;
        border: none;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.12);
    }

    .main-navbar .dropdown-menu-glass .dropdown-item {
        color: var(--white);
        padding: 0.85rem 1rem;
    }

    .main-navbar .dropdown-menu-glass .dropdown-item:hover,
    .main-navbar .dropdown-menu-glass .dropdown-item.active {
        background: rgba(255, 255, 255, 0.2);
        color: var(--white);
    }

    .main-navbar .nav-link-contact {
        margin: 0.75rem 0 0;
        display: block;
        text-align: center;
        padding: 1rem 1.25rem !important;
    }

    .dropdown-submenu .submenu-nested {
        margin-left: 0.75rem;
        border-left: 2px solid rgba(255, 255, 255, 0.35);
        background: rgba(0, 0, 0, 0.15);
    }

    .dropdown-submenu.dropend.show > .dropdown-menu.submenu-nested {
        display: block !important;
    }
}

@media (min-width: 992px) {
    .main-navbar .navbar-wrap {
        padding-left: 3rem;
        padding-right: 3rem;
    }

    .main-navbar .mobile-menu-btn {
        display: none;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .main-navbar .nav-link:not(.nav-link-contact) {
        font-size: 0.82rem;
        padding: 0.85rem 0.55rem !important;
    }
}

@media (min-width: 1200px) {
    .main-navbar .nav-link:not(.nav-link-contact) {
        font-size: 0.88rem;
        padding: 0.85rem 0.75rem !important;
    }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    padding: 0 0 2rem;
    background: var(--white);
}

.hero-slider-wrap {
    width: 100%;
}

.hero-carousel .carousel-item {
    height: clamp(220px, 42vw, 520px);
    overflow: hidden;
    background: var(--gray-100);
}

.hero-carousel .carousel-inner {
    border-radius: 0;
}

.hero-carousel .carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
    display: block;
}

.hero-notice-wrap {
    margin-top: 1.25rem;
}

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
    width: 48px;
    height: 48px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    opacity: 1;
    margin: 0 1rem;
}

.hero-carousel .carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--white);
}

/* Notice Board */
.notice-board-card {
    background: var(--gradient-dark);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notice-board-below {
    height: auto;
    max-height: 320px;
    --notice-visible-rows: 5;
    --notice-row-height: 4.5rem;
    --notice-header-height: 3.5rem;
}

.notice-board-below .notice-scroll-wrap {
    max-height: calc(var(--notice-visible-rows) * var(--notice-row-height));
}

.notice-board-header {
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notice-board-header i {
    font-size: 1.5rem;
    color: var(--accent-sky);
}

.notice-board-header h3 {
    color: var(--white);
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
}

.notice-scroll-wrap {
    flex: 1;
    overflow: auto;
    position: relative;
    padding: 0.5rem 0;
    scrollbar-gutter: stable;
}

.notice-scroll-list {
    animation: none;
}

.notice-scroll-list:hover {
    animation-play-state: running;
}

/* Manual scrolling (no marquee) */
.notice-scroll-wrap::-webkit-scrollbar {
    width: 10px;
}
.notice-scroll-wrap::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
}
.notice-scroll-wrap::-webkit-scrollbar-thumb {
    background: rgba(147, 197, 253, 0.35);
    border-radius: 10px;
}
.notice-scroll-wrap::-webkit-scrollbar-thumb:hover {
    background: rgba(147, 197, 253, 0.55);
}

.notice-item {
    display: flex;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition);
}

.notice-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.notice-date {
    flex-shrink: 0;
    width: 52px;
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 0.4rem 0.3rem;
    color: var(--white);
}

.notice-date .day {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.notice-date .month {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    opacity: 0.85;
}

.notice-link {
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    display: flex;
    align-items: center;
}

.notice-link:hover {
    color: var(--accent-sky);
}

.notice-link i {
    margin-left: auto;
    opacity: 0;
    transition: var(--transition);
}

.notice-item:hover .notice-link i {
    opacity: 1;
    transform: translateX(4px);
}

/* ==========================================================================
   Quick Link Cards
   ========================================================================== */
.quick-links-section {
    padding: 2.5rem 0;
    background: var(--gray-100);
}

.quick-link-card {
    display: block;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.quick-link-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-light);
    opacity: 0;
    transition: var(--transition);
    z-index: 0;
}

.quick-link-card:hover::before {
    opacity: 1;
}

.quick-link-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.quick-link-card > * {
    position: relative;
    z-index: 1;
}

.quick-link-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    background: var(--gradient-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    transition: var(--transition);
}

.quick-link-card:hover .quick-link-icon {
    background: var(--white);
    color: var(--primary-mid);
    transform: scale(1.1) rotate(5deg);
}

.quick-link-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin: 0;
    transition: var(--transition);
}

.quick-link-card:hover h4 {
    color: var(--white);
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-section {
    padding: 4rem 0;
    background: var(--white);
}

.section-label {
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-light);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.about-section h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1.25rem;
    line-height: 1.3;
}

.about-section .lead-text {
    color: var(--gray-600);
    font-size: 1rem;
    text-align: justify;
}

.about-image-wrap {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-image-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 4px solid var(--accent-light);
    border-radius: var(--radius-lg);
    transform: translate(12px, 12px);
    z-index: -1;
}

.about-image-wrap img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    transition: var(--transition);
}

.about-image-wrap:hover img {
    transform: scale(1.03);
}

.btn-primary-custom {
    background: var(--gradient-dark);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-md);
}

.btn-primary-custom:hover {
    background: var(--gradient-light);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* ==========================================================================
   Stats / Features (home extras)
   ========================================================================== */
.stats-section {
    padding: 3rem 0;
    background: var(--gradient-dark);
    color: var(--white);
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-item i {
    font-size: 2.5rem;
    color: var(--accent-sky);
    margin-bottom: 0.75rem;
}

.stat-item h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-item p {
    font-size: 0.9rem;
    opacity: 0.85;
    margin: 0;
}

/* ==========================================================================
   Inner Pages
   ========================================================================== */
.page-banner {
    position: relative;
    padding: 3.5rem 0;
    background: var(--gradient-dark);
    overflow: hidden;
}

.page-banner-overlay {
    position: absolute;
    inset: 0;
    background: url('../images/banner-pattern.svg') repeat;
    opacity: 0.05;
}

.page-banner-title {
    color: var(--white);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.page-banner-title-institute {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.page-banner-title-en {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    line-height: 1.25;
}

.page-banner-title-hi {
    font-size: clamp(1.15rem, 2.8vw, 1.65rem);
    font-weight: 600;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.92);
}

.page-banner-subtitle {
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    font-weight: 500;
    letter-spacing: 0.02em;
    margin: 0 0 0.75rem;
}

.banner-breadcrumb {
    background: transparent;
    padding: 0;
}

.banner-breadcrumb .breadcrumb-item,
.banner-breadcrumb .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
}

.banner-breadcrumb .breadcrumb-item a:hover {
    color: var(--white);
}

.banner-breadcrumb .breadcrumb-item.active {
    color: var(--accent-sky);
}

.banner-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

.section-padding {
    padding: 3rem 0 4rem;
}

.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 2rem 2.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.content-placeholder {
    color: var(--gray-600);
}

.content-placeholder p {
    margin-bottom: 1rem;
}

/* Dynamic page content (College pages) */
.dynamic-page-content .page-content-body {
    color: var(--gray-600);
    text-align: justify;
    line-height: 1.8;
}

.dynamic-page-content .page-content-body p {
    margin-bottom: 1rem;
}

.dynamic-page-content .page-content-image img {
    max-height: 420px;
    object-fit: cover;
    width: 100%;
}

/* Principal message – centered portrait */
.principal-message-page .principal-photo-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 2rem;
    max-width: 100%;
}

.principal-message-page .principal-photo {
    display: block;
    width: min(100%, 280px);
    max-width: 360px;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center top;
    border-radius: var(--radius-lg);
    border: 3px solid var(--gray-200);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

@media (min-width: 576px) {
    .principal-message-page .principal-photo {
        width: min(100%, 320px);
    }
}

@media (min-width: 768px) {
    .principal-message-page .principal-photo {
        width: min(100%, 360px);
    }
}

.principal-message-page .page-content-body {
    max-width: 52rem;
    margin-inline: auto;
}

/* News & Events */
.news-events-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.news-events-filter-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-800);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.news-events-filter-btn:hover,
.news-events-filter-btn.active {
    background: var(--primary-mid);
    border-color: var(--primary-mid);
    color: var(--white);
}

.news-event-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.news-event-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.news-event-card-image-link {
    display: block;
    overflow: hidden;
}

.news-event-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.news-event-card:hover .news-event-card-image {
    transform: scale(1.03);
}

.news-event-card-body {
    padding: 1.15rem 1.25rem 1.35rem;
}

.news-event-type-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

.news-event-type-badge--news {
    background: rgba(71, 85, 105, 0.12);
    color: var(--gray-800);
}

.news-event-type-badge--event {
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary-mid);
}

.news-event-date {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.news-event-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.news-event-card-title a {
    color: var(--primary-dark);
}

.news-event-card-title a:hover {
    color: var(--primary-mid);
}

.news-event-card-summary {
    font-size: 0.92rem;
    color: var(--gray-600);
    line-height: 1.6;
}

.news-event-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.85rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-mid);
}

.news-event-detail-image img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
}

.committee-page .committee-pdf-viewer {
    max-width: 900px;
    margin-inline: auto;
    background: var(--gray-100);
}

.study-materials-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.study-materials-item {
    padding: 1rem 1.25rem;
}

.study-materials-list .list-group-item {
    border-color: var(--gray-200);
}

/* Staff members table */
.staff-table-wrap {
    width: 100%;
}

.staff-table-responsive {
    border: 1px solid var(--gray-200);
    overflow-x: auto;
}

.staff-table thead th {
    font-weight: 600;
    white-space: nowrap;
}

.staff-photo {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--accent-light);
    background: var(--white);
}

.staff-photo-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--primary-mid);
    font-size: 1.75rem;
    border: 2px solid var(--gray-200);
}

.staff-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.06);
}

@media (max-width: 575.98px) {
    .staff-table thead th,
    .staff-table tbody td {
        font-size: 0.88rem;
        padding: 0.65rem 0.5rem;
    }

    .staff-photo,
    .staff-photo-placeholder {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
}

/* Department page */
.department-page .department-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.department-page .department-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.department-section-title {
    margin-bottom: 1rem;
    color: var(--color-dark, #0f172a);
}

.department-nav .nav-link {
    color: var(--color-primary, #1e40af);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 999px;
    padding: 0.4rem 1rem;
    background: rgba(37, 99, 235, 0.08);
}

.department-nav .nav-link:hover,
.department-nav .nav-link:focus {
    background: rgba(37, 99, 235, 0.16);
    color: #1e3a8a;
}

/* Alumni registration form */
.alumni-registration-wrap {
    max-width: 720px;
    margin: 0 auto;
}

.alumni-form-card {
    padding: 1.75rem 1.5rem;
}

.alumni-registration-form .form-label {
    font-weight: 500;
    color: #334155;
    margin-bottom: 0.35rem;
}

/* Alumni members table */
.alumni-members-wrap {
    width: 100%;
}

.alumni-table-responsive {
    border: 1px solid var(--gray-200);
    overflow-x: auto;
}

.alumni-members-table thead th {
    font-weight: 600;
    white-space: nowrap;
}

.alumni-members-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.06);
}

/* Gallery page */
.gallery-page {
    width: 100%;
}

.gallery-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(255, 255, 255, 0.95));
    border-radius: 14px;
    border: 1px solid rgba(37, 99, 235, 0.12);
}

.gallery-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 999px;
    background: #fff;
    color: #1e40af;
    font-weight: 500;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.gallery-filter-btn:hover,
.gallery-filter-btn:focus {
    background: rgba(37, 99, 235, 0.1);
    outline: none;
}

.gallery-filter-btn.active {
    background: linear-gradient(135deg, #1e40af, #2563eb);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.gallery-filter-count {
    font-size: 0.75rem;
    opacity: 0.85;
    font-weight: 600;
}

.gallery-section {
    margin-bottom: 2.5rem;
}

.gallery-section-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #0f172a;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(37, 99, 235, 0.15);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.25rem;
    }
}

.gallery-grid-item {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-grid-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.2);
}

.gallery-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.gallery-grid-item:hover img {
    transform: scale(1.06);
}

.gallery-grid-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.15));
    color: #fff;
    opacity: 0;
    transition: opacity 0.25s ease;
    padding: 0.75rem;
    text-align: center;
}

.gallery-grid-item:hover .gallery-grid-overlay,
.gallery-grid-item:focus .gallery-grid-overlay {
    opacity: 1;
}

.gallery-grid-overlay i {
    font-size: 1.75rem;
}

.gallery-grid-caption {
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.3;
}

.gallery-video-heading {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.gallery-video-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .gallery-video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .gallery-video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gallery-video-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.gallery-video-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    padding: 0.85rem 1rem 0;
    color: var(--gray-800);
}

.gallery-video-embed {
    background: #000;
}

.gallery-video-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Library / Lab staff directory tables */
.library-librarians-wrap,
.lab-workshop-employees-wrap {
    margin-top: 0.5rem;
}

.library-photo-col,
.staff-directory-photo-col {
    width: 100px;
    min-width: 90px;
}

.library-librarian-photo,
.staff-directory-photo {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid var(--accent-light, #93c5fd);
    background: var(--white);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.library-librarians-table .staff-photo-placeholder,
.lab-workshop-employees-table .staff-photo-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    font-size: 2rem;
}

@media (max-width: 575.98px) {
    .library-librarian-photo,
    .staff-directory-photo,
    .library-librarians-table .staff-photo-placeholder,
    .lab-workshop-employees-table .staff-photo-placeholder {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .alumni-form-card {
        padding: 1.25rem 1rem;
    }

    .alumni-members-table thead th,
    .alumni-members-table tbody td {
        font-size: 0.85rem;
        padding: 0.6rem 0.45rem;
    }
}

.department-page .department-photo-col {
    width: 120px;
    min-width: 120px;
}

.department-faculty-photo {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid var(--accent-light, #93c5fd);
    background: var(--white);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}

.department-faculty-photo-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    border-radius: 12px;
    background: var(--gray-100);
    color: var(--primary-mid, #2563eb);
    font-size: 2.5rem;
    border: 2px solid var(--gray-200);
}

.department-page .staff-table tbody td:first-child {
    padding: 1rem 0.75rem;
    vertical-align: middle;
}

@media (max-width: 575.98px) {
    .department-page .department-photo-col {
        width: 88px;
        min-width: 88px;
    }

    .department-faculty-photo,
    .department-faculty-photo-placeholder {
        width: 72px;
        height: 72px;
    }

    .department-faculty-photo-placeholder {
        font-size: 2rem;
    }
}

/* Staff / faculty card grid */
.staff-card-grid {
    margin-top: 0.25rem;
}

.staff-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.staff-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.staff-card-photo-wrap {
    position: relative;
    aspect-ratio: 1;
    background: linear-gradient(145deg, var(--gray-100), var(--gray-200));
}

.staff-card-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.staff-card-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 200px;
    color: var(--primary-mid, #2563eb);
    font-size: 4rem;
    opacity: 0.55;
}

.staff-card-body {
    padding: 1rem 1.15rem 1.25rem;
    text-align: center;
}

.staff-card-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.35rem;
    line-height: 1.35;
}

.staff-card-designation {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary-mid, #2563eb);
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.staff-card-qualification {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 0;
    line-height: 1.45;
}

/* Former principals cards */
.former-principal-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.former-principal-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.former-principal-photo-wrap {
    position: relative;
    aspect-ratio: 1;
    background: linear-gradient(145deg, var(--gray-100), var(--gray-200));
}

.former-principal-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.former-principal-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 200px;
    color: var(--primary-mid, #2563eb);
    font-size: 4rem;
    opacity: 0.55;
}

.former-principal-body {
    padding: 1rem 1.15rem 1.25rem;
    text-align: center;
}

.former-principal-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.45rem;
    line-height: 1.35;
}

.former-principal-tenure {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 0;
    line-height: 1.45;
}

.department-page .staff-card-grid {
    margin-bottom: 0.5rem;
}

@media (max-width: 575.98px) {
    .staff-card-photo-placeholder {
        min-height: 160px;
        font-size: 3rem;
    }

    .staff-card-name {
        font-size: 0.98rem;
    }
}

/* Topper list – student cards */
.topper-list-page .topper-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.topper-list-page .topper-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.topper-card-photo-wrap {
    position: relative;
    aspect-ratio: 1;
    background: linear-gradient(145deg, var(--gray-100), var(--gray-200));
}

.topper-card-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.topper-card-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 200px;
    color: var(--primary-mid, #2563eb);
    font-size: 4rem;
    opacity: 0.55;
}

.topper-card-badge {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: var(--primary-mid, #2563eb);
    color: var(--white);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.topper-card-body {
    padding: 1rem 1.15rem 1.25rem;
    text-align: center;
}

.topper-card-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.topper-card-meta {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.topper-card-meta li + li {
    margin-top: 0.25rem;
}

/* Contact page – reuse icon list on light background */
.page-content .footer-contact li {
    color: var(--gray-800);
}

.page-content .footer-contact a {
    color: var(--primary-mid);
}

.page-content .footer-contact a:hover {
    color: var(--primary-light);
}

.contact-form .form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: var(--gradient-dark);
    color: rgba(255, 255, 255, 0.9);
    margin-top: auto;
}

.footer-top {
    padding: 3.5rem 0 2rem;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
}

.footer-heading {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent-light);
    border-radius: 2px;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--accent-sky);
    padding-left: 6px;
}

.footer-contact li {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    font-size: 0.9rem;
}

.footer-contact i {
    color: var(--accent-sky);
    flex-shrink: 0;
    margin-top: 3px;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.85);
}

.footer-contact a:hover {
    color: var(--white);
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--white);
    color: var(--primary-dark);
    transform: translateY(-4px);
}

.footer-bottom {
    padding: 1.25rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
}

.footer-credit {
    opacity: 0.7;
}

/* ==========================================================================
   Back to Top
   ========================================================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--gradient-dark);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 1000;
    cursor: pointer;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--gradient-light);
    transform: translateY(-4px);
}

/* ==========================================================================
   Animations
   ========================================================================== */
.fade-in-up {
    animation: fadeInUp 0.7s ease both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   404 Page
   ========================================================================== */
.error-page {
    text-align: center;
    padding: 3rem 0;
}

.error-code {
    font-size: 6rem;
    font-weight: 800;
    background: var(--gradient-light);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

/* ==========================================================================
   Academic Calendar
   ========================================================================== */
.academic-calendar-page .academic-calendar-intro {
    margin-bottom: 1.25rem;
    padding: 0.85rem 1.1rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(255, 255, 255, 0.9));
    border: 1px solid rgba(37, 99, 235, 0.12);
}

.academic-calendar-intro-text {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.55;
}

.academic-calendar-card {
    padding: 1.25rem 1rem 1.5rem;
    height: 100%;
}

@media (min-width: 992px) {
    .academic-calendar-card {
        padding: 1.35rem 1.35rem 1.65rem;
    }
}

.academic-calendar-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.academic-calendar-legend {
    font-size: 0.8rem;
    color: #64748b;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    display: inline-block;
}

/* FullCalendar – main area */
.academic-calendar-widget .fc {
    --fc-border-color: rgba(37, 99, 235, 0.12);
    --fc-button-bg-color: var(--color-primary, #1e40af);
    --fc-button-border-color: transparent;
    --fc-button-hover-bg-color: #1d4ed8;
    --fc-button-active-bg-color: #1e3a8a;
    --fc-today-bg-color: rgba(37, 99, 235, 0.1);
    --fc-page-bg-color: transparent;
    font-family: var(--font-family, 'Poppins', sans-serif);
}

.academic-calendar-widget .fc-toolbar {
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem !important;
}

.academic-calendar-widget .fc-toolbar-title {
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    font-weight: 600;
    color: var(--color-dark, #0f172a);
}

.academic-calendar-widget .fc-col-header-cell-cushion,
.academic-calendar-widget .fc-daygrid-day-number {
    font-weight: 600;
    color: #334155;
    font-size: 0.85rem;
}

.academic-calendar-widget .fc-daygrid-day-frame {
    min-height: 4.75rem;
}

@media (min-width: 1200px) {
    .academic-calendar-widget .fc-daygrid-day-frame {
        min-height: 5.75rem;
    }
}

.academic-calendar-widget .fc-daygrid-day-top {
    flex-direction: row;
    padding: 4px 6px 2px;
}

.academic-calendar-widget .fc-daygrid-event {
    margin-top: 2px;
    border-radius: 5px;
}

.academic-calendar-widget .fc-event {
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 2px 5px;
    cursor: pointer;
    line-height: 1.3;
}

.academic-calendar-widget .fc-daygrid-more-link {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary, #1e40af);
}

.academic-calendar-widget .fc-list-event-title {
    font-weight: 500;
}

/* Compact upcoming sidebar – not a heavy glass card */
.academic-upcoming-panel {
    background: #fff;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 14px;
    padding: 0.85rem 0.75rem;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
    height: 100%;
    max-height: none;
}

@media (min-width: 1200px) {
    .academic-upcoming-panel {
        position: sticky;
        top: 6.5rem;
        max-height: calc(100vh - 8rem);
        display: flex;
        flex-direction: column;
    }

    .academic-upcoming-list {
        overflow-y: auto;
        flex: 1;
        min-height: 0;
        padding-right: 2px;
    }

    .academic-upcoming-list::-webkit-scrollbar {
        width: 4px;
    }

    .academic-upcoming-list::-webkit-scrollbar-thumb {
        background: rgba(37, 99, 235, 0.25);
        border-radius: 4px;
    }
}

.academic-upcoming-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.academic-upcoming-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    color: #0f172a;
    line-height: 1.2;
}

.academic-upcoming-title i {
    color: var(--color-primary, #1e40af);
    font-size: 1rem;
}

.academic-upcoming-count {
    font-size: 0.7rem;
    font-weight: 600;
    color: #1e40af;
    background: rgba(37, 99, 235, 0.12);
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    line-height: 1.4;
}

.academic-upcoming-empty {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.45;
}

.academic-upcoming-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.academic-upcoming-item {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    padding: 0.5rem 0.4rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.academic-upcoming-item:hover,
.academic-upcoming-item:focus-visible {
    background: rgba(37, 99, 235, 0.08);
    outline: none;
}

.academic-upcoming-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 0.4rem;
    flex-shrink: 0;
}

.academic-upcoming-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.academic-upcoming-date {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 0.1rem;
}

/* Calendar event modal – must sit above site chrome when moved to body */
.calendar-event-modal {
    z-index: 1060;
}

.calendar-event-modal.show {
    display: block;
}

.modal-backdrop.show {
    z-index: 1055;
}

/* Large screens: slimmer sidebar list typography */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .academic-upcoming-name {
        font-size: 0.72rem;
    }
}

@media (max-width: 991.98px) {
    .academic-upcoming-panel {
        margin-top: 0.25rem;
    }

    .academic-upcoming-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    @media (max-width: 575.98px) {
        .academic-upcoming-list {
            grid-template-columns: 1fr;
        }
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 991.98px) {
    .hero-carousel .carousel-inner {
        height: auto;
    }

    .hero-carousel .carousel-item {
        height: auto;
        min-height: 0;
    }

    .hero-carousel .carousel-item img {
        height: auto;
        width: 100%;
        max-height: none;
        object-fit: contain;
        object-position: center;
    }

    .notice-board-below {
        --notice-visible-rows: 4;
        --notice-row-height: 4.25rem;
        --notice-header-height: 3.25rem;
        max-height: calc(var(--notice-header-height) + var(--notice-visible-rows) * var(--notice-row-height));
    }

    .notice-board-below .notice-scroll-wrap {
        min-height: calc(var(--notice-visible-rows) * var(--notice-row-height));
        max-height: calc(var(--notice-visible-rows) * var(--notice-row-height));
    }

    .notice-board-header {
        padding: 0.8rem 1rem;
    }

    .notice-board-header h3 {
        font-size: 1.05rem;
    }

    .notice-item {
        padding: 0.65rem 1rem;
        gap: 0.75rem;
        min-height: var(--notice-row-height, 4.25rem);
        align-items: center;
    }

    .notice-date {
        width: 46px;
        padding: 0.35rem 0.25rem;
    }

    .notice-date .day {
        font-size: 1.1rem;
    }

    .notice-link {
        font-size: 0.86rem;
        line-height: 1.35;
    }

    .notice-link i {
        opacity: 0.65;
        font-size: 0.85rem;
    }
}

@media (max-width: 575.98px) {
    .hero-carousel .carousel-item {
        height: auto;
        min-height: 0;
    }

    .hero-carousel .carousel-item img {
        height: auto;
        width: 100%;
        object-fit: contain;
        object-position: center;
    }

    .notice-board-below {
        --notice-visible-rows: 4;
        --notice-row-height: 4.5rem;
        --notice-header-height: 3rem;
        max-height: calc(var(--notice-header-height) + var(--notice-visible-rows) * var(--notice-row-height));
    }

    .notice-board-below .notice-scroll-wrap {
        min-height: calc(var(--notice-visible-rows) * var(--notice-row-height));
        max-height: calc(var(--notice-visible-rows) * var(--notice-row-height));
    }

    .notice-board-header {
        padding: 0.7rem 0.9rem;
    }

    .notice-board-header i {
        font-size: 1.25rem;
    }

    .notice-board-header h3 {
        font-size: 1rem;
    }

    .notice-item {
        padding: 0.55rem 0.9rem;
        gap: 0.65rem;
        min-height: var(--notice-row-height, 4.5rem);
        align-items: center;
    }

    .notice-date {
        width: 42px;
    }

    .notice-date .day {
        font-size: 1rem;
    }

    .notice-date .month {
        font-size: 0.6rem;
    }

    .notice-link {
        font-size: 0.82rem;
        align-items: flex-start;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .notice-link i {
        display: none;
    }

    .glass-card {
        padding: 1.5rem;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 42px;
        height: 42px;
    }
}
