:root {
  --ink: #16201b;
  --muted: #607066;
  --line: #d7ded2;
  --panel: #fffdf8;
  --soft: #eef3e8;
  --accent: #bf4c2f;
  --accent-2: #186d67;
  --shadow: 0 18px 48px rgba(22, 32, 27, 0.16);
}

* { box-sizing: border-box; }

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: #f5f2eb;
}

.app-shell {
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  overflow-x: clip;
}

.masthead {
  min-height: 310px;
  display: flex;
  align-items: end;
  padding: 44px clamp(18px, 4vw, 64px);
  background:
    linear-gradient(90deg, rgba(10, 24, 20, 0.78), rgba(10, 24, 20, 0.25) 58%, rgba(10, 24, 20, 0.08)),
    url("assets/tennis-rab-bg.png") center 45% / cover;
}

.masthead--compact { min-height: 260px; }

.masthead__content {
  max-width: 780px;
  color: white;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.38);
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow--dark {
  margin-bottom: 6px;
  color: var(--accent-2);
  text-shadow: none;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 8px;
  font-size: clamp(2.35rem, 6vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 13px;
  font-size: 1.12rem;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.masthead p:last-of-type {
  margin-bottom: 0;
  max-width: 590px;
  font-size: clamp(1rem, 2.4vw, 1.26rem);
  line-height: 1.45;
}

.page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.page-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  padding: 0 14px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 850;
  text-decoration: none;
}

.page-links a.is-active {
  color: var(--ink);
  background: white;
  text-shadow: none;
}

.controls {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(210px, 310px) minmax(240px, 1fr) 46px;
  gap: 12px;
  align-items: end;
  padding: 16px clamp(18px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(14px);
}

.field {
  display: grid;
  gap: 7px;
  font-weight: 700;
  color: var(--muted);
}

.field span { font-size: 0.8rem; }

select, input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #c8d2c5;
  border-radius: 8px;
  padding: 0 13px;
  color: var(--ink);
  background: white;
  font: inherit;
  font-weight: 650;
}

button { font: inherit; }

select:focus, input:focus, button:focus-visible {
  outline: 3px solid rgba(24, 109, 103, 0.24);
  outline-offset: 2px;
}

.icon-button {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: var(--accent-2);
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 22px clamp(18px, 4vw, 64px) 8px;
}

.stat {
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px 16px;
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(22, 32, 27, 0.08);
}

.stat strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1.55rem;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.88rem;
}

.results-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 64px) 54px;
}

.match-list, .team-list {
  display: grid;
  gap: 12px;
}

.match-card, .team-card, .empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(22, 32, 27, 0.08);
}

.match-card {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  overflow: hidden;
}

.match-time {
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 18px 16px;
  color: white;
  background: linear-gradient(160deg, var(--accent-2), #275b44);
}

.match-time strong {
  font-size: 1.25rem;
  line-height: 1.1;
}

.match-time span {
  font-size: 0.8rem;
  font-weight: 750;
  opacity: 0.86;
}

.match-body { padding: 16px 18px; }

.match-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border-radius: 999px;
  padding: 0 9px;
  color: #314138;
  background: var(--soft);
  font-size: 0.76rem;
  font-weight: 800;
}

.pill.is-warning {
  color: #6b3c1f;
  background: #f6dfcf;
}

.teams {
  display: grid;
  gap: 8px;
  font-weight: 760;
  line-height: 1.35;
}

.versus {
  color: var(--accent);
  font-weight: 900;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.side-panel {
  align-self: start;
  position: sticky;
  top: 104px;
}

.team-card { padding: 13px 14px; }
.team-card strong { display: block; line-height: 1.35; }
.team-card span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.empty-state {
  padding: 22px;
  color: var(--muted);
  line-height: 1.55;
}

mark {
  border-radius: 4px;
  padding: 0 2px;
  color: inherit;
  background: #ffe4a8;
}

.booking-section {
  margin: 28px clamp(18px, 4vw, 64px) 58px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(18px, 3vw, 28px);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.fixed-duration {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 13px;
  color: white;
  background: var(--accent);
  font-weight: 850;
}

.booking-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(140px, 0.8fr) minmax(120px, 0.7fr) minmax(210px, 1.1fr) minmax(170px, 0.9fr) auto;
  gap: 12px;
  align-items: end;
}

.membership-field {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  border: 1px solid #c8d2c5;
  border-radius: 8px;
  padding: 6px;
  margin: 0;
  background: #eef3e8;
}

.membership-field legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.membership-field label {
  display: inline-flex;
  position: relative;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 11px;
  color: #3b4a40;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.membership-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.membership-field label span::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 7px;
  border-radius: 50%;
  background: #9aa89f;
  vertical-align: 1px;
}

.membership-field label:has(input[value="member"]:checked) {
  border-color: #d2b900;
  background: #fff36a;
  color: #332f00;
  box-shadow: 0 7px 16px rgba(181, 160, 0, 0.18);
  transform: translateY(-1px);
}

.membership-field label:has(input[value="member"]:checked) span::before {
  background: #c4a600;
}

.membership-field label:has(input[value="nonmember"]:checked) {
  border-color: #5bb5e8;
  background: #9fdcff;
  color: #06344c;
  box-shadow: 0 7px 16px rgba(40, 130, 180, 0.18);
  transform: translateY(-1px);
}

.membership-field label:has(input[value="nonmember"]:checked) span::before {
  background: #1685c2;
}

.primary-button, .secondary-button, .danger-button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: white;
  background: var(--accent-2);
  font-weight: 850;
  cursor: pointer;
}

.primary-button:disabled {
  color: #6d756d;
  background: #d7ddd4;
  cursor: not-allowed;
}

.secondary-button {
  color: var(--ink);
  background: var(--soft);
}

.secondary-button.is-muted {
  color: white;
  background: #5f6d64;
}

.booking-message {
  min-height: 24px;
  margin: 12px 0 18px;
  color: var(--muted);
  font-weight: 750;
}

.booking-message.is-error { color: #8b3427; }
.booking-message.is-success { color: var(--accent-2); }

.booking-layout {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.availability-panel {
  grid-column: 1 / -1;
  min-width: 0;
}

.availability-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  contain: inline-size;
  overflow: hidden;
  clip-path: inset(0);
  isolation: isolate;
  border: 1px solid #cfcfcf;
  border-radius: 3px;
  background: white;
}

.availability-table-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  contain: inline-size;
  clip-path: inset(0);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.availability-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-family: Arial, sans-serif;
  font-size: 0.8rem;
}

.availability-table th, .availability-table td {
  position: relative;
  width: 74px;
  min-width: 74px;
  height: 26px;
  border: 1px solid #d1d1d1;
  padding: 0;
  color: #000;
  background: #fff;
  text-align: center;
  vertical-align: middle;
}

.availability-table thead th {
  height: 30px;
  font-weight: 700;
  background: #fff;
}

.availability-table .court-heading,
.availability-table .court-name {
  position: sticky;
  left: 0;
  z-index: 4;
  width: 178px;
  min-width: 178px;
  padding: 0 8px;
  text-align: left;
  font-weight: 500;
  background: #fff;
  box-shadow: 6px 0 10px rgba(0, 0, 0, 0.08);
}

.availability-table .court-heading { z-index: 5; }

.availability-cell {
  display: block;
  width: 100%;
  height: 25px;
  border: 0;
  border-radius: 0;
  padding: 0 4px;
  color: #000;
  background: transparent;
  font-size: 0.78rem;
  line-height: 25px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}

.availability-table td.is-booked.is-member,
.availability-table td.is-booked.is-member .availability-cell { background: #fff36a; }

.availability-table td.is-booked.is-nonmember,
.availability-table td.is-booked.is-nonmember .availability-cell { background: #9fdcff; }

.availability-table td.is-booked.is-blocked,
.availability-table td.is-booked.is-blocked .availability-cell {
  color: white;
  background:
    repeating-linear-gradient(135deg, #7b3530 0 8px, #91453e 8px 16px);
}

.availability-table td.is-booked.is-fixed {
  box-shadow: inset 0 0 0 2px #756300;
}

.availability-table td.is-selected,
.availability-table td.is-selected .availability-cell {
  box-shadow: inset 0 0 0 2px #18803f;
}

.availability-table td.is-selected.is-preview-member,
.availability-table td.is-selected.is-preview-member .availability-cell {
  background: #fff36a;
}

.availability-table td.is-selected.is-preview-nonmember,
.availability-table td.is-selected.is-preview-nonmember .availability-cell {
  background: #9fdcff;
}

.availability-cell:disabled { cursor: default; }

.delete-slot-button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  min-height: 18px;
  border: 1px solid rgba(0, 0, 0, 0.34);
  border-radius: 50%;
  padding: 0;
  color: white;
  background: #8b3427;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 15px;
  cursor: pointer;
}

.login-panel {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(180px, 240px) auto auto minmax(220px, 1fr);
  gap: 10px;
  align-items: end;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.login-status {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.booking-login-top {
  margin: 0 0 22px;
  padding: 0 0 18px;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}

.booking-login-top.is-logged-in {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.booking-login-top.is-logged-in .login-status {
  order: 1;
}

.booking-login-top.is-logged-in #logoutButton {
  order: 2;
}

.login-status.is-welcome {
  color: var(--accent-2);
  font-size: 1.08rem;
}

.contact-section {
  display: grid;
  place-items: start;
  padding: 28px clamp(18px, 4vw, 64px) 64px;
}

.contact-person-card {
  width: min(100%, 760px);
}

.contact-person-card .match-time {
  min-height: 180px;
}

.contact-box {
  display: grid;
  gap: 10px;
  width: min(100%, 430px);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(22, 32, 27, 0.08);
}

.contact-box strong {
  font-size: clamp(1.45rem, 4vw, 2rem);
  line-height: 1.05;
}

.contact-box span {
  color: var(--muted);
  line-height: 1.45;
}

.phone-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 48px;
  border-radius: 8px;
  padding: 0 18px;
  color: white;
  background: var(--accent-2);
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.phone-link:hover {
  background: var(--accent);
}

@media (max-width: 860px) {
  .controls,
  .summary,
  .results-grid {
    grid-template-columns: 1fr;
  }

  .booking-form {
    grid-template-columns: 1fr 1fr;
  }

  .primary-button { grid-column: 1 / -1; }
  .side-panel { position: static; }
  .login-panel { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body {
    min-width: 0;
  }

  .masthead {
    min-height: 210px;
    width: 100%;
    padding: 28px 12px 24px;
    align-items: end;
    background-position: center top;
  }

  .masthead__content {
    max-width: 100%;
  }

  h1 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .masthead p:last-of-type {
    font-size: 0.95rem;
  }

  .page-links {
    gap: 7px;
    margin-top: 16px;
  }

  .page-links a {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .booking-section {
    width: auto;
    max-width: calc(100vw - 24px);
    margin: 18px 12px 42px;
    padding: 14px 10px;
    overflow: hidden;
  }

  .section-heading {
    gap: 10px;
    margin-bottom: 14px;
  }

  .fixed-duration {
    justify-content: center;
    width: 100%;
    border-radius: 8px;
  }

  .match-card {
    grid-template-columns: 1fr;
  }

  .match-time {
    grid-template-columns: auto 1fr;
    align-items: center;
  }

  .section-heading,
  .booking-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .membership-field {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .booking-message {
    margin-bottom: 14px;
    font-size: 0.9rem;
  }

  .availability-wrap {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px #d1d1d1;
  }

  .availability-table-scroll {
    width: 100%;
    max-width: 100%;
  }

  .availability-table th,
  .availability-table td {
    width: 56px;
    min-width: 56px;
    height: 24px;
    font-size: 0.68rem;
  }

  .availability-table .court-heading,
  .availability-table .court-name {
    width: 102px;
    min-width: 102px;
    padding: 0 5px;
    font-size: 0.64rem;
    line-height: 1.05;
  }

  .availability-cell {
    height: 23px;
    font-size: 0.62rem;
    line-height: 23px;
  }

  .phone-link {
    width: 100%;
  }
}

/* Jednostranična klupska stranica */
.club-page {
  background:
    linear-gradient(rgba(245, 242, 235, 0.52), rgba(245, 242, 235, 0.62));
}

body:has(.club-page) {
  background:
    linear-gradient(rgba(9, 30, 25, 0.08), rgba(9, 30, 25, 0.12)),
    url("assets/racket-ball-background.png") center / cover fixed;
}

.club-page > section,
.club-page > footer {
  position: relative;
  z-index: 1;
}

.club-hero {
  min-height: 155px;
  padding-top: 18px;
  padding-bottom: 18px;
  background: linear-gradient(90deg, rgba(7, 35, 29, 0.88), rgba(7, 35, 29, 0.58));
}

.club-hero h1 {
  margin-bottom: 5px;
  font-size: clamp(1.9rem, 4vw, 3rem);
}

.club-hero .page-links {
  margin-top: 12px;
}

.club-hero .page-links a {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.86rem;
}

.weather-section {
  padding: 34px clamp(18px, 4vw, 64px) 6px;
}

.club-page .booking-section {
  margin-left: clamp(10px, 2vw, 32px);
  margin-right: clamp(10px, 2vw, 32px);
  background: rgba(255, 253, 248, 0.86);
  backdrop-filter: blur(12px);
}

.club-page .availability-table {
  width: 100%;
  font-size: 0.92rem;
}

.club-page .availability-table th,
.club-page .availability-table td {
  width: auto;
  min-width: 180px;
  height: 40px;
}

.club-page .availability-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 42px;
  padding: 0 10px;
  font-size: 0.88rem;
}

.club-page .availability-table .court-heading,
.club-page .availability-table .court-name {
  width: 92px;
  min-width: 92px;
  padding: 0 12px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 850;
}

.club-page .availability-cell {
  height: 39px;
  padding: 0 7px;
  font-size: 0.82rem;
  line-height: 39px;
}

.weather-heading {
  align-items: center;
  margin-bottom: 16px;
}

.weather-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.weather-updated {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 750;
}

.weather-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.weather-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  background: rgba(255, 253, 248, 0.84);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 28px rgba(22, 32, 27, 0.08);
}

.weather-card__top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.weather-card__top strong,
.weather-card__top span {
  display: block;
}

.weather-card__top strong {
  font-size: 1.08rem;
  text-transform: capitalize;
}

.weather-card__top div > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.weather-icon {
  font-size: 2rem;
  line-height: 1;
}

.weather-description {
  min-height: 20px;
  margin: 15px 0 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.temperature {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 16px;
}

.temperature strong {
  font-size: 2.5rem;
  line-height: 1;
}

.temperature span {
  color: var(--muted);
  font-weight: 750;
}

.temperature-chart {
  margin: 0 0 16px;
  border: 1px solid rgba(24, 109, 103, 0.16);
  border-radius: 10px;
  padding: 11px 10px 5px;
  background: rgba(238, 243, 232, 0.72);
  overflow: hidden;
}

.temperature-chart__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px 2px;
}

.temperature-chart__heading strong {
  font-size: 0.78rem;
}

.temperature-chart__heading span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.temperature-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-grid-line {
  stroke: rgba(96, 112, 102, 0.2);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.chart-area {
  fill: rgba(191, 76, 47, 0.12);
}

.chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.temperature-chart circle {
  fill: var(--panel);
  stroke: var(--accent);
  stroke-width: 2.5;
}

.temperature-chart text {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-weight: 800;
}

.chart-value {
  fill: var(--ink);
  font-size: 10px;
}

.chart-time {
  fill: var(--muted);
  font-size: 9px;
}

.weather-details {
  display: grid;
  gap: 8px;
  margin: 0;
}

.weather-details div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}

.weather-details dt {
  color: var(--muted);
  font-weight: 700;
}

.weather-details dd {
  margin: 0;
  font-weight: 850;
  text-align: right;
}

.weather-details dd.is-moderate { color: #a65d13; }
.weather-details dd.is-strong { color: #a03729; }

.weather-loading,
.weather-error {
  grid-column: 1 / -1;
  border: 1px dashed #b8c5b7;
  border-radius: 12px;
  padding: 28px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.65);
  text-align: center;
  font-weight: 750;
}

.location-section {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  margin: 20px clamp(18px, 4vw, 64px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(20px, 4vw, 34px);
  background: rgba(255, 253, 248, 0.86);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 28px rgba(22, 32, 27, 0.08);
}

.location-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  color: white;
  background: var(--accent);
  font-size: 2rem;
  font-weight: 900;
}

.location-copy .eyebrow {
  margin-bottom: 5px;
}

.location-copy h2 {
  margin-bottom: 5px;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.location-copy p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.directions-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border-radius: 9px;
  padding: 0 20px;
  color: white;
  background: var(--accent-2);
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.directions-button:hover {
  background: var(--accent);
}

.table-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.table-title-row h3 { margin: 0; }

.table-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.table-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.table-legend i {
  width: 12px;
  height: 12px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 3px;
}

.legend-member { background: #fff36a; }
.legend-nonmember { background: #9fdcff; }

.community-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(28px, 6vw, 80px);
  margin: 20px clamp(18px, 4vw, 64px) 56px;
  border-radius: 16px;
  padding: clamp(24px, 5vw, 54px);
  color: white;
  background: linear-gradient(135deg, #123d35, #186d67);
  box-shadow: var(--shadow);
}

.community-copy {
  max-width: 650px;
}

.community-copy .eyebrow { color: #dce865; }

.community-copy h2 {
  margin-bottom: 12px;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.community-copy p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.03rem;
  line-height: 1.6;
}

.qr-frame {
  display: grid;
  place-items: center;
  width: 210px;
  aspect-ratio: 1;
  border: 8px solid white;
  border-radius: 14px;
  overflow: hidden;
  color: var(--ink);
  background: #fff;
}

.qr-frame > * { grid-area: 1 / 1; }

.qr-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-placeholder {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 15px;
  text-align: center;
}

.qr-placeholder__icon {
  font-size: 3rem;
  line-height: 1;
}

.qr-placeholder small {
  color: var(--muted);
  line-height: 1.35;
}

.qr-frame.has-qr .qr-placeholder { display: none; }

.club-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(18px, 4vw, 64px);
  color: rgba(255, 255, 255, 0.7);
  background: #10221d;
  font-size: 0.86rem;
}

.club-footer > div {
  display: grid;
  gap: 5px;
}

.club-footer strong { color: white; }

.footer-contact {
  justify-items: end;
  text-align: right;
}

.footer-contact a {
  color: white;
  font-size: 1rem;
  font-weight: 850;
  text-decoration: none;
}

.footer-contact a:hover {
  color: #dce865;
}

.footer-admin-link {
  margin-top: 4px;
  font-size: 0.76rem !important;
  opacity: 0.72;
}

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

@media (max-width: 680px) {
  .club-hero {
    min-height: 155px;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  body:has(.club-page) {
    background-position: 72% center;
    background-size: cover;
  }

  .weather-section {
    padding: 24px 12px 4px;
  }

  .weather-heading,
  .table-title-row,
  .club-footer {
    align-items: start;
    flex-direction: column;
  }

  .footer-contact {
    justify-items: start;
    text-align: left;
  }

  .weather-grid {
    grid-template-columns: 1fr;
  }

  .weather-card {
    padding: 16px;
  }

  .club-page .booking-section {
    max-width: calc(100vw - 16px);
    margin-left: 8px;
    margin-right: 8px;
  }

  .club-page .availability-table th,
  .club-page .availability-table td {
    width: auto;
    min-width: 150px;
    height: 36px;
  }

  .club-page .availability-table .court-heading,
  .club-page .availability-table .court-name {
    width: 76px;
    min-width: 76px;
    font-size: 0.78rem;
  }

  .club-page .availability-cell {
    height: 35px;
    font-size: 0.72rem;
    line-height: 35px;
  }

  .community-section {
    grid-template-columns: 1fr;
    justify-items: center;
    margin: 16px 12px 36px;
    text-align: center;
  }

  .location-section {
    grid-template-columns: auto minmax(0, 1fr);
    margin: 16px 12px;
  }

  .directions-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .qr-frame { width: min(210px, 70vw); }
}
