/* 
   Vedant Convent High School - Premium Styles
   Theme: Dark Blue, White, Gold Accents
   Style: Apple-inspired, Minimal, Modern
*/

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-blue: #001f3f;
    --accent-gold: #d4af37;
    --text-white: #ffffff;
    --text-dark: #1d1d1f;
    --bg-light: #f5f5f7;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- Loading Animation --- */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Soft light-blue background with premium radial depth inspired by theme */
    background: radial-gradient(circle at center, #edf4fc 0%, #dbecfe 50%, #bddbfe 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999; /* Higher than any header overlays */
    opacity: 1;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.loader-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 250px;
    height: 250px;
}

.loader-ring {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 4px solid rgba(0, 31, 63, 0.05);
    /* School blue and accent gold dual-active rotating indicator segments */
    border-top: 4px solid var(--primary-blue);
    border-right: 4px solid var(--accent-gold);
    border-radius: 50%;
    animation: loader-spin 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    box-shadow: 0 0 15px rgba(0, 31, 63, 0.05);
}

.loader-logo {
    width: 130px;
    height: 130px;
    object-fit: contain;
    z-index: 10;
    /* Soft glowing dropshadow ensuring sharp logo visibility on the soft background */
    filter: drop-shadow(0 10px 25px rgba(0, 31, 63, 0.12));
    animation: logo-pulse 2.5s ease-in-out infinite alternate;
}

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

@keyframes logo-pulse {
    0% {
        transform: scale(0.97);
        filter: drop-shadow(0 8px 20px rgba(0, 31, 63, 0.1)) drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
    }
    100% {
        transform: scale(1.03);
        filter: drop-shadow(0 18px 35px rgba(0, 31, 63, 0.18)) drop-shadow(0 0 30px rgba(255, 255, 255, 0.8));
    }
}

/* Responsive adjustment for extra-mobile screens to ensure perfect proportions */
@media (max-width: 480px) {
    .loader-container {
        width: 190px;
        height: 190px;
    }
    .loader-ring {
        width: 150px;
        height: 150px;
        border-width: 3px;
    }
    .loader-logo {
        width: 95px;
        height: 95px;
    }
}

/* --- Header & Navigation --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    padding: 15px 50px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff; /* Highly visible white by default on dark hero background */
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: var(--transition);
}

header.scrolled .logo {
    color: var(--primary-blue); /* Solid dark blue when scrolled over the frosted white header background */
}

.logo img {
    height: 40px;
    width: auto;
}

.menu-btn {
    cursor: pointer;
    z-index: 1001;
    width: 26px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0; /* Prevents squishing on extra-narrow viewport mobile browsers */
    box-sizing: content-box !important; /* Crucial! Prevents padding from squashing the 18px internal height to 0 under border-box */
}

.menu-btn span {
    display: block;
    width: 100%;
    height: 2.5px;
    background: #ffffff; /* Highly visible white by default on dark hero background */
    border-radius: 2px;
    transition: var(--transition);
}

header.scrolled .menu-btn span {
    background: #000000; /* Contrast black when scrolled over the frosted white header background */
}

.menu-btn.active span,
header.scrolled .menu-btn.active span,
header .menu-btn.active span {
    background: #ffffff !important; /* Remains bright white when mobile overlay is active (since menu modal has dark blue overlay background) */
}

.menu-btn.active span:nth-child(1) {
    transform: translateY(7.75px) rotate(45deg);
}

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

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

/* --- Overlay Menu --- */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 31, 63, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.nav-links {
    list-style: none;
    text-align: center;
}

.nav-links li {
    margin: 20px 0;
    overflow: hidden;
}

.nav-links a {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-white);
    text-decoration: none;
    display: block;
    transition: var(--transition);
    transform: translateY(100%);
}

.nav-overlay.active .nav-links a {
    transform: translateY(0);
}

.nav-links a:hover {
    color: var(--accent-gold);
    letter-spacing: 5px;
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    width: 100%;
    background-color: #001f3f; /* Deep dark blue background fallback for instant contrast and safe rendering on mobile */
    background-image: url('https://images.unsplash.com/photo-1523050854058-8df90110c9f1?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text-white);
    padding: 0 20px;
    position: relative; /* Containing block for absolute overlay */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 31, 63, 0.65); /* Rich dark blue overlay ensuring high contrast for all devices */
    z-index: 1;
}

.hero > * {
    position: relative;
    z-index: 2; /* Visual content stays beautifully elevated on top */
}

.hero h1 {
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.5s;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.8s;
}

.btn {
    padding: 15px 40px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transition);
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: var(--accent-gold);
    color: var(--primary-blue);
}

.btn-primary:hover {
    background: var(--text-white);
    transform: scale(1.05);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Section Styling --- */
section {
    padding: 100px 10%;
}

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

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.section-title .underline {
    width: 80px;
    height: 4px;
    background: var(--accent-gold);
    margin: 0 auto;
}

/* --- School Info & Form Wrapper (Info Cards) --- */
.school-info, .form-wrapper {
    display: flex;
    align-items: center;
    gap: 50px;
    background: #fdfdfe; /* Almost white but distinct */
    padding: 50px;
    border-radius: 30px;
    box-shadow: 0 15px 50px rgba(0, 31, 63, 0.1);
    border: 1px solid rgba(0, 31, 63, 0.08);
    position: relative;
    overflow: hidden;
}

.school-info::before, .form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--accent-gold);
}

.info-logo img {
    width: 150px;
}

.info-content h3 {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 15px;
}

.school-info {
    transition: var(--transition);
}

.school-info:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.12);
}

/* --- Admission Form Special Styling --- */
.form-wrapper {
    display: block; 
    margin-top: 40px;
    background: #fdfdfe;
    padding: 30px;
    text-align: left;
    max-height: min(850px, 75vh);
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    border: 2px solid rgba(0, 31, 63, 0.08);
    box-shadow: 0 15px 50px rgba(0, 31, 63, 0.06);
    border-radius: 20px;
    
    /* Elegant and wide scrollbars for Firefox */
    scrollbar-width: auto;
    scrollbar-color: var(--accent-gold) #f4f5f8;
}

/* WebKit-based browsers (Chrome, Safari, Edge) custom scrollbar */
.form-wrapper::-webkit-scrollbar {
    width: 16px; /* High visibility, extra wide scrollbar */
}

.form-wrapper::-webkit-scrollbar-track {
    background: #f4f5f8;
    border-radius: 12px;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.03);
}

.form-wrapper::-webkit-scrollbar-thumb {
    background-color: var(--accent-gold);
    background-image: linear-gradient(180deg, var(--accent-gold) 0%, #b8860b 100%);
    border-radius: 12px;
    border: 4px solid #f4f5f8; /* Padding space around thumb */
    cursor: pointer;
}

.form-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-blue);
    background-image: linear-gradient(180deg, var(--primary-blue) 0%, #001224 100%);
}

.form-wrapper iframe {
    height: 1900px !important; /* Force a tall height so Google Form itself doesn't have an internal scrollbar */
    width: 100%;
}

/* --- Info/Tip Callout --- */
.info-callout {
    margin: 40px auto;
    padding: 30px 45px;
    background: #fff9e6; /* Warmer, more visible gold tint */
    border-radius: 20px;
    border-left: 6px solid var(--accent-gold);
    text-align: center;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.1);
}

.info-callout p {
    margin: 0;
    font-weight: 400;
    color: var(--primary-blue);
    font-size: 1.1rem;
}

/* --- Leadership Section --- */
.leadership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.leader-card {
    background: white;
    padding: 40px;
    border-radius: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.leader-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.leader-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 20px;
    overflow: hidden;
    border: 5px solid var(--bg-light);
}

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

.leader-card h4 {
    font-size: 1.2rem;
    color: var(--primary-blue);
    margin-bottom: 5px;
}

.leader-card span {
    color: var(--accent-gold);
    font-weight: 600;
    display: block;
    margin-bottom: 15px;
}

/* --- Why Choose Us --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 40px;
    border-radius: 30px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    background: var(--primary-blue);
    color: white;
}

.feature-card i {
    font-size: 3rem;
    color: var(--accent-gold);
    margin-bottom: 20px;
}

.feature-card:hover h4 {
    color: white;
}

/* --- Achievements --- */
.achievements {
    background: var(--primary-blue);
    color: white;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 50px;
}

.stat-item {
    text-align: center;
}

.stat-item h3 {
    font-size: 3.5rem;
    color: var(--accent-gold);
}

/* --- Testimonials --- */
.testimonial-slider {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.testimonial-item {
    display: none;
    animation: fadeIn 0.5s;
}

.testimonial-item.active {
    display: block;
}

.testimonial-item p {
    font-style: italic;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.testimonial-item h5 {
    font-weight: 600;
    color: var(--primary-blue);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- Gallery Grid --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    height: 250px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 31, 63, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: white;
    font-size: 2rem;
}

/* --- Lightbox --- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
}

.lightbox img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 10px;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* --- Contact Page --- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h3 {
    margin-bottom: 20px;
    color: var(--primary-blue);
}

.contact-info p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
    outline: none;
}

.map-container {
    margin-top: 50px;
    border-radius: 20px;
    overflow: hidden;
    height: 400px;
}

/* --- Admission Page --- */
.admission-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

iframe {
    width: 100%;
    border: none;
}

/* --- Footer --- */
footer {
    background: var(--primary-blue);
    color: white;
    padding: 80px 10% 30px;
}

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

.footer-col h4 {
    color: var(--accent-gold);
    margin-bottom: 25px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
}

/* --- Responsiveness --- */

/* Global Touch Targets & Safe Layout Enhancements */
html, body {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}

.menu-btn {
    /* Safe enlarged touch hitbox area (54px x 44px) */
    padding: 12px;
    margin: -12px;
}

/* Ensure mobile interactive targets have comfortable dimensions */
.nav-links a, .footer-col ul li a, .footer-col a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

/* Base style scaling */
@media (min-width: 1200px) {
    section {
        padding: 100px 12%;
    }
}

@media (max-width: 1024px) {
    .hero {
        background-attachment: scroll !important; /* Disables buggy fixed background scroll rendering of iOS Safari and Android Chrome */
    }
    section {
        padding: 80px 6%;
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

@media (max-width: 992px) {
    .hero h1 { 
        font-size: clamp(2.5rem, 8vw, 4rem); 
    }
    .hero p {
        font-size: clamp(1.1rem, 3vw, 1.4rem);
    }
    .contact-container { 
        grid-template-columns: 1fr; 
        gap: 40px;
    }
    .leader-card, .feature-card {
        padding: 30px 20px;
    }
}

@media (max-width: 768px) {
    header { 
        padding: 15px 25px; 
        background: rgba(255, 255, 255, 0.95) !important; /* Guarantees a clean, elegant visible header on all mobile devices immediately */
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05) !important;
        border-bottom: 1px solid rgba(0, 31, 63, 0.08) !important;
    }
    header.scrolled {
        padding: 12px 25px;
    }
    header .logo {
        color: var(--primary-blue) !important; /* High contrast reading label */
    }
    header .menu-btn:not(.active) span {
        background: #000000 !important; /* Perfect high-visibility true black hamburger lines when closed */
    }
    .logo {
        font-size: 1.15rem !important;
    }
    .logo span {
        white-space: normal;
        max-width: 210px;
        line-height: 1.25;
    }
    .school-info { 
        flex-direction: column; 
        text-align: center; 
        padding: 30px 20px;
        gap: 30px;
    }
    .info-logo {
        margin: 0 auto;
    }
    .info-content h3 {
        font-size: 1.6rem;
    }
    .nav-links li {
        margin: 15px 0;
    }
    .nav-links a { 
        font-size: 1.8rem; 
    }
    .nav-overlay {
        padding: 80px 20px 40px;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }
    .nav-overlay.active {
        display: flex;
    }
    section {
        padding: 60px 4%;
    }
    .features-grid, .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 20px;
    }
    .form-wrapper {
        padding: 20px 15px;
        max-height: 70vh;
    }
    .info-callout {
        padding: 20px;
        margin: 30px auto;
    }
    .info-callout p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 12px 15px;
    }
    header.scrolled {
        padding: 10px 15px;
    }
    .logo {
        font-size: 1rem !important;
        gap: 6px;
    }
    .logo span {
        white-space: normal;
        max-width: 165px;
        line-height: 1.15;
    }
    .hero {
        padding: 0 15px;
    }
    .hero h1 { 
        font-size: 2rem; 
        line-height: 1.3;
    }
    .hero p { 
        font-size: 1rem;
        margin-bottom: 30px;
    }
    .btn {
        padding: 12px 30px;
        font-size: 0.95rem;
    }
    section {
        padding: 50px 15px;
    }
    .section-title {
        margin-bottom: 40px;
    }
    .section-title h2 {
        font-size: 1.8rem;
    }
    .school-info {
        padding: 20px 15px;
        border-radius: 20px;
    }
    .school-info::before, .form-wrapper::before {
        width: 100%;
        height: 5px;
        top: 0;
        left: 0;
    }
    .info-content h3 {
        font-size: 1.4rem;
    }
    .info-content p {
        font-size: 0.95rem;
    }
    .features-grid, .gallery-grid, .maps-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .gallery-item {
        height: 200px;
    }
    .stat-item h3 {
        font-size: 2.8rem;
    }
    .achievements {
        padding: 40px 15px;
        gap: 30px;
    }
    .testimonial-item p {
        font-size: 1rem;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    footer {
        padding: 50px 15px 20px;
    }
    .form-wrapper {
        border-radius: 15px;
    }
    .maps-section {
        padding-top: 30px;
        margin-top: 30px;
    }
    .maps-section h3 {
        font-size: 1.4rem !important;
    }
}

/* Landscape and low-height screen orientation adaptations */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 400px;
        padding: 80px 20px;
    }
    .nav-overlay {
        padding: 80px 20px 20px;
        align-items: flex-start;
    }
    .nav-links {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px 40px;
        text-align: left;
    }
    .nav-links li {
        margin: 5px 0;
    }
    .nav-links a {
        font-size: 1.3rem;
    }
}
