/* ==========================================================================
   RESPONSIVE DESIGN (1440, 1200, 1024, 768, 480, 390, 360px) — WHITE THEME
   ========================================================================== */

@media (max-width: 1440px) {
  :root {
    --container-max-width: 1280px;
  }
}

@media (max-width: 1200px) {
  :root {
    --container-max-width: 1080px;
    --section-spacing: clamp(4.5rem, 8vw, 7.5rem);
  }

  .hero-bottom {
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
  }

  .about-editorial-grid {
    gap: 4rem;
  }

  .contact-grid {
    gap: 4rem;
  }
}

/* --------------------------------------------------------------------------
   TABLETS HORIZONTAL & VERTICAL (<= 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root {
    --header-height: 76px;
  }

  /* Header y Menú Hamburguesa */
  .nav-pill-capsule {
    display: none;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
  }

  /* Hero */
  .hero-editorial-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-portrait-col {
    justify-content: flex-start;
  }

  .hero-bottom {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  /* Proyectos alternados pasan a layouts apilados */
  .project-layout-left,
  .project-layout-right {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .project-layout-right .project-info {
    order: 2;
  }

  .project-layout-right .project-img-container {
    order: 1;
  }

  /* Sobre Mí */
  .about-editorial-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-portrait-wrap {
    max-width: 100%;
  }

  /* Servicios */
  .service-category-item {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Páginas de Proyecto */
  .project-detail-metadata-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .case-study-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

/* --------------------------------------------------------------------------
   TABLETS PEQUEÑAS Y MÓVILES GRANDES (<= 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --header-height: 70px;
    --container-padding: 1.25rem;
    --section-spacing: clamp(4rem, 12vw, 6rem);
  }

  .site-header {
    padding-top: 1rem;
    padding-bottom: 0.75rem;
  }

  .header-signature-img {
    height: clamp(52px, 12vw, 68px);
    max-width: 220px;
  }

  .nav-contact-pill {
    padding: 0.5rem 1.1rem;
    font-size: 0.75rem;
  }

  .projects-showcase {
    gap: 4.5rem;
  }

  .project-img-container {
    aspect-ratio: 16 / 11;
  }

  .project-layout-full .project-img-container {
    aspect-ratio: 16 / 10;
  }

  .service-deliverables-list {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

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

  .form-row-2 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .contact-form {
    padding: 1.75rem 1.25rem;
  }

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

  .gallery-item.span-2 {
    grid-column: span 1;
  }

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

  .project-pagination-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .pagination-item.next {
    text-align: left;
    align-items: flex-start;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }

  .footer-socials {
    flex-wrap: wrap;
    gap: 1.25rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

/* --------------------------------------------------------------------------
   MÓVILES COMPACTOS (<= 480px, 390px, 360px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  :root {
    --header-height: 64px;
    --container-padding: 1rem;
  }

  .hero-meta-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .hero-display-title {
    font-size: clamp(2.3rem, 10vw, 3rem);
    line-height: 0.98;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
  }

  .btn {
    width: 100%;
    min-height: 50px;
    padding: 1rem 1.5rem;
  }

  .header-signature-img {
    height: clamp(44px, 11vw, 54px);
    max-width: 175px;
  }

  .nav-contact-pill {
    padding: 0.45rem 0.9rem;
    font-size: 0.6875rem;
    letter-spacing: 0.05em;
  }

  .project-detail-metadata-bar {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .marquee-item {
    font-size: 1.35rem;
    padding: 0 1rem;
    gap: 1rem;
  }

  .marquee-wrapper {
    padding: 1.5rem 0;
  }

  .lightbox-modal {
    padding: 1rem;
  }

  .lightbox-nav {
    display: none;
  }

  .lightbox-close {
    top: 1rem;
    right: 1rem;
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 390px) {
  .hero-display-title {
    font-size: 2.15rem;
  }

  .section-title-huge {
    font-size: 2.4rem;
  }

  .about-huge-title {
    font-size: 2.6rem;
  }

  .contact-huge-title {
    font-size: 2.4rem;
  }

  .project-title {
    font-size: 2.1rem;
  }
}

body, html {
  max-width: 100%;
  overflow-x: hidden !important;
}
