/* =========================================
   IMÁGENES - Banners hero + Galería collage
   Estilo recortado/deportivo moderno
   ========================================= */

/* ===== Page Banner Hero ===== */
.page-banner {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 82%, 0 100%);
  margin-bottom: -1px;
}

.page-banner__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

/* ===== Encuadre individual por página =====
   Ajustá estos valores para mover la foto visible en cada banner.
   Horizontal: left / center / right (o porcentaje como 20%)
   Vertical: top / center / bottom (o porcentaje como 30%)
   Ejemplo: object-position: center 20%  → muestra más arriba
            object-position: left 50%   → desplaza a la izquierda
   ============================================ */
.banner-inicio      .page-banner__img { object-position: center 70%; }
.banner-ranking     .page-banner__img { object-position: center 57%; }
.banner-calendario  .page-banner__img { object-position: center 99%; }
.banner-circuito    .page-banner__img { object-position: center 35%; }
.banner-transparencia .page-banner__img { object-position: center 29%; }
.banner-arbitraje   .page-banner__img { object-position: center 40%; }
.banner-circuito   .page-banner__img { object-position: center 20%; }

.page-banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(11, 15, 12, 0.72) 0%,
    rgba(29, 185, 84, 0.30) 100%
  );
  z-index: 1;
}

.page-banner__gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65%;
  background: linear-gradient(to top, rgba(11, 15, 12, 0.85) 0%, transparent 100%);
  z-index: 1;
}

.page-banner__content {
  position: absolute;
  bottom: 40px;
  left: 32px;
  z-index: 2;
  color: #fff;
}

.page-banner__title {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.page-banner__subtitle {
  margin-top: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.01em;
}

.page-banner__accent {
  height: 4px;
  background: linear-gradient(90deg, #1db954 0%, #ffd500 60%, transparent 100%);
  position: relative;
  z-index: 2;
}

/* ===== Banner responsive ===== */
@media (max-width: 900px) {
  .page-banner {
    height: 220px;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
  }

  .page-banner__content {
    bottom: 32px;
    left: 20px;
  }
}

@media (max-width: 560px) {
  .page-banner {
    height: 180px;
    clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
  }

  .page-banner__content {
    bottom: 28px;
    left: 16px;
  }

  .page-banner__subtitle {
    font-size: 0.85rem;
  }
}

/* ===== Galería Collage ===== */
.galeria-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
}

.galeria-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto;
  gap: 10px;
}

.galeria-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}

.galeria-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.galeria-item:hover img {
  transform: scale(1.06);
}

/* Tamaños variados para collage */
.galeria-item--normal {
  aspect-ratio: 4 / 3;
}

.galeria-item--tall {
  grid-row: span 2;
}

.galeria-item--wide {
  grid-column: span 2;
  aspect-ratio: 16 / 7;
}

/* Recortes angulares deportivos */
.galeria-cut-1 {
  clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
}

.galeria-cut-2 {
  clip-path: polygon(0 8%, 100% 0, 100% 100%, 0 100%);
}

.galeria-cut-3 {
  clip-path: polygon(0 0, 96% 0, 100% 100%, 0 100%);
}

/* Overlay hover con caption */
.galeria-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(11, 15, 12, 0.75) 0%,
    rgba(11, 15, 12, 0.15) 40%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  display: flex;
  align-items: flex-end;
  padding: 14px 16px;
}

.galeria-item:hover .galeria-item__overlay {
  opacity: 1;
}

.galeria-item__caption {
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

/* ===== Galería responsive ===== */
@media (max-width: 900px) {
  .galeria-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .galeria-item--tall {
    grid-row: span 1;
    aspect-ratio: 4 / 3;
  }

  .galeria-item--wide {
    grid-column: span 2;
  }

  .galeria-section {
    padding: 1.3rem;
  }
}

@media (max-width: 560px) {
  .galeria-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .galeria-item--wide {
    grid-column: span 1;
  }

  .galeria-item--normal,
  .galeria-item--tall,
  .galeria-item--wide {
    aspect-ratio: 16 / 9;
  }

  .galeria-section {
    padding: 1rem;
  }

  .galeria-item__overlay {
    opacity: 1;
  }
}

/* ===== Lightbox (modal de imagen) ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
  border: none;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ===== Reduce motion ===== */
@media (prefers-reduced-motion: reduce) {
  .galeria-item img {
    transition: none;
  }

  .galeria-item__overlay {
    transition: none;
  }
}
