/* ============================================================
   Tejas Netralaya — responsive.css
   ============================================================ */

/* ---- Utility: two-col grids used inline on index/about ---- */
/* These target the inline style grids via a wrapper class added to those sections */
.grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.grid-2col-start { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.grid-3col-stat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ---- Large desktop ---- */
@media (max-width: 1200px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-inner { gap: 40px; }
    .hero-image-wrap img { height: 500px; }
}

/* ---- Tablet landscape ---- */
@media (max-width: 1024px) {
    .section { padding: 64px 0; }
    .hero { min-height: auto; padding: 64px 0; }
    .hero-inner { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .hero-content p { max-width: 100%; }
    .hero-actions { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-image-wrap { max-width: 420px; margin: 0 auto; }
    .hero-image-wrap img { height: 420px; }

    .stats-bar-inner { grid-template-columns: repeat(2, 1fr); }
    .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.2); padding: 16px; }
    .stat-item:nth-child(2n) { border-bottom: none; }
    .stat-item:nth-last-child(-n+2) { border-bottom: none; }

    .desk-quote-inner { grid-template-columns: 1fr; text-align: center; }
    .desk-quote-photo { display: none; }

    .about-intro-grid { grid-template-columns: 1fr; }
    .about-photo { max-width: 300px; }

    .training-grid { grid-template-columns: repeat(3, 1fr); }
    .awards-grid-full { grid-template-columns: 1fr; }

    .service-section-inner { grid-template-columns: 1fr; }
    .service-section-meta { position: static; }

    .contact-grid { grid-template-columns: 1fr; }

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

    .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }

    .why-grid { grid-template-columns: 1fr; }

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

    .testimonial-block { grid-template-columns: 1fr; padding: 40px; }
    .testimonial-note { display: none; }
}

/* ---- Tablet portrait ---- */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    .section { padding: 52px 0; }

    .top-bar-info span:nth-child(3) { display: none; } /* hide long timings line on small screens */
    .top-bar-right { width: 100%; text-align: center; }
    .top-bar { padding: 6px 0; }

    .main-nav {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: #fff;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 999;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .main-nav.open { transform: translateX(0); }
    .nav-list { flex-direction: column; align-items: center; gap: 8px; }
    .nav-link { font-size: 1.3rem; padding: 12px 32px; }

    .hamburger { display: flex; z-index: 1001; }
    .btn-appt-header { display: none; }

    .services-grid { grid-template-columns: 1fr; }
    .training-grid { grid-template-columns: 1fr; }
    .awards-strip { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }

    .stats-bar-inner { grid-template-columns: repeat(2, 1fr); }

    /* Utility grid collapses */
    .grid-2col, .grid-2col-start { grid-template-columns: 1fr; gap: 32px; }
    .grid-3col-stat { grid-template-columns: repeat(2, 1fr); }

    /* ---- Hero — mobile overflow fixes (tablet portrait & smaller) ---- */
    /* Rotating eye-ring decoration would clip outside the viewport — hide on mobile */
    .hero-eye-deco { display: none; }
    /* Constrain hero content so child elements don't escape horizontally */
    .hero-inner, .hero-content {
        width: 100%;
        max-width: 100%;
        min-width: 0;          /* allow shrinking below 100% if grid wants */
    }
    /* Hero badge was inline-flex (shrink-to-fit, no width limit). Make it block-level
       with wrap so the line + uppercase text break gracefully instead of overflowing. */
    .hero-badge {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        max-width: 100%;
        font-size: 0.65rem;
        letter-spacing: 0.12em;
        text-align: center;
        line-height: 1.4;
    }
    .hero-badge::before { width: 28px; }
    /* Hero slogan: extreme letter-spacing (0.35em) was overflowing — tighten on mobile */
    .hero-slogan {
        letter-spacing: 0.18em;
        font-size: 0.66rem;
        word-spacing: 2px;
        line-height: 1.5;
    }
    /* Ensure all hero text wraps naturally and never exceeds container */
    .hero-content h1,
    .hero-content .hero-subtitle,
    .hero-content .hero-quals,
    .hero-content p {
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    .hero-content .hero-subtitle { font-size: 0.95rem; line-height: 1.5; }
    .hero-content .hero-quals    { font-size: 0.82rem; letter-spacing: 0; }
    /* Hero stats: 4 columns crushes labels — go 2×2 on mobile */
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .hero-stat strong { font-size: 1.4rem; }
    .hero-stat span   { font-size: 0.62rem; letter-spacing: 0.06em; }
}

/* ---- Mobile ---- */
@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .section { padding: 40px 0; }

    .hero { padding: 48px 0 40px; }
    /* Show portrait photo first on mobile so hero isn't text-only */
    .hero-image-wrap { order: -1; }
    .hero-image-wrap img { height: 300px; }
    /* Further tighten hero text on small phones (≤480px) */
    .hero-badge { font-size: 0.6rem; letter-spacing: 0.1em; }
    .hero-slogan { letter-spacing: 0.14em; font-size: 0.6rem; }
    .hero-content h1 { font-size: 2rem; line-height: 1.1; }
    .hero-content .hero-subtitle { font-size: 0.9rem; }
    .hero-content .hero-quals { font-size: 0.78rem; }
    .hero-content p { font-size: 0.92rem; line-height: 1.6; }
    .hero-actions { flex-direction: column; align-items: stretch; gap: 10px; }
    .hero-actions .btn { width: 100%; justify-content: center; padding: 12px 20px; font-size: 0.72rem; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .hero-stat { padding: 14px 8px; }
    .hero-stat strong { font-size: 1.25rem; }
    .hero-stat span { font-size: 0.58rem; }

    .stats-bar-inner { grid-template-columns: 1fr 1fr; }
    .stat-item strong { font-size: 1.5rem; }

    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-filter-tabs { gap: 6px; }
    .gallery-filter-btn { font-size: 0.78rem; padding: 7px 14px; }

    /* Utility grid collapses */
    .grid-3col-stat { grid-template-columns: 1fr; }

    .cta-banner { padding: 48px 0; }
    .cta-actions { flex-direction: column; align-items: center; }

    .testimonial-block { padding: 28px 24px; }

    .footer-inner { grid-template-columns: 1fr; gap: 28px; }

    .desk-quote-content blockquote { font-size: 1.1rem; }

    .contact-form-wrap { padding: 24px 18px; }

    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
    .lightbox-prev, .lightbox-next { width: 40px; height: 40px; }

    .header-inner { padding-top: 10px; padding-bottom: 10px; }
    .brand-logo { height: 42px; }
}
