/* ================================================
   TECHMAX SWEATERS — RESPONSIVE / MOBILE FIRST
   responsive.css
   Breakpoints: 480px | 768px | 1024px | 1280px
   ================================================ */

/*
  ESTRATEGIA: Mobile First
  Los estilos base en styles.css estan pensados para desktop.
  Aqui aplicamos overrides para pantallas mas pequeñas,
  de arriba (desktop) hacia abajo (mobile).

  max-width: 1280px  → Pantallas grandes
  max-width: 1024px  → Tablet landscape / Laptop pequeño
  max-width:  768px  → Tablet portrait
  max-width:  480px  → Mobile grande
  max-width:  360px  → Mobile compacto
*/


/* ------------------------------------------------
   TABLET LANDSCAPE / LAPTOP PEQUEÑO (max 1280px)
   ------------------------------------------------ */
@media (max-width: 1280px) {

  .container {
    padding: 0 2rem;
  }

  /* Hero */
  .hero__inner {
    gap: 3rem;
  }

  /* Proceso */
  .process__step-desc {
    font-size: 0.8125rem;
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 2.5rem;
  }
}


/* ------------------------------------------------
   TABLET LANDSCAPE (max 1024px)
   ------------------------------------------------ */
@media (max-width: 1024px) {

  /* Variables de spacing reducidas */
  :root {
    --spacing-xl:  4rem;
    --spacing-lg:  3rem;
  }

  /* Navegacion */
  .header__nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .mobile-menu {
    display: flex;
  }

  /* Hero */
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero__subheading {
    max-width: 100%;
  }

  .hero__ctas {
    justify-content: center;
  }

  .hero__social-proof {
    justify-content: center;
  }

  .hero__image-wrap {
    max-width: 500px;
    margin: 0 auto;
  }

  .hero__badge-float {
    left: auto;
    right: -1rem;
    bottom: 1.5rem;
  }

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

  /* PAS */
  .pas__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .pas__divider {
    flex-direction: row;
    padding: 0;
    gap: 1rem;
  }

  .pas__divider-line {
    width: auto;
    flex: 1;
    height: 2px;
  }

  /* Beneficios */
  .benefits__grid {
    grid-template-columns: 1fr;
  }

  /* Proceso */
  .process__timeline {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 2rem;
  }

  .process__timeline::before {
    display: none;
  }

  /* Lead Magnet */
  .lead-magnet__inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  /* FAQ */
  .faq__grid {
    grid-template-columns: 1fr;
  }

  .faq__cta-card {
    position: static;
    max-width: 480px;
    margin: 0 auto;
  }

  /* Pre-footer */
  .prefooter__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .prefooter__desc {
    max-width: 100%;
  }

  .prefooter__ctas {
    align-items: center;
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  .footer__col--brand {
    grid-column: 1 / -1;
  }

  .footer__col--map {
    grid-column: 1 / -1;
  }

  .footer__tagline {
    max-width: 480px;
  }

  /* Cursor custom - desactivar en tablet */
  .cursor-custom {
    display: none;
  }
}


/* ------------------------------------------------
   TABLET PORTRAIT (max 768px)
   ------------------------------------------------ */
@media (max-width: 768px) {

  :root {
    --spacing-xl:  3.5rem;
    --spacing-lg:  2.5rem;
    --spacing-md:  1.75rem;
  }

  /* Seccion headers */
  .section-title {
    font-size: clamp(1.5rem, 5vw, 2.25rem);
  }

  /* Hero */
  .hero {
    padding-top: 5rem;
    padding-bottom: 4rem;
  }

  .hero__heading {
    font-size: clamp(1.875rem, 6vw, 3rem);
  }

  .hero__subheading {
    font-size: 0.9375rem;
  }

  .hero__ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__ctas .btn {
    justify-content: center;
  }

  .hero__social-proof {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .hero__proof-divider {
    display: none;
  }

  .hero__proof-item {
    flex: 1;
    min-width: 80px;
  }

  /* Contadores */
  .counters__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .counter-card {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1rem;
    gap: 0.875rem;
  }

  /* PAS */
  .pas__problem,
  .pas__solution {
    padding: 2rem 1.5rem;
  }

  /* Beneficios */
  .benefit-card {
    padding: 2rem 1.5rem;
  }

  /* Proceso */
  .process__timeline {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .process__step {
    flex-direction: row;
    text-align: left;
    gap: 1.5rem;
    align-items: flex-start;
  }

  .process__step-number {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .process__step-card {
    flex: 1;
  }

  .process__step-connector {
    display: none;
  }

  /* Lead magnet */
  .lead-magnet__inner {
    gap: 2.5rem;
  }

  .lead-magnet__heading {
    font-size: clamp(1.5rem, 5vw, 2.25rem);
  }

  .form-card {
    padding: 2rem 1.5rem;
  }

  /* Testimonios */
  .testimonials-swiper .swiper-button-prev,
  .testimonials-swiper .swiper-button-next {
    display: none;
  }

  .testimonial-card {
    padding: 2rem 1.5rem;
  }

  /* FAQ */
  .faq-item__question {
    font-size: 0.875rem;
    padding: 1rem 1.25rem;
  }

  /* Pre-footer */
  .prefooter {
    padding: 3.5rem 0;
  }

  .prefooter__heading {
    font-size: clamp(1.5rem, 5vw, 2.25rem);
  }

  .prefooter__ctas .btn {
    width: 100%;
    justify-content: center;
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer__col--brand {
    grid-column: auto;
  }

  .footer__col--map {
    grid-column: auto;
  }

  .footer__bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .footer__legal-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* WhatsApp flotante */
  .whatsapp-float {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 54px;
    height: 54px;
  }

  /* Back to top */
  .back-to-top {
    bottom: 6.5rem;
    right: 1.5rem;
  }

  /* Scroll indicator del hero */
  .hero__scroll-indicator {
    bottom: 4rem;
  }
}


/* ------------------------------------------------
   MOBILE GRANDE (max 480px)
   ------------------------------------------------ */
@media (max-width: 480px) {

  :root {
    --spacing-xl:  3rem;
    --spacing-lg:  2rem;
  }

  .container {
    padding: 0 1.25rem;
  }

  /* Header */
  .header {
    padding: 1rem 0;
  }

  .header.scrolled {
    padding: 0.625rem 0;
  }

  .header__cta {
    display: none;
  }

  /* Mostrar CTA en mobile sticky (ver abajo) */

  /* Hero */
  .hero {
    padding-top: 4.5rem;
    padding-bottom: 3rem;
  }

  .hero__eyebrow {
    font-size: 0.6875rem;
  }

  .hero__heading {
    font-size: clamp(1.625rem, 8vw, 2.25rem);
    margin-bottom: 1rem;
  }

  .hero__subheading {
    font-size: 0.875rem;
    margin-bottom: 2rem;
  }

  .hero__social-proof {
    padding: 1rem;
    gap: 0.875rem;
  }

  .hero__proof-item strong {
    font-size: 1.25rem;
  }

  .hero__proof-item span {
    font-size: 0.6875rem;
  }

  .hero__image-placeholder {
    aspect-ratio: 4/3;
  }

  .hero__badge-float {
    padding: 0.75rem 1rem;
  }

  .hero__badge-num {
    font-size: 2rem;
  }

  /* Contadores */
  .counters__grid {
    grid-template-columns: 1fr;
    gap: 0.875rem;
  }

  .counter-card {
    flex-direction: row;
    text-align: left;
    padding: 1.25rem;
  }

  .counter-card__icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    font-size: 1.125rem;
  }

  /* PAS */
  .pas__problem,
  .pas__solution {
    padding: 1.75rem 1.25rem;
  }

  .pas__list li {
    font-size: 0.875rem;
  }

  /* Beneficios */
  .benefit-card {
    padding: 1.75rem 1.25rem;
  }

  .benefit-card__icon-wrap {
    width: 60px;
    height: 60px;
    margin-bottom: 1.25rem;
  }

  .benefit-card__icon {
    width: 32px;
    height: 32px;
  }

  /* Proceso */
  .process__step {
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 1rem;
  }

  .process__step-card {
    padding: 1.5rem 1.25rem;
  }

  /* Lead magnet */
  .form-card {
    padding: 1.75rem 1.25rem;
  }

  .form-card__title {
    font-size: 1.25rem;
  }

  .lead-magnet__includes li {
    font-size: 0.875rem;
  }

  /* Testimonios */
  .testimonial-card {
    padding: 1.75rem 1.25rem;
  }

  .testimonial-card__quote {
    font-size: 0.875rem;
  }

  /* FAQ */
  .faq__cta-card {
    padding: 2rem 1.5rem;
  }

  /* Footer */
  .footer__main {
    padding: 3rem 0 2rem;
  }

  .footer__social-link {
    width: 36px;
    height: 36px;
  }

  .footer__legal-nav {
    gap: 0.5rem;
    font-size: 0.75rem;
  }

  /* Botones: tamaño compacto en mobile */
  .btn--lg {
    font-size: 1rem;
    padding: 1rem 2rem;
  }

  /* Seccion label */
  .section-label {
    font-size: 0.6875rem;
  }

  /* Section header reducido */
  .section-header {
    margin-bottom: 2rem;
  }
}


/* ------------------------------------------------
   MOBILE COMPACTO (max 360px)
   ------------------------------------------------ */
@media (max-width: 360px) {

  .container {
    padding: 0 1rem;
  }

  .hero__heading {
    font-size: 1.5rem;
  }

  .btn--lg {
    font-size: 0.9375rem;
    padding: 0.875rem 1.5rem;
  }

  .hero__social-proof {
    flex-direction: column;
    align-items: center;
  }

  .hero__proof-divider {
    display: none;
  }

  .counter-card__number {
    font-size: 1.625rem;
  }
}


/* ------------------------------------------------
   CTA STICKY MOBILE (aparece al scrollear)
   Solo visible en movil
   ------------------------------------------------ */
@media (max-width: 768px) {
  .mobile-cta-sticky {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
  }

  .mobile-cta-sticky .btn {
    flex: 1;
    justify-content: center;
    font-size: 0.875rem;
    padding: 0.875rem 1rem;
  }
}

@media (min-width: 769px) {
  .mobile-cta-sticky {
    display: none !important;
  }
}


/* ------------------------------------------------
   AJUSTES DE ESPACIADO EN TODAS LAS SECCIONES
   (para asegurar coherencia entre breakpoints)
   ------------------------------------------------ */

@media (max-width: 1024px) {
  .counters    { padding: 3rem 0; }
  .pas         { padding: 4rem 0; }
  .benefits    { padding: 4rem 0; }
  .process     { padding: 4rem 0; }
  .lead-magnet { padding: 4rem 0; }
  .testimonials{ padding: 4rem 0; }
  .faq         { padding: 4rem 0; }
  .prefooter   { padding: 4rem 0; }

  /* Ocultar hilo de costura en tablet y móvil */
  #sewing-thread-container { display: none !important; }

  /* Ocultar cursor custom en tablet y móvil */
  #custom-cursor,
  #cursor-thread { display: none !important; }
}


@media (max-width: 768px) {
  .counters    { padding: 2.5rem 0; }
  .pas         { padding: 3.5rem 0; }
  .benefits    { padding: 3.5rem 0; }
  .process     { padding: 3.5rem 0; }
  .lead-magnet { padding: 3.5rem 0; }
  .testimonials{ padding: 3.5rem 0; }
  .faq         { padding: 3.5rem 0; }
}

@media (max-width: 480px) {
  .counters    { padding: 2rem 0; }
  .pas         { padding: 3rem 0; }
  .benefits    { padding: 3rem 0; }
  .process     { padding: 3rem 0; }
  .lead-magnet { padding: 3rem 0; }
  .testimonials{ padding: 3rem 0; }
  .faq         { padding: 3rem 0; }
}


/* ------------------------------------------------
   IMAGENES ADAPTATIVAS
   ------------------------------------------------ */

/* Hero srcset responsive (aplicar cuando haya imagen real) */
.hero__image {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

/* Evitar layout shift en imagenes */
img[width][height] {
  aspect-ratio: attr(width) / attr(height);
}


/* ------------------------------------------------
   REDUCCION DE MOVIMIENTO (Accesibilidad)
   ------------------------------------------------ */
@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;
  }

  .hero__badge-float {
    animation: none;
  }

  .hero__scroll-indicator {
    animation: none;
  }

  .whatsapp-float::before {
    animation: none;
  }
}


/* ------------------------------------------------
   MODO OSCURO DEL SISTEMA (opcional, futura mejora)
   ------------------------------------------------ */
@media (prefers-color-scheme: dark) {
  /* La paleta de marca ya es predominantemente oscura,
     por lo que no se requieren cambios drasticos.
     Ajustes menores en secciones claras: */

  /* Mantener la identidad de marca en modo oscuro */
  .counters {
    background: #1a1a2e;
  }

  .benefits {
    background: #0f0f1a;
  }

  .testimonials {
    background: #0f0f1a;
  }

  .faq {
    background: #0a0a12;
  }

  .counter-card,
  .testimonial-card,
  .form-card {
    background: #1a1a2e;
    border-color: rgba(255,255,255,0.08);
    color: var(--blanco);
  }

  .counter-card__number,
  .counter-card__label {
    color: var(--blanco);
  }

  .benefit-card {
    background: #1a1a2e;
    color: var(--blanco);
  }

  .benefit-card__title,
  .benefit-card__desc {
    color: var(--blanco);
  }

  .section-title {
    color: var(--blanco);
  }

  .section-subtitle {
    color: rgba(255,255,255,0.65);
  }
}


/* ------------------------------------------------
   PRINT STYLES
   ------------------------------------------------ */
@media print {
  .header,
  .whatsapp-float,
  .back-to-top,
  .mobile-cta-sticky,
  .hero__scroll-indicator,
  .hero__particles,
  .hero__bg-pattern {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  .hero {
    background: #121E26;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    min-height: auto;
    padding: 2rem;
  }

  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 0.75em;
    color: #666;
  }

  .section-divider {
    display: none;
  }
}
