/* ===== MEDIA QUERIES ===== */

/* For devices smaller than 1200px */
@media (max-width: 1200px) {
  .container {
    max-width: 960px;
  }
  
  .hero__title {
    font-size: var(--font-size-4xl);
  }
  
  .section__title {
    font-size: var(--font-size-3xl);
  }
  
  .footer__container {
    grid-template-columns: 2fr 1fr 1fr;
  }
  
  .footer__newsletter {
    grid-column: span 3;
  }
}

/* For devices smaller than 992px */
@media (max-width: 992px) {
  .container {
    max-width: 720px;
  }
  
  .hero__container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero__image {
    order: -1;
    margin-bottom: var(--spacing-xl);
  }
  
  .hero__buttons {
    justify-content: center;
  }
  
  .about__container {
    grid-template-columns: 1fr;
  }
  
  .about__image {
    order: -1;
    margin-bottom: var(--spacing-xl);
  }
  
  .about__stats {
    justify-content: center;
  }
  
  .contact__container {
    grid-template-columns: 1fr;
  }
  
  .contact__form-container {
    order: -1;
    margin-bottom: var(--spacing-xl);
  }
  
  .footer__container {
    grid-template-columns: 1fr 1fr;
  }
  
  .footer__newsletter {
    grid-column: span 2;
  }
}

/* For devices smaller than 768px */
@media (max-width: 768px) {
  .container {
    max-width: 540px;
    padding: 0 var(--spacing-md);
  }
  
  .section {
    padding: var(--spacing-2xl) 0;
  }
  
  .hero {
    min-height: 80vh;
  }
  
  .hero__title {
    font-size: var(--font-size-3xl);
  }
  
  .hero__description {
    font-size: var(--font-size-base);
  }
  
  .hero__buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .section__title {
    font-size: var(--font-size-2xl);
  }
  
  .section__subtitle {
    font-size: var(--font-size-base);
  }
  
  .services__grid {
    grid-template-columns: 1fr;
  }
  
  .portfolio__grid {
    grid-template-columns: 1fr;
  }
  
  .about__stats {
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
  }
  
  .contact__social {
    justify-content: center;
  }
  
  .footer__container {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }
  
  .footer__logo {
    text-align: center;
  }
  
  .footer__description {
    margin: 0 auto var(--spacing-lg);
  }
  
  .footer__links,
  .footer__services,
  .footer__newsletter {
    text-align: center;
  }
  
  .footer__newsletter {
    grid-column: span 1;
  }
  
  .footer__form {
    max-width: 300px;
    margin: 0 auto;
  }
  
  .footer__container.container {
    flex-direction: column;
    gap: var(--spacing-md);
  }
  
  .footer__terms {
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: center;
  }
}

/* For devices smaller than 576px */
@media (max-width: 576px) {
  .container {
    max-width: 100%;
    padding: 0 var(--spacing-sm);
  }
  
  .hero__title {
    font-size: var(--font-size-2xl);
  }
  
  .section__title {
    font-size: var(--font-size-xl);
  }
  
  .btn {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-sm);
  }
  
  .hero__buttons {
    width: 100%;
  }
  
  .hero__buttons .btn {
    width: 100%;
  }
  
  .service__card {
    padding: var(--spacing-lg);
  }
  
  .contact__form {
    padding: var(--spacing-lg);
  }
}

/* Pega esto al final de tu archivo: responsive.css */
/* =============================================== */
/* === FIX PARA DESLIZAMIENTO HORIZONTAL === */
/* =============================================== */

/*
  Solución para las animaciones AOS:
  Esto evita que los elementos que animan desde fuera
  de la pantalla expandan el ancho de la página.
*/
.hero, .about, .services, .portfolio, .contact {
  overflow-x: hidden;
}