/* Página: planes-internet-telcel.php (WiFi Telcel + Infinitum)
   Efectos solo con CSS + un observador pequeño en la página (sin librerías). */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700;800&display=swap');

.pi { font-family: 'Raleway', sans-serif; color: #333; background: #f5f7fa; }
.pi *, .pi *::before, .pi *::after { box-sizing: border-box; }
/* headermkt.php limita todas las <section> a 1200px / 90%; aquí las bandas van de lado a lado */
.pi > section { width: auto; max-width: none; margin: 0; }
.pi-wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.pi h1, .pi h2, .pi h3, .pi h4 { font-family: 'Raleway', sans-serif; margin: 0; }

/* ---------- Botones ---------- */
.pi-btn { display: inline-block; border: none; border-radius: 10px; padding: 12px 22px; font-weight: 700;
          font-size: 15px; cursor: pointer; text-decoration: none; text-align: center; font-family: inherit;
          transition: background .15s, color .15s, transform .15s; position: relative; overflow: hidden; }
.pi-btn:active { transform: scale(.98); }
/* Brillo sutil que cruza el botón al pasar el mouse */
.pi-brillo::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
                    background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
                    transform: skewX(-20deg); pointer-events: none; }
.pi-brillo:hover::after { animation: pi-brillo .7s ease; }
@keyframes pi-brillo { to { left: 130%; } }
.pi-btn-naranja { background: #F0832A; color: #fff; }
.pi-btn-naranja:hover { background: #cf6c1f; color: #fff; }
.pi-btn-borde { background: transparent; color: #fff; border: 2px solid #fff; }
.pi-btn-borde:hover { background: #fff; color: #002f87; }
.pi-btn-telmex { background: #0033a1; color: #fff; }
.pi-btn-telmex:hover { background: #00247a; color: #fff; }

/* ---------- Banner (degradado morado a azul marino + foto opcional) ---------- */
.pi-hero { position: relative; overflow: hidden; color: #fff; isolation: isolate;
           background: linear-gradient(105deg, #88375a 0%, #542d59 32%, #0d1f5e 60%);
           padding: 64px 0 104px; min-height: 440px; display: flex; align-items: center; }
.pi-hero-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
                    object-position: right center; z-index: -2; animation: pi-zoom 1.4s ease-out both; }
/* Velo de color sobre la foto para que el texto siempre se lea */
.pi-hero-con-foto::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(109,27,143,.96) 0%, rgba(59,31,134,.9) 38%, rgba(13,31,94,.35) 68%, rgba(13,31,94,0) 100%); }
/* Brillos decorativos cuando no hay foto */
.pi-hero:not(.pi-hero-con-foto)::after { content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; right: -120px; top: -160px;
  border-radius: 50%; background: radial-gradient(circle, rgba(240,131,42,.35), rgba(240,131,42,0) 65%); }
.pi-hero-contenido { width: 100%; }
.pi-hero-texto { max-width: 640px; animation: pi-sube .8s ease-out both; }
.pi-hero h1 { font-size: clamp(28px, 4.2vw, 44px); font-weight: 800; line-height: 1.15; margin: 0 0 16px; color: #fff; }
.pi-hero-eyebrow { display: block; font-size: 14px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #d9ccff; margin-bottom: 10px; }
.pi-hero-marca { display: block; font-size: clamp(34px, 5.4vw, 58px); font-weight: 800; letter-spacing: -.5px; margin-bottom: 4px; }
.pi-resalta { color: #F0832A; }
.pi-hero p { font-size: 17px; line-height: 1.6; margin: 0 0 26px; color: #e4ddff; }
.pi-hero p strong { color: #fff; }
.pi-hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* Cuadritos de ventajas montados sobre el borde del banner */
.pi-ventajas { list-style: none; padding: 0; margin: -60px 0 0; position: relative; z-index: 2;
               display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.pi-ventajas li { background: #fff; border-radius: 16px; box-shadow: 0 10px 28px rgba(13,31,94,.16); padding: 18px 12px;
                  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
                  font-weight: 700; font-size: 15px; color: #002f87; animation: pi-sube .6s ease-out both; }
.pi-ventajas li:nth-child(2) { animation-delay: .08s; }
.pi-ventajas li:nth-child(3) { animation-delay: .16s; }
.pi-ventajas li:nth-child(4) { animation-delay: .24s; }
.pi-ventajas svg { width: 34px; height: 34px; fill: none; stroke: #6d1b8f; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

@keyframes pi-sube { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pi-zoom { from { transform: scale(1.06); } to { transform: none; } }

/* ---------- Secciones ---------- */
.pi-wifi { padding: 48px 0 40px; }
.pi-infinitum { padding: 48px 0 56px; background: #e9f1fc; border-top: 6px solid #0033a1; }
.pi-wifi h2, .pi-infinitum h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; margin-bottom: 14px; }
.pi-wifi h2 { color: #002f87; }
.pi-infinitum h2 { color: #0033a1; }
.pi-marca { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
            padding: 5px 14px; border-radius: 999px; margin-bottom: 12px; }
.pi-marca-telcel { background: #002f87; color: #fff; }
.pi-marca-telmex { background: #e4002b; color: #fff; }
.pi-intro { font-size: 15px; line-height: 1.6; color: #555; margin: 0 0 22px; max-width: 760px; }
.pi-sub { font-size: 20px; font-weight: 800; color: #333; margin: 30px 0 14px !important; }

.pi-chips { list-style: none; padding: 0; margin: 0 0 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.pi-chips li { background: #fef4ec; color: #F0832A; font-weight: 700; font-size: 14px; padding: 7px 14px; border-radius: 999px; }
.pi-chips-telmex li { background: #fff; color: #0033a1; border: 1px solid #c7d6f1; }

/* ---------- Tarjetas ---------- */
.pi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.pi-grid-infinitum { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.pi-card { background: #fff; border-radius: 16px; box-shadow: 0 4px 14px rgba(0,0,0,.06); padding: 22px 20px;
           display: flex; flex-direction: column; gap: 8px; text-align: center;
           transition: transform .25s ease, box-shadow .25s ease; }
.pi-card:hover { transform: translateY(-5px); box-shadow: 0 14px 30px rgba(0,47,135,.14); }
.pi-card h4 { font-size: 19px; font-weight: 800; color: #002f87; }
.pi-card .pi-btn { margin-top: auto; width: 100%; }
.pi-card-logo { max-height: 70px; max-width: 160px; margin: 0 auto 4px; object-fit: contain; }
.pi-precio { font-size: 34px; font-weight: 800; color: #F0832A; line-height: 1.1; }
.pi-precio span { font-size: 14px; font-weight: 600; color: #777; }
.pi-precio-telmex { color: #0033a1; font-size: 28px; }
.pi-lista { list-style: none; padding: 0; margin: 4px 0; text-align: left; font-size: 14px; color: #444; }
.pi-lista li { padding: 6px 0 6px 22px; position: relative; border-bottom: 1px solid #f0f0f0; line-height: 1.4; }
.pi-lista li::before { content: "✓"; position: absolute; left: 0; color: #F0832A; font-weight: 800; }
.pi-beneficios { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pi-beneficios img { height: 22px; width: auto; }
.pi-vigencia { font-size: 12px; color: #777; margin-bottom: 6px; }

/* Módems: banda azul marino con tarjetas horizontales */
.pi-plan-tag { display: inline-block; background: #e8edfb; color: #002f87; font-weight: 700;
               font-size: 13px; padding: 4px 12px; border-radius: 999px; }
.pi-total-label { font-size: 13px; font-weight: 600; }
.pi-total-monto { font-size: 24px; font-weight: 800; }
.pi-desglose { font-size: 13px; color: #666; }

.pi-modems { background: linear-gradient(180deg, #0d1f5e 0%, #002f87 100%); padding: 48px 0 52px; }
.pi-modems .pi-sub { color: #fff; margin-top: 0 !important; }
.pi-modems .pi-intro { color: #c9d6f5; }
.pi-modem-lista { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.pi-modem { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 24px; align-items: center;
            background: #fff; border-radius: 18px; padding: 16px 18px; border-left: 6px solid #F0832A;
            transition: transform .25s ease, box-shadow .25s ease; }
.pi-modem:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(0,0,0,.25); }
.pi-modem-foto { background: #f2f5fb; border-radius: 14px; height: 140px; display: flex; align-items: center; justify-content: center; padding: 8px; }
.pi-modem-foto img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .3s ease; }
.pi-modem:hover .pi-modem-foto img { transform: scale(1.06); }
.pi-modem-datos h4 { font-size: 21px; font-weight: 800; color: #002f87; margin-bottom: 6px; }
.pi-modem-info { list-style: none; padding: 0; margin: 8px 0 0; font-size: 13px; color: #555; line-height: 1.6; }
.pi-modem-precio { min-width: 220px; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.pi-modem-precio .pi-total-label { color: #777; }
.pi-modem-precio .pi-total-monto { font-size: 32px; color: #F0832A; line-height: 1.1; margin-bottom: 8px; }
.pi-modem-precio .pi-btn { font-size: 14px; padding: 10px 16px; white-space: nowrap; }

/* Infinitum */
.pi-card-inf { border-top: 5px solid #e4002b; }
.pi-antes { font-size: 12px; color: #888; text-decoration: line-through; }
.pi-ahora { align-self: center; background: #ffd400; color: #0033a1; font-size: 11px; font-weight: 800;
            padding: 2px 10px; border-radius: 999px; text-transform: uppercase; }
.pi-megas { font-size: 38px; font-weight: 800; color: #e4002b; line-height: 1; }
.pi-megas span { font-size: 15px; font-weight: 700; }

.pi-legal { font-size: 12px; color: #777; margin: 26px 0 0; line-height: 1.5; }
.pi-legal a { color: #002f87; }

/* ---------- Aparición al hacer scroll (solo si el JS la activa) ---------- */
.pi-anima .pi-card, .pi-anima .pi-modem, .pi-anima .pi-sub { opacity: 0; transform: translateY(22px); }
.pi-anima .pi-visible { opacity: 1; transform: none;
  transition: opacity .6s ease var(--pi-retraso, 0ms), transform .6s ease var(--pi-retraso, 0ms), box-shadow .25s ease; }
.pi-anima .pi-card.pi-visible:hover { transform: translateY(-5px); transition-delay: 0ms; }
.pi-anima .pi-modem.pi-visible:hover { transform: translateY(-4px); transition-delay: 0ms; }

@media (max-width: 860px) {
  .pi-ventajas { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pi-hero-con-foto::before { background: linear-gradient(90deg, rgba(109,27,143,.94) 0%, rgba(59,31,134,.85) 55%, rgba(13,31,94,.55) 100%); }
}

@media (max-width: 600px) {
  .pi-hero { padding: 40px 0 88px; min-height: 0; }
  .pi-hero-con-foto::before { background: linear-gradient(180deg, rgba(59,31,134,.75) 0%, rgba(59,31,134,.88) 45%, rgba(13,31,94,.96) 100%); }
  .pi-hero-foto img { object-position: 70% center; }
  .pi-hero p { font-size: 15px; }
  .pi-hero-btns .pi-btn { flex: 1 1 100%; }
  .pi-ventajas { margin-top: -56px; }
  .pi-ventajas li { padding: 14px 8px; font-size: 14px; }
  .pi-ventajas svg { width: 28px; height: 28px; }
  .pi-grid-infinitum { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pi-card { padding: 18px 14px; }
  .pi-megas { font-size: 30px; }
  .pi-precio-telmex { font-size: 22px; }
  .pi-modem { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 14px; }
  .pi-modem-foto { height: 96px; }
  .pi-modem-precio { min-width: 0; grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between;
                     border-top: 1px solid #eef0f5; padding-top: 12px; text-align: left; }
  .pi-modem-precio .pi-total-label { width: 100%; }
  .pi-modem-precio .pi-total-monto { margin-bottom: 0; }
}

/* Si la persona pidió "reducir movimiento" en su dispositivo, no se anima nada */
@media (prefers-reduced-motion: reduce) {
  .pi *, .pi *::before, .pi *::after { animation: none !important; transition: none !important; }
  .pi-anima .pi-card, .pi-anima .pi-modem, .pi-anima .pi-sub { opacity: 1; transform: none; }
}
