/* ============================================================
   LIAMMY POST — Optimización Mobile Premium
   Archivo separado para no afectar estilos de escritorio.
   Cubre: 320px → 900px
   ============================================================ */

/* ── PREVENIR OVERFLOW HORIZONTAL GLOBAL ─────────────────── */
html, body {
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* ─────────────────────────────────────────────────────────── */
/*  BREAKPOINT: ≤ 900px  (tablets y landscape phone)          */
/* ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {

  /* --- Variables re-escaladas --- */
  :root {
    --spacing-xl:  4rem;
    --spacing-2xl: 6rem;
  }

  /* --- Navbar --- */
  .navbar {
    padding: 1rem 0;
    background: rgba(10,10,26,0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border);
  }

  .navbar__logo { font-size: 1.3rem; }
  .navbar__logo-icon { width: 36px; height: 36px; font-size: 1rem; }
  .navbar__links { display: none; }
  .navbar__cta   { display: none; }
  .navbar__toggle { display: flex; align-items: center; padding: 0.5rem; }

  /* Menú mobile mejorado */
  .navbar__mobile {
    gap: 1.5rem;
    padding: 2rem 1.5rem;
    overflow-y: auto;
  }

  .navbar__mobile a {
    font-size: 1.5rem;
    padding: 0.5rem 0;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  .navbar__mobile a:last-of-type { border-bottom: none; }

  .navbar__mobile .btn--whatsapp {
    margin-top: 0.5rem;
    width: 100%;
    justify-content: center;
    font-size: 1rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
  }

  /* --- Hero --- */
  .hero {
    min-height: auto;
    padding: 100px 0 4rem;
    align-items: flex-start;
  }

  .hero__content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .hero__badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.875rem;
    display: inline-block;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
  }

  .hero__title {
    font-size: clamp(1.9rem, 7vw, 2.6rem);
    line-height: 1.15;
    margin-bottom: 1rem;
  }

  .hero__subtitle {
    font-size: 1rem;
    margin: 0 auto 2rem;
    max-width: 480px;
  }

  .hero__actions {
    justify-content: center;
    gap: 0.875rem;
    margin-bottom: 2.5rem;
  }

  .hero__actions .btn { flex: 1; min-width: 140px; justify-content: center; }

  .hero__stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    justify-items: center;
    max-width: 360px;
    margin: 0 auto;
  }

  .hero__stat-value { font-size: 1.5rem; }
  .hero__stat-label { font-size: 0.72rem; }

  /* Hero visual oculto en tablet/mobile */
  .hero__visual { display: none; }

  /* --- Secciones --- */
  .section { padding: 3.5rem 0; }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .section-header__title { font-size: clamp(1.5rem, 5vw, 2.2rem); }
  .section-header__subtitle { font-size: 0.95rem; }

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

  .benefit-card { padding: 1.25rem; }
  .benefit-card__icon { font-size: 1.8rem; margin-bottom: 0.75rem; }
  .benefit-card__title { font-size: 0.92rem; }
  .benefit-card__desc { font-size: 0.82rem; }

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

  .business-card { padding: 1.5rem 1rem; }
  .business-card__icon { font-size: 2.2rem; }

  /* --- e-CF --- */
  .efact-header {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .efact-features {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .efact-preview { animation: none; } /* evitar jank en mobile */

  /* --- Pricing toggle: apilar verticalmente --- */
  .pricing__toggle {
    flex-direction: column;
    gap: 0.875rem;
    align-items: center;
  }

  .toggle-group {
    width: 100%;
    max-width: 360px;
    justify-content: space-between;
  }

  .toggle-btn {
    flex: 1;
    padding: 0.6rem 0.75rem;
    font-size: 0.82rem;
    text-align: center;
  }

  .savings-badge {
    font-size: 0.72rem;
    padding: 0.3rem 0.875rem;
  }

  /* --- Plan cards --- */
  .pricing__grid { gap: 1rem; }
  .plan-card { padding: 1.75rem 1.5rem; }
  .plan-card.featured { transform: scale(1); }
  .plan-card__price { font-size: 2.5rem; }

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

  .contact-form { padding: 1.75rem 1.25rem; }
  .contact__cta-buttons { flex-direction: column; gap: 0.75rem; }
  .contact__cta-buttons .btn { width: 100%; justify-content: center; }

  /* --- addon card --- */
  .addon-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.75rem 1.25rem;
  }

  .addon-features { grid-template-columns: 1fr 1fr; }

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


/* ─────────────────────────────────────────────────────────── */
/*  BREAKPOINT: ≤ 600px  (phones landscape / large portrait)  */
/* ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {

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

  .container { padding: 0 1.125rem; }

  /* --- Navbar compacto --- */
  .navbar { padding: 0.875rem 0; }
  .navbar__logo { font-size: 1.2rem; gap: 0.6rem; }
  .navbar__logo-icon { width: 32px; height: 32px; font-size: 0.9rem; }

  /* --- Hero --- */
  .hero { padding: 90px 0 3rem; }

  .hero__title {
    font-size: clamp(1.7rem, 8vw, 2.2rem);
    letter-spacing: -0.025em;
  }

  .hero__badge {
    font-size: 0.7rem;
    padding: 0.35rem 0.75rem;
  }

  .hero__subtitle { font-size: 0.93rem; }

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

  .hero__actions .btn {
    width: 100%;
    min-width: unset;
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
    justify-content: center;
  }

  .hero__stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .hero__stat-value { font-size: 1.4rem; }

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

  .benefit-card {
    padding: 1.25rem 1rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    text-align: left;
  }

  .benefit-card__icon {
    font-size: 2rem;
    margin-bottom: 0;
    flex-shrink: 0;
    margin-top: 0.25rem;
  }

  .benefit-card__badge {
    position: absolute;
    top: 0.875rem;
    right: 0.875rem;
    margin-bottom: 0;
  }

  .benefit-card--featured { position: relative; }

  /* --- Negocios: scroll horizontal en mobile pequeño --- */
  .businesses__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
  }

  .business-card { padding: 1.25rem 0.875rem; }
  .business-card__icon { font-size: 2rem; margin-bottom: 0.75rem; }
  .business-card__name { font-size: 0.95rem; }
  .business-card__desc { font-size: 0.78rem; }

  /* --- e-CF section --- */
  .efact-alert {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
    padding: 1rem;
  }

  .efact-alert__link { margin: 0 auto; width: 100%; text-align: center; }

  .efact-features {
    grid-template-columns: 1fr;
    gap: 0.875rem;
  }

  .efact-feature-card {
    padding: 1.125rem;
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    text-align: left;
  }

  .efact-feature-card__icon {
    font-size: 1.5rem;
    margin-bottom: 0;
    flex-shrink: 0;
    margin-top: 0.1rem;
  }

  .efact-cta-row { flex-direction: column; gap: 0.75rem; }
  .efact-cta-row .btn { width: 100%; justify-content: center; }

  /* --- Pricing --- */
  .section-header__title { font-size: clamp(1.4rem, 6vw, 2rem); }

  .pricing__toggle {
    gap: 0.75rem;
    padding: 0 0.5rem;
  }

  .toggle-group {
    width: 100%;
    padding: 3px;
  }

  .toggle-btn {
    font-size: 0.78rem;
    padding: 0.55rem 0.5rem;
    letter-spacing: -0.01em;
  }

  .savings-badge { font-size: 0.7rem; }

  .plan-card {
    padding: 1.5rem 1.25rem;
    border-radius: var(--radius-lg);
  }

  .plan-card__name { font-size: 0.9rem; margin-bottom: 1rem; }
  .plan-card__price { font-size: 2.2rem; }
  .plan-card__currency { font-size: 1rem; line-height: 2.2; }
  .plan-card__period { font-size: 0.82rem; }
  .plan-card__equiv { font-size: 0.78rem; }
  .plan-feature { font-size: 0.82rem; gap: 0.6rem; }
  .plan-feature__icon { width: 18px; height: 18px; font-size: 0.65rem; }

  /* Badge del plan arriba */
  .plan-badge {
    font-size: 0.65rem;
    padding: 0.3rem 0.875rem;
    letter-spacing: 0.03em;
  }

  /* CTA del plan */
  .plan-card__cta { padding: 0.875rem; font-size: 0.88rem; }

  /* Recomendación banner */
  #planRecommendBanner {
    border-radius: var(--radius-md) !important;
    font-size: 0.8rem !important;
    padding: 0.75rem 1rem !important;
    margin-bottom: 1.5rem !important;
  }

  /* Addon card compacto */
  .addon-card { padding: 1.25rem 1rem; }
  .addon-card__title { font-size: 1.15rem; }
  .addon-features { grid-template-columns: 1fr; }
  .addon-price { font-size: 2rem; margin: 0.875rem 0 0.375rem; }

  /* Formulario de contacto */
  .contact-form { padding: 1.5rem 1rem; border-radius: var(--radius-lg); }
  .contact-form__title { font-size: 1.1rem; margin-bottom: 1.25rem; }
  .form-group { margin-bottom: 1rem; }
  .form-group label { font-size: 0.75rem; }
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 0.875rem;
    font-size: 1rem; /* Evitar zoom en iOS */
    border-radius: var(--radius-sm);
  }

  .form-submit { font-size: 0.95rem; padding: 0.95rem; }

  /* Íconos de contacto */
  .contact-info-item { gap: 0.875rem; }
  .contact-info-item__icon { width: 42px; height: 42px; font-size: 1.1rem; }
  .contact-info-item__value { font-size: 0.92rem; }

  /* Footer compacto */
  .footer { padding: 3rem 0 1.5rem; }
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer__brand-desc { max-width: 100%; }
  .footer__bottom { flex-direction: column; gap: 0.875rem; text-align: center; }
  .footer__legal { flex-wrap: wrap; justify-content: center; gap: 1rem; }
  .footer__legal a { font-size: 0.8rem; }

  /* WhatsApp flotante más grande en mobile */
  .whatsapp-float {
    width: 56px; height: 56px;
    font-size: 1.5rem;
    bottom: 1.25rem;
    right: 1.25rem;
  }

  /* Sección loader centrada */
  .loader-logo { font-size: 1.5rem; }
}


/* ─────────────────────────────────────────────────────────── */
/*  BREAKPOINT: ≤ 400px  (phones pequeños — iPhone SE, etc.)  */
/* ─────────────────────────────────────────────────────────── */
@media (max-width: 400px) {

  .container { padding: 0 0.875rem; }

  .hero { padding: 85px 0 2.5rem; }

  .hero__title { font-size: 1.6rem; }
  .hero__badge { font-size: 0.65rem; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .hero__stat-value { font-size: 1.25rem; }
  .hero__stat-label { font-size: 0.65rem; }

  .section { padding: 2.5rem 0; }

  .section-header { margin-bottom: 2rem; }
  .section-header__title { font-size: 1.35rem; }
  .section-header__subtitle { font-size: 0.88rem; }

  .businesses__grid { grid-template-columns: repeat(2, 1fr); gap: 0.625rem; }
  .business-card { padding: 1rem 0.75rem; }
  .business-card__icon { font-size: 1.75rem; }
  .business-card__name { font-size: 0.88rem; }
  .business-card__desc { display: none; } /* ocultar desc en pantallas muy pequeñas */

  .plan-card { padding: 1.25rem 1rem; }
  .plan-card__price { font-size: 2rem; }

  .toggle-btn { font-size: 0.72rem; padding: 0.5rem 0.375rem; }

  .navbar__logo { font-size: 1.1rem; }
  .navbar__logo-icon { width: 30px; height: 30px; font-size: 0.85rem; }
}


/* ─────────────────────────────────────────────────────────── */
/*  MEJORAS DE TOUCH & ACCESIBILIDAD                          */
/* ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {

  /* Targets mínimos de 44px para touch */
  .btn,
  .toggle-btn,
  .plan-card__cta,
  .form-submit,
  .navbar__toggle,
  .footer__social-link {
    min-height: 44px;
  }

  /* Quitar hover effects en touch (evitan estados stuck) */
  .benefit-card:hover,
  .business-card:hover,
  .plan-card:not(.featured):hover,
  .efact-feature-card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--color-border);
  }

  .benefit-card:hover::before,
  .efact-feature-card:hover::before {
    opacity: 0;
  }

  /* Reducir animaciones pesadas en mobile */
  .hero__particle { display: none; } /* Sin partículas en mobile */

  .mockup-float,
  .badge-float,
  .efact-float {
    animation: none !important;
  }

  /* Parallax deshabilitado en mobile */
  .hero__bg { transform: none !important; }

  /* Mejorar legibilidad del texto */
  body {
    font-size: 15px;
    line-height: 1.65;
  }
}


/* ─────────────────────────────────────────────────────────── */
/*  MEJORAS VISUALES GENERALES (todos los tamaños)            */
/* ─────────────────────────────────────────────────────────── */

/* Gradiente más vívido en el hero badge */
.hero__badge {
  background: linear-gradient(135deg, rgba(108,99,255,0.18), rgba(0,212,170,0.1));
  border: 1px solid rgba(108,99,255,0.45);
}

/* Plan card featured: glow verde más pronunciado */
.plan-card.featured {
  box-shadow:
    0 0 0 1px rgba(0,212,170,0.5),
    0 20px 60px rgba(0,212,170,0.2),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Botones: focus visible mejorado para accesibilidad */
.btn:focus-visible,
.toggle-btn:focus-visible,
.plan-card__cta:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* Transiciones de página más suaves */
.pricing-tabs {
  animation: none;
}

.pricing-tabs.active {
  display: block;
}

/* Scrollbar oculta en mobile (no es necesaria) */
@media (max-width: 900px) {
  ::-webkit-scrollbar { width: 0; }
}

/* Prevenir selección de texto en botones UI */
.toggle-btn,
.btn,
.navbar__toggle,
.plan-badge {
  -webkit-user-select: none;
  user-select: none;
}

/* Input zoom prevention en iOS (font-size ≥ 16px en inputs) */
@media (max-width: 900px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Mejorar el loading bar */
.page-loader {
  background: radial-gradient(ellipse at center, #12122A 0%, #0A0A1A 100%);
}

/* Toast más compacto en mobile */
@media (max-width: 600px) {
  .toast {
    left: 1rem;
    right: 1rem;
    transform: translateX(0) translateY(100px);
    width: calc(100% - 2rem);
    max-width: unset;
  }
  .toast.show {
    transform: translateX(0) translateY(0);
  }
}
