:root {
  --ink: #08182c;
  --muted: #5c6877;
  --line: #dce3eb;
  --paper: #f4f6fa;
  --surface: #ffffff;
  --accent: #c9001f;
  --accent-dark: #980018;
  --blue: #06284f;
  --green: #1f7a4d;
  --shadow: 0 18px 40px rgba(6, 40, 79, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 14px;
  color: #fff;
  background: var(--blue);
  border-radius: 6px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  background: #031a35;
}

.brand img {
  display: block;
  width: 128px;
  height: auto;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.main-nav a {
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--ink);
  background: #edf1f6;
}

.hero {
  position: relative;
  width: 100%;
  display: block;
  background: var(--blue);
  overflow: hidden;
}

.hero img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  object-fit: contain;
}

.hero::after {
  content: none;
}

.hero-content {
  width: min(760px, 100%);
  padding: clamp(32px, 7vw, 86px);
  color: white;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffca66;
}

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

h1 {
  margin-bottom: 16px;
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: 0.92;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1.08;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.hero p {
  max-width: 560px;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero-actions,
.page-title {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  color: white;
  background: var(--accent);
}

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

.button.secondary {
  color: white;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.button.secondary.dark {
  color: white;
  background: var(--blue);
  border: 1px solid var(--blue);
}

.button.secondary.dark:hover {
  background: #031a35;
  border-color: #031a35;
}

.home-actions {
  width: min(1120px, calc(100% - 36px));
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0 auto;
  padding: 22px 0 10px;
}

.section,
.page {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(44px, 7vw, 84px) 0;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 6vw, 72px);
  align-items: start;
  border-bottom: 1px solid var(--line);
}

.intro > p {
  color: var(--muted);
  font-size: 1.15rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature,
.rules article {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.feature span {
  display: inline-block;
  margin-bottom: 34px;
  color: var(--accent);
  font-weight: 900;
}

.feature p,
.rules p,
.page-title p {
  color: var(--muted);
}

.sponsors {
  border-top: 1px solid var(--line);
}

.sponsor-list {
  display: flex;
  justify-content: center;
  max-width: 960px;
  margin: 0 auto;
}

.sponsor-lockup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr) minmax(0, 1.2fr);
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3vw, 36px);
  width: min(100%, 880px);
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.sponsor-lockup img {
  display: block;
  width: 100%;
  margin: 0 auto;
  object-fit: contain;
}

.junta-mark {
  max-width: 260px;
  max-height: 130px;
}

.council-mark {
  max-width: 220px;
  max-height: 130px;
}

.city-mark {
  max-width: 320px;
  max-height: 150px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading > p:last-child {
  color: var(--muted);
}

.registrations {
  border-top: 1px solid var(--line);
}

.counts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

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

.count-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.count-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.count-top h3 {
  margin: 0 0 4px;
  font-size: 1.02rem;
}

.count-top p,
.counts-note,
.count-extra {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.count-top p span {
  display: block;
  color: var(--blue);
  font-weight: 800;
}

.count-top strong {
  min-width: 42px;
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 6px;
  color: #fff;
  background: var(--accent);
  border-radius: 6px;
  line-height: 1;
}

.team-slots {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.counts-grid.compact .team-slots {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.team-slot {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 32px;
  padding: 4px 8px;
  color: var(--muted);
  background: #f3f6f9;
  border: 1px solid #e3e9f0;
  border-radius: 6px;
}

.team-slot span {
  color: var(--blue);
  font-weight: 900;
}

.team-slot strong {
  overflow: hidden;
  color: #8a96a4;
  font-size: 0.9rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-slot.filled {
  color: var(--ink);
  background: #fff;
  border-color: rgba(6, 40, 79, 0.26);
}

.team-slot.filled strong {
  color: var(--ink);
}

.count-extra {
  color: var(--accent);
  font-weight: 800;
}

.counts-note {
  margin-top: 16px;
}

.availability-check {
  max-width: 780px;
  display: grid;
  gap: 16px;
  margin: 0 0 20px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid rgba(6, 40, 79, 0.2);
  border-left: 6px solid var(--accent);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.availability-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.availability-check .eyebrow {
  margin-bottom: 4px;
}

.availability-check h2 {
  margin-bottom: 4px;
  font-size: 1.15rem;
}

.availability-check p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.availability-summary > strong {
  min-width: 72px;
  min-height: 54px;
  display: grid;
  place-items: center;
  padding: 8px 10px;
  color: #fff;
  background: var(--blue);
  border-radius: 6px;
  font-size: 1.2rem;
  line-height: 1;
}

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

.availability-item {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  background: #f7fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.availability-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.availability-item h3 {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.15;
}

.availability-item-top span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
}

.mini-bars {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 4px;
}

.mini-bar {
  min-width: 0;
  height: 9px;
  background: #edf1f6;
  border: 1px solid #d8e0ea;
  border-radius: 999px;
}

.mini-bar.is-filled {
  background: var(--green);
  border-color: var(--green);
}

.page-title {
  display: block;
  max-width: 760px;
  padding-bottom: 32px;
}

.page-title h1 {
  color: var(--ink);
  font-size: clamp(2.7rem, 7vw, 5.8rem);
}

.form,
.rules {
  display: grid;
  gap: 18px;
}

.form {
  max-width: 780px;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

.form-row {
  display: grid;
  gap: 7px;
}

fieldset {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0 0 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

fieldset:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

legend {
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 1.05rem;
  font-weight: 900;
}

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

.player-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: #f7fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.player-card h2 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: 1.1rem;
}

label {
  color: var(--ink);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #bac6d0;
  border-radius: 6px;
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(6, 40, 79, 0.2);
  border-color: var(--blue);
}

.form.was-validated input:invalid,
.form.was-validated select:invalid,
.form.was-validated textarea:invalid {
  background: #fff1f3;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 0, 31, 0.14);
}

.form.was-validated input:invalid:focus,
.form.was-validated select:invalid:focus,
.form.was-validated textarea:invalid:focus {
  outline-color: rgba(201, 0, 31, 0.24);
}

.checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--muted);
}

.checkbox input {
  width: 18px;
  min-height: 18px;
  margin-top: 4px;
  flex: 0 0 18px;
}

.payment-info,
.privacy-note,
.consent-card {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.payment-info {
  display: grid;
  gap: 9px;
  padding: 20px;
  background: #edf4f8;
  border-left: 5px solid var(--blue);
}

.payment-info h2,
.payment-info h3,
.privacy-note h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.15rem;
}

.payment-info h3 {
  margin-top: 7px;
  font-size: 1rem;
}

.payment-info p,
.privacy-note p {
  margin: 0;
}

.payment-iban {
  padding: 12px 14px;
  overflow-wrap: anywhere;
  color: var(--blue);
  background: #fff;
  border: 1px dashed rgba(6, 40, 79, 0.35);
  border-radius: 6px;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.035em;
}

.payment-iban span {
  display: inline-block;
  margin-right: 8px;
  color: var(--accent);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.registration-prices {
  display: grid;
  gap: 7px;
}

.registration-price {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: baseline;
  padding: 11px 13px;
  background: #fff;
  border: 1px solid rgba(6, 40, 79, 0.16);
  border-radius: 6px;
}

.registration-price strong {
  color: var(--ink);
}

.registration-price span {
  color: var(--blue);
  font-weight: 900;
  text-align: right;
}

.privacy-section {
  gap: 14px;
}

.privacy-note {
  display: grid;
  gap: 9px;
  padding: 18px;
  color: var(--muted);
  background: #f7fafb;
}

.privacy-note a {
  color: var(--blue);
  font-weight: 800;
}

.consent-card {
  padding: 15px;
  background: #fff;
}

.optional-consent {
  background: #f7fafb;
}

.privacy-footer {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
}

.form-message {
  min-height: 24px;
  margin: 0;
  color: var(--green);
  font-weight: 800;
}

.form-message.error {
  color: var(--accent);
}

.form-note {
  margin: -8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button.ghost {
  color: var(--blue);
  background: #edf1f6;
  border: 1px solid rgba(6, 40, 79, 0.28);
}

.button.ghost:hover {
  background: #e0e8f1;
}

.is-hidden {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rules {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.site-footer {
  padding: 28px 18px;
  color: white;
  background: var(--ink);
  text-align: center;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
  }

  .hero img {
    min-height: 0;
  }

  .sponsor-lockup {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    min-height: auto;
    padding: 16px;
  }

  .city-mark {
    grid-column: 1 / -1;
    max-width: 250px;
  }

  .intro,
  .feature-grid,
  .sponsor-list,
  .counts-grid,
  .counts-grid.compact,
  .availability-check,
  .form-grid,
  .players-grid,
  .rules {
    grid-template-columns: 1fr;
  }

  .availability-summary,
  .availability-list {
    grid-template-columns: 1fr;
  }

  .availability-summary > strong {
    width: 100%;
  }

  .counts-grid.compact .team-slots {
    grid-template-columns: 1fr;
  }

  .form {
    padding: 18px;
  }

  .registration-price {
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
  }

  .registration-price span {
    text-align: left;
  }
}
.optional-label,
.form-hint {
  color: #5f6b76;
  font-size: 0.92rem;
  font-weight: 400;
}

#additionalPlayers {
  display: contents;
}

.add-player {
  margin-top: 1rem;
}

.player-card-heading {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.remove-player {
  background: transparent;
  border: 0;
  color: #a52a20;
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
}

.individual-count-card { background: #fff; border: 1px solid #d7e0e7; border-radius: 16px; margin: 1rem 0 1.25rem; padding: 1rem; }
.individual-count-card .availability-item-top { align-items: flex-start; display: flex; gap: 1rem; justify-content: space-between; }
.individual-count-card h3, .individual-count-card p { margin: 0; }
.individual-count-card p { color: #5f6b76; margin-top: .25rem; }
.individual-count-card p span { white-space: nowrap; }
.individual-count-card strong { color: #e33d2e; font-size: 1.5rem; }
.individual-progress { background: #e4e9ed; border-radius: 999px; height: 10px; margin-top: .85rem; overflow: hidden; }
.individual-progress span { background: #e33d2e; border-radius: inherit; display: block; height: 100%; min-width: 0; transition: width .25s ease; }

.individual-breakdown { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 1rem; }
.individual-breakdown-item { background: #f7f9fa; border-radius: 12px; padding: .75rem; }
.individual-breakdown-item > div:first-child { align-items: center; display: flex; justify-content: space-between; }
.individual-breakdown-item h4 { font-size: .95rem; margin: 0; }
.individual-breakdown-item strong { font-size: 1rem; }
.individual-breakdown-item .individual-progress { height: 7px; margin-top: .5rem; }
