/* ==========================================================================
   B2B RENT CAR - RESPONSIVE & MOBILE SYSTEM ADAPTATION (SKILL 9 FULL AUDIT)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Universal Anti-Overflow & Ergonomics Base
   -------------------------------------------------------------------------- */
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

/* Fluid Media Protection */
img, video, iframe, canvas {
  max-width: 100%;
  height: auto;
}

/* Touch Target Minimum (44px-48px per WCAG / Mobile Ergonomics) */
button,
a.btn,
.nav-link,
.mobile-nav-link,
.menu-toggle,
.floating-whatsapp {
  min-height: 44px;
  touch-action: manipulation;
}

/* --------------------------------------------------------------------------
   2. Small Mobiles (<= 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  :root {
    --container-padding: 1.125rem;
  }

  .site-header .header-inner {
    height: 72px;
    gap: 0.5rem;
  }

  .brand-logo img {
    height: 42px;
    max-width: 135px;
  }

  .header-actions {
    gap: 0.4rem;
  }

  .header-cta-desktop {
    display: none !important;
  }

  .lang-toggle-capsule {
    padding: 2px 3px;
    gap: 1px;
  }

  .lang-toggle-btn {
    padding: 3px 5px;
    gap: 2px;
    min-height: 26px;
  }

  .lang-toggle-btn .lang-label {
    font-size: 0.6875rem;
  }

  .lang-toggle-btn .flag-icon {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
  }

  .menu-toggle {
    display: flex !important;
    width: 38px;
    height: 38px;
    padding: 6px;
  }

  .hero-section {
    padding-top: 2rem;
    padding-bottom: 2.75rem;
  }

  .hero-title {
    font-size: clamp(1.85rem, 8vw, 2.35rem);
    line-height: 1.18;
  }

  .hero-subtitle {
    font-size: var(--text-sm);
    margin-bottom: var(--space-lg);
  }

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

  .hero-actions .btn {
    width: 100%;
    min-height: 48px;
  }

  .hero-microtext {
    font-size: 0.75rem;
    line-height: 1.4;
  }

  .hero-card-preview {
    padding: 1.25rem;
  }

  .card {
    padding: 1.25rem;
    border-radius: var(--radius-md);
  }

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

  .trust-item {
    padding: 0.35rem 0;
  }

  .options-grid,
  .categories-grid,
  .image-card-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .category-card {
    padding: 1.5rem 1.25rem;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .benefit-card {
    gap: 1rem;
    padding: 1.25rem;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .cta-banner {
    padding: 2rem 1.25rem;
    border-radius: var(--radius-lg);
  }

  .cta-banner-title {
    font-size: var(--text-2xl);
  }

  .cta-banner-actions .btn {
    width: 100%;
  }

  .contact-card-main {
    padding: 1.5rem;
  }

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

  .footer-logo img {
    height: 48px;
  }

  .floating-whatsapp {
    width: 48px;
    height: 48px;
    bottom: 16px;
    right: 16px;
    padding: 10px;
  }
}

/* --------------------------------------------------------------------------
   3. Medium Mobiles & Phablets (481px - 640px)
   -------------------------------------------------------------------------- */
@media (min-width: 481px) and (max-width: 640px) {
  .site-header .header-inner {
    height: 84px;
  }

  .brand-logo img {
    height: 56px;
  }

  .hero-actions {
    flex-direction: column;
  }

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

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

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

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

/* --------------------------------------------------------------------------
   4. Tablets (641px - 1023px)
   -------------------------------------------------------------------------- */
@media (min-width: 641px) and (max-width: 1023px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .hero-visual {
    max-width: 580px;
    margin: 0 auto;
    width: 100%;
  }

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

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

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

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

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

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

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

/* --------------------------------------------------------------------------
   5. Large Desktops & Wide Screens (>= 1024px)
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}
