/* ============================================
   ÍCARO RB — COBERTURAS
   ============================================ */

.cb-hero {
  position: relative;
  width: 100%;
  min-height: calc(100vh - var(--header-height));
  padding: calc(var(--header-height) + 4vw) 0 3vw;
  /* Dos capas. La de arriba es un fundido VERTICAL al color del pie (#04081A):
     sin ella, el degradado diagonal terminaba en #3865A8 y chocaba de golpe
     contra el pie casi negro, dejando una línea recta muy visible.
     Va como fondo, no como pseudo-elemento, para que pinte SIEMPRE detrás del
     contenido — un ::after posicionado se dibujaría encima de la barra de
     iconos y la oscurecería. */
  background:
    linear-gradient(180deg, rgba(4, 8, 26, 0) 74%, rgba(4, 8, 26, .45) 90%, #04081A 100%),
    linear-gradient(155deg, #001A3D 0%, #0E3564 35%, #1B4C86 70%, #3865A8 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cb-hero__title {
  text-align: center;
  padding: 0 var(--container-pad);
  margin-bottom: clamp(30px, 4vw, 64px);
}
.cb-hero__title .line {
  display: block;
  font-size: clamp(38px, 4.4vw, 70px);
  font-weight: var(--fw-bold);
  line-height: 1.2;
  color: var(--color-white);
}
.cb-hero__title .line--accent { color: var(--color-orange); }

/* ---------- Stage: 13 panels stacked in the same grid cell ---------- */
.cb-stage {
  display: grid;
  max-width: var(--container-max);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--container-pad);
  flex: 1;
}
.cb-panel {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(24px, 8vw, 118px);
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  /* 220 ms, no 600: cambiar de cobertura es una pestaña, y el presupuesto de
     una pestaña es 150-250 ms. A 600 ms se sentía pesada al recorrer varias. */
  transition: opacity .22s var(--ease-out-strong), transform .22s var(--ease-out-strong);
}
.cb-panel.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* El contenido entra en cascada detrás del panel: lo que cambió son las
   viñetas, y así se distinguen en vez de cruzar como un bloque plano.
   --i lo numera coberturas.js; el retardo vive solo en el estado activo,
   para que salir sea inmediato. */
.cb-panel .cb-eyebrow,
.cb-panel .cb-panel__title,
.cb-panel .cb-panel__intro,
.cb-panel .cb-panel__group-title,
.cb-panel .cb-panel__list li,
.cb-panel .cb-panel__visual {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  transition:
    opacity .3s var(--ease-out-strong),
    transform .34s var(--ease-out-strong);
}
.cb-panel.is-active .cb-eyebrow,
.cb-panel.is-active .cb-panel__title,
.cb-panel.is-active .cb-panel__intro,
.cb-panel.is-active .cb-panel__group-title,
.cb-panel.is-active .cb-panel__list li,
.cb-panel.is-active .cb-panel__visual {
  opacity: 1;
  transform: none;
  transition-delay: calc(.12s + var(--i, 0) * 45ms);
}
.cb-panel--reverse { flex-direction: row-reverse; }

.cb-panel__text { flex: 1 1 50%; min-width: 0; }

.cb-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(15px, 1.6vw, 25px);
  font-weight: var(--fw-semibold);
  letter-spacing: .12em;
  color: var(--color-white);
  margin-bottom: 18px;
}
.cb-eyebrow__dot { width: 16px; height: 16px; }
.cb-eyebrow__line { width: 36px; height: auto; }

.cb-panel__title {
  font-size: clamp(38px, 4.4vw, 70px);
  font-weight: var(--fw-bold);
  color: var(--color-orange);
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.cb-panel__intro {
  font-size: clamp(16px, 1.6vw, 25px);
  line-height: 1.3;
  color: var(--color-white);
  margin-bottom: 22px;
}

.cb-panel__list { list-style: none; margin: 0 0 6px; padding: 0; }
.cb-panel__list li {
  position: relative;
  padding-left: 30px;
  font-size: clamp(16px, 1.6vw, 25px);
  line-height: 1.3;
  color: rgba(255, 255, 255, .92);
  margin-bottom: 4px;
}
.cb-panel__list li::before {
  content: "•";
  position: absolute;
  left: 6px;
  top: 0;
  color: var(--color-white);
}

.cb-panel__group { margin-bottom: 18px; }
.cb-panel__group:last-child { margin-bottom: 6px; }
.cb-panel__group-title {
  font-size: clamp(18px, 1.8vw, 28px);
  font-weight: var(--fw-bold);
  letter-spacing: .04em;
  color: var(--color-orange);
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* ---------- Orbit visual ---------- */
.cb-panel__visual {
  flex: 1 1 41%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.cb-orbit {
  position: relative;
  width: clamp(260px, 36vw, 540px);
  aspect-ratio: 1 / 1;
}
.cb-orbit__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.cb-orbit__spin {
  position: absolute;
  inset: 0;
  animation: cb-spin 14s linear infinite;
}
.cb-orbit__dot {
  position: absolute;
  top: -2%;
  left: 50%;
  width: clamp(14px, 2vw, 22px);
  height: clamp(14px, 2vw, 22px);
  margin-left: calc(clamp(14px, 2vw, 22px) / -2);
  border-radius: 50%;
  background: var(--color-orange);
  box-shadow: 0 0 16px 3px rgba(251, 179, 74, .55);
}
@keyframes cb-spin {
  from { transform: rotate(-56deg); }
  to   { transform: rotate(304deg); }
}
@media (prefers-reduced-motion: reduce) {
  .cb-orbit__spin { animation: none; transform: rotate(-56deg); }
}
.cb-orbit__img {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  /* width/height (not auto) + object-fit:contain is required so small source
     images actually scale UP to fill this box — auto sizing would cap them
     at their native pixel dimensions instead. All 13 categories share this
     same box so no illustration reads bigger/smaller than another; contain
     preserves each image's native aspect ratio so nothing stretches or
     spills outside the ring. */
  width: 74%;
  height: 74%;
  object-fit: contain;
}
/* Agropecuario y Diversos son las dos únicas fotos a sangre: llenan su caja
   entera, mientras que las demás ilustraciones traen fondo transparente y solo
   ocupan el centro. A 74% sus esquinas asomaban 12px fuera del anillo y además
   se leían mucho más grandes que el resto. Un cuadrado solo cabe en un círculo
   si mide el 70.7% de su diámetro; 62% las deja holgadas dentro y equilibra su
   peso visual con el de las otras once. */
#agricultura .cb-orbit__img,
#diversos .cb-orbit__img {
  width: 62%;
  height: 62%;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .35));
}

/* ---------- Bottom navbar ---------- */
.cb-navbar {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: var(--container-max);
  width: calc(100% - var(--container-pad) * 2);
  margin: clamp(28px, 4vw, 56px) auto 0;
  padding: 18px;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  scrollbar-width: none;
}
.cb-navbar::-webkit-scrollbar { display: none; }

.cb-navbar__item {
  flex: 0 0 auto;
  width: clamp(56px, 6vw, 84px);
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  background: rgba(120, 130, 150, .35);
  padding: 8px;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-soft), border-color var(--dur-fast), background var(--dur-fast), box-shadow var(--dur-fast);
}
/* El <picture> del WebP es un contenedor en línea sin tamaño propio: sin esto,
   el `height: 100%` del <img> no tendría contra qué resolverse. */
.cb-navbar__item picture { display: block; width: 100%; height: 100%; }
.cb-navbar__item img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
@media (hover: hover) and (pointer: fine) {
  .cb-navbar__item:hover { transform: translateY(-3px); background: rgba(120, 130, 150, .55); }
}
.cb-navbar__item:active { transform: scale(.96); }
.cb-navbar__item.is-active {
  border-color: var(--color-orange);
  background: rgba(251, 179, 74, .18);
  box-shadow: 0 6px 20px rgba(251, 179, 74, .3);
  transform: translateY(-4px) scale(1.06);
}

/* Idem nosotros.css: <h1> semántico sin estilos por defecto del elemento. */
h1.cb-hero__title { margin: 0; font-size: inherit; font-weight: inherit; }


/* ============================================
   RESPONSIVE — vive aquí, no en responsive.css
   Esa hoja se carga antes que esta y sus reglas perderían por orden de fuente.
   ============================================ */
@media (max-width: 1080px) {
  .cb-panel, .cb-panel--reverse {
    flex-direction: column-reverse;
    text-align: center;
    gap: 32px;
  }
  .cb-panel__text { max-width: 520px; margin: 0 auto; }
  .cb-panel__list li { text-align: left; }
  .cb-panel__intro { margin-left: auto; margin-right: auto; }
  .cb-eyebrow { justify-content: center; }

  .cb-orbit { width: clamp(220px, 46vw, 340px); }
}

@media (max-width: 860px) {
  .cb-hero { padding-top: calc(var(--header-height) + 10vw); }
  .cb-hero__title .line { font-size: clamp(22px, 6vw, 34px); }

  .cb-navbar { gap: 10px; padding: 10px; }
  .cb-navbar__item { width: clamp(48px, 13vw, 64px); }
}

@media (max-width: 520px) {
  .cb-panel__title { font-size: clamp(26px, 7vw, 34px); }
  .cb-panel__intro { font-size: 17px; }
  .cb-panel__list li { font-size: 16px; }
  .cb-orbit { width: 62vw; max-width: 260px; }
}
