/* ============================================================
   RESPONSIVE — Thiqah Website
   Breakpoints: 1440 | 1280 | 1024 | 768 | 640 | 480 | 375 | 320
   ============================================================ */

/* ---- 1280px ------------------------------------------------ */
@media (max-width: 1280px) {
  :root { --section-py: 80px; }

  .hero-container { grid-template-columns: 1fr 1fr; gap: 40px; }
  .hero-title { font-size: clamp(2rem, 4.5vw, 3.5rem); }
  .phone-device { width: 250px; }

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

  .bento-grid { grid-template-columns: repeat(3, 1fr); }
  .bento-large { grid-column: span 2; }
  .bento-tall  { grid-column: span 1; grid-row: span 1; }
  .bento-wide  { grid-column: span 2; }

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

  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
  .footer-grid > :last-child { grid-column: span 2; }
}

/* ---- 1024px ------------------------------------------------ */
@media (max-width: 1024px) {
  :root { --section-py: 72px; }

  /* Nav */
  .nav-links {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: var(--surface);
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 100px 24px 40px;
    gap: 4px;
    transition: right 0.4s cubic-bezier(0.16,1,0.3,1);
    overflow-y: auto;
    z-index: 999;
    box-shadow: -8px 0 40px rgba(0,0,0,0.4);
  }

  .nav-links.open { right: 0; }

  .nav-link {
    width: 100%;
    font-size: 1rem;
    padding: 12px 16px;
    border-radius: var(--radius);
  }

  .hamburger { display: flex; }
  .nav-overlay { display: block; }

  /* Hero */
  .hero-container {
    grid-template-columns: 1fr;
    padding-top: 40px;
    padding-bottom: 60px;
    text-align: center;
  }

  .hero-content { order: 1; }
  .hero-visual  { order: 2; display: none; }

  .hero-desc     { max-width: 100%; margin-left: auto; margin-right: auto; }
  .hero-apps-btns{ justify-content: center; }
  .hero-cta-row  { justify-content: center; }
  .hero-trust-badges { justify-content: center; }
  .hero-badge    { display: inline-flex; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 0; }
  .stat-item  { border-bottom: 1px solid rgba(201,149,42,0.15); }
  .stats-grid .stat-item:nth-child(4),
  .stats-grid .stat-item:nth-child(5) { border-bottom: none; }

  /* Apps */
  .app-panel-content {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 36px 28px;
  }
  .app-panel-visual { display: flex; }

  /* Ecosystem */
  .ecosystem-diagram { height: 340px; }

  /* Steps */
  .steps-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 24px;
  }
  .steps-container::before { display: none; }

  /* Trust */
  .trust-inner { grid-template-columns: 1fr; gap: 48px; }
  .trust-visual { display: flex; justify-content: center; }

  /* Testimonials */
  .testimonial-card { min-width: calc(50% - 10px); }

  /* Download */
  .download-cards { grid-template-columns: repeat(2, 1fr); }

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

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-grid > :first-child { grid-column: span 2; }
}

/* ---- 768px ------------------------------------------------- */
@media (max-width: 768px) {
  :root { --section-py: 60px; }

  .container { padding: 0 20px; }

  /* Section headers */
  .section-title { font-size: clamp(1.6rem, 5vw, 2.4rem); }
  .section-header { margin-bottom: 48px; }

  /* About cards */
  .about-cards { grid-template-columns: 1fr 1fr; gap: 14px; }

  /* Bento grid */
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .bento-large { grid-column: span 2; }
  .bento-tall  { grid-column: span 1; grid-row: span 1; }
  .bento-wide  { grid-column: span 2; }

  /* Apps tabs */
  .apps-tabs { gap: 6px; }
  .app-tab   { padding: 10px 16px; font-size: 0.82rem; }

  /* Loyalty */
  .loyalty-levels  { grid-template-columns: 1fr 1fr; }
  .loyalty-features{ grid-template-columns: 1fr 1fr; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(odd) { border-right: 1px solid rgba(201,149,42,0.15); }
  .stat-item:nth-child(even){ border-right: none; }

  /* Testimonials - 1 per view */
  .testimonial-card { min-width: 100%; }

  /* Trust items */
  .trust-items { grid-template-columns: 1fr; }

  /* Download */
  .download-cards { grid-template-columns: 1fr 1fr; }

  /* App features 1 col */
  .app-features-list { grid-template-columns: 1fr; }

  /* Contact form */
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .contact-form { padding: 28px 20px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > :first-child { grid-column: span 1; }
  .footer-bottom-inner { flex-direction: column; gap: 12px; text-align: center; }

  /* Steps */
  .steps-container { grid-template-columns: 1fr 1fr; }
}

/* ---- 640px ------------------------------------------------- */
@media (max-width: 640px) {
  :root { --section-py: 56px; }

  /* Hero */
  .hero-title { font-size: clamp(2rem, 8vw, 2.8rem); }
  .hero-apps-btns { gap: 8px; }
  .app-btn { padding: 9px 14px; }
  .btn-download-nav span { display: none; }

  /* About cards 1 col */
  .about-cards { grid-template-columns: 1fr; }

  /* Bento 1 col */
  .bento-grid { grid-template-columns: 1fr; }
  .bento-large, .bento-wide { grid-column: span 1; }

  /* Apps panel */
  .app-panel-content { padding: 28px 20px; }

  /* Loyalty 1 col */
  .loyalty-levels  { grid-template-columns: 1fr; }
  .loyalty-features{ grid-template-columns: 1fr 1fr; }

  /* Steps 1 col */
  .steps-container { grid-template-columns: 1fr; }
  .step-icon { width: 72px; height: 72px; font-size: 1.5rem; }

  /* Download 1 col */
  .download-cards { grid-template-columns: 1fr; max-width: 360px; margin: 0 auto; }

  /* Stats */
  .stats-grid { grid-template-columns: 1fr 1fr; }

  /* Trust nodes - hide on small screens */
  .trust-nodes { display: none; }
  .shield-graphic { width: 200px; height: 200px; }

  /* App panel download buttons stack */
  .app-download-btns { flex-direction: column; }
  .store-btn { justify-content: center; }

  /* Ecosystem simplify */
  .ecosystem-diagram { height: auto; position: static; }
  .eco-center { position: static; margin: 0 auto 32px; }
  .eco-nodes { position: static; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 24px; }
  .eco-node  { position: static; }
  .eco-connection { display: none; }

  /* Nav */
  .nav-links { width: 100%; right: -100%; }
  .nav-links.open { right: 0; }
  .btn-download-nav { padding: 9px 14px; }
}

/* ---- 480px ------------------------------------------------- */
@media (max-width: 480px) {
  :root { --section-py: 48px; }

  .hero-title { font-size: 1.9rem; }
  .hero-desc  { font-size: 0.95rem; }

  .nav-brand-text { font-size: 1.3rem; }

  .app-btn strong { font-size: 0.8rem; }

  .loyalty-features { grid-template-columns: 1fr; }

  /* Stats */
  .stats-grid { grid-template-columns: 1fr; }
  .stat-item  { border-right: none; border-bottom: 1px solid rgba(201,149,42,0.15); }

  /* Testimonials */
  .carousel-controls { gap: 10px; }

  /* FAQ */
  .faq-question { font-size: 0.9rem; }

  /* Footer social icons gap */
  .footer-social { gap: 8px; }
  .social-icons  { gap: 8px; }
}

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

  .hero-title { font-size: 1.7rem; }

  .app-panel-content { padding: 20px 16px; }

  .contact-form { padding: 20px 16px; }

  .hero-apps-btns { gap: 6px; }
  .app-btn { flex-direction: column; text-align: center; gap: 4px; padding: 10px; }
}

/* ---- 320px ------------------------------------------------- */
@media (max-width: 320px) {
  .hero-title { font-size: 1.5rem; }
  .section-title { font-size: 1.5rem; }

  .nav-brand-text { display: none; }

  .hero-apps-btns { flex-direction: column; }
  .app-btn { width: 100%; justify-content: center; flex-direction: row; }

  .hero-cta-row { flex-direction: column; width: 100%; }
  .btn-primary-hero, .btn-secondary-hero { width: 100%; justify-content: center; }
}

/* ---- Print ------------------------------------------------- */
@media print {
  .navbar, .splash-screen, .scroll-progress, .back-to-top, .hero-particles, .hero-bg-grid { display: none !important; }
  body { background: white; color: black; }
  .section { padding: 32px 0; }
}
