/* =========================================================
   REPERTÓRIO.CSS
   Estrutura:
   1. DESKTOP / BASE
   2. TABLET
   3. MOBILE
   ========================================================= */


/* =========================================================
   1. DESKTOP / BASE
   ========================================================= */


/* ---------------------------------------------------------
   HERO — VÍDEO DE FUNDO
   --------------------------------------------------------- */

.repertorio-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  isolation: isolate;
}

.repertorio-hero .hero-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  z-index: -2;
}

.repertorio-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .38);
  z-index: -1;
  pointer-events: none;
}

.repertorio-hero .hero-content {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.repertorio-hero .hero-content h1 {
  max-width: 1100px;
  margin: 20px auto 0;
  font-size: 64px;
  line-height: 1.15;
}

.repertorio-hero .eyebrow {
  font-size: 20px;
}


/* ---------------------------------------------------------
   BOTÃO DE SOM
   --------------------------------------------------------- */

.video-sound-button {
  position: absolute;
  right: 30px;
  bottom: 30px;
  z-index: 10;
  padding: 12px 18px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 30px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all .25s ease;
}

.video-sound-button:hover {
  background: rgba(0,0,0,.8);
  transform: scale(1.03);
}


/* ---------------------------------------------------------
   VÍDEOS PRINCIPAIS
   Desktop: mesmo padrão visual dos vídeos de depoimentos do index.
   --------------------------------------------------------- */

.main-video-carousel {
  position: relative;
  width: 100%;
}

.main-video-carousel .video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  margin: 0 auto;
}

.main-video-carousel .video-card {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: 16px;
}

.main-video-carousel .video-card iframe {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  height: auto;
  border: 0;
}

.main-video-carousel .video-card .label {
  padding: 10px 12px;
  font-size: 13px;
}

.mobile-video-trigger {
  position: relative;
}

.mobile-play-button {
  display: none;
}

.main-video-arrow,
.main-video-dots {
  display: none;
}


/* ---------------------------------------------------------
   BIBLIOTECA DE ÁUDIO
   Desktop: mantém grade com players um pouco menores.
   --------------------------------------------------------- */

.audio-carousel {
  position: relative;
  width: 100%;
}

.audio-carousel .embed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: min(100%, 900px);
  margin: 0 auto;
}

.audio-carousel .embed-card {
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
}

.audio-carousel .embed-card iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
}

.audio-arrow,
.audio-dots {
  display: none;
}


/* ---------------------------------------------------------
   POPUP
   Desktop: não é utilizado.
   --------------------------------------------------------- */

.video-modal {
  display: none;
}


/* =========================================================
   2. TABLET
   ========================================================= */

@media (max-width: 1100px) {

  .repertorio-hero .hero-content h1 {
    font-size: 52px;
    max-width: 900px;
  }

  .main-video-carousel .video-grid {
    width: min(100%, 900px);
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .audio-carousel .embed-grid {
    width: min(100%, 780px);
  }

}


/* =========================================================
   3. MOBILE
   ========================================================= */

@media (max-width: 820px) {

  /* -------------------------------------------------------
     HERO
     ------------------------------------------------------- */

  .repertorio-hero {
    min-height: 100svh;
    height: 100svh;
  }

  .repertorio-hero .hero-content {
    min-height: 100svh;
    padding: 0 18px;
  }

  .repertorio-hero .eyebrow {
    font-size: 14px;
  }

  .repertorio-hero .hero-content h1 {
    max-width: 360px;
    margin-top: 14px;
    font-size: clamp(29px, 8.5vw, 40px);
    line-height: 1.08;
  }

  .video-sound-button {
    right: 20px;
    bottom: 20px;
    padding: 10px 15px;
    font-size: 13px;
  }


  /* -------------------------------------------------------
     VÍDEOS PRINCIPAIS
     Carrossel automático a cada 3 segundos.
     ------------------------------------------------------- */

  .main-video-carousel {
    padding: 0 0 34px;
    overflow: visible;
  }

  .main-video-carousel .video-grid {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    gap: 0;
    margin: 0;
    transform: translateX(0);
    will-change: transform;
  }

  .main-video-carousel .video-card {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
  }

  .main-video-carousel .video-card iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(0,0,0,.35);
    pointer-events: none;
  }

  .main-video-carousel .video-card .label {
    padding: 12px 5px 0;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
  }

  /*
   * O iframe fica visualmente como capa.
   * No celular o botão Play abre o popup.
   */
  .mobile-video-trigger {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
  }

  .mobile-play-button {
    position: absolute;
    inset: 50% auto auto 50%;
    display: flex;
    width: 62px;
    height: 62px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.32);
    border-radius: 50%;
    background: rgba(0,0,0,.64);
    color: #fff;
    cursor: pointer;
    transform: translate(-50%, -50%);
    box-shadow: 0 12px 35px rgba(0,0,0,.48);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition:
      transform .2s ease,
      background .2s ease;
    z-index: 5;
  }

  .mobile-play-button span {
    margin-left: 4px;
    font-size: 23px;
  }

  .mobile-play-button:hover,
  .mobile-play-button:active {
    background: rgba(217,21,34,.88);
    transform: translate(-50%, -50%) scale(1.06);
  }


  /* Passador moderno */

  .main-video-arrow {
    position: absolute;
    top: 43%;
    z-index: 10;
    display: flex;
    width: 42px;
    height: 42px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 50%;
    background: rgba(10,10,10,.65);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0,0,0,.38);
    transition:
      transform .2s ease,
      background .2s ease,
      opacity .2s ease;
  }

  .main-video-prev {
    left: 3px;
    transform: translateY(-50%);
  }

  .main-video-next {
    right: 3px;
    transform: translateY(-50%);
  }

  .main-video-prev:hover,
  .main-video-next:hover {
    background: rgba(217,21,34,.88);
    transform: translateY(-50%) scale(1.06);
  }

  .main-video-arrow:disabled {
    opacity: .22;
    cursor: default;
    pointer-events: none;
  }

  .main-video-dots {
    position: absolute;
    left: 50%;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transform: translateX(-50%);
  }

  .main-video-dots button {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.24);
    cursor: pointer;
    transition:
      width .25s ease,
      background .25s ease;
  }

  .main-video-dots button.active {
    width: 22px;
    background: var(--red, #d91522);
  }


  /* -------------------------------------------------------
     POPUP DO VÍDEO
     ------------------------------------------------------- */

  body.modal-open {
    overflow: hidden;
  }

  .video-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition:
      opacity .25s ease,
      visibility .25s ease;
  }

  .video-modal.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .video-modal-dialog {
    position: relative;
    z-index: 2;
    width: min(100%, 720px);
    max-height: calc(100svh - 36px);
    padding: 16px;
    overflow: auto;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 22px;
    background:
      linear-gradient(
        145deg,
        rgba(25,25,25,.98),
        rgba(8,8,8,.98)
      );
    box-shadow: 0 30px 90px rgba(0,0,0,.68);
  }

  .video-modal-top {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 10px;
  }

  .video-modal-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease;
  }

  .video-modal-back:hover {
    background: rgba(217,21,34,.85);
  }

  .video-modal-heading {
    margin: 4px 0 14px;
  }

  .video-modal-heading .eyebrow {
    font-size: 11px;
  }

  .video-modal-heading h2 {
    margin: 5px 0 0;
    color: #fff;
    font-size: 24px;
    line-height: 1.15;
  }

  .video-modal-frame {
    width: min(100%, 390px);
    aspect-ratio: 9 / 16;
    max-height: 62svh;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 15px;
    background: #000;
  }

  .video-modal-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 9 / 16;
    border: 0;
  }


  /* -------------------------------------------------------
     BIBLIOTECA DE ÁUDIO
     Carrossel automático a cada 3 segundos.
     ------------------------------------------------------- */

  .audio-carousel {
    padding: 0 0 34px;
  }

  .audio-carousel .embed-grid {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    gap: 0;
    margin: 0;
    transform: translateX(0);
    will-change: transform;
  }

  .audio-carousel .embed-card {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .audio-carousel .embed-card iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(0,0,0,.32);
  }

  .audio-arrow {
    position: absolute;
    top: 43%;
    z-index: 10;
    display: flex;
    width: 40px;
    height: 40px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 50%;
    background: rgba(10,10,10,.65);
    color: #fff;
    font-size: 27px;
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0,0,0,.35);
  }

  .audio-prev {
    left: 3px;
  }

  .audio-next {
    right: 3px;
  }

  .audio-arrow:disabled {
    opacity: .22;
    cursor: default;
    pointer-events: none;
  }

  .audio-dots {
    position: absolute;
    left: 50%;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transform: translateX(-50%);
  }

  .audio-dots button {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.24);
    cursor: pointer;
    transition:
      width .25s ease,
      background .25s ease;
  }

  .audio-dots button.active {
    width: 22px;
    background: var(--red, #d91522);
  }

}


/* =========================================================
   MOBILE PEQUENO
   ========================================================= */

@media (max-width: 480px) {

  .repertorio-hero .hero-content h1 {
    font-size: 29px;
  }

  .main-video-carousel .video-card {
    padding-left: 18px;
    padding-right: 18px;
  }

  .mobile-play-button {
    width: 56px;
    height: 56px;
  }

  .main-video-arrow {
    width: 38px;
    height: 38px;
    font-size: 25px;
  }

  .audio-carousel .embed-card {
    padding-left: 18px;
    padding-right: 18px;
  }

  .audio-arrow {
    width: 37px;
    height: 37px;
    font-size: 24px;
  }

  .video-modal {
    padding: 10px;
  }

  .video-modal-dialog {
    padding: 12px;
    border-radius: 18px;
    max-height: calc(100svh - 20px);
  }

  .video-modal-frame {
    width: min(100%, 360px);
    max-height: 62svh;
    aspect-ratio: 9 / 16;
  }

  .video-modal-frame iframe {
    width: 100%;
    height: 100%;
  }

  .video-modal-heading h2 {
    font-size: 21px;
  }

}

/* =====================================================
   REPERTÓRIO — REDUÇÃO DOS ESPAÇAMENTOS
   Mantém layout, cards, categorias e configurações.
   ===================================================== */

.repertoire-page .section {
  padding-top: 45px;
  padding-bottom: 45px;
}

/* Aproxima as seções principais sem alterar os componentes */
.repertoire-page .section + .section {
  padding-top: 35px;
}

/* CTA final mais próximo do conteúdo */
.repertoire-page .cta-band {
  margin-top: 0;
  margin-bottom: 0;
}

/* Mantém a versão mobile compacta */
@media (max-width: 820px) {
  .repertoire-page .section {
    padding-top: 35px;
    padding-bottom: 35px;
  }

  .repertoire-page .section + .section {
    padding-top: 28px;
  }
}
