@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

@import url('./base.css');
@import url('./header.css');
@import url('./hero.css');
@import url('./about.css');
@import url('./pautar.css');
@import url('./contact.css');
@import url('./footer.css');
@import url('./modal.css');

/* ===========================
   RESPONSIVE LAYER (solo móvil/tablet)
   =========================== */

/* Helpers seguros para todas las vistas */
:root{ --header-h: 72px; }
#about, #contact, #split-section{
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* ===== MOBILE: <= 599px ===== */
@media (max-width: 599.98px) {
  .nav-container{
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
    padding: 0 1rem;
  }
  .logo-link{ margin-left: 0 !important; }
  .nav-links{
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: .5rem;
    padding-bottom: .25rem;
  }
  .nav-links li{ text-align: center; }
  .nav-links a{ display: block; padding: .35rem .5rem; border-radius: 8px; }
  .nav-links a:hover{ background: rgba(255,255,255,.08); }

  /* Hero solo en móvil */
  .hero{
    min-height: 70vh;
    background-position: 50% 20%;
    padding-top: calc(var(--header-h) + 16px); /* compensar header fijo SOLO en móvil */
  }
  .hero p{ font-size: 1rem; }

  .about{ padding: 3.5rem 0; }
  .section-title{ font-size: 1.9rem; margin-bottom: 1.5rem; }
  .about-grid{
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 1.5rem;
    padding: 0 .5rem;
  }
  .feature-card{ padding: 1.25rem; }

  .split-section{
    flex-direction: column;
    min-height: auto; height: auto;
  }
  .left-column, .right-column{
    flex: 1 1 auto;
    max-width: 100%;
    padding: 1.25rem 1rem;
    overflow: visible;
    text-align: left;
  }

  .contact{ padding: 3.5rem 0; }
  .contact-grid{
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  .form-container{ border-radius: 14px; padding: 1.25rem; }
  .submit-btn{ font-size: 1rem; padding: .9rem 1.25rem; }

  .footer{ padding: 1.5rem 0; }
  .whatsapp-fijo img{ width: 64px; }
}

/* ===== TABLET: 600–1023px ===== */
@media (min-width: 600px) and (max-width: 1023.98px) {
  .nav-container{
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 0 1.25rem;
  }
  .logo-link{ margin-left: 0; }
  .nav-links{
    display: flex !important;
    gap: 1.25rem;
    flex-wrap: wrap;
  }

  .hero{
    min-height: 75vh;
    background-position: 50% 28%;
    padding-top: calc(var(--header-h) + 16px); /* SOLO tablet */
    padding-bottom: 3rem;
  }

  .about{ padding: 5rem 0; }
  .section-title{ font-size: 2.4rem; margin-bottom: 2rem; }
  .about-grid{
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 2rem;
    margin-top: 2rem;
  }

  .split-section{
    min-height: auto; height: auto; align-items: start;
  }
  .left-column, .right-column{
    flex: 0 0 50%;
    max-width: 50%;
    padding: 2rem;
    overflow: visible;
  }

  .contact{ padding: 5rem 0; }
  .contact-grid{
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .whatsapp-fijo img{ width: 72px; }
}

/* ===== DESKTOP: >= 1024px ===== */
/* No tocamos .hero en desktop para respetar tu hero.css original */
@media (min-width: 1024px) {
  /* opcional: ajustes que SÍ quieras en PC, si no, dejalo vacío */
}

/* ===== FIX: Pautar / Formar Parte lado a lado desde 768px ===== */
@media (min-width: 768px){
  .split-section{
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;  /* evita que salte abajo */
    width: 100%;
  }
  .left-column,
  .right-column{
    flex: 0 0 50% !important;
    max-width: 50% !important;
    min-width: 0;                  /* previene desbordes por contenido */
    padding: 2rem;                 /* un poco menos en anchos medios */
    overflow: visible;             /* sin scroll interno en tablet */
    text-align: left;
  }
}

/* En chico (<768px) sí apilamos */
@media (max-width: 767.98px){
  .split-section{
    display: block !important;     /* apilar limpio */
    min-height: auto;
    height: auto;
  }
  .left-column,
  .right-column{
    max-width: 100% !important;
    flex: 1 1 auto !important;
    padding: 1.25rem 1rem;
  }
}
