/*
  ============================================================
  SOCIVOX — RESPONSIVE.CSS
  ============================================================
  Ajustes por tamaño de pantalla.

  Puntos principales:
  - 1160px: laptop/tablet horizontal -> menú móvil
  - 900px: tablet -> columnas más simples
  - 680px: celular -> una columna
  - 430px: celular pequeño
*/

/* Pantallas muy grandes: evita que el contenido se vea perdido */
@media (min-width: 1500px) {
  :root {
    --container: 1340px;
  }

  .hero-grid {
    gap: 82px;
  }

  .section-heading__copy {
    max-width: 840px;
  }
}

/* Laptop pequeña / tablet horizontal */
@media (max-width: 1160px) {
  .main-nav {
    position: fixed;
    inset: var(--header-height) 0 auto 0;
    max-height: calc(100svh - var(--header-height));
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 18px max(24px, calc((100vw - var(--container)) / 2));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--header-bg-scrolled);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
  }

  .main-nav.is-open {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: 13px 14px;
    font-size: 0.98rem;
  }

  .menu-toggle {
    display: block;
    flex: 0 0 auto;
  }

  .header-actions > .btn {
    display: none;
  }

  .hero-grid,
  .split,
  .contact-grid,
  .two-column-panel,
  .home-faq-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-copy {
    max-width: 820px;
  }

  .hero-visual {
    width: min(100%, 850px);
  }

  .home-faq-grid .section-heading__copy {
    position: static;
  }

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

  .article-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 42px;
  }

  .article-aside {
    position: static;
  }

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

  .footer-grid > :last-child {
    grid-column: 2 / -1;
  }
}

/* Tablet */
@media (max-width: 900px) {
  :root {
    --header-height: 72px;
  }

  .container {
    width: min(var(--container), calc(100% - 36px));
  }

  .hero {
    padding: 68px 0 62px;
  }

  .hero-grid {
    gap: 48px;
  }

  .hero-frame {
    transform: none;
  }

  .services-grid,
  .process-grid,
  .audience-grid,
  .deliverables-grid,
  .values-grid,
  .marketing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-detail-grid,
  .package-grid {
    grid-template-columns: 1fr;
  }

  .service-detail {
    min-height: auto;
  }

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

  .proof-item:nth-child(2) {
    border-right: 0;
  }

  .proof-item:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }

  .outcome-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .footer-grid > :last-child {
    grid-column: auto;
  }
}

/* Celular y tablet vertical estrecha */
@media (max-width: 680px) {
  :root {
    --header-height: 68px;
    --radius-lg: 24px;
    --radius-md: 18px;
  }

  .container {
    width: min(100% - 28px, var(--container));
  }

  .section {
    padding: 68px 0;
  }

  .section--tight {
    padding: 50px 0;
  }

  .header-inner {
    gap: 12px;
  }

  .brand-mark {
    width: 39px;
    height: 39px;
    border-radius: 12px;
  }

  .hero {
    padding: 54px 0 58px;
  }

  .hero-grid {
    gap: 38px;
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: clamp(2.45rem, 12vw, 4.35rem);
  }

  .hero-copy .lead {
    margin-top: 20px;
  }

  .hero-actions {
    margin-top: 26px;
  }

  .hero-frame {
    padding: 8px;
    border-radius: 21px;
  }

  .hero-frame img {
    border-radius: 15px;
  }

  .hero-badge {
    position: static;
    width: 100%;
    margin-top: 12px;
  }

  .proof-grid,
  .services-grid,
  .process-grid,
  .project-grid,
  .service-detail-grid,
  .package-grid,
  .values-grid,
  .marketing-grid,
  .blog-grid,
  .form-grid,
  .audience-grid,
  .deliverables-grid,
  .outcome-list {
    grid-template-columns: 1fr;
  }

  .proof-item,
  .proof-item:nth-child(n) {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .proof-item:last-child {
    border-bottom: 0;
  }

  .section-heading {
    display: block;
    margin-bottom: 32px;
  }

  .section-heading .btn {
    margin-top: 20px;
  }

  .feature-row {
    grid-template-columns: 34px 1fr;
    gap: 12px;
  }

  .card,
  .compact-card,
  .project-body,
  .blog-content {
    padding: 22px;
  }

  .process-card,
  .compact-card,
  .deliverable-card {
    min-height: auto;
  }

  .process-card h3 {
    margin-top: 54px;
  }

  .field--full {
    grid-column: auto;
  }

  .page-hero {
    padding: 64px 0 56px;
  }

  .page-hero::after {
    width: 340px;
    height: 340px;
    top: -190px;
    right: -160px;
  }

  .funnel-step:nth-child(n) {
    margin-inline: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    margin-top: 38px;
  }

  .article-content h2 {
    margin-top: 42px;
  }
}

/* Celulares pequeños */
@media (max-width: 430px) {
  .container {
    width: calc(100% - 24px);
  }

  .brand-copy span {
    display: none;
  }

  .brand-copy strong {
    font-size: 1rem;
  }

  .menu-toggle {
    width: 42px;
    height: 42px;
  }

  .btn {
    width: 100%;
  }

  .hero-actions,
  .cta-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .chips {
    gap: 7px;
  }

  .chip {
    font-size: 0.73rem;
  }

  .project-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .cta-panel {
    padding: 28px 22px;
  }

  .contact-option {
    padding: 17px;
  }
}

/* Móvil horizontal: que el menú no tape todo sin poder desplazarse */
@media (max-height: 540px) and (max-width: 1160px) {
  .main-nav {
    max-height: calc(100svh - var(--header-height));
    padding-block: 10px;
  }

  .nav-link {
    padding-block: 9px;
  }
}

/* En dispositivos táctiles no dependemos de efectos hover */
@media (hover: none) {
  .btn:hover,
  .card:hover,
  .compact-card:hover,
  .project-card:hover {
    transform: none;
  }
}
