/**
 * NQFA — Mobile Responsiveness Fix
 * Comprehensive mobile styles for all components
 */

/* ==========================================================================
   GLOBAL MOBILE RESETS
   ========================================================================== */

/* Ensure proper touch target sizes (min 44px) */
a, button, input, textarea, select {
    min-height: 44px;
}

/* Smooth text on mobile */
body {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* Prevent horizontal overflow */
html, body {
    overflow-x: hidden;
    width: 100%;
}

/* ==========================================================================
   TABLETS (max-width: 1024px)
   ========================================================================== */

@media (max-width: 1024px) {
    /* Section spacing */
    .section {
        padding: clamp(48px, 8vw, 80px) 0;
    }

    /* Hero adjustments */
    .hero {
        min-height: 85vh;
    }

    /* Stats bar - 2x2 grid */
    .stats-bar {
        margin-top: -40px;
    }

    .stat-item {
        padding: var(--sp-xl) var(--sp-lg);
    }

    .stat-number {
        font-size: clamp(1.75rem, 3vw, 2.5rem);
    }

    /* Split sections */
    .split-section {
        gap: clamp(32px, 4vw, 60px);
    }

    .split-content {
        max-width: 100%;
    }

    /* Timeline */
    .timeline-item h4 {
        font-size: var(--fs-base);
    }

    /* Coach cards */
    .grid-3 > .card.card-feature .coach-photo {
        height: 200px;
    }

    /* Offset grid - remove vertical offset on tablet */
    .offset-grid > *:nth-child(2) {
        transform: none;
    }
    .offset-grid > *:nth-child(2):hover {
        transform: translateY(-4px);
    }

    /* CTA banner */
    .cta-banner {
        padding: clamp(60px, 8vw, 80px) 0;
    }

    .cta-banner-enhanced {
        padding: clamp(60px, 8vw, 80px) 0;
    }
}

/* ==========================================================================
   MOBILE (max-width: 768px)
   ========================================================================== */

@media (max-width: 768px) {
    /* Container */
    .container {
        padding: 0 16px;
    }

    /* Section spacing */
    .section {
        padding: clamp(40px, 6vw, 60px) 0;
    }

    /* Typography scaling */
    h1 {
        font-size: clamp(1.75rem, 7vw, 2.5rem) !important;
        line-height: 1.15;
        margin-bottom: var(--sp-md);
    }

    h2 {
        font-size: clamp(1.375rem, 5vw, 2rem) !important;
        line-height: 1.2;
        margin-bottom: var(--sp-md);
    }

    h3 {
        font-size: clamp(1.25rem, 4vw, 1.5rem) !important;
        line-height: 1.25;
        margin-bottom: var(--sp-sm);
    }

    h4 {
        font-size: var(--fs-xl) !important;
        line-height: 1.3;
    }

    p, .lead {
        font-size: var(--fs-base);
        line-height: 1.7;
    }

    /* ==========================================================================
       HERO MOBILE
       ========================================================================== */

    .hero {
        min-height: auto;
        padding: 100px 0 60px;
    }

    .hero-content {
        padding: 0 var(--sp-md);
    }

    .hero h1 {
        font-size: clamp(2rem, 8vw, 2.75rem) !important;
        line-height: 1.1;
        margin-bottom: var(--sp-lg);
    }

    .hero p {
        font-size: var(--fs-base);
        line-height: 1.7;
        margin-bottom: var(--sp-xl);
        max-width: 100%;
    }

    .hero-badge {
        padding: 6px 16px;
        font-size: 10px;
        margin-bottom: var(--sp-lg);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: var(--sp-sm);
    }

    .hero-buttons .btn {
        width: 100%;
        padding: 14px 24px;
    }

    .scroll-indicator {
        display: none;
    }

    /* ==========================================================================
       STATS BAR MOBILE
       ========================================================================== */

    .stats-bar {
        grid-template-columns: 1fr 1fr;
        margin-top: -30px;
        border-radius: var(--radius-lg);
    }

    .stat-item {
        padding: var(--sp-lg) var(--sp-md);
        border-right: none !important;
        border-bottom: 1px solid var(--gray-100) !important;
    }

    .stat-item:nth-child(odd) {
        border-right: 1px solid var(--gray-100) !important;
    }

    .stat-item:nth-last-child(-n+2) {
        border-bottom: none !important;
    }

    .stat-number {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .stat-label {
        font-size: 10px;
        letter-spacing: 0.06em;
    }

    /* ==========================================================================
       SPLIT SECTIONS MOBILE
       ========================================================================== */

    .split-section {
        grid-template-columns: 1fr !important;
        gap: var(--sp-xl) !important;
    }

    .split-section > div[style*="text-align:right"],
    .split-section > div[style*="text-align: right"] {
        text-align: left !important;
    }

    .split-content {
        max-width: 100%;
        order: 2;
    }

    .split-visual {
        order: 1;
    }

    .split-visual img {
        width: 100%;
        height: auto;
        max-height: 300px;
        object-fit: cover;
    }

    /* ==========================================================================
       TIMELINE MOBILE
       ========================================================================== */

    .timeline {
        grid-template-columns: 1fr;
        gap: var(--sp-md);
        max-width: 100%;
    }

    .timeline::before {
        display: none;
    }

    .timeline-step {
        width: 56px;
        height: 56px;
        font-size: var(--fs-lg);
        margin-bottom: var(--sp-sm);
    }

    .timeline-item {
        display: flex;
        align-items: flex-start;
        gap: var(--sp-lg);
        text-align: left;
    }

    .timeline-step {
        flex-shrink: 0;
        margin-bottom: 0;
    }

    .timeline-item h4 {
        font-size: var(--fs-base);
        margin-bottom: var(--sp-xs);
    }

    .timeline-item p {
        font-size: var(--fs-sm);
    }

    /* ==========================================================================
       COACH CARDS MOBILE
       ========================================================================== */

    .grid-3 {
        grid-template-columns: 1fr !important;
        gap: var(--sp-lg) !important;
    }

    .grid-3 > .card.card-feature .coach-photo {
        height: 200px;
    }

    .grid-3 > .card.card-feature .coach-info {
        padding: var(--sp-lg);
    }

    /* ==========================================================================
       FAQ ACCORDION MOBILE
       ========================================================================== */

    .faq-accordion {
        max-width: 100%;
    }

    .faq-question {
        padding: var(--sp-lg) 0;
        font-size: var(--fs-base);
        gap: var(--sp-md);
    }

    .faq-icon {
        width: 24px;
        height: 24px;
        min-width: 24px;
    }

    .faq-answer-inner {
        padding-bottom: var(--sp-lg);
        font-size: var(--fs-sm);
        line-height: 1.7;
    }

    /* ==========================================================================
       TESTIMONIALS MOBILE
       ========================================================================== */

    .testimonial-card {
        padding: var(--sp-xl);
    }

    .testimonial-quote {
        font-size: var(--fs-base);
        line-height: 1.7;
        padding-left: var(--sp-lg);
    }

    .testimonial-quote::before {
        font-size: 2.5rem;
        top: -6px;
    }

    .testimonial-grid {
        grid-template-columns: 1fr !important;
        gap: var(--sp-lg) !important;
    }

    /* ==========================================================================
       PRICING CARDS MOBILE
       ========================================================================== */

    .pricing-card {
        padding: var(--sp-xl);
    }

    .pricing-card.featured {
        transform: none !important;
    }

    .pricing-card.featured:hover {
        transform: translateY(-4px) !important;
    }

    .pricing-price {
        font-size: clamp(2rem, 6vw, 2.5rem);
    }

    .pricing-features li {
        padding: var(--sp-sm) 0;
        font-size: var(--fs-sm);
    }

    /* ==========================================================================
       CONTACT GRID MOBILE
       ========================================================================== */

    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: var(--sp-xl) !important;
    }

    .contact-form-card {
        padding: var(--sp-xl);
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 12px 14px;
        font-size: var(--fs-base);
    }

    /* ==========================================================================
       GALLERY GRID MOBILE
       ========================================================================== */

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--sp-sm) !important;
    }

    .gallery-item img {
        height: 150px;
        object-fit: cover;
    }

    .gallery-overlay {
        background: rgba(10, 22, 40, 0.4);
    }

    /* ==========================================================================
       PAGE HERO MOBILE
       ========================================================================== */

    .page-hero {
        padding: clamp(100px, 15vw, 140px) 0 clamp(40px, 6vw, 60px);
    }

    .page-hero h1 {
        font-size: clamp(1.75rem, 7vw, 2.5rem) !important;
    }

    .page-hero .lead {
        font-size: var(--fs-base);
        max-width: 100%;
    }

    /* ==========================================================================
       FOOTER MOBILE
       ========================================================================== */

    .site-footer {
        padding-top: clamp(48px, 6vw, 60px);
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: var(--sp-xl) !important;
        padding-bottom: var(--sp-xl);
    }

    .footer-col {
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-links,
    .footer-contact {
        text-align: center;
    }

    .footer-bottom .container {
        flex-direction: column !important;
        gap: var(--sp-md) !important;
        text-align: center;
    }

    .footer-bottom p {
        font-size: 11px;
    }

    .footer-bottom-links {
        justify-content: center;
    }

    /* Tech Troubleshooters ad */
    .tech-troubleshooters-ad {
        padding: var(--sp-xl) !important;
        text-align: center !important;
    }

    .tech-troubleshooters-ad .tech-ad-icon {
        margin: 0 auto var(--sp-md) !important;
    }

    .tech-troubleshooters-ad .tech-ad-content {
        text-align: center !important;
    }

    .tech-troubleshooters-ad .tech-ad-text h4 {
        text-align: center !important;
        font-size: var(--fs-base) !important;
    }

    .tech-troubleshooters-ad .tech-ad-text p {
        text-align: center !important;
        font-size: var(--fs-sm) !important;
    }

    .tech-troubleshooters-ad .tech-ad-cta {
        margin-top: var(--sp-lg) !important;
    }

    /* ==========================================================================
       CTA BANNER MOBILE
       ========================================================================== */

    .cta-banner {
        padding: clamp(48px, 8vw, 60px) 0;
    }

    .cta-banner h2 {
        font-size: clamp(1.5rem, 6vw, 2rem) !important;
    }

    .cta-banner p {
        font-size: var(--fs-base);
        margin-bottom: var(--sp-lg);
    }

    .cta-banner-enhanced {
        padding: clamp(48px, 8vw, 60px) 0;
    }

    /* ==========================================================================
       GENERAL COMPONENTS MOBILE
       ========================================================================== */

    /* Buttons */
    .btn {
        padding: 12px 24px;
        font-size: var(--fs-xs);
        min-height: 44px;
    }

    .btn-lg {
        padding: 14px 28px;
        font-size: var(--fs-sm);
    }

    .btn-sm {
        padding: 10px 18px;
        font-size: 11px;
    }

    /* Cards */
    .card {
        padding: var(--sp-lg);
        border-radius: var(--radius-lg);
    }

    .card-feature {
        padding: var(--sp-xl) var(--sp-lg);
    }

    /* Program cards */
    .program-card {
        padding: var(--sp-xl) var(--sp-lg);
    }

    .program-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    /* Grid utilities */
    .grid-2 {
        grid-template-columns: 1fr !important;
        gap: var(--sp-lg) !important;
    }

    .grid-4 {
        grid-template-columns: 1fr !important;
        gap: var(--sp-lg) !important;
    }

    /* Stagger children override */
    .stagger-children {
        grid-template-columns: 1fr !important;
    }

    /* Big number - hide on mobile */
    .big-number {
        display: none;
    }

    /* Decorative elements */
    .deco-dots {
        justify-content: center;
    }

    .deco-line-center {
        margin-left: auto;
        margin-right: auto;
    }

    /* Float animation - disable on mobile for performance */
    .float-element {
        animation: none;
    }

    /* Card shine - disable on mobile */
    .card-shine::after {
        display: none;
    }

    /* Scroll reveal - instant on mobile */
    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1;
        transform: none;
    }

    /* Table responsive */
    .schedule-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .schedule-table th,
    .schedule-table td {
        padding: var(--sp-md);
        font-size: var(--fs-xs);
        white-space: nowrap;
    }

    /* Section headings */
    .section .label {
        font-size: 10px;
    }
}

/* ==========================================================================
   SMALL PHONES (max-width: 480px)
   ========================================================================== */

@media (max-width: 480px) {
    /* Container */
    .container {
        padding: 0 12px;
    }

    /* Section spacing */
    .section {
        padding: clamp(32px, 5vw, 48px) 0;
    }

    /* Typography */
    h1 {
        font-size: clamp(1.5rem, 8vw, 2rem) !important;
    }

    h2 {
        font-size: clamp(1.25rem, 6vw, 1.625rem) !important;
    }

    h3 {
        font-size: clamp(1.125rem, 5vw, 1.375rem) !important;
    }

    /* Hero */
    .hero {
        padding: 80px 0 48px;
    }

    .hero h1 {
        font-size: clamp(1.75rem, 8vw, 2.25rem) !important;
    }

    .hero p {
        font-size: var(--fs-sm);
    }

    .hero-badge {
        padding: 5px 12px;
        font-size: 9px;
    }

    /* Stats bar - single column */
    .stats-bar {
        grid-template-columns: 1fr !important;
        margin-top: -20px;
    }

    .stat-item {
        padding: var(--sp-lg) var(--sp-md);
        border-right: none !important;
        border-bottom: 1px solid var(--gray-100) !important;
    }

    .stat-item:last-child {
        border-bottom: none !important;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 9px;
    }

    /* Gallery - single column on very small screens */
    .gallery-grid {
        grid-template-columns: 1fr !important;
    }

    .gallery-item img {
        height: 200px;
    }

    /* Page hero */
    .page-hero {
        padding: clamp(80px, 12vw, 100px) 0 clamp(32px, 5vw, 48px);
    }

    .page-hero h1 {
        font-size: clamp(1.5rem, 7vw, 2rem) !important;
    }

    /* Pricing */
    .pricing-card {
        padding: var(--sp-lg);
    }

    .pricing-price {
        font-size: clamp(1.75rem, 7vw, 2.25rem);
    }

    /* CTA banner */
    .cta-banner h2 {
        font-size: clamp(1.375rem, 6vw, 1.75rem) !important;
    }

    /* Contact form */
    .contact-form-card {
        padding: var(--sp-lg);
    }

    /* Timeline mobile - stacked card style */
    .timeline-item {
        background: var(--white);
        padding: var(--sp-lg);
        border-radius: var(--radius-lg);
        border: 1px solid var(--gray-100);
        box-shadow: var(--shadow-xs);
    }

    /* Coach cards */
    .grid-3 > .card.card-feature .coach-photo {
        height: 180px;
    }

    /* Footer */
    .footer-bottom p {
        font-size: 10px;
    }
}

/* ==========================================================================
   LANDSCAPE MOBILE (max-height: 500px and landscape)
   ========================================================================== */

@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 80px 0 40px;
    }

    .page-hero {
        padding: 80px 0 40px;
    }
}

/* ==========================================================================
   SAFE AREA INSETS (iPhone X+)
   ========================================================================== */

@supports (padding: env(safe-area-inset-bottom)) {
    .site-footer {
        padding-bottom: calc(var(--sp-xl) + env(safe-area-inset-bottom));
    }

    .hero-buttons .btn:last-child {
        margin-bottom: env(safe-area-inset-bottom);
    }
}
