/* Centro de documentación — experiencia de entrada premium (hub inmersivo) */
.doc-page--hub-premium {
  overflow-x: hidden;
}

.doc-page--hub-premium .cd-wrap--hub {
  max-width: min(1220px, 100%);
  position: relative;
  padding-bottom: 3rem;
}

/* Capa ambiental */
.doc-hub-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.doc-hub-ambient canvas#doc-hub-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}
.doc-hub-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: docHubOrbFloat 18s ease-in-out infinite;
}
.doc-hub-orb--1 {
  width: min(520px, 90vw);
  height: min(520px, 90vw);
  background: radial-gradient(circle, rgba(34, 211, 238, 0.35), transparent 70%);
  top: -8%;
  right: -12%;
  animation-delay: 0s;
}
.doc-hub-orb--2 {
  width: min(420px, 80vw);
  height: min(420px, 80vw);
  background: radial-gradient(circle, rgba(96, 165, 250, 0.32), transparent 68%);
  bottom: 5%;
  left: -15%;
  animation-delay: -6s;
}
.doc-hub-orb--3 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.22), transparent 65%);
  top: 42%;
  left: 35%;
  animation-delay: -12s;
  opacity: 0.35;
}
@keyframes docHubOrbFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(2%, 3%) scale(1.04);
  }
  66% {
    transform: translate(-2%, 1%) scale(0.98);
  }
}

.doc-hub-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 75%);
  opacity: 0.6;
}

.doc-hub-stage {
  position: relative;
  z-index: 2;
  min-height: 72vh;
  padding: 0.5rem 0 2rem;
}

/* Paneles de paso */
.doc-hub-panel {
  animation: docHubPanelIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.doc-hub-panel[hidden] {
  display: none !important;
}
@keyframes docHubPanelIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.doc-hub-intro-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(167, 243, 252, 0.95);
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.28);
  margin-bottom: 1rem;
}

.doc-hub-question {
  margin: 0 0 0.65rem;
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  background: linear-gradient(120deg, #f8fafc 0%, #a5f3fc 45%, #93c5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 4px 24px rgba(34, 211, 238, 0.15));
}

.doc-hub-lead {
  margin: 0 0 2rem;
  max-width: 36rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(203, 213, 225, 0.9);
}

/* Mega tarjetas */
.doc-hub-mega-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 900px) {
  .doc-hub-mega-row {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

a.doc-hub-mega {
  text-decoration: none;
}
.doc-hub-mega {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding: 1.5rem 1.35rem 1.6rem;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.3s ease,
    box-shadow 0.35s ease;
  overflow: hidden;
}
@media (min-width: 700px) {
  .doc-hub-mega {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    padding: 1.75rem 1.6rem;
  }
}

.doc-hub-mega::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.4), rgba(96, 165, 250, 0.15), transparent 55%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.65;
  pointer-events: none;
}

.doc-hub-mega:hover,
.doc-hub-mega:focus-visible {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(34, 211, 238, 0.12);
  outline: none;
}

.doc-hub-mega--web:hover,
.doc-hub-mega--web:focus-visible {
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.42), 0 0 40px rgba(96, 165, 250, 0.12);
}

.doc-hub-mega__icon {
  font-size: 2.25rem;
  line-height: 1;
  margin-bottom: 0.35rem;
}
.doc-hub-mega__title {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f8fafc;
}
.doc-hub-mega__desc {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(203, 213, 225, 0.88);
}
.doc-hub-mega__benefits {
  margin: 0;
  padding: 0 0 0 1.1rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(148, 163, 184, 0.95);
}
.doc-hub-mega__benefits li {
  margin-bottom: 0.35rem;
}
.doc-hub-mega__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #22d3ee;
}
.doc-hub-mega__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.doc-hub-mega__stat {
  padding: 0.35rem 0.65rem;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(226, 232, 240, 0.9);
}

/* Mini mockups */
.doc-hub-mock {
  position: relative;
  border-radius: 18px;
  padding: 10px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.doc-hub-mock::after {
  content: '';
  position: absolute;
  inset: -35%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.10), transparent 55%);
  pointer-events: none;
  opacity: 0.55;
  transform: translate(15%, -8%);
}
.doc-hub-mock--phone {
  max-width: 200px;
  margin: 0 auto;
}
.doc-hub-phone {
  position: relative;
  border-radius: 16px;
  background:
    radial-gradient(ellipse 120% 90% at 50% 0%, rgba(34, 211, 238, 0.16), transparent 55%),
    radial-gradient(ellipse 80% 70% at 100% 30%, rgba(96, 165, 250, 0.12), transparent 55%),
    #0b1220;
  min-height: 160px;
  padding: 10px 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.doc-hub-phone::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.035) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.55;
  mask-image: radial-gradient(ellipse 70% 80% at 50% 30%, #000 35%, transparent 78%);
  pointer-events: none;
}
.doc-hub-phone__notch {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 64px;
  height: 14px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: rgba(2, 6, 23, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.doc-hub-phone__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 4px 6px;
  margin-top: 10px;
  position: relative;
  z-index: 1;
}
.doc-hub-phone__sig,
.doc-hub-phone__time,
.doc-hub-phone__bat {
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
}
.doc-hub-phone__sig { width: 26px; }
.doc-hub-phone__time { width: 36px; background: rgba(34, 211, 238, 0.22); }
.doc-hub-phone__bat { width: 18px; }
.doc-hub-phone__hero {
  position: relative;
  z-index: 1;
  margin-top: 4px;
  padding: 8px 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.doc-hub-phone__pill {
  display: block;
  width: 54px;
  height: 10px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.18);
  border: 1px solid rgba(34, 211, 238, 0.18);
}
.doc-hub-phone__title {
  display: block;
  margin-top: 10px;
  width: 80%;
  height: 10px;
  border-radius: 6px;
  background: rgba(248, 250, 252, 0.12);
}
.doc-hub-phone__sub {
  display: block;
  margin-top: 7px;
  width: 62%;
  height: 8px;
  border-radius: 6px;
  background: rgba(96, 165, 250, 0.12);
}
.doc-hub-phone__cards {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.doc-hub-phone__card {
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(15, 23, 42, 0.35));
  border: 1px solid rgba(34, 211, 238, 0.12);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25);
}
.doc-hub-phone__card--alt {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.14), rgba(15, 23, 42, 0.35));
  border-color: rgba(96, 165, 250, 0.12);
}
.doc-hub-phone__nav {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.doc-hub-phone__nav span {
  width: 16px;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}
.doc-hub-phone__nav span.is-active {
  background: rgba(34, 211, 238, 0.35);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.doc-hub-mock--browser {
  max-width: 100%;
}
.doc-hub-mock--browser .doc-hub-mock__chrome {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px 10px 0 0;
}
.doc-hub-mock--browser .doc-hub-mock__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}
.doc-hub-browser__url {
  margin-left: 8px;
  flex: 1;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.doc-hub-browser {
  border-radius: 0 0 12px 12px;
  background: #0b1220;
  min-height: 140px;
  padding: 10px;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top: none;
}
.doc-hub-browser__sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 4px;
}
.doc-hub-browser__nav {
  height: 10px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.10);
}
.doc-hub-browser__nav.is-active {
  background: rgba(34, 211, 238, 0.22);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.10);
}
.doc-hub-browser__main {
  display: grid;
  grid-template-rows: 26px auto 42px auto;
  gap: 8px;
}
.doc-hub-browser__toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.doc-hub-browser__toolbar span {
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
}
.doc-hub-browser__toolbar span:nth-child(1) { width: 34px; background: rgba(34, 211, 238, 0.22); }
.doc-hub-browser__toolbar span:nth-child(2) { width: 46px; }
.doc-hub-browser__toolbar span:nth-child(3) { width: 26px; }
.doc-hub-browser__kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.doc-hub-browser__kpi {
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(15, 23, 42, 0.4));
  border: 1px solid rgba(34, 211, 238, 0.10);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.24);
}
.doc-hub-browser__kpi--alt {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.14), rgba(15, 23, 42, 0.4));
  border-color: rgba(96, 165, 250, 0.10);
}
.doc-hub-browser__chart {
  position: relative;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(148, 163, 184, 0.22);
  overflow: hidden;
}
.doc-hub-browser__chart::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.45;
}
.doc-hub-browser__line {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 62%, rgba(34, 211, 238, 0.65) 0 2px, transparent 3px),
    radial-gradient(circle at 48% 40%, rgba(96, 165, 250, 0.65) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 54%, rgba(34, 211, 238, 0.65) 0 2px, transparent 3px),
    conic-gradient(from 180deg at 50% 50%, rgba(34, 211, 238, 0.0), rgba(34, 211, 238, 0.0));
  mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
  opacity: 0.85;
}
.doc-hub-browser__table {
  display: grid;
  gap: 6px;
  padding: 2px;
}
.doc-hub-browser__row {
  height: 10px;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.08);
}
.doc-hub-browser__row:nth-child(2) {
  width: 86%;
  background: rgba(96, 165, 250, 0.10);
}
.doc-hub-browser__row:nth-child(3) {
  width: 72%;
  background: rgba(34, 211, 238, 0.10);
}

.doc-hub-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.doc-hub-btn-text {
  background: none;
  border: none;
  color: rgba(148, 163, 184, 0.95);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0.25rem 0;
}
.doc-hub-btn-text:hover {
  color: #22d3ee;
}

/* Segundo nivel — topic cards */
.doc-hub-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
  padding: 0.45rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.doc-hub-back:hover {
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.08);
}

.doc-hub-subtitle {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f8fafc;
}
.doc-hub-sublead {
  margin: 0 0 1.5rem;
  max-width: 40rem;
  color: rgba(203, 213, 225, 0.88);
  font-size: 0.95rem;
  line-height: 1.55;
}

.doc-hub-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.doc-hub-topic {
  position: relative;
  display: block;
  padding: 1.15rem 1.2rem 1.2rem;
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  transition: transform 0.28s ease, border-color 0.28s, box-shadow 0.28s;
  overflow: hidden;
}
.doc-hub-topic:hover,
.doc-hub-topic:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.3);
  outline: none;
}
.doc-hub-topic__emoji {
  font-size: 1.65rem;
  line-height: 1;
  margin-bottom: 0.45rem;
}
.doc-hub-topic__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 800;
  color: #f8fafc;
}
.doc-hub-topic__hint {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(148, 163, 184, 0.95);
}
.doc-hub-topic__arrow {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  font-size: 1rem;
  color: rgba(34, 211, 238, 0.7);
  transition: transform 0.25s ease;
}
.doc-hub-topic:hover .doc-hub-topic__arrow {
  transform: translate(3px, -2px);
}

/* Catálogo clásico */
.doc-hub-catalog {
  position: relative;
  z-index: 2;
  margin-top: 2.5rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(12px);
  overflow: hidden;
}
.doc-hub-catalog summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 1.25rem;
  font-weight: 800;
  font-size: 0.95rem;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  user-select: none;
}
.doc-hub-catalog summary::-webkit-details-marker {
  display: none;
}
.doc-hub-catalog summary::after {
  content: '▼';
  font-size: 0.65rem;
  opacity: 0.6;
  transition: transform 0.25s ease;
}
.doc-hub-catalog[open] summary::after {
  transform: rotate(-180deg);
}
.doc-hub-catalog__inner {
  padding: 0 1.25rem 1.5rem;
}
.doc-hub-catalog .cd-section-title {
  margin-top: 0;
}

@media (prefers-reduced-motion: reduce) {
  .doc-hub-panel,
  .doc-hub-orb,
  .doc-hub-mega,
  .doc-hub-topic {
    animation: none !important;
    transition: none !important;
  }
  .doc-hub-mega:hover,
  .doc-hub-topic:hover {
    transform: none;
  }
}
