/* ═══════════════════════════════════════════════════════════════════════════
   MIAR International — Responsive Breakpoints
   responsive.css — Tablet & Mobile adaptations
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Large Screens (≤1200px) ───────────────────────────────────────────── */
@media (max-width: 1200px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 30px;
  }

  .grid-55-45,
  .grid-45-55 {
    gap: 40px;
  }

  .org-children {
    gap: 24px;
  }

  .org-child {
    min-width: 170px;
    padding: 14px 18px;
    font-size: 13px;
  }
}

/* ── Medium / Tablet (≤992px) ──────────────────────────────────────────── */
@media (max-width: 992px) {
  :root {
    --section-padding: 70px 0;
  }

  /* Nav */
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--navy);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 32px 32px;
    gap: 24px;
    transition: right var(--transition-base);
    box-shadow: -4px 0 20px rgba(0,0,0,0.3);
    z-index: 1100;
  }

  .nav-links.open { right: 0; }
  .nav-links a { font-size: 16px; padding: 8px 0; width: 100%; }
  .btn-nav { width: 100%; text-align: center; margin-top: 8px; }

  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,30,60,0.5);
    z-index: 999;
  }
  .nav-overlay.active { display: block; }

  /* Grids → stacked */
  .grid-2-col,
  .grid-55-45,
  .grid-45-55 {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }

  /* Hero */
  .hero-home { min-height: auto; padding: 120px 0 60px; }
  .hero-home .container { flex-direction: column; }
  .hero-content { max-width: 100%; text-align: center; }
  .hero-buttons { justify-content: center; }
  .hero-content .eyebrow::after { margin-left: auto; margin-right: auto; }

  .floating-cards { flex-direction: row; justify-content: center; flex-wrap: wrap; margin-top: 40px; }
  .floating-card { max-width: 220px; }
  .stats-bar { gap: 32px; flex-wrap: wrap; }

  .hero-page { min-height: 35vh; padding-top: 80px; padding-bottom: 40px; }
  .display-heading { font-size: clamp(28px, 4vw, 44px); }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  /* Process */
  .process-steps { flex-direction: column; gap: 32px; align-items: center; }
  .process-steps::before { display: none; }
  .process-step { max-width: 400px; }

  /* Org chart */
  .org-children { flex-direction: column; align-items: center; }
  .org-line-horizontal { display: none; }

  /* Tabs */
  .tabs { justify-content: flex-start; overflow-x: auto; padding: 12px 16px; gap: 4px; -webkit-overflow-scrolling: touch; }
  .tab-btn { white-space: nowrap; padding: 8px 16px; font-size: 13px; }

  /* ─── CONTACT PAGE ──────────────────────────────────── */
  .contact-split {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .contact-info-panel {
    border-radius: var(--radius-lg);
    height: auto;
    padding: 36px 28px;
  }

  /* ─── COMPANIES PAGE ────────────────────────────────── */

  /* Badge row — wrap nicely */
  .badge-row { gap: 12px; flex-wrap: wrap; }
  .company-badge { padding: 10px 20px; font-size: 13px; }

  /* Services grid stays 2-col on tablet */
  .company-services-grid { grid-template-columns: 1fr 1fr; gap: 14px; }

  /* Image frame */
  .image-frame { max-width: 80%; margin: 0 auto; }

  /* Reorder: image-left layouts → image goes below content on mobile */
  .grid-45-55 .company-img-col { order: 2; }

  /* NextGen: image is on right in grid-55-45 → keep below content */
  #nextgen-ventures .grid-55-45 > div:last-child { order: 2; }

  /* Reverse mobile utility */
  .reverse-mobile > :first-child { order: 2; }
  .reverse-mobile > :last-child  { order: 1; }
}

/* ── Small Tablet (≤768px) ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --section-padding: 56px 0;
    --container-padding: 0 20px;
  }

  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }

  .stats-bar { flex-direction: column; gap: 24px; }
  .stat-number { font-size: 36px; }
  .section-header { margin-bottom: 40px; }

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

  .cta-strip { padding: 40px 0; text-align: center; }

  .director-card { flex-direction: column; text-align: center; }

  /* Contact */
  .contact-info-panel { padding: 32px 20px; }

  /* Form — 2-col rows → 1 col */
  .grid-2 { grid-template-columns: 1fr; gap: 0; }

  /* Accordion */
  .accordion-header { padding: 14px 18px; }
  .accordion-header-left { flex-direction: column; align-items: flex-start; gap: 6px; }

  /* Map */
  .map-wrapper { height: 280px; }

  /* ─── COMPANIES PAGE ────────────────────────────────── */
  .company-services-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
}

/* ── Mobile (≤576px) ───────────────────────────────────────────────────── */
@media (max-width: 576px) {
  :root {
    --section-padding: 44px 0;
    --container-padding: 0 16px;
  }

  .display-heading   { font-size: clamp(24px, 6vw, 36px); }
  .section-heading   { font-size: clamp(22px, 5vw, 30px); }
  .sub-heading       { font-size: 16px; }
  body               { font-size: 15px; }

  /* Buttons */
  .btn { padding: 12px 24px; font-size: 13px; }

  .hero-buttons { flex-direction: column; width: 100%; gap: 12px; }
  .hero-buttons .btn { width: 100%; justify-content: center; }

  .floating-cards { flex-direction: column; align-items: center; }
  .floating-card  { max-width: 100%; width: 100%; }

  .card      { padding: 24px; }
  .card-dark { padding: 24px; }
  .card-icon { width: 48px; height: 48px; font-size: 24px; }

  /* ─── CONTACT PAGE ──────────────────────────────────── */
  .contact-split {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .contact-info-panel {
    padding: 28px 20px;
    border-radius: var(--radius-md);
    height: auto;
  }

  .contact-info-item  { gap: 10px; margin-bottom: 18px; }
  .contact-info-label { font-size: 11px; }
  .contact-info-value { font-size: 14px; word-break: break-word; }

  .btn-whatsapp {
    width: 100%;
    justify-content: center;
    margin-top: 20px;
  }

  /* Form */
  .grid-2 { grid-template-columns: 1fr; gap: 0; }
  .form-group { margin-bottom: 16px; }

  /* Prevent iOS zoom on inputs */
  .form-input,
  .form-select,
  .form-textarea { font-size: 16px; }

  .btn-submit { width: 100%; justify-content: center; }

  /* ─── COMPANIES PAGE ────────────────────────────────── */

  /* Badge row — full-width stacked pills */
  .badge-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .company-badge {
    width: 100%;
    justify-content: center;
    padding: 13px 20px;
    font-size: 14px;
    border-radius: var(--radius-md);
  }

  /* Image frame */
  .image-frame { max-width: 100%; }

  .image-frame::after {
    top: 8px; left: 8px;
    right: -8px; bottom: -8px;
    border-width: 2px;
  }

  /* Services grid → single column list */
  .company-services-grid {
    grid-template-columns: 1fr;
    gap: 0;
    margin: 20px 0;
  }

  .company-service-item {
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(150, 150, 150, 0.15);
    align-items: center;
  }

  /* White-bg sections: darker separator */
  .section-white .company-service-item {
    border-bottom-color: rgba(10, 30, 60, 0.08);
  }

  .company-service-item:last-child { border-bottom: none; }

  .company-service-icon { font-size: 22px; }
  .company-service-title { font-size: 14px; line-height: 1.4; }

  .company-industry-badge { font-size: 11px; }
  .company-tagline        { font-size: 14px; }

  /* Marquee */
  .marquee-wrapper { padding: 10px 0; }
  .marquee-item    { font-size: 12px; }

  /* Org chart */
  .org-parent { font-size: 14px; padding: 12px 24px; }
  .org-child  { min-width: 160px; font-size: 12px; padding: 12px 16px; }

  /* Navbar */
  .navbar         { padding: 14px 0; }
  .navbar.scrolled{ padding: 10px 0; }
  .nav-logo       { font-size: 15px; }

  /* Map */
  .map-wrapper { height: 220px; border-radius: var(--radius-md); }

  /* Footer */
  .footer { padding: 48px 0 0; }
  .footer-brand .footer-tagline { font-size: 13px; }

  /* Accordion */
  .accordion-header        { padding: 14px 16px; }
  .accordion-company-name  { font-size: 15px; }
  .accordion-detail        { font-size: 13px; }
}

/* ── Extra Small (≤400px) ──────────────────────────────────────────────── */
@media (max-width: 400px) {
  :root { --container-padding: 0 14px; }

  .section-heading { font-size: 20px; }

  .contact-info-panel { padding: 24px 16px; }

  .company-badge { font-size: 13px; padding: 11px 16px; }

  .nav-logo { font-size: 14px; }
}
