/* 
   VMES Urdu School Website - Main Stylesheet 
   Theme: Montessori, Natural, Sage & Cream
*/

:root {
    /* Color Palette */
    --primary-color: #7F9B76;
    /* Deep Sage - for strong elements, text, buttons */
    --primary-light: #A8BFA3;
    /* Sage Green - for softer accents, borders */
    --secondary-color: #C97C5D;
    /* Muted Terracotta - for accents/CTAs */
    --text-dark: #2F2F2F;
    /* Charcoal */
    --text-light: #5E5E5E;
    /* Softer Charcoal */

    /* Backgrounds */
    --bg-white: #F6F3EE;
    /* Warm Cream - Main Body BG */
    --bg-light: #E9E4DB;
    /* Light Linen - Section BG */
    --bg-card: #FFFFFF;
    /* Pure White for cards to pop against cream */

    --border-color: #D8D0C5;

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --spacing-xxl: 8rem;
    /* Adjusted for slightly smaller banners */

    /* UI Structure */
    --container-width: 1200px;
    --radius-sm: 8px;
    --radius-md: 20px;
    --radius-lg: 30px;
    --shadow-soft: 0 10px 30px rgba(127, 155, 118, 0.15);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.7;
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-sm);
}

/* Utility Classes */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    /* Increased padding for softer feel */
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    /* Larger, more touch-friendly */
    border-radius: 50px;
    /* Pill shape for Montessori feel */
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    /* Subtle shadow */
}

.btn-primary {
    background-color: var(--primary-color);
    color: #FFFFFF;
}

.btn-primary:hover {
    background-color: #6a8562;
    /* Darker Sage */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(127, 155, 118, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: #FFFFFF;
}

.btn-secondary:hover {
    background-color: #b06548;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(201, 124, 93, 0.3);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    box-shadow: none;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #FFFFFF;
}

.section-padding {
    padding: var(--spacing-lg) 0;
}

.text-center {
    text-align: center;
}

/* Header & Navigation */
/* Main Header - z-index context */
.main-header {
    background-color: transparent;
    /* Moved to ::before */
    border-bottom: none;
    /* Moved to ::before */
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: var(--spacing-sm) 0;
}

/* Header Background Layer */
.main-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100%;
    background-color: var(--bg-white);
    /* Force Refresh */
    z-index: 5;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    /* Context for children */
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #000000;
    position: relative;
    z-index: 10;
    /* Above Header BG */
}

.logo-img {
    height: 95px;
    /* Bigger logo */
    width: auto;
    object-fit: contain;
}

/* New class for the long school text */
.logo-text {
    font-size: 1.2rem;
    /* Slightly bigger */
    line-height: 1.3;
    color: #000000;
    /* Black text */
    font-weight: 700;
    /* Bolder */
    display: inline-block;
    text-align: left;
    /* Ensure left alignment next to icon */
}

.nav-menu {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
    align-items: center;
    position: relative;
    z-index: 10;
    /* Above Header BG */
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
    white-space: nowrap;
    /* Prevent "About Us" from wrapping */
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

/* Underline animation for links */
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 0.5rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
    list-style: none;
    display: flex;
    /* Ensure it behaves as a block/flex for items */
    flex-direction: column;
    gap: 0;
    border-top: 3px solid var(--primary-color);
    /* Visual accent */
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background-color 0.2s, color 0.2s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-menu li:last-child a {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background-color: #f5f5f5;
    color: var(--primary-color);
    padding-left: 1.75rem;
    /* Subtle indent */
}

/* Mobile Dropdown styles */
@media (max-width: 768px) {
    .dropdown-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        /* Hidden by default on mobile */
        padding-left: 1rem;
        border-top: none;
        background-color: transparent;
    }

    .dropdown.active .dropdown-menu {
        display: block;
        /* Shown when toggled */
    }

    .dropdown>a i {
        transition: transform 0.3s;
    }

    .dropdown.active>a i {
        transform: rotate(180deg);
    }
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    position: relative;
    z-index: 10;
    /* Above Header BG */
}

/* Hero Section */
.hero-section {
    background-color: var(--bg-light);
    padding: var(--spacing-xl) 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 0;
    height: 600px;
    /* Taller hero */

    /* Background Image with darker overlay for text readability */
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../assets/images/school-hero.png');
    background-size: cover;
    background-position: center;
}

.hero-content {
    background: transparent;
    padding: var(--spacing-md);
    max-width: 900px;
    /* Removed glassmorphism properties */
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-sm);
    color: #FFFFFF;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.5rem;
    color: #FFFFFF;
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 500;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
}

/* School Overview */
.overview-section {
    background-color: var(--bg-white);
}

/* Academic Levels - Cards */
.academic-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

.card {
    background: var(--bg-card);
    border: 1px solid rgba(168, 191, 163, 0.3);
    /* Subtle sage border */
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy effect */
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-soft);
    border-color: var(--primary-light);
}

.card h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

/* Why Choose Us - Icons */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    text-align: center;
}

.feature-item {
    padding: var(--spacing-md);
    background-color: var(--bg-white);
    border-radius: var(--radius-md);
    border: 1px dashed var(--primary-light);
    /* Playful dashed border */
}

.feature-item i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    /* Terracotta icons */
    margin-bottom: var(--spacing-sm);
}

/* Admissions Layout */
.admissions-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-xl);
    padding: var(--spacing-lg) var(--spacing-sm);
}

@media (max-width: 900px) {
    .admissions-layout {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}

/* Admissions Banner */
.admissions-banner {
    background-color: var(--primary-color);
    color: #FFFFFF;
    text-align: center;
    border-radius: var(--radius-md);
    margin: var(--spacing-md) var(--spacing-sm);
    /* Add margin so it floats */
}

.admissions-banner h2 {
    color: #FFFFFF;
    margin-bottom: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.admissions-heading {
    margin-bottom: var(--spacing-md);
    color: #4A148C;
}

@media (max-width: 900px) {
    .admissions-layout {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .admissions-heading {
        padding-top: var(--spacing-lg);
    }
}

/* Contact Layout */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    padding: var(--spacing-lg) var(--spacing-sm);
}

.contact-heading {
    margin-bottom: var(--spacing-md);
}

.contact-form-container {
    background-color: var(--bg-light);
    padding: var(--spacing-md);
    border-radius: 8px;
    height: fit-content;
    border-top: 5px solid var(--primary-color);
}

@media (max-width: 900px) {
    .contact-layout {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .contact-heading {
        padding-top: var(--spacing-lg);
    }
}

/* Page Titles */
.page-title {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../assets/images/school-hero.png');
    background-size: cover;
    background-position: center;
    color: #FFFFFF !important;
    padding: var(--spacing-xxl) 0;
    /* Increased padding for banner feel */
    text-align: center;
    border-bottom: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.page-title h1 {
    color: #FFFFFF;
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

/* Footer */
.main-footer {
    background-color: var(--primary-color);
    /* Deep Sage */
    color: #FFFFFF;
    padding: var(--spacing-lg) 0 var(--spacing-md);
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;
    margin-top: var(--spacing-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.footer-col h4 {
    color: #FFFFFF;
    /* White text */
    margin-bottom: var(--spacing-sm);
    font-weight: 800;
    /* Heavy font */
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.85);
}

.footer-links a:hover {
    color: #FFFFFF;
    padding-left: 5px;
    /* Subtle movement */
}

/* Gallery Carousel - Desktop Base */
.gallery-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-sm);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background-color: var(--bg-white);
        flex-direction: column;
        padding: 110px var(--spacing-md) var(--spacing-md);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        transform: translateY(-100%);
        z-index: 1;
        /* Below Header BG (5) */
        max-height: 100vh;
        overflow-y: auto;
    }

    .nav-menu.active {
        transform: translateY(0);
    }

    .mobile-menu-btn {
        display: block;
        margin-left: auto;
        /* Push to the right */
    }

    .logo-img {
        height: 60px;
        /* Smaller logo for mobile */
    }

    .hero-section {
        height: 500px;
        /* Reduced height for mobile */
        border-radius: 0;
    }

    .hero-content h1 {
        font-size: 2.2rem;
        /* Smaller heading */
    }

    .hero-content p {
        font-size: 1.1rem;
        /* Smaller paragraph */
    }

    .academic-cards {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .admissions-banner {
        margin: var(--spacing-sm);
    }

    /* Mobile Carousel Styles */
    .gallery-carousel {
        display: flex;
        /* Flex for mobile */
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: var(--spacing-sm);
        padding-bottom: 10px;
        /* Space for scrollbar if visible */
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Hide scrollbar Firefox */

        /* Break out of container padding for edge-to-edge scrolling */
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .gallery-carousel::-webkit-scrollbar {
        display: none;
        /* Hide scrollbar Chrome/Safari */
    }

    .gallery-carousel img {
        flex: 0 0 90%;
        /* Show 90% of image to hint at more */
        width: 90% !important;
        scroll-snap-align: center;
        margin-right: 0;
    }
}

/* Founder Page Banner */
.founder-banner {
    background-position: center;
}

@media (min-width: 769px) {
    .founder-banner {
        background-position: top center;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
        /* Reduced padding for mobile */
    }

    /* Footer Mobile Layout */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-sm) var(--spacing-sm);
        /* Row Column gap */
    }

    .footer-col:first-child {
        grid-column: 1 / -1;
        text-align: center;
        margin-bottom: var(--spacing-sm);
    }

    .footer-col:first-child h4 {
        font-size: 1.2rem;
    }

    /* Add padding to Quick Links for better alignment */
    .footer-col:nth-child(2) {
        padding-left: 1rem;
    }
}