/* ============================================================
   KafaSys Responsive Breakpoints
   ============================================================ */

/* ---- Tablet and Below (< 1024px) ---- */
@media (max-width: 1024px) {
  :root {
    --space-5xl: 80px;
    --space-4xl: 64px;
  }

  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-2xl); }

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

  .nav-links { display: none; }
  .nav-utility .btn { display: none; }
  .nav-toggle { display: flex; }
  .mobile-nav { display: block; }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2xl);
  }

  .hero-title { font-size: clamp(1.75rem, 4.5vw, 2.75rem); }

  .workflow {
    flex-direction: column;
    gap: 0;
  }
  .workflow-step {
    border-radius: 0;
  }
  .workflow-step:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .workflow-step:last-child { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

  .hero-dashboard {
    margin-top: var(--space-xl);
  }

  .hero-dash-risks {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---- Mobile Large (< 768px) ---- */
@media (max-width: 768px) {
  :root {
    --space-5xl: 64px;
    --space-4xl: 48px;
    --space-3xl: 40px;
  }

  .container,
  .container-wide {
    padding: 0 var(--space-md);
  }

  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-xl); }
  h3 { font-size: var(--text-lg); }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-legal {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--nav-height) + var(--space-3xl));
    padding-bottom: var(--space-3xl);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn {
    text-align: center;
    justify-content: center;
  }

  .section {
    padding: var(--space-3xl) 0;
  }

  .hero-dash-risks {
    grid-template-columns: repeat(2, 1fr);
  }

  .data-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .cookie-inner {
    flex-direction: column;
    text-align: center;
  }
  .cookie-text {
    min-width: auto;
  }
  .cookie-actions {
    width: 100%;
    justify-content: center;
  }

  .modal-overlay {
    padding: var(--space-sm);
    align-items: flex-end;
  }
  .modal {
    max-height: 90vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }

  .stat-row {
    flex-direction: column;
  }
  .stat-item {
    min-width: auto;
  }

  .metric-value {
    font-size: var(--text-3xl);
  }

  .page-hero {
    padding: calc(var(--nav-height) + var(--space-2xl)) 0 var(--space-2xl);
  }

  .map-container {
    min-height: 280px;
  }

  .leader-card {
    padding: var(--space-lg);
  }

  .tier-card {
    padding: var(--space-lg);
  }
}

/* ---- Mobile Small (< 390px) ---- */
@media (max-width: 390px) {
  :root {
    --space-5xl: 48px;
    --space-4xl: 36px;
    --space-3xl: 32px;
    --space-2xl: 24px;
  }

  h1 { font-size: var(--text-2xl); }

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

  .hero-dash-risks {
    grid-template-columns: 1fr 1fr;
  }

  .btn-lg {
    padding: 12px 20px;
    font-size: var(--text-sm);
  }

  .nav-inner {
    padding: 0 var(--space-md);
  }

  .metric-value {
    font-size: var(--text-2xl);
  }

  .dash-panel-body {
    padding: var(--space-md);
  }
}

/* ---- Very Small (< 320px) ---- */
@media (max-width: 320px) {
  body {
    font-size: 14px;
  }

  .container,
  .container-wide {
    padding: 0 var(--space-sm);
  }

  .hero-dash-risks {
    grid-template-columns: 1fr;
  }
}

/* ---- Large Desktop (> 1440px) ---- */
@media (min-width: 1440px) {
  .container {
    max-width: 1320px;
  }
}

/* ---- Extra Large Desktop (> 1920px) ---- */
@media (min-width: 1920px) {
  :root {
    --nav-height: 72px;
  }
  .container {
    max-width: 1440px;
  }
}

/* ---- Print ---- */
@media print {
  .nav,
  .mobile-nav,
  .cookie-banner,
  .modal-overlay,
  .footer {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
  .hero {
    min-height: auto;
    padding-top: 0;
  }
}
