/* ==========================================================================
   /sectores — Hero + Explorador de sectores
   Usa del sitio: .container, .section, .eyebrow, .gradient, .lead, h1/h2 (Poppins),
   .security-hero / .interior-hero-line (interior-hero-motion.css), [data-reveal].
   Los colores de marca viven en la interfaz; las fotografías se muestran sin filtros de color.
   ========================================================================== */
.sectors-page { --sx-blue: #0095e5; --sx-cyan: #00b0d1; --sx-ease: cubic-bezier(.22,.61,.36,1); }
.sectors-page main { overflow: clip; }                       /* overflow:hidden del sitio rompe position: sticky */
.sectors-page .eyebrow { color: #fff; }
.sectors-page .gradient { background-image: linear-gradient(90deg, #0688ff, #da1fff); }

/* Espacio fotográfico pendiente: neutro y claramente identificable (no simula una foto) */
.sx-pending {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  background: repeating-linear-gradient(135deg, #0a0e18 0 14px, #0c111c 14px 28px);
  color: #55627a; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; line-height: 1.7;
}
.sx-pending b { display: block; color: #8091a8; font-weight: 500; letter-spacing: .18em; }

/* ======================= HERO ======================= */
/* Fotografía integrada a todo el ancho (mismo .security-hero-photo de Soluciones).
   El oscurecimiento solo cubre la zona del texto para que los entornos se lean a la derecha. */
.sx-hero .security-hero-copy { width: 50%; position: relative; z-index: 2; }
.sx-hero .lead { max-width: 500px; color: #d5deeb; }
.sectors-page .sx-hero .security-hero-photo { object-position: center 62%; }
.sectors-page .sx-hero::after {
  background:
    linear-gradient(90deg, #00010ef2 0%, #00010ed9 26%, #00010e80 44%, #00010e1a 62%, transparent 78%),
    linear-gradient(180deg, #00010e99 0%, transparent 22%);
}

/* ======================= EXPLORADOR ======================= */
.sx-explorer { position: relative; }
.sx-explorer-head { max-width: 760px; }
.sx-explorer-head .lead { margin-top: 22px; max-width: 640px; font-size: .98rem; line-height: 1.85; color: #aebed3; }
.sx-layout { display: grid; grid-template-columns: minmax(0, 34fr) minmax(0, 66fr); gap: 56px; margin-top: 56px; align-items: start; }

/* Índice editorial */
.sx-index { list-style: none; margin: 0; padding: 0; border-top: 1px solid #ffffff12; position: sticky; top: calc(var(--header-height, 80px) + 32px); }
.sx-tab {
  position: relative; width: 100%; display: grid; grid-template-columns: 44px 1fr auto; align-items: baseline; gap: 10px;
  padding: 20px 0 20px 18px; border: 0; border-bottom: 1px solid #ffffff12; background: none; color: #7f91a9;
  font: inherit; text-align: left; cursor: pointer; transition: color .35s ease;
}
.sx-tab::before {                                        /* indicador: barra que crece en el activo */
  content: ""; position: absolute; left: 0; top: 50%; width: 2px; height: 0; translate: 0 -50%;
  background: linear-gradient(180deg, #0688ff, #00b0d1); border-radius: 2px; transition: height .45s var(--sx-ease);
}
.sx-tab-num { font-size: .78rem; letter-spacing: .08em; color: #3f5a78; transition: color .35s ease; }
.sx-tab-name { font-size: 1.35rem; letter-spacing: -.02em; line-height: 1.2; transition: transform .45s var(--sx-ease); }
.sx-tab-arrow { font-size: .9rem; opacity: 0; transform: translateX(-6px); transition: opacity .35s ease, transform .35s ease; color: var(--sx-cyan); }
.sx-tab:hover, .sx-tab.is-preview { color: #c3cfdd; }
.sx-tab:hover .sx-tab-num { color: #5f87b0; }
.sx-tab[aria-selected="true"] { color: #fff; }
.sx-tab[aria-selected="true"]::before { height: 56%; }
.sx-tab[aria-selected="true"] .sx-tab-num { color: var(--sx-blue); }
.sx-tab[aria-selected="true"] .sx-tab-name { transform: translateX(6px); font-weight: 500; }
.sx-tab[aria-selected="true"] .sx-tab-arrow { opacity: 1; transform: none; }
.sx-tab:focus-visible { outline: 1px solid var(--sx-cyan); outline-offset: -1px; }

/* Escenario: UN panel — la fotografía ocupa la parte superior y se funde hacia el fondo;
   el contenido se apoya sobre su parte baja (como el mockup) */
.sx-stage {
  position: relative; min-width: 0; overflow: hidden; isolation: isolate;
  border: 1px solid #ffffff12; border-radius: 20px; background: #050a18;
}
.sx-photo { position: absolute; z-index: -1; top: 0; left: 0; right: 0; margin: 0; aspect-ratio: 16 / 9; overflow: hidden; background: #070b14; }
.sx-photo-layer { position: absolute; inset: 0; opacity: 0; transform: scale(1.02); transition: opacity .7s ease, transform .9s var(--sx-ease); }
.sx-photo-layer.is-on { opacity: 1; transform: scale(1); }
.sx-photo-layer img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sx-photo::after {                                       /* fundido de la foto hacia el panel (legibilidad del texto) */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(0deg, #050a18 0%, #050a18e6 18%, #050a1899 42%, #050a1826 68%, transparent 85%),
    linear-gradient(90deg, #050a18b3 0%, transparent 55%);
}
.sx-content { padding: clamp(150px, 19vw, 270px) 40px 36px; }
.sx-photo-caption { display: flex; align-items: baseline; gap: 18px; }
.sx-photo-num { font-size: .95rem; letter-spacing: .06em; color: #c3cfdd; }
.sx-photo-name { margin: 0; font-size: clamp(2.2rem, 3.6vw, 3.1rem); font-weight: 400; letter-spacing: -.03em; line-height: 1.05; color: #fff; }

.sx-info { margin-top: 16px; }
.sx-desc { margin: 0; max-width: 620px; font-size: .92rem; line-height: 1.75; color: #d3deec; text-shadow: 0 1px 12px #050a18; }
.sx-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 34px; }
.sx-label { margin: 0 0 16px; font-size: .66rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: #c3cfdd; }

/* Necesidades: icono en círculo + texto */
.sx-challenges { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sx-challenges li { display: flex; align-items: center; gap: 14px; font-size: .86rem; line-height: 1.4; color: #d3deec; }
.sx-ico {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid #0095e566; background: #0095e512;
}
.sx-ico svg { width: 16px; height: 16px; fill: none; stroke: #4fb6f0; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Soluciones: filas con icono, nombre y flecha */
.sx-caps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sx-caps a {
  display: flex; align-items: center; gap: 12px; padding: 9px 14px 9px 10px;
  border: 1px solid #ffffff12; border-radius: 10px; background: #ffffff05;
  font-size: .8rem; color: #d3deec; text-decoration: none;
  transition: border-color .3s, background .3s, color .3s;
}
/* Icono de cada solución: mismo icono y color que en la sección Soluciones del Home */
.sx-caps li { --cap: #0095e5; }
.sx-caps li.sx-cap--continuidad     { --cap: #0095e5; }
.sx-caps li.sx-cap--seguridad       { --cap: #00b0d1; }
.sx-caps li.sx-cap--colaboracion    { --cap: #cd0298; }
.sx-caps li.sx-cap--infraestructura { --cap: #ff8327; }
.sx-caps .sx-cap-ico {
  flex: none; width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center;
  border: 1px solid color-mix(in srgb, var(--cap) 45%, transparent); background: color-mix(in srgb, var(--cap) 10%, transparent);
}
.sx-caps .sx-cap-ico img { width: 16px; height: 16px; object-fit: contain; display: block; }
.sx-caps li.sx-cap--infraestructura .sx-cap-ico img {          /* el Home tiñe este icono a naranja con el mismo filtro */
  filter: brightness(0) saturate(100%) invert(61%) sepia(99%) saturate(1859%) hue-rotate(338deg) brightness(103%) contrast(101%);
}
.sx-caps li.sx-cap--transformacion { --grad: linear-gradient(100deg, #0095e5 5%, #5371ff 48%, #b83cd6); }   /* degradado del banner del Home */
.sx-caps li.sx-cap--transformacion .sx-cap-ico {              /* borde y fondo con el degradado */
  border: 1px solid transparent;
  background:
    linear-gradient(100deg, #0095e51f 5%, #5371ff1f 48%, #b83cd61f) padding-box,
    linear-gradient(#0b0f22, #0b0f22) padding-box,
    var(--grad) border-box;
}
.sx-cap-grad {                                                  /* icono pintado con el mismo degradado */
  width: 16px; height: 16px; display: block; background: var(--grad);
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
.sx-caps a[href]:hover, .sx-caps a[href]:focus-visible { border-color: color-mix(in srgb, var(--cap) 50%, transparent); }
.sx-caps .sx-cap-name { flex: 1; }
.sx-caps .sx-cap-arrow { color: #8193ab; transition: transform .3s, color .3s; }
.sx-caps a[href]:hover, .sx-caps a[href]:focus-visible { border-color: #0095e566; background: #0095e50f; color: #fff; }
.sx-caps a[href]:hover .sx-cap-arrow, .sx-caps a[href]:focus-visible .sx-cap-arrow { transform: translateX(3px); color: var(--sx-cyan); }
.sx-caps a:not([href]) { cursor: default; }

/* Placeholders de contenido: visibles y claramente identificados */
.sx-ph { display: inline-block; padding: 2px 8px; border: 1px dashed #3a4a62; border-radius: 6px; font-size: .78rem; color: #6f7f97; }
.sx-desc .sx-ph { font-size: .86rem; line-height: 1.7; padding: 8px 12px; }
.sx-challenges li.is-ph::before { border-style: dashed; border-color: #3a4a62; }
.sx-challenges li.is-ph { color: #6f7f97; }
.sx-caps li.is-ph span { display: inline-block; padding: 7px 14px; border: 1px dashed #3a4a62; border-radius: 999px; font-size: .74rem; color: #6f7f97; }

/* Cambio de sector: el texto acompaña al crossfade */
.sx-info > *, .sx-photo-caption { transition: opacity .35s ease, translate .45s var(--sx-ease); }
.sx-stage.is-switching .sx-info > *, .sx-stage.is-switching .sx-photo-caption { opacity: 0; translate: 0 6px; }

/* ======================= Tablet ======================= */
@media (max-width: 1100px) {
  .sx-hero .security-hero-copy { width: 60%; }
  .sx-layout { gap: 36px; }
  .sx-tab-name { font-size: 1.15rem; }
  .sx-cols { grid-template-columns: 1fr; gap: 26px; }
}

/* ======================= Móvil: selector horizontal ======================= */
@media (max-width: 860px) {
  .sx-hero .security-hero-copy { width: 100%; }
  .sectors-page .sx-hero .security-hero-photo { object-position: 58% center; opacity: .7; }
  .sectors-page .sx-hero::after { background: linear-gradient(90deg, #00010ee6, #00010e99 70%, #00010e66); }
  .sx-layout { grid-template-columns: 1fr; gap: 22px; margin-top: 34px; }
  .sx-index { position: relative; top: auto; display: flex; gap: 6px; overflow-x: auto; border-top: 0; margin: 0 -48px; padding: 0 48px 4px; scroll-padding-inline: 48px; scrollbar-width: none; scroll-snap-type: x proximity; }
  .sx-index::-webkit-scrollbar { display: none; }
  .sx-index li { flex: none; scroll-snap-align: start; }
  .sx-tab { grid-template-columns: auto auto; gap: 8px; padding: 10px 14px; border: 1px solid #ffffff14; border-radius: 999px; }
  .sx-tab::before { display: none; }
  .sx-tab-arrow { display: none; }
  .sx-tab-name { font-size: .92rem; }
  .sx-tab[aria-selected="true"] { border-color: var(--sx-blue); background: #0095e514; }
  .sx-tab[aria-selected="true"] .sx-tab-name { transform: none; }
  .sx-stage { border-radius: 16px; }
  .sx-photo { aspect-ratio: 4 / 3; }
  .sx-content { padding: 52vw 24px 26px; }
  .sx-cols { grid-template-columns: 1fr; gap: 28px; margin-top: 28px; }
}
@media (max-width: 700px) {                                  /* gutter móvil del sitio */
  .sx-index { margin: 0 -20px; padding: 0 20px 4px; scroll-padding-inline: 20px; }
  .sx-content { padding: 58vw 20px 24px; }
  .sx-photo-caption { gap: 12px; }
  .sx-photo-name { font-size: 2rem; }
  .sx-desc { font-size: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .sx-photo-layer, .sx-info > *, .sx-photo-caption, .sx-tab, .sx-tab::before, .sx-tab-name, .sx-tab-arrow { transition: none; }
  .sx-photo-layer { transform: none; }
}
