
/* Universal Box Sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* General Body Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    color: var(--text);
    background-color: var(--bg);
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 5%;
    background-color: var(--primary);
    color: var(--bg);
    font-size: 0.9em;
}

.contact-info a {
    margin-right: 20px;
    color: var(--bg);
}

.contact-info a i {
    margin-right: 5px;
    color: var(--bg);
}

.ask-ai-container {
    flex-grow: 1; /* Allows it to take available space */
    text-align: center; /* Centers the button */
}

.ask-ai {
    display: inline-block;
    background-color: var(--accent);
    color: var(--bg);
    padding: 8px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 5px 0 var(--primary);
    transition: all 0.2s ease; /* Smooth transition for hover */
}

.ask-ai:hover {
    background-color: var(--primary);
    box-shadow: 0 2px 0 var(--primary);
    transform: translateY(3px); /* Move down slightly on hover */
}

.social-media {
    display: flex;
    align-items: center;
}

.social-media a i {
    font-size: 1.2em;
    margin-left: 15px;
    color: var(--bg);
}

/* Navigation - Mobile First */
nav {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 5%;
    background-color: var(--bg);
    border-bottom: 1px solid var(--muted);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.school-name {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--text);
}

.menu-toggle {
    display: block;
    cursor: pointer;
    font-size: 1.8em;
}

nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: var(--bg);
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    border-top: 1px solid var(--muted);
    padding: 0;
    margin: 0;
}

nav ul.show {
    display: flex;
}

nav ul li {
    width: 100%;
    text-align: center;
    margin: 0;
}

nav ul li a {
    display: block;
    padding: 15px;
    font-weight: bold;
    color: var(--text);
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--muted);
}

nav ul li a.active,
nav ul li a:hover {
    background-color: var(--primary);
    color: var(--bg);
    border-radius: 0;
}

.student-app {
    display: none; /* Hidden on mobile */
}

/* Navigation - Desktop */
@media (min-width: 769px) {
    .school-name {
        font-size: 1.8em;
    }

    .menu-toggle {
        display: none;
    }

    nav ul {
        display: flex;
        flex-direction: row;
        position: static;
        width: auto;
        border: none;
    }

    nav ul li {
        width: auto;
    }

    nav ul li a {
        padding: 10px 20px;
        border-bottom: none;
    }

    nav ul li a.active,
    nav ul li a:hover {
        border-radius: 20px;
    }

    .student-app {
        display: block;
        background-color: var(--primary);
        color: var(--bg);
        padding: 10px 20px;
        border-radius: 20px;
        font-weight: bold;
    }
    
    .student-app i {
        margin-left: 8px;
    }
}


/* Hero Section */
.hero-slider {
    position: relative;
    width: 100%;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.slides-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
    width: 400%;
}

.slide {
    width: 25%;
}

.slide img {
    width: 100%;
    display: block;
}

.loading-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--muted);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text);
    font-size: 1.5em;
    text-align: center;
    z-index: 1; /* Ensure it's above other content initially */
}

.loading-placeholder h2 {
    font-size: 2em;
    margin-bottom: 10px;
    color: var(--text);
}

.loading-placeholder p {
    font-size: 0.8em;
    color: var(--text);
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Dark overlay */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--bg);
    text-align: center;
    padding: 20px;
}

.slide-overlay h2 {
    font-size: 3em;
    margin-bottom: 10px;
}

.slide-overlay p {
    font-size: 1.5em;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6); /* Darker background */
    color: var(--bg);
    border: none;
    padding: 15px 20px; /* Larger padding */
    cursor: pointer;
    font-size: 2em; /* Larger font */
    border-radius: 50%; /* Circular buttons */
    z-index: 100;
    transition: background-color 0.3s ease;
}

.slider-btn:hover {
    background-color: rgba(0, 0, 0, 0.8); /* Darker on hover */
}

.slider-btn.prev {
    left: 10px;
}

.slider-btn.next {
    right: 10px;
}

/* Section Title */
.section-title {
    text-align: center;
    margin: 50px 0 30px;
}

.section-title h2 {
    display: inline-block;
    font-size: 2.5em;
    color: var(--text);
    border-bottom: 4px solid var(--primary);
    padding-bottom: 10px;
    position: relative;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 2px;
    background-color: var(--text);
}


/* About Us Section */
.about-us {
    padding: 40px 4%;
    margin: 20px auto;
    max-width: 100%;
    background: var(--bg);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-content {
    display: flex;
    justify-content: space-between;
    gap: 40px;
}

.about-text {
    flex-basis: 60%;
}

.about-text h3 {
    font-size: 2em;
    color: var(--text);
    margin-top: 0;
}

.about-text p {
    line-height: 1.6;
    text-align: justify;
}

.read-more {
    display: inline-block;
    background-color: var(--primary);
    color: var(--bg);
    padding: 12px 25px;
    border-radius: 25px;
    margin-top: 20px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.read-more:hover {
    background-color: var(--text);
}

/* Notice Board */
.notice-board {
    flex-basis: 35%;
    border: 1px solid var(--muted);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    align-self: flex-start;
    overflow: hidden; /* Hide the overflowing content */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.351);
}

.notice-board h3 {
    font-size: 1.8em;
    color: var(--text);
    margin-top: 0;
    border-bottom: 2px solid var(--text);
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 20px;
}

#notice-board-container {
    animation: scroll-up 10s linear infinite;
}

.notice-board:hover #notice-board-container {
    animation-play-state: paused;
}

@keyframes scroll-up {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-100%);
    }
}

.notice-item a {
    display: block;
    padding: 10px;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--muted);
}

.notice-item a:hover {
    background-color: var(--muted);
}

.notice-date {
    font-weight: bold;
    margin-right: 10px;
    color: var(--primary);
}


/* Our School Section */
.our-school {
    padding: 20px 5%;
}

.school-links {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.school-link-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    width: 32%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.school-link-item:hover {
    transform: translateY(-5px);
}

.school-link-item img {
    width: 100%;
    display: block;
    height: 250px;
    object-fit: cover;
}

.link-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--bg);
    text-align: center;
    padding: 15px;
    font-size: 1.5em;
    font-weight: bold;
}

/* Special Achievements Section */
.special-achievements {
    padding: 20px 5% 50px;
}

.achievements-gallery {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.achievement-item {
    background-color: var(--muted);
    border-radius: 15px;
    overflow: hidden;
    text-align: center;
    width: 32%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.achievement-item:hover {
    transform: translateY(-5px);
}

.achievement-item img {
    width: 100%;
    display: block;
    height: 250px;
    object-fit: cover;
}

.achievement-item p {
    padding: 15px;
    margin: 0;
    font-size: 1.2em;
    color: var(--primary);
    font-weight: bold;
}

/* Map Section */
.map {
    line-height: 0;
}

/* Logo Slider */
.logo-slider {
    overflow: hidden;
    background: white;
    white-space: nowrap;
    position: relative;
    padding: 20px 0;
}

.logo-slider::before,
.logo-slider::after {
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    content: "";
    z-index: 2;
}

.logo-slider::before {
    left: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 0), white);
}

.logo-slider::after {
    right: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), white);
}

.slider-track {
    display: flex;
    animation: scroll 20s linear infinite;
    -webkit-animation: scroll 20s linear infinite;
    width: calc(200px * 14);
}

.slide-logo {
    height: 80px;
    width: 200px;
    display: flex;
    align-items: center;
    padding: 0 40px;
    perspective: 100px;
}

.slide-logo img {
    width: 100%;
    transition: transform 1s;
    pointer-events: none;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-200px * 7));
    }
}


/* Footer */
footer {
    background-color: var(--primary);
    color: var(--bg);
    padding: 50px 5% 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--primary);
}

.our-mission,
.quick-links,
.contact-us {
    flex-basis: 31%;
}

footer h3 {
    font-size: 1.5em;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: inline-block;
}

.our-mission p {
    line-height: 1.6;
}

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

.quick-links ul li {
    padding: 5px 0;
    border-bottom: 1px solid var(--primary);
}

.quick-links ul li a {
    display: block;
    transition: color 0.3s;
}

.quick-links ul li a:hover {
    color: var(--primary);
}

.contact-us p {
    margin: 10px 0;
    line-height: 1.5;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    font-size: 0.9em;
}

/* Language Switcher */
.language-switcher {
    position: relative;
    width: 80px; /* Increased width */
    height: 34px; /* Increased height */
    margin-left: 20px;
}

.language-toggle {
    display: none;
}

.language-label {
    display: flex; /* Use flexbox for alignment */
    justify-content: space-between; /* Space out the text */
    align-items: center; /* Center vertically */
    width: 100%;
    height: 100%;
    background-color: var(--bg);
    border-radius: 17px; /* Half of height */
    cursor: pointer;
    transition: background-color 0.3s ease;
    padding: 0 5px; /* Add some padding */
    box-sizing: border-box; /* Include padding in width/height */
    border: 1px solid var(--primary);
}

.language-label::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 26px; /* Width of the ball */
    height: 26px; /* Height of the ball */
    background-color: var(--primary);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.language-label .en,
.language-label .hi {
    font-size: 14px;
    font-weight: bold;
    z-index: 1; /* Ensure text is above the background */
    transition: color 0.3s ease;
}

.language-label .en {
    color: var(--text);
    padding-left: 8px;
}

.language-label .hi {
    color: #555;
    padding-right: 8px;
}


.language-toggle:checked + .language-label {
    background-color: var(--bg);
}

.language-toggle:checked + .language-label::after {
    transform: translateX(42px);
}

.language-toggle:checked + .language-label .en {
    color: #555;
}

.language-toggle:checked + .language-label .hi {
    color: var(--text);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .about-content {
        flex-direction: column;
    }
    .notice-board {
        width: 100%;
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .top-bar {
        justify-content: center; /* Center the AI button */
        padding: 10px 0;
    }
    .contact-info,
    .language-switcher,
    .social-media {
        display: none; /* Hide these elements */
    }
    nav {
        padding: 15px 0;
    }
    .school-name {
        font-size: 1rem;
        padding-left: 15px;
    }
    .menu-toggle {
        padding-right: 15px;
    }
    .hero-slider {
        height: auto;
        margin: 0;
        border-radius: 0;
    }
    .slide-overlay h2 {
        font-size: 1.8em;
    }
    .slide-overlay p {
        font-size: 0.9em;
    }
    .school-links,
    .achievements-gallery,
    .footer-content {
        flex-direction: column;
        align-items: center;
        padding: 0 15px;
    }
    .school-link-item,
    .achievement-item {
        width: 100%;
        max-width: 400px;
        margin-bottom: 20px;
    }
    .footer-content {
        text-align: center;
    }
    footer h3 {
        display: inline-block;
    }
    .about-us,
    .our-school,
    .special-achievements {
        padding-left: 0;
        padding-right: 0;
        padding-top: 10px;
        padding-bottom: 10px;
        margin-top: 0;
        margin-bottom: 10px;
    }
    .about-content {
        padding: 0 15px;
    }
    footer {
        padding: 50px 0 20px;
    }
}

@media (max-width: 480px) {
    .top-bar {
        font-size: 0.8em;
    }
    .section-title h2 {
        font-size: 1.8em;
    }
    .about-text h3 {
        font-size: 1.5em;
    }
    .notice-board h3 {
        font-size: 1.2em;
    }
    .modal-content {
        width: 90%;
        margin: 20% auto;
    }
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--bg);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    list-style: none; /* Remove bullet points */
    padding: 0; /* Remove default padding */
}

.dropdown-content li a {
    color: var(--text);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    margin: 5px; /* Add margin between buttons */
    background-color: var(--muted); /* Add a background color */
    border-radius: 5px; /* Add rounded corners */
    transition: background-color 0.3s ease; /* Add a smooth transition */
}

.dropdown-content li a:hover {
    background-color: var(--primary);
    color: var(--bg);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1001; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
}

.modal-content {
    background-color: var(--bg);
    margin: 10% auto; /* 10% from the top and centered */
    padding: 25px;
    border: 1px solid var(--muted);
    width: 80%;
    max-width: 700px;
    border-radius: 15px;
    position: relative;
    animation: slide-down 0.4s ease-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

@keyframes slide-down {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-button {
    color: var(--text);
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
}

#modal-title {
    color: var(--text);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
}

#modal-date {
    font-size: 0.9em;
    color: var(--text);
    margin-bottom: 15px;
}

#modal-body {
    margin-top: 15px;
    line-height: 1.7;
    white-space: pre-wrap; /* Respects newlines and whitespace */
}

.notice-item {
    padding: 10px;
    border-bottom: 1px solid var(--muted);
    cursor: pointer;
    transition: background-color 0.3s;
}

.notice-item:hover {
    background-color: var(--muted);
}

/* Fix for images inside the notice modal */


#modal-body img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    display: block;
    margin: 10px 0;
}

:root {
  --bg: #ffffff;
  --text: #0f172a; /* slate-900 */
  --primary: #2563eb; /* blue-600 */
  --accent: #22c55e;  /* green-500 */
  --muted: #f1f5f9;   /* slate-100 */
  --ring: #93c5fd;    /* blue-300 */
}

/* Use variables in components */
body { background: var(--bg); color: var(--text); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.badge-accent { background: var(--accent); color:#fff; }
.card { background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.06); border-radius: 16px; }
.section-muted { background: var(--muted); }
.focus-ring:focus { outline: 3px solid var(--ring); outline-offset: 2px; }

/* Optional decorative helpers */
.banner-overlay { background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.4)); }
.rangoli-dots { background-image: radial-gradient(currentColor 2px, transparent 2px); background-size: 12px 12px; opacity:.25; }

/* Festival Popup Styles */
.festival-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.festival-popup {
    background: var(--bg);
    color: var(--text);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    position: relative;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: slide-down 0.5s ease-out;
}

.festival-popup h2 {
    color: var(--primary);
    font-size: 2em;
    margin-top: 0;
}

.festival-popup p {
    font-size: 1.1em;
    margin-bottom: 20px;
}

.festival-popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: var(--text);
    cursor: pointer;
}

#welcome-message {
    display: block;
}

#normal-slider {
    display: none;
}