/* ===========================
   YIRA.AI — RESPONSIVE / MOBILE
   Breakpoints:
   - Tablet: max-width 1024px
   - Mobile: max-width 768px
   - Small:  max-width 480px
   =========================== */

/* ---- TABLET (≤1024px) ---- */
@media (max-width: 1024px) {
  .container { padding: 0 24px; }

  /* Navbar */
  .nav-links { gap: 2px; }
  .nav-links a { padding: 8px 10px; font-size: 0.82rem; }
  .nav-cta .btn-ghost { display: none; }

  /* Hero split */
  .hero-split { grid-template-columns: 1fr; gap: 40px; }
  .hero-right { display: none; }
  .hero-title { font-size: 2.6rem; }
  .hero-stats { flex-wrap: wrap; gap: 0; }

  /* Products */
  .product-row { grid-template-columns: 1fr; gap: 40px; }
  .product-row.reverse { direction: ltr; }
  .product-image { order: -1; }
  .prod-img { height: 280px; }

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

  /* Testimonials */
  .testi-grid { grid-template-columns: 1fr; }

  /* AI Engine */
  .engine-products { flex-direction: column; align-items: center; }
  .engine-product-card { width: 100%; max-width: 400px; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }

  /* Product pages */
  .pp-hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .pp-hero-img { display: none; }
  .pp-feature-row { grid-template-columns: 1fr; gap: 40px; }
  .pp-feature-row-rev { direction: ltr; }
  .pp-demo-inner { grid-template-columns: 1fr; gap: 40px; }
  .ms-cap-grid { grid-template-columns: repeat(2, 1fr); }
  .pp-pipeline { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .pp-pipeline::before { display: none; }
  .pp-steps { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .steps-row::before { display: none; }
  .pp-step-connector { display: none; }
}

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

  /* Navbar — hamburger style */
  .navbar { height: 64px; }
  .nav-inner { gap: 0; height: 64px; }
  .nav-links { display: none; }
  .nav-cta { gap: 8px; }
  .nav-cta .btn { padding: 10px 16px; font-size: 0.82rem; }
  .logo-img { height: 32px; max-width: 120px; }

  /* Hero */
  .hero { padding: 100px 0 60px; }
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 0.95rem; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-stats { padding: 16px 20px; }
  .stat { padding: 0 12px; }
  .stat-num { font-size: 1.3rem; }
  .stat-divider { height: 32px; }

  /* Trusted */
  .trusted-logos { gap: 8px; }
  .logo-pill { font-size: 0.75rem; padding: 6px 14px; }

  /* AI Engine */
  .ai-engine { padding: 72px 0; }
  .engine-core { width: 130px; height: 130px; }
  .engine-capabilities { gap: 8px; }
  .cap-tag { font-size: 0.72rem; padding: 5px 12px; }

  /* Products section */
  .products { padding: 72px 0; }
  .product-row { margin-bottom: 56px; padding-bottom: 56px; }
  .product-title { font-size: 1.4rem; }
  .prod-img { height: 240px; }
  .prod-overlay-card { left: 12px; right: 12px; bottom: 12px; }

  /* Impact */
  .impact { padding: 72px 0; }
  .impact-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .impact-card { padding: 24px 20px; }
  .impact-num { font-size: 2rem; }

  /* Testimonials */
  .testimonials { padding: 72px 0; }
  .testi-card { padding: 28px 24px; }

  /* CTA */
  .cta-card { padding: 48px 24px; border-radius: 20px; }
  .cta-title { font-size: 1.6rem; }
  .cta-actions { flex-direction: column; align-items: center; }
  .cta-actions .btn { width: 100%; max-width: 320px; justify-content: center; }
  .cta-contact-row { flex-direction: column; gap: 8px; align-items: center; }

  /* Footer */
  .footer { padding: 56px 0 0; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom .container { flex-direction: column; text-align: center; gap: 6px; }

  /* Section titles */
  .section-title { font-size: 1.7rem; }
  .section-subtitle { font-size: 0.9rem; margin-bottom: 36px; }

  /* Feature grid */
  .feature-grid { grid-template-columns: 1fr; }
  .feature-section { padding: 60px 0; }

  /* How it works */
  .steps-row { flex-direction: column; gap: 32px; }
  .steps-row::before { display: none; }

  /* Product pages */
  .pp-hero { padding: 90px 0 0; }
  .pp-hero-inner { grid-template-columns: 1fr; padding-bottom: 48px; }
  .pp-hero-title { font-size: 1.9rem; }
  .pp-hero-sub { font-size: 0.95rem; }
  .pp-hero-actions { flex-direction: column; }
  .pp-hero-actions .btn { width: 100%; justify-content: center; }
  .pp-hero-stats { flex-wrap: wrap; gap: 0; padding: 14px 16px; }
  .pp-stat { padding: 0 12px; }
  .pp-stat-num { font-size: 1.2rem; }

  .pp-section { padding: 60px 0; }
  .pp-section-header { margin-bottom: 40px; }

  .pp-feature-row { grid-template-columns: 1fr; gap: 32px; margin-bottom: 56px; padding-bottom: 56px; }
  .pp-feat-photo { height: 260px; }
  .pp-feat-badge { bottom: -12px; right: 12px; }
  .pp-feat-title { font-size: 1.3rem; }

  .pp-steps { grid-template-columns: 1fr 1fr; gap: 24px; }
  .pp-step-connector { display: none; }

  .pp-cards { grid-template-columns: 1fr; gap: 16px; }
  .pp-audience { grid-template-columns: 1fr; gap: 16px; }

  .pp-pipeline { grid-template-columns: 1fr 1fr; gap: 24px; }
  .pp-pipeline::before { display: none; }
  .pp-pipe-num { width: 60px; height: 60px; font-size: 1.1rem; }

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

  /* MedSense */
  .ms-cap-grid { grid-template-columns: 1fr; gap: 16px; }
  .ms-problem-card { padding: 24px 20px; }

  /* Stats banner */
  .stats-strip-inner { gap: 20px; }
  .strip-num { font-size: 1.8rem; }
}

/* ---- SMALL MOBILE (≤480px) ---- */
@media (max-width: 480px) {
  .container { padding: 0 14px; }

  .hero-title { font-size: 1.75rem; }
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
  .stat-divider { display: none; }
  .stat { padding: 12px 8px; border-right: 1px solid #E2E8F0; border-bottom: 1px solid #E2E8F0; }
  .stat:nth-child(2n) { border-right: none; }
  .stat:nth-last-child(-n+2) { border-bottom: none; }

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

  .pp-steps { grid-template-columns: 1fr; }
  .pp-pipeline { grid-template-columns: 1fr; }

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

  .cta-card { padding: 40px 20px; }

  .section-title { font-size: 1.5rem; }

  .pp-hero-title { font-size: 1.65rem; }
  .pp-hero-stats { display: grid; grid-template-columns: 1fr 1fr; }
  .pp-stat-div { display: none; }
  .pp-stat { padding: 10px 8px; border-right: 1px solid #E2E8F0; border-bottom: 1px solid #E2E8F0; }
  .pp-stat:nth-child(2n) { border-right: none; }

  /* Dropdown full width on mobile */
  .dropdown-menu { min-width: 260px; left: -60px; }

  /* Engine products stack */
  .engine-product-card { min-width: unset; width: 100%; }
}

/* ---- MOBILE NAV TOGGLE ---- */
@media (max-width: 768px) {
  .nav-mobile-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
    margin-right: 8px;
  }
  .nav-mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #334155;
    border-radius: 2px;
    transition: all 0.3s;
  }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #E2E8F0;
    padding: 16px;
    gap: 4px;
    z-index: 999;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  }
  .nav-links.open li { width: 100%; }
  .nav-links.open a { display: block; padding: 12px 16px; border-radius: 10px; font-size: 0.95rem; }
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: #F8FAFC;
    border-radius: 10px;
    margin-top: 4px;
    padding: 4px;
  }
  .dropdown:hover .dropdown-menu { display: none; }
  .dropdown.open .dropdown-menu { display: flex; }
}
