@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,700;0,800;0,900;1,800;1,900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

@property --fade-start {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

@property --fade-end {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

:root {
  color-scheme: dark;
  --bg-primary: #06070b;
  --bg-secondary: #0d0f17;
  --surface: #121521;
  --surface-elevated: #191d2e;
  --surface-card: #131724;
  --border-subtle: rgba(245, 184, 0, 0.16);
  --border-strong: rgba(245, 184, 0, 0.48);
  --accent: #f5b800;
  --accent-bright: #ffe055;
  --accent-deep: #b38000;
  --crimson-barca: #9b1c31;
  --text-primary: #f9fafb;
  --text-secondary: #c5cbe0;
  --text-muted: #858ea8;
  --win: #22c55e;
  --draw: #eab308;
  --loss: #ef4444;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --font-display: 'Barlow Condensed', Impact, 'Arial Narrow', sans-serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --shadow-gold: 0 14px 38px -8px rgba(245, 184, 0, 0.28);
  --shadow-dark: 0 22px 50px rgba(0, 0, 0, 0.68);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

body {
  margin: 0;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  inline-size: min(1360px, 100% - 2.5rem);
  margin-inline: auto;
}

/* ==========================================================================
   1. SUPERCLUB GLOBAL UTILITY BAR (FC Barcelona / Real Madrid Top Bar)
   ========================================================================== */
.utility-bar {
  background: #030407;
  border-block-end: 1px solid rgba(245, 184, 0, 0.14);
  font-size: 0.76rem;
  padding-block: 0.42rem;
}

.utility-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.utility-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.club-motto-pill {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  color: var(--accent-bright);
  text-transform: uppercase;
}

.utility-divider {
  color: rgba(255, 255, 255, 0.2);
}

.utility-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.util-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.util-link:hover,
.util-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent-bright);
  background: rgba(245, 184, 0, 0.12);
}

.util-link.gold-pill {
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  color: #05060a;
  font-weight: 800;
}

/* ==========================================================================
   2. ADAPTIVE EUROPEAN SUPERCLUB NAVBAR (modern-web-guidance: navbar)
   ========================================================================== */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 50;
  background: rgba(6, 7, 11, 0.92);
  backdrop-filter: blur(18px);
  border-block-end: 2px solid var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.site-header.is-measuring,
.site-header.is-measuring * {
  transition: none !important;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding-block: 0.65rem;
}

.header-inner > * {
  flex-shrink: 0;
  white-space: nowrap;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-crest {
  inline-size: 56px;
  block-size: 64px;
  filter: drop-shadow(0 4px 12px rgba(245, 184, 0, 0.35));
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 0.95;
  color: #ffffff;
  text-transform: uppercase;
}

.brand-subtitle {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-block-start: 0.2rem;
}

.site-header {
  .menu-button {
    anchor-name: --menu-button;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--surface-elevated);
    color: var(--accent-bright);
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
  }

  .site-menu {
    position: fixed;
    inset: auto;
    /* Fallback offset before anchor() as required by navbar guide */
    inset-block-start: 4.85rem;
    inset-block-start: anchor(--menu-button bottom);
    inset-inline-end: 1rem;
    inline-size: min(84dvw, 24rem);
    max-inline-size: calc(100dvw - 2rem);
    block-size: fit-content;
    max-block-size: calc(100dvh - 6rem);
    margin-block-start: 0.5rem;
    overflow: auto;
    list-style: none;
    padding: 0.85rem;
    background: var(--surface-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-dark);
  }
}

[popover]:is(:popover-open, .\:popover-open) {
  display: grid;
  gap: 0.35rem;
}

.site-menu a {
  display: block;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  position: relative;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.site-menu a:hover,
.site-menu a:focus-visible {
  color: #ffffff;
  background: rgba(245, 184, 0, 0.12);
}

/* Indicating current page with shape + 3:1 contrast (WCAG 1.4.1) */
.site-menu a[aria-current="page"] {
  color: var(--accent-bright);
  background: rgba(245, 184, 0, 0.1);
}

.site-menu a[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset-inline: 0.85rem;
  inset-block-end: 0.18rem;
  border-block-end: 3px solid var(--accent);
}

.site-header.is-wide {
  .menu-button {
    display: none;
  }

  .site-menu {
    position: static;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    inline-size: auto;
    max-inline-size: none;
    block-size: auto;
    max-block-size: none;
    overflow: visible;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .site-menu::backdrop {
    display: none;
  }
}

/* ==========================================================================
   3. MATCHDAY BROADCAST TICKER RIBBON (Like fcbarcelona.com Match Strip)
   ========================================================================== */
.matchday-strip {
  background: linear-gradient(90deg, #0b0d15 0%, #171b2a 50%, #0b0d15 100%);
  border-block-end: 1px solid var(--border-subtle);
  padding-block: 0.65rem;
}

.matchday-strip-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
}

@media (max-width: 980px) {
  .matchday-strip-grid {
    grid-template-columns: 1fr;
  }
}

.strip-countdown-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(245, 184, 0, 0.1);
  border: 1px solid var(--border-strong);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
}

.strip-cd-label {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

.strip-cd-numbers {
  display: flex;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.strip-cd-numbers span {
  background: #06070b;
  padding: 0.12rem 0.45rem;
  border-radius: 5px;
  border: 1px solid rgba(245, 184, 0, 0.3);
  color: #ffffff;
}

.strip-scores-scroller {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.strip-scores-scroller::-webkit-scrollbar {
  display: none;
}

.mini-score-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.mini-score-pill .comp-tag {
  font-weight: 800;
  color: var(--accent);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.mini-score-pill .score-badge {
  background: var(--accent);
  color: #05060a;
  font-weight: 900;
  padding: 0.08rem 0.42rem;
  border-radius: 4px;
}

/* ==========================================================================
   4. HERO CAROUSEL (modern-web-guidance: carousel & optimize-image-priority)
   ========================================================================== */
.hero-carousel {
  position: relative;
  border-block-end: 2px solid var(--border-strong);
  background: #05060a;
}

.carousel-track {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: manipulation;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .carousel-track {
    scroll-behavior: smooth;
  }
}

.carousel-track > * {
  flex: 0 0 100%;
  scroll-snap-align: center;
}

/* Continuous looping parking rules gated behind @supports for sibling-index() */
@supports (order: sibling-index()) {
  .carousel-track > :first-child {
    order: clamp(0, var(--current) - (sibling-count() - 3), 1);
  }

  .carousel-track > :last-child {
    order: calc(-1 * clamp(0, 2 - var(--current), 1));
  }
}

.hero-slide {
  position: relative;
  min-block-size: clamp(500px, 68dvh, 720px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 6, 10, 0.95) 0%, rgba(5, 6, 10, 0.82) 48%, rgba(5, 6, 10, 0.25) 100%);
  z-index: 1;
}

.hero-slide-content {
  position: relative;
  z-index: 2;
  max-inline-size: 740px;
  padding-block: 3.5rem 4.5rem;
}

.slide-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--accent);
  color: #05060a;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.85rem;
  border-radius: 4px;
  margin-block-end: 1rem;
}

.slide-headline {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.4vw, 4.6rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.96;
  letter-spacing: 0.01em;
  margin: 0 0 1.1rem;
  color: #ffffff;
  text-shadow: 0 8px 26px rgba(0, 0, 0, 0.8);
}

.slide-headline .gold {
  color: var(--accent-bright);
}

.slide-lead {
  font-size: 1.08rem;
  color: var(--text-secondary);
  margin: 0 0 1.75rem;
  max-inline-size: 60ch;
}

.slide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.carousel-controls {
  position: absolute;
  inset-block-end: 1.5rem;
  inset-inline-end: max(1.5rem, calc((100% - 1360px) / 2 + 1.25rem));
  z-index: 10;
  display: flex;
  gap: 0.5rem;
  pointer-events: none;
}

.carousel-controls button {
  pointer-events: auto;
  touch-action: manipulation;
  background: rgba(18, 21, 33, 0.88);
  color: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.95rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.carousel-controls button:hover,
.carousel-controls button:focus-visible {
  background: var(--accent);
  color: #05060a;
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

.carousel-markers {
  position: absolute;
  inset-block-end: 1.65rem;
  inset-inline-start: max(1.5rem, calc((100% - 1360px) / 2 + 1.25rem));
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.carousel-markers button {
  touch-action: manipulation;
  inline-size: 38px;
  block-size: 6px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: inline-size 0.2s ease, background-color 0.2s ease;
}

.carousel-markers button[aria-current="true"] {
  inline-size: 64px;
  background: var(--accent-bright);
}

.carousel-markers button:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

/* ==========================================================================
   BUTTONS & SECTION HEADERS (FC Barcelona Editorial Typography)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.4rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-gold {
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  color: #05060a;
  box-shadow: var(--shadow-gold);
}

.btn-outline {
  background: rgba(245, 184, 0, 0.08);
  color: var(--accent-bright);
  border-color: var(--border-strong);
}

.btn-sm {
  padding: 0.42rem 0.88rem;
  font-size: 0.88rem;
}

.section {
  padding-block: 4.5rem;
  border-block-end: 1px solid var(--border-subtle);
  position: relative;
}

.section-alt {
  background: linear-gradient(180deg, #0a0c14 0%, #06070b 100%);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-block-end: 2.5rem;
  border-inline-start: 5px solid var(--accent);
  padding-inline-start: 1.15rem;
}

.section-kicker {
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1;
  margin: 0.15rem 0 0;
}

.section-desc {
  color: var(--text-secondary);
  max-inline-size: 68ch;
  margin: 0.45rem 0 0;
  font-size: 0.96rem;
}

/* ==========================================================================
   5. 1916 TV+ STREAMING HUB (Barça TV+ / RM Play Style)
   ========================================================================== */
.tv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.35rem;
}

.tv-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tv-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-gold);
}

.tv-thumb {
  position: relative;
  block-size: 175px;
  background:
    radial-gradient(circle at 75% 25%, rgba(245, 184, 0, 0.35), transparent 55%),
    linear-gradient(135deg, #1a1f33 0%, #090b12 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-block-end: 2px solid var(--accent);
}

.play-circle {
  inline-size: 58px;
  block-size: 58px;
  border-radius: 50%;
  background: var(--accent);
  color: #05060a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 900;
  box-shadow: 0 0 0 8px rgba(245, 184, 0, 0.2);
  transition: transform 0.2s ease;
}

.tv-card:hover .play-circle {
  transform: scale(1.1);
}

.tv-duration {
  position: absolute;
  inset-block-end: 0.6rem;
  inset-inline-end: 0.65rem;
  background: rgba(0, 0, 0, 0.85);
  color: var(--accent-bright);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.88rem;
  padding: 0.12rem 0.5rem;
  border-radius: 4px;
}

.tv-body {
  padding: 1.2rem;
}

.tv-cat {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-transform: uppercase;
}

.tv-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0.35rem 0 0.65rem;
  line-height: 1.35;
}

.tv-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   6. PALMARÈS / KUPA MÜZESİ & ASIRLIK TARİHÇE (Barça Museum Style)
   ========================================================================== */
.trophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 1.25rem;
  margin-block-end: 3rem;
}

.trophy-card {
  background: linear-gradient(160deg, #1b1f30 0%, #0e1019 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.trophy-year {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--accent-bright);
  line-height: 1;
}

.trophy-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  text-transform: uppercase;
  margin: 0.4rem 0 0.2rem;
}

.trophy-sub {
  font-size: 0.8rem;
  font-weight: 700;
  color: #4ade80;
  margin-block-end: 0.65rem;
}

.trophy-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin: 0;
}

.timeline {
  position: relative;
  display: grid;
  gap: 1.25rem;
  padding-inline-start: 1.5rem;
  border-inline-start: 3px solid var(--border-strong);
}

.timeline-item {
  position: relative;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.5rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  inset-inline-start: -2.05rem;
  inset-block-start: 1.5rem;
  inline-size: 14px;
  block-size: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(245, 184, 0, 0.25);
}

.tl-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-block-end: 0.4rem;
}

.tl-year {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--accent-bright);
}

.tl-badge {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: rgba(245, 184, 0, 0.15);
  color: var(--accent-bright);
  text-transform: uppercase;
}

.tl-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 0.4rem;
}

.tl-summary {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* ==========================================================================
   7. RESPONSIVE LEAGUE TABLE & FIXTURES (modern-web-guidance: responsive-table)
   ========================================================================== */
.standings-and-fixtures {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 1.75rem;
  align-items: start;
}

@media (max-width: 1080px) {
  .standings-and-fixtures {
    grid-template-columns: 1fr;
  }
}

.table-wrapper {
  overflow: auto;
  max-inline-size: 100%;
  max-block-size: min(650px, 82vh);
  container-type: inline-size;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-dark);
}

.table-wrapper:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.table-wrapper table {
  inline-size: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}

.table-wrapper caption {
  text-align: start;
  padding: 1rem 1.15rem;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-bright);
  background: var(--surface-elevated);
  border-block-end: 1px solid var(--border-subtle);
}

/* Sticky column headers (desktop) */
.table-wrapper thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 1;
  background: var(--surface-elevated);
}

.table-wrapper th,
.table-wrapper td {
  padding: 0.68rem 0.75rem;
  text-align: center;
  border-block-end: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

.table-wrapper thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 800;
  background: var(--surface-elevated);
}

.table-wrapper thead th:first-child,
.table-wrapper tbody th {
  text-align: start;
}

/* Sticky row headers (desktop) */
.table-wrapper tbody th {
  position: sticky;
  inset-inline-start: 0;
  background: var(--surface-card);
  font-weight: 700;
  color: var(--text-primary);
  z-index: 0;
}

.table-wrapper tr.highlight-bitlis td,
.table-wrapper tr.highlight-bitlis th {
  background: #2b2309;
  color: var(--accent-bright);
  font-weight: 800;
  border-block-color: rgba(245, 184, 0, 0.45);
}

.rank-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 24px;
  block-size: 24px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  margin-inline-end: 0.5rem;
  background: rgba(255, 255, 255, 0.07);
}

tr.zone-champion .rank-pill {
  background: #22c55e;
  color: #052e16;
}

tr.zone-playoff .rank-pill {
  background: #3b82f6;
  color: #eff6ff;
}

tr.zone-bitlis .rank-pill {
  background: var(--accent);
  color: #05060a;
}

tr.zone-relegation .rank-pill {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

@container (width < 600px) {
  .table-wrapper table,
  .table-wrapper thead,
  .table-wrapper tbody,
  .table-wrapper tr,
  .table-wrapper th,
  .table-wrapper td {
    display: block;
  }

  .table-wrapper thead {
    /* MANDATORY: Hide column header from layout and screen readers. */
    display: none;
  }

  .table-wrapper tr {
    margin: 0.75rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    overflow: hidden;
  }

  .table-wrapper tbody th {
    position: sticky;
    inset-block-start: 0;
    z-index: 2;
    background: var(--surface-elevated);
    padding: 0.65rem 0.85rem;
  }

  .table-wrapper td {
    display: flex;
    justify-content: space-between;
    text-align: end;
    padding: 0.45rem 0.85rem;
  }

  .table-wrapper table {
    --label-2: "Oynanan";
    --label-3: "Galibiyet";
    --label-4: "Beraberlik";
    --label-5: "Mağlubiyet";
    --label-6: "Averaj";
    --label-7: "Puan";
  }

  .table-wrapper td:nth-child(2)::before {
    content: var(--label-2) ": ";
    color: var(--text-muted);
    font-weight: 600;
  }
  .table-wrapper td:nth-child(3)::before {
    content: var(--label-3) ": ";
    color: var(--text-muted);
    font-weight: 600;
  }
  .table-wrapper td:nth-child(4)::before {
    content: var(--label-4) ": ";
    color: var(--text-muted);
    font-weight: 600;
  }
  .table-wrapper td:nth-child(5)::before {
    content: var(--label-5) ": ";
    color: var(--text-muted);
    font-weight: 600;
  }
  .table-wrapper td:nth-child(6)::before {
    content: var(--label-6) ": ";
    color: var(--text-muted);
    font-weight: 600;
  }
  .table-wrapper td:nth-child(7)::before {
    content: var(--label-7) ": ";
    color: var(--text-muted);
    font-weight: 600;
  }
}

.fixtures-box {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  max-block-size: 650px;
  overflow-y: auto;
}

.fixture-filter-bar {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-block-end: 1rem;
}

.filter-chip {
  background: var(--surface-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.filter-chip[aria-pressed="true"] {
  background: var(--accent);
  color: #05060a;
  border-color: var(--accent);
}

.fixture-list {
  display: grid;
  gap: 0.65rem;
}

.fixture-item {
  background: var(--surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.95rem;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.fixture-item:hover {
  border-color: var(--border-strong);
}

.fix-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-block-end: 0.35rem;
}

.fix-comp {
  color: var(--accent);
  font-weight: 700;
}

.fix-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.fix-away {
  text-align: end;
}

.fix-score {
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-weight: 900;
  font-size: 0.84rem;
  background: rgba(255, 255, 255, 0.08);
}

.fix-score.res-W {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.fix-score.res-D {
  background: rgba(234, 179, 8, 0.2);
  color: #fde047;
}

.fix-score.res-L {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

.fix-score.res-U {
  background: rgba(245, 184, 0, 0.2);
  color: var(--accent-bright);
}

/* ==========================================================================
   8. PRO SQUAD CARDS & TABS (FC Barcelona First Team Style + tabs guide)
   ========================================================================== */
.tabs {
  display: grid;
}

.tablist.scroller {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: inline proximity;
  border-block-end: 1px solid var(--border-subtle);
  margin-block-end: 1.75rem;
  scrollbar-width: none;
  --fade-size: 3rem;
  --fade-dir: right;
  --fade-start-pos: 0;
  --fade-end-pos: 100%;
  scroll-padding-inline: var(--fade-size);
  mask:
    linear-gradient(black, black) no-clip subtract,
    linear-gradient(to var(--fade-dir), black, transparent) var(--fade-start-pos) 0 / var(--fade-start) 100% no-repeat no-clip,
    linear-gradient(to var(--fade-dir), transparent, black) var(--fade-end-pos) 0 / var(--fade-end) 100% no-repeat no-clip;
  animation: reveal-fade-start linear both, hide-fade-end linear both;
  animation-timeline: scroll(self inline);
  animation-range: 0 var(--fade-size), calc(100% - var(--fade-size)) 100%;
  transition: --fade-start .2s, --fade-end .2s;

  &:dir(rtl) {
    --fade-dir: left;
    --fade-start-pos: 100%;
    --fade-end-pos: 0;
  }

  &.more-start {
    --fade-start: var(--fade-size);
  }

  &.more-end {
    --fade-end: var(--fade-size);
  }
}

.tablist.scroller::-webkit-scrollbar {
  display: none;
}

@keyframes reveal-fade-start {
  to {
    --fade-start: var(--fade-size);
  }
}

@keyframes hide-fade-end {
  from {
    --fade-end: var(--fade-size);
  }
}

.tablist button {
  position: relative;
  flex: none;
  scroll-snap-align: start;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.9rem 1.4rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

/* Style selected tab from aria-selected without changing dimensions */
.tablist [aria-selected="true"] {
  color: var(--accent-bright);

  &::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    border-block-end: 3px solid var(--accent);
  }
}

.tabpanels-stack {
  display: grid;
}

.tabpanels-stack > [role="tabpanel"] {
  grid-area: 1 / 1;
}

.tabpanel-inner {
  padding-block: 0.25rem;
}

.squad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 1.25rem;
}

/* FC Barcelona Style Player Pro-Card */
.player-card {
  position: relative;
  background: linear-gradient(165deg, #1b2033 0%, #0b0d15 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.player-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: var(--shadow-gold);
}

.player-watermark-num {
  position: absolute;
  inset-block-start: -0.6rem;
  inset-inline-end: 0.5rem;
  font-family: var(--font-display);
  font-size: 6.2rem;
  font-weight: 900;
  line-height: 1;
  color: rgba(245, 184, 0, 0.11);
  pointer-events: none;
}

.player-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.jersey-num {
  inline-size: 44px;
  block-size: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  color: #05060a;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pos-tag {
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(245, 184, 0, 0.14);
  color: var(--accent-bright);
}

.player-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0.35rem 0 0.25rem;
  position: relative;
  z-index: 1;
}

.player-bio-short {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.player-stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  padding-block-start: 0.7rem;
  border-block-start: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  position: relative;
  z-index: 1;
}

.p-stat-val {
  font-weight: 800;
  color: var(--accent-bright);
  display: block;
}

/* ==========================================================================
   9. NEWS, 1916 STORE & DIGITAL TICKET PASS
   ========================================================================== */
.cards-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.35rem;
}

.news-card,
.store-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.45rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.95rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.news-card:hover,
.store-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.news-cat {
  font-family: var(--font-display);
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  color: var(--accent-bright);
  font-weight: 800;
  text-transform: uppercase;
}

.news-title {
  font-size: 1.14rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.35;
}

.jersey-preview {
  block-size: 165px;
  border-radius: var(--radius-sm);
  background:
    repeating-linear-gradient(
      90deg,
      #0c0e14 0px,
      #0c0e14 22px,
      #f5b800 22px,
      #f5b800 44px
    );
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  position: relative;
}

.jersey-preview.black-kit {
  background: radial-gradient(circle, #232738 0%, #090a0f 100%);
}

.jersey-preview.white-kit {
  background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
}

.jersey-badge-overlay {
  inline-size: 72px;
  block-size: 82px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.75));
}

.store-price {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--accent-bright);
}

/* Ticket & Fan Grid */
.fan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
}

@media (max-width: 860px) {
  .fan-grid {
    grid-template-columns: 1fr;
  }
}

.form-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.6rem;
}

.form-group {
  margin-block-end: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-block-end: 0.35rem;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
  inline-size: 100%;
  padding: 0.72rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  accent-color: var(--accent);
}

/* Sponsors Strip */
.sponsors-strip {
  background: #040508;
  padding-block: 2.2rem;
  border-block-start: 1px solid var(--border-subtle);
  text-align: center;
}

.sponsors-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-block-start: 1rem;
}

.sponsor-box {
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 184, 0, 0.2);
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* ==========================================================================
   10. DIALOGS (modern-web-guidance: dialog, light-dismiss-a-dialog, prevent-page-scroll-under-modal-dialog)
   ========================================================================== */
dialog {
  background: var(--surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.65rem;
  inline-size: min(650px, 92vw);
  box-shadow: var(--shadow-dark), var(--shadow-gold);
}

dialog:modal {
  /* MANDATORY: Prevent scroll gestures inside the modal from chaining to the underlying page. */
  overscroll-behavior: contain;
}

dialog::backdrop {
  /* MANDATORY: ::backdrop defaults to overflow: visible (not a scroll container).
     Set overflow: hidden so it becomes a non-scrollable scroll container that honors overscroll-behavior. */
  overflow: hidden;
  overscroll-behavior: contain;
  background-color: rgba(4, 5, 9, 0.82);
  backdrop-filter: blur(5px);
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-block-end: 1px solid var(--border-subtle);
  padding-block-end: 0.85rem;
  margin-block-end: 1rem;
}

.dialog-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.65rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

/* Footer */
.site-footer {
  background: #030407;
  padding-block: 3.5rem 2rem;
  border-block-start: 3px solid var(--accent);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-block-end: 2rem;
}

@media (max-width: 780px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-bottom {
  border-block-start: 1px solid rgba(255, 255, 255, 0.08);
  padding-block-start: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
