.programa-body {
  background: var(--nexo-bg);
  color: var(--nexo-dark);
  padding-block: clamp(var(--space-16), 9vh, var(--space-32));
}

.programa-body__inner {
  display: grid;
  grid-template-columns: minmax(170px, 230px) 1fr;
  gap: clamp(var(--space-12), 7vw, var(--space-32));
  align-items: start;
}

.programa-nav {
  position: sticky;
  top: clamp(var(--space-6), 6vh, var(--space-12));
}

.programa-nav__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.programa-nav__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  color: var(--nexo-dark);
  opacity: 0.45;
  transition: opacity var(--duration-fast) ease;
}

.programa-nav__link:hover,
.programa-nav__link.is-active {
  opacity: 1;
}

.programa-nav__bullet {
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  display: inline-flex;
}

.programa-nav__bullet svg {
  width: 100%;
  height: 100%;

  opacity: 0;
  transition: opacity var(--duration-fast) ease;
}

.programa-nav__link.is-active .programa-nav__bullet svg {
  opacity: 1;
}

.programa-body__content {
  min-width: 0;
}

.programa-section {
  scroll-margin-top: var(--space-12);
}

.programa-section + .programa-section {
  margin-block-start: clamp(var(--space-8), 6vh, var(--space-12));
}

.programa-section__title {
  font-family: var(--font-heading);
  font-size: var(--fs-4xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  margin-block-end: var(--space-8);
}

.programa-section__title + .programa-prose + .programa-section__title {
  margin-block-start: clamp(var(--space-12), 7vh, var(--space-16));
}

.programa-section__subtitle {
  font-family: var(--font-heading);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  margin-block: clamp(var(--space-12), 6vh, var(--space-16)) var(--space-6);
}

.programa-prose {
  max-width: 78ch;
}

.programa-prose p {
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  letter-spacing: 0;
  margin-block-end: var(--space-6);
}

.programa-prose p:last-child {
  margin-block-end: 0;
}

.programa-prose--lead {
  margin-block: clamp(var(--space-8), 5vh, var(--space-12)) var(--space-8);
}

.programa-sobre__gallery {
  --gallery-gap:  clamp(var(--space-4), 2vw, var(--space-8));
  --gallery-peek: clamp(2rem, 7vw, 4.5rem);

  margin-block-start:         clamp(var(--space-8), 5vh, var(--space-12));
  display:                    flex;
  gap:                        var(--gallery-gap);
  overflow-x:                 auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior:            auto;
  cursor:                     grab;
  scrollbar-width:            none;
}

.programa-sobre__gallery::-webkit-scrollbar { display: none; }

.programa-sobre__gallery.is-dragging {
  cursor:      grabbing;
  user-select: none;
}

.programa-sobre__gallery img {
  -webkit-user-drag: none;
  user-select:       none;
}

.programa-sobre__figure {
  margin:       0;
  overflow:     hidden;
  aspect-ratio: 16 / 10;
  /* Dos por vista llenando el ancho exacto. */
  flex:         0 0 calc((100% - var(--gallery-gap)) / 2);
}

/* Con 3 o más: deja a la vista un trozo de la siguiente (affordance). */
.programa-sobre__gallery:has(> :nth-child(3)) .programa-sobre__figure {
  flex-basis: calc((100% - 2 * var(--gallery-gap) - var(--gallery-peek)) / 2);
}

.programa-sobre__figure img {
  width:      100%;
  height:     100%;
  object-fit: cover;
  display:    block;
  transition: transform var(--duration-base) var(--ease-out-expo);
}

.programa-sobre__figure:hover img {
  transform: scale(1.05);
}

/* Durante el arrastre no animamos el hover (igual que .cards-carousel). */
.programa-sobre__gallery.is-dragging .programa-sobre__figure img {
  transform: none;
}

.programa-list {
  display: flex;
  flex-direction: column;
  gap: clamp(var(--space-5), 3vh, var(--space-8));
  max-width: 80ch;
}

.programa-list__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-5);
  align-items: start;
}

.programa-list__bullet {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  margin-block-start: 0.15rem;
}

.programa-list__bullet svg {
  width: 100%;
  height: 100%;
}

.programa-list__text {
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
}

@media (prefers-reduced-motion: reduce) {
  .programa-sobre__figure img { transition: none; }
  .programa-sobre__figure:hover img { transform: none; }
}

@media (max-width: 768px) {
  .programa-body__inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .programa-nav {
    display: none;
  }
}

@media (max-width: 640px) {
  /* Móvil: una imagen por vista con un asomo de la siguiente (swipe). */
  .programa-sobre__figure,
  .programa-sobre__gallery:has(> :nth-child(3)) .programa-sobre__figure {
    flex-basis: 84%;
  }
}

/* Desktop: el lateral de los carruseles solo lo mueve el scrolljack. */
@media (min-width: 901px) and (hover: hover) and (pointer: fine) {
  .programa-body .cards-carousel {
    overflow-x: hidden;
    cursor:     default;
  }
}
