/* =========================================================
   GALERÍA DE VIDEOS
   Sociedad Juvenil Simiente de Abraham
   ========================================================= */

body[data-page="videoGallery"] {
  background:
    radial-gradient(circle at 12% 18%, rgba(208, 231, 250, 0.7), transparent 30rem),
    radial-gradient(circle at 88% 18%, rgba(255, 235, 190, 0.55), transparent 32rem),
    linear-gradient(180deg, #f8fbff 0%, #eef7fd 100%);
  color: #123f68;
}

body[data-page="videoGallery"][data-background-type="color"] {
  background:
    var(
      --page-background-color,
      var(--color-background)
    );
}

body[data-page="videoGallery"][data-background-type="gradient"] {
  background:
    var(
      --page-background-gradient,
      linear-gradient(
        135deg,
        #f7fbff 0%,
        #e5f3ff 50%,
        #fff8e8 100%
      )
    );
}

body[data-page="videoGallery"][data-background-type="image"] {
  background:
    var(
      --page-background-image,
      var(--color-background)
    );
}

body[data-page="videoGallery"] *,
body[data-page="videoGallery"] *::before,
body[data-page="videoGallery"] *::after {
  box-sizing: border-box;
}

/* Contenido principal */

.video-gallery-page {
  min-height: 70vh;
  overflow: hidden;
}

.video-gallery-hero {
  padding: clamp(7rem, 11vw, 10rem) 0 clamp(5rem, 9vw, 8rem);
}

/* Encabezado */

.video-gallery-heading {
  width: min(100%, 1050px);
  margin: 0 auto clamp(4rem, 7vw, 6rem);
  text-align: center;
}

.video-gallery-heading .section-eyebrow {
  margin: 0 0 1.6rem;
  color: #a46808;
  font-size: clamp(0.9rem, 1.5vw, 1.15rem);
  font-weight: 800;
  letter-spacing: 0.28em;
  line-height: 1.4;
  text-transform: uppercase;
}

.video-gallery-heading h1 {
  margin: 0;
  color: #123f68;
  font-size: clamp(3.5rem, 7vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-wrap: balance;
}

.video-gallery-introduction {
  max-width: 820px;
  margin: clamp(2rem, 4vw, 3rem) auto 0;
  color: #607990;
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  line-height: 1.7;
  text-wrap: balance;
}

/* Tarjeta principal */

.video-gallery-grid {
  display: grid;
  grid-template-columns:
    repeat(
      var(
        --page-layout-columns,
        4
      ),
      minmax(
        0,
        1fr
      )
    );
  gap:
    var(
      --page-layout-gap,
      1.5rem
    );
  margin-top: 3rem;
}

.video-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(58, 116, 161, 0.18);
  border-radius: 1.35rem;
  box-shadow:
    0 16px 40px rgba(25, 67, 101, 0.1);
}

.video-card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  min-height: 0;
  overflow: hidden;
  background: #0d477c;
  text-decoration: none;
}

.video-card-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition:
    transform 180ms ease,
    filter 180ms ease;
}

.video-card-cover::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(5, 37, 67, 0.02) 0%,
      rgba(5, 37, 67, 0.14) 100%
    );
}

.video-card-cover:hover img,
.video-card-cover:focus-visible img {
  transform: scale(1.025);
  filter: brightness(0.94);
}

.video-card-cover-r2 {
  background: #000;
}

.video-card-cover-r2::after {
  display: none;
}

.video-card-player {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  object-fit: contain;
}

.video-card-overlay {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.video-play-icon {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  padding-left: 0.15rem;
  color: #ffffff;
  background: rgba(12, 55, 91, 0.88);
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  box-shadow:
    0 0.65rem 1.5rem rgba(2, 31, 57, 0.28);
  font-size: 1rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.video-card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.1rem 1rem 1.2rem;
}

body[data-layout-card-size="small"]
  .video-card-content {
  padding:
    0.85rem
    0.8rem
    0.95rem;
}

body[data-layout-card-size="large"]
  .video-card-content {
  padding:
    1.4rem
    1.3rem
    1.5rem;
}

body[data-layout-alignment="left"]
  .video-card-content {
  text-align: left;
}

body[data-layout-alignment="center"]
  .video-card-content {
  text-align: center;
}

.video-card-content h2 {
  margin: 0;
  color: #123b60;
  font-size:
    clamp(
      1.2rem,
      1.7vw,
      1.5rem
    );
  font-weight: 800;
  line-height: 1.2;
}

.video-card-content > p {
  margin: 0.65rem 0 0;
  color: #617789;
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Insignia de estado */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 2rem;
  padding: 0.85rem 1.25rem;
  color: #176399;
  background: #eaf5ff;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 800;
}

.status-dot {
  width: 0.75rem;
  height: 0.75rem;
  background: #e2a720;
  border-radius: 50%;
  box-shadow: 0 0 0 0.3rem rgba(226, 167, 32, 0.12);
}

/* Mensaje próximamente */

.video-coming-soon {
  width: 100%;
  margin: clamp(2.5rem, 5vw, 4rem) auto 0;
  padding: clamp(2.5rem, 5vw, 4rem) 2rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.55);
  border: 2px dashed rgba(48, 116, 170, 0.28);
  border-radius: 2rem;
}

.video-coming-soon h2 {
  margin: 0 0 1rem;
  color: #174f7c;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
}

.video-coming-soon p {
  margin: 0;
  color: #607990;
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  line-height: 1.6;
}

/* Pie de página */

body[data-page="videoGallery"] .footer-grid {
  grid-template-columns:
    minmax(260px, 1.5fr)
    repeat(
      3,
      minmax(160px, 0.7fr)
    );
}

body[data-page="videoGallery"]
.site-footer
.footer-grid
> section:not(.footer-brand)
h2 {
  margin: 0 0 22px;

  color: #123b60;

  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body[data-page="videoGallery"]
.site-footer
.footer-grid
> section
nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
}

body[data-page="videoGallery"]
.site-footer
.footer-grid
> section
nav a {
  color: #5b7182;

  font-size: 1rem;
  line-height: 1.5;

  transition:
    color 160ms ease,
    transform 160ms ease;
}

body[data-page="videoGallery"]
.site-footer
.footer-grid
> section
nav a:hover {
  color: #17476f;
  transform: translateX(3px);
}

body[data-page="videoGallery"] .footer-bottom p {
  margin: 0;
  line-height: 1.6;
}

/* Tabletas */

@media (max-width: 1050px) {
  .video-gallery-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(
          0,
          1fr
        )
      );
  }

  .video-gallery-hero {
    padding-top: 6rem;
  }

  .video-gallery-heading {
    margin-bottom: 3.5rem;
  }

  body[data-page="videoGallery"] .footer-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(
          0,
          1fr
        )
      );
    gap: 3rem;
  }
}

/* Celulares */

@media (max-width: 720px) {
  .video-gallery-hero {
    padding: 4.75rem 0 4rem;
  }

  .video-gallery-heading {
    margin-bottom: 2rem;
  }

  .video-gallery-heading .section-eyebrow {
    margin-bottom: 1.2rem;
    font-size: 0.85rem;
    letter-spacing: 0.22em;
  }

  .video-gallery-heading h1 {
    font-size: clamp(2.65rem, 12vw, 4.25rem);
    line-height: 1.02;
  }

  .video-gallery-introduction {
    margin-top: 1.6rem;
    font-size: 1.1rem;
    line-height: 1.6;
  }

  .video-gallery-grid {
    grid-template-columns: 1fr;
    gap: 1.4rem;
    margin-top: 2rem;
  }

  .video-card {
    border-radius: 1.35rem;
  }

  .video-card-cover {
    aspect-ratio: 16 / 9;
  }

  .video-play-icon {
    width: 3.25rem;
    height: 3.25rem;
    font-size: 0.9rem;
  }

  .video-card-content {
    padding: 1.25rem;
  }

  .video-card-content h2 {
    font-size: 1.35rem;
  }

  .video-card-content > p {
    font-size: 0.95rem;
  }

  .video-coming-soon {
    margin-top: 2rem;
    padding: 2.5rem 1.25rem;
    border-radius: 1.5rem;
  }

  body[data-page="videoGallery"] .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.75rem;
  }

  body[data-page="videoGallery"] .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    margin-top: 3rem;
  }
}

/* Celulares pequeños */

@media (max-width: 420px) {
  .video-gallery-heading h1 {
    font-size: 2.55rem;
  }

  .video-play-icon {
    width: 3rem;
    height: 3rem;
    font-size: 0.82rem;
  }

  .video-card-content {
    padding: 1.15rem;
  }
}


/* Accesibilidad */

@media (prefers-reduced-motion: reduce) {
  body[data-page="videoGallery"] *,
  body[data-page="videoGallery"] *::before,
  body[data-page="videoGallery"] *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* V3.0.0 — R2 video lightbox */

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

.video-card-cover-r2 {
  width: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  appearance: none;
}

.video-card-cover-r2 .video-card-player {
  pointer-events: none;
}

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

.video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: clamp(
    1rem,
    3vw,
    2.5rem
  );
}

.video-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background:
    rgba(
      3,
      14,
      26,
      0.92
    );
  backdrop-filter:
    blur(6px);
}

.video-lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(
    1100px,
    94vw
  );
  max-width: 100%;
}

.video-lightbox-player {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: min(
    80vh,
    720px
  );
  overflow: hidden;
  border-radius: 1rem;
  background: #000000;
  box-shadow:
    0 24px 70px
    rgba(
      0,
      0,
      0,
      0.45
    );
}

.video-lightbox-player video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
}

.video-lightbox-player iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000000;
}

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

.video-lightbox-close {
  position: absolute;
  top: -3.5rem;
  right: -3.5rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 2px solid
    rgba(
      255,
      255,
      255,
      0.35
    );
  border-radius: 50%;
  background:
    rgba(
      10,
      28,
      46,
      0.96
    );
  color: #ffffff;
  font: inherit;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    0 8px 24px
    rgba(
      0,
      0,
      0,
      0.35
    );
}

.video-lightbox-close:hover,
.video-lightbox-close:focus-visible {
  transform: scale(1.06);
  outline: 3px solid
    rgba(
      255,
      255,
      255,
      0.45
    );
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .video-lightbox {
    padding: 1rem;
  }

  .video-lightbox-dialog {
    width: 100%;
  }

  .video-lightbox-player {
    height: 78vh;
    border-radius: 0.8rem;
  }

  .video-lightbox-close {
    top: -3.25rem;
    right: 0;
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.6rem;
  }
}

@media (max-width: 920px) and (orientation: landscape) {
  .video-lightbox {
    padding:
      max(0.75rem, env(safe-area-inset-top))
      max(0.75rem, env(safe-area-inset-right))
      max(0.75rem, env(safe-area-inset-bottom))
      max(0.75rem, env(safe-area-inset-left));
  }

  .video-lightbox-dialog {
    width:
      min(
        94vw,
        1100px
      );
  }

  .video-lightbox-player {
    height:
      min(
        72vh,
        620px
      );
  }

  .video-lightbox-close {
    top: 0;
    right: -3.25rem;
  }
}
