:root{
  --gold:#d2a700;
  --gold-light: #f3d77b;
  --blue-dark:#064b6a;
  --blue:#0080cb;
  --grey-blue:#bcd6f1;
  --ink: #0b1220;
}

/* Hide subheader on admin pages */
.subheader {
  display: none;
}


/* ---------- Base layout for these pages ---------- */
.teams-page,
.team-page {
  color: #e5e7eb;
}


/* Ensure sections have consistent padding */
.section,
.featured {
  padding-inline: var(--pad);
}

/* Section headings (reuse your news style) */
.section-head h2,
.section-header h2 {
  margin: 0.1rem 0 0;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #f9fafb;
  text-shadow: 0 3px 10px rgba(0,0,0,0.8);
}
.section-head h2::after,
.section-header h2::after {
  content: "";
  display: block;
  margin-top: 0.3rem;
  width: 64px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--gold-light), var(--gold));
}

/* Section tag chip */
.section-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(243,215,123,0.7);
  background: rgba(15,23,42,0.9);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: #e5e7eb;
  justify-content: center;
}

.section-tag--teams {
  border-color: rgba(148,163,184,0.7);
}
.section-tag--stats,
.section-tag--fixtures,
.section-tag--sponsors {
  border-color: rgba(243,215,123,0.9);
}

/* Basic card */
.card {
  border-radius: 1.5rem;
  background: radial-gradient(circle at top left, rgba(15,23,42,0.95), rgba(15,23,42,0.9));
  border: 1px solid rgba(148,163,184,0.6);
  box-shadow: 0 18px 40px rgba(0,0,0,0.6);
  padding: 1.2rem 1.5rem;
}

/* ---------- Teams overview hero ---------- */

.teams-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  gap: 1.8rem;
  align-items: center;
  justify-content: center;
  text-align: center;
}

@media (max-width: 768px) {
  .teams-hero-inner {
    grid-template-columns: 1fr;
  }
}

.teams-hero-text {
  margin-top: .6rem;
  max-width: 30rem;
  font-size: .95rem;
  color: rgba(226,232,240,0.9);
}

.teams-hero-stats {
  display: grid;
  gap: 1rem;
  background:
    radial-gradient(circle at top left, rgba(243,215,123,0.15), transparent 55%),
    radial-gradient(circle at bottom right, rgba(15,23,42,0.95), rgba(15,23,42,0.9));
}

/* Highlight pill */
.stats-pill {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.stats-pill-label {
  font-size: .8rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .85;
}
.stats-pill-value {
  font-size: 2.1rem;
  font-weight: 900;
  letter-spacing: .12em;
  color: var(--gold-light);
}

/* Stats grid */
.club-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
  gap: .75rem;
}

.stat-card {
  padding: .7rem .8rem;
  border-radius: 1.1rem;
  background: rgba(15,23,42,0.96);
  border: 1px solid rgba(148,163,184,0.75);
}

.stat-label {
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .85;
}
.stat-value {
  margin-top: .25rem;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: .08em;
  color: #f9fafb;
}
.stat-sub {
  margin-top: .2rem;
  font-size: .8rem;
  color: rgba(209,213,219,0.9);
}

/* Extra list */
.club-stats-list {
  margin-top: .4rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px,1fr));
  gap: .6rem 1.2rem;
  font-size: .86rem;
}
.club-stats-list p {
  margin: 0;
}

/* ---------- Team tabs (switch between D/E/F/G) ---------- */
.team-tabs-section {
  text-align: center;
}

.team-tabs-wrap {
  display: inline-block;
}

.team-nav-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .4rem;
  border-radius: 999px;
  background: radial-gradient(circle at top, rgba(15,23,42,0.95), rgba(15,23,42,0.85));
  border: 1px solid rgba(148,163,184,0.7);
  margin-inline: auto; /* center inside section */
}

.team-tab {
  position: relative;
  border-radius: 999px;
  padding: .45rem .9rem;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  text-decoration: none;
  color: #e5e7eb;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background .15s ease,
    border-color .15s ease,
    transform .15s ease;
}
.team-tab:hover {
  background: rgba(15,23,42,0.9);
  transform: translateY(-1px);
}
.team-tab.is-active {
  background: linear-gradient(135deg, var(--blue), var(--gold));
  border-color: rgba(243,215,123,0.9);
  color: #0f172a;
}

/* ---------- Teams grid 2x2 ---------- */

.teams-grid-section {
  padding-top: 1rem;
}

.teams-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 1.3rem;
}

@media (max-width: 640px) {
  .teams-grid-2x2 {
    grid-template-columns: 1fr;
  }
}

.team-card-large {
  display: block;
  text-decoration: none;
  color: inherit;
}

.team-card-photo {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(0,0,0,0.6);
  transform-origin: center;
  transition: transform .18s ease, box-shadow .18s ease;
}
.team-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  transition: transform .28s ease-out;
}
.team-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,0.95), transparent 55%);
}

.team-card-large:hover .team-card-photo {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 24px 60px rgba(0,0,0,0.7);
}
.team-card-large:hover img {
  transform: scale(1.1);
}

.team-card-label {
  position: absolute;
  left: 1.1rem;
  bottom: 1.1rem;
  right: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}
.team-card-tagline {
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(226,232,240,0.9);
}
.team-card-name {
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--gold-light);
}
.team-card-age {
  font-size: .8rem;
  color: rgba(209,213,219,0.9);
}

/* ---------- Team hero (individual pages) ---------- */
/* -------- Teams full-width hero cover -------- */

.teams-hero-cover {
  position: relative;
  margin-bottom: clamp(1.5rem, 3vw, 2.4rem);
  min-height: clamp(240px, 42vh, 360px);
  z-index: 0;
  margin-top: 0;
}

.teams-hero-cover-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 32px 32px;
  overflow: hidden;
  background-image:
    linear-gradient(
      135deg,
      rgba(6, 74, 106, 0.616),
      rgba(3, 7, 18, 0.555)
    ),
    url('/images/teams-hero.jpg'); /* <-- Use your group/field photo here */
  background-size: cover;
  background-position: center center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  height: 350px;
}

.teams-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(243,215,123,0.16), transparent 55%),
    radial-gradient(circle at bottom, rgba(0,0,0,0.45), transparent 60%);
  pointer-events: none;
}

.teams-hero-content {
  position: relative;
  padding: clamp(1.8rem, 4vw, 3rem);
  align-items: center;
  justify-content: center;
  text-align: center;
}

.teams-hero-title {
  margin: .4rem 0 0;
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: #f9fafb;
  text-shadow: 0 4px 14px rgba(0,0,0,0.9);
  text-align: center;
  justify-content: center;
}

.teams-hero-subtitle {
  margin-top: .6rem;
  max-width: 32rem;
  font-size: .98rem;
  color: rgba(226,232,240,0.92);
}

.team-hero {
  position: relative;
  min-height: clamp(240px, 42vh, 360px);
  margin-top: 0;
  z-index: 0;
}

/* Outer wrapper if you want to control max-width etc. */
.team-hero-photo {
  position: relative;
}

/* Main hero frame */
.team-hero-photo-inner {
  position: relative;
  width: 100%;
  height: 350px;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  isolation: isolate; /* keeps blending scoped */
  background:
    radial-gradient(circle at top left, rgba(56,189,248,0.18), transparent 55%),
    radial-gradient(circle at bottom right, rgba(234,179,8,0.16), transparent 55%),
    #020617;
}

/* Blurred background using the same image */
.team-hero-photo-inner::before {
  content: "";
  position: absolute;
  inset: -14px;
  background-image: var(--team-hero-bg);
  background-size: cover;
  background-position: center;
  filter: blur(18px) saturate(1.15) brightness(0.85);
  transform: scale(1.08);
  opacity: 0.45;
  z-index: 0;
}

/* Optional subtle border glow */
.team-hero-photo-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(148,163,184,0.5);
  mix-blend-mode: screen;
  opacity: 0.6;
  pointer-events: none;
  z-index: 1;
}

/* Foreground image */
.team-hero-photo-inner img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain; /* change to 'cover' if you prefer full-bleed */
  object-position: center;
  transform: translateZ(0);
  transition: transform 0.25s ease-out;
}

.team-hero-photo-inner:hover img {
  transform: scale(1.03);
}

/* Darken lower area + vignette so text is readable */
.team-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    radial-gradient(circle at top, rgba(15,23,42,0.6), transparent 55%),
    radial-gradient(circle at bottom, rgba(15,23,42,0.85), transparent 60%),
    linear-gradient(to top, rgba(15,23,42,0.92), transparent 55%);
}

/* Label block */
.team-hero-label {
  position: absolute;
  left: 1.6rem;
  right: 1.6rem;
  bottom: 1.3rem;
  z-index: 4;
}

.team-hero-tagline {
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(226,232,240,0.95);
}

.team-hero-title {
  margin: .15rem 0 0;
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--gold-light);
  text-shadow: 0 3px 10px rgba(0,0,0,0.8);
}

.team-hero-age {
  margin-top: .2rem;
  font-size: .86rem;
  color: rgba(226,232,240,0.95);
}

/* Small screens: adjust height a bit */
@media (max-width: 640px) {
  .team-hero-photo-inner {
    height: 280px;
    border-radius: 24px;
  }

  .team-hero-label {
    left: 1.1rem;
    right: 1.1rem;
    bottom: 1rem;
  }
}


/* Contact card */
.team-hero-aside h2 {
  margin-bottom: .4rem;
}
.team-contact-name {
  font-weight: 700;
  font-size: .95rem;
}
.team-contact-phone a,
.team-contact-email a {
  color: var(--gold-light);
  text-decoration: none;
}
.team-contact-phone a:hover,
.team-contact-email a:hover {
  text-decoration: underline;
}
.team-hero-cta {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

/* ---------- Staff (coaches) ---------- */

/* ---------- Staff (coaches) ---------- */

.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem 1.2rem;
  margin-top: 1.1rem;
}

/* Small horizontal cards */
.staff-card {
  border-radius: 1.1rem;
  background:
    radial-gradient(circle at top left, rgba(30, 64, 175, 0.2), transparent 60%),
    radial-gradient(circle at bottom right, rgba(234, 179, 8, 0.16), transparent 60%),
    rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.7);
  padding: 0.7rem 0.85rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    border-color 0.12s ease,
    background-color 0.12s ease;
  max-width: 500px;
}

/* subtle hover */
.staff-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.7);
  border-color: rgba(250, 204, 21, 0.85);
}

/* Smaller avatar for compact cards */
.staff-photo {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.staff-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.staff-photo-fallback i {
  font-size: 24px;
  color: rgba(148, 163, 184, 0.9);
}

/* Text block */
.staff-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.12rem;
}

.staff-name {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 600;
  color: #fff;
}

.staff-title {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(209, 213, 219, 0.9);
}

/* Responsive tweaks */
@media (max-width: 640px) {
  .staff-card {
    padding: 0.6rem 0.75rem;
    gap: 0.6rem;
  }

  .staff-photo {
    width: 52px;
    height: 52px;
  }
}

/* ---------- Training times ---------- */

.training-card {
  margin-top: .8rem;
}

.training-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(15,23,42,0.95);
  border: 1px solid rgba(243,215,123,0.8);
  font-size: .78rem;
  margin-bottom: .6rem;
}

.training-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  color: #fff;
}
.training-table td {
  padding: .4rem .3rem;
  border-bottom: 1px dashed rgba(51,65,85,0.8);
}
.training-day {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  color: rgba(226,232,240,0.9);
}
.training-time {
  font-weight: 600;
}
.training-place {
  text-align: right;
  font-size: .84rem;
  color: rgba(209,213,219,0.9);
}

/* ---------- Schedule / fixtures ---------- */
/* Wrapper with subtle border + scroll on mobile */
.schedule-table-wrap {
  margin-top: 1.4rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: radial-gradient(circle at top left, rgba(30, 64, 175, 0.22), #020617);
  overflow: hidden;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Core table */
.schedule-table {
  width: 100%;
  min-width: 640px; /* keeps columns readable; scrolls on small screens */
  border-collapse: collapse;
  font-size: 0.9rem;
  color: rgba(241, 245, 249, 0.96);
}

/* Header */
.schedule-table thead {
  background: linear-gradient(
    to right,
    rgba(15, 23, 42, 0.98),
    rgba(30, 64, 175, 0.9)
  );
}

.schedule-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: rgba(209, 213, 219, 0.95);
  white-space: nowrap;
}

/* Rows */
.schedule-table tbody tr {
  background: rgba(15, 23, 42, 0.96);
  transition: background-color 0.12s ease, transform 0.08s ease;
}

.schedule-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.9);
}

.schedule-table tbody tr:hover {
  background: rgba(15, 23, 42, 1);
  transform: translateY(-1px);
}

/* Cells */
.schedule-table td {
  padding: 0.65rem 1rem;
  border-top: 1px solid rgba(30, 64, 175, 0.25);
  vertical-align: middle;
}

.schedule-table td:nth-child(1),
.schedule-table td:nth-child(2) {
  white-space: nowrap;
}

/* Home / Away pill */
.schedule-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.12rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
}

.schedule-home {
  background: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
  border: 1px solid rgba(34, 197, 94, 0.45);
}

.schedule-away {
  background: rgba(59, 130, 246, 0.15);
  color: #bfdbfe;
  border: 1px solid rgba(59, 130, 246, 0.55);
}

/* Result badges */
.schedule-result {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  padding: 0.16rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: rgba(248, 250, 252, 0.96);
}

.schedule-result.upcoming {
  opacity: 0.7;
  font-weight: 500;
}

/* Optional: slightly highlight rows that have a result */
.schedule-table tr.has-result .schedule-result {
  background: rgba(234, 179, 8, 0.18);
  border-color: rgba(234, 179, 8, 0.65);
}

/* Small screens: let it scroll */
@media (max-width: 640px) {
  .schedule-table-wrap {
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
  }

  .schedule-table th,
  .schedule-table td {
    padding: 0.6rem 0.75rem;
  }
}

/* ---------- Gallery ---------- */

.team-gallery-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 600px));
  gap: .8rem;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.team-gallery-item {
  margin: 0;
  border-radius: 1rem;
  overflow: hidden;
  background: #020617;
  box-shadow: 0 14px 36px rgba(0,0,0,0.6);
}
.team-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform .2s ease-out;
}
.team-gallery-item:hover img {
  transform: scale(1.08);
}

/* ---------- CTA ---------- */
/* ---------- CTA ---------- */

.team-cta-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.8rem 2rem;
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 55%),
    radial-gradient(circle at bottom right, rgba(234, 179, 8, 0.16), transparent 55%),
    #020617;
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: #fff;
}

.team-cta-text {
  flex: 2 1 260px;
}

.team-cta-text h2 {
  margin-top: 0.25rem;
  margin-bottom: 0.3rem;
}

.team-cta-text p {
  margin-top: 0.4rem;
  max-width: 30rem;
  color: rgba(226, 232, 240, 0.9);
}

/* Buttons: high contrast, easy to read */

.team-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.2rem;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.team-cta .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: none;
  outline: none;
  background: var(--gold, #facc15);
  color: #0f172a;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.team-cta .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.7);
  background: #eab308;
}

.team-cta .btn.secondary {
  background: rgba(15, 23, 42, 0.9);
  color: rgba(248, 250, 252, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.7);
  box-shadow: none;
}

.team-cta .btn.secondary:hover {
  background: rgba(15, 23, 42, 1);
}

/* Contact block, now part of the same card */


.team-cta-contact h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: rgba(209, 213, 219, 0.95);
}

.team-contact-name {
  margin: 0 0 0.5rem;
  font-weight: 600;
  font-size: 0.98rem;
}

.team-contact-phone,
.team-contact-email {
  margin: 0.25rem 0;
  font-size: 0.86rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.team-contact-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(148, 163, 184, 0.9);
}

.team-cta-contact a {
  color: rgba(248, 250, 252, 0.96);
  text-decoration: none;
}

.team-cta-contact a:hover {
  text-decoration: underline;
}

/* Responsive */

@media (max-width: 768px) {
  .team-cta-inner {
    padding: 1.4rem 1.5rem;
  }

  .team-cta-contact {
    flex: 1 1 100%;
    padding-left: 0;
    margin-left: 0;
    margin-top: 1.2rem;
    border-left: none;
    border-top: 1px solid rgba(148, 163, 184, 0.4);
    padding-top: 1rem;
  }
}

@media (max-width: 640px) {
  .team-cta-inner {
    padding: 1.25rem 1.2rem;
    border-radius: 1.1rem;
  }

  .team-cta-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .team-cta .btn,
  .team-cta .btn.secondary {
    width: 100%;
    justify-content: center;
  }
}




/* -------- Teams stats "scoreboard" -------- */

.teams-stats-section {
  padding-top: clamp(1.8rem, 3vw, 2.4rem);
}

.teams-stats-card {
  display: grid;
  gap: 1.4rem;
  background:
    radial-gradient(circle at top left, rgba(243,215,123,0.18), transparent 55%),
    radial-gradient(circle at bottom right, rgba(15,23,42,0.97), rgba(15,23,42,0.92));
}

/* Top row – big KPIs in rings */

.teams-stats-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

@media (max-width: 720px) {
  .teams-stats-kpi-row {
    grid-template-columns: 1fr;
  }
}

.stat-kpi {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-kpi-ring {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  padding: 6px;
  background: radial-gradient(circle at center, rgba(15,23,42,1), rgba(15,23,42,0.9));
  box-shadow: 0 14px 30px rgba(0,0,0,0.7);
  transform: translateZ(0);
  transition: transform .15s ease, box-shadow .15s ease;
}

.stat-kpi-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: conic-gradient(
    from 240deg,
    var(--gold-light),
    var(--gold),
    var(--blue),
    var(--blue-dark),
    var(--gold-light)
  );
  opacity: 0.85;
}

.stat-kpi-ring::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: inherit;
  background: radial-gradient(circle at center, #020617, #020617);
}

.stat-kpi-ring {
  position: relative;
}

/* Pseudo-elements: background layer */
.stat-kpi-ring::before,
.stat-kpi-ring::after {
  z-index: 0;
}

/* Number: foreground layer */
.stat-kpi-number {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: .14em;
  color: #f9fafb !important;
}

.stat-kpi-ring--gold::before {
  background: conic-gradient(from 220deg, var(--gold-light), var(--gold), #4b5563, var(--gold-light));
}
.stat-kpi-ring--blue::before {
  background: conic-gradient(from 200deg, var(--blue), var(--blue-dark), #0ea5e9, var(--blue));
}
.stat-kpi-ring--mixed::before {
  background: conic-gradient(from 210deg, var(--gold), var(--blue), var(--gold-light), var(--blue-dark));
}

.stat-kpi-ring:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.8);
}

.stat-kpi-label {
  margin-top: .4rem;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: rgba(226,232,240,0.9);
}

.stat-kpi-sub {
  margin-top: .1rem;
  font-size: .8rem;
  color: rgba(209,213,219,0.9);
}

/* Middle row – progress bar strip */

.teams-stats-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr);
  gap: .4rem;
}

.progress-labels {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .75rem;
  align-items: baseline;
  justify-content: space-between;
}

.progress-title {
  font-size: .86rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: rgba(226,232,240,0.92);
}

.progress-sub {
  font-size: .82rem;
  color: rgba(209,213,219,0.9);
}

.progress-bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(15,23,42,0.9);
  overflow: hidden;
  border: 1px solid rgba(148,163,184,0.75);
}

.progress-bar-fill {
  --pct: 0.7; /* overwritten inline */
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(var(--pct));
  background: linear-gradient(to right, var(--blue), var(--gold));
  box-shadow: 0 0 18px rgba(56,189,248,0.5);
  transition: transform .6s ease-out;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: .78rem;
  color: rgba(156,163,175,0.95);
}

/* Bottom grid – detail cards */

.teams-stats-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .8rem;
}

.detail-card {
  padding: .7rem .8rem;
  border-radius: 1rem;
  background: rgba(15,23,42,0.95);
  border: 1px solid rgba(51,65,85,0.9);
}

.detail-label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: rgba(148,163,184,0.96);
}

.detail-value {
  margin-top: .15rem;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: .08em;
  color: #f9fafb;
}

.detail-sub {
  margin-top: .2rem;
  font-size: .8rem;
  color: rgba(209,213,219,0.9);
}


/* Container + header with CTA */

.team-upcoming {
  margin-top: 2.4rem;
}

.team-upcoming .section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}

.team-upcoming .section-head h2 {
  margin: 0;
}

/* CTA link */

.team-upcoming .section-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid rgba(250, 204, 21, 0.7); /* gold-ish */
  color: var(--gold-light, #eab308);
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
  transition: background-color 0.15s ease, transform 0.15s ease,
              box-shadow 0.15s ease, border-color 0.15s ease;
}

.team-upcoming .section-cta:hover {
  background: rgba(250, 204, 21, 0.08);
  border-color: var(--gold, #eab308);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.6);
}

/* Table wrapper */

.team-upcoming-table {
  margin-top: 1.25rem;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: radial-gradient(circle at top left, rgba(30, 64, 175, 0.24), #020617);
}

/* Header row */

.team-upcoming-header {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  padding: 0.6rem 1.2rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  border-bottom: 1px solid rgba(148, 163, 184, 0.45);
  background: linear-gradient(to right, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.85));
  color: rgba(226, 232, 240, 0.9);
}

.team-upcoming-header span:last-child {
  text-align: left;
}

/* Body rows */

.team-upcoming-grid {
  display: block;
}

.team-fixture-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 1.25rem;
  padding: 0.85rem 1.2rem;
  font-size: 0.9rem;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.9);
  transition: background-color 0.12s ease, transform 0.12s ease;
}

.team-fixture-card:hover {
  background: rgba(15, 23, 42, 1);
  transform: translateY(-1px);
}

/* Date column */

.fixture-date {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(148, 163, 184, 0.95);
}

.fixture-date-weekday {
  opacity: 0.85;
}

.fixture-date-main {
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(249, 250, 251, 0.98);
}

.fixture-date-time {
  font-size: 0.78rem;
  color: rgba(209, 213, 219, 0.95);
}

/* Match column */

.fixture-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.fixture-teams {
  font-size: 0.98rem;
  font-weight: 500;
  color: rgba(249, 250, 251, 0.98);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
}

.fixture-club {
  font-weight: 700;
  letter-spacing: 0.08em;
}

.fixture-vs {
  text-transform: lowercase;
  color: rgba(148, 163, 184, 0.9);
}

.fixture-opponent {
  font-weight: 600;
}

/* Meta info (team, home/away, location) */

.fixture-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.95);
}

.fixture-team-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 500;
}

/* Home / away pill */

.fixture-home-tag {
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.fixture-home {
  background: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
  border: 1px solid rgba(34, 197, 94, 0.45);
}

.fixture-away {
  background: rgba(59, 130, 246, 0.15);
  color: #bfdbfe;
  border: 1px solid rgba(59, 130, 246, 0.5);
}

.fixture-location {
  opacity: 0.9;
}

/* Responsive: stack rows on small screens */

@media (max-width: 640px) {
  .team-upcoming-header {
    display: none;
  }

  .team-fixture-card {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .fixture-date {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.76rem;
  }

  .fixture-date-main {
    font-size: 0.9rem;
  }

  .fixture-body {
    gap: 0.35rem;
  }

  .team-upcoming .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
}



/* ===================== Team calendar (agenda view) ===================== */

.team-calendar-shell {
  margin-top: 1rem;
  border-radius: 1.4rem;
  padding: 0.5rem 0.9rem 0.9rem;
  background:
    radial-gradient(circle at top left, rgba(15,23,42,0.9), rgba(15,23,42,0.85)),
    linear-gradient(135deg, rgba(15,23,42,0.95), rgba(15,23,42,0.96));
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  border: 1px solid rgba(148,163,184,0.6);
  color: #e5e7eb;
  overflow: hidden;
}

/* Header row – behaves like table header */
.team-calendar-header {
  display: grid;
  grid-template-columns:
    130px   /* date */
    70px    /* time */
    130px   /* team */
    130px   /* type */
    minmax(0, 1.8fr) /* game / event */
    minmax(0, 1.1fr);/* location */
  gap: 0.75rem;
  padding: 0.4rem 0.4rem 0.3rem;
  border-bottom: 1px solid rgba(55,65,81,0.9);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(156,163,175,0.95);
}

.team-calendar-header .th {
  white-space: nowrap;
}

/* Rows container */
.team-calendar-rows {
  display: flex;
  flex-direction: column;
}

/* Each row = one calendar entry */
.team-calendar-row {
  display: grid;
  grid-template-columns:
    130px
    70px
    130px
    130px
    minmax(0, 1.8fr)
    minmax(0, 1.1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem 0.4rem;
  border-bottom: 1px dashed rgba(55,65,81,0.7);
  font-size: 0.88rem;
}

.team-calendar-row:last-child {
  border-bottom: none;
}

/* subtle hover highlight */
.team-calendar-row:hover {
  background: radial-gradient(circle at center, rgba(31,41,55,0.88), transparent 65%);
}

/* ---------- Date cell ---------- */

.cal-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.4rem;
  border-radius: 0.9rem;
  background:
    radial-gradient(circle at top, rgba(30,64,175,0.9), rgba(15,23,42,0.95));
  border: 1px solid rgba(129,140,248,0.85);
  min-width: 90px;
}

.cal-weekday {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(191,219,254,0.9);
}

.cal-day {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #f9fafb;
  margin-top: 0.1rem;
}

.cal-month {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(191,219,254,0.9);
}

/* ---------- Time ---------- */

.cal-time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.9rem;
  color: #e5e7eb;
}

/* ---------- Team ---------- */

.cal-team-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.12rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(15,23,42,0.9);
  border: 1px solid rgba(148,163,184,0.9);
  color: rgba(226,232,240,0.95);
}

/* ---------- Type (match/training/event) ---------- */

.cal-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.18rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  background: rgba(15,23,42,0.9);
  border: 1px solid rgba(148,163,184,0.7);
  color: rgba(226,232,240,0.96);
}

.cal-type--match {
  background: rgba(37,99,235,0.22);
  border-color: rgba(96,165,250,0.9);
  color: #bfdbfe;
}

.cal-type--training {
  background: rgba(22,163,74,0.18);
  border-color: rgba(52,211,153,0.95);
  color: #bbf7d0;
}

.cal-type--event {
  background: rgba(234,179,8,0.22);
  border-color: rgba(250,204,21,0.95);
  color: #fef9c3;
}

/* ---------- Game / event description ---------- */

.cal-event {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.cal-club {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #e5e7eb;
}

.cal-vs {
  opacity: 0.9;
}

.cal-opponent {
  font-weight: 600;
  color: #bfdbfe;
}

.cal-home-tag {
  margin-left: 0.3rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.cal-home {
  background: rgba(22,163,74,0.22);
  border: 1px solid rgba(34,197,94,0.9);
  color: #bbf7d0;
}

.cal-away {
  background: rgba(248,113,113,0.22);
  border: 1px solid rgba(248,113,113,0.9);
  color: #fee2e2;
}

.cal-event-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
  color: #e5e7eb;
}

.cal-event-label i {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* ---------- Location ---------- */

.cal-location {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: rgba(209,213,219,0.95);
}

.cal-location i {
  font-size: 0.85rem;
  color: rgba(251,191,36,0.95);
}

/* ===================== Responsive calendar layout ===================== */
@media (max-width: 800px) {
  /* Hide table-style header on phones */
  .team-calendar-header {
    display: none;
  }

  /* Each entry becomes a centered card */
  .team-calendar-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    padding: 0.85rem 0.75rem;
    margin-bottom: 0.6rem;
    border-radius: 1rem;

    background: radial-gradient(
      circle at top,
      rgba(15,23,42,0.96),
      rgba(15,23,42,0.9)
    );
    border-bottom: none; /* we don’t need the dashed divider anymore */
    row-gap: 0.35rem;
  }

  /* Center the date pill */
  .cal-date {
    align-self: center;
    margin-bottom: 0.45rem;
    max-width: 120px;
  }

  /* All rows (time, team, type, event, location) span full width and are centered */
  .cal-time,
  .cal-team,
  .cal-type,
  .cal-event,
  .cal-location {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  /* Small labels above time / team / type */
  .cal-time::before,
  .cal-team::before,
  .cal-type::before {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(156,163,175,0.9);
    display: block;
    width: 100%;
    margin-bottom: 0.1rem;
    text-align: center;
  }

  .cal-time::before { content: "Time"; }
  .cal-team::before { content: "Team"; }
  .cal-type::before { content: "Type"; }

  /* Event + location spacing */
  .cal-event {
    margin-top: 0.2rem;
  }

  .cal-location {
    margin-top: 0.25rem;
  }
}

