/* League Fixtures & Results page only: the photo/tint added on top of
   base.css's shared .page-header banner, plus teams, and achievements.
   Loads after base.css. */

/* Club name in the dark header banner: same treatment as the Home hero (.hero-sub-highlight in home.css) */
.page-header-body .hero-sub-highlight { white-space: nowrap; font-family: var(--font-display); font-size: 1.15em; font-weight: 700; color: var(--white); }

/* ================= PAGE HEADER PHOTO =================
   Landscape photo, right-aligned at header height with a slanted left edge; cropped
   (not stretched) to the panel, light rays from above down to the bats. No tint. */
.page-header-image {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 32rem;
  object-fit: cover;
  object-position: 85% 50%; /* landscape photo: keeps light rays and both bats clear of the edges */
  clip-path: polygon(22% 0, 100% 0, 100% 100%, 0% 100%);
}

/* ================= TEAMS ================= */
.teams { padding: 3.5rem 0; background: var(--white); }
.teams-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 3rem; align-items: start; }
/* The eyebrow sits above both columns, so the carousel top lines up with the heading; 3px matches the glyph-top offset used on Home */
.teams-media { margin-top: 3px; filter: drop-shadow(0 20px 28px rgba(11, 18, 32, 0.2)); }
/* Carousel: same markup and mechanics as the Home About carousels (js/main.js drives any
   .group-carousel); the rules are repeated here because home.css is not loaded on this page. */
.group-carousel {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 92%, 8% 100%);
}
.group-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0s 1.6s; }
.group-slide.is-active { opacity: 1; z-index: 1; transition: opacity 1.6s ease-in-out; }
.group-slide-img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; display: block; transform-origin: 50% 40%; }
.group-slide.is-active .group-slide-img,
.group-slide.is-leaving .group-slide-img {
  animation: groupZoom calc(var(--gc-interval, 7800ms) + 1.6s) ease-out forwards;
}
@keyframes groupZoom { from { transform: scale(1.14); } to { transform: scale(1); } }
.group-dots { display: flex; justify-content: flex-end; gap: 0.25rem; margin-top: 0.4rem; padding-right: 0.25rem; }
.group-dot {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.group-dot::before, .group-dot::after {
  content: "";
  grid-area: 1 / 1;
  width: 28px;
  height: 6px;
  background: rgba(11, 18, 32, 0.22);
  transform: skewX(-30deg);
  transition: background 0.3s, width 0.3s, transform 0.15s var(--ease-sharp);
}
.group-dot:hover::before { background: rgba(29, 78, 216, 0.55); }
.group-dot:active::before { transform: skewX(-30deg) scaleY(1.6); }
.group-dot::after { background: var(--royal-blue); opacity: 0; transition: none; }
.group-dot.is-active::before, .group-dot.is-active::after { width: 40px; }
.group-dot.is-active::before { background: rgba(29, 78, 216, 0.25); }
.group-dot.is-active::after { opacity: 1; }
.group-dot.is-counting::after { transform-origin: left center; animation: groupCountdown var(--gc-interval, 7800ms) linear forwards; }
@keyframes groupCountdown { from { transform: skewX(-30deg) scaleX(0); } to { transform: skewX(-30deg) scaleX(1); } }
.group-dot:focus-visible { outline: 2px solid var(--royal-blue); outline-offset: -4px; }
@media (prefers-reduced-motion: reduce) {
  .group-slide, .group-slide.is-active { transition: none; }
  .group-slide.is-active .group-slide-img,
  .group-slide.is-leaving .group-slide-img { animation: none; }
  .group-dot.is-counting::after { animation: none; }
}
.teams-callout {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 1rem;
  row-gap: 0.6rem;
  max-width: 620px;
  margin-top: 1.75rem;
  padding: 1.5rem;
  background: rgba(29, 78, 216, 0.045);
  border: 1px solid rgba(11, 18, 32, 0.08);
  border-left: 4px solid var(--royal-blue);
}
.teams-callout { position: relative; isolation: isolate; overflow: hidden; }
.teams-callout::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  aspect-ratio: 2449 / 2800;
  background: url("../media/league-season-backdrop.jpg") right center / auto 100% no-repeat;
  z-index: -1;
}
@media (max-width: 520px) { .teams-callout::before { opacity: 0.16; } }
.teams-callout > div { display: contents; }
.teams-callout svg { width: 28px; height: 28px; color: var(--royal-blue); flex-shrink: 0; }
.teams-callout-value {
  display: block;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  text-transform: uppercase;
  color: var(--ink);
}
.teams-callout-list { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; font-size: 1.05rem; line-height: 1.6; color: rgba(11, 18, 32, 0.75); }
.teams-callout-list li + li { margin-top: 0.15rem; }

/* ================= ACHIEVEMENTS ================= */
.achievements { padding: 3.5rem 0; background: rgba(29, 78, 216, 0.045); border-top: 4px solid var(--royal-blue); }
.achievements .section-body { max-width: none; }
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.75rem;
  margin-top: 2.5rem;
}
.achievement-card { grid-column: span 2; display: flex; flex-direction: column; gap: 0.9rem; }
.achievement-image {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  clip-path: polygon(0 0, 100% 0, 100% 92%, 8% 100%);
  box-shadow: 0 14px 28px rgba(11, 18, 32, 0.16);
}
/* Landscape photo: spans two columns and keeps its own 4:3 shape (no cropping) so every figure stays in frame; gentler diagonal so the corners lose little */
/* Landscape photos span half the row (3 of 6 tracks) so two sit side by side, un-cropped at 4:3 */
.achievement-card--wide { grid-column: span 3; }
.achievement-card--wide .achievement-image { aspect-ratio: 4 / 3; clip-path: polygon(0 0, 100% 0, 100% 94%, 4% 100%); }
.achievement-caption { font-size: 1.05rem; line-height: 1.5; color: rgba(11, 18, 32, 0.75); margin: 0; }

/* ---------- Responsive ---------- */
/* Too narrow to sit beside the text: becomes a faint full-width backdrop */
@media (max-width: 1000px) {
  .page-header-image { height: 100%; width: 100%; object-fit: cover; object-position: 70% 50%; opacity: 0.22; clip-path: none; }
}

@media (max-width: 860px) {
  .teams-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .teams-media { margin-top: 0; }
  .group-dots { justify-content: center; }
  .achievements-grid { grid-template-columns: repeat(4, 1fr); }
  .achievement-card--wide { grid-column: span 2; }
}

@media (max-width: 520px) {
  .achievements-grid { grid-template-columns: 1fr; }
  .achievement-card, .achievement-card--wide { grid-column: auto; }
  .achievement-card--wide .achievement-image { clip-path: polygon(0 0, 100% 0, 100% 94%, 8% 100%); }
}
