/* ReservaGym Responsive Improvements */

/* Mobile-first approach - mejoras adicionales */

/* Extra small devices (phones, 480px and down) */
@media (width <= 480px) {
  .container {
    padding: 0 var(--space-md);
  }

  /* Hero improvements */
  .hero {
    padding: 6rem 0 2rem;
    min-height: auto;
  }

  .hero-title {
    font-size: var(--font-size-2xl);
    line-height: 1.3;
  }

  .hero-subtitle {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-2xl);
  }

  .hero-actions {
    gap: var(--space-md);
  }

  .btn-large {
    width: 100%;
    height: 3rem;
    font-size: var(--font-size-base);
  }

  .hero-stats {
    gap: var(--space-lg);
    flex-wrap: wrap;
    justify-content: space-around;
  }

  .stat {
    flex: 1;
    min-width: 80px;
  }

  .stat-number {
    font-size: var(--font-size-xl);
  }

  /* Navigation mobile improvements */
  .nav-container {
    padding: 0 var(--space-md);
  }

  .nav-logo span {
    font-size: var(--font-size-base);
  }

  /* Mobile menu overlay */
  .nav-links {
    position: fixed;
    top: 4rem;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-dropdown);
    transform: translateY(-100%);
    transition: transform var(--transition-normal);
  }

  .nav-links.show {
    transform: translateY(0);
  }

  .nav-links a {
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--gray-200);
    width: 100%;
    text-align: center;
  }

  .nav-links .btn {
    margin-top: var(--space-lg);
    width: 100%;
  }
}

/* Small tablets (600px and up) */
@media (width >= 600px) and (width <= 768px) {
  .hero-container {
    gap: var(--space-4xl);
  }

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

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
}

/* Medium tablets (768px and up) */
@media (width >= 768px) and (width <= 1024px) {
  .hero-container {
    gap: var(--space-3xl);
  }

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

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

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

/* Large screens (1200px and up) */
@media (width >= 1200px) {
  .container {
    max-width: var(--container-2xl);
  }

  .hero-title {
    font-size: var(--font-size-6xl);
  }

  .hero-subtitle {
    font-size: var(--font-size-2xl);
  }

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

/* Landscape phones */
@media (height <= 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 5rem 0 2rem;
  }

  .hero-title {
    font-size: var(--font-size-2xl);
  }

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

  .hero-stats {
    margin-top: var(--space-lg);
  }
}

/* High DPI displays */
@media (min-device-pixel-ratio: 2), (resolution >= 192dpi) {
  .hero-image img {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* Print styles */
@media print {
  .navbar,
  .mobile-menu-btn,
  .btn,
  .floating-card {
    display: none !important;
  }

  .hero {
    padding: 2rem 0;
    background: white !important;
  }

  * {
    color: black !important;
    background: white !important;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero {
    scroll-behavior: auto;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: var(--gray-900);
    --bg-secondary: var(--gray-800);
    --text-primary: var(--gray-100);
    --text-secondary: var(--gray-300);
  }

  .navbar {
    background: var(--gray-900);
    border-bottom: 1px solid var(--gray-700);
  }

  .card,
  .feature-card,
  .pricing-card {
    background: var(--gray-800);
    color: var(--gray-100);
  }

  .nav-links {
    background: var(--gray-900);
  }
}

/* Focus styles for keyboard navigation */
.btn:focus,
.nav-link:focus,
.mobile-menu-btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Hover effects only on devices that support hover */
@media (hover: hover) {
  .feature-card:hover,
  .pricing-card:hover {
    transform: translateY(-4px);
  }

  .btn-primary:hover {
    transform: translateY(-1px);
  }
}

/* Touch devices optimization */
@media (pointer: coarse) {
  .btn {
    min-height: 44px; /* Minimum touch target size */
  }

  .nav-link {
    padding: var(--space-lg);
  }

  .mobile-menu-btn {
    padding: var(--space-lg);
  }
}
