/* ==========================================================================
   Itaminense — Seção "Álbum do Elenco"

   Desktop: álbum de figurinhas, estrutura do playeralbum.com — fileiras de
            cards com deslocamento vertical alternado sobre fundo listrado.
            SEM a raspadinha da moeda: todos os jogadores já aparecem.
   Mobile:  carrossel horizontal com o card do toulousefc.com
            (.m-playerCard: tag de posição, nome e número sobre a foto).
   ========================================================================== */

.o-album {
  position: relative;
  overflow: hidden;
  padding: var(--section-margin-top) 0 var(--spacing-xxl);
}

.o-album__bg {
  position: absolute;
  inset: 0;
  background-image: url("../images/brand/album-stripes.svg");
  background-size: cover;
  background-position: center;
  pointer-events: none;
}

.o-album > .container,
.o-album__rows {
  position: relative;
  z-index: 1;
}

/* ---- Fileiras ---------------------------------------------------------- */

.o-album__rows {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 75px;
  /* A figurinha mais deslocada desce 51% da própria altura (maior valor de
     ALBUM_OFFSETS, em assets/js/content.js). Como a seção tem overflow
     hidden, esse espaço precisa estar reservado embaixo — senão os cards da
     última fileira ficam cortados. Em cima, 20px cobrem o hover (-10px). */
  padding: 20px 8px calc(var(--card-h) * 0.51 + 40px);
}

.o-album__row {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: center;
  gap: 14.4px;
}

/* ==========================================================================
   Card
   ========================================================================== */

:root {
  --card-w: 183px;
  --card-h: 250px;
}

.a-playerCard {
  flex-shrink: 0;
  width: var(--card-w);
  height: var(--card-h);
  /* deslocamento vertical de cada figurinha, definido inline pelo JS */
  transform: translateY(var(--offset, 0%));
  transition: transform 0.35s cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

.a-playerCard:hover {
  transform: translateY(calc(var(--offset, 0%) - 10px));
}

/* moldura branca da figurinha */
.a-playerCard__frame {
  width: 100%;
  height: 100%;
  padding: calc(var(--card-w) * 0.045);
  background-color: var(--color-white);
  border-radius: calc(var(--card-w) * 0.08);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
}

.a-playerCard__inner {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: calc(var(--card-w) * 0.055);
  background-image: linear-gradient(
    170deg,
    var(--color-secondary) 0%,
    var(--color-primary) 55%,
    var(--color-demi-blue) 100%
  );
}

.a-playerCard__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* escurece o pé do card para o nome ficar legível */
.a-playerCard__inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 28, 63, 0) 45%,
    rgba(10, 28, 63, 0.75) 100%
  );
  pointer-events: none;
}

/* brilho diagonal que atravessa a figurinha */
.a-playerCard__shine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 55%;
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(255, 255, 255, 0.06) 38%,
    rgba(255, 255, 255, 0.28) 50%,
    rgba(255, 255, 255, 0.06) 62%,
    transparent 80%
  );
  pointer-events: none;
  z-index: 3;
  transition: left 0.6s ease;
}

.a-playerCard:hover .a-playerCard__shine {
  left: 120%;
}

/* ---- Textos ------------------------------------------------------------ */

.a-playerCard__info {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 6%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  color: var(--color-white);
}

.a-playerCard__number {
  font-family: var(--font-display);
  font-size: calc(var(--card-w) * 0.17);
  line-height: 1;
  margin-bottom: 2px;
}

.a-playerCard__first {
  font-family: var(--font-title);
  font-size: calc(var(--card-w) * 0.062);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.a-playerCard__last {
  font-family: var(--font-title);
  font-size: calc(var(--card-w) * 0.105);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

/* escudo no canto inferior direito */
.a-playerCard__crest {
  position: absolute;
  right: 7%;
  bottom: 6%;
  z-index: 2;
  width: calc(var(--card-w) * 0.16);
  height: auto;
  opacity: 0.95;
}

/* elementos exclusivos do card mobile */
.a-playerCard__position,
.a-playerCard__link {
  display: none;
}

/* ==========================================================================
   Mobile — card e carrossel no estilo Toulouse
   ========================================================================== */

@media (max-width: 768px) {
  :root {
    --card-w: 210px;
    --card-h: 284px;
  }

  .o-album {
    padding: var(--spacing-xl) 0 var(--spacing-xl);
  }

  /* as fileiras viram uma faixa horizontal com rolagem por toque */
  .o-album__rows {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 12px;
    /* no mobile não há deslocamento, então o respiro extra não é necessário */
    padding: 4px 20px 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .o-album__rows::-webkit-scrollbar {
    display: none;
  }

  /* achata as fileiras: os cards viram filhos diretos da faixa */
  .o-album__row {
    display: contents;
  }

  .a-playerCard {
    scroll-snap-align: start;
    transform: none;
  }

  .a-playerCard:hover {
    transform: none;
  }

  /* sem moldura branca: o card é a própria foto arredondada */
  .a-playerCard__frame {
    padding: 0;
    border-radius: 18px;
    background: none;
    box-shadow: none;
  }

  .a-playerCard__inner {
    border-radius: 18px;
  }

  /* tag de posição no topo esquerdo */
  .a-playerCard__position {
    display: block;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 3px 8px 2px;
    border-radius: 3px;
    background-color: var(--color-accent);
    color: var(--color-text);
    font-family: var(--font-title);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  /* nome embaixo à esquerda, número embaixo à direita */
  .a-playerCard__info {
    left: 14px;
    right: 56px;
    bottom: 38px;
  }

  .a-playerCard__number {
    position: absolute;
    right: -46px;
    bottom: 0;
    font-family: var(--font-title);
    font-size: 30px;
    font-weight: 600;
    margin: 0;
  }

  .a-playerCard__first {
    font-size: 12px;
  }

  .a-playerCard__last {
    font-size: 19px;
  }

  .a-playerCard__crest {
    display: none;
  }

  /* link "Conheça" no pé do card */
  .a-playerCard__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 12px;
    z-index: 2;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--color-white);
    font-family: var(--font-title);
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .a-playerCard__shine {
    display: none;
  }
}

@media (max-width: 480px) {
  :root {
    --card-w: 188px;
    --card-h: 254px;
  }
}
