/* ============================================================
   5MinHelp — Responsive Design
   responsive.css — Media queries for all breakpoints
   ============================================================ */

/* ─── 2XL WIDE — 1920px+ ─────────────────────────────────────── */
@media (min-width: 1920px) {
  :root { --container-pad: 120px; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 80px; }
  .hero-title { font-size: clamp(5rem, 9vw, 9rem); }
}

/* ─── 4K / TV — 2560px+ ──────────────────────────────────────── */
@media (min-width: 2560px) {
  :root { font-size: 20px; --container-pad: 160px; }
  .navbar { height: 90px; padding-block: 0; }
  .navbar.scrolled { height: 80px; }
  .nav-logo-icon { width: 52px; height: 52px; }
  .floating-whatsapp { width: 72px; height: 72px; font-size: 32px; }
  .back-to-top { width: 60px; height: 60px; font-size: 24px; }
}

/* ─── 8K — 3840px+ ───────────────────────────────────────────── */
@media (min-width: 3840px) {
  :root { font-size: 28px; --container-pad: 240px; }
  .card { border-radius: 32px; padding: 60px; }
  .timeline-connector { width: 3px; }
}

/* ─── DESKTOP — max 1280px ───────────────────────────────────── */
@media (max-width: 1280px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: var(--space-8); }
}

/* ─── TABLET LANDSCAPE — max 1024px ──────────────────────────── */
@media (max-width: 1024px) {
  /* Navbar */
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }
  .nav-actions .btn--md { padding: 10px 20px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-10); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand-desc { max-width: 100%; }

  /* Timeline → vertical */
  .timeline-connector { display: none; }
  .timeline-step {
    grid-template-columns: auto 1fr;
    gap: var(--space-5);
    margin-bottom: var(--space-6);
  }
  .timeline-step:nth-child(odd)  .timeline-step-content,
  .timeline-step:nth-child(even) .timeline-step-content { grid-column: 2; order: 1; }
  .timeline-step:nth-child(odd)  .timeline-step-empty,
  .timeline-step:nth-child(even) .timeline-step-empty { display: none; }
  .timeline-node { grid-column: 1; }
  .timeline-step:nth-child(even) .timeline-node { order: 0; }

  /* Services grid */
  .services-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}

/* ─── TABLET PORTRAIT — max 768px ───────────────────────────── */
@media (max-width: 768px) {
  /* Hero */
  .hero-stats { gap: var(--space-5); }
  .hero-stat-divider { display: none; }
  .hero-cta { gap: var(--space-3); }
  .hero-cta .btn--xl { padding: 14px 32px; font-size: var(--text-base); }

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

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-bottom-links { justify-content: center; flex-wrap: wrap; }

  /* App section */
  .app-download-inner { flex-direction: column; text-align: center; gap: var(--space-10); }
  .app-buttons { justify-content: center; }

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

  /* Page Hero */
  .page-hero-title { font-size: var(--text-5xl); }

  /* Section header */
  .section-title { font-size: var(--text-4xl); }

  /* Navbar adjustments */
  .nav-actions .btn:not(.btn--icon):not(.mobile-menu-btn) { display: none; }
  .lang-selector { display: none; }
  .theme-toggle { display: flex; }

  /* Cards */
  .card { padding: var(--space-6); }
  .service-card { padding: var(--space-6) var(--space-5); }

  /* Timeline */
  .timeline { max-width: 100%; }
}

/* ─── MOBILE LARGE — max 425px ───────────────────────────────── */
@media (max-width: 425px) {
  :root { --container-pad: 20px; }

  /* Hero */
  .hero-title { font-size: clamp(2.4rem, 9vw, 3.5rem); }
  .hero-subtitle { font-size: var(--text-base); }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { justify-content: center; }
  .hero-stats { gap: var(--space-4); }

  /* Section title */
  .section-title { font-size: var(--text-3xl); }
  .section-header { margin-bottom: var(--space-10); }

  /* Stats */
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-number { font-size: var(--text-5xl); }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; }
  .footer-social { flex-wrap: wrap; }

  /* Services grid */
  .services-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
  .service-card { padding: 24px 16px; min-height: 260px; gap: 16px; }
  .service-card-icon { width: 140px; height: 140px; font-size: 64px; border-radius: 28px; }

  /* Testimonials */
  .testimonial-card { padding: var(--space-6); }

  /* FAQ */
  .faq-question { padding: var(--space-4) var(--space-5); }
  .faq-answer { padding: 0 var(--space-5); }
  .faq-answer.open { padding: 0 var(--space-5) var(--space-5); }

  /* Floating buttons */
  .floating-whatsapp { width: 52px; height: 52px; font-size: 22px; bottom: var(--space-5); right: var(--space-5); }
  .back-to-top { width: 44px; height: 44px; bottom: calc(var(--space-5) + 62px); right: var(--space-5); }

  /* Navbar */
  .navbar { padding: 0 var(--space-5); }
  .nav-logo-text { display: none; }

  /* Page hero */
  .page-hero-title { font-size: var(--text-4xl); }

  /* Cards */
  .card { padding: var(--space-5); border-radius: var(--radius-md); }

  /* Timeline */
  .timeline-step-content { padding: var(--space-5); }

  /* Legal */
  .legal-content { padding: var(--space-8) var(--space-4); }

  /* Loader */
  .loader-bar-wrapper { width: calc(100vw - 60px); }
  .loader-logo-text { font-size: var(--text-2xl); }
}

/* ─── MOBILE SMALL — max 375px ───────────────────────────────── */
@media (max-width: 375px) {
  .hero-title { font-size: clamp(2rem, 8.5vw, 2.8rem); }
  .stat-number { font-size: var(--text-4xl); }
  .services-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-2); }
  .section { padding-block: clamp(48px, 8vw, 80px); }
}

/* ─── MINIMUM — 320px ────────────────────────────────────────── */
@media (max-width: 320px) {
  :root { --container-pad: 14px; }
  .hero-title { font-size: 1.9rem; }
  .services-grid { grid-template-columns: 1fr 1fr; gap: var(--space-2); }
  .service-card-icon { width: 110px; height: 110px; font-size: 50px; border-radius: 22px; }
  .hero-cta .btn { font-size: var(--text-sm); padding: 12px 20px; }
}

/* ─── ULTRAWIDE — 3440px+ ────────────────────────────────────── */
@media (min-width: 3440px) {
  :root { font-size: 24px; --container-pad: 200px; }
  .hero { min-height: 90svh; }
  .services-grid { grid-template-columns: repeat(8, 1fr); }
  .stats-grid { grid-template-columns: repeat(5, 1fr); }
}

/* ─── LANDSCAPE MOBILE ───────────────────────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { min-height: 100vw; align-items: flex-start; padding-top: 100px; }
  .hero-scroll-hint { display: none; }
  .hero-stats { margin-top: var(--space-10); }
}

/* ─── HIGH DPI / RETINA ──────────────────────────────────────── */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero-video { image-rendering: auto; }
}

/* ─── TOUCH DEVICE OPTIMIZATIONS ────────────────────────────── */
@media (hover: none) {
  .card:hover { transform: none; }
  .btn:hover { transform: none; }
  .timeline-step-content:hover { transform: none; }
  .service-card:hover .service-card-icon { transform: none; }

  /* Ensure touch targets ≥ 44px */
  .nav-link { min-height: 44px; display: flex; align-items: center; }
  .btn--sm { min-height: 44px; }
  .footer-social-link { width: 44px; height: 44px; }

  /* Disable cursor */
  #cursor-dot, #cursor-ring { display: none; }
}

/* ─── CONTACT GRID & MOBILE OVERFLOW PROTECTION ─────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 900px) {
  html, body {
    overflow-x: hidden !important;
    width: 100vw !important;
    max-width: 100vw !important;
  }

  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
    width: 100% !important;
  }

  .contact-form-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .card, .contact-glass-card, .contact-method-card {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* ─── PRINT ──────────────────────────────────────────────────── */
@media print {
  .navbar, .loader, .floating-whatsapp, .back-to-top,
  #cursor-dot, #cursor-ring, #scroll-progress,
  .hero-video-wrapper { display: none !important; }
  body { background: white; color: black; }
  .hero { background: white; min-height: auto; padding-top: 40px; }
  .hero-title { color: black; font-size: 32px; }
  .section-title { color: black; }
  .card { border: 1px solid #ddd; background: white; }
  a { color: #4f46e5; }
  .text-gradient, .gradient-text-animate {
    -webkit-text-fill-color: #4f46e5;
    background: none;
    color: #4f46e5;
  }
}
