:root {
    --primary-navy: #002147;
    --secondary-gold: #D4AF37;
    --accent-gold: #FFD700;
    --bg-light: #F8F9FA;
    --text-dark: #1A1A1A;
    --white: #FFFFFF;
    --serif-font: 'Playfair Display', serif;
    --sans-font: 'Montserrat', sans-serif;
}

/* Base Styles */
body {
    margin: 0;
    font-family: var(--sans-font);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-light);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--serif-font);
    color: var(--primary-navy);
}

.portal-links a {
    color: #ffcc00;
    /* Gold */
    margin-left: 15px;
    text-decoration: none;
    font-weight: bold;
}

/* Header & Navigation */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-header {
    width: 100%;
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.top-bar {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
}

.main-logo {
    height: 70px;
    width: auto;
}

.school-titles h1 {
    font-size: 20px !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

.initiative {
    font-size: 11px !important;
    color: #666 !important;
    margin: 5px 0 0 0 !important;
}

.affiliation span {
    background: var(--primary-navy);
    color: var(--white);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}

/* Nav Bar */
.nav-bar {
    background: var(--primary-navy);
}

.nav-bar>.container>ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

.nav-bar>.container>ul>li {
    position: relative;
}

.nav-bar>.container>ul>li>a {
    display: block;
    padding: 15px 20px;
    color: var(--white);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s;
}

@media (min-width: 992px) {
    .dropdown:hover>.dropdown-menu {
        display: block;
    }
}

.nav-bar>.container>ul>li>a:hover {
    background: var(--secondary-gold);
    color: var(--primary-navy);
}

/* Dropdown functionality moved to desktop media query */

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--primary-navy);
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1001;
}

.dropdown-menu li {
    display: block;
    width: 100%;
}

.dropdown-menu li a {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile Nav Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1001;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.show {
    display: block;
    opacity: 1;
}

/* Updated Menu Toggle Animation */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 991px) {
    .header-content {
        padding: 5px 20px;
    }

    .menu-toggle {
        display: flex;
        z-index: 1003;
    }

    .nav-bar {
        display: block;
        position: fixed;
        top: 0;
        left: -300px;
        /* Slide-in starting position */
        width: 300px;
        height: 100vh;
        background: var(--primary-navy);
        z-index: 1002;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        padding-top: 80px;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.3);
    }

    .nav-bar.show {
        left: 0;
    }

    .nav-bar ul {
        flex-direction: column;
        justify-content: flex-start;
    }

    .nav-bar ul li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-bar ul li a {
        padding: 15px 25px;
        font-size: 14px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Accordion Arrow for Mobile */
    .dropdown>a::after {
        content: '\25BC';
        font-size: 10px;
        transition: transform 0.3s;
    }

    .dropdown.active>a::after {
        transform: rotate(-180deg);
    }

    .dropdown-menu {
        position: static;
        display: none !important;
        /* Hide by default on mobile */
        background: rgba(0, 0, 0, 0.2);
        padding-left: 15px;
        box-shadow: none;
        width: 100%;
    }

    .dropdown.active>.dropdown-menu {
        display: block !important;
    }

    .logo-area {
        max-width: 70%;
    }

    .school-titles h1 {
        font-size: 16px !important;
    }

    .header-right {
        display: none;
    }
}


/* Hero Section */
.home-banner {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.main-banner-img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: cover;
    display: block;
}

.banner-overlay-content {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    color: var(--white);
    max-width: 500px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.banner-overlay-content h2 {
    font-size: 48px;
    color: var(--white);
    margin: 0;
}

.banner-overlay-content p {
    font-size: 18px;
    margin: 20px 0;
}

/* Floating CTAs */
.floating-ctas {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cta-btn {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 20px 10px;
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    transition: 0.3s;
    border-radius: 5px 0 0 5px;
}

.enquire {
    background: var(--secondary-gold);
}

.apply {
    background: var(--primary-navy);
}

.cta-btn:hover {
    padding-right: 20px;
}

@media (max-width: 768px) {
    .banner-overlay-content h2 {
        font-size: 32px;
    }

    .floating-ctas {
        bottom: 0;
        top: auto;
        left: 0;
        right: 0;
        transform: none;
        flex-direction: row;
        width: 100%;
    }

    .cta-btn {
        writing-mode: horizontal-tb;
        flex: 1;
        text-align: center;
        border-radius: 0;
        padding: 15px;
    }
}

.announcements {
    flex: 1;
    background: var(--white);
    padding: 30px;
    border-top: 5px solid var(--primary-navy);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.welcome {
    flex: 2;
}

.welcome h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

.contact-container {
    padding: 80px 0;
    background: var(--primary-navy);
    color: var(--white);
    text-align: center;
}

.contact-container h2 {
    color: var(--white);
    margin-bottom: 40px;
}

.contact-container form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 20px;
}

.contact-container input,
.contact-container select,
.contact-container textarea {
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    font-size: 16px;
    color: var(--white);
}

.contact-container input::placeholder,
.contact-container textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.contact-container .btn {
    background: var(--secondary-gold);
    color: var(--primary-navy);
    padding: 15px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    transition: 0.3s;
}

.contact-container .btn:hover {
    background: var(--accent-gold);
}

/* News Ticker */
.news-ticker {
    background: var(--primary-navy);
    color: var(--white);
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 45px;
    position: relative;
    z-index: 100;
}

.news-ticker .label {
    padding: 0 25px;
    background: var(--secondary-gold);
    color: var(--primary-navy);
    font-weight: 700;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 2;
}

.scrolling-text {
    display: flex;
    white-space: nowrap;
    align-items: center;
    animation: scroll-left 20s linear infinite;
}

.scrolling-text p {
    margin: 0;
    padding-left: 100%;
    font-weight: 500;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Principal Section Styles */
.principal-section {
    padding: 80px 0;
    background: var(--white);
}

.principal-card {
    display: flex;
    align-items: center;
    gap: 60px;
    background: var(--bg-light);
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.principal-image {
    flex: 1;
    text-align: center;
}

.principal-image img {
    width: 100%;
    max-width: 350px;
    border-radius: 10px;
    border: 8px solid var(--white);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.name-tag {
    background: var(--primary-navy);
    color: var(--white);
    padding: 15px;
    margin-top: -30px;
    position: relative;
    z-index: 10;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.name-tag h4 {
    margin: 0;
    color: var(--secondary-gold);
    font-size: 18px;
}

.name-tag span {
    font-size: 12px;
}

.principal-text {
    flex: 1.5;
}

.principal-text h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.accent-line {
    width: 70px;
    height: 4px;
    background: var(--secondary-gold);
    border: none;
    margin: 20px 0;
}

.read-more {
    display: inline-block;
    margin-top: 25px;
    color: var(--primary-navy);
    text-decoration: none;
    font-weight: 700;
    padding: 10px 25px;
    border: 2px solid var(--primary-navy);
    border-radius: 5px;
    transition: 0.3s;
}

.read-more:hover {
    background: var(--primary-navy);
    color: var(--white);
}

/* Modal Overlay (Background) */
.modal-overlay {
    display: flex;
    /* Keeps it hidden until page loads */
    position: fixed;
    z-index: 9999;
    /* Sits on top of everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    /* Semi-transparent black */
    justify-content: center;
    align-items: center;
}

/* Modal Box */
.modal-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    /* Reduced from 600px to make it smaller */
    max-height: 80vh;
    /* Limits height to 80% of the screen height */
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: zoomIn 0.4s ease-out;
}

.banner-img {
    width: 100%;
    height: auto;
    max-height: 75vh;
    /* Ensures the image doesn't get too tall */
    object-fit: contain;
    /* Prevents stretching */
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Close Button (X) */
.close-button {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #ffcc00;
    color: #002147;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    text-align: center;
    line-height: 35px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Entrance Animation */
@keyframes zoomIn {
    from {
        transform: scale(0.7);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Footer Styles */
.main-footer {
    background: var(--primary-navy);
    color: var(--white);
    padding: 80px 0 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 50px;
}

.footer-col h3 {
    color: var(--secondary-gold);
    margin-bottom: 25px;
    font-size: 24px;
}

.footer-col h4 {
    color: var(--secondary-gold);
    margin-bottom: 25px;
    font-size: 18px;
}

.footer-col p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

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

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

.footer-links li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s;
}

.footer-links li a:hover {
    color: var(--secondary-gold);
    padding-left: 10px;
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
    .main-footer {
        padding: 60px 0 0 0;
        text-align: center;
    }

    .footer-links li a:hover {
        padding-left: 0;
    }

    .footer-content {
        padding-bottom: 30px;
    }
}

/* --- Dropdown Menu Styles --- */

/* Basic dropdown positioning */
.dropdown {
    position: relative;
    display: block;
}

/* Dropdown logic consolidated in media queries */

/* Style the white links inside the maroon box */
.dropdown-menu li a {
    color: white !important;
    padding: 12px 20px;
    display: block;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    text-transform: uppercase;
}

/* Hover effect for the menu items */
.dropdown-menu li a:hover {
    background-color: #a02020;
}



/* History Section Layout */
.school-history-section {
    background-color: #f0f7ff;
    /* Light blue tint from reference */
    padding: 40px 20px;
}

.history-container {
    max-width: 1100px;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
}

.main-history-title {
    background: #5d8aa8;
    /* Muted blue title bar */
    color: white;
    text-align: center;
    padding: 10px;
    margin-bottom: 30px;
    font-size: 22px;
}

.history-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

/* The Blue Box with Label */
.history-box {
    flex: 1;
    position: relative;
    border: 2px solid #337ab7;
    /* Blue border from reference */
    padding: 20px 10px 10px 10px;
    background: #fff;
}

.box-label {
    position: absolute;
    top: -15px;
    left: 15px;
    background: #337ab7;
    /* Darker blue tag */
    color: white;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: bold;
}

.box-images {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    /* Aligns items to the left like DPSG */
    flex-wrap: wrap;
    padding: 10px;
}

.box-images .gallery-item {
    margin-bottom: 10px;
}

.box-images {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    /* This forces images to the next line when the box is full */
    padding: 10px;
}

/* Gallery Item Container */
.gallery-item {
    position: relative;
    width: 30%;
    /* Fits 3 images per row */
    overflow: hidden;
    /* Clips the image when it zooms */
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Base Image Style */
.gallery-item img {
    width: 100% !important;
    height: 180px !important;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
    /* Smooth zoom animation */
}

/* Hover Zoom Effect */
.gallery-item:hover img {
    transform: scale(1.1);
}

/* The Animated Overlay */
.hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 33, 71, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    /* ADD THIS LINE TO FIX CLICKING */
}

.gallery-item:hover .hover-overlay {
    opacity: 1;
    /* Shows overlay on hover */
}

.overlay-text {
    color: #ffcc00;
    /* Gold text color */
    font-weight: bold;
    font-size: 12px;
    border: 2px solid #ffcc00;
    padding: 5px 10px;
    letter-spacing: 1px;
}

/* Ensure the full-width section images stay sized correctly */
.full-width .box-images .gallery-item {
    width: 23%;
    /* This makes 4 images fit per row in the bottom box */
}

/* Force Luminous Navigation Arrows to be visible and styled like DPSG */
.lum-lightbox {
    z-index: 99999 !important;
    /* Ensures it is on top of everything */
}

.lum-previous,
.lum-next {
    display: block !important;
    width: 60px !important;
    height: 60px !important;
    background: rgba(0, 33, 71, 0.8) !important;
    /* Navy Blue background for arrows */
    border-radius: 50% !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    cursor: pointer !important;
}

.lum-previous {
    left: 20px !important;
}

.lum-next {
    right: 20px !important;
}

/* Arrow icons color */
.lum-previous::after,
.lum-next::after {
    color: #ffcc00 !important;
    /* Gold arrows */
    font-size: 30px !important;
}

/* Ensure the popup image fits correctly and doesn't just fill the screen */
.lum-img {
    max-width: 85vw !important;
    max-height: 80vh !important;
    border: 5px solid #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* This ensures the Gold Arrows actually show up inside the circles */
.lum-previous::after {
    content: '<' !important;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-family: sans-serif;
    font-weight: bold;
}

.lum-next::after {
    content: '>' !important;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-family: sans-serif;
    font-weight: bold;
}

.lum-lightbox {
    z-index: 100000 !important;
}

/* --- MOBILE RESPONSIVE FIXES --- */

@media (max-width: 768px) {

    /* Stack the Header Branding */
    .header-center a {
        flex-direction: column;
        gap: 10px;
    }

    .school-titles h1 {
        font-size: 18px;
    }

    .branch-name {
        font-size: 14px;
        letter-spacing: 2px;
    }

    /* Make Navigation Scrollable horizontally */
    .nav-container {
        overflow-x: auto;
        white-space: nowrap;
        display: block;
        -webkit-overflow-scrolling: touch;
    }

    .academic-nav ul {
        flex-wrap: nowrap;
        padding: 10px 5px;
    }

    /* Stack Principal Section */
    .principal-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .principal-text {
        text-align: center;
    }

    .accent-line {
        margin: 0 auto 15px auto;
    }

    /* Stack History & Info Sections */
    .history-row,
    .info-section {
        flex-direction: column;
    }

    .gallery-item {
        width: 45%;
        /* 2 images per row on tablets */
    }

    /* Contact Form full width */
    .contact-container {
        padding: 30px 15px;
    }
}

@media (max-width: 480px) {
    .gallery-item {
        width: 100%;
        /* 1 image per row on small phones */
    }

    .main-logo {
        height: 60px;
    }
}

/* --- MOBILE RESPONSIVE & HAMBURGER MENU --- */
/* Hide the hamburger icon on Desktop */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 15px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #002147;
    /* Navy Blue */
}

@media (max-width: 768px) {

    /* Branding: Stack logo and text */
    .header-center a {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    /* Navigation: Convert to vertical drawer */
    .menu-toggle {
        display: flex;
        margin: 0 auto;
    }

    .academic-nav ul {
        display: none;
        /* Hidden until toggled */
        flex-direction: column;
        width: 100%;
        background: #84b8fb;
        padding: 0;
    }

    .academic-nav ul.show {
        display: flex;
    }

    .academic-nav ul li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .divider {
        display: none;
    }

    /* Principal Section: Stack image and text */
    .principal-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .principal-text {
        text-align: center;
    }

    .accent-line {
        margin: 0 auto 15px auto;
    }

    /* History & Info: Stack rows */
    .history-row,
    .info-section {
        flex-direction: column;
        padding: 20px;
    }

    .gallery-item {
        width: 100% !important;
        /* One image per row on phones */
    }
}