/* ================================================
   Responsive Design
   Mobile-first approach with breakpoints
   ================================================ */

/* ========== Mobile Navigation ========== */

@media (max-width: 1024px) {
  /* Show mobile menu toggle */
  .navbar-toggle {
    display: flex;
  }

  /* Hide desktop menu */
  .navbar-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background-color: var(--color-bg-primary);
    flex-direction: column;
    align-items: center;
    padding: var(--space-xl) 0;
    gap: var(--space-md);
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-normal) var(--ease-in-out);
  }

  .navbar-menu.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  /* Adjust navbar actions for tablet */
  .navbar-actions {
    gap: var(--space-sm);
  }

  .navbar-actions .btn {
    padding: 10px 20px;
    font-size: var(--font-size-body-sm);
  }
}

/* ========== Tablet Adjustments (768px - 1024px) ========== */

@media (max-width: 1024px) and (min-width: 769px) {
  /* Adjust product cards to 2 columns */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Adjust solutions to 2 columns */
  .solutions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========== Mobile Adjustments (max 768px) ========== */

@media (max-width: 768px) {
  /* Typography adjustments */
  :root {
    --font-size-hero: 40px;
    --font-size-h1: 36px;
    --font-size-h2: 28px;
    --font-size-h3: 22px;
    --section-padding-y: 60px;
  }

  /* Hide language switcher on small mobile */
  .navbar-actions .language-switcher {
    display: none;
  }

  /* Full-width CTA button */
  .navbar-actions .btn {
    display: none;
  }

  /* Hero section */
  .hero {
    padding-top: 72px;
    padding-bottom: var(--space-3xl);
  }

  .hero-content {
    padding: 0 var(--space-md);
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta .btn {
    width: 100%;
  }

  /* Trust section */
  .trust-number {
    font-size: 100px;
  }

  /* Demo cards */
  .demo-image {
    height: 200px;
  }

  /* Solution cards - reduce padding */
  .solution-card {
    padding: var(--space-lg);
  }

  /* Contact info - stack vertically */
  .contact-info {
    grid-template-columns: 1fr;
    text-align: left;
  }

  /* Footer - stack all columns */
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

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

  /* Tables - make scrollable */
  .trust-table {
    overflow-x: auto;
  }

  table {
    min-width: 600px;
  }
}

/* ========== Small Mobile (max 480px) ========== */

@media (max-width: 480px) {
  /* Further reduce spacing */
  :root {
    --section-padding-y: 48px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
  }

  /* Hero */
  .hero-title {
    font-size: 32px;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  /* Product cards - more compact */
  .product-card {
    padding: var(--space-lg);
  }

  .product-icon img {
    width: 60px;
    height: 60px;
  }

  .product-title {
    font-size: 22px;
  }

  /* Trust badge */
  .trust-number {
    font-size: 80px;
  }

  .trust-label {
    font-size: 20px;
  }

  /* Buttons - adjust size */
  .btn-large {
    padding: 14px 28px;
    font-size: var(--font-size-body);
  }

  /* Demo cards */
  .demo-content {
    padding: var(--space-md);
  }

  /* About section */
  .about-image-placeholder {
    height: 250px;
  }

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

/* ========== Landscape Mobile ========== */

@media (max-width: 896px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: var(--space-3xl) 0;
  }

  .scroll-indicator {
    display: none;
  }
}

/* ========== Large Desktop (> 1440px) ========== */

@media (min-width: 1441px) {
  /* Slightly increase max widths for large screens */
  .container {
    max-width: 1280px;
  }

  .container-wide {
    max-width: 1480px;
  }

  /* Increase section padding */
  :root {
    --section-padding-y: 140px;
  }
}

/* ========== Print Styles ========== */

@media print {
  /* Hide navigation and non-essential elements */
  .navbar,
  .scroll-indicator,
  .footer,
  .btn {
    display: none !important;
  }

  /* Optimize for print */
  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
  }

  .section {
    page-break-inside: avoid;
  }

  /* Show URLs for links */
  a[href]::after {
    content: " (" attr(href) ")";
  }
}

/* ========== Touch Device Optimizations ========== */

@media (hover: none) and (pointer: coarse) {
  /* Increase touch targets */
  .btn {
    min-height: 44px;
    padding: 14px 28px;
  }

  .navbar-menu a {
    padding: var(--space-sm);
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Remove hover effects on touch devices */
  .hover-lift:hover,
  .hover-scale:hover {
    transform: none;
  }

  /* Simplify animations */
  *:hover {
    transition-duration: 0.1s;
  }
}

/* ========== High DPI Displays ========== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Use higher quality images if available */
  /* This would be handled by srcset in HTML */
}

/* ========== Dark Mode Support (Optional) ========== */

@media (prefers-color-scheme: dark) {
  /* Dark mode adjustments */
  .hero {
    background: linear-gradient(135deg, #1C1C1E 0%, #000000 100%);
  }

  .navbar {
    background-color: rgba(28, 28, 30, 0.8);
  }

  .hero-gradient {
    background: radial-gradient(circle, rgba(0, 163, 224, 0.2) 0%, transparent 70%);
  }
}
