.hero {
  width: 100%;
  padding: 64px 0;
  background-color: var(--color-primary-surface);
  box-sizing: border-box;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 32px;
  box-sizing: border-box;
}

/* .hero-title size/weight/color/margin come from shared `.hero-title`. */

.hero-subtitle {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-h3);
  line-height: var(--lh-heading);
  color: var(--color-primary);
  margin: 0;
}

p.hero-text {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--color-text);
  margin: 0;
  max-width: 70ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}

.hero-btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
  border-radius: 50px;
  padding: 14px 30px;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.hero-btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  border: 2px solid var(--color-primary);
}

.hero-btn-primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: var(--color-white);
}

/* Section title shared by Información / Estadísticas / Mostrar los talleres / A quién va dirigido */
.talleres-section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-h2);
  line-height: var(--lh-heading);
  color: var(--color-ink);
  margin: 0 0 32px;
}

.featured-quote {
  width: 100%;
  background-color: var(--color-surface);
  padding: 56px 32px;
  box-sizing: border-box;
}

p.featured-quote-text {
  max-width: 900px;
  margin: 0 auto;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: var(--fs-h2);
  line-height: 1.3;
  color: var(--color-primary);
  text-align: center;
}

p.featured-quote-text::before {
  content: "\201C";
}

p.featured-quote-text::after {
  content: "\201D";
}

/* Instituciones a las que llegamos (dentro del hero) */
.talleres-institutions-inline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.talleres-institutions-caption {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--color-primary-dark);
}

.talleres-institutions-caption-break {
  display: none;
}

@media (min-width: 992px) {
  .talleres-institutions-caption {
    font-size: 20px;
  }
}

.talleres-institutions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
}

.talleres-institutions-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.talleres-institutions-label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  color: var(--color-ink);
}

.talleres-stats-number {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.125rem;
  color: var(--color-primary);
}

/* Mostrar los talleres */
.talleres-showcase {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 80px 32px;
  box-sizing: border-box;
}

/* En desktop/notebook (>= 992px) se muestran los dos carousels lado a lado
   y las tabs se ocultan; en mobile/tablet (< 992px) las tabs alternan cuál
   de los dos .hero-carousel está visible (comportamiento por defecto, via
   el atributo [hidden] que controla campaign-tabs.js). */
.talleres-showcase-carousel-col {
  width: 100%;
}

.talleres-carousel-label {
  display: none;
}

/* Tabs + carousel (copiado de index.css: .campaign-tabs / .hero-carousel*.
   Scoped a este archivo, ver decisión sobre no tocar index.css/shared.css). */
.campaign-tabs {
  display: flex;
  gap: 8px;
  margin: 24px 0;
}

.campaign-tab {
  padding: 8px 20px;
  font-family: var(--font-heading);
  font-size: .875rem;
  font-weight: 700;
  color: var(--color-primary);
  background-color: transparent;
  border: 1px solid var(--color-primary);
  border-radius: 50px;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}

.campaign-tab:hover {
  background-color: var(--color-primary-surface);
}

.campaign-tab.is-active {
  color: var(--color-white);
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.hero-carousel {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
}

.hero-carousel-track {
  display: flex;
  height: 100%;
  transition: transform .5s ease;
}

.hero-carousel-slide {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  min-width: 0;
  cursor: pointer;
}

.hero-carousel-image {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  object-fit: cover;
}

.hero-carousel-caption {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  column-gap: 12px;
  flex: 0 0 auto;
  height: 68px;
  padding: 12px;
  box-sizing: border-box;
  background-color: var(--color-surface);
  color: var(--color-ink);
}

.hero-carousel-play {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  color: var(--color-white);
  background-color: var(--color-primary);
  border-radius: 50%;
}

.hero-carousel-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

p.hero-carousel-role {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
  margin: 0;
}

p.hero-carousel-heading {
  font-size: .8125rem;
  font-weight: 400;
  color: var(--color-muted);
  margin: 0;
}

.hero-carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background-color: transparent;
  color: var(--color-white);
  cursor: pointer;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6));
  transition: opacity .2s ease;
}

.hero-carousel-control:hover {
  opacity: .7;
}

.hero-carousel-prev { left: 4px; }
.hero-carousel-next { right: 4px; }

/* Photo slides for the "Fotos" gallery — clicking one opens photo-modal.js */
.talleres-photo {
  cursor: pointer;
}

/* Institution caption for the Fotos gallery.
   Lives OUTSIDE .hero-carousel-track (a sibling, absolutely positioned over
   the carousel) so it doesn't slide with every photo — only its text swaps,
   and only when the institution actually changes between slides (handled by
   talleres-photo-caption.js, which reads each slide's data-institution). */
.talleres-photo-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 68px;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  column-gap: 12px;
  padding: 12px;
  box-sizing: border-box;
  background-color: var(--color-surface);
  pointer-events: none;
}

.talleres-photo-caption-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  color: var(--color-white);
  background-color: var(--color-primary);
  border-radius: 50%;
}

.talleres-photo-caption-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  white-space: nowrap;
}

.talleres-photo-caption-text {
  margin: 0;
  color: var(--color-text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

@media (min-width: 992px) {
  .talleres-showcase .campaign-tabs {
    display: none;
  }

  .talleres-showcase-carousels {
    display: flex;
    gap: 24px;
  }

  .talleres-showcase-carousel-col {
    flex: 1 1 0;
    min-width: 0;
  }

  .talleres-showcase-carousels .hero-carousel[hidden] {
    display: block;
  }
}

/* Opiniones — dos videos de docentes.
   Mobile/tablet (< 992px): slider combinado (un slide a la vez, prev/next).
   Desktop/notebook (>= 992px): los dos lado a lado, sin controles.
   Reutiliza las clases .hero-carousel-slide/-image/-caption ya estilizadas;
   el desplazamiento lo maneja opiniones-slider.js. */
.talleres-opiniones {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 64px 32px;
  box-sizing: border-box;
}

.talleres-opiniones-lead {
  margin: -8px 0 24px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-muted);
}

.opiniones-carousel {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
}

.opiniones-track {
  display: flex;
  height: 100%;
  transition: transform .5s ease;
}

@media (min-width: 992px) {
  .opiniones-carousel {
    overflow: visible;
  }

  .opiniones-track {
    gap: 24px;
  }

  .opiniones-track .hero-carousel-slide {
    flex: 1 1 0;
  }

  .opiniones-carousel .hero-carousel-control {
    display: none;
  }
}

/* A quién va dirigido */
.talleres-audience {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 64px 32px;
  box-sizing: border-box;
}

.talleres-audience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.talleres-audience-card {
  background-color: var(--color-surface);
  border-radius: 0;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Icon square (copiado de index.css .content-card-icon, scoped a este archivo) */
.talleres-audience-card .content-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  padding: 10px 6px;
  box-sizing: border-box;
  border-radius: 0;
  background-color: rgba(71, 138, 201, .12);
  color: var(--color-primary);
}

.talleres-audience-card .content-card-icon svg {
  width: 26px;
  height: 26px;
}

.talleres-audience-card .content-card-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.talleres-audience-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  color: var(--color-ink);
  margin: 0;
}

/* CTA final */
.talleres-cta {
  width: 100%;
  background-color: var(--color-primary-surface);
  box-sizing: border-box;
}

.talleres-cta-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 64px 32px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.talleres-cta-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-h2);
  line-height: var(--lh-heading);
  color: var(--color-ink);
  margin: 0;
}

/* Video modal (scoped to this page only — Testimonios intentionally has no
   video-modal styling so it plays audio-only; do not promote this to shared.css) */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-modal[hidden] {
  display: none;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, .85);
  border: 0;
  padding: 0;
}

.video-modal-dialog {
  position: relative;
  width: min(1000px, 94vw);
  z-index: 1;
}

.video-modal-title {
  position: absolute;
  top: -40px;
  left: 0;
  right: 56px;
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  line-height: 32px;
  color: var(--color-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 4px;
}

.video-modal-prev,
.video-modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, .5);
  color: var(--color-white);
  cursor: pointer;
  z-index: 2;
  transition: background-color .2s ease;
}

.video-modal-prev:hover,
.video-modal-next:hover {
  background-color: rgba(0, 0, 0, .75);
}

.video-modal-prev {
  left: -68px;
}

.video-modal-next {
  right: -68px;
}

.video-modal:not(.has-gallery) .video-modal-prev,
.video-modal:not(.has-gallery) .video-modal-next {
  display: none;
}

.video-modal-frame-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background-color: var(--color-black);
}

.video-modal-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-modal-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background-color: var(--color-black);
  object-fit: contain;
}

.video-modal--vertical .video-modal-dialog {
  width: min(420px, 90vw);
}

.video-modal--vertical .video-modal-frame-wrap {
  padding-top: 0;
  aspect-ratio: 9 / 16;
  max-height: 80vh;
  margin: 0 auto;
}

.video-modal--vertical .video-modal-video {
  object-fit: contain;
}

body.video-modal-open {
  overflow: hidden;
}

/* Photo lightbox for the "Fotos" gallery — same visual chrome as the video
   modal above (backdrop, dialog, prev/next, close, title), reused as its own
   set of .photo-modal-* classes since it holds a single <img> instead of the
   iframe/video swap the video modal does. See photo-modal.js. */
.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-modal[hidden] {
  display: none;
}

.photo-modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, .85);
  border: 0;
  padding: 0;
}

.photo-modal-dialog {
  position: relative;
  width: min(1000px, 94vw);
  z-index: 1;
}

.photo-modal-title {
  position: absolute;
  top: -40px;
  left: 0;
  right: 56px;
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  line-height: 32px;
  color: var(--color-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 4px;
}

.photo-modal-prev,
.photo-modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, .5);
  color: var(--color-white);
  cursor: pointer;
  z-index: 2;
  transition: background-color .2s ease;
}

.photo-modal-prev:hover,
.photo-modal-next:hover {
  background-color: rgba(0, 0, 0, .75);
}

.photo-modal-prev { left: -68px; }
.photo-modal-next { right: -68px; }

.photo-modal:not(.has-gallery) .photo-modal-prev,
.photo-modal:not(.has-gallery) .photo-modal-next {
  display: none;
}

.photo-modal-frame-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 80vh;
  background-color: var(--color-black);
}

.photo-modal-image {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

body.photo-modal-open {
  overflow: hidden;
}

@media (max-width: 1200px) {
  .photo-modal-dialog {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .photo-modal-frame-wrap {
    order: 1;
  }

  .photo-modal-nav {
    order: 2;
    display: flex;
    justify-content: center;
    gap: 16px;
  }

  .photo-modal-prev,
  .photo-modal-next {
    position: static;
    transform: none;
  }
}

@media (max-width: 1440px) and (min-width: 992px) {
  .hero-inner,
  .talleres-showcase,
  .talleres-opiniones,
  .talleres-audience,
  .talleres-cta-inner {
    max-width: 1140px;
  }
}

@media (max-width: 1200px) {
  .video-modal-dialog {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .video-modal-frame-wrap {
    order: 1;
  }

  .video-modal-nav {
    order: 2;
    display: flex;
    justify-content: center;
    gap: 16px;
  }

  .video-modal-prev,
  .video-modal-next {
    position: static;
    transform: none;
  }
}

@media (max-width: 991px) {
  .hero {
    padding: 40px 0;
  }

  .hero-inner {
    padding: 0 24px;
  }

  .talleres-audience-grid {
    grid-template-columns: 1fr;
  }

  .hero-carousel {
    height: 400px;
  }

  .hero-carousel-caption {
    height: 84px;
  }
}

@media (max-width: 575px) {
  p.hero-text {
    font-size: 1rem;
  }

  .talleres-institutions-caption-break {
    display: block;
  }

  .featured-quote {
    padding: 80px 24px;
  }

  .talleres-showcase,
  .talleres-audience {
    padding: 40px 24px;
  }

  .talleres-cta-inner {
    padding: 40px 24px;
  }

  .hero-carousel {
    height: 300px;
  }

  .talleres-institutions-row {
    flex-direction: column;
    gap: 8px;
  }
}
