/* ========================================
   SWITCH Soluciones Tecnológicas
   Responsive Design - Rediseño 2026
   ======================================== */

/* ========================================
   LARGE DESKTOP (1440px+)
   ======================================== */
@media (min-width: 1440px) {
  .container {
    max-width: 1320px;
  }

  .hero-image {
    max-width: 540px;
  }

  .section-title {
    font-size: 3rem;
  }
}

/* ========================================
   TABLET (768px - 1023px)
   ======================================== */
@media (max-width: 1023px) {
  :root {
    --spacing-xl: 4rem;
    --spacing-lg: 3rem;
  }

  /* Header */
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(10, 25, 41, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-md);
    transition: right 0.4s ease;
    padding: var(--spacing-md);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-link {
    font-size: 1.1rem;
  }

  body.menu-open {
    overflow: hidden;
  }

  /* Hero - Stacked layout */
  .hero .container {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-md);
    justify-content: center;
  }

  .hero-content {
    max-width: 600px;
    text-align: center;
    flex: none;
  }

  .hero-subtitle {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-image {
    max-width: 380px;
    width: 55%;
    flex: none;
  }

  .hero::before,
  .hero::after {
    display: none;
  }

  /* Presentación */
  .presentacion-features {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
  }

  /* Estadísticas */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Servicios */
  .servicios-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Proyectos */
  .proyectos-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .proyectos-grid .proyecto-card:last-child {
    grid-column: 1 / -1;
    max-width: 500px;
    margin: 0 auto;
  }

  /* Clientes */
  .clientes-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Contacto */
  .contacto-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }

  /* Social sidebar */
  .social-sidebar {
    left: 0.75rem;
  }

  .social-sidebar a {
    width: 36px;
    height: 36px;
  }
}

/* ========================================
   MOBILE (320px - 767px)
   ======================================== */
@media (max-width: 767px) {
  :root {
    --spacing-xl: 3rem;
    --spacing-lg: 2rem;
    --spacing-md: 1.25rem;
  }

  .container {
    padding: 0 var(--spacing-sm);
  }

  /* Header */
  .logo img {
    height: 32px;
  }

  /* Hero */
  .hero {
    min-height: 100vh;
    min-height: 100svh;
  }

  .hero .container {
    flex-direction: column;
    text-align: center;
    padding-top: var(--spacing-sm);
    padding-bottom: var(--spacing-lg);
    gap: var(--spacing-sm);
  }

  .hero-content {
    text-align: center;
    order: 1;
    max-width: 100%;
    flex: none;
  }

  .hero-title {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
    margin-bottom: var(--spacing-sm);
  }

  .hero-subtitle {
    font-size: 0.95rem;
    max-width: 100%;
    margin-bottom: var(--spacing-md);
  }

  .hero-image {
    order: 2;
    max-width: 300px;
    width: 60%;
    margin: 0 auto;
    flex: none;
  }

  .hero-icon-wrapper svg {
    width: 48px;
    height: 48px;
  }

  .badge-cta {
    font-size: 0.95rem;
    padding: 0.8rem 1.75rem;
  }

  /* Sección titles */
  .section-title {
    font-size: 1.75rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  .section-description {
    font-size: 1rem;
  }

  /* Presentación */
  .presentacion-features {
    grid-template-columns: 1fr;
  }

  .feature-item {
    padding: var(--spacing-sm);
  }

  /* Estadísticas */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
  }

  .stat-item {
    padding: var(--spacing-sm);
  }

  .counter-number {
    font-size: 2.25rem;
  }

  .counter-suffix {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.85rem;
  }

  /* Servicios */
  .servicios-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }

  .servicio-card {
    padding: var(--spacing-sm);
  }

  /* Proyectos */
  .proyectos-grid {
    grid-template-columns: 1fr;
  }

  .proyectos-grid .proyecto-card:last-child {
    max-width: 100%;
  }

  .proyecto-image {
    height: 160px;
  }

  /* Clientes */
  .clientes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
  }

  .cliente-logo {
    padding: var(--spacing-sm);
  }

  .cliente-logo span {
    font-size: 0.7rem;
  }

  /* Contacto */
  .contacto-grid {
    grid-template-columns: 1fr;
  }

  .contacto-form-wrapper,
  .info-card {
    padding: var(--spacing-sm);
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .footer-brand {
    text-align: center;
  }

  .footer-brand img {
    margin: 0 auto;
  }

  /* Social sidebar */
  .social-sidebar {
    display: none;
  }

  /* WhatsApp float */
  .whatsapp-float {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 50px;
    height: 50px;
  }

  .whatsapp-float svg {
    width: 24px;
    height: 24px;
  }

  /* Scroll down */
  .scroll-down {
    bottom: 1rem;
  }
}

/* ========================================
   SMALL MOBILE (320px - 375px)
   ======================================== */
@media (max-width: 375px) {
  .hero-title {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .hero-image {
    max-width: 220px;
    width: 55%;
  }

  .badge-cta {
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

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

  .counter-number {
    font-size: 2rem;
  }
}

/* ========================================
   LANDSCAPE MOBILE
   ======================================== */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: calc(var(--header-height) + 1.5rem) 0 1.5rem;
  }

  .hero .container {
    flex-direction: row;
    gap: 1.5rem;
  }

  .hero-content {
    flex: 1 1 60%;
  }

  .hero-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }

  .hero-subtitle {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }

  .hero-image {
    max-width: 180px;
    flex: 0 1 30%;
  }

  .badge-cta {
    font-size: 0.85rem;
    padding: 0.6rem 1.5rem;
  }

  .scroll-down {
    display: none;
  }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
  .header-sticky,
  .social-sidebar,
  .whatsapp-float,
  .scroll-down,
  .hamburger {
    display: none !important;
  }

  body {
    background: white;
    color: #333;
  }

  .hero {
    min-height: auto;
    padding: 2rem 0;
    background: #f0f4ff;
  }

  .section {
    padding: 1.5rem 0;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8rem;
    color: #666;
  }
}

/* ========================================
   REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
  }
}
