/* Versión B: misma base (estilos.css) con fotografía a sangre y bandas oscuras. */

:root {
  --noche: #0b1d2c;              /* azul noche para bandas sobre foto */
  --sobre-foto: #ffffff;         /* texto sobre fotografía, igual en ambos temas */
  --sobre-foto-suave: rgba(255, 255, 255, 0.82);
}

/* Portada a sangre */
.hero {
  position: relative;
  isolation: isolate;
  color: var(--sobre-foto);
  background: var(--noche);
  overflow: hidden;
}
.hero-foto {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 22, 34, 0.86) 0%, rgba(8, 22, 34, 0.55) 55%, rgba(8, 22, 34, 0.15) 100%),
    linear-gradient(0deg, rgba(8, 22, 34, 0.6) 0%, rgba(8, 22, 34, 0) 40%);
}
.hero .contenedor {
  display: grid;
  gap: 1.25rem;
  padding-block: clamp(5rem, 12vw, 9rem) clamp(4rem, 9vw, 7rem);
}
.hero-sello {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  background: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}
.hero-sello img { width: 72%; height: auto; }
.hero .antetitulo { color: var(--sobre-foto-suave); }
.hero h1 {
  font-size: clamp(2.6rem, 6vw + 1rem, 5.2rem);
  line-height: 0.98;
  max-width: 14ch;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.hero .bajada { color: var(--sobre-foto-suave); font-size: clamp(1.1rem, 0.6vw + 1rem, 1.35rem); max-width: 36rem; }
.hero .boton { background: var(--sobre-foto); color: #0b1d2c; border-color: var(--sobre-foto); }
.hero .boton:hover { background: transparent; color: var(--sobre-foto); border-color: var(--sobre-foto); }
.hero .boton.secundario { background: transparent; color: var(--sobre-foto); }
.hero .boton.secundario:hover { background: var(--sobre-foto); color: #0b1d2c; }
.hero-credito {
  position: absolute;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: 0.6rem;
  font-family: var(--f-dato);
  font-size: 0.68rem;
  color: var(--sobre-foto-suave);
}

/* Banda de cifras */
.cifras { background: var(--noche); color: var(--sobre-foto); }
.cifras .contenedor {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1rem 2rem;
  padding-block: 1.75rem;
}
.cifra { display: grid; gap: 0.1rem; border-left: 3px solid var(--senal); padding-left: 1rem; }
.cifra strong { font-family: var(--f-titulo); font-size: 2rem; font-weight: 700; line-height: 1.1; }
.cifra span { font-size: 0.92rem; color: var(--sobre-foto-suave); }

/* Mosaico de disciplinas */
.mosaico {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(11rem, 18vw, 15rem);
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.mosaico li {
  position: relative;
  overflow: hidden;
  border-radius: var(--radio);
  background: var(--noche);
}
.mosaico li.grande { grid-column: span 2; grid-row: span 2; }
.mosaico li.ancha { grid-column: span 2; }
.mosaico img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}
.mosaico li:hover img { transform: scale(1.04); }
.mosaico li::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(8, 22, 34, 0.78) 0%, rgba(8, 22, 34, 0) 55%);
}
.mosaico span {
  position: absolute;
  left: 1rem;
  bottom: 0.8rem;
  z-index: 1;
  color: var(--sobre-foto);
  font-family: var(--f-titulo);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.mosaico li.grande span { font-size: 2.3rem; }

/* Dos columnas: texto + fines */
.dos-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem 4rem;
  align-items: start;
}
.dos-col .fines { grid-template-columns: minmax(0, 1fr); gap: 0.85rem; }

/* Tira de clubes */
.tira {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.tira a {
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--tinta);
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.25;
}
.tira img {
  width: 100%;
  max-width: 8rem;
  aspect-ratio: 1;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 0.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tira a:hover img { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(8, 22, 34, 0.15); }

/* Banda con foto */
.banda-foto {
  position: relative;
  isolation: isolate;
  color: var(--sobre-foto);
  background: var(--noche);
  overflow: hidden;
}
.banda-foto > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.banda-foto::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(8, 22, 34, 0.62);
}
.banda-foto .contenedor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: clamp(3.5rem, 8vw, 5.5rem);
}
.banda-foto p { font-family: var(--f-titulo); font-size: clamp(1.7rem, 2vw + 1rem, 2.6rem); font-weight: 600; max-width: 22ch; line-height: 1.1; }
.banda-foto .boton { background: var(--sobre-foto); color: #0b1d2c; border-color: var(--sobre-foto); }
.banda-foto .boton:hover { background: transparent; color: var(--sobre-foto); }

/* Cabecera de páginas interiores con foto */
.cabecera.con-foto {
  position: relative;
  isolation: isolate;
  background: var(--noche);
  color: var(--sobre-foto);
  border-bottom: 0;
  overflow: hidden;
}
.cabecera.con-foto > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.cabecera.con-foto::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(8, 22, 34, 0.85) 0%, rgba(8, 22, 34, 0.35) 100%);
}
.cabecera.con-foto .contenedor { padding-block: clamp(3.5rem, 9vw, 6rem); }
.cabecera.con-foto h1 { text-transform: uppercase; font-size: clamp(2.4rem, 4vw + 1rem, 4rem); }
.cabecera.con-foto p { color: var(--sobre-foto-suave); }

/* Créditos */
.creditos { display: grid; gap: 0.75rem; list-style: none; margin: 0; padding: 0; }
.creditos li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; align-items: center; font-size: 0.95rem; }
.creditos img { width: 7.5rem; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radio); }
.pie a { color: var(--suave); }

@media (max-width: 900px) {
  .mosaico { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mosaico li.ancha { grid-column: span 2; }
  .tira { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dos-col { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .mosaico { grid-auto-rows: 10rem; }
  .mosaico li.grande { grid-row: span 2; }
  .mosaico span { font-size: 1.3rem; }
  .mosaico li.grande span { font-size: 1.8rem; }
  .hero::after { background: linear-gradient(0deg, rgba(8, 22, 34, 0.9) 0%, rgba(8, 22, 34, 0.55) 100%); }
}
@media (prefers-reduced-motion: reduce) {
  .mosaico img, .tira img { transition: none; }
}

/* Encuadres */
.hero-foto { object-position: 78% center; }
.mosaico li.grande img { object-position: center 85%; }
/* Mosaico sin etiquetas: degradé más suave */
.mosaico li::after { background: linear-gradient(0deg, rgba(8, 22, 34, 0.25) 0%, rgba(8, 22, 34, 0) 45%); }

/* Collage de fotos propias */
.mosaico { grid-auto-flow: dense; }
.mosaico li.alta { grid-row: span 2; }
.mosaico li::after { content: none; }
.hero-foto { object-position: center 60%; }
@media (max-width: 520px) { .mosaico li.alta { grid-row: span 2; } }

/* Portada dividida: texto a la izquierda, foto vertical a la derecha */
.hero.dividida {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: stretch;
}
.hero.dividida::after { content: none; }
.hero-texto {
  display: grid;
  gap: 1.25rem;
  align-content: center;
  padding-block: clamp(3.5rem, 8vw, 6rem);
  padding-left: max(16px, env(safe-area-inset-left, 0px), calc((100vw - var(--ancho)) / 2 + 16px));
  padding-right: clamp(1.5rem, 4vw, 4rem);
  background:
    radial-gradient(120% 80% at 0% 100%, rgba(47, 93, 115, 0.45) 0%, rgba(11, 29, 44, 0) 60%),
    var(--noche);
}
.hero-lado { margin: 0; min-height: 100%; position: relative; }
.hero-lado img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}
@media (max-width: 760px) {
  .hero.dividida { grid-template-columns: minmax(0, 1fr); }
  .hero-texto { padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .hero-lado { min-height: 0; aspect-ratio: 4 / 3; max-width: 100%; }
}

/* Collage de 10 fotos: disposición fija en escritorio */
@media (min-width: 901px) {
  .mosaico {
    grid-template-areas:
      "a a b c"
      "a a b d"
      "e f g g"
      "e h i j";
  }
  .mosaico li { grid-column: auto; grid-row: auto; }
  .mosaico li.t-a { grid-area: a; } .mosaico li.t-b { grid-area: b; } .mosaico li.t-c { grid-area: c; }
  .mosaico li.t-d { grid-area: d; } .mosaico li.t-e { grid-area: e; } .mosaico li.t-f { grid-area: f; }
  .mosaico li.t-g { grid-area: g; } .mosaico li.t-h { grid-area: h; } .mosaico li.t-i { grid-area: i; }
  .mosaico li.t-j { grid-area: j; }
}
/* En pantallas chicas: grande, altas y ancha con sus tramos */
@media (max-width: 900px) {
  .mosaico li.t-a { grid-column: span 2; grid-row: span 2; }
  .mosaico li.t-b, .mosaico li.t-e { grid-row: span 2; }
  .mosaico li.t-g { grid-column: span 2; }
}

/* Portada: la foto se funde con el fondo y no recorta los costados */
.hero.dividida { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
.hero-texto { position: relative; z-index: 1; background: transparent; }
.hero.dividida { background:
    radial-gradient(90% 70% at 0% 100%, rgba(47, 93, 115, 0.45) 0%, rgba(11, 29, 44, 0) 60%),
    var(--noche); }
.hero-lado { margin-left: -9rem; }
.hero-lado img {
  object-position: center 62%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 30%);
          mask-image: linear-gradient(to right, transparent 0%, #000 30%);
}
@media (max-width: 760px) {
  .hero-lado { margin-left: 0; aspect-ratio: 4 / 3.4; }
  .hero-lado img {
    object-position: center 60%;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 28%);
            mask-image: linear-gradient(to bottom, transparent 0%, #000 28%);
  }
}
@media (max-width: 760px) { .hero.dividida { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .hero-lado { aspect-ratio: 4 / 5.6; margin-top: -2rem; }
  .hero-lado img { object-position: center 70%; }
}
@media (min-width: 761px) {
  .hero.dividida { min-height: 40rem; }
  .hero-lado img { object-position: center 15%; }
}
@media (min-width: 761px) {
  .hero.dividida { grid-template-columns: minmax(0, 1fr) auto; min-height: 0; }
  .hero-lado {
    margin-left: 0;
    height: 100%;
    min-height: 38rem;
    aspect-ratio: 718 / 1080;
    width: auto;
  }
  .hero-lado img {
    object-position: center center;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 16%);
            mask-image: linear-gradient(to right, transparent 0%, #000 16%);
  }
}

/* Celular: texto sobre la foto, que se funde hacia arriba con el fondo */
@media (max-width: 760px) {
  .hero.dividida { display: grid; grid-template-columns: minmax(0, 1fr); }
  .hero-texto { grid-area: 1 / 1; padding-bottom: clamp(9rem, 38vw, 13rem); }
  .hero-lado {
    grid-area: 1 / 1;
    position: relative;
    aspect-ratio: auto;
    margin: 0;
    min-height: 0;
    z-index: 0;
  }
  .hero-lado img {
    object-position: center 78%;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.35) 40%, #000 78%);
            mask-image: linear-gradient(to bottom, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.35) 40%, #000 78%);
  }
}
@media (max-width: 760px) {
  .hero-texto { padding-bottom: clamp(10rem, 48vw, 16rem); }
  .hero-lado { overflow: hidden; }
  .hero-lado img { top: auto; bottom: 0; height: auto; min-height: 100%; object-fit: cover; object-position: center bottom; }
}
@media (max-width: 760px) {
  .hero-lado img { min-height: 0; }
  .hero-texto { padding-bottom: clamp(8rem, 40vw, 14rem); }
}
@media (max-width: 760px) { .hero-texto { padding-bottom: clamp(12rem, 56vw, 20rem); } }
@media (max-width: 760px) {
  .hero-lado img {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.4) 35%, #000 72%);
            mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.4) 35%, #000 72%);
  }
}
