/* ==========================================================================
   WINADATA RESPONSIVE MEDIA QUERIES
   Breakpoints: 1440px (Desktop), 1220px (Laptop), 768px (Tablet), 375px (Mobile)
   ========================================================================== */

/* --- Container width adjustments --- */
@media (min-width: 1400px) {
  .container {
    max-width: 1280px;
  }
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
  .container {
    max-width: 1140px;
  }
}

/* --- Laptop & Small Desktop (Max 1199.98px) --- */
@media (max-width: 1199.98px) {
  :root {
    --section-padding-y: 4rem;
    --section-padding-y-lg: 5rem;
  }

  .nav-link-custom {
    padding: 0.5rem 0.65rem;
    font-size: 0.85rem;
  }

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

/* --- Tablet (Max 991.98px) --- */
@media (max-width: 991.98px) {
  :root {
    --section-padding-y: 3.5rem;
    --section-padding-y-lg: 4.5rem;
  }

  /* Header adjustments */
  .site-header {
    padding: 0.75rem 0;
  }

  .desktop-nav {
    display: none !important;
  }

  .mobile-menu-toggle {
    display: flex !important;
  }

  .hero-section {
    padding-top: 3.5rem;
    padding-bottom: 4.5rem;
    text-align: center;
  }

  .hero-actions-group {
    justify-content: center;
  }

  .control-panel-mockup {
    margin-top: 2.5rem;
  }

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

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

/* --- Mobile (Max 767.98px) --- */
@media (max-width: 767.98px) {
  :root {
    --section-padding-y: 3rem;
    --section-padding-y-lg: 3.5rem;
  }

  /* Padding & Margin constraints */
  .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  /* Safe Gutters on Mobile: Prevent Horizontal Overflow from negative margins */
  .row.g-5 {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
  }
  .row.g-4 {
    --bs-gutter-x: 1.25rem;
    --bs-gutter-y: 1.25rem;
  }

  /* Safe text wrapping on mobile */
  .legal-card-light,
  .legal-card,
  .site-footer-corporate {
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* Typography scale */
  h1, .h1 {
    font-size: 1.85rem;
    line-height: 1.25;
  }

  h2, .h2 {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  h3, .h3 {
    font-size: 1.2rem;
  }

  /* Control Panel & Telemetry */
  .telemetry-row {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .hero-actions-group {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .btn-winadata-primary,
  .btn-winadata-secondary,
  .btn-winadata-teal {
    width: 100%;
    min-height: 48px; /* Touch friendly standard */
  }

  /* Simulator */
  .simulator-wrapper {
    padding: 1.25rem 0.85rem;
  }

  .device-mockup-frame {
    border-width: 4px;
    border-radius: 28px;
    padding: 8px;
  }

  .device-screen-container {
    border-radius: 20px;
  }

  .meter-price-display {
    font-size: 2rem;
  }

  .simulator-interactive-dock {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  /* Cards & Forms */
  .card-elevated {
    padding: 1.5rem;
  }

  .card-glass {
    padding: 1.25rem;
  }

  .legal-card,
  .legal-card-light {
    padding: 1.5rem;
  }

  .flow-step-bar,
  .flow-step-bar-light {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .flow-arrow {
    transform: rotate(90deg);
    margin: 0.25rem 0;
  }

  .hero-corporate {
    padding-top: 3.5rem;
    padding-bottom: 4.5rem;
  }

  .hero-pillar-strip {
    margin-top: -1.5rem;
    padding: 1.25rem 1rem;
  }

  /* Footer */
  .site-footer,
  .site-footer-corporate {
    padding-top: 3.5rem;
  }
}

/* --- Ultra Small Devices (375px and down) --- */
@media (max-width: 375px) {
  .brand-title-group .brand-sub {
    display: none;
  }

  .btn-winadata-primary,
  .btn-winadata-secondary {
    font-size: 0.875rem;
    padding: 0.7rem 1.2rem;
  }

  .meter-price-display {
    font-size: 1.75rem;
  }
}
