:root {
    --orange: #E67E22;
    --dark-orange: #D35400;
    --brown: #3E2723;
    --cream: #FFEBD6;
    --white: #ffffff;
    --text: #333;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }
html { scroll-behavior: smooth; }
body { background-color: #FFEBD6; color: var(--text); overflow-x: hidden; }

/* Navigation Fix */
nav {
    background: var(--brown); /* Ensures it is solid brown */
    padding: 1.2rem 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed; /* Changed from sticky to fixed for better slideshow overlay */
    width: 100%;
    top: 0;
    z-index: 9999; /* Forces nav to stay ABOVE everything else */
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); /* Adds separation from the content */
}

.logo { color: white; font-weight: 800; font-size: 1.5rem; letter-spacing: 1px; }
nav ul { display: flex; list-style: none; }
nav ul li { margin-left: 30px; }
nav ul li a { color: white; text-decoration: none; font-weight: 500; font-size: 1.2
    rem; transition: 0.3s; }
nav ul li a:hover { color: var(--orange); }

/* Hero Section: Clean Slideshow Only */
.hero {
    height: 100vh;
    background: transparent; /* Removed #000 */
    position: relative;
    overflow: hidden;
    padding-top: 0; /* Removed the 80px offset */
}

.slideshow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Sits behind the Nav */
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    filter: none; /* Ensures no dark filters */
}

.slide.active {
    opacity: 1;
}

/* Optional: Ensure buttons don't have transparent backgrounds if text is still hard to read */
.btn-secondary {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
}

/* Buttons */
.btn { padding: 15px 35px; border-radius: 50px; text-decoration: none; font-weight: bold; transition: 0.3s; display: inline-block; text-align: center; }
.btn-primary { background: var(--orange); color: white; border: none; }
.btn-primary:hover { background: var(--dark-orange); transform: scale(1.05); }
.btn-secondary { border: 2px solid white; color: white; margin-left: 15px; }
.btn-secondary:hover { background: white; color: var(--brown); }

/* Layout Sections */
.section { padding: 80px 10% 100px; }
.grey-bg { background: #FFF5EC; }
.text-center { text-align: center; margin-bottom: 40px; }
.subtitle { color: var(--orange); font-weight: bold; letter-spacing: 2px; text-transform: uppercase; font-size: 0.9rem; }
h2 { font-size: 3rem; color: var(--brown); margin-bottom: 30px; }

.flex-row { display: flex; align-items: center; gap: 60px; }
.content-box { flex: 1; }
.image-box { flex: 1; }
.image-box img { width: 100%; border-radius: 20px; box-shadow: 20px 20px 0px var(--orange); }

/* --- REDONE Vision Banner --- */
.vision-banner {
    min-height: 60vh; /* Changed to min-height for content safety */
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), 
                url('https://images.unsplash.com/photo-1503676260728-1c00da094a0b?q=80&w=2022&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 15%; /* Added vertical padding */
    
    @media (pointer: coarse) {
    .vision-banner, .slide {
        background-attachment: scroll !important;
    }
}
}

/* New specific selector for the text inside the banner */
.vision-banner h2 {
    color: var(--white); /* High contrast white text */
    font-size: 1.8rem;    /* Balanced size: smaller but readable */
    line-height: 1.6;    /* Increased for "lookability" */
    font-weight: 400;
    letter-spacing: 1px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5); /* Helps text pop off the image */
    font-style: italic;  /* Gives it a visionary/quote feel */
}

/* UPDATED Mission Section Styles */
.mission-section {
    background-color: var(--cream); /* This changes the whole section background */
    text-align: center;
    padding: 100px 10%; /* Added padding for better spacing */
}

.mission-box {
    max-width: 900px;
    margin: 0 auto;
    padding: 50px;
    background-color: var(--white); /* This makes the box a different color (White) */
    border: none; /* Removed the old border */
    border-radius: 30px; /* Softer rounded corners */
    box-shadow: 0 15px 40px rgba(0,0,0,0.05); /* Added a soft shadow to lift the box */
}

.mission-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.point {
    background: #fdf2e7; /* A slightly darker shade than the white box */
    padding: 20px;
    border-radius: 15px;
    color: var(--brown);
}

.point strong {
    color: var(--dark-orange);
    display: block;
    margin-bottom: 5px;
}

.leadership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.leader-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Swaps image to the left and text to the right */
.leader-header {
    display: flex;
    flex-direction: row-reverse; /* This flips the order of the children */
    justify-content: flex-end;   /* Aligns them to the left of the card */
    align-items: center;         /* Centers them vertically */
    margin-bottom: 15px;
    gap: 20px;                   /* Adds consistent spacing between pic and text */
}

/* Ensures the text aligns left now that it is on the right */
.leader-text {
    flex: 1;
    padding-right: 0; 
    text-align: left;
}

.leader-role {
    font-size: 0.8rem;
    color: #d35400; /* Orange theme */
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.leader-name {
    font-size: 1.2rem;
    color: #3e2723; /* Brown theme */
    margin: 0;
}

.leader-image {
    width: 100px;
    height: 100px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.leader-body p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
}

.read-more-link {
    background: none;
    border: none;
    color: #d35400;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    margin-top: 10px;
    text-decoration: underline;
}

/* Add !important to ensure JS overrides any other styles */
.hidden-content {
    display: none !important;
}

.visible-content {
    display: block !important;
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Trust Cards */
.grid-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 50px; }
.glass-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Smooth "bounce" transition */
    background:#ffffff;
    padding: 40px 30px;
    border-radius: 20px;
    border-bottom: 5px solid transparent; /* Hidden border by default */
}

.glass-card:hover {
    transform: translateY(-12px); /* Lifts the card up */
    box-shadow: 0 20px 40px rgba(230, 126, 34, 0.2); /* Soft orange shadow */
    border-bottom: 5px solid var(--orange); /* Reveals the orange strip */
    background-color:#ffffff; 
}


/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.gallery-item { 
    height: 280px; 
    background-size: cover; 
    background-position: center; 
    border-radius: 12px; 
    transition: 0.3s;
}
.gallery-item:hover { transform: scale(1.03); }

/* --- FORM RESOLUTION FIX --- */
.footer { background: var(--brown); color: white; padding: 80px 10% 20px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.5fr; gap: 50px; }
.footer h3 { color: var(--orange); margin-bottom: 25px; }

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Ensures fields don't overlap */
}

.contact-form input, 
.contact-form select, 
.contact-form textarea {
    width: 100%; /* Forces fields to take full width of column */
    padding: 12px;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 1rem;
}

.contact-form select {
    color: #ccc;
    cursor: pointer;
}

.contact-form select option {
    background-color: var(--brown); /* Sets list to your brown */
    color: white;
}
.contact-form input::placeholder, 
.contact-form textarea::placeholder {
    color: #ddd;
}   

.map-placeholder {
    width: 100%;
    height: 150px;
    background: rgba(255,255,255,0.05);
    margin-top: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 15px; }
.footer-links a { color: #ccc; text-decoration: none; transition: 0.3s; }
.footer-links a:hover { color: var(--orange); padding-left: 10px; }

.bottom-bar { 
    text-align: center; 
    border-top: 1px solid rgba(255, 255, 255, 0.736); 
    margin-top: 60px; 
    padding-top: 20px; 
    font-size: 0.8rem; 
    opacity: 0.6; 
}

/* --- UNIVERSAL MOBILE RESPONSIVENESS --- */
@media screen and (max-width: 1024px) {
    /* 1. Reset Global Layout for Mobile */
    html, body {
        overflow-x: hidden; /* Prevents the horizontal scroll "wiggle" */
        width: 100%;
    }

    /* 2. Navigation & Logo Scaling */
    nav {
        padding: 10px 5% !important;
        height: auto;
        flex-direction: column; /* Stacks logo and menu if they get too tight */
        gap: 10px;
    }

    .logo-container {
        gap: 10px;
    }

    .nav-logo {
        height: 35px !important;
    }

    .school-name {
        font-size: 1.2rem !important;
    }

    .tagline {
        font-size: 0.6rem !important;
        letter-spacing: 2px !important;
    }

    nav ul {
        width: 100%;
        justify-content: center;
        margin: 0;
    }

    nav ul li {
        margin: 0 10px !important;
    }

    nav ul li a {
        font-size: 0.9rem !important;
    }

    .hero {
        /* Reduce this percentage to make the brown area smaller */
        height: 30vh !important; 
        min-height: 200px;
        margin-top: 70px; /* Adjust based on your nav height */
    }


     .slide {
        /* This forces the image to show its full width without cropping */
        background-size: contain !important; 
        background-position: center center !important;
        background-repeat: no-repeat !important;
        background-color: #3E2723; /* Matches your brown theme to fill any gaps */
    }

    .btn {
        width: 100%; /* Full width buttons are better for thumbs */
        margin: 0 !important;
        padding: 12px 20px !important;
    }

    /* 4. Content Sections & Flex-Rows */
    .section {
        padding: 40px 5% !important; /* Smaller vertical breathing room */
    }

    h2 {
        font-size: 2rem !important;
        text-align: center;
    }

    .flex-row {
        flex-direction: column !important; /* Vertical stack: Image then Text */
        gap: 30px !important;
    }

    .image-box {
        order: -1; /* Always puts image above the text */
        width: 100%;
    }

    .image-box img {
        box-shadow: 10px 10px 0px var(--orange); /* Smaller shadow for mobile */
    }

    /* 5. Mission & Vision Banners */
    .mission-box {
        padding: 30px 20px !important;
    }

    .vision-banner {
        min-height: 30vh !important;
        padding: 20px 10% !important;
    }

    .vision-banner h2 {
        font-size: 1.3rem !important;
        line-height: 1 !important;
    }

    /* 6. Grid Layouts (Cards) */
    .grid-three, .gallery-grid {
        grid-template-columns: 1fr !important; /* Forces 1 card per row */
        gap: 20px;
    }

    .glass-card {
        padding: 30px 20px !important;
    }

    .map-placeholder {
        /* This ensures the map box never exceeds the screen width */
        width: 90% !important; 
        max-width: 100% !important;
        
        /* Forces the container to be centered */
        margin: 20px auto !important; 
        
        /* Ensures any content inside (like an iframe or image) scales to fit */
        display: flex;
        justify-content: center;
        overflow: hidden; 
        
        /* Adjust height for mobile so it doesn't take up the whole screen */
        height: 250px !important; 
    }

    .map-placeholder img, 
    .map-placeholder iframe {
        /* This forces the actual map content to fit exactly inside the box */
        width: 100% !important;
        height: 100% !important;
        object-fit: cover; /* Keeps the map looking sharp without stretching */
    }

    /* 7. Footer & Form */
    .footer-grid {
        display: flex !important;
        padding: 0 15px !important; 
        width: 100% !important;
        overflow: hidden;
        flex-direction: column !important; /* Stacks Contact Info, Links, and Form vertically */
        gap: 30px !important;
    }

    .contact-form {
        display: flex !important; /* Ensures it's not hidden */
        order: 2; /* Adjust this number to move the form up or down in the stack */
    }

    .footer {
        padding: 40px 5% 20px !important; /* Reduce padding so content fits */
    }
   
    /* 8. Popups */
    .popup-image-container {
        width: 90%;
        max-height: 80vh;
    }
}

/* Specific fix for very small screens (iPhone SE / Fold) */
@media screen and (max-width: 380px) {
    .hero h1 { font-size: 1.8rem !important; }
    nav ul li a { font-size: 0.75rem !important; }
}

.emoji-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1; pointer-events: none; overflow: hidden;
}

.floating-emoji {
    position: absolute;
    font-size: 2.5rem;
    opacity: 0.12;
    animation: drift 20s infinite linear;
}

@keyframes drift {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(40px, -60px) rotate(25deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}   

/* Emoji Placements */
.floating-emoji:nth-child(1) { top: 10%; left: 5%; }
.floating-emoji:nth-child(2) { top: 20%; left: 80%; animation-delay: -2s; }
.floating-emoji:nth-child(3) { top: 50%; left: 15%; animation-delay: -5s; }
.floating-emoji:nth-child(4) { top: 70%; left: 85%; animation-delay: -8s; }
.floating-emoji:nth-child(5) { top: 40%; left: 45%; }
.floating-emoji:nth-child(6) { top: 85%; left: 20%; animation-delay: -3s; }

.hidden-content {
    display: none;
}

.show-content {
    display: block !important;
}

/* Container for both Logo and Text */
.logo-container {
    display: flex;
    align-items: center; /* Vertically centers the logo with the text */
    gap: 15px; /* Adds space between the logo and the name */
}

/* Adjust the size of the logo image */
.nav-logo {
    height: 50px; /* Adjust this height based on your preference */
    width: auto;
}

/* Positioning the Name and Tagline */
.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.school-name {
  color: #fbb03b; /* Orange color */
  font-size: 2rem;
  margin: 0;
  font-weight: 700;
  letter-spacing: 1px;
}

.school-name .uppercase {
  text-transform: uppercase;
}

.tagline {
  color: #7b1d22; /* Maroon color */
  font-family: 'Lato', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 6px; /* High spacing like the logo */
  margin-top: -5px;
  text-transform: lowercase;
}

/* Custom Dropdown Styling */
.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
}

.custom-select {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
    color: #ccc;
    cursor: pointer;
}

.custom-select-trigger {
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.custom-select-trigger:after {
    content: "▼";
    font-size: 10px;
    color: var(--orange);
}

.custom-options {
    position: absolute;
    display: block;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--brown);
    border: 1px solid rgba(255,255,255,0.2);
    border-top: 0;
    border-radius: 0 0 5px 5px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 2;
    transition: all 0.2s;
}

.custom-select.open .custom-options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.custom-option {
    position: relative;
    display: block;
    padding: 10px 12px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

/* THE CREAM HOVER FIX */
.custom-option:hover {
    background: var(--cream);
    color: var(--brown); /* Dark text on light background for readability */
}
/* 1. Ensure the overlay itself is centered */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85); /* Dark background to focus on image */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000; /* Extremely high to stay above nav */
}

.popup-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Remove or comment out .popup-action and #popup-btn */

/* Ensure the image link takes up the full space */
#popup-image-link {
    display: block;
    cursor: pointer;
    line-height: 0;
}

/* Optional: Add a slight dim or scale effect when hovering over the image 
   to let users know it is clickable */
#popup-image-link:hover .popup-img {
    filter: brightness(0.9);
    transition: 0.3s;
}

/* Keep your existing .popup-image-container and .close-popup styles */
.popup-image-container {
    position: relative; 
    max-width: 750px;
    width: 95%;
    border-radius: 20px;
    overflow: hidden;
    line-height: 0;
    box-shadow: 0 15px 50px rgba(0,0,0,0.6);
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 35px;
    color: white;
    text-shadow: 0 0 10px rgba(0,0,0,0.5); /* Makes 'X' visible on light images */
    cursor: pointer;
    font-weight: bold;
    z-index: 10001;
}

#popup-btn:hover {
    background: #D35400 !important;
    transform: scale(1.05);
}

/* Enhanced Shadow Effect for All Read More Buttons */
.btn-primary, .advisor-btn, #read-more-btn {
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4); /* Subtle orange-tinted shadow */
    transition: all 0.3s ease;
    border: none;
}

/* Hover state: Lifts the button and deepens the shadow */
.btn-primary:hover, .advisor-btn:hover, #read-more-btn:hover {
    box-shadow: 0 8px 25px rgba(230, 126, 34, 0.6);
    transform: translateY(-3px) scale(1.02);
}

/* Specific Shadow for Director Box Button (since it is on dark brown) */
.director-box .btn-secondary {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    margin-left: 0; /* Aligning with the director text */
}

/* Matching backgrounds globally */
.grey-bg, body, .mission-section {
    background-color: #FFEBD6 !important; /* Forces all cream sections to match perfectly */
}

/* Learning Section Specific Responsive Grid */
.learning-approach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    align-items: start;
    justify-items: center;
    width: 100%;
}

.learning-approach-grid .image-box {
    width: 100%;
    max-width: 550px; /* Zoom karne par zyada bada na ho */
}

.learning-approach-grid img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    box-shadow: 20px 20px 0px var(--orange);
    transition: transform 0.3s ease;
}

/* Tablet aur Mobile ke liye adjustments */
@media screen and (max-width: 1024px) {
    .learning-approach-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .learning-approach-grid .image-box {
        max-width: 90%;
    }
    .learning-approach-grid img {
        box-shadow: 10px 10px 0px var(--orange); /* Chota shadow for mobile */
    }
}

#headmistress .image-box {
    flex: 1;
    max-width: 500px; /* This stops the image from becoming huge like in your screenshot */
    position: relative;
    overflow: hidden; /* This makes the zoom stay INSIDE the box */
    border-radius: 20px;
    box-shadow: -20px 20px 0px var(--orange); /* The signature Neev shadow */
    line-height: 0; /* Removes tiny gap at bottom of image */
}

#headmistress .image-box img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.5s ease-in-out !important; /* The zoom speed */
    display: block;
}

/* The Zoom Sensitivity */
#headmistress .image-box:hover img {
    transform: scale(1.02); /* Zooms in 5% on hover */
}

#headmistress .content-box {
    flex: 1.2;
}

/* Mobile Fixes */
@media screen and (max-width: 1024px) {
    #headmistress .flex-row {
        flex-direction: column !important;
    }
    #headmistress .image-box {
        max-width: 100%;
        box-shadow: -10px 10px 0px var(--orange);
        margin-bottom: 30px;
    }
}

/* Updated Video Player for Responsive Zooming */
.video-container {
    position: relative;
    width: 100%;
    max-width: 1200px; /* Limits size on large screens/zoom-out */
    margin: 0 auto;  /* Centers the player */
    aspect-ratio: 16 / 9; 
    background: #000; 
    border-radius: 15px;
    overflow: hidden; 
    box-shadow: 0 10px 30px rgba(62, 39, 35, 0.3);
    border: 4px solid var(--orange);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Prevents cropping during zoom changes */
    display: block;
}

/* Ensure the flex container doesn't restrict zoom-out */
#podcast .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}