:root {
    --primary-blue-hover: #2c69af;
    --primary-blue-dark: #15467a;
    --accent-yellow-dark: #f4b02a;
    --success-green: #198754;
    --white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-section: #fcfcfc;
    --text-main: #333333;
    --text-muted: #666666;
    --border-light: #eeeeee;
    --nav-bg-scrolled: rgba(248, 249, 250, 0.8);
    --overlay-color: rgba(0, 0, 0, 0.5);
    --primary-blue: #00529B;
    --accent-yellow: #FFD700;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
    width: 100%;
}

#scrollBtn {
    position: fixed;
    right: 30px;
    bottom: 40px;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    color: var(--white);
    cursor: pointer;
    font-size: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: 0.4s;
    border: 2px solid transparent;
    z-index: 100;
}

#scrollBtn::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 14px;
    background: linear-gradient(270deg,
            var(--accent-yellow),
            var(--success-green),
            var(--accent-yellow));
    background-size: 400% 400%;
    z-index: -1;
    animation: borderMove 4s linear infinite;
}

#scrollBtn::after {
    content: "";
    position: absolute;
    background: var(--primary-blue);
    width: 53px;
    height: 53px;
    border-radius: 14px;
}

#scrollBtn i {
    z-index: 1;
}

@keyframes borderMove {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 400% 50%;
    }
}

#scrollBtn.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.custom-navbar {
    background: var(--bg-light);
    padding: 8px 0;
    transition: all 0.4s ease-in-out;
}

.custom-navbar.scrolled {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(3px);
    padding: 8px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.logo-box img {
    width: 55px;
    border-radius: 50%;
}

.nav-link {
    color: var(--text-main) !important;
    position: relative;
    margin: 0 10px;
    padding-bottom: 5px;
    cursor: pointer;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0%;
    height: 2px;
    background: var(--primary-blue);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

.dropdown-container {
    position: relative;
}

.dropdown-menu-custom {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 220px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    list-style: none;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown-menu-custom li a {
    display: block;
    padding: 8px 20px;
    color: var(--text-main);
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-menu-custom li a:hover {
    color: var(--primary-blue);
}

.dropdown-container:hover .dropdown-menu-custom {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.apply-btn {
    background: var(--primary-blue);
    color: var(--white);
    border-radius: 8px;
    transition: transform 0.2s ease;
    margin-left: 10px;
}

.apply-btn:hover {
    background: var(--primary-blue-hover);
    color: var(--white);
    transform: scale(1.1);
}

.add-event-btn {
    background: var(--accent-yellow);
    color: var(--primary-blue-dark);
    border-radius: 8px;
    font-weight: 600;
    padding: 8px 16px;
    transition: all 0.3s ease;
    border: none;
    margin-left: 10px;
}

.add-event-btn:hover {
    background: var(--accent-yellow-dark);
    color: var(--primary-blue-dark);
    transform: scale(1.05);
}

.menu-btn {
    font-size: 28px;
    color: var(--primary-blue);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s ease;
}

.menu-btn:hover {
    transform: scale(1.1);
}

.side-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: var(--primary-blue);
    transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 9999;
    padding: 80px 20px 20px;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
}

.side-menu a {
    display: block;
    color: var(--white);
    padding: 16px 20px;
    text-decoration: none;
    font-size: 1.1rem;
    margin-bottom: 8px;
    transition: border-left 0.3s ease-in;
}

.side-menu div {
    margin-top: -32px;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    margin-bottom: 0;
}

.side-menu span {
    font-size: 20px;
    color: var(--bg-section);
}

.side-menu a:hover {
    border-left: 3px solid var(--border-light);
}

.side-menu::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-color);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: -1;
}

.side-menu.open::before {
    opacity: 1;
    visibility: visible;
}

.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: rgba(0, 0, 0, 0.1);
}

.mobile-submenu.open {
    max-height: 200px;
}

.mobile-submenu a {
    padding-left: 50px !important;
    font-size: 0.95rem !important;
}

.side-nav-dropdown {
    display: flex;
    align-items: center;
    margin-bottom: 2.5rem !important;
}

.side-nav-dropdown.active i.fa-chevron-down {
    transform: rotate(180deg);
    transition: transform 0.3s;
}

.about-hero {
    background: var(--primary-blue);
    color: white;
    min-height: 75vh;
    /* Adjusted from 110vh to look cleaner when zoomed out */
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 100px 0 60px;
}

.bv-about {
    font-size: clamp(2rem, 4vw, 3.5rem);
    /* Scales gracefully with window zoom */
    font-weight: 600;
}

.typing {
    position: relative;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 600;
}

.typing::before {
    content: "School";
    color: white;
    animation: words 20s infinite;
}

.typing::after {
    content: "";
    position: absolute;
    width: calc(100% + 8px);
    height: 100%;
    background-color: var(--primary-blue);
    border-left: 2px solid var(--accent-yellow);
    right: -8px;
    animation: cursor .8s infinite, typing 20s steps(14) infinite;
}

@keyframes cursor {
    to {
        border-left: 2px solid transparent;
    }
}

@keyframes words {

    0%,
    19% {
        content: "School";
    }

    20%,
    39% {
        content: "Students";
    }

    60%,
    79% {
        content: "Opportunities";
    }

    80%,
    100% {
        content: "Achievements";
    }
}

@keyframes typing {

    0%,
    5%,
    20%,
    25%,
    40%,
    45%,
    60%,
    65%,
    80%,
    85% {
        width: calc(100% + 8px);
    }

    10%,
    15%,
    30%,
    35%,
    50%,
    55%,
    70%,
    75%,
    90%,
    95%,
    100% {
        width: 0;
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1.3s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.principal-container {
    text-align: center;
}

.principal-img {
    width: min(100%, 340px);
    /* Ensures image never expands past containers */
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 12px solid rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
    transition: transform 0.5s ease;
}

.principal-img:hover {
    transform: scale(1.05);
}

.principal-name {
    margin-top: 20px;
    font-size: 1.65rem;
    font-weight: 600;
    color: white;
}

.principal-title {
    font-size: 1.15rem;
    opacity: 0.9;
    color: #ddd;
}

#div_main {
    background: var(--primary-blue);
    color: var(--white);
    transition: background 0.4s ease;
}

#tital {
    font-size: 40px;
    font-weight: bold;
    display: inline-block;
    position: relative;
    cursor: pointer;
    transition: color 0.3s ease;
}

#tital:hover {
    color: var(--accent-yellow);
}

#tital::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 3px;
    background-color: var(--white);
    bottom: -5px;
    left: 0;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#tital:hover::after {
    width: 100%;
    background-color: var(--accent-yellow);
}

.info_cards {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.info_cards:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-blue-hover);
}

.info_cards h2 {
    color: var(--overlay-color);
    font-size: 24px;
    transition: color 0.3s ease;
}

.info_cards:hover h2 {
    color: var(--primary-blue);
}

.box_info {
    color: var(--text-muted);
}

/* --- Fixed Heritage Section --- */
.about-section {
    padding: 80px 0;
}

.section-title {
    color: var(--primary-blue);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.description-text {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* Removed old destructive margins */
.img-card {
    background-color: var(--white);
    padding: 12px;
    border: 1px solid var(--border-light);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.4s ease;
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
}

.img-card img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.plus {
    position: absolute;
    color: var(--accent-yellow);
    font-size: 1.8rem;
    font-weight: bold;
    z-index: 10;
}

.tr {
    top: -8px;
    right: -8px;
}

.bl {
    bottom: -8px;
    left: -8px;
}

/* Clean, modern Grid Fan Setup for Large Screens */
@media (min-width: 992px) {
    .card-holder-left {
        display: flex;
        justify-content: flex-end;
        padding-right: 15px;
    }

    .card-holder-right {
        display: flex;
        justify-content: flex-start;
        padding-left: 15px;
    }

    .card-1 {
        transform: rotate(-6deg);
    }

    .card-2 {
        transform: rotate(4deg);
    }

    .img-card:hover {
        transform: rotate(0deg) scale(1.05);
        z-index: 10;
        cursor: pointer;
    }
}

@media (max-width: 991.98px) {
    .about-section .row {
        gap: 30px;
    }

    .img-card img {
        height: 300px;
    }

    .order-mobile-1 {
        order: 1;
    }

    .order-mobile-2 {
        order: 2;
    }

    .order-mobile-3 {
        order: 3;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
}

.bv-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 80px 0 30px;
}

.bv-footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.bv-logo {
    background: var(--primary-blue);
    color: var(--white);
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.4rem;
}

.bv-footer-heading {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 12px;
}

.bv-footer-link {
    color: #cbd5e1;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.bv-footer-link:hover {
    color: #60a5fa;
}

.bv-contact-info i {
    width: 20px;
    margin-right: 10px;
}

.bv-social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.bv-social-icons a:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-4px);
}

.bv-end {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.bv-footer-bottom {
    padding-top: 25px;
    text-align: center;
    font-size: 0.95rem;
    color: #94a3b8;
}

.bv-footer-bottom a{
    text-decoration: none;
    color: #94a3b8;
}