/*
 * ═══════════════════════════════════════════════════════
 *  Kiddozone — Universal Responsive Stylesheet
 *  Covers: All HTML pages | Breakpoints: 1024 / 768 / 480 / 360px
 * ═══════════════════════════════════════════════════════
 */

/* ── Base: fluid images & box-sizing ── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

/* ── Container clamp ── */
.container {
    width: 100%;
    max-width: 1260px;
    margin-inline: auto;
    padding-inline: 1.25rem;
}

/* ══════════════════════════════════════════
   SMALL DESKTOP  ≤ 1024px
══════════════════════════════════════════ */
@media (max-width: 1024px) {

    /* Typography scale down slightly */
    h1 {
        font-size: clamp(1.9rem, 4vw, 2.8rem);
    }

    h2 {
        font-size: clamp(1.5rem, 3vw, 2rem);
    }

    /* Navbar */
    .nav-links {
        display: none !important;
    }

    .nav-cta {
        display: none !important;
    }

    .nav-hamburger {
        display: flex !important;
    }

    /* Hero — all page heroes stack vertically */
    .hero-content,
    .services-hero-content,
    .about-hero-grid,
    .contact-hero-grid,
    .booking-grid,
    .story-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    /* Stats grids */
    .trust-stats {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Programs grid */
    .programs-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Why / features */
    .why-grid,
    .feature-cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Journey steps */
    .journey-steps {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .journey-steps::before {
        display: none !important;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    /* About page specifics */
    .expertise-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .awards-grid {
        grid-template-columns: 1fr !important;
    }

    .values-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Services comparison table: allow horizontal scroll */
    .comparison-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Timeline — switch to single column */
    .timeline::before {
        left: 20px !important;
    }

    .timeline-item {
        grid-template-columns: 44px 1fr !important;
    }

    .timeline-left {
        display: none !important;
    }

    .timeline-right {
        padding-left: 1rem !important;
    }

    .timeline-item.right .timeline-right {
        order: unset !important;
        padding-right: 0 !important;
        padding-left: 1rem !important;
        text-align: left !important;
    }

    .timeline-item.right .timeline-center {
        order: unset !important;
    }

    .timeline-item.right .timeline-left {
        order: unset !important;
        display: none !important;
    }

    /* Contact page grids */
    .contact-cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .channels-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Booking img — remove sticky */
    .booking-img {
        position: static !important;
    }

    /* Pricing */
    .pricing-plans {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Story stats */
    .story-stats {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Hero floating badges */
    .about-hero-badge,
    .about-hero-badge2 {
        display: none !important;
    }

    .hero-float-badge-1,
    .hero-float-badge-2 {
        display: none !important;
    }

    /* CTA block */
    .cta-content {
        grid-template-columns: 1fr !important;
        text-align: center;
    }

    .cta-buttons {
        justify-content: center;
    }

    /* Visit preview */
    .visit-preview {
        grid-template-columns: 1fr !important;
    }

    /* Program details */
    .program-content-grid,
    .program-detail-header {
        grid-template-columns: 1fr !important;
    }

    .program-detail-image {
        width: 100% !important;
        max-width: 340px !important;
    }
}

/* ══════════════════════════════════════════
   TABLET  ≤ 768px
══════════════════════════════════════════ */
@media (max-width: 768px) {

    /* Typography */
    h1 {
        font-size: clamp(1.65rem, 5vw, 2.2rem) !important;
        line-height: 1.25;
    }

    h2 {
        font-size: clamp(1.35rem, 4vw, 1.75rem) !important;
    }

    .lead {
        font-size: 1rem !important;
    }

    /* Sections */
    .section {
        padding: 3rem 0 !important;
    }

    /* Hero order — image first on mobile for visual punch */
    .hero-content,
    .services-hero-content,
    .about-hero-grid,
    .contact-hero-grid {
        gap: 1.5rem !important;
    }

    .hero-visual {
        order: -1;
    }

    /* Hero metrics — 3 columns still works on tablet */
    .hero-metrics {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    /* Trust stats → 2×2 */
    .trust-stats {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .trust-strip .container {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    /* Program cards → single col */
    .programs-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Why grid → 1 col */
    .why-grid {
        grid-template-columns: 1fr !important;
    }

    /* Testimonials → 1 col */
    .testimonials-grid {
        grid-template-columns: 1fr !important;
    }

    /* Feature cards → 1 col on tablet */
    .feature-cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Journey steps → 2 col */
    .journey-steps {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Footer → 2 col */
    .footer-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    /* About: values → 1 col */
    .values-grid {
        grid-template-columns: 1fr !important;
    }

    .expertise-grid {
        grid-template-columns: 1fr !important;
    }

    /* Services: service card → stack */
    .service-card {
        grid-template-columns: 1fr !important;
    }

    .service-card:nth-child(even) {
        direction: ltr !important;
    }

    .service-card-img {
        aspect-ratio: 16/9 !important;
    }

    /* Contact cards → 1 col */
    .contact-cards-grid {
        grid-template-columns: 1fr !important;
    }

    .channels-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Pricing → 1 col */
    .pricing-plans {
        grid-template-columns: 1fr !important;
    }

    /* Form grids → 1 col */
    .form-row,
    .form-grid {
        grid-template-columns: 1fr !important;
    }

    .form-submit {
        grid-column: 1 !important;
    }

    /* Contact hero card */
    .contact-hero-card {
        padding: 1.5rem !important;
    }

    /* Booking grid */
    .booking-grid {
        grid-template-columns: 1fr !important;
    }

    /* Tour form */
    .tour-form {
        padding: 1.5rem !important;
    }

    /* Resources */
    .resources-grid {
        grid-template-columns: 1fr !important;
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .gallery-item.wide {
        grid-column: span 1 !important;
    }

    /* Stats strip on dark bg (services, about, contact pages) */
    [style*="grid-template-columns: repeat(4"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Comparison table */
    .comparison-table-wrap,
    .comparison-table {
        display: block;
        overflow-x: auto;
    }

    .comparison-table {
        min-width: 560px;
    }

    /* CTA buttons */
    .cta-buttons,
    .hero-cta-group {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .btn {
        justify-content: center;
        text-align: center;
    }

    /* Quick contact channels — stack properly */
    .quick-contact-channels {
        gap: 0.5rem !important;
    }

    /* Reassurance list on booking */
    .booking-reassurance {
        padding-top: 0.5rem;
    }
}

/* ══════════════════════════════════════════
   MOBILE  ≤ 480px
══════════════════════════════════════════ */
@media (max-width: 480px) {

    /* Root spacing */
    :root {
        --space-3xl: 3rem;
        --space-2xl: 2rem;
        --space-xl: 1.5rem;
        --space-lg: 1.25rem;
        --space-md: 1rem;
    }

    /* Typography */
    h1 {
        font-size: 1.65rem !important;
        line-height: 1.2;
    }

    h2 {
        font-size: 1.35rem !important;
    }

    h3 {
        font-size: 1.1rem !important;
    }

    .lead {
        font-size: 0.95rem !important;
    }

    /* Container */
    .container {
        padding-inline: 1rem !important;
    }

    /* Sections */
    .section {
        padding: 2.5rem 0 !important;
    }

    /* Navbar logo text size */
    .nav-logo-text {
        font-size: 1.1rem !important;
    }

    /* Hero */
    .hero-metrics {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .metric-card .value {
        font-size: 1.1rem;
    }

    .metric-card .label {
        font-size: 0.65rem;
    }

    /* Hero CTAs */
    .hero-cta-group {
        gap: 0.5rem !important;
    }

    .btn-lg {
        padding: 0.85rem 1.5rem !important;
        font-size: 0.95rem !important;
    }

    /* Trust stats — 2 col */
    .trust-stats {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Programs — 1 col */
    .programs-grid {
        grid-template-columns: 1fr !important;
    }

    /* Why / Features — 1 col */
    .why-grid,
    .feature-cards-grid {
        grid-template-columns: 1fr !important;
    }

    /* Testimonials — 1 col */
    .testimonials-grid {
        grid-template-columns: 1fr !important;
    }

    /* Journey — 1 col */
    .journey-steps {
        grid-template-columns: 1fr !important;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr !important;
    }

    .footer-bottom {
        flex-direction: column !important;
        text-align: center !important;
        gap: 0.5rem !important;
    }

    /* About page */
    .values-grid,
    .expertise-grid,
    .awards-grid {
        grid-template-columns: 1fr !important;
    }

    .story-stats {
        grid-template-columns: 1fr 1fr !important;
    }

    /* About hero floating badges */
    .about-hero-badge,
    .about-hero-badge2 {
        display: none !important;
    }

    /* Services */
    .service-detail-cols {
        grid-template-columns: 1fr !important;
    }

    .pricing-plans {
        grid-template-columns: 1fr !important;
    }

    /* Contact */
    .contact-cards-grid {
        grid-template-columns: 1fr !important;
    }

    .channels-grid {
        grid-template-columns: 1fr !important;
    }

    .contact-hero-card {
        padding: 1.25rem !important;
    }

    /* Hero promise badge on contact */
    .contact-hero-promise {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
    }

    /* Channel cards — full width */
    .channel-card {
        flex-direction: column !important;
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: 1fr !important;
    }

    .gallery-item.tall,
    .gallery-item.wide {
        grid-row: span 1 !important;
        grid-column: span 1 !important;
    }

    /* Section badges & pills — wrap */
    .section-badge {
        font-size: 0.72rem !important;
    }

    /* CTA block */
    .cta-content {
        gap: 1.5rem !important;
    }

    .cta-buttons {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    /* Comparison table */
    .comparison-table {
        min-width: 480px;
        font-size: 0.8rem;
    }

    .comparison-table td,
    .comparison-table th {
        padding: 0.55rem 0.65rem !important;
    }

    /* Visit preview */
    .visit-preview {
        padding: 1.5rem !important;
    }

    /* Forms */
    .tour-form,
    .tour-form-wrap {
        padding: 1.25rem !important;
    }

    .form-row,
    .form-grid {
        grid-template-columns: 1fr !important;
    }

    /* FAQ */
    .faq-question span {
        font-size: 0.88rem !important;
    }

    .contact-faq {
        max-width: 100% !important;
    }

    /* Booking image */
    .booking-img {
        min-height: 220px;
    }

    .booking-img img,
    .booking-img .booking-img-placeholder {
        aspect-ratio: 16/9 !important;
    }

    /* Admission timeline */
    .timeline-dot {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.1rem !important;
    }

    /* Stats strips (dark bg) */
    .dark-stats-strip {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Floating WhatsApp button — smaller on mobile */
    .whatsapp-float {
        width: 52px !important;
        height: 52px !important;
        bottom: 20px !important;
        right: 16px !important;
        font-size: 1.4rem !important;
    }

    /* Campus Life timeline */
    .day-timeline {
        gap: 1.5rem !important;
    }

    /* Programs detail */
    .program-detail {
        padding: 1.25rem !important;
    }

    .program-detail-header {
        gap: 1rem !important;
    }

    /* Breadcrumbs / nav pills */
    .nav-pills {
        flex-wrap: wrap !important;
    }

    /* Resource cards */
    .resource-card {
        padding: 1rem !important;
    }

    /* Why Kiddozone pillars */
    .pillar-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ══════════════════════════════════════════
   SMALL MOBILE  ≤ 360px
══════════════════════════════════════════ */
@media (max-width: 360px) {

    h1 {
        font-size: 1.45rem !important;
    }

    h2 {
        font-size: 1.2rem !important;
    }

    .btn {
        padding: 0.7rem 1.1rem !important;
        font-size: 0.85rem !important;
    }

    .btn-lg {
        padding: 0.75rem 1.2rem !important;
        font-size: 0.88rem !important;
    }

    .btn-sm {
        padding: 0.45rem 0.75rem !important;
        font-size: 0.78rem !important;
    }

    /* Hero metrics — 1 col on very small screens */
    .hero-metrics {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    /* Trust stats — 2 col */
    .trust-stats {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Journey step numbers */
    .step-number {
        width: 70px !important;
        height: 70px !important;
        font-size: 1.5rem !important;
    }

    /* Contact channel cards */
    .quick-channel {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.4rem !important;
    }
}

/* ══════════════════════════════════════════
   UTILITY: Images responsive
══════════════════════════════════════════ */
.services-hero-img,
.about-hero-img-wrap,
.story-img,
.booking-img,
.service-card-img,
.hero-image-wrap,
.visit-image-wrap {
    overflow: hidden;
}

/* Ensure inline grid/flex styles from HTML adapt on mobile */
@media (max-width: 768px) {

    /* Override inline style grids commonly used in index.html sections */
    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    [style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr !important;
    }

    [style*="grid-template-columns: repeat(3"] {
        grid-template-columns: 1fr !important;
    }

    [style*="grid-template-columns: repeat(4"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Buttons in flex rows — wrap properly */
    [style*="display:flex"][style*="gap"] {
        flex-wrap: wrap !important;
    }

    /* Headings with inline font sizes */
    [style*="font-size:2.5rem"] {
        font-size: 1.6rem !important;
    }

    [style*="font-size:1.4rem"] {
        font-size: 1.15rem !important;
    }
}

@media (max-width: 480px) {
    [style*="grid-template-columns: repeat(4"] {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Dark stats strips */
    [style*="grid-template-columns: repeat(4,1fr)"],
    [style*="grid-template-columns:repeat(4,1fr)"] {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* ══════════════════════════════════════════
   PRINT
══════════════════════════════════════════ */
@media print {

    .navbar,
    .mobile-menu,
    .whatsapp-float,
    .nav-hamburger {
        display: none !important;
    }

    body {
        font-size: 11pt;
    }

    a[href]::after {
        content: " (" attr(href) ")";
    }
}