/* Main Stylesheet for New Vindhya Niketan Vidhyalaya - Premium Redesign */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:wght@600;700&family=Noto+Sans+Devanagari:wght@300;400;500;600;700&display=swap');

:root {
    /* Primary Colors */
    --primary-purple: #667eea;
    --secondary-purple: #764ba2;
    --primary-dark: #4a3366;
    --primary-light: #9d7cc1;

    /* Accent Colors */
    --accent-gold: #d4af37;
    --accent-pink: #f093fb;
    --success-green: #43e97b;
    --info-blue: #4facfe;

    /* Base Colors */
    --white: #ffffff;
    --off-white: #f9f9f9;
    --text-dark: #2c2c2c;
    --text-light: #555555;
    --gray: #6b7280;

    /* Gradients - Matching Admin Portal */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --gradient-info: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-warning: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-gold: linear-gradient(135deg, #d4af37 0%, #f5d76e 100%);
    --gradient-hero: linear-gradient(rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.8));

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-bg-light: rgba(255, 255, 255, 0.1);
    --glass-border: 1px solid rgba(255, 255, 255, 0.3);
    --glass-blur: blur(10px);

    /* Shadows */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.15);
    --shadow-purple: 0 8px 16px rgba(102, 126, 234, 0.3);
    --shadow-green: 0 8px 16px rgba(67, 233, 123, 0.3);

    /* Spacing & Effects */
    --radius: 16px;
    --radius-sm: 8px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Fonts */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', 'Noto Sans Devanagari', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.7;
    background-color: var(--off-white);
    background-image:
        radial-gradient(at 10% 10%, rgba(232, 180, 232, 0.1) 0px, transparent 50%),
        radial-gradient(at 90% 90%, rgba(212, 175, 55, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Language Toggle Utility */
.lang-hi {
    display: none;
}

body.hindi-active .lang-en {
    display: none;
}

body.hindi-active .lang-hi {
    display: block;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--gradient-gold);
    transition: var(--transition);
    z-index: -1;
}

.btn-primary:hover::before {
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-purple);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary-purple);
}

/* Top Bar */
.top-bar {
    background: var(--primary-dark);
    color: var(--white);
    padding: 10px 0;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Header & Navbar */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
    padding: 5px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 24px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    height: 60px;
    width: auto;
    /* Removed border radius/border for cleaner look, or adapt if it's a square logo */
    object-fit: contain;
}

.school-name {
    display: flex;
    flex-direction: column;
}

.school-name h1 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--primary-purple);
    line-height: 1.1;
    font-weight: 700;
}

.motto {
    font-size: 0.85rem;
    color: var(--accent-gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding-bottom: 4px;
    transition: var(--transition);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-purple);
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--primary-purple);
}

.nav-menu a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-purple);
}

/* Hero Section */
.hero {
    min-height: 90vh;
    /* Nearly full screen */
    background: var(--gradient-hero), url('images/hero-bg.jpg');
    /* Need to ensure this image exists or fallback */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 100px 20px;
    position: relative;
}

/* Fallback if image missing - gradient is already there */

.hero-content {
    max-width: 900px;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

.welcome-text {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: var(--accent-gold);
    text-transform: uppercase;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-tagline {
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 40px;
}

.hero-highlights {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.highlight-span {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.95rem;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 8px;
}

.highlight-span::before {
    content: '✓';
    color: var(--accent-gold);
    font-weight: bold;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Sections General */
section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--primary-purple);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title p {
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Utility Classes */
.glassmorphism {
    background: var(--glass-bg-light);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--radius);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* Feature Cards (About, Values) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-purple);
    transition: var(--transition);
    z-index: -1;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card:hover::before {
    width: 100%;
    opacity: 0.05;
}

.card h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary-purple);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card p {
    color: var(--text-light);
    font-size: 1.05rem;
}

/* Gradient Cards */
.gradient-card {
    background: var(--white);
    color: var(--text-dark);
    border: none;
    position: relative;
    overflow: hidden;
}

.gradient-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--gradient-primary);
    z-index: 1;
}

.gradient-primary-card::before {
    background: var(--gradient-primary);
}

.gradient-success-card::before {
    background: var(--gradient-success);
}

.gradient-card .card-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.gradient-primary-card .card-icon {
    filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.3));
}

.gradient-success-card .card-icon {
    filter: drop-shadow(0 4px 8px rgba(67, 233, 123, 0.3));
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.gradient-card h3 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-success-card h3 {
    background: var(--gradient-success);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
}

.gradient-success-card:hover {
    box-shadow: 0 20px 40px rgba(67, 233, 123, 0.2);
}

/* Principal Message */
.principal-section {
    margin-top: 80px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    align-items: center;
    background: var(--white);
    padding: 50px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border-left: 6px solid var(--accent-gold);
}

.principal-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.principal-text h3 {
    font-family: var(--font-heading);
    color: var(--primary-purple);
    font-size: 2rem;
    margin-bottom: 20px;
}

.principal-text p {
    font-style: italic;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.principal-name {
    font-weight: 700;
    color: var(--primary-dark);
}

/* Academics */
.academics-section {
    background: var(--white);
}

.class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.class-item {
    background: var(--white);
    padding: 24px 20px;
    text-align: center;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--primary-purple);
    transition: var(--transition);
    border: 2px solid rgba(102, 126, 234, 0.1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.class-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.class-item:hover::before {
    opacity: 1;
}

.class-item:hover {
    color: var(--white);
    transform: scale(1.08) translateY(-4px);
    box-shadow: var(--shadow-purple);
    border-color: transparent;
}

/* Gallery / Events Section */
.gallery-section {
    background: linear-gradient(to bottom, #f9f9f9, #fff);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    height: 250px;
    box-shadow: var(--shadow-md);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    color: var(--white);
    transform: translateY(100%);
    transition: var(--transition);
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

.gallery-caption h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

/* Contact */
.contact-section {
    background: var(--primary-dark);
    color: var(--white);
    padding-bottom: 0;
    /* Align with footer */
}

.contact-section .section-title h2 {
    color: var(--white);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    background: var(--white);
    border-radius: var(--radius);
    padding: 50px;
    box-shadow: var(--shadow-lg);
    color: var(--text-dark);
    margin-bottom: -50px;
    /* Overlap footer slightly */
    z-index: 10;
    position: relative;
}

.info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fdfdfd;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-purple);
    outline: none;
    box-shadow: 0 0 0 4px rgba(107, 76, 154, 0.1);
}

/* Footer */
footer {
    background: #1a1a1a;
    color: #aaa;
    padding: 120px 0 30px;
    /* Extra top padding for contact overlap */
    font-size: 0.95rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-col h3 {
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 25px;
}

.footer-links a {
    display: block;
    color: #aaa;
    text-decoration: none;
    margin-bottom: 12px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-gold);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #333;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 992px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .principal-section {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .principal-image {
        margin: 0 auto;
        width: 80%;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.8rem;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 30px;
        box-shadow: var(--shadow-lg);
        gap: 15px;
        text-align: center;
    }

    .nav-menu.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .top-bar .contact-info {
        display: none;
    }

    .top-bar {
        justify-content: center;
    }
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--gradient-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-green);
    z-index: 999;
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 12px 24px rgba(67, 233, 123, 0.4);
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: var(--shadow-green);
    }

    50% {
        box-shadow: 0 12px 24px rgba(67, 233, 123, 0.5);
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-purple);
    z-index: 998;
    transition: var(--transition);
}

.scroll-to-top.visible {
    display: flex;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.4);
}

/* Image Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: var(--white);
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10000;
}

.lightbox-close:hover {
    color: var(--accent-pink);
    transform: rotate(90deg);
}

.lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    text-align: center;
    font-size: 1.2rem;
    padding: 15px 30px;
    background: var(--glass-bg-light);
    backdrop-filter: var(--glass-blur);
    border-radius: 50px;
    max-width: 80%;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--glass-bg-light);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    color: var(--white);
    font-size: 2rem;
    padding: 20px 25px;
    cursor: pointer;
    border-radius: 50%;
    transition: var(--transition);
    z-index: 10000;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--gradient-primary);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Mobile Adjustments for New Elements */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }

    .scroll-to-top {
        bottom: 90px;
        left: 20px;
        width: 45px;
        height: 45px;
    }

    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 40px;
    }

    .lightbox-prev,
    .lightbox-next {
        padding: 15px 20px;
        font-size: 1.5rem;
    }

    .lightbox-prev {
        left: 15px;
    }

    .lightbox-next {
        right: 15px;
    }

    .lightbox-caption {
        font-size: 1rem;
        padding: 10px 20px;
        bottom: 20px;
    }
}