/* Public club pages (/clubs/<slug>, /padel/...). Sits on top of marketing.css:
   same fonts, same action colour, same card radius. Mobile first. */

.club-page {
  --club-ink: #0f172a;
  --club-muted: #5b6577;
  --club-line: #e2e8f0;
  --club-surface: #ffffff;
  --club-soft: #eef1fd;
  padding: 40px 0 88px;
  color: var(--club-ink);
  font-family: var(--font-sans);
  line-height: 1.55;
}

.club-page h1 {
  margin: 0;
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.club-page h2 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.25;
}

.club-page p {
  margin: 0 0 8px;
}

.club-page a {
  color: var(--marketing-action);
}

.club-page a.btn {
  color: #fff;
}

/* Breadcrumb */
.club-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
  color: var(--club-muted);
  font-size: 14px;
}

.club-breadcrumb a {
  color: var(--club-muted);
  text-decoration: none;
}

.club-breadcrumb a:hover {
  text-decoration: underline;
}

/* Hero */
.club-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.club-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  background: var(--club-surface);
  border: 1px solid var(--club-line);
}

.club-hero-text {
  flex: 1 1 240px;
  min-width: 0;
}

/* .club-page in front for the same reason as the section titles below:
   ".club-page p" would otherwise zero the top margin. */
.club-page .club-subtitle {
  max-width: 62ch;
  margin: 12px 0 0;
  color: var(--club-muted);
  font-size: 17px;
  line-height: 1.5;
}

/* Gallery: one row that scrolls sideways on a phone */
.club-gallery {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.club-gallery img {
  flex: 0 0 min(86%, 420px);
  height: 240px;
  border-radius: var(--marketing-radius-card);
  object-fit: cover;
  scroll-snap-align: start;
  background: var(--club-line);
}

/* Cards and grids */
.club-card {
  padding: 20px;
  border: 1px solid var(--club-line);
  border-radius: var(--marketing-radius-card);
  background: var(--club-surface);
}

.club-live,
.club-more,
.club-info,
.club-list {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.club-about,
.club-siblings,
.club-summary {
  margin-bottom: 16px;
}

.club-note,
.club-empty {
  color: var(--club-muted);
  font-size: 14px;
}

/* Free start times */
.club-day {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--club-line);
}

.club-day-name {
  flex: 0 0 96px;
  font-weight: 600;
}

.club-times {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.club-time {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--club-soft);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

/* Open matches */
.club-matches {
  margin: 0;
  padding: 0;
  list-style: none;
}

.club-match {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--club-line);
}

.club-match-when {
  font-weight: 600;
}

.club-match-title {
  grid-column: 1;
  font-size: 15px;
  line-height: 1.4;
}

.club-match-meta {
  grid-column: 1;
  color: var(--club-muted);
  font-size: 14px;
}

.club-match-join {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--club-soft);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

/* Prices */
.club-prices table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.club-prices th,
.club-prices td {
  padding: 8px 0;
  border-top: 1px solid var(--club-line);
  text-align: left;
  font-weight: 400;
  vertical-align: top;
}

.club-prices td {
  padding-left: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.club-prices .club-price {
  text-align: right;
  font-weight: 600;
}

/* Other clubs, area lists */
.club-siblings ul,
.club-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.club-siblings a,
.club-links a {
  display: inline-block;
  padding: 7px 14px;
  font-size: 15px;
  line-height: 1.4;
  border: 1px solid var(--club-line);
  border-radius: 999px;
  background: var(--club-surface);
  text-decoration: none;
}

/* An area card wears its club's colour (--club-color, set inline from
   clubs.color): a band along the top, the initials when there is no logo. */
.club-list-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 22px 20px;
  overflow: hidden;
  transition: box-shadow .15s, transform .08s;
}

.club-list-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: var(--club-color, var(--marketing-action));
}

.club-list-card:hover {
  box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
}

.club-list-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.club-list-head > div {
  min-width: 0;
}

.club-page .club-list-card h2 {
  margin: 0 0 2px;
  font-size: 19px;
}

.club-page .club-list-card p {
  margin: 0;
}

.club-avatar {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border: 1px solid var(--club-line);
  border-radius: 16px;
  background: var(--club-surface);
  /* contain, not cover: a wide logo must not lose its ends. */
  object-fit: contain;
}

.club-avatar--mono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: transparent;
  background: var(--club-color, var(--marketing-action));
  color: #fff;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 650;
  letter-spacing: .02em;
}

.club-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.club-chip {
  padding: 4px 10px;
  border: 1px solid var(--club-line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--club-ink);
  font-size: 14px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.club-list-price {
  color: var(--club-muted);
  font-size: 14px;
}

.club-list-price strong {
  margin-right: 4px;
  color: var(--club-ink);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 650;
}

.club-page a.club-list-more {
  margin-top: auto;
  padding-top: 4px;
  color: var(--club-ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.club-page a.club-list-more:hover {
  text-decoration: underline;
}

/* The whole card is the link's target: one big thing to tap. */
.club-list-more::after {
  content: "";
  position: absolute;
  inset: 0;
}

.club-page .club-list-card h2 a {
  color: var(--club-ink);
  text-decoration: none;
}

.club-list-card h2 a:hover {
  text-decoration: underline;
}

.club-list-facts {
  color: var(--club-muted);
  font-size: 15px;
}

.club-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--club-soft);
  color: var(--club-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

/* One colour per kind: matches blue, events amber, tournaments green. */
.club-badge--matches {
  background: #e4e9ff;
  color: #2b3aa0;
}

.club-badge--events {
  background: #fff1d1;
  color: #7a4a00;
}

.club-badge--tournaments {
  background: #daf5e4;
  color: #0c5a30;
}

/* The "what is open here" line: on a club page above the live blocks, on an
   area card under its facts. */
.club-page .club-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.club-page .club-list-card .club-counts {
  margin: 0;
}

/* The top of an area page: a soft wash of colour behind the title. */
.club-hero--wash {
  padding: 28px 28px 30px;
  border-radius: var(--marketing-radius-panel);
  background: linear-gradient(120deg, #e8ecff 0%, #f1f6ff 45%, #e6f7ee 100%);
}

/* Written with .club-page in front: ".club-page h2" resets every h2's top
   margin and would otherwise win, gluing a section title to what is above. */
.club-page .club-section-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 44px 0 16px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.club-page .club-section-title a {
  color: var(--club-ink);
  text-decoration: none;
}

.club-page .club-section-title a:hover {
  text-decoration: underline;
}

.club-count {
  color: var(--club-muted);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
}

.club-country:first-of-type .club-section-title {
  margin-top: 8px;
}

/* Club tiles: the index and country pages */
.club-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.club-page a.club-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 14px 16px;
  border: 1px solid var(--club-line);
  border-radius: var(--marketing-radius-card);
  background: var(--club-surface);
  color: var(--club-ink);
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .08s;
}

.club-page a.club-tile:hover {
  border-color: var(--marketing-action);
  box-shadow: 0 6px 20px rgba(15, 23, 42, .06);
}

.club-page a.club-tile:active {
  transform: translateY(1px);
}

.club-tile .club-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 15px;
}

.club-tile-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.club-tile-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.club-tile-area {
  color: var(--club-muted);
  font-size: 14px;
  line-height: 1.4;
}

/* Closing call to action, 404 */
.club-app {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}

.club-missing {
  padding: 64px 0;
  text-align: center;
}

.club-missing h1 {
  margin-bottom: 20px;
}

@media (min-width: 800px) {
  .club-more {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }

  .club-live {
    grid-template-columns: 1fr 1fr;
  }

  .club-info {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .club-list {
    grid-template-columns: 1fr 1fr;
  }

  .club-gallery img {
    flex-basis: calc((100% - 24px) / 3);
    height: 260px;
  }
}
