/* Servicios: franja de beneficios y "Televisión por suscripción" como una
   sala de TV oscura con selector de municipio y contador de canales. */

/* ---------- Franja de beneficios ---------- */
body[data-page="services"] .bb { padding: 26px 0; background: #fff; border-block: 1px solid rgba(16, 20, 26, .06); }
body[data-page="services"] .bb .section-shell { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
body[data-page="services"] .bb article {
  display: flex; align-items: center; gap: 14px;
  padding: 6px 22px; border: 0; border-left: 1px solid rgba(16, 20, 26, .08); border-radius: 0;
  background: transparent; box-shadow: none; transform: none;
}
body[data-page="services"] .bb article:first-child { padding-left: 0; border-left: 0; }
body[data-page="services"] .bb article:hover { transform: none; box-shadow: none; }
body[data-page="services"] .bb .bb-i {
  flex: 0 0 auto; display: grid; flex-direction: row; gap: 0; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  background: #fdecee; color: #e60012; transition: background .25s, color .25s, transform .3s cubic-bezier(.22, .8, .24, 1);
}
body[data-page="services"] .bb article:hover .bb-i { background: #e60012; color: #fff; transform: translateY(-2px) rotate(-4deg); }
body[data-page="services"] .bb-i svg { width: 22px; height: 22px; }
body[data-page="services"] .bb b { font: 800 .92rem 'Manrope', sans-serif; color: #151923; }
body[data-page="services"] .bb small { font: 400 .8rem/1.4 'DM Sans', sans-serif; color: #5b6472; }

/* ---------- Sala de TV ---------- */
body[data-page="services"] .tvx {
  --t-red: #e60012;
  --t-ease: cubic-bezier(.22, .8, .24, 1);
  position: relative; isolation: isolate; overflow: hidden;
  padding: 84px 0 56px;
  background: radial-gradient(ellipse 60% 70% at 78% 48%, #2a0d12 0%, transparent 70%), linear-gradient(180deg, #0f141c 0%, #0a0d13 100%);
  color: #e6e9ef;
  margin: 0 !important; border-radius: 0 !important; width: auto !important; max-width: none !important;
}
body[data-page="services"] .tvx-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
body[data-page="services"] .tvx-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 80%);
}
body[data-page="services"] .tvx-bg i {
  position: absolute; left: -30%; height: 2px; width: 55%; border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 50, 70, .85), transparent);
  filter: drop-shadow(0 0 6px rgba(255, 30, 50, .8));
  animation: tvx-streak 5s linear infinite;
}
body[data-page="services"] .tvx-bg i:nth-child(1) { bottom: 18%; }
body[data-page="services"] .tvx-bg i:nth-child(2) { bottom: 9%; width: 35%; opacity: .6; animation-duration: 7s; animation-delay: -3s; }
@keyframes tvx-streak { to { transform: translateX(320%); } }

body[data-page="services"] .tvx-shell { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 40px; align-items: center; }

body[data-page="services"] .tvx .eyebrow { color: #ff4d5c; }
body[data-page="services"] .tvx h2 {
  margin: 12px 0 14px; color: #fff;
  font-size: clamp(30px, 3.3vw, 46px) !important; line-height: 1.04 !important; letter-spacing: -.03em; text-wrap: balance;
}
body[data-page="services"] .tvx h2 em { display: block; font-style: normal; color: #ff3446; }
body[data-page="services"] .tvx-lead { max-width: 50ch; margin: 0 0 26px; color: #a9b2c1; font-size: 1.02rem; line-height: 1.6; }

/* Selector de municipio */
body[data-page="services"] .tvx-towns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
body[data-page="services"] .tvx-towns button {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; cursor: pointer; text-align: left;
  border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .04); color: #cfd5df;
  transition: background .25s var(--t-ease), border-color .25s, box-shadow .25s, transform .25s var(--t-ease);
}
body[data-page="services"] .tvx-towns button:hover { background: rgba(255, 255, 255, .08); transform: translateY(-2px); }
body[data-page="services"] .tvx-towns button.is-active {
  border-color: rgba(255, 52, 70, .7); background: linear-gradient(135deg, rgba(230, 0, 18, .28), rgba(230, 0, 18, .08));
  box-shadow: 0 16px 34px -18px rgba(230, 0, 18, .8); color: #fff;
}
body[data-page="services"] .tvx-towns button:focus-visible { outline: 2px solid #ff4d5c; outline-offset: 2px; }
body[data-page="services"] .tvx-pin { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .07); color: #ff4d5c; }
body[data-page="services"] .tvx-towns button.is-active .tvx-pin { background: var(--t-red); color: #fff; }
body[data-page="services"] .tvx-pin svg { width: 20px; height: 20px; }
body[data-page="services"] .tvx-towns b { display: block; font: 800 1rem 'Manrope', sans-serif; }
body[data-page="services"] .tvx-towns small { font: 500 .78rem 'DM Sans', sans-serif; color: #98a2b3; }
body[data-page="services"] .tvx-towns button.is-active small { color: #ffc9ce; }

/* Panel */
body[data-page="services"] .tvx-panel {
  padding: 22px 24px 24px; border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .03));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  backdrop-filter: blur(10px);
}
body[data-page="services"] .tvx-count { display: flex; align-items: center; gap: 16px; }
body[data-page="services"] .tvx-count > b {
  font: 800 clamp(3.2rem, 5vw, 4.4rem)/.9 'Manrope', sans-serif; letter-spacing: -.06em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff 30%, #ff8a93); -webkit-background-clip: text; background-clip: text; color: transparent;
  min-width: 3ch;
}
body[data-page="services"] .tvx-count span { display: grid; }
body[data-page="services"] .tvx-count strong { font: 800 1.05rem 'Manrope', sans-serif; color: #fff; }
body[data-page="services"] .tvx-count small { font: 600 .74rem 'Manrope', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #ff6b76; }
body[data-page="services"] .tvx-desc { margin: 14px 0 16px; max-width: none; color: #b6bfcc; font-size: .93rem; line-height: 1.6; }
body[data-page="services"] .tvx-cats { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 22px; padding: 0; list-style: none; }
body[data-page="services"] .tvx-cats li {
  padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
  font: 600 .78rem 'DM Sans', sans-serif; color: #e6e9ef;
}
body[data-page="services"] .tvx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
body[data-page="services"] .tvx-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 24px; border-radius: 999px;
  background: linear-gradient(110deg, #f5182d, #d70012); box-shadow: 0 14px 28px -12px rgba(230, 0, 18, .8);
  font: 800 .92rem 'Manrope', sans-serif; color: #fff; text-decoration: none;
  transition: transform .25s var(--t-ease), box-shadow .25s;
}
body[data-page="services"] .tvx-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 32px -12px rgba(230, 0, 18, .9); }
body[data-page="services"] .tvx-link { font: 700 .9rem 'DM Sans', sans-serif; color: #cfd5df; text-decoration: none; }
body[data-page="services"] .tvx-link:hover { color: #fff; }

/* Escenario del televisor */
body[data-page="services"] .tvx-stage { position: relative; aspect-ratio: 1309 / 1201; }
body[data-page="services"] .tvx-glow {
  position: absolute; inset: 10% 8% 16%; border-radius: 30px;
  background: radial-gradient(ellipse at center, rgba(255, 30, 50, .5), transparent 70%);
  filter: blur(40px); animation: tvx-glow 4s ease-in-out infinite;
}
@keyframes tvx-glow { 50% { opacity: .6; transform: scale(.96); } }
body[data-page="services"] .tvx-tv {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  transition: opacity .6s var(--t-ease), transform .7s var(--t-ease);
  pointer-events: none; -webkit-user-drag: none; user-select: none;
}
body[data-page="services"] .tvx-tv-abrego,
body[data-page="services"] .tvx-tv-patios {
  inset: 12% 0 10%; height: 78%; object-fit: cover; border-radius: 26px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .08);
}
body[data-page="services"] .tvx-tv-patios { opacity: 0; transform: translateX(30px) scale(.97); }
body[data-page="services"] .tvx[data-town="patios"] .tvx-tv-abrego { opacity: 0; transform: translateX(-30px) scale(.97); }
body[data-page="services"] .tvx[data-town="patios"] .tvx-tv-patios { opacity: 1; transform: none; }
body[data-page="services"] .tvx-live {
  position: absolute; left: 4%; bottom: 6%; display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 16px; border-radius: 999px; background: rgba(12, 15, 21, .8); backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
  font: 800 .78rem 'Manrope', sans-serif; letter-spacing: .04em; color: #fff;
}
body[data-page="services"] .tvx-live i { width: 8px; height: 8px; border-radius: 50%; background: #ff2435; box-shadow: 0 0 0 4px rgba(255, 36, 53, .25); animation: tvx-blink 1.4s ease-in-out infinite; }
@keyframes tvx-blink { 50% { opacity: .35; } }

/* TDT */
body[data-page="services"] .tvx-tdt {
  display: flex; align-items: center; gap: 18px; margin-top: 44px; padding: 20px 24px;
  border: 0; border-radius: 20px; background: rgba(255, 255, 255, .04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
body[data-page="services"] .tvx-tdt-i { flex: 0 0 auto; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; background: rgba(255, 255, 255, .07); color: #ff4d5c; }
body[data-page="services"] .tvx-tdt-i svg { width: 26px; height: 26px; }
body[data-page="services"] .tvx-tdt h3 { margin: 0 0 4px; font-size: 1.05rem !important; color: #fff; }
body[data-page="services"] .tvx-tdt p { margin: 0; max-width: 90ch; color: #a9b2c1; font-size: .88rem; line-height: 1.6; }

/* Transición al cambiar de municipio */
body[data-page="services"] .tvx.is-swapping .tvx-desc,
body[data-page="services"] .tvx.is-swapping .tvx-cats li { animation: tvx-in .45s var(--t-ease) both; }
body[data-page="services"] .tvx.is-swapping .tvx-cats li:nth-child(2) { animation-delay: .03s; }
body[data-page="services"] .tvx.is-swapping .tvx-cats li:nth-child(3) { animation-delay: .06s; }
body[data-page="services"] .tvx.is-swapping .tvx-cats li:nth-child(4) { animation-delay: .09s; }
body[data-page="services"] .tvx.is-swapping .tvx-cats li:nth-child(5) { animation-delay: .12s; }
body[data-page="services"] .tvx.is-swapping .tvx-cats li:nth-child(n+6) { animation-delay: .15s; }
@keyframes tvx-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Responsive */
@media (max-width: 980px) {
  body[data-page="services"] .bb .section-shell { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
  body[data-page="services"] .bb article:nth-child(3) { padding-left: 0; border-left: 0; }
  body[data-page="services"] .tvx { padding: 60px 0 44px; }
  body[data-page="services"] .tvx-shell { grid-template-columns: 1fr; gap: 26px; }
  body[data-page="services"] .tvx-stage { order: -1; width: min(560px, 100%); margin: 0 auto; }
}
@media (max-width: 560px) {
  body[data-page="services"] .bb .section-shell { grid-template-columns: 1fr; }
  body[data-page="services"] .bb article { padding-left: 0; border-left: 0; }
  body[data-page="services"] .tvx-towns { grid-template-columns: 1fr; }
  body[data-page="services"] .tvx-panel { padding: 18px; }
  body[data-page="services"] .tvx-tdt { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-page="services"] .tvx *, body[data-page="services"] .tvx-bg i { animation: none !important; }
}
