/* ========================================
   MOBILE-FIRST RESPONSIVE DESIGN
   ======================================== */

/* Mobile-First Hero Typography */
.hero-content h1 {
    font-size: clamp(2rem, 8vw, 4.5rem);
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.hero-content p {
    font-size: clamp(0.95rem, 3vw, 1.2rem);
    max-width: 650px;
    margin: 0 auto 2rem;
    color: #f5f5f5;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.6;
}

/* Hero Subtitle - Mobile First */
.hero-subtitle {
    font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    padding: 6px 12px;
    letter-spacing: 1px;
}

/* MOBILE HERO TEXT - Clean & Readable */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 1.75rem !important;
        line-height: 1.4;
        margin-bottom: 1.25rem;
        color: var(--primary) !important;
        text-shadow: none !important;
        font-weight: 600;
        letter-spacing: 0.3px;
    }

    .hero-content p {
        font-size: 0.9rem !important;
        line-height: 1.7;
        margin: 0 auto 2rem;
        color: rgba(0, 0, 0, 0.75) !important;
        text-shadow: none !important;
        max-width: 100%;
    }

    .hero-subtitle {
        font-size: 0.7rem;
        padding: 8px 16px;
        margin-bottom: 1.5rem;
        background: rgba(197, 160, 89, 0.12);
        border: 1.5px solid var(--gold);
        color: var(--gold);
        font-weight: 600;
        letter-spacing: 2px;
        -webkit-backdrop-filter: none;
    backdrop-filter: none;
        border-radius: 4px;
    }

    /* Premium Image Styling */
    .slide img {
        border-radius: 0;
        box-shadow: none;
        filter: brightness(1.02) contrast(1.05);
    }

    /* Enhanced Spacing */
    .hero-content {
        padding: 28px 20px 32px;
    }
}

/* Hero Buttons - Mobile First (Vertical Stack) */
.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.hero-buttons .btn {
    width: 100%;
    max-width: 280px;
    padding: 14px 24px;
    font-size: 0.95rem;
}

/* Mobile Button Styling - Premium & Touch-Friendly */
@media (max-width: 768px) {
    .hero-buttons {
        gap: 14px;
        max-width: 100%;
        padding: 0 24px;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 100%;
        padding: 16px 28px;
        font-size: 0.95rem;
        font-weight: 600;
        border-radius: 8px;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        transition: all 0.3s ease;
    }

    .hero-buttons .btn-primary {
        background: linear-gradient(135deg, #0b3d2e 0%, #0e4d3a 100%);
        color: var(--white);
        border: none;
        box-shadow: 0 6px 16px rgba(11, 61, 46, 0.25);
    }

    .hero-buttons .btn-primary:active {
        transform: translateY(2px);
        box-shadow: 0 3px 10px rgba(11, 61, 46, 0.3);
    }

    .hero-buttons .btn-secondary {
        background: transparent;
        color: var(--primary);
        border: 2px solid var(--primary);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }

    .hero-buttons .btn-secondary:active {
        background: rgba(11, 61, 46, 0.05);
    }
}

/* Mobile Hero Content Spacing */
@media (max-width: 768px) {
    .dot {
        width: 10px;
        height: 10px;
    }

    .dot.active {
        width: 12px;
        height: 12px;
    }
}

/* Tablet and Up - Horizontal Buttons */
@media (min-width: 769px) {
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
        max-width: none;
    }

    .hero-buttons .btn {
        width: auto;
        min-width: 200px;
    }

    .hero-buttons .btn:first-child {
        margin-right: 15px;
    }
}

/* Desktop Optimization */
@media (min-width: 1024px) {
    .hero-content {
        max-width: 900px;
    }
}

/* Modern Mobile Header - Full Width */
@media (max-width: 992px) {

    /* Header stays full width on mobile */
    .navbar,
    header {
        height: 70px !important;
        /* Slightly shorter on mobile */
        padding: 0 !important;
    }

    .navbar .container {
        padding: 0 12px;
        /* Further reduced padding on mobile to prevent overflow */
        width: 100%;
        max-width: 100%;
    }



    .logo-img {
        height: 44px;
    }

    .school-name {
        font-size: 1rem;
        line-height: 1.25;
        letter-spacing: 0.3px;
    }

    .school-address {
        font-size: 0.65rem;
        letter-spacing: 0.8px;
    }

    /* Remove extra margin on mobile for better space utilization */
    .nav-links {
        margin-left: 0;
        /* Reset margin on mobile */
    }

    /* Update body padding for mobile header */
    body {
        padding-top: 70px !important;
    }
}


/* Mobile Section Padding - Ultra Compact */
@media (max-width: 768px) {
    .section {
        padding: 25px 0;
    }

    .container {
        padding: 0 18px;
    }

    h2 {
        font-size: 1.75rem;
        margin-bottom: 12px;
    }

    h3 {
        font-size: 1.25rem;
        margin-bottom: 10px;
    }

    .page-hero {
        height: auto;
        min-height: 250px;
        padding: 25px 0;
    }

    .page-hero-content h1 {
        font-size: 1.75rem;
        line-height: 1.25;
        margin-bottom: 6px;
    }

    .page-hero-content h5 {
        font-size: 0.68rem;
        margin-bottom: 5px;
    }

    .page-hero-content p {
        font-size: 0.88rem;
        line-height: 1.45;
    }
}

/* Mobile Grid Adjustments */

/* Mobile Grid Adjustments */
@media (max-width: 768px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

/* Mobile Button Sizing */
@media (max-width: 480px) {
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
        width: 100%;
        max-width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        display: block;
        text-align: center;
    }
}

/* Prevent Horizontal Scroll */
body {
    overflow-x: hidden;
}

/* Mobile Image Optimization */
@media (max-width: 768px) {
    img {
        height: auto;
        max-width: 100%;
    }
}

/* ========================================
   RESPONSIVE IMAGES - MOBILE FIRST
   ======================================== */

/* Global Image Responsiveness */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Hero Slider Images - Desktop First (will override for mobile) */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* MOBILE: HERO SLIDER - SHOW FULL IMAGES */
@media (max-width: 768px) {
    .hero-slider {
        height: auto;
        min-height: 0;
        margin-top: 0;
        display: flex;
        flex-direction: column;
        overflow: visible;
    }

    .slider-container {
        position: relative;
        width: 100%;
        height: auto;
        aspect-ratio: 3 / 4;
    }

    .slide {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
    }

    .slider-dots {
        position: absolute;
        bottom: 10px;
        z-index: 20;
    }

    .hero-content {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        width: 100% !important;
        max-width: 100% !important;
        background: linear-gradient(180deg, #FFF8EE, #FFF0DB);
        padding: 28px 20px 32px !important;
        text-align: center;
    }

    .slide-overlay {
        display: none;
    }
}

/* Tablet: Balanced hero view */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-slider {
        height: 60vh;
        margin-top: 0;
    }

    .slide img {
        object-fit: cover;
        object-position: center 40%;
    }
}

/* Desktop: Full premium hero */
@media (min-width: 1025px) {
    .hero-slider {
        height: 100vh;
        margin-top: 0;
    }

    .slide img {
        object-fit: cover;
        object-position: center center;
    }
}

/* Section Images - Responsive Containers */
.section img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Card Images */
.card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

/* Grid Images - Mobile First */
.grid img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

/* Mobile: Flexible image heights */
@media (max-width: 768px) {
    .grid img {
        width: 100%;
        height: auto;
        min-height: unset;
        max-height: none;
        object-fit: contain;
    }
}

/* Desktop: Fixed aspect ratio */
@media (min-width: 769px) {
    .grid img {
        height: 250px;
        object-fit: cover;
    }
}

/* Gallery Images - Responsive */
.gallery-item img {
    width: 100%;
    height: 100%;
    min-height: 200px;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}

@media (max-width: 480px) {
    .gallery-item img {
        min-height: 250px;
        max-height: 350px;
    }
}

/* Facility/Activity Images */
.facility-img,
.activity-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

/* Mobile: Shorter images for better scrolling */
@media (max-width: 768px) {

    .facility-img,
    .activity-img {
        width: 100%;
        height: auto;
        max-height: none;
        object-fit: cover;
    }
}

/* Prevent Image Overflow */
.container img,
.section img {
    max-width: 100%;
    /* height: auto; */
}

/* Hero Background Images - Responsive */
.hero,
.page-hero {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

@media (max-width: 768px) {

    .hero,
    .page-hero {
        background-position: center 30%;
    }
}

/* Lazy Loading Images - Smooth Fade In */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

img[loading="lazy"].loaded,
img[loading="lazy"]:not([src=""]) {
    opacity: 1;
}

/* Aspect Ratio Containers for Consistent Sizing */
.img-16-9 {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 */
    overflow: hidden;
    border-radius: 8px;
}

.img-16-9 img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-4-3 {
    position: relative;
    width: 100%;
    padding-bottom: 75%;
    /* 4:3 */
    overflow: hidden;
    border-radius: 8px;
}

.img-4-3 img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Image Quality - Prevent Blur */
img {
    image-rendering: -webkit-optimize-contrast;
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    img {
        image-rendering: auto;
    }
}

/* Mobile Typography Scale */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    .hero-content p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .hero-subtitle {
        font-size: 0.65rem;
        padding: 5px 10px;
        letter-spacing: 0.5px;
    }
}

/* Touch-Friendly Tap Targets */
@media (max-width: 768px) {

    a,
    button {
        min-height: 44px;
        min-width: 44px;
    }

    .nav-links a {
        padding: 12px 18px;
    }

    /* --- MOBILE MENU OVERRIDES MOVED TO STYLE.CSS --- */
    /* Mobile styles are now handled in the premium section of style.css to match the designer's image */
}


/* Mobile Performance - Reduce Animations */
@media (max-width: 768px) and (prefers-reduced-motion: no-preference) {
    .fade-up {
        animation-duration: 0.4s;
    }
}