/* Public site tokens — DB theme overrides --theme-* via base.html after this file */
:root {
    --theme-primary: #e31e24;
    --theme-secondary: #c41a20;
    --theme-success: #16a34a;
    --brand-red: var(--theme-primary);
    --brand-red-dark: #b91520;
    --brand-black: #0a0a0a;
    --primary-blue: var(--theme-primary);
    --secondary-blue: var(--theme-secondary);
    --accent-blue: #5c0a0f;
    --light-blue: #fff7f7;
    --notice-blue: var(--theme-primary);
    --white: #ffffff;
    --text-dark: #0a0a0a;
    --text-light: #4a4a4a;
    --border-color: #e8e8e8;
    --shadow: 0 2px 14px rgba(10, 10, 10, 0.08);
    --sidebar-width: 300px;
    --navbar-height: 52px;
    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

@supports (color: color-mix(in srgb, white 50%, black)) {
    :root {
        --brand-red-dark: color-mix(in srgb, var(--theme-primary) 82%, black);
        --accent-blue: color-mix(in srgb, var(--theme-primary) 72%, #000);
        --light-blue: color-mix(in srgb, var(--theme-primary) 7%, white);
    }
}

body[data-theme-effect="flat"] {
    --shadow: none;
}

body[data-theme-effect="elevated"] {
    --shadow: 0 12px 36px rgba(10, 10, 10, 0.14);
}

body[data-theme-font="inter"] {
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

body[data-theme-font="system"] {
    --font-body: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

body[data-theme-font="georgia"] {
    --font-body: Georgia, 'Times New Roman', serif;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}


/* Container Padding Override */
.container-fluid {
    padding-left: 50px;
    padding-right: 50px;
}

@media (max-width: 991.98px) {
    .container-fluid {
        padding-left: 30px;
        padding-right: 30px;
    }
}

@media (max-width: 767.98px) {
    .container-fluid {
        padding-left: 20px;
        padding-right: 20px;
    }
}


body {
    font-family: var(--font-body);
    line-height: 1.65;
    color: var(--text-dark);
    background-color: #fafafa;
    transition: padding-top 0.3s ease;
}

h1, h2, h3, h4, h5, h6,
.school-name,
.academy-title,
.footer-title,
.page-title,
.banner-title,
.notice-board-title,
.principal-section-title,
.section-header h2 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Body padding when navbar is sticky */
body.nav-sticky {
    padding-top: var(--navbar-height);
}

/* Header — light bar, logo-forward (matches Sanskar emblem) */
.main-header {
    background: var(--white);
    color: var(--brand-black);
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid var(--brand-red);
    box-shadow: 0 1px 0 rgba(10, 10, 10, 0.06);
}

.main-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="0.8" fill="rgba(227,30,36,0.04)"/><circle cx="80" cy="40" r="0.8" fill="rgba(10,10,10,0.03)"/><circle cx="40" cy="80" r="0.8" fill="rgba(227,30,36,0.04)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 1;
    z-index: 1;
    pointer-events: none;
}

.main-header .container-fluid {
    position: relative;
    z-index: 2;
}

.logo-container {
    flex-shrink: 0;
}

.school-logo {
    width: auto;
    height: 100px;
    max-width: 96px;
    border-radius: 6px;
    border: 2px solid rgba(227, 30, 36, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--white);
    padding: 10px;
    box-shadow: 0 4px 20px rgba(10, 10, 10, 0.08);
    object-fit: contain;
}

.school-logo:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 28px rgba(227, 30, 36, 0.15);
}

.school-info {
    color: var(--brand-black);
}

.school-name {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-shadow: none;
    color: var(--brand-black);
}

.school-subtitle {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 0.35rem;
}

.school-location {
    font-size: 0.88rem;
    color: var(--text-light);
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.important-notice {
    background: rgba(227, 30, 36, 0.08);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(227, 30, 36, 0.22);
}

.notice-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--brand-black);
}

.notice-divider {
    margin: 0 8px;
    opacity: 0.7;
}

.notice-text {
    font-size: 0.9rem;
    color: var(--brand-red);
    font-weight: 600;
}

.date-info {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-light);
}

.current-date {
    margin-bottom: 2px;
}

.nepali-date {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Navigation Styles — sticky handled by .site-nav-sticky in index-modern.css */
.main-nav {
    background: var(--white);
    box-shadow: var(--shadow);
    border-top: 3px solid var(--brand-red);
    transition: all 0.3s ease;
    min-height: var(--navbar-height);
}

/* Legacy .sticky class unused; fixed nav caused scroll gaps */
.main-nav.sticky {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

@keyframes slideDownNav {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.navbar-nav .nav-link {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 14px 0; /* Remove horizontal padding since gap handles spacing */
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap; /* Prevent text wrapping */
}


.navbar-nav {
    display: flex;
    justify-content: center; /* Center the nav items */
    width: 100%;
    gap: 30px; /* Equal spacing between all items */
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary-blue);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-blue);
    transform: translateY(-2px);
}

/* Medium desktops: prevent nav overflow / horizontal scroll */
@media (min-width: 992px) and (max-width: 1399.98px) {
    .main-nav .navbar-nav {
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 2px;
        column-gap: clamp(8px, 1.5vw, 24px);
    }

    .navbar-nav .nav-link {
        white-space: normal;
        text-align: center;
        font-size: clamp(0.88rem, 1.1vw, 1.05rem);
        padding: 10px 4px;
    }
}

@media (min-width: 1400px) {
    .navbar-nav {
        gap: clamp(18px, 2vw, 36px);
    }
}

.navbar-nav.me-auto {
    margin-right: 0 !important;
}


/* Dropdown Styles */
.dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 8px;
    margin-top: 8px;
    overflow: hidden;
}

@media (min-width: 1200px) {
    .main-nav .navbar-nav > .nav-item.dropdown > .dropdown-menu {
        margin-top: 0;
    }

    .main-nav .navbar-nav .nav-link.dropdown-toggle:hover {
        transform: none;
    }
}

.dropdown-item {
    padding: 12px 20px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.dropdown-item:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
    border-left-color: var(--primary-blue);
    transform: translateX(5px);
}

/* Mobile Logo and Title */
.mobile-logo {
    width: auto;
    height: 44px;
    max-width: 52px;
    border-radius: 4px;
    background: var(--white);
    padding: 4px;
    border: 1px solid rgba(227, 30, 36, 0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    object-fit: contain;
}

.sidebar-logo {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    margin-right: 15px;
    flex-shrink: 0;
    background: var(--white);
    padding: 4px;
    border: 1px solid rgba(227, 30, 36, 0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    object-fit: contain;
}

.mobile-school-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brand-black);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.navbar-toggler {
    border: none;
    padding: 8px;
    background: var(--primary-blue);
    border-radius: 6px;
    transition: all 0.3s ease;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler .hamburger-icon,
.navbar-toggler .close-icon {
    color: var(--white);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

/* Mobile Sidebar Overlay */
.mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Desktop Navigation (matches navbar-expand-xl) */
@media (min-width: 1200px) {
    .navbar-collapse {
        display: flex !important;
    }
    
    .sidebar-header {
        display: none;
    }
    
    .mobile-sidebar-overlay {
        display: none;
    }
}

/* Mobile Sidebar */
@media (max-width: 1199.98px) {
    .navbar-collapse {
        position: fixed;
        top: 0;
        left: calc(-1 * min(var(--sidebar-width), 92vw));
        width: min(var(--sidebar-width), 92vw);
        height: 100vh;
        height: 100dvh;
        background: var(--white);
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1050;
        transition: left 0.3s ease;
        overflow-y: auto;
        padding: 0;
        display: block;
        flex-direction: column;
        visibility: hidden;
    }
    
    .navbar-collapse.show {
        left: 0;
        visibility: visible;
    }
    
    /* Sidebar Header */
    .sidebar-header {
        background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
        color: var(--white);
        padding: 20px;
        display: flex;
        align-items: center;
        position: relative;
        min-height: 80px;
    }
    
    .sidebar-logo {
        width: 50px;
        height: 50px;
        border-radius: 6px;
        margin-right: 15px;
        flex-shrink: 0;
        object-fit: contain;
    }
    
    .sidebar-title {
        font-size: 1rem;
        font-weight: 600;
        margin: 0;
        line-height: 1.3;
    }
    
    .sidebar-close {
        position: absolute;
        top: 15px;
        right: 15px;
        background: transparent;
        border: none;
        color: var(--white);
        font-size: 1.5rem;
        padding: 5px;
        border-radius: 50%;
        width: 35px;
        height: 35px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        cursor: pointer;
    }
    
    .sidebar-close:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: rotate(90deg);
    }
    
    /* Sidebar Navigation */
    .navbar-nav {
        flex-direction: column;
        width: 100%;
        padding: 0;
        flex: 1;
        display: flex;
    }
    
    .navbar-nav > .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .navbar-nav > .nav-item.dropdown {
        border-bottom: none;
    }

    .navbar-nav .nav-dropdown-row {
        display: flex;
        align-items: stretch;
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .navbar-nav > .nav-item.dropdown.is-submenu-open .nav-dropdown-row,
    .navbar-nav > .nav-item.dropdown:has(.dropdown-menu.show) .nav-dropdown-row {
        background: #fff5f5;
        border-bottom-color: transparent;
    }
    
    .navbar-nav .nav-link {
        padding: 16px 22px;
        color: var(--text-dark);
        font-weight: 500;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
        position: relative;
        text-decoration: none;
    }

    .navbar-nav .nav-link--parent {
        flex: 1;
        min-width: 0;
        width: auto;
        border-bottom: none;
        justify-content: flex-start;
    }

    .navbar-nav .nav-link-label {
        flex: 0 1 auto;
        min-width: 0;
        text-align: left;
    }

    .navbar-nav .nav-dropdown-chevron--inline {
        display: none !important;
    }

    .navbar-nav .nav-submenu-toggle {
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 52px;
        min-height: 52px;
        padding: 0;
        margin: 0;
        border: none;
        border-left: 1px solid var(--border-color);
        background: #f1f5f9;
        color: #64748b;
        font-size: 0.8rem;
        cursor: pointer;
        transition: background-color 0.2s ease, color 0.2s ease, transform 0.25s ease;
    }

    .navbar-nav .nav-submenu-toggle:hover,
    .navbar-nav .nav-submenu-toggle:focus-visible {
        background: #e8eef5;
        color: var(--primary-blue);
        outline: none;
    }

    .navbar-nav .nav-submenu-toggle.expanded {
        transform: rotate(180deg);
        background: #fff5f5;
        color: var(--primary-blue);
        border-left-color: #f3d4d4;
    }

    .navbar-nav > .nav-item.dropdown.is-submenu-open .nav-link--parent,
    .navbar-nav > .nav-item.dropdown:has(.dropdown-menu.show) .nav-link--parent {
        color: var(--primary-blue);
    }
    
    .navbar-nav .nav-link::after {
        display: none !important;
        content: none !important;
    }
    
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link.active {
        background: var(--light-blue);
        color: var(--primary-blue);
        padding-left: 28px;
    }

    .navbar-nav .nav-link--parent:hover,
    .navbar-nav .nav-link--parent.active {
        padding-left: 28px;
    }

    .navbar-nav .nav-item-overflow .overflow-toggle {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .navbar-nav .nav-dropdown-chevron--static {
        transform: none !important;
    }
    
    /* Mobile Dropdown Menu */
    .navbar-nav .dropdown-menu {
        position: static;
        float: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        margin: 0;
        background: #f8fafc;
        display: none;
        padding: 0;
        border-left: 3px solid var(--primary-blue);
    }
    
    .navbar-nav .dropdown-menu.show {
        display: block;
        animation: slideDown 0.25s ease;
    }

    .navbar-nav .dropdown-menu > li {
        list-style: none;
        margin: 0;
    }
    
    .navbar-nav .dropdown-item {
        display: block;
        padding: 14px 22px 14px 28px;
        color: var(--text-dark);
        font-weight: 500;
        font-size: 0.95rem;
        border-bottom: 1px solid #e8ecef;
        transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
        position: relative;
        text-decoration: none;
    }
    
    .navbar-nav .dropdown-item::before {
        display: none;
    }
    
    .navbar-nav .dropdown-item:hover,
    .navbar-nav .dropdown-item:focus-visible {
        background: #ffffff;
        color: var(--primary-blue);
        padding-left: 34px;
        border-left: none;
    }

    .navbar-nav .dropdown-menu > li:last-child .dropdown-item {
        border-bottom: none;
    }
    
    /* Sidebar Bottom */
    .sidebar-bottom {
        margin-top: auto;
        padding: 20px;
        border-top: 1px solid var(--border-color);
        background: #f8f9fa;
        display: block;
    }
    
    .sidebar-bottom .nav-item {
        width: 100%;
        margin-bottom: 15px;
        border: none;
    }
    
    .sidebar-bottom .search-container {
        margin-bottom: 15px;
        width: 100%;
    }
    
    .sidebar-bottom .search-input {
        width: 100%;
    }
    
    .sidebar-bottom .lang-toggle {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .sidebar-bottom .social-icons {
        display: flex;
        justify-content: center;
        gap: 15px;
    }
}

/* Search Styles */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    border: 2px solid var(--border-color);
    border-radius: 25px;
    padding: 8px 40px 8px 16px;
    width: 200px;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(227, 30, 36, 0.25);
    outline: none;
}

.search-btn {
    position: absolute;
    right: 5px;
    border: none;
    background: var(--primary-blue);
    color: var(--white);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.search-btn:hover {
    background: var(--secondary-blue);
    transform: scale(1.1);
}

/* Language Toggle */
.lang-toggle {
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 44px;
    min-width: 52px;
}

.lang-toggle:hover {
    background: var(--secondary-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(227, 30, 36, 0.4);
}

/* Social Icons */
.social-icons {
    gap: 10px;
}

.social-link-navbar {
    width: 35px;
    height: 35px;
    background: var(--primary-blue);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link-navbar:hover {
    background: var(--secondary-blue);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(227, 30, 36, 0.4);
}

/* Notice Section */
.notice-section {
    background: var(--notice-blue);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.notice-tabs {
    display: flex;
    gap: 2px;
}

.notice-tab {
    background: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 6px 6px 0 0;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.3s ease;
    cursor: pointer;
}

.notice-tab.active {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
}

.notice-tab:hover:not(.active) {
    background: var(--border-color);
    color: var(--text-dark);
}

/* Hero Carousel Styles */
.hero-carousel {
    position: relative;
    height: min(72vh, 560px);
    min-height: 220px;
    overflow: visible;
    background: var(--primary-blue);
    margin-bottom: 0;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateX(50px);
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.carousel-slide.prev {
    transform: translateX(-50px);
    opacity: 0;
}

.slide-image {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(227, 30, 36, 0.3) 0%, rgba(227, 30, 36, 0.8) 100%);
}

.slide-content {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    z-index: 10;
    color: var(--white);
}

.slide-text {
    text-align: center;
    transition: all 0.6s ease;
    opacity: 1;
    transform: translateX(0);
}

.slide-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.slide-description {
    font-size: 1.2rem;
    margin-bottom: 0;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Carousel Navigation */
.carousel-navigation {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 20;
    pointer-events: none;
}

.carousel-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Carousel Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: var(--white);
    transform: scale(1.2);
}

/* Carousel Progress Bar */
.carousel-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 20;
}

.progress-bar {
    height: 100%;
    background: var(--white);
    width: 0%;
    transition: width linear;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .slide-title {
        font-size: 2rem;
    }
    
    .slide-description {
        font-size: 1rem;
    }
    
    .slide-content {
        bottom: 60px;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: max(24px, env(safe-area-inset-bottom, 0px));
    right: max(20px, env(safe-area-inset-right, 0px));
    width: 50px;
    height: 50px;
    min-width: 48px;
    min-height: 48px;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1020;
    box-shadow: 0 4px 15px rgba(227, 30, 36, 0.3);
    transform: translateY(100px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.scroll-to-top.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    animation: bounceIn 0.5s ease;
}

.scroll-to-top:hover {
    background: var(--secondary-blue);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 25px rgba(227, 30, 36, 0.4);
}

.scroll-to-top:active {
    transform: translateY(-1px) scale(1.05);
}

.scroll-to-top i {
    transition: transform 0.3s ease;
}

.scroll-to-top:hover i {
    transform: translateY(-2px);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(100px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05) translateY(0);
    }
    70% {
        transform: scale(0.9) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Main Content */
.main-content {
    padding: 60px 0;
    background: var(--white);
}

.page-title {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
    text-align: center;
    font-weight: 700;
}

.page-description {
    font-size: 1.1rem;
    color: var(--text-light);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Mobile Responsive */
@media (max-width: 767.98px) {
    .school-name {
        font-size: 1.4rem;
    }
    
    .school-subtitle {
        font-size: 0.9rem;
    }
    
    .school-location {
        font-size: 0.8rem;
    }
    
    .important-notice {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .date-info {
        font-size: 0.7rem;
    }
    
    .header-right {
        align-items: flex-end;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-description {
        font-size: 1rem;
    }
    
    .notice-tabs {
        flex-direction: column;
        gap: 5px;
    }
    
    .notice-tab {
        text-align: center;
        border-radius: 6px;
    }
    
    .mobile-school-name {
        font-size: 0.8rem;
        max-width: 150px;
    }
    
    .hero-carousel {
        height: min(58vh, 440px);
        min-height: 200px;
    }
    
    .slide-title {
        font-size: 2rem;
    }
    
    .slide-description {
        font-size: 1rem;
    }
    
    .slide-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .carousel-navigation {
        padding: 0 10px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

@media (max-width: 575.98px) {
    .school-info {
        display: none;
    }
    
    .header-right {
        display: none;
    }
    
    .main-header {
        padding: 10px 0;
    }

    .school-logo {
        width: 72px;
        height: 72px;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .main-content {
        padding: 40px 0;
    }
    
    .mobile-school-name {
        font-size: 0.75rem;
        max-width: 120px;
    }
    
    .hero-carousel {
        height: min(52vh, 380px);
        min-height: 180px;
    }
    
    .slide-title {
        font-size: 1.5rem;
    }
    
    .slide-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Language Toggle Animation */
.lang-toggle-animation {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Carousel dragging state */
.carousel-container.dragging {
    cursor: grabbing;
}

.carousel-container.dragging .carousel-slide {
    pointer-events: none;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-blue);
}

/* Transitions: scope to interactive elements (avoid global * for performance) */
a,
button,
.nav-link,
.dropdown-item,
.navbar-toggler,
.lang-toggle,
.btn-read-more,
.social-link,
.social-link-navbar,
.carousel-btn,
.indicator,
.scroll-to-top,
.sidebar-close,
.notice-board-tab {
    transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease,
        transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

/* Mobile sidebar scrollbar */
@media (max-width: 1199.98px) {
    .navbar-collapse::-webkit-scrollbar {
        width: 4px;
    }
    
    .navbar-collapse::-webkit-scrollbar-track {
        background: #f1f1f1;
    }
    
    .navbar-collapse::-webkit-scrollbar-thumb {
        background: var(--primary-blue);
        border-radius: 2px;
    }
    
    .navbar-collapse::-webkit-scrollbar-thumb:hover {
        background: var(--secondary-blue);
    }
}

/* Additional fixes for mobile navigation */
@media (max-width: 1199.98px) {
    /* Prevent body scroll when sidebar is open */
    body.sidebar-open {
        overflow: hidden;
    }
    
    /* Ensure hamburger button is always visible and clickable */
    .navbar-toggler {
        position: relative;
        z-index: 1060;
    }
    
    /* Make sure the mobile brand doesn't interfere with hamburger */
    .navbar-brand {
        flex: 1;
        margin-right: 1rem;
    }
}


/* About & Notice Section Styles */
.about-notice-section {
    padding: 60px 0;
    background: #f8f9fa;
    position: relative;
}

/* About Wrapper - Horizontal Layout */
.about-wrapper {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(227, 30, 36, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(227, 30, 36, 0.12);
}

.about-horizontal-layout {
    display: flex;
    align-items: stretch;
    min-height: 380px;
}

.about-image-container {
    position: relative;
    overflow: hidden;
    flex: 0 0 40%;
    min-height: 100%;
}

.about-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.about-wrapper:hover .about-main-img {
    transform: scale(1.05);
}

.category-badges {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.badge-item {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--white);
    text-transform: capitalize;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease;
}

.badge-item.education {
    background: rgba(227, 30, 36, 0.9); /* primary-blue */
}

.badge-item.culture {
    background: rgba(196, 40, 45, 0.9); /* secondary-blue */
}

.badge-item.transformation {
    background: rgba(92, 12, 18, 0.9); /* accent-blue */
}

.about-text-content {
    flex: 1;
    padding: 35px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.welcome-label {
    display: inline-block;
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.academy-title {
    font-size: 2.2rem;
    color: var(--primary-blue); /* Using primary blue */
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.academy-description {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 25px;
}

.btn-read-more {
    background: var(--primary-blue); /* primary-blue */
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(227, 30, 36, 0.3);
    align-self: flex-start;
}

.btn-read-more:hover {
    background: var(--accent-blue); /* accent-blue for hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(227, 30, 36, 0.4);
}

/* Notice Board Wrapper - Compact Version */
.notice-board-wrapper {
    background: var(--primary-blue);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(227, 30, 36, 0.3);
    height: 100%;
    display: flex;
    flex-direction: column;
    max-height: 520px;
}

.notice-board-header {
    background: var(--primary-blue);
    padding: 20px 25px 15px;
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

.notice-board-title {
    color: var(--white);
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    text-transform: none;
    letter-spacing: 0.01em;
}

.notice-board-tabs {
    display: flex;
    gap: 4px;
}

.notice-board-tab {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: capitalize;
}

.notice-board-tab:hover {
    background: rgba(255, 255, 255, 0.3);
}

.notice-board-tab.active {
    background: var(--white);
    color: var(--primary-blue);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.notice-list {
    background: var(--white);
    padding: 15px 20px;
    flex: 1;
    overflow-y: auto;
    max-height: 350px;
}

.notice-list-item {
    padding: 14px 0;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.notice-list-item:last-child {
    border-bottom: none;
}

.notice-list-item:hover {
    transform: translateX(5px);
    background: rgba(227, 30, 36, 0.03);
    padding-left: 10px;
    margin: 0 -10px;
    padding-right: 10px;
}

/* New layout for notice item content */
.notice-item-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.notice-details {
    flex: 1;
    min-width: 0; /* Allows text truncation */
}

.notice-meta-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
    min-width: 80px;
}

.notice-date-badge {
    margin-bottom: 0;
}

.notice-date-badge span {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
    white-space: nowrap;
}

.notice-heading {
    color: var(--primary-blue);
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.notice-list-item:hover .notice-heading {
    color: var(--accent-blue);
}

.notice-excerpt {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 6px 0 0 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notice-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.views-count {
    font-size: 0.75rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.views-count i {
    font-size: 0.8rem;
}

.important-tag {
    background: #ff9800;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.notice-board-footer {
    background: var(--white);
    padding: 15px 25px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
}

.view-all-notices {
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.view-all-notices:hover {
    color: var(--accent-blue);
    transform: translateX(5px);
}

/* Custom Scrollbar for Notice List */
.notice-list::-webkit-scrollbar {
    width: 5px;
}

.notice-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.notice-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.notice-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Loading/Empty/Error States */
.loading-spinner,
.empty-state,
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-light);
    text-align: center;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-state i,
.error-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--text-light);
}

.retry-btn {
    margin-top: 15px;
    padding: 8px 20px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.retry-btn:hover {
    background: var(--accent-blue);
}

/* Mobile Responsive for About Section */
@media (max-width: 991.98px) {
    .about-horizontal-layout {
        flex-direction: column;
    }
    
    .about-image-container {
        flex: 0 0 auto;
        height: 250px;
    }
    
    .notice-board-wrapper {
        margin-top: 30px;
        max-height: none;
    }
}

@media (max-width: 767.98px) {
    .about-text-content {
        padding: 25px 20px;
    }
    
    .academy-title {
        font-size: 1.8rem;
    }
    
    .academy-description {
        font-size: 0.9rem;
    }
    
    .notice-board-tabs {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .notice-board-tab {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .notice-list {
        max-height: 300px;
    }
    
    .notice-item-content {
        flex-direction: column;
        gap: 8px;
    }
    
    .notice-meta-right {
        align-items: flex-start;
        width: 100%;
    }
}

/* Animation for badges */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* News & Events Section Styles with Language Toggle */
.news-events-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

/* Language Toggle Styles */
.language-toggle-container {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    background: var(--white);
    border-radius: 25px;
    padding: 5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 2px solid #e9ecef;
}

.lang-toggle-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    min-width: 80px;
}

.lang-toggle-btn.active {
    background: linear-gradient(135deg, #e31e24, #c41a20);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(227, 30, 36, 0.3);
}

.lang-toggle-btn:not(.active):hover {
    background: #f8f9fa;
    color: #e31e24;
}

.section-title {
    font-size: 2.5rem;
    color: #e31e24;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: none;
    letter-spacing: 0.01em;
    transition: all 0.3s ease;
}

.section-divider {
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #e31e24, #c41a20);
    margin: 0 auto 20px;
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    transition: all 0.3s ease;
}

/* Tabs Navigation */
.news-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    background: var(--white);
    border-radius: 50px;
    padding: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.news-tab {
    background: transparent;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
}

.news-tab.active {
    background: linear-gradient(135deg, #e31e24, #c41a20);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(227, 30, 36, 0.4);
}

.news-tab:hover:not(.active) {
    color: #e31e24;
    transform: translateY(-2px);
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.news-item {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    position: relative;
}

.news-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.news-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-item:hover .news-image img {
    transform: scale(1.05);
}

.news-date {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255,255,255,0.9);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.date-day {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e31e24;
    display: block;
    line-height: 1;
}

.date-month {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    text-transform: uppercase;
    display: block;
}

.news-content {
    padding: 25px;
}

.news-title {
    font-size: 1.3rem;
    color: #e31e24;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
    transition: all 0.3s ease;
}

.news-subtitle {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.news-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.news-tag {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--white);
    text-transform: capitalize;
    transition: all 0.3s ease;
}

.news-tag.achievement {
    background: #4CAF50;
}

.news-tag.academic {
    background: #2196F3;
}

.news-tag.admission {
    background: #FF9800;
}

.news-tag.announcement {
    background: #9C27B0;
}

.news-tag.higher-secondary {
    background: #607D8B;
}

.news-excerpt {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.news-read-more {
    color: #e31e24;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.news-read-more:hover {
    color: #5c0a0f;
    gap: 10px;
}

/* Events Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.event-item {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}

.event-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.event-date {
    background: linear-gradient(135deg, #e31e24, #c41a20);
    color: var(--white);
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.event-day {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    display: block;
}

.event-month {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 5px 0;
    text-transform: uppercase;
    display: block;
}

.event-year {
    font-size: 0.9rem;
    opacity: 0.9;
    display: block;
}

.event-image {
    height: 180px;
    overflow: hidden;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.event-item:hover .event-image img {
    transform: scale(1.05);
}

.event-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.event-title {
    font-size: 1.2rem;
    color: #e31e24;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
    transition: all 0.3s ease;
}

.event-time, .event-location {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.event-time i, .event-location i {
    color: #e31e24;
    width: 16px;
}

.event-excerpt {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 15px 0;
    flex: 1;
    transition: all 0.3s ease;
}

.event-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.event-details, .event-register {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
}

.event-details {
    background: transparent;
    color: #e31e24;
    border: 2px solid #e31e24;
}

.event-details:hover {
    background: #e31e24;
    color: var(--white);
    transform: translateY(-2px);
}

.event-register {
    background: #e31e24;
    color: var(--white);
    border: 2px solid #e31e24;
}

.event-register:hover {
    background: #5c0a0f;
    border-color: #5c0a0f;
    transform: translateY(-2px);
}

/* View All Button */
.section-footer {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #e31e24, #c41a20);
    color: var(--white);
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 8px 25px rgba(227, 30, 36, 0.3);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.view-all-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.view-all-btn:hover::before {
    left: 100%;
}

.view-all-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(227, 30, 36, 0.4);
    gap: 20px;
}

.btn-text {
    z-index: 1;
    transition: all 0.3s ease;
}

.btn-icon {
    background: rgba(255,255,255,0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: all 0.3s ease;
}

.view-all-btn:hover .btn-icon {
    transform: rotate(15deg) scale(1.1);
}

.btn-arrow {
    z-index: 1;
    transition: all 0.3s ease;
}

.view-all-btn:hover .btn-arrow {
    transform: translateX(5px);
}

/* Language-specific styles */
[data-lang="np"] .section-title,
[data-lang="np"] .section-subtitle,
[data-lang="np"] .news-title,
[data-lang="np"] .news-subtitle,
[data-lang="np"] .news-excerpt,
[data-lang="np"] .event-title,
[data-lang="np"] .event-excerpt,
[data-lang="np"] .btn-text {
    font-family: 'Preeti', 'Mangal', 'Arial', sans-serif;
    line-height: 1.6;
}

[data-lang="np"] .news-tab,
[data-lang="np"] .news-read-more,
[data-lang="np"] .event-details,
[data-lang="np"] .event-register {
    font-family: 'Preeti', 'Mangal', 'Arial', sans-serif;
}

/* Mobile Responsive */
@media (max-width: 767.98px) {
    .news-events-section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .language-toggle-container {
        position: relative;
        margin-bottom: 20px;
        justify-content: center;
    }
    
    .news-tabs {
        flex-direction: column;
        border-radius: 15px;
        max-width: 300px;
    }
    
    .news-grid, .events-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .event-actions {
        flex-direction: column;
    }
    
    .view-all-btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

@media (max-width: 575.98px) {
    .section-title {
        font-size: 1.8rem;
    }
    
    .news-content, .event-content {
        padding: 20px;
    }
    
    .view-all-btn {
        width: 100%;
        justify-content: center;
    }
}



/* Principal's Message Section - Larger Card Version */
/* Principal Section - Isolated Styles */
.principal-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.principal-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="principalschool" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(227, 30, 36, 0.03)"/><circle cx="80" cy="40" r="1" fill="rgba(227, 30, 36, 0.03)"/><circle cx="40" cy="80" r="1" fill="rgba(227, 30, 36, 0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23principalschool)"/></svg>');
    z-index: 1;
}

.principal-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.principal-section-header {
    text-align: center;
    margin-bottom: 40px;
}

.principal-section-title {
    font-size: 2.2rem;
    color: #e31e24;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: none;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.principal-section-divider {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #e31e24, #c41a20);
    margin: 0 auto;
    border-radius: 2px;
}

.principal-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.principal-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
    overflow: hidden;
    display: flex;
    transition: all 0.3s ease;
    min-height: 400px;
}

.principal-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.18);
}

.principal-image-container {
    flex: 0 0 38%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.principal-image {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    transition: all 0.4s ease;
    border: 5px solid #e31e24;
}

.principal-image:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
}

.principal-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.6s ease;
}

.principal-image:hover .principal-photo {
    transform: scale(1.1);
}

.principal-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(227, 30, 36, 0.08), rgba(196, 40, 45, 0.03));
    z-index: 1;
    border-radius: 50%;
}

.principal-badge {
    margin-top: 25px;
    background: linear-gradient(135deg, #e31e24, #c41a20);
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 2;
    box-shadow: 0 5px 15px rgba(227, 30, 36, 0.4);
    text-align: center;
}

.principal-message-content {
    flex: 1;
    padding: 35px;
    display: flex;
    flex-direction: column;
}

.principal-message-header {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.principal-greeting-icon {
    background: linear-gradient(135deg, #e31e24, #c41a20);
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(227, 30, 36, 0.3);
    font-size: 1.1rem;
}

.principal-greeting-title {
    font-size: 1.3rem;
    color: #e31e24;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    flex: 1;
}

.principal-message-body {
    margin-bottom: 25px;
    flex: 1;
}

.principal-message-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #333333;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.principal-message-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 25px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.principal-signature {
    flex: 1;
}

.principal-signature-line {
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, #e31e24, transparent);
    margin-bottom: 10px;
}

.principal-name {
    font-size: 1.4rem;
    color: #e31e24;
    font-weight: 700;
    margin: 0 0 5px 0;
}

.principal-designation {
    color: #666666;
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0;
}

.principal-read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    color: #e31e24;
    padding: 10px 22px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid #e31e24;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.principal-read-more-btn:hover {
    background: #e31e24;
    color: #ffffff;
    transform: translateX(6px);
    box-shadow: 0 5px 15px rgba(227, 30, 36, 0.4);
}

.principal-btn-icon {
    transition: transform 0.3s ease;
}

.principal-read-more-btn:hover .principal-btn-icon {
    transform: translateX(3px);
}

/* Principal Popup Styles */
.principal-image-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.principal-image-popup.active {
    display: flex;
    opacity: 1;
}

.principal-popup-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.principal-popup-image {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.principal-close-popup {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 40px;
    height: 40px;
    background: #e31e24;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid white;
}

.principal-close-popup:hover {
    background: #c41a20;
    transform: scale(1.1);
}

/* Principal Responsive Design */
@media (max-width: 991.98px) {
    .principal-card {
        flex-direction: column;
        min-height: auto;
    }
    
    .principal-image-container {
        flex: 0 0 auto;
        padding: 40px 30px 20px;
    }
    
    .principal-image {
        width: 240px;
        height: 240px;
    }
    
    .principal-message-content {
        padding: 30px 25px;
    }
}

@media (max-width: 767.98px) {
    .principal-section-title {
        font-size: 1.8rem;
    }
    
    .principal-image {
        width: 200px;
        height: 200px;
    }
    
    .principal-message-content {
        padding: 25px 20px;
    }
    
    .principal-greeting-title {
        font-size: 1.1rem;
    }
    
    .principal-message-text {
        font-size: 0.95rem;
        -webkit-line-clamp: 3;
    }
    
    .principal-message-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .principal-read-more-btn {
        width: 100%;
        justify-content: center;
    }
    
    .principal-close-popup {
        top: -30px;
        right: -10px;
    }
}

@media (max-width: 575.98px) {
    .principal-section {
        padding: 40px 0;
    }
    
    .principal-section-header {
        margin-bottom: 30px;
    }
    
    .principal-section-title {
        font-size: 1.5rem;
    }
    
    .principal-image {
        width: 180px;
        height: 180px;
    }
    
    .principal-greeting-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .principal-name {
        font-size: 1.2rem;
    }
}
/* Language Toggle Styles */
.language-toggle-container {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    background: var(--white);
    border-radius: 25px;
    padding: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    max-width: 220px;
    margin-left: auto;
    margin-right: auto;
    border: 2px solid #e9ecef;
}

.lang-toggle-btn {
    background: transparent;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    min-width: 85px;
}

.lang-toggle-btn.active {
    background: linear-gradient(135deg, #e31e24, #c41a20);
    color: var(--white);
    box-shadow: 0 3px 10px rgba(227, 30, 36, 0.3);
}

.lang-toggle-btn:not(.active):hover {
    background: #f8f9fa;
    color: #e31e24;
}

/* Language-specific styles */
[data-lang="np"] .section-title,
[data-lang="np"] .greeting-title,
[data-lang="np"] .message-text,
[data-lang="np"] .btn-text,
[data-lang="np"] .principal-designation,
[data-lang="np"] .badge-text {
    font-family: 'Preeti', 'Mangal', 'Arial', sans-serif;
    line-height: 1.6;
}

[data-lang="np"] .message-text {
    font-size: 1.05rem;
}

[data-lang="np"] .greeting-title {
    font-size: 1.4rem;
}

/* Responsive Design */
@media (max-width: 1199.98px) {
    .principal-content {
        max-width: 1100px;
    }
    
    .principal-card {
        min-height: 480px;
    }
}

@media (max-width: 991.98px) {
    .principal-section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2.4rem;
    }
    
    .principal-card {
        flex-direction: column;
        min-height: auto;
        margin: 0 15px;
    }
    
    .principal-image-container {
        flex: 0 0 auto;
        height: 350px;
    }
    
    .message-content {
        padding: 35px;
    }
    
    .message-header {
        flex-direction: column;
        text-align: center;
        gap: 18px;
    }
    
    .greeting-icon {
        align-self: center;
    }
    
    .message-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 25px;
    }
    
    .principal-signature {
        text-align: center;
    }
    
    .signature-line {
        margin: 0 auto 12px;
    }
    
    .principal-badge {
        bottom: 25px;
        left: 25px;
    }
}

@media (max-width: 767.98px) {
    .principal-section {
        padding: 50px 0;
    }
    
    .section-header {
        margin-bottom: 50px;
    }
    
    .section-title {
        font-size: 2.1rem;
    }
    
    .message-content {
        padding: 30px;
    }
    
    .greeting-title {
        font-size: 1.4rem;
    }
    
    .message-text {
        font-size: 1.05rem;
    }
    
    .principal-name {
        font-size: 1.4rem;
    }
    
    .greeting-icon {
        width: 55px;
        height: 55px;
        font-size: 1.2rem;
    }
    
    .read-more-btn {
        padding: 10px 22px;
        font-size: 1rem;
    }
}

@media (max-width: 575.98px) {
    .principal-section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 1.9rem;
    }
    
    .principal-image-container {
        height: 300px;
    }
    
    .message-content {
        padding: 25px;
    }
    
    .greeting-title {
        font-size: 1.3rem;
    }
    
    .message-text {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .principal-name {
        font-size: 1.3rem;
    }
    
    .principal-badge {
        bottom: 20px;
        left: 20px;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .language-toggle-container {
        max-width: 200px;
    }
    
    .lang-toggle-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
        min-width: 80px;
    }
}

@media (max-width: 400px) {
    .principal-content {
        padding: 0 15px;
    }
    
    .principal-card {
        margin: 0 10px;
    }
    
    .message-content {
        padding: 20px;
    }
    
    .section-title {
        font-size: 1.7rem;
    }
    
    .greeting-title {
        font-size: 1.2rem;
    }
    
    .message-text {
        font-size: 0.95rem;
    }
    
    .greeting-icon {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Print Styles */
@media print {
    .principal-section {
        background: white !important;
        padding: 50px 0 !important;
    }
    
    .principal-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        min-height: auto !important;
    }
    
    .language-toggle-container {
        display: none !important;
    }
    
    .read-more-btn {
        display: none !important;
    }
    
    .image-overlay {
        display: none !important;
    }
}

/* Latest Blog Section */
.latest-blog-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

.latest-blog-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="blog" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(227, 30, 36, 0.03)"/><circle cx="80" cy="40" r="1" fill="rgba(227, 30, 36, 0.03)"/><circle cx="40" cy="80" r="1" fill="rgba(227, 30, 36, 0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23blog)"/></svg>');
    z-index: 1;
}

.latest-blog-section .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.blog-section-header {
    text-align: center;
    margin-bottom: 60px;
}

.blog-section-title {
    font-size: 2.8rem;
    color: var(--primary-blue);
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: none;
    letter-spacing: 0.01em;
    position: relative;
}

.blog-section-divider {
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
    margin: 0 auto;
    border-radius: 2px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.blog-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(227, 30, 36, 0.2);
}


.blog-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    position: relative;
    background: var(--white);
    display: block;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top; /* Changed to focus on top portion */
    transition: transform 0.5s ease;
    display: block;
}

.blog-card:hover .blog-image img {
    transform: scale(1.08);
}

.blog-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-date {
    font-size: 0.95rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 12px;
    display: block;
}

.blog-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.4;
    min-height: 60px;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-title {
    color: var(--primary-blue);
}

.blog-excerpt {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    transition: color 0.3s ease;
}

.blog-link {
    width: 45px;
    height: 45px;
    background: var(--secondary-blue);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.3s ease;
    align-self: flex-start;
    text-decoration: none;
}

.blog-link:hover {
    background: var(--primary-blue);
    transform: translateX(8px);
    box-shadow: 0 4px 15px rgba(227, 30, 36, 0.4);
}

.blog-link svg {
    width: 20px;
    height: 20px;
}

/* Language Toggle for Blog */
.blog-language-toggle {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    background: var(--white);
    border-radius: 25px;
    padding: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    max-width: 220px;
    margin-left: auto;
    margin-right: auto;
    border: 2px solid #e9ecef;
}

.blog-lang-btn {
    background: transparent;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    min-width: 85px;
    color: var(--text-dark);
}

.blog-lang-btn.active {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--white);
    box-shadow: 0 3px 10px rgba(227, 30, 36, 0.3);
}

.blog-lang-btn:not(.active):hover {
    background: #f8f9fa;
    color: var(--primary-blue);
}

.view-all-btn {
    transition: all 0.3s ease !important;
}

.view-all-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(227, 30, 36, 0.4) !important;
}

/* Language-specific styles */
[data-lang="np"] .blog-section-title,
[data-lang="np"] .blog-title,
[data-lang="np"] .blog-excerpt {
    font-family: 'Preeti', 'Mangal', 'Arial', sans-serif;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

@media (max-width: 991.98px) {
    .latest-blog-section {
        padding: 60px 0;
    }
    
    .blog-section-title {
        font-size: 2.4rem;
    }
}

@media (max-width: 768px) {
    .latest-blog-section {
        padding: 60px 0;
    }

    .blog-section-header {
        margin-bottom: 50px;
    }

    .blog-section-title {
        font-size: 2rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .blog-image {
        height: 240px;
    }

    .blog-content {
        padding: 25px;
    }

    .blog-title {
        font-size: 1.25rem;
        min-height: auto;
    }
}

@media (max-width: 575.98px) {
    .latest-blog-section {
        padding: 40px 0;
    }

    .blog-section-title {
        font-size: 1.9rem;
    }

    .blog-card {
        border-radius: 15px;
    }

    .blog-image {
        height: 200px;
    }

    .blog-content {
        padding: 20px;
    }

    .blog-title {
        font-size: 1.15rem;
    }

    .blog-excerpt {
        font-size: 0.95rem;
    }

    .blog-language-toggle {
        max-width: 200px;
    }

    .blog-lang-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
        min-width: 80px;
    }
}

@media (max-width: 400px) {
    .blog-section-title {
        font-size: 1.7rem;
    }
}



/* Stats Section Styles */
.stats-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="stats" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(227, 30, 36, 0.03)"/><circle cx="80" cy="40" r="1" fill="rgba(227, 30, 36, 0.03)"/><circle cx="40" cy="80" r="1" fill="rgba(227, 30, 36, 0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23stats)"/></svg>');
    z-index: 1;
}

.stats-section .container-fluid {
    position: relative;
    z-index: 2;
}

/* Image Container */
.stats-image-container {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(227, 30, 36, 0.15);
    transition: all 0.4s ease;
}

.stats-image-container:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(227, 30, 36, 0.25);
}

.stats-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.stats-image-container:hover .stats-image {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(227, 30, 36, 0.1), rgba(196, 40, 45, 0.05));
    z-index: 1;
}

.stats-badge {
    position: absolute;
    top: 25px;
    left: 25px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--white);
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    z-index: 2;
    box-shadow: 0 6px 20px rgba(227, 30, 36, 0.4);
}

/* Stats Content */
.stats-content {
    padding: 40px;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin-left: 20px;
    transition: all 0.3s ease;
}

.stats-content:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.stats-header {
    margin-bottom: 40px;
    text-align: left;
}

.stats-label {
    display: inline-block;
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stats-title {
    font-size: 2.2rem;
    color: var(--primary-blue);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.stats-description {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.stat-item {
    text-align: center;
    padding: 25px 15px;
    border-radius: 12px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-item:hover::before {
    transform: scaleX(1);
}

.stat-item:hover {
    background: var(--white);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(227, 30, 36, 0.15);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 8px;
    line-height: 1;
    transition: all 0.3s ease;
}

.stat-item:hover .stat-number {
    color: var(--secondary-blue);
    transform: scale(1.05);
}

.stat-label {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.3s ease;
}

.stat-item:hover .stat-label {
    color: var(--text-dark);
}

/* Stats Footer */
.stats-footer {
    text-align: left;
}

.stats-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    color: var(--primary-blue);
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    border: 2px solid var(--primary-blue);
    transition: all 0.3s ease;
}

.stats-cta-btn:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateX(8px);
    box-shadow: 0 6px 20px rgba(227, 30, 36, 0.4);
}

.btn-icon {
    transition: transform 0.3s ease;
}

.stats-cta-btn:hover .btn-icon {
    transform: translateX(4px);
}

/* Language-specific styles */
[data-lang="np"] .stats-label,
[data-lang="np"] .stats-title,
[data-lang="np"] .stats-description,
[data-lang="np"] .stat-label,
[data-lang="np"] .btn-text,
[data-lang="np"] .badge-text {
    font-family: 'Preeti', 'Mangal', 'Arial', sans-serif;
    line-height: 1.6;
}

[data-lang="np"] .stats-title {
    font-size: 2rem;
}

[data-lang="np"] .stats-description {
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 1199.98px) {
    .stats-content {
        margin-left: 0;
        padding: 35px;
    }
    
    .stats-title {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 991.98px) {
    .stats-section {
        padding: 60px 0;
    }
    
    .stats-content {
        margin-top: 30px;
        padding: 30px;
    }
    
    .stats-title {
        font-size: 1.8rem;
    }
    
    .stats-grid {
        gap: 20px;
    }
    
    .stat-item {
        padding: 20px 10px;
    }
    
    .stat-number {
        font-size: 2.2rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
}

@media (max-width: 767.98px) {
    .stats-section {
        padding: 50px 0;
    }
    
    .stats-content {
        padding: 25px;
    }
    
    .stats-title {
        font-size: 1.6rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-item {
        padding: 25px 15px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stats-image {
        height: 350px;
    }
    
    .stats-badge {
        top: 20px;
        left: 20px;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 575.98px) {
    .stats-section {
        padding: 40px 0;
    }
    
    .stats-content {
        padding: 20px;
    }
    
    .stats-title {
        font-size: 1.5rem;
    }
    
    .stats-description {
        font-size: 0.9rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stats-cta-btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
    
    .stats-image {
        height: 300px;
    }
}

/* Animation Classes */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-number.animated {
    animation: countUp 0.8s ease-out;
}

/* Print Styles */
@media print {
    .stats-section {
        background: white !important;
        padding: 50px 0 !important;
    }
    
    .stats-content {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .stats-image-container {
        box-shadow: none !important;
    }
    
    .stats-cta-btn {
        display: none !important;
    }
    
    .image-overlay {
        display: none !important;
    }
}


/* footer.css */
/* Footer Styles */
.main-footer {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--white);
    padding: 60px 0 0;
    position: relative;
    overflow: hidden;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="footer" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23footer)"/></svg>');
    z-index: 1;
}

.footer-content {
    position: relative;
    z-index: 2;
}

/* Footer Sections */
.footer-section {
    margin-bottom: 30px;
}

.footer-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--white);
    position: relative;
    padding-bottom: 12px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
}

/* About Section */
.footer-about .academy-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--white);
}

.director-info {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 15px;
    opacity: 0.9;
}

.about-description {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.8;
    margin-bottom: 0;
}

/* Links Section */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    position: relative;
    padding-left: 0;
}

.footer-links a::before {
    content: '›';
    margin-right: 10px;
    transition: transform 0.3s ease;
    color: var(--white);
}

.footer-links a:hover {
    color: var(--white);
    transform: translateX(8px);
}

.footer-links a:hover::before {
    transform: translateX(5px);
}

/* Contact Info */
.contact-info {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-info li {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    color: rgba(255, 255, 255, 0.8);
}

.contact-info i {
    width: 20px;
    margin-right: 15px;
    margin-top: 2px;
    color: var(--white);
    font-size: 1rem;
}

.contact-info a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    flex: 1;
}

.contact-info a:hover {
    color: var(--white);
    transform: translateX(5px);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-link {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: var(--white);
    color: var(--primary-blue);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--white);
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 25px 0;
    margin-top: 40px;
    position: relative;
    z-index: 2;
}

.copyright, .powered-by {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.powered-by {
    font-weight: 500;
}

/* Language-specific styles */
[data-lang="np"] .footer-title,
[data-lang="np"] .academy-name,
[data-lang="np"] .director-info,
[data-lang="np"] .about-description,
[data-lang="np"] .footer-links a,
[data-lang="np"] .contact-info span,
[data-lang="np"] .copyright,
[data-lang="np"] .powered-by {
    font-family: 'Preeti', 'Mangal', 'Arial', sans-serif;
    line-height: 1.6;
}

[data-lang="np"] .footer-title {
    font-size: 1.2rem;
}

[data-lang="np"] .academy-name {
    font-size: 1.4rem;
}

[data-lang="np"] .about-description {
    font-size: 0.9rem;
}

[data-lang="np"] .footer-links a {
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .main-footer {
        padding: 50px 0 0;
    }
    
    .footer-section {
        margin-bottom: 35px;
    }
    
    .footer-title {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
    
    .footer-about .academy-name {
        font-size: 1.3rem;
    }
    
    .social-links {
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .main-footer {
        padding: 40px 0 0;
    }
    
    .footer-title {
        font-size: 1.1rem;
    }
    
    .footer-about .academy-name {
        font-size: 1.2rem;
    }
    
    .footer-bottom {
        text-align: center;
        margin-top: 30px;
    }
    
    .footer-bottom .row > div {
        margin-bottom: 10px;
    }
    
    .footer-bottom .row > div:last-child {
        margin-bottom: 0;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 575.98px) {
    .main-footer {
        padding: 30px 0 0;
    }
    
    .footer-title {
        font-size: 1.1rem;
        padding-bottom: 10px;
    }
    
    .footer-title::after {
        width: 40px;
    }
    
    .footer-about .academy-name {
        font-size: 1.1rem;
    }
    
    .contact-info li {
        margin-bottom: 15px;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }
    
    .copyright, .powered-by {
        font-size: 0.85rem;
    }
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer-section {
    animation: fadeInUp 0.6s ease-out;
}

.footer-section:nth-child(1) { animation-delay: 0.1s; }
.footer-section:nth-child(2) { animation-delay: 0.2s; }
.footer-section:nth-child(3) { animation-delay: 0.3s; }
.footer-section:nth-child(4) { animation-delay: 0.4s; }

/* Print Styles */
@media print {
    .main-footer {
        background: #e31e24 !important;
        color: #000 !important;
        padding: 30px 0 0 !important;
    }
    
    .social-links {
        display: none !important;
    }
    
    .footer-title::after {
        background: #000 !important;
    }
}



/* Hide the main header on mobile screens */
@media (max-width: 991.98px) {
    .main-header {
        display: none !important;
    }
}

/* Mobile Navigation - Reduced Gap */
@media (max-width: 991.98px) {
    .navbar-nav {
        gap: 8px; /* Reduced from 30px to 8px for mobile */
    }
    
    .navbar-nav .nav-link {
        padding: 12px 25px; /* Slightly reduced vertical padding */
    }
}



/* ===================================
   POPUP STYLES
   =================================== */

/* Popup Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    padding: 20px;
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Popup Container */
.popup-container {
    background: var(--white);
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.8) translateY(50px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.popup-overlay.show .popup-container {
    transform: scale(1) translateY(0);
}

/* Close Button */
.popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: var(--text-dark);
    font-size: 1.3rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.popup-close:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: rotate(90deg) scale(1.1);
}

/* Popup Content Wrapper */
.popup-content-wrapper {
    max-height: calc(90vh - 80px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Scrollbar Styles */
.popup-content-wrapper::-webkit-scrollbar {
    width: 6px;
}

.popup-content-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.popup-content-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 3px;
}

/* Popup Content */
.popup-content {
    animation: fadeInContent 0.6s ease 0.2s both;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Popup Image */
.popup-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
}

.popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.popup-container:hover .popup-image img {
    transform: scale(1.05);
}

/* Popup Body */
.popup-body {
    padding: 40px;
}

/* Popup Icon (for notice type) */
.popup-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 2.5rem;
    color: var(--white);
    box-shadow: 0 10px 30px rgba(227, 30, 36, 0.3);
}

/* Popup Title */
.popup-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 15px;
    line-height: 1.3;
}

/* Popup Description */
.popup-description {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Popup Features List */
.popup-features {
    list-style: none;
    padding: 0;
    margin: 25px 0;
}

.popup-features li {
    font-size: 1rem;
    color: var(--text-dark);
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.popup-features li:last-child {
    border-bottom: none;
}

.popup-features li:hover {
    color: var(--primary-blue);
    padding-left: 10px;
}

/* Event Date Badge */
.event-date-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--white);
    padding: 15px 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 6px 20px rgba(227, 30, 36, 0.3);
}

.event-date-badge .date-day {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.event-date-badge .date-month {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 5px;
    text-transform: uppercase;
}

/* Event Details */
.event-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin: 25px 0;
}

.event-detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 1rem;
    color: var(--text-dark);
}

.event-detail-item i {
    color: var(--primary-blue);
    width: 20px;
    font-size: 1.1rem;
}

/* Notice Details */
.notice-details {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    /* margin: 25px 0; */
}

.notice-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.notice-item:last-child {
    border-bottom: none;
}

.notice-item strong {
    color: var(--primary-blue);
    min-width: 80px;
}

/* Achievement Badge */
.achievement-badge {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #FF9800, #F57C00);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 2.5rem;
    color: var(--white);
    box-shadow: 0 10px 30px rgba(255, 152, 0, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Achievement Stats */
.achievement-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.achievement-stats .stat-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.achievement-stats .stat-item:hover {
    background: var(--light-blue);
    transform: translateY(-5px);
}

.achievement-stats .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.achievement-stats .stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

Popup Actions
.popup-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.popup-actions.single {
    justify-content: center;
}

.popup-btn {
    flex: 1;
    padding: 15px 30px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.popup-btn.primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--white);
    box-shadow: 0 8px 25px rgba(227, 30, 36, 0.3);
}

.popup-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(227, 30, 36, 0.4);
}

.popup-btn.secondary {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.popup-btn.secondary:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-3px);
}

/* Popup Navigation */
.popup-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.popup-nav-btn {
    width: 40px;
    height: 40px;
    background: var(--white);
    border: 2px solid var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary-blue);
    transition: all 0.3s ease;
    font-size: 1rem;
}

.popup-nav-btn:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: scale(1.1);
}

.popup-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: scale(1);
}

/* Popup Dots */
.popup-dots {
    display: flex;
    gap: 10px;
}

.popup-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d0d0d0;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.popup-dot.active {
    background: var(--primary-blue);
    transform: scale(1.3);
}

.popup-dot:hover {
    background: var(--secondary-blue);
}

/* Don't Show Again Checkbox */
.popup-footer-options {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    font-size: 0.9rem;
    color: var(--text-light);
}

.popup-footer-options input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 991.98px) {
    .popup-container {
        max-width: 700px;
    }
    
    .popup-body {
        padding: 35px 30px;
    }
    
    .popup-title {
        font-size: 1.8rem;
    }
    
    .popup-description {
        font-size: 1rem;
    }
    
    .achievement-stats {
        gap: 15px;
    }
    
    .achievement-stats .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 767.98px) {
    .popup-overlay {
        padding: 15px;
    }
    
    .popup-container {
        max-height: 85vh;
        border-radius: 15px;
    }
    
    .popup-image {
        height: 220px;
    }
    
    .popup-body {
        padding: 30px 25px;
    }
    
    .popup-close {
        width: 40px;
        height: 40px;
        top: 15px;
        right: 15px;
        font-size: 1.2rem;
    }
    
    .popup-title {
        font-size: 1.6rem;
    }
    
    .popup-description {
        font-size: 0.95rem;
    }
    
    .popup-actions {
        flex-direction: column;
    }
    
    .popup-btn {
        width: 100%;
    }
    
    .achievement-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .achievement-stats .stat-number {
        font-size: 2.2rem;
    }
    
    .popup-navigation {
        padding: 15px;
        gap: 15px;
    }
    
    .popup-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

@media (max-width: 575.98px) {
    .popup-overlay {
        padding: 10px;
    }
    
    .popup-container {
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .popup-image {
        height: 180px;
    }
    
    .popup-body {
        padding: 25px 20px;
    }
    
    .popup-close {
        width: 35px;
        height: 35px;
        top: 12px;
        right: 12px;
        font-size: 1.1rem;
    }
    
    .popup-icon,
    .achievement-badge {
        width: 65px;
        height: 65px;
        font-size: 2rem;
    }
    
    .popup-title {
        font-size: 1.4rem;
    }
    
    .popup-description {
        font-size: 0.9rem;
    }
    
    .popup-features li {
        font-size: 0.9rem;
        padding: 10px 0;
    }
    
    .event-date-badge {
        padding: 12px 16px;
    }
    
    .event-date-badge .date-day {
        font-size: 1.6rem;
    }
    
    .event-date-badge .date-month {
        font-size: 0.9rem;
    }
    
    .event-details,
    .notice-details {
        padding: 18px;
    }
    
    .event-detail-item {
        font-size: 0.9rem;
    }
    
    .popup-btn {
        padding: 12px 25px;
        font-size: 0.95rem;
    }
    
    .popup-dots {
        gap: 8px;
    }
    
    .popup-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 400px) {
    .popup-body {
        padding: 20px 15px;
    }
    
    .popup-title {
        font-size: 1.3rem;
    }
    
    .popup-description {
        font-size: 0.85rem;
    }
    
    .achievement-stats .stat-number {
        font-size: 1.8rem;
    }
    
    .achievement-stats .stat-label {
        font-size: 0.8rem;
    }
}

/* Animation for popup entrance */
@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Language-specific styles */
[data-lang="np"] .popup-title,
[data-lang="np"] .popup-description,
[data-lang="np"] .popup-features li,
[data-lang="np"] .event-detail-item span,
[data-lang="np"] .notice-item,
[data-lang="np"] .popup-btn,
[data-lang="np"] .stat-label {
    font-family: 'Preeti', 'Mangal', 'Arial', sans-serif;
    line-height: 1.6;
}


.important-notice-mobile {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    animation: slideNotice 15s linear infinite;
}

@keyframes slideNotice {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.notice-label-mobile {
    color: white;
    font-weight: 600;
}

.notice-divider-mobile {
    margin: 0 10px;
    opacity: 0.8;
}

.notice-text-mobile {
    color: #ffd700;
    font-weight: 600;
}

/* Container wrapper for smooth sliding */
.notice-container {
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #5568d3 0%, #6b3f8f 100%);
    padding: 6px 0;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .important-notice-mobile {
        font-size: 12px;
        padding: 6px 16px;
        border-radius: 16px;
    }
    
    .notice-divider-mobile {
        margin: 0 8px;
    }
    
    .notice-container {
        padding: 4px 0;
    }
}

/* —— Responsive UI polish, accessibility, safe areas —— */
@media (prefers-reduced-motion: reduce) {
    .carousel-slide,
    .important-notice-mobile {
        animation: none !important;
    }

    .carousel-slide {
        transition-duration: 0.01ms !important;
    }
}

.nav-link:focus-visible,
.navbar-toggler:focus-visible,
.lang-toggle:focus-visible,
.dropdown-item:focus-visible,
.scroll-to-top:focus-visible,
.social-link:focus-visible,
.social-link-navbar:focus-visible,
.carousel-btn:focus-visible,
.indicator:focus-visible {
    outline: 3px solid var(--secondary-blue);
    outline-offset: 2px;
}

.main-footer .social-link:focus-visible,
.main-footer .footer-links a:focus-visible,
.main-footer .contact-info a:focus-visible {
    outline-color: #ffffff;
}

@media (max-width: 991.98px) {
    .navbar-collapse.show {
        padding-bottom: env(safe-area-inset-bottom, 12px);
    }
}

@media (max-width: 575.98px) {
    .mobile-school-name {
        max-width: min(240px, 72vw);
        line-height: 1.25;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

.academy-description,
.about-description,
.footer-about .about-description {
    overflow-wrap: anywhere;
}

@media (min-width: 992px) {
    .main-nav .container-fluid {
        gap: 0.5rem;
    }
}

/* Bootstrap primary — match Sanskar red CTAs */
.btn-primary {
    --bs-btn-bg: #e31e24;
    --bs-btn-border-color: #e31e24;
    --bs-btn-hover-bg: #c41a20;
    --bs-btn-hover-border-color: #b91520;
    --bs-btn-active-bg: #b91520;
    --bs-btn-active-border-color: #a01018;
    --bs-btn-disabled-bg: #e31e24;
    --bs-btn-disabled-border-color: #e31e24;
}

.btn-outline-primary {
    --bs-btn-color: #e31e24;
    --bs-btn-border-color: #e31e24;
    --bs-btn-hover-bg: #e31e24;
    --bs-btn-hover-border-color: #e31e24;
    --bs-btn-active-bg: #c41a20;
    --bs-btn-active-border-color: #c41a20;
}

/* Homepage polish: modern + responsive */
.hero-carousel {
    margin-bottom: clamp(1.2rem, 2.4vw, 2rem);
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10, 10, 10, 0.44) 0%, rgba(10, 10, 10, 0.14) 45%, rgba(10, 10, 10, 0.05) 100%);
    z-index: 2;
}

.slide-content {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
}

.slide-text {
    max-width: min(620px, 92%);
    color: #fff;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.36);
}

.slide-title {
    font-size: clamp(1.6rem, 3.8vw, 2.8rem);
    line-height: 1.15;
    margin: 0 0 0.6rem;
}

.slide-description {
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    margin-bottom: 1rem;
    opacity: 0.98;
}

.slide-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.2rem;
    border-radius: 999px;
    text-decoration: none;
    color: #fff !important;
    background: linear-gradient(135deg, var(--theme-primary), color-mix(in srgb, var(--theme-primary) 78%, #000));
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
    font-weight: 600;
}

.about-wrapper,
.notice-board-wrapper,
.principal-card,
.news-item,
.event-item,
.blog-card,
.stats-content {
    border-radius: 18px;
}

.section-header,
.blog-section-header,
.principal-section-header {
    margin-bottom: clamp(1rem, 2vw, 1.6rem);
}

.news-grid,
.events-grid,
.blog-grid {
    gap: clamp(0.9rem, 1.6vw, 1.25rem);
}

.news-item,
.event-item,
.blog-card {
    overflow: hidden;
}

.news-image img,
.event-image img,
.blog-image img,
.about-main-img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.blog-view-all-wrap {
    text-align: center;
    margin-top: 2rem;
}

.blog-view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.88rem 1.45rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--theme-primary), color-mix(in srgb, var(--theme-primary) 78%, #000));
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
    color: #fff !important;
}

.blog-view-all-btn .btn-text {
    color: inherit;
}

@media (max-width: 991.98px) {
    .slide-content {
        align-items: flex-end;
        padding-bottom: 1.2rem;
    }

    .slide-text {
        max-width: 100%;
    }

    .news-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        padding-bottom: 0.2rem;
    }
}

@media (max-width: 767.98px) {
    .slide-overlay {
        background: linear-gradient(180deg, rgba(10, 10, 10, 0.18) 10%, rgba(10, 10, 10, 0.56) 100%);
    }

    .slide-description {
        margin-bottom: 0.8rem;
    }

    .slide-cta-btn {
        width: 100%;
        max-width: 240px;
    }

    .notice-board-wrapper,
    .about-wrapper,
    .principal-card,
    .stats-content {
        border-radius: 14px;
    }
}

/* =========================================================
   Standard UI Refresh (global, non-breaking overrides)
   ========================================================= */

:root {
    --ui-surface: #ffffff;
    --ui-surface-soft: #f8fafc;
    --ui-border: #e5e7eb;
    --ui-text: #0f172a;
    --ui-muted: #64748b;
    --ui-radius-lg: 18px;
    --ui-radius-md: 14px;
    --ui-shadow-sm: 0 4px 18px rgba(15, 23, 42, 0.06);
    --ui-shadow-md: 0 14px 36px rgba(15, 23, 42, 0.10);
}

body {
    color: var(--ui-text);
    background: #f6f8fb;
}

/* Keep header/nav full width, but make content sections standard width */
.about-notice-section .container-fluid,
.principal-section .principal-container,
.news-events-section .container-fluid,
.stats-section .container-fluid,
.latest-blog-section .container {
    width: min(1260px, calc(100% - 2.5rem));
    margin-inline: auto;
}

@media (max-width: 767.98px) {
    .about-notice-section .container-fluid,
    .principal-section .principal-container,
    .news-events-section .container-fluid,
    .stats-section .container-fluid,
    .latest-blog-section .container {
        width: min(1260px, calc(100% - 1.25rem));
    }
}

/* Section rhythm */
.about-notice-section,
.principal-section,
.news-events-section,
.stats-section,
.latest-blog-section {
    padding-top: clamp(2rem, 3.5vw, 3rem) !important;
    padding-bottom: clamp(2rem, 3.5vw, 3rem) !important;
}

/* Unified card appearance */
.about-wrapper,
.notice-board-wrapper,
.principal-card,
.news-item,
.event-item,
.blog-card,
.stats-content {
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-sm);
    border-radius: var(--ui-radius-lg);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.about-wrapper:hover,
.notice-board-wrapper:hover,
.principal-card:hover,
.news-item:hover,
.event-item:hover,
.blog-card:hover,
.stats-content:hover {
    transform: translateY(-2px);
    box-shadow: var(--ui-shadow-md);
    border-color: color-mix(in srgb, var(--theme-primary) 28%, #cbd5e1);
}

/* Better section headings */
.section-title,
.principal-section-title,
.blog-section-title,
.notice-board-title {
    color: var(--ui-text) !important;
    letter-spacing: 0.01em;
}

.section-subtitle,
.academy-description,
.principal-message-text,
.blog-excerpt,
.news-excerpt,
.event-excerpt,
.stats-description {
    color: var(--ui-muted) !important;
}

/* Standardized CTA buttons */
.btn-read-more,
.principal-read-more-btn,
.view-all-notices,
.view-all-btn,
.stats-cta-btn,
.blog-link {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-read-more,
.view-all-btn,
.stats-cta-btn,
.blog-view-all-btn {
    border-radius: 999px !important;
    font-weight: 600 !important;
}

.btn-read-more:hover,
.view-all-btn:hover,
.stats-cta-btn:hover,
.blog-view-all-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.16);
}

/* Notice board: cleaner tabs and list rows */
.notice-board-tabs {
    background: var(--ui-surface-soft);
    border-radius: 10px;
    padding: 4px;
}

.notice-board-tab {
    border-radius: 8px !important;
}

.notice-board-tab.active {
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.notice-list-item {
    border-radius: 10px;
    padding: 0.7rem;
}

/* News / event cards for consistency */
.news-content,
.event-content,
.blog-content {
    padding: 1rem 1rem 1.15rem !important;
}

.news-title,
.event-title,
.blog-title {
    line-height: 1.35;
}

/* Principal block readability */
.principal-message-content {
    background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
}

.principal-signature-line {
    opacity: 0.85;
}

/* Stats section alignment polish */
.stats-grid {
    gap: 0.85rem !important;
}

.stat-item {
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-md);
    background: #fff;
}

/* Better focus for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--theme-primary) 55%, #ffffff);
    outline-offset: 2px;
}

/* Mobile compactness */
@media (max-width: 767.98px) {
    .news-content,
    .event-content,
    .blog-content {
        padding: 0.85rem 0.85rem 0.95rem !important;
    }

    .section-subtitle {
        font-size: 0.92rem;
    }
}