/* ==========================================================================
   ROLAVI Cloud hub
   --------------------------------------------------------------------------
   1) .cloud-switch  -> selector [Cloud-Field | NTRIP Caster] (cloud.html y ntrip-caster.html)
   2) .ntrip-page    -> página NTRIP Caster (ntrip-caster.html en EN / ES / PT)

   Se carga DESPUÉS de assets/css/styles.css. Todas las reglas de la página
   NTRIP Caster cuelgan de ".ntrip-page" y usan el prefijo "nt-" para no
   chocar con el resto del sitio.
   ========================================================================== */

/* ---------- 1) Selector Cloud-Field | NTRIP Caster ---------- */
.cloud-switch { background: #fff; border-bottom: 1px solid #e3eaf3; padding: 14px 0; }
.cloud-switch .container { display: flex; justify-content: center; }
.cloud-switch-track {
  display: inline-flex; gap: 4px; padding: 4px;
  border: 1px solid #d5dfeb; border-radius: 999px; background: #f1f5fb;
}
.cloud-switch-track a {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 40px; padding: 0 22px; border-radius: 999px;
  font-size: 13px; font-weight: 750; letter-spacing: .01em; white-space: nowrap;
  color: #3b5069; transition: background .2s, color .2s, box-shadow .2s;
}
.cloud-switch-track a svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cloud-switch-track a:hover { color: #10243b; background: #e6eef9; }
.cloud-switch-track a[aria-current="page"] { background: #142d47; color: #fff; box-shadow: 0 6px 16px rgba(20, 45, 71, .22); }
.cloud-switch-track a:focus-visible { outline: 3px solid #2674ff; outline-offset: 3px; }
@media (max-width: 520px) {
  .cloud-switch { padding: 12px 0; }
  .cloud-switch .container { width: calc(100% - 32px); }
  .cloud-switch-track { width: 100%; }
  .cloud-switch-track a { flex: 1 1 0; justify-content: center; padding: 0 10px; font-size: 12.5px; }
}

/* ---------- 2) Página NTRIP Caster ---------- */
.ntrip-page {
  --nt-bg: #f3f6fb;
  --nt-surface: #fff;
  --nt-surface-2: #f8fafd;
  --nt-line: #e2e8f1;
  --nt-line-strong: #cbd5e3;
  --nt-ink: #10243e;
  --nt-ink-2: #3f5068;
  --nt-muted: #667791;
  --nt-brand: #0366d6;
  --nt-brand-600: #024ea4;
  --nt-brand-100: #d3e5fa;
  --nt-brand-50: #eaf3fd;
  --nt-fix: #27ae60;            /* verde FIX sobre fondo claro */
  --nt-fix-lit: #3ddc84;        /* verde FIX sobre fondo oscuro */
  --nt-fix-deep: #27ae60;
  --nt-dark-1: #081426;
  --nt-dark-2: #0d2140;
  --nt-on-dark: #eaf2ff;
  --nt-on-dark-2: #a9bbd6;
  --nt-line-dark: rgba(160, 190, 235, .22);
  color: var(--nt-ink);
}
:where(.ntrip-page) :is(h1, h2, h3, h4, p) { margin: 0; }   /* :where = especificidad 0, así los margin de cada clase ganan */
.ntrip-page section[id] { scroll-margin-top: 96px; }
.ntrip-page a:focus-visible, .ntrip-page button:focus-visible { outline: 3px solid #2674ff; outline-offset: 4px; border-radius: 4px; }
.nt-defs { position: absolute; width: 0; height: 0; }   /* defs compartidos: no usar display:none, rompe los markers */

/* secciones */
.nt-sec { padding: clamp(56px, 8vw, 100px) 0; }
.nt-light { background: var(--nt-bg); }
.nt-white { background: var(--nt-surface); }
.nt-dark {
  color: var(--nt-on-dark);
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(3, 102, 214, .38), transparent 62%),
    linear-gradient(162deg, var(--nt-dark-2), var(--nt-dark-1) 70%);
}
.nt-center { text-align: center; }
.nt-eyebrow { font-size: 12px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; color: var(--nt-brand); }
.nt-dark .nt-eyebrow { color: #7ee2a8; }
.ntrip-page .nt-h2 { margin-top: 10px; font-size: clamp(30px, 3.6vw, 46px); font-weight: 650; letter-spacing: -.035em; line-height: 1.1; color: var(--nt-ink); text-wrap: balance; }
.nt-dark .nt-h2 { color: #fff; }
.nt-lead { margin-top: 16px; max-width: 700px; font-size: 17px; line-height: 1.65; color: var(--nt-ink-2); text-wrap: balance; }
.nt-center .nt-lead { margin-left: auto; margin-right: auto; }
.nt-dark .nt-lead { color: var(--nt-on-dark-2); }

/* botones */
.nt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px; border: 1px solid transparent; border-radius: 10px;
  font-size: 14.5px; font-weight: 700; line-height: 1.2; text-align: center;
  transition: background .2s, filter .2s, transform .2s, border-color .2s;
}
.nt-btn:hover { transform: translateY(-1px); }
.nt-btn svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nt-btn-fix { background: var(--nt-fix-lit); color: #04180d; box-shadow: 0 14px 34px rgba(61, 220, 132, .24); }
.nt-btn-fix:hover { filter: brightness(1.07); }
.nt-btn-ghost { border-color: rgba(160, 190, 235, .45); color: var(--nt-on-dark); background: rgba(255, 255, 255, .04); }
.nt-btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.nt-btn-wa { background: #167a3f; color: #fff; }
.nt-btn-wa:hover { filter: brightness(1.12); }
.nt-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Portada (RTK FIX) ---------- */
.nt-hero {
  position: relative; overflow: hidden; color: var(--nt-on-dark);
  padding: clamp(48px, 7vw, 92px) 0 clamp(52px, 7vw, 88px);
  background:
    radial-gradient(820px 520px at 88% -8%, rgba(3, 102, 214, .55), transparent 62%),
    radial-gradient(640px 460px at -8% 108%, rgba(61, 220, 132, .16), transparent 58%),
    linear-gradient(162deg, var(--nt-dark-2), var(--nt-dark-1) 70%);
}
.nt-hero::before {                       /* cuadrícula de plano que se desvanece hacia los bordes */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(150, 190, 255, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 190, 255, .08) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 25%, transparent 78%);
          mask-image: radial-gradient(ellipse at 50% 50%, #000 25%, transparent 78%);
}
.nt-hero .container { position: relative; }
.nt-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.nt-wordmark { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.nt-wordmark img { width: 150px; height: auto; }
.nt-tag {
  padding: 5px 12px; border: 1px solid var(--nt-line-dark); border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--nt-on-dark-2); background: rgba(255, 255, 255, .04);
}
.nt-state {
  display: flex; width: fit-content; align-items: center; gap: 10px; padding: 6px 14px 6px 12px;
  border: 1px solid rgba(61, 220, 132, .38); border-radius: 999px; background: rgba(61, 220, 132, .10);
  color: #9af0c1; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.nt-state i { width: 9px; height: 9px; border-radius: 50%; background: var(--nt-fix-lit); box-shadow: 0 0 0 0 rgba(61, 220, 132, .6); animation: nt-pulse 1.9s infinite; }
.nt-hero h1 { margin-top: 18px; }
.nt-hero h1 .nt-fixword {
  display: block; font-size: clamp(64px, 9.4vw, 128px); font-weight: 800; letter-spacing: -.045em; line-height: .95;
  background: linear-gradient(180deg, #8ff5bd 0%, var(--nt-fix-lit) 45%, var(--nt-fix-deep) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 0 28px rgba(61, 220, 132, .28));
}
.nt-hero h1 .nt-sub {
  display: block; margin-top: 16px; max-width: 560px;
  font-size: clamp(22px, 2.5vw, 32px); font-weight: 650; letter-spacing: -.02em; line-height: 1.18; color: #fff; text-wrap: balance;
}
.nt-hero-text { margin-top: 16px; max-width: 520px; font-size: 16px; line-height: 1.6; color: var(--nt-on-dark-2); text-wrap: pretty; }
.nt-hero .nt-actions { margin-top: 28px; }

.nt-plan-mini {
  display: inline-flex; align-items: center; gap: 22px; margin-top: 30px; padding: 14px 22px;
  border: 1px solid var(--nt-line-dark); border-radius: 16px; background: rgba(255, 255, 255, .05);
}
.nt-plan-mini small { display: block; margin-bottom: 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #9af0c1; }
.nt-plan-mini .nt-price { display: flex; align-items: baseline; gap: 8px; }
.nt-plan-mini .nt-price b { font-size: 44px; font-weight: 800; line-height: 1; letter-spacing: -.03em; color: #fff; }
.nt-plan-mini .nt-price span { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--nt-on-dark-2); }
.nt-plan-mini hr { align-self: stretch; width: 1px; margin: 0; border: 0; background: var(--nt-line-dark); }
.nt-plan-mini ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.nt-plan-mini li { display: flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 600; color: var(--nt-on-dark); }
.nt-plan-mini li svg { flex: none; width: 16px; height: 16px; stroke: var(--nt-fix-lit); fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* diagrama Base → Caster → Rover */
.nt-flow-card {
  padding: clamp(16px, 2.4vw, 28px) clamp(12px, 2vw, 24px);
  border: 1px solid var(--nt-line-dark); border-radius: 26px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  box-shadow: 0 30px 80px rgba(0, 0, 0, .32);
}
.nt-flow svg { display: block; width: 100%; height: auto; overflow: visible; }
.nt-flow text { font-family: inherit; }
.nt-flow .sat rect, .nt-flow .sat path { fill: #6f8fbd; }
.nt-flow .sat path.div { fill: none; stroke: #0d2140; stroke-width: 1.2; }
.nt-flow .beam { stroke: rgba(150, 190, 255, .28); stroke-width: 1.2; stroke-dasharray: 2 5; fill: none; }
.nt-flow .gear { stroke: #bcd2f2; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.nt-flow .dome { fill: #dbe8fb; }
.nt-flow .node { fill: rgba(255, 255, 255, .06); stroke: rgba(160, 195, 245, .55); stroke-width: 1.6; }
.nt-flow .slot { fill: rgba(255, 255, 255, .08); }
.nt-flow .led { fill: #6fa8ff; }
.nt-flow .led.on { fill: var(--nt-fix-lit); animation: nt-blink 1.6s ease-in-out infinite; }
.nt-flow .led.on:nth-of-type(odd) { animation-delay: .5s; }
.nt-flow .link { stroke: #5aa0ff; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 3 8; fill: none; animation: nt-flow 1.1s linear infinite; }
.nt-flow .link.fix { stroke: var(--nt-fix-lit); }
.nt-flow .cap { fill: var(--nt-on-dark-2); font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-anchor: middle; }
.nt-flow .cap.dim { fill: #7f95b8; letter-spacing: .1em; font-size: 10.5px; }
.nt-flow .ring { fill: none; stroke: var(--nt-fix-lit); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: nt-ring 2.4s ease-out infinite; }
.nt-flow .ring.r2 { animation-delay: 1.2s; }
.nt-flow .fix-pill { fill: var(--nt-fix-deep); }
.nt-flow .fix-txt { fill: #fff; font-size: 14px; font-weight: 800; letter-spacing: .12em; text-anchor: middle; }

/* ---------- Monitoreo en vivo ---------- */
.nt-laptop { max-width: 960px; margin: 44px auto 0; }
.nt-laptop-screen {
  position: relative; padding: 14px 14px 16px;
  border: 2px solid #2b313a; border-radius: 20px 20px 4px 4px; background: #0c0e12;
  box-shadow: 0 30px 70px rgba(11, 27, 51, .28);
}
.nt-laptop-screen::before { content: ""; position: absolute; top: 5px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #2c333d; }
.nt-laptop-screen img { display: block; width: 100%; height: auto; border-radius: 4px; background: #fff; }
.nt-laptop-base {
  position: relative; height: 16px; margin: 0 -4.5%;
  border-radius: 0 0 22px 22px; background: linear-gradient(#d9dee6, #a7b0bd);
  box-shadow: 0 14px 26px rgba(11, 27, 51, .25);
}
.nt-laptop-base::after { content: ""; position: absolute; left: 50%; top: 0; width: 17%; height: 6px; margin-left: -8.5%; border-radius: 0 0 10px 10px; background: #8e98a6; }
.nt-points { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; max-width: 960px; margin: 40px auto 0; padding: 0; text-align: left; }
.nt-points li {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  border: 1px solid var(--nt-line); border-radius: 14px; background: var(--nt-surface);
  box-shadow: 0 1px 2px rgba(11, 27, 51, .06); font-size: 14.5px; font-weight: 650; color: var(--nt-ink);
}
.nt-points svg { flex: none; width: 18px; height: 18px; stroke: var(--nt-fix); fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Base › Nube › equipo ---------- */
.nt-flows { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; margin-top: 44px; text-align: left; }
.nt-card { padding: 22px 22px 26px; border: 1px solid var(--nt-line-dark); border-radius: 20px; background: rgba(255, 255, 255, .04); }
.nt-card svg { display: block; width: 100%; height: auto; overflow: visible; }
.nt-card h3 { margin-top: 14px; font-size: 19px; font-weight: 750; letter-spacing: -.01em; color: #fff; }
.nt-card h3 i { font-style: normal; color: #7f95b8; padding: 0 4px; }
.nt-card p { margin-top: 8px; font-size: 14.5px; line-height: 1.6; color: var(--nt-on-dark-2); }
.nt-gear { stroke: #bcd2f2; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.nt-dome { fill: #dbe8fb; }
.nt-node { fill: rgba(255, 255, 255, .08); stroke: rgba(160, 195, 245, .6); stroke-width: 1.6; }
.nt-slot { fill: rgba(255, 255, 255, .1); }
.nt-led { fill: var(--nt-fix-lit); }
.nt-wheel { fill: rgba(255, 255, 255, .04); stroke: #bcd2f2; stroke-width: 2.4; }
.nt-cloud { fill: rgba(255, 255, 255, .07); stroke: rgba(160, 195, 245, .75); stroke-width: 2; stroke-linejoin: round; }
.nt-cloud-txt { fill: #dbe8fb; font-family: inherit; font-size: 11px; font-weight: 700; letter-spacing: .1em; }
.nt-link { stroke: #5aa0ff; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 3 8; fill: none; animation: nt-flow 1.1s linear infinite; }
.nt-link.fix { stroke: var(--nt-fix-lit); }
.nt-cap { fill: var(--nt-on-dark-2); font-family: inherit; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-anchor: middle; }
.nt-pill { fill: var(--nt-fix-deep); }
.nt-pill-txt { fill: #fff; font-family: inherit; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-anchor: middle; }
.nt-beam { stroke: var(--nt-fix-lit); stroke-width: 1.6; stroke-dasharray: 2 4; stroke-linecap: round; fill: none; }
.nt-foot { margin: 30px auto 0; max-width: 720px; text-align: center; font-size: 15.5px; line-height: 1.6; color: var(--nt-on-dark-2); text-wrap: balance; }

/* ---------- Configuración ---------- */
.nt-fmt { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.nt-fmt span { padding: 5px 13px; border: 1px solid var(--nt-brand-100); border-radius: 999px; background: var(--nt-brand-50); color: var(--nt-brand-600); font-size: 13px; font-weight: 700; }
.ntrip-page .nt-h3 { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--nt-line); font-size: clamp(22px, 2.4vw, 30px); font-weight: 650; letter-spacing: -.025em; color: var(--nt-ink); }
.nt-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 320px); gap: clamp(24px, 5vw, 64px); align-items: center;
  margin-top: 32px; padding: clamp(22px, 3.4vw, 40px); border: 1px solid var(--nt-line); border-radius: 24px; background: var(--nt-surface-2);
}
.nt-row.nt-rev { grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); }
.nt-row.nt-rev .nt-txt { order: 2; }
.nt-txt h4 { font-size: 22px; font-weight: 750; letter-spacing: -.01em; color: var(--nt-ink); }
.nt-steps { counter-reset: st; list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; }
.nt-steps li { counter-increment: st; display: flex; align-items: flex-start; gap: 14px; font-size: 16.5px; line-height: 1.5; color: var(--nt-ink-2); }
.nt-steps li::before { content: counter(st); flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--nt-brand); color: #fff; font-size: 14px; font-weight: 700; }
.nt-shot { justify-self: center; width: 100%; max-width: 320px; margin: 0; }
.nt-shot.phone { max-width: 270px; }
.nt-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--nt-line-strong); border-radius: 18px; background: #fff; box-shadow: 0 18px 44px rgba(11, 27, 51, .16); }
.nt-shot figcaption { margin-top: 12px; text-align: center; font-size: 13px; color: var(--nt-muted); }
.nt-note { margin-top: 40px; padding: 16px 20px; border: 1px solid var(--nt-brand-100); border-radius: 10px; background: var(--nt-brand-50); font-size: 15px; line-height: 1.6; color: var(--nt-ink-2); }
.nt-note a { color: var(--nt-brand-600); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Conectividad ---------- */
.nt-nets { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 40px; }
.nt-net { padding: 26px; border: 1px solid var(--nt-line); border-radius: 20px; background: var(--nt-surface); box-shadow: 0 1px 2px rgba(11, 27, 51, .06); }
.nt-net svg { width: 42px; height: 42px; padding: 9px; border-radius: 12px; background: var(--nt-brand-50); stroke: var(--nt-brand); fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nt-net h3 { margin-top: 16px; font-size: 19px; font-weight: 750; color: var(--nt-ink); }
.nt-net p { margin-top: 8px; font-size: 15px; line-height: 1.6; color: var(--nt-ink-2); }

/* ---------- Plan y contacto ---------- */
.nt-plan-sec { background: #fff; }
.nt-plan-card { padding: clamp(32px, 5vw, 64px) clamp(22px, 4vw, 56px); border-radius: 28px; text-align: center; box-shadow: 0 30px 70px rgba(11, 27, 51, .22); }
.nt-plan-line { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 26px; font-size: 18px; font-weight: 700; color: #fff; }
.nt-plan-line b { color: #7ee2a8; }
.nt-plan-card .nt-actions { justify-content: center; margin-top: 30px; }
.nt-host { margin-top: 36px; font-size: 13px; letter-spacing: .04em; color: #7f95b8; }
.nt-host a { color: #9fc8ff; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Animaciones ---------- */
@keyframes nt-pulse { 70% { box-shadow: 0 0 0 9px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }
@keyframes nt-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes nt-flow  { to { stroke-dashoffset: -22; } }
@keyframes nt-ring  { 0% { transform: scale(.55); opacity: .9; } 100% { transform: scale(2.1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .ntrip-page *, .ntrip-page *::before, .ntrip-page *::after { animation: none !important; transition: none !important; }
}

/* ---------- Adaptable ---------- */
@media (max-width: 980px) {
  .nt-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .nt-flow-card { max-width: 640px; }
}
@media (max-width: 760px) {
  .nt-row, .nt-row.nt-rev { grid-template-columns: minmax(0, 1fr); }
  .nt-row.nt-rev .nt-txt { order: 0; }
  .nt-laptop-screen { padding: 8px 8px 10px; border-radius: 12px 12px 3px 3px; }
  .nt-laptop-base { margin: 0 -1.5%; height: 12px; }
  .nt-plan-mini { gap: 16px; padding: 14px 16px; }
  .nt-plan-mini .nt-price b { font-size: 38px; }
}
@media (max-width: 520px) {
  .nt-hero .nt-actions .nt-btn { flex: 1 1 100%; }
  .nt-plan-mini { display: flex; flex-wrap: wrap; }
  .nt-plan-mini hr { display: none; }
  .nt-plan-card .nt-actions .nt-btn { flex: 1 1 100%; }
  .nt-steps li { font-size: 15.5px; }
}
