/*
 * ListoNet v15.7.2 · Index responsive hardening
 * Capa final de layout para el sitio público. Se carga DESPUÉS de style.css,
 * mascota.css, duo-options.css y fab-v9.css para evitar cambios dispersos.
 */

:root {
  --ln-index-gutter: clamp(16px, 3vw, 28px);
  --ln-index-card-max-mobile: 680px;
  --ln-index-radius-mobile: 20px;
  --ln-index-header-mobile: 64px;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
}

main,
.site-footer,
.site-header {
  width: 100%;
  max-width: 100%;
}

main section {
  scroll-margin-top: calc(var(--ln-index-header-mobile) + 12px);
  isolation: isolate;
}

/* Evita que textos largos o etiquetas comerciales rompan las tarjetas. */
.plan-card,
.dual-card,
.why-card,
.cobertura-form,
.ln-modulo-banner {
  min-width: 0;
}

.plan-name,
.plan-desc,
.plan-tag-small,
.plan-ribbon,
.dual-ribbon,
.plan-offer-pill,
.ln-duo-sport-badge,
.ln-duo-option-title,
.ln-duo-option-sub,
.ln-duo-option-price,
.ln-duo-summary,
.footer-contact-text,
.ln-modulo-banner-body {
  overflow-wrap: anywhere;
  word-break: normal;
}

/* ---------------- Header ---------------- */
.site-header .container {
  padding-left: max(var(--ln-index-gutter), env(safe-area-inset-left));
  padding-right: max(var(--ln-index-gutter), env(safe-area-inset-right));
}

.brand-wrap,
.header-actions,
.nav-toggle {
  min-width: 0;
}

.brand-svg-full {
  max-width: min(160px, 36vw);
  height: auto;
}

/* ---------------- Grillas de planes ---------------- */
.plans-grid > [class*="col-"],
.dual-grid > [class*="col-"] {
  min-width: 0;
  align-items: stretch;
}

.ln-plan-shell,
.ln-duo-shell {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.ln-plan-shell > .plan-card,
.ln-duo-shell > .dual-card {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

.plan-card-head {
  min-width: 0;
}

/* Normaliza alturas internas solo en escritorio, sin forzar alturas en móvil. */
@media (min-width: 992px) {
  .plans-grid .plan-card-head { min-height: 64px; }
  .plans-grid .plan-desc { min-height: 48px; }
  .plans-grid .plan-icon { flex: 0 0 auto; }
}

/* ---------------- Dúo: elementos antes sin estilo propio ---------------- */
.ln-duo-sport-badge {
  display: none;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 14px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(var(--fiber-rgb), .28);
  background: rgba(var(--fiber-rgb), .07);
  color: var(--text-light);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}
.dual-card.is-sport-active .ln-duo-sport-badge { display: inline-flex; }

.ln-duo-check {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1.5px solid var(--border-strong);
  display: grid;
  place-items: center;
  flex: none;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.ln-duo-check::after {
  content: '';
  width: 9px;
  height: 5px;
  border-left: 2px solid transparent;
  border-bottom: 2px solid transparent;
  transform: rotate(-45deg) translateY(-1px);
}
.ln-duo-option.is-active .ln-duo-check {
  background: var(--neon-lime);
  border-color: var(--neon-lime);
}
.ln-duo-option.is-active .ln-duo-check::after {
  border-color: var(--bg-darkest);
}

.ln-duo-option-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ln-duo-option-title {
  color: var(--text-white);
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.3;
}
.ln-duo-option-sub {
  color: var(--text-muted);
  font-size: .72rem;
  line-height: 1.35;
}
.ln-duo-option-price {
  color: var(--neon-lime);
  font-size: .76rem;
  font-weight: 800;
  white-space: nowrap;
}
.ln-duo-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border-card);
  border-radius: 14px;
  background: rgba(var(--fiber-rgb), .035);
  color: var(--text-muted);
  font-size: .76rem;
}
.ln-duo-summary strong {
  color: var(--text-white);
  font-size: .88rem;
  white-space: nowrap;
}

/* ---------------- Banners de sección ---------------- */
.ln-modulo-banner {
  width: min(calc(100% - (var(--ln-index-gutter) * 2)), 980px);
  margin-left: auto;
  margin-right: auto;
}

/* La Kim de sección no debe competir visualmente con el contenido en móvil. */
@media (max-width: 767.98px) {
  .ln-kim-modulo {
    max-width: 82px;
    max-height: 82px;
    opacity: .92;
    z-index: 1;
  }
  main section > .container,
  .site-footer > .container {
    position: relative;
    z-index: 2;
  }
}

/* ---------------- Tablet / teléfonos de alta resolución ----------------
   Entre 768 y 991 Bootstrap seguía aplicando col-md-6/col-md-8, por eso las
   tarjetas de Internet y Dúo quedaban con anchos distintos. Aquí se fuerza
   una sola columna mientras el sitio usa navegación móvil. */
@media (max-width: 991.98px) {
  body { padding-top: var(--ln-index-header-mobile); }
  .header-inner { height: var(--ln-index-header-mobile); }

  .plans-grid,
  .dual-grid {
    --bs-gutter-x: 1.25rem;
    row-gap: 24px;
  }

  .plans-grid > [class*="col-"],
  .dual-grid > [class*="col-"] {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .plans-grid .ln-plan-shell,
  .dual-grid .ln-duo-shell {
    width: min(100%, var(--ln-index-card-max-mobile));
    margin-inline: auto;
  }

  .plan-card,
  .dual-card {
    width: 100%;
    max-width: none;
    transform: none;
  }

  .plan-card--featured,
  .dual-card--featured {
    transform: none;
  }

  /* Evita hover permanente en pantallas táctiles. */
  @media (hover: none) {
    .plan-card:hover,
    .dual-card:hover,
    .why-card:hover {
      transform: none;
    }
  }

  /* FAB compactos: no cubren precio, descripción ni controles de las cards. */
  .fab-group-v9 {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    gap: 8px;
  }
  .fab-pill {
    width: 52px;
    height: 52px;
    padding: 0 !important;
    border-radius: 50%;
    justify-content: center;
    gap: 0;
  }
  .fab-pill > span:last-child {
    display: none;
  }
  .fab-pill .ln-kim-fab {
    width: 28px;
    height: 28px;
  }
}

/* ---------------- Móvil ---------------- */
@media (max-width: 767.98px) {
  :root { --ln-index-gutter: 16px; }

  .site-header .container {
    max-width: none;
  }

  .brand-svg-full {
    max-width: 136px;
  }

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

  .nav-toggle {
    padding: 8px 2px 8px 8px;
  }

  .plans-section,
  .dual-section,
  .why-section,
  .cobertura-section {
    padding-top: 52px;
    padding-bottom: 52px;
  }

  .section-head {
    margin-bottom: 34px;
    padding-inline: 2px;
  }

  .plan-card,
  .dual-card {
    border-radius: var(--ln-index-radius-mobile);
    padding: 26px 20px 24px;
  }

  /* Deja aire entre Kim y la primera línea de contenido. */
  .ln-plan-shell.has-kim .plan-card,
  .ln-duo-shell.has-kim .dual-card {
    padding-top: 34px;
  }

  .plan-card-head {
    margin-bottom: 16px;
  }

  .plan-name {
    font-size: clamp(1.18rem, 5vw, 1.42rem);
    line-height: 1.2;
  }

  .plan-speed-block {
    padding: 16px 0;
    margin-bottom: 16px;
  }

  .plan-speed-num {
    font-size: clamp(2.9rem, 15vw, 4rem);
  }

  .plan-speed-unit {
    font-size: clamp(.76rem, 3.4vw, .88rem);
    letter-spacing: .12em;
  }

  .plan-price {
    font-size: clamp(2.1rem, 10vw, 2.7rem);
  }

  .plan-desc {
    min-height: 0;
    font-size: .9rem;
    line-height: 1.5;
  }

  .plan-features-list li {
    align-items: flex-start;
    line-height: 1.4;
  }

  /* En móvil las etiquetas dejan de ser absolutas: no chocan con Kim ni ofertas. */
  .plan-ribbon,
  .dual-ribbon {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    align-self: center;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 14px;
    justify-content: center;
    text-align: center;
    white-space: normal;
  }

  .plan-offer-pill {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 14px;
    white-space: normal;
    line-height: 1.3;
  }

  .dual-icon-combo {
    margin-bottom: 14px;
  }

  .ln-duo-options {
    padding-top: 16px;
  }

  .ln-duo-option {
    grid-template-columns: 26px minmax(0, 1fr) !important;
    padding: 11px 12px;
  }

  .ln-duo-option-price {
    grid-column: 2;
    justify-self: start;
    white-space: normal;
  }

  .ln-duo-summary {
    align-items: flex-start !important;
    flex-direction: column;
    gap: 4px;
  }
  .ln-duo-summary strong { white-space: normal; }

  .cobertura-form {
    padding: 22px 18px;
  }

  .ln-modulo-banner {
    width: calc(100% - 24px);
    padding: 12px;
    gap: 10px;
  }
  .ln-modulo-banner-img {
    width: 52px;
    height: 52px;
  }
  .ln-modulo-banner-cta {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  :root { --ln-index-gutter: 14px; }

  .brand-svg-full { max-width: 126px; }

  .plan-card,
  .dual-card {
    padding-left: 18px;
    padding-right: 18px;
  }

  .fab-pill {
    width: 48px;
    height: 48px;
  }
}

/* Teléfonos angostos y zoom de accesibilidad. */
@media (max-width: 360px) {
  .brand-svg-full { max-width: 116px; }
  .theme-toggle { width: 38px; height: 38px; }
  .plan-card,
  .dual-card { padding-inline: 15px; }
  .plan-speed-num { font-size: 2.75rem; }
  .plan-price { font-size: 2rem; }
}

/* Landscape de baja altura: mantiene navegación y botones fuera del contenido. */
@media (max-height: 560px) and (orientation: landscape) and (max-width: 991.98px) {
  .fab-group-v9 { flex-direction: row; }
  .main-nav { overflow-y: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .plan-card,
  .dual-card,
  .fab-pill,
  .ln-duo-option,
  .ln-kim-plan--decor,
  .ln-kim-plan--decor .ln-kim-img {
    transition: none !important;
    animation: none !important;
  }
}
