/* ==========================================================================
   PRISMA PROTECCIÓN CIVIL 360° — DEMO INTERACTIVA DU PIXEL & CODE
   Inspiración visual: Zoho CRM Editorial Cream/White + Orbital 3D Radar
   ========================================================================== */

@property --pc-tab-fade-start {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

@property --pc-tab-fade-end {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

:root {
  --pc-cream: #fdf4e3;
  --pc-cream-deep: #f8e8cb;
  --pc-white: #ffffff;
  --pc-surface: #f7f9fc;
  --pc-navy: #0b1d3a;
  --pc-navy-soft: #1e3356;
  --pc-ink: #14213d;
  --pc-muted: #52627a;
  --pc-cobalt: #1565e8;
  --pc-cobalt-soft: rgba(21, 101, 232, 0.12);
  --pc-orange: #e54826;
  --pc-orange-hover: #c93818;
  --pc-amber: #d97706;
  --pc-emerald: #059669;
  --pc-border: rgba(15, 35, 75, 0.1);
  --pc-shadow-sm: 0 8px 24px rgba(11, 29, 58, 0.06);
  --pc-shadow-md: 0 18px 45px rgba(11, 29, 58, 0.1);
  --pc-shadow-pill: 0 10px 26px rgba(15, 42, 92, 0.11), 0 2px 6px rgba(15, 42, 92, 0.05);
  --pc-radius-lg: 24px;
  --pc-radius-md: 16px;
  --pc-font-head: 'Poppins', 'Montserrat', system-ui, -apple-system, sans-serif;
  --pc-font-body: 'Plus Jakarta Sans', 'Lato', system-ui, -apple-system, sans-serif;
  --pc-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body.pc-demo-body {
  margin: 0;
  background-color: var(--pc-white);
  color: var(--pc-ink);
  font-family: var(--pc-font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Utilidad accesible para lectores de pantalla */
.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.pc-skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--pc-navy);
  color: var(--pc-white);
  font-weight: 700;
  text-decoration: none;
}

.pc-skip-link:focus {
  top: 12px;
}

/* Cinta superior de Demo DU Pixel & Code */
.pc-demo-ribbon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
  padding: 9px 18px;
  background: var(--pc-navy);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.78rem;
  text-align: center;
}

.pc-demo-ribbon strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(229, 72, 38, 0.24);
  border: 1px solid rgba(251, 146, 60, 0.45);
  color: #ffd7ba;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pc-demo-ribbon a {
  color: #93c5fd;
  font-weight: 600;
  text-decoration: none;
}

.pc-demo-ribbon a:hover {
  text-decoration: underline;
}

/* Header limpio estilo Zoho Enterprise */
.pc-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(253, 244, 227, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(15, 35, 75, 0.08);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.pc-header.is-scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 30px rgba(11, 29, 58, 0.07);
}

.pc-container {
  width: min(1260px, calc(100% - 40px));
  margin-inline: auto;
}

.pc-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
}

.pc-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--pc-navy);
  text-decoration: none;
}

.pc-brand__badge {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--pc-navy) 0%, var(--pc-cobalt) 100%);
  color: var(--pc-white);
  box-shadow: 0 8px 18px rgba(21, 101, 232, 0.25);
}

.pc-brand__badge svg {
  width: 24px;
  height: 24px;
}

.pc-brand__text strong {
  display: block;
  font-family: var(--pc-font-head);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.pc-brand__text small {
  display: block;
  color: var(--pc-muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pc-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.pc-nav a {
  color: var(--pc-navy-soft);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.pc-nav a:hover,
.pc-nav a:focus-visible {
  color: var(--pc-cobalt);
}

.pc-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pc-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  background: var(--pc-white);
  color: var(--pc-navy);
  cursor: pointer;
}

.pc-mobile-drawer {
  padding: 16px 20px 22px;
  background: var(--pc-white);
  border-bottom: 1px solid var(--pc-border);
  box-shadow: var(--pc-shadow-md);
}

.pc-mobile-drawer nav {
  display: grid;
  gap: 12px;
}

.pc-mobile-drawer a {
  padding: 8px 4px;
  color: var(--pc-navy);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 35, 75, 0.06);
}

/* Botones estilo Zoho (cálidos, nítidos y de alta conversión) */
.pc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--pc-font-head);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.pc-btn--sm {
  padding: 9px 18px;
  font-size: 0.82rem;
}

.pc-btn--primary {
  background: var(--pc-orange);
  color: var(--pc-white);
  box-shadow: 0 10px 24px rgba(229, 72, 38, 0.26);
}

.pc-btn--primary:hover {
  background: var(--pc-orange-hover);
  box-shadow: 0 14px 28px rgba(229, 72, 38, 0.34);
}

.pc-btn--cobalt {
  background: var(--pc-cobalt);
  color: var(--pc-white);
  box-shadow: 0 10px 24px rgba(21, 101, 232, 0.24);
}

.pc-btn--cobalt:hover {
  background: #0f52c6;
}

.pc-btn--outline {
  background: var(--pc-white);
  border-color: rgba(21, 101, 232, 0.28);
  color: var(--pc-navy);
}

.pc-btn--outline:hover {
  border-color: var(--pc-cobalt);
  color: var(--pc-cobalt);
}

.pc-btn:focus-visible,
.pc-radar-pill:focus-visible,
.pc-tab-btn:focus-visible {
  outline: 3px solid var(--pc-cobalt);
  outline-offset: 3px;
}

/* ==========================================================================
   HERO EDITORIAL ESTILO ZOHO CRM (FONDO CÁLIDO CREMA)
   ========================================================================== */
.pc-hero {
  position: relative;
  padding: 68px 0 84px;
  background:
    radial-gradient(circle at 82% 18%, rgba(21, 101, 232, 0.08), transparent 42%),
    radial-gradient(circle at 14% 72%, rgba(229, 72, 38, 0.07), transparent 38%),
    linear-gradient(180deg, var(--pc-cream) 0%, #fef9ef 74%, var(--pc-white) 100%);
  overflow: hidden;
}

.pc-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  align-items: center;
  gap: 48px;
}

.pc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(21, 101, 232, 0.1);
  border: 1px solid rgba(21, 101, 232, 0.22);
  color: var(--pc-cobalt);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.pc-eyebrow__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pc-emerald);
}

.pc-hero h1 {
  margin: 18px 0 20px;
  color: var(--pc-navy);
  font-family: var(--pc-font-head);
  font-size: clamp(2.35rem, 4.7vw, 4.05rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.pc-hero h1 em {
  font-style: normal;
  color: var(--pc-cobalt);
}

.pc-hero__lead {
  max-width: 610px;
  margin: 0 0 28px;
  color: var(--pc-muted);
  font-size: clamp(1.02rem, 1.35vw, 1.16rem);
  line-height: 1.7;
}

.pc-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.pc-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--pc-navy-soft);
  font-size: 0.84rem;
  font-weight: 600;
}

.pc-hero__badges span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.pc-hero__badges i {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(5, 150, 105, 0.14);
  color: var(--pc-emerald);
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 800;
}

/* Tarjeta interactiva derecha del Hero: Monitor de Expediente Normativo */
.pc-hero-card {
  padding: 28px;
  border-radius: var(--pc-radius-lg);
  background: var(--pc-white);
  border: 1px solid rgba(21, 101, 232, 0.16);
  box-shadow: 0 26px 60px rgba(11, 29, 58, 0.12);
}

.pc-hero-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--pc-border);
}

.pc-hero-card__top strong {
  display: block;
  color: var(--pc-navy);
  font-family: var(--pc-font-head);
  font-size: 0.98rem;
}

.pc-hero-card__top small {
  color: var(--pc-muted);
  font-size: 0.76rem;
}

.pc-status-chip {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.12);
  color: var(--pc-emerald);
  font-family: var(--pc-font-mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.pc-compliance-list {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.pc-compliance-row {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--pc-surface);
  border: 1px solid rgba(15, 35, 75, 0.06);
}

.pc-compliance-row__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--pc-navy);
}

.pc-compliance-row__head span:last-child {
  font-family: var(--pc-font-mono);
  font-size: 0.76rem;
  color: var(--pc-cobalt);
}

.pc-bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(21, 101, 232, 0.12);
  overflow: hidden;
}

.pc-bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pc-cobalt), #38bdf8);
}

.pc-hero-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 14px;
  background: var(--pc-cream);
  font-size: 0.82rem;
  color: var(--pc-navy);
}

.pc-hero-card__foot strong {
  color: var(--pc-orange);
}

/* Franja de métricas de autoridad */
.pc-metrics {
  padding: 18px 0 42px;
  background: var(--pc-white);
}

.pc-metrics__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.pc-metric-card {
  padding: 24px;
  border-radius: 18px;
  background: var(--pc-surface);
  border: 1px solid var(--pc-border);
}

.pc-metric-card strong {
  display: block;
  color: var(--pc-navy);
  font-family: var(--pc-font-head);
  font-size: clamp(1.7rem, 2.8vw, 2.25rem);
  font-weight: 700;
  line-height: 1.1;
}

.pc-metric-card span {
  display: block;
  margin-top: 6px;
  color: var(--pc-muted);
  font-size: 0.86rem;
}

/* ==========================================================================
   SECCIÓN ESTRELLA: RADAR ORBITAL 360° DE RECORRIDOS (ESTÉTICA ZOHO CRM)
   ========================================================================== */
.pc-radar-section {
  position: relative;
  padding: 88px 0 96px;
  background:
    radial-gradient(circle at 50% 44%, #fffaf0 0%, var(--pc-cream) 68%, var(--pc-cream-deep) 100%);
  border-top: 1px solid rgba(21, 101, 232, 0.1);
  border-bottom: 1px solid rgba(21, 101, 232, 0.1);
}

.pc-section-head {
  max-width: 780px;
  margin: 0 auto 32px;
  text-align: center;
}

.pc-section-head h2 {
  margin: 14px 0 14px;
  color: var(--pc-navy);
  font-family: var(--pc-font-head);
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.14;
}

.pc-section-head p {
  margin: 0;
  color: var(--pc-muted);
  font-size: 1.02rem;
}

.pc-radar-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 22px;
}

.pc-radar-control-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(21, 101, 232, 0.28);
  background: rgba(255, 255, 255, 0.9);
  color: var(--pc-navy);
  font-family: var(--pc-font-body);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--pc-shadow-sm);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.pc-radar-control-btn:hover {
  background: var(--pc-white);
  border-color: var(--pc-cobalt);
}

.pc-radar-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: 999px;
  background: rgba(21, 101, 232, 0.08);
  color: var(--pc-cobalt);
  font-family: var(--pc-font-mono);
  font-size: 0.76rem;
  font-weight: 600;
}

.pc-radar-status-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pc-cobalt);
}

@media (prefers-reduced-motion: no-preference) {
  .pc-radar-status-pill i.is-live {
    animation: pc-radar-blink 1.8s ease-in-out infinite;
  }
}

@keyframes pc-radar-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.82); }
}

/* Escenario orbital 3D en perspectiva exactamente como el radar de Zoho */
.pc-radar-stage {
  position: relative;
  width: min(1140px, 100%);
  margin: 0 auto 38px;
  padding-inline: 18px;
  user-select: none;
}

.pc-radar-svg-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1160 / 620;
}

.pc-radar-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Núcleo central elevado y 100% despejado sobre el anillo interior */
.pc-radar-core {
  position: absolute;
  left: 50%;
  top: 49.2%;
  translate: -50% -54%;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 26px;
  background: radial-gradient(circle, rgba(253, 244, 227, 0.92) 45%, rgba(253, 244, 227, 0) 100%);
  pointer-events: none;
}

.pc-radar-core__emblem {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: linear-gradient(145deg, #1f2937 0%, #0b1d3a 58%, #1565e8 100%);
  color: #ffffff;
  border: 2.5px solid #ffffff;
  box-shadow:
    0 16px 32px rgba(11, 29, 58, 0.28),
    0 4px 10px rgba(21, 101, 232, 0.22);
}

.pc-radar-core__emblem svg {
  width: 34px;
  height: 34px;
}

.pc-radar-core__tag {
  padding: 4px 13px;
  border-radius: 999px;
  background: var(--pc-navy);
  border: 1.5px solid #ffffff;
  color: #ffffff;
  font-family: var(--pc-font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(11, 29, 58, 0.22);
}

/* Cápsulas blancas flotantes en las órbitas exteriores (sin invadir el núcleo) */
.pc-radar-nodes {
  position: absolute;
  inset: 0 18px;
  z-index: 6;
  pointer-events: none;
}

.pc-radar-pill {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  translate: -50% -50%;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 196px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid rgba(21, 101, 232, 0.16);
  background: var(--pc-white);
  color: #164ec4;
  font-family: var(--pc-font-body);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.22;
  text-align: center;
  box-shadow: var(--pc-shadow-pill);
  cursor: pointer;
  transition:
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background-color 0.25s ease,
    color 0.25s ease;
}

.pc-radar-pill__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(21, 101, 232, 0.32);
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.pc-radar-pill:hover {
  transform: scale(1.05);
  border-color: var(--pc-cobalt);
  box-shadow: 0 16px 34px rgba(21, 101, 232, 0.2);
}

/* Estado cuando el haz del radar pasa por encima de la cápsula */
.pc-radar-pill.is-swept {
  border-color: rgba(124, 58, 237, 0.52);
  box-shadow:
    0 14px 32px rgba(124, 58, 237, 0.2),
    0 0 0 4px rgba(21, 101, 232, 0.1);
}

.pc-radar-pill.is-swept .pc-radar-pill__dot {
  background: #7c3aed;
  transform: scale(1.3);
}

/* Estado seleccionado por el usuario o tour activo */
.pc-radar-pill[aria-pressed="true"] {
  background: var(--pc-navy);
  border-color: var(--pc-navy);
  color: var(--pc-white);
  transform: scale(1.06);
  box-shadow: 0 18px 38px rgba(11, 29, 58, 0.28);
}

.pc-radar-pill[aria-pressed="true"] .pc-radar-pill__dot {
  background: #fb923c;
}

/* Panel inferior sincronizado con el nodo del Radar seleccionado */
.pc-radar-inspector {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 28px;
  align-items: center;
  max-width: 1060px;
  margin: 0 auto;
  padding: 30px 34px;
  border-radius: var(--pc-radius-lg);
  background: var(--pc-white);
  border: 1px solid rgba(21, 101, 232, 0.18);
  box-shadow: var(--pc-shadow-md);
}

.pc-inspector__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.pc-inspector__orbit {
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--pc-cobalt-soft);
  color: var(--pc-cobalt);
  font-family: var(--pc-font-mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.pc-inspector__norm {
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(229, 72, 38, 0.1);
  color: var(--pc-orange);
  font-family: var(--pc-font-mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.pc-radar-inspector h3 {
  margin: 0 0 10px;
  color: var(--pc-navy);
  font-family: var(--pc-font-head);
  font-size: clamp(1.32rem, 2.2vw, 1.68rem);
}

.pc-radar-inspector p {
  margin: 0 0 16px;
  color: var(--pc-muted);
  font-size: 0.96rem;
}

.pc-inspector__checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pc-inspector__checks li {
  position: relative;
  padding-left: 22px;
  color: var(--pc-navy-soft);
  font-size: 0.85rem;
  font-weight: 600;
}

.pc-inspector__checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--pc-emerald);
  font-weight: 800;
}

.pc-inspector__deliverable {
  padding: 22px;
  border-radius: 18px;
  background: var(--pc-surface);
  border: 1px solid var(--pc-border);
}

.pc-inspector__deliverable small {
  display: block;
  color: var(--pc-muted);
  font-family: var(--pc-font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pc-inspector__deliverable strong {
  display: block;
  margin: 6px 0 12px;
  color: var(--pc-navy);
  font-family: var(--pc-font-head);
  font-size: 1.04rem;
}

.pc-inspector__sla {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  margin-bottom: 14px;
  border-top: 1px dashed var(--pc-border);
  border-bottom: 1px dashed var(--pc-border);
  font-size: 0.82rem;
  color: var(--pc-muted);
}

.pc-inspector__sla b {
  color: var(--pc-navy);
}

/* ==========================================================================
   SECCIÓN PESTAÑAS DE SERVICIOS INTEGRALES (PATRÓN ACCESIBLE WAI-ARIA)
   ========================================================================== */
.pc-pillars-section {
  padding: 92px 0;
  background: var(--pc-white);
}

.pc-tabs {
  max-width: 1120px;
  margin: 0 auto;
}

.pc-tablist {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: inline proximity;
  scroll-padding-inline: 2.5rem;
  border-bottom: 1px solid var(--pc-border);
  margin-bottom: 28px;
  --fade-size: 2.5rem;
}

.pc-tablist::-webkit-scrollbar {
  display: none;
}

.pc-tab-btn {
  position: relative;
  flex: none;
  scroll-snap-align: start;
  padding: 14px 22px;
  border: 0;
  background: transparent;
  color: var(--pc-muted);
  font-family: var(--pc-font-head);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.pc-tab-btn:hover {
  color: var(--pc-navy);
}

/* Indicador mediante borde en pseudo-elemento (compatible con Forced Colors WCAG 1.4.1) */
.pc-tab-btn[aria-selected="true"] {
  color: var(--pc-cobalt);
}

.pc-tab-btn[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  border-block-end: 3px solid var(--pc-cobalt);
}

.pc-tabpanels-stack {
  display: grid;
}

.pc-tabpanel {
  grid-area: 1 / 1;
}

/* Estilos en contenedor hijo para respetar hidden="until-found" */
.pc-tabpanel__inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.pc-service-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  border-radius: 20px;
  background: var(--pc-surface);
  border: 1px solid var(--pc-border);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.pc-service-card:hover {
  transform: translateY(-3px);
  border-color: rgba(21, 101, 232, 0.35);
  box-shadow: var(--pc-shadow-sm);
}

.pc-service-card__tag {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--pc-cobalt);
  font-family: var(--pc-font-mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.pc-service-card h3 {
  margin: 0 0 10px;
  color: var(--pc-navy);
  font-family: var(--pc-font-head);
  font-size: 1.14rem;
}

.pc-service-card p {
  margin: 0 0 16px;
  color: var(--pc-muted);
  font-size: 0.9rem;
}

.pc-service-card__foot {
  padding-top: 14px;
  border-top: 1px solid rgba(15, 35, 75, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--pc-navy-soft);
}

/* ==========================================================================
   CALCULADORA INTERACTIVA NOM-002-STPS & CLASIFICACIÓN DE RIESGO
   ========================================================================== */
.pc-calc-section {
  padding: 92px 0;
  background: linear-gradient(180deg, var(--pc-surface) 0%, var(--pc-cream) 100%);
  border-top: 1px solid var(--pc-border);
}

.pc-calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 32px;
  align-items: start;
}

.pc-calc-controls,
.pc-calc-output {
  padding: 32px;
  border-radius: var(--pc-radius-lg);
  background: var(--pc-white);
  border: 1px solid var(--pc-border);
  box-shadow: var(--pc-shadow-md);
}

.pc-calc-field {
  margin-bottom: 22px;
}

.pc-calc-field label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  color: var(--pc-navy);
  font-weight: 700;
  font-size: 0.9rem;
}

.pc-calc-field output {
  color: var(--pc-cobalt);
  font-family: var(--pc-font-mono);
  font-size: 0.88rem;
  font-weight: 700;
}

.pc-select,
.pc-input,
.pc-textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(15, 35, 75, 0.16);
  background: var(--pc-white);
  color: var(--pc-navy);
  font-family: var(--pc-font-body);
  font-size: 0.94rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pc-select:focus,
.pc-input:focus,
.pc-textarea:focus {
  outline: none;
  border-color: var(--pc-cobalt);
  box-shadow: 0 0 0 3px rgba(21, 101, 232, 0.16);
}

.pc-range {
  width: 100%;
  accent-color: var(--pc-cobalt);
  cursor: pointer;
}

.pc-check-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--pc-surface);
  border: 1px solid var(--pc-border);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--pc-navy);
}

.pc-check-card input {
  margin-top: 3px;
  accent-color: var(--pc-orange);
}

.pc-risk-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  margin-bottom: 20px;
  border-radius: 16px;
  background: rgba(21, 101, 232, 0.08);
  border: 1px solid rgba(21, 101, 232, 0.22);
}

.pc-risk-banner.is-high {
  background: rgba(229, 72, 38, 0.1);
  border-color: rgba(229, 72, 38, 0.34);
}

.pc-risk-banner small {
  display: block;
  font-family: var(--pc-font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--pc-muted);
}

.pc-risk-banner strong {
  font-family: var(--pc-font-head);
  font-size: 1.35rem;
  color: var(--pc-navy);
}

.pc-risk-banner.is-high strong {
  color: var(--pc-orange);
}

.pc-calc-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.pc-calc-kpi {
  padding: 14px;
  border-radius: 14px;
  background: var(--pc-surface);
  text-align: center;
}

.pc-calc-kpi b {
  display: block;
  color: var(--pc-navy);
  font-family: var(--pc-font-head);
  font-size: 1.35rem;
}

.pc-calc-kpi span {
  font-size: 0.75rem;
  color: var(--pc-muted);
}

.pc-req-list {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.pc-req-list li {
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--pc-surface);
  font-size: 0.85rem;
  color: var(--pc-navy-soft);
  font-weight: 600;
}

/* ==========================================================================
   AGENDA DE RECORRIDO TÉCNICO CON VALIDACIÓN DIFERIDA (:user-invalid)
   ========================================================================== */
.pc-booking-section {
  padding: 92px 0;
  background: var(--pc-white);
}

.pc-booking-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 42px;
  align-items: start;
}

.pc-booking-card {
  padding: 34px;
  border-radius: var(--pc-radius-lg);
  background: var(--pc-surface);
  border: 1px solid var(--pc-border);
}

.pc-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.pc-field--full {
  grid-column: 1 / -1;
}

.pc-field label {
  display: block;
  margin-bottom: 4px;
  color: var(--pc-navy);
  font-size: 0.86rem;
  font-weight: 700;
}

.pc-hint {
  display: block;
  margin-bottom: 6px;
  color: var(--pc-muted);
  font-size: 0.76rem;
}

.pc-error-msg {
  display: none;
  margin-top: 6px;
  color: #b91c1c;
  font-size: 0.8rem;
  font-weight: 600;
}

:is(.pc-input, .pc-select, .pc-textarea):is(:user-invalid, .user-invalid-fallback) {
  border-color: #dc2626;
  background-color: #fef2f2;
}

:is(.pc-input, .pc-select, .pc-textarea):is(:user-invalid, .user-invalid-fallback) + .pc-error-msg {
  display: block;
}

:is(.pc-input, .pc-select, .pc-textarea):user-valid {
  border-color: var(--pc-emerald);
}

/* Banda CTA final hacia DU Pixel & Code */
.pc-du-cta {
  padding: 72px 0;
  background: var(--pc-navy);
  color: var(--pc-white);
}

.pc-du-cta__box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.pc-du-cta h2 {
  margin: 8px 0 10px;
  font-family: var(--pc-font-head);
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
}

.pc-du-cta p {
  max-width: 640px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.pc-footer {
  padding: 32px 0;
  background: #071326;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.84rem;
}

.pc-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pc-footer a {
  color: #93c5fd;
  text-decoration: none;
  margin-left: 16px;
}

/* ==========================================================================
   MODAL NATIVO <dialog closedby="any"> CON CONTENCIÓN DE SCROLL
   ========================================================================== */
.pc-dialog {
  width: min(540px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--pc-border);
  border-radius: 22px;
  background: var(--pc-white);
  color: var(--pc-ink);
  box-shadow: 0 30px 70px rgba(11, 29, 58, 0.3);
}

.pc-dialog:modal {
  overscroll-behavior: contain;
}

.pc-dialog::backdrop {
  background: rgba(11, 29, 58, 0.55);
  backdrop-filter: blur(4px);
  overflow: hidden;
  overscroll-behavior: contain;
}

.pc-dialog__body {
  padding: 30px;
}

.pc-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.pc-dialog__head h1 {
  margin: 0;
  color: var(--pc-navy);
  font-family: var(--pc-font-head);
  font-size: 1.35rem;
}

.pc-dialog__close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--pc-border);
  background: var(--pc-surface);
  color: var(--pc-navy);
  font-size: 1.1rem;
  cursor: pointer;
}

.pc-dialog__summary {
  padding: 16px;
  margin: 16px 0;
  border-radius: 14px;
  background: var(--pc-cream);
  font-size: 0.88rem;
  display: grid;
  gap: 6px;
}

/* ==========================================================================
   ASISTENTE IA ESPECIALISTA EN PROTECCIÓN CIVIL (PIXIE PC)
   ========================================================================== */
.pc-assistant {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 95;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.pc-assistant__launcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, var(--pc-navy) 0%, var(--pc-cobalt) 100%);
  color: var(--pc-white);
  font-family: var(--pc-font-body);
  font-weight: 700;
  font-size: 0.86rem;
  box-shadow: 0 16px 36px rgba(11, 29, 58, 0.32);
  cursor: pointer;
}

.pc-assistant__panel {
  width: min(370px, calc(100vw - 32px));
  border-radius: 20px;
  background: var(--pc-white);
  border: 1px solid var(--pc-border);
  box-shadow: 0 24px 60px rgba(11, 29, 58, 0.24);
  overflow: hidden;
}

.pc-assistant__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--pc-navy);
  color: var(--pc-white);
}

.pc-assistant__head small {
  display: block;
  color: #93c5fd;
  font-size: 0.7rem;
}

.pc-assistant__messages {
  max-height: 250px;
  overflow-y: auto;
  padding: 16px;
  display: grid;
  gap: 10px;
  background: var(--pc-surface);
  font-size: 0.85rem;
}

.pc-msg {
  padding: 10px 13px;
  border-radius: 14px;
  background: var(--pc-white);
  border: 1px solid var(--pc-border);
  color: var(--pc-ink);
}

.pc-msg--user {
  justify-self: end;
  background: var(--pc-cobalt);
  color: var(--pc-white);
  border-color: transparent;
}

.pc-assistant__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
  background: var(--pc-white);
  border-top: 1px solid var(--pc-border);
}

.pc-assistant__chips button {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(21, 101, 232, 0.24);
  background: var(--pc-surface);
  color: var(--pc-cobalt);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.pc-assistant__form {
  display: flex;
  gap: 8px;
  padding: 10px 14px 14px;
  background: var(--pc-white);
}

.pc-assistant__form input {
  flex: 1;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--pc-border);
  font-size: 0.84rem;
}

.pc-assistant__form button {
  padding: 9px 15px;
  border-radius: 999px;
  border: 0;
  background: var(--pc-orange);
  color: var(--pc-white);
  font-weight: 700;
  cursor: pointer;
}

/* ==========================================================================
   RESPONSIVIDAD MOBILE-FIRST (RADAR COMPACTO + LISTA DE NODOS EN MÓVIL)
   ========================================================================== */
@media (max-width: 980px) {
  .pc-nav {
    display: none;
  }
  .pc-menu-toggle {
    display: inline-flex;
  }
  .pc-hero__grid,
  .pc-radar-inspector,
  .pc-calc-grid,
  .pc-booking-grid {
    grid-template-columns: 1fr;
  }
  .pc-metrics__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pc-tabpanel__inner {
    grid-template-columns: 1fr;
  }
  .pc-radar-pill {
    padding: 8px 13px;
    font-size: 0.74rem;
    max-width: 165px;
  }
}

@media (max-width: 820px) {
  .pc-radar-stage {
    padding-inline: 0;
  }
  /* En pantallas medianas/móviles colocamos las cápsulas debajo del radar para dejar 100% limpio el núcleo */
  .pc-radar-nodes {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
    pointer-events: auto;
  }
  .pc-radar-pill {
    position: static;
    translate: none;
    max-width: none;
    justify-content: flex-start;
    text-align: left;
  }
}

@media (max-width: 680px) {
  .pc-radar-nodes,
  .pc-form-grid,
  .pc-inspector__checks,
  .pc-calc-kpis,
  .pc-metrics__grid {
    grid-template-columns: 1fr;
  }
  .pc-header__actions .pc-btn--outline {
    display: none;
  }
}
