/* Mobile Responsive Image Enhancements */

/* Ensure all images are responsive by default */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Hero carousel images mobile optimization */
.hero {
    background-size: cover !important;
    background-position: center center !important;
}

/* Schedule page image */
.schedule-image {
    width: 100%;
    height: auto;
    /* No max-height or object-fit to allow full image display */
}

/* Facility gallery responsive */
.facility-image {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
}

/* Program images responsive */
.program-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
}

/* Mobile specific adjustments */
@media (max-width: 768px) {
    /* Hero section mobile */
    .hero {
        min-height: 70vh;
        background-attachment: scroll; /* Better performance on mobile */
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    /* Schedule image mobile - no max-height to show full image */
    .schedule-image {
        /* Full width display maintained from base styles */
    }
    
    /* Facility gallery mobile */
    .facility-gallery {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .facility-image {
        max-height: 250px;
    }
    
    /* Program images mobile */
    .program-detail {
        grid-template-columns: 1fr !important;
    }
    
    .program-detail.reverse {
        grid-template-columns: 1fr !important;
    }
    
    .program-image {
        order: -1; /* Image always on top on mobile */
    }
    
    .program-image img {
        max-height: 300px;
    }
    
    /* Position kids class image to show the kids on mobile */
    img[src="/assets/images/kidsClass.jpg"] {
        object-position: center 65%; /* Move view down to show kids */
    }
    
    /* About page images */
    .about-hero-image {
        height: 250px !important;
    }
    
    /* Benefits grid mobile */
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Programs grid mobile */
    .programs-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Location grid mobile */
    .location-grid {
        grid-template-columns: 1fr;
    }
    
    /* Footer mobile */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-section {
        margin-bottom: 2rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    /* Even smaller images on very small screens */
    .schedule-image,
    .facility-image,
    .program-image img,
    .about-hero-image {
        max-height: 200px !important;
    }
    
    /* Smaller padding on mobile */
    section {
        padding: 3rem 0;
    }
    
    .container {
        padding: 0 15px;
    }
}

/* Ensure touch-friendly tap targets */
@media (pointer: coarse) {
    .btn,
    .nav-menu a,
    .social-links a {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* Optimize performance with lazy loading hint */
img[loading="lazy"] {
    background-color: #f0f0f0;
}

/* Smooth scrolling for better mobile experience */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}