/* F17 v7.43 — public matchday gallery and new academy photography */

.gallery-page-hero {
  position: relative;
  min-height: 610px;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
  background-image:
    linear-gradient(90deg, rgba(5,5,5,.94) 0%, rgba(5,5,5,.7) 48%, rgba(5,5,5,.2) 100%),
    var(--gallery-hero-image);
  background-position: center;
  background-size: cover;
}
.gallery-page-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 160px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.42));
  pointer-events: none;
}
.gallery-page-hero .page-hero-content {
  position: relative;
  z-index: 1;
  max-width: 850px;
  padding-top: 150px;
  padding-bottom: 78px;
}
.gallery-page-hero h1 { max-width: 820px; }
.gallery-page-hero p:not(.eyebrow) { max-width: 720px; color: rgba(255,255,255,.82); font-size: 1.08rem; }
.gallery-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.gallery-intro-grid,
.home-matchday-heading,
.matchday-gallery-heading {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 72px;
  align-items: end;
}
.gallery-intro-grid .section-heading,
.home-matchday-heading h2,
.matchday-gallery-heading h2 { margin-bottom: 0; }
.gallery-intro-grid > div:last-child,
.home-matchday-heading > div:last-child,
.matchday-gallery-heading > p { color: var(--muted); }

.home-matchday-section {
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 15%, rgba(212,175,55,.16), transparent 28%),
    linear-gradient(180deg, #fff, #fbf8ef);
}
.home-matchday-heading { margin-bottom: 42px; }
.home-matchday-heading > div:last-child { max-width: 570px; justify-self: end; }
.home-matchday-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 185px;
  gap: 12px;
}
.home-matchday-photo {
  position: relative;
  grid-column: span 3;
  overflow: hidden;
  border-radius: 20px;
  background: #111;
  box-shadow: 0 18px 46px rgba(29,22,7,.12);
}
.home-matchday-photo-featured { grid-column: span 6; grid-row: span 2; }
.home-matchday-photo:nth-child(2),
.home-matchday-photo:nth-child(5) { grid-column: span 3; grid-row: span 2; }
.home-matchday-photo img,
.matchday-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s ease, filter .4s ease;
}
.home-matchday-photo::after,
.matchday-photo-card a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 46%, rgba(0,0,0,.82));
  pointer-events: none;
}
.home-matchday-photo > span,
.matchday-photo-overlay {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: #fff;
}
.home-matchday-photo small,
.matchday-photo-overlay small {
  color: var(--gold-bright);
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.home-matchday-photo strong,
.matchday-photo-overlay strong { font-size: .95rem; line-height: 1.2; }
.home-matchday-photo:hover img,
.matchday-photo-card:hover img { transform: scale(1.045); filter: saturate(1.05); }

.gallery-jump-nav {
  position: sticky;
  top: 76px;
  z-index: 20;
  border-top: 1px solid rgba(212,175,55,.18);
  border-bottom: 1px solid rgba(212,175,55,.24);
  background: rgba(8,8,8,.94);
  backdrop-filter: blur(14px);
}
.gallery-jump-inner {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.gallery-jump-inner > span {
  margin-right: 8px;
  color: rgba(255,255,255,.5);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.gallery-jump-inner a {
  min-width: 72px;
  padding: 8px 15px;
  border: 1px solid rgba(240,207,98,.36);
  border-radius: 999px;
  color: var(--gold-bright);
  text-align: center;
  text-decoration: none;
  font-size: .78rem;
  font-weight: 900;
  transition: .2s ease;
}
.gallery-jump-inner a:hover { color: #111; background: var(--gold-bright); }

.matchday-gallery-section { scroll-margin-top: 138px; }
.matchday-gallery-heading { margin-bottom: 40px; }
.matchday-gallery-heading > p { max-width: 560px; justify-self: end; margin-bottom: 0; }
.matchday-gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 145px;
  gap: 12px;
}
.matchday-photo-card {
  position: relative;
  grid-column: span 4;
  grid-row: span 2;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(191,145,36,.2);
  border-radius: 20px;
  background: #111;
  box-shadow: 0 16px 42px rgba(27,21,8,.09);
}
.matchday-photo-card a { position: absolute; inset: 0; display: block; }
.matchday-photo-featured { grid-column: span 8; grid-row: span 3; }
.matchday-gallery-grid-u10 .matchday-photo-card,
.matchday-gallery-grid-u16 .matchday-photo-card { grid-column: span 6; grid-row: span 3; }
.matchday-gallery-grid-u11 .matchday-photo-card:nth-child(3),
.matchday-gallery-grid-u11 .matchday-photo-card:nth-child(8) { grid-column: span 4; grid-row: span 3; }
.matchday-gallery-grid-u11 .matchday-photo-card:nth-child(6),
.matchday-gallery-grid-u11 .matchday-photo-card:nth-child(11) { grid-column: span 8; grid-row: span 3; }

@media (min-width: 821px) and (max-width: 1280px) {
  .primary-nav { gap: 14px; }
  .primary-nav a,
  .primary-nav button { font-size: .77rem; }
  .gallery-intro-grid,
  .home-matchday-heading,
  .matchday-gallery-heading { gap: 42px; }
}

@media (max-width: 900px) {
  .gallery-page-hero { min-height: 520px; background-position: 62% center; }
  .gallery-page-hero .page-hero-content { padding-top: 120px; padding-bottom: 58px; }
  .gallery-intro-grid,
  .home-matchday-heading,
  .matchday-gallery-heading { grid-template-columns: 1fr; gap: 18px; align-items: start; }
  .home-matchday-heading > div:last-child,
  .matchday-gallery-heading > p { max-width: none; justify-self: stretch; }
  .home-matchday-grid { grid-auto-rows: 150px; }
  .home-matchday-photo { grid-column: span 4; }
  .home-matchday-photo-featured { grid-column: span 8; }
  .gallery-jump-nav { top: 62px; }
  .matchday-gallery-section { scroll-margin-top: 126px; }
}

@media (max-width: 680px) {
  .gallery-page-hero {
    min-height: 470px;
    background-position: 63% center;
  }
  .gallery-page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,.86));
  }
  .gallery-page-hero .page-hero-content { padding: 115px 0 38px; }
  .gallery-page-hero h1 { font-size: clamp(2.4rem, 12vw, 3.5rem); }
  .gallery-page-hero p:not(.eyebrow) { font-size: .9rem; line-height: 1.55; }
  .gallery-hero-actions .button { min-height: 44px; padding: 10px 16px; }

  .gallery-intro-section { padding: 44px 0; }
  .home-matchday-heading,
  .matchday-gallery-heading { margin-bottom: 24px; }
  .home-matchday-heading h2,
  .matchday-gallery-heading h2 { font-size: 2rem; }

  .home-matchday-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 130px;
    gap: 7px;
  }
  .home-matchday-photo,
  .home-matchday-photo:nth-child(2),
  .home-matchday-photo:nth-child(5) { grid-column: span 1; grid-row: span 1; border-radius: 13px; }
  .home-matchday-photo-featured,
  .home-matchday-photo:nth-child(1),
  .home-matchday-photo:nth-child(4) { grid-column: span 2; grid-row: span 2; }
  .home-matchday-photo > span { left: 12px; right: 12px; bottom: 11px; }
  .home-matchday-photo strong { font-size: .8rem; }

  .gallery-jump-inner {
    min-height: 54px;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 8px 0;
    scrollbar-width: none;
  }
  .gallery-jump-inner::-webkit-scrollbar { display: none; }
  .gallery-jump-inner > span { display: none; }
  .gallery-jump-inner a { flex: 0 0 auto; min-width: 68px; padding: 7px 13px; }

  .matchday-gallery-section { padding: 48px 0; scroll-margin-top: 116px; }
  .matchday-gallery-heading > p { font-size: .86rem; line-height: 1.55; }
  .matchday-gallery-grid,
  .matchday-gallery-grid-u10,
  .matchday-gallery-grid-u16 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 126px;
    gap: 7px;
  }
  .matchday-photo-card,
  .matchday-gallery-grid-u10 .matchday-photo-card,
  .matchday-gallery-grid-u16 .matchday-photo-card,
  .matchday-gallery-grid-u11 .matchday-photo-card:nth-child(3),
  .matchday-gallery-grid-u11 .matchday-photo-card:nth-child(8),
  .matchday-gallery-grid-u11 .matchday-photo-card:nth-child(6),
  .matchday-gallery-grid-u11 .matchday-photo-card:nth-child(11) {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 0;
    border-radius: 13px;
  }
  .matchday-photo-featured,
  .matchday-gallery-grid .matchday-photo-card:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
  }
  .matchday-photo-overlay { left: 11px; right: 11px; bottom: 10px; }
  .matchday-photo-overlay strong { font-size: .78rem; }
}

@media (max-width: 390px) {
  .home-matchday-grid,
  .matchday-gallery-grid,
  .matchday-gallery-grid-u10,
  .matchday-gallery-grid-u16 { grid-auto-rows: 112px; }
}
