/* Secao Galeria de Videos */
.videos-section {
  position: relative;
  overflow: hidden;
  scroll-margin-top: 8.5rem;
  padding: 8rem 0;
  background:
    radial-gradient(circle at 8% 14%, rgba(34, 211, 238, 0.17), transparent 28%),
    radial-gradient(circle at 92% 88%, rgba(139, 92, 246, 0.20), transparent 30%),
    linear-gradient(145deg, #071a3d 0%, #102c58 50%, #16183f 100%);
}

/* Detalhes luminosos criam profundidade sem interferir nos controles dos videos. */
.videos-section::before,
.videos-section::after {
  content: "";
  position: absolute;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  filter: blur(10px);
  pointer-events: none;
}

.videos-section::before {
  left: -10rem;
  top: 18%;
  background: rgba(6, 182, 212, 0.10);
}

.videos-section::after {
  right: -9rem;
  bottom: 8%;
  background: rgba(139, 92, 246, 0.12);
}

.videos-inner {
  position: relative;
  z-index: 1;
}

/* Cabecalho central da nova galeria */
.videos-header {
  max-width: 78rem;
  margin: 0 auto 4.8rem;
  text-align: center;
}

.videos-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.4rem;
  padding: 0.8rem 1.5rem;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(14, 116, 144, 0.20);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.videos-header h2 {
  margin-bottom: 1.5rem;
  color: #ffffff;
  font-size: 3.4rem;
  font-weight: 800;
}

.videos-header h2 span {
  color: #67e8f9;
  font-size: inherit;
}

.videos-header > p:last-child {
  color: #cbdcf1;
  font-size: 1.65rem;
  line-height: 2.8rem;
}

/* Grade responsiva dos oito blocos de video */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.2rem;
}

.video-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(148, 197, 255, 0.17);
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.055));
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(9px);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.video-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  height: 4px;
  background: linear-gradient(90deg, #22d3ee, #3b82f6, #8b5cf6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-card:hover {
  transform: translateY(-8px);
  border-color: rgba(103, 232, 249, 0.48);
  box-shadow: 0 28px 55px rgba(0, 0, 0, 0.30);
}

.video-card:hover::before {
  opacity: 1;
}

/* Link expandido e botao discreto: direcionam para a pagina de apresentacao. */
.video-card-link {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: block;
  border-radius: inherit;
  color: #ffffff;
  text-decoration: none;
}

.video-card-link span {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.62rem 0.9rem;
  border: 1px solid rgba(103, 232, 249, 0.52);
  border-radius: 999px;
  background: rgba(5, 31, 68, 0.9);
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0.92;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

.video-card-active:hover .video-card-link span,
.video-card-link:focus-visible span {
  opacity: 1;
  transform: translateY(-2px);
}

.video-card-link:focus-visible {
  outline: 3px solid #67e8f9;
  outline-offset: -4px;
}

/* ESTILO YOUTUBE SHORTS - VIDEO 01: usado no card do Video 01 em index.html. */
.video-media-youtube {
  position: relative;
  background: #000814;
}

.video-media-youtube-poster {
  filter: brightness(0.88);
}

.video-card-youtube:hover .video-media-youtube-poster {
  transform: scale(1.04);
  filter: brightness(0.68);
}

/* MARCADORES ANTES E DEPOIS - VIDEO 01: faixa visivel no card da tela principal. */
.video-youtube-marker {
  position: absolute;
  inset: 14px;
  z-index: 6;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
}

.video-youtube-marker span {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 8px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.video-youtube-marker__before {
  background: #dc2626;
}

.video-youtube-marker__after {
  background: #16a34a;
}
/* FIM MARCADORES ANTES E DEPOIS - VIDEO 01 */

/* CLIQUE VIDEO 01 - VER APRESENTACAO: garante que o card do Shorts abra a pagina interna, nao o YouTube. */
.video-card-youtube .video-card-link {
  z-index: 20;
}

.video-card-youtube .video-media-youtube,
.video-card-youtube .video-media-youtube-poster,
.video-card-youtube .video-youtube-marker,
.video-card-youtube .video-htmlcss-play,
.video-card-youtube .video-badge {
  pointer-events: none;
}
/* FIM CLIQUE VIDEO 01 - VER APRESENTACAO */
/* FIM ESTILO YOUTUBE SHORTS - VIDEO 01 */
.video-media video {
  pointer-events: none;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.video-card-active:hover .video-media video {
  transform: scale(1.04);
  filter: brightness(0.68);
}

/* Area de reproducao do video publicado */
.video-media,
.video-placeholder {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #020817;
}

.video-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020817;
}
.video-media-poster {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.video-card-active:hover .video-media-poster {
  transform: scale(1.04);
  filter: brightness(0.68);
}

.video-media--poster video {
  position: relative;
  z-index: 0;
}

.video-media--poster .video-badge {
  z-index: 3;
}.video-badge {
  position: absolute;
  left: 1.2rem;
  top: 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(6, 22, 47, 0.78);
  font-size: 1.15rem;
  font-weight: 700;
  backdrop-filter: blur(7px);
  pointer-events: none;
}

/* Aparencia temporaria dos sete espacos ainda sem arquivo */
.video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: #9ddcf4;
  background:
    linear-gradient(135deg, rgba(14, 116, 144, 0.30), rgba(76, 29, 149, 0.24)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 10px, transparent 10px 20px);
}

.video-placeholder i {
  font-size: 3.6rem;
  filter: drop-shadow(0 9px 16px rgba(0, 0, 0, 0.25));
}

.video-placeholder span {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.video-content {
  min-height: 15rem;
  padding: 2rem;
}

.video-number {
  display: inline-block;
  margin-bottom: 0.8rem;
  color: #67e8f9;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.video-content h3 {
  margin-bottom: 0.8rem;
  color: #ffffff;
  font-size: 1.9rem;
  font-weight: 750;
}

.video-content p {
  color: #c5d5e8;
  font-size: 1.4rem;
  line-height: 2.2rem;
}

/* Entrada escalonada dos cards quando a secao se torna visivel */
.videos-section.videos-reveal-ready .videos-header,
.videos-section.videos-reveal-ready .video-card {
  opacity: 0;
  translate: 0 5rem;
  scale: 0.95;
  will-change: translate, scale, opacity;
}

.videos-section.videos-reveal-ready.videos-reveal-visible .videos-header,
.videos-section.videos-reveal-ready.videos-reveal-visible .video-card {
  opacity: 1;
  translate: 0 0;
  scale: 1;
  transition:
    translate 0.85s cubic-bezier(0.16, 1, 0.3, 1),
    scale 0.85s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.58s ease,
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.videos-section.videos-reveal-visible .videos-header { transition-delay: 0.02s; }
.videos-section.videos-reveal-visible .video-card:nth-child(1) { transition-delay: 0.10s; }
.videos-section.videos-reveal-visible .video-card:nth-child(2) { transition-delay: 0.16s; }
.videos-section.videos-reveal-visible .video-card:nth-child(3) { transition-delay: 0.22s; }
.videos-section.videos-reveal-visible .video-card:nth-child(4) { transition-delay: 0.28s; }
.videos-section.videos-reveal-visible .video-card:nth-child(5) { transition-delay: 0.34s; }
.videos-section.videos-reveal-visible .video-card:nth-child(6) { transition-delay: 0.40s; }
.videos-section.videos-reveal-visible .video-card:nth-child(7) { transition-delay: 0.46s; }
.videos-section.videos-reveal-visible .video-card:nth-child(8) { transition-delay: 0.52s; }

/* INICIO CSS MOSTRAR MAIS VIDEOS: controla os cards 09 a 16 e o novo botao */
.video-card-extra {
  display: none !important;
}

.videos-grid.mostrar-todos .video-card-extra.video-card-extra-visivel {
  display: block !important;
  animation: videoExtraEntrada 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.videos-grid.mostrar-todos .video-card-extra:nth-child(10) { animation-delay: 0.05s; }
.videos-grid.mostrar-todos .video-card-extra:nth-child(11) { animation-delay: 0.10s; }
.videos-grid.mostrar-todos .video-card-extra:nth-child(12) { animation-delay: 0.15s; }
.videos-grid.mostrar-todos .video-card-extra:nth-child(13) { animation-delay: 0.20s; }
.videos-grid.mostrar-todos .video-card-extra:nth-child(14) { animation-delay: 0.25s; }
.videos-grid.mostrar-todos .video-card-extra:nth-child(15) { animation-delay: 0.30s; }
.videos-grid.mostrar-todos .video-card-extra:nth-child(16) { animation-delay: 0.35s; }

.videos-mostrar-mais {
  display: flex;
  justify-content: center;
  margin-top: 4rem;
}

.videos-mostrar-mais button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  min-width: 24rem;
  padding: 1.4rem 2.7rem;
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, 0.58);
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #0891b2, #2563eb 55%, #7c3aed);
  font-family: 'Poppins', var(--font-family), sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.30);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.videos-mostrar-mais button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}

.videos-mostrar-mais button i,
.videos-mostrar-mais button span {
  position: relative;
  z-index: 1;
}

.videos-mostrar-mais button:hover,
.videos-mostrar-mais button:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.86);
  box-shadow: 0 24px 48px rgba(37, 99, 235, 0.40), 0 0 0 5px rgba(103, 232, 249, 0.12);
  outline: none;
}

.videos-mostrar-mais button:hover::before,
.videos-mostrar-mais button:focus-visible::before {
  transform: translateX(120%);
}

@keyframes videoExtraEntrada {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
/* FIM CSS MOSTRAR MAIS VIDEOS */

@media screen and (max-width: 1024px) {
  .videos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 600px) {
  .videos-section {
    scroll-margin-top: 10rem;
    padding: 5.5rem 0;
  }

  .videos-header {
    margin-bottom: 3.4rem;
    padding: 0 1rem;
  }

  /* Etiqueta Registros em video ocupa toda a largura no celular. */
  .videos-eyebrow {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
    border-radius: 5px;
  }

  .videos-header h2 {
    font-size: 2.7rem;
  }

  .videos-grid {
    grid-template-columns: 1fr;
    padding: 0 0.8rem;
  }

  /* Botao Mostrar mais videos ocupa toda a largura no celular. */
  .videos-mostrar-mais button {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border-radius: 5px;
  }

  .video-content {
    min-height: 0;
  }

  .video-card-link span {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .videos-section.videos-reveal-ready .videos-header,
  .videos-section.videos-reveal-ready .video-card {
    opacity: 1;
    translate: none;
    scale: none;
    transition: none;
  }

  .videos-grid.mostrar-todos .video-card-extra.video-card-extra-visivel {
    animation: none;
  }
}

.video-card-direct .video-media video {
  pointer-events: auto;
}

.video-card-direct:hover .video-media video {
  transform: none;
  filter: none;
}

/* INICIO CSS VIDEO 05 - HTML E CSS: estilos da miniatura/card na galeria. */
.video-media-htmlcss {
  display: grid;
  place-items: center;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(2, 8, 23, 0.12), rgba(2, 8, 23, 0.72)),
    linear-gradient(135deg, rgba(240, 103, 47, 0.78), rgba(6, 21, 47, 0.95) 46%, rgba(47, 131, 237, 0.78));
}

.video-media-htmlcss img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.video-htmlcss-code {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  opacity: 0.52;
  font-family: Consolas, "Courier New", monospace;
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  font-weight: 700;
}

.video-htmlcss-code span {
  display: grid;
  place-items: center;
  padding: 1rem;
}

.video-htmlcss-title {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0.45rem;
  text-align: center;
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.42);
}

.video-htmlcss-title strong {
  display: inline-flex;
  justify-content: center;
  min-width: 72px;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  color: #06152f;
  background: #67e8f9;
  font-size: 1.25rem;
  font-weight: 900;
}

.video-htmlcss-title span {
  font-size: 1.15rem;
  font-weight: 800;
}

.video-htmlcss-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 4.8rem;
  height: 4.8rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  background: rgba(6, 21, 47, 0.78);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34);
  transform: translate(-50%, -50%);
  font-size: 2.6rem;
}

.video-htmlcss-play i {
  margin-left: 0.2rem;
}

.video-card-htmlcss:hover .video-media-htmlcss {
  filter: brightness(0.82);
}
/* FIM CSS VIDEO 05 - HTML E CSS */

