/* ============== TORNEO DE FUTBOLÍN ============== */

/* ---------- Topnav simplificado ---------- */
.topnav {
  background: var(--bg-warm);
  border-bottom: 1px solid rgba(31, 22, 18, 0.08);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topnav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.topnav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
}
.topnav-brand img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 50%;
}
.topnav-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.topnav-brand-text strong {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.3rem;
  font-weight: 600;
}
.topnav-brand-text em {
  font-style: normal;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.topnav-back {
  color: var(--brand);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.topnav-back:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
.torneo-hero {
  background:
    radial-gradient(circle at 30% 20%, rgba(162, 85, 63, 0.18), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(107, 42, 26, 0.12), transparent 50%),
    linear-gradient(135deg, var(--ink) 0%, var(--brand-dark) 100%);
  color: #fff;
  padding: clamp(4rem, 12vw, 8rem) 0;
  position: relative;
  overflow: hidden;
}
.torneo-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg,
      rgba(255,255,255,0.03) 0,
      rgba(255,255,255,0.03) 2px,
      transparent 2px,
      transparent 12px);
  pointer-events: none;
}
.torneo-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
}
.torneo-eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f3c98b;
  margin-bottom: 1.5rem;
}
.torneo-hero .torneo-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 600;
  line-height: 1;
  margin: 0 0 1.5rem;
  color: #fff;
}
.torneo-title span {
  color: #f3c98b;
  font-style: italic;
  font-weight: 500;
}
.torneo-sub {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.55;
  margin: 0 0 2.5rem;
  max-width: 600px;
}
.torneo-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}
.torneo-cta-main {
  background: #f3c98b !important;
  color: var(--brand-dark) !important;
  padding: 1.1rem 2rem;
  font-weight: 600;
  font-size: 1.05rem;
  border-radius: 999px;
}
.torneo-cta-main:hover { background: #fff !important; }
.torneo-cta-secondary {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.torneo-cta-secondary:hover { color: #fff; }

/* ---------- Info cards ---------- */
.torneo-info { background: var(--bg); }
.torneo-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}
.torneo-card {
  background: #fff;
  border: 1px solid rgba(31, 22, 18, 0.08);
  border-radius: 18px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.torneo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(31, 22, 18, 0.08);
}
.torneo-card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.torneo-card h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--brand) !important;
}
.torneo-card-highlight h3 { color: #f3c98b !important; }
.home-torneo-cta .home-torneo-title { color: #fff; }
.torneo-card p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
}
.torneo-card-highlight {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border: none;
}
.torneo-card-highlight h3 { color: #f3c98b; }
.torneo-card-highlight p { color: rgba(255,255,255,0.9); }

/* ---------- Tabla bote ---------- */
.torneo-bote-table {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid rgba(31, 22, 18, 0.08);
  border-radius: 18px;
  padding: 2rem;
}
.torneo-bote-table h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: var(--ink);
  text-align: center;
}
.torneo-bote-table p.muted {
  text-align: center;
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.torneo-bote-table table {
  width: 100%;
  border-collapse: collapse;
}
.torneo-bote-table th,
.torneo-bote-table td {
  padding: 0.85rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid rgba(31, 22, 18, 0.06);
}
.torneo-bote-table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  font-weight: 600;
}
.torneo-bote-table td { font-size: 1rem; color: var(--ink); }
.torneo-bote-highlight {
  background: rgba(243, 201, 139, 0.18);
}
.torneo-bote-highlight strong { color: var(--brand); }

/* ---------- Equipos inscritos ---------- */
.torneo-equipos { background: var(--bg); }
.torneo-equipos-counter {
  text-align: center;
  margin-bottom: 3rem;
}
.torneo-counter-num {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(4rem, 14vw, 7rem);
  font-weight: 600;
  color: var(--brand);
  line-height: 1;
}
.torneo-counter-label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-soft);
}

.torneo-bracket-wrap {
  margin: 0 -1rem 3rem;
  overflow-x: auto;
  padding: 0.5rem 1rem 1rem;
  -webkit-overflow-scrolling: touch;
}
.torneo-equipos-loading,
.torneo-equipos-empty {
  text-align: center;
  padding: 2rem;
  font-style: italic;
  color: var(--ink-soft);
}

.bracket {
  display: flex;
  gap: 2rem;
  min-width: max-content;
  align-items: stretch;
  padding: 0 0.5rem;
}
.round {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  flex: 0 0 200px;
  position: relative;
  padding-top: 2.2rem;
}
.round-label {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brand);
  font-weight: 600;
}
.match {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #fff;
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 2px 8px rgba(31, 22, 18, 0.04);
  border: 1px solid rgba(31, 22, 18, 0.06);
  position: relative;
}
/* Línea horizontal que sale de cada match hacia la siguiente ronda */
.round:not(:last-child) .match::after {
  content: "";
  position: absolute;
  right: -2rem;
  top: 50%;
  width: 2rem;
  height: 2px;
  background: rgba(107, 42, 26, 0.3);
}
/* Quitamos línea en la ronda previa al campeón porque va directa */
.round.round-champion .match::after,
.round:last-child .match::after { display: none; }

.slot {
  background: var(--bg-warm);
  border-radius: 6px;
  padding: 0.55rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-height: 52px;
  justify-content: center;
  transition: background 0.15s;
}
.slot-seed {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 0.08em;
}
.slot-name {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
}
.slot-players {
  font-size: 0.75rem;
  color: var(--ink-soft);
}
.slot.is-empty {
  background: repeating-linear-gradient(
    45deg,
    rgba(31, 22, 18, 0.04) 0,
    rgba(31, 22, 18, 0.04) 6px,
    transparent 6px,
    transparent 12px
  );
  border: 1px dashed rgba(31, 22, 18, 0.18);
  align-items: center;
  justify-content: center;
}
.slot-empty-label {
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-style: italic;
}
.slot.is-tbd {
  background: rgba(31, 22, 18, 0.04);
  color: var(--ink-soft);
  font-size: 1.1rem;
  font-weight: 300;
  align-items: center;
  justify-content: center;
}
.slot.is-paid {
  border-left: 3px solid #00c389;
}

.round-champion {
  justify-content: center;
  flex: 0 0 180px;
}
.champion-box {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #f3c98b;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
  font-weight: 600;
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: 12px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile: scroll horizontal */
@media (max-width: 768px) {
  .round { flex: 0 0 170px; }
  .slot-name { font-size: 0.95rem; }
  .torneo-bracket-wrap::after {
    content: "← desliza →";
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: var(--ink-soft);
    margin-top: 1rem;
    font-style: italic;
  }
}

.torneo-equipo-card {
  background: #fff;
  border: 1px solid rgba(31, 22, 18, 0.08);
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1.4rem;
  position: relative;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.torneo-equipo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(31, 22, 18, 0.06);
  border-color: rgba(107, 42, 26, 0.2);
}
.torneo-equipo-card.is-paid {
  border-color: rgba(0, 195, 137, 0.35);
  background: linear-gradient(180deg, #fff 0%, #f3fbf7 100%);
}
.torneo-equipo-seed {
  display: inline-block;
  font-family: "Inter", monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand);
  background: rgba(107, 42, 26, 0.08);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  margin-bottom: 0.6rem;
}
.torneo-equipo-name {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--ink) !important;
  line-height: 1.15;
}
.torneo-equipo-players {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin: 0;
}
.torneo-equipo-players span {
  color: var(--brand);
  font-weight: 500;
  margin: 0 0.15rem;
}
.torneo-equipo-paid {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #00805a;
  background: rgba(0, 195, 137, 0.15);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

.torneo-equipos-cta {
  text-align: center;
  margin: 0;
}

/* ---------- Form ---------- */
.torneo-form-section { background: var(--bg-warm); }
.torneo-form {
  max-width: 700px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}
.form-group {
  background: #fff;
  border: 1px solid rgba(31, 22, 18, 0.08);
  border-radius: 14px;
  padding: 1.5rem;
  display: grid;
  gap: 1.25rem;
}
.form-group-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
  color: var(--brand);
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.form-field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
}
.form-field .muted { color: var(--ink-soft); font-weight: 400; }
.form-field input,
.form-field textarea {
  font-family: "Inter", sans-serif;
  font-size: 16px; /* iOS no zoom */
  padding: 0.85rem 1rem;
  border: 1px solid rgba(31, 22, 18, 0.18);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(107, 42, 26, 0.12);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.5;
  background: rgba(255,255,255,0.6);
  padding: 1rem;
  border-radius: 10px;
}
.form-consent input { margin-top: 0.2rem; flex-shrink: 0; }
.form-consent a { color: var(--brand); }

.torneo-submit {
  font-size: 1.05rem;
  padding: 1.1rem;
  position: relative;
}
.torneo-submit-loading { display: none; }
.torneo-submit.is-loading .torneo-submit-default { display: none; }
.torneo-submit.is-loading .torneo-submit-loading { display: inline; }

.torneo-msg {
  padding: 1rem 1.25rem;
  border-radius: 10px;
  font-size: 0.95rem;
  text-align: center;
  margin: 0;
}
.torneo-msg.ok {
  background: #e8f3ea;
  color: #2c5e36;
  border: 1px solid #b9dac0;
}
.torneo-msg.err {
  background: #fbeaea;
  color: #8a2a2a;
  border: 1px solid #e0b5b5;
}

/* ---------- Bizum payment block ---------- */
.bizum-block {
  max-width: 700px;
  margin: 0 auto;
  background: #fff;
  border-radius: 18px;
  padding: 2.5rem 2rem;
  box-shadow: 0 20px 60px rgba(31, 22, 18, 0.08);
}
.bizum-success {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(31, 22, 18, 0.08);
}
.bizum-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #d8f0dc;
  color: #2c7a3e;
  font-size: 2.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.bizum-success h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink) !important;
  margin: 0 0 0.5rem;
}
.bizum-id {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0;
  letter-spacing: 0.04em;
}
.bizum-id span {
  font-family: "Inter", monospace;
  font-weight: 600;
  color: var(--brand);
}

.bizum-pay h4 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--ink);
  text-align: center;
}
.bizum-pay-lead {
  text-align: center;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0 0 2rem;
}

.bizum-card {
  background: var(--bg-warm);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
}
.bizum-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(31, 22, 18, 0.08);
  gap: 1rem;
}
.bizum-row:last-child { border-bottom: none; }
.bizum-label {
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.bizum-amount {
  font-size: 1.3rem;
  color: var(--brand);
  font-weight: 600;
}
.bizum-amount small {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--ink-soft);
  text-transform: none;
  letter-spacing: 0;
}
.bizum-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid rgba(31, 22, 18, 0.12);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  font-family: "Inter", monospace;
  font-size: 1rem;
  color: var(--ink);
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}
.bizum-copy:hover { border-color: var(--brand); }
.bizum-copy.is-copied {
  background: #d8f0dc;
  border-color: #6db478;
  color: #2c7a3e;
}
.bizum-copy-icon { font-size: 0.95rem; opacity: 0.7; }
.bizum-copy.is-copied .bizum-copy-icon { opacity: 1; }

.bizum-actions {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}
.bizum-open {
  background: #00c389 !important; /* color Bizum oficial */
  color: #fff !important;
  text-align: center;
  padding: 1.1rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
}
.bizum-open:hover { background: #00a574 !important; }
.bizum-paid {
  text-align: center;
  color: var(--brand);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(107, 42, 26, 0.2);
  transition: background 0.15s;
}
.bizum-paid:hover { background: rgba(107, 42, 26, 0.06); }

.bizum-help {
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
}

/* ---------- Reglas ---------- */
.torneo-rules { background: var(--bg); }
.torneo-rules-list {
  max-width: 760px;
  margin: 0 auto;
  padding-left: 1.5rem;
  display: grid;
  gap: 1rem;
}
.torneo-rules-list li {
  font-size: 1rem;
  color: var(--ink-soft);
  line-height: 1.6;
}
.torneo-rules-list li strong { color: var(--ink); }
.torneo-rules-note {
  text-align: center;
  margin-top: 2.5rem;
  font-size: 0.9rem;
}

/* ---------- Footer simple ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.75);
  padding: 3rem 0;
  text-align: center;
}
.site-footer p { margin: 0.5rem 0; font-size: 0.95rem; }
.site-footer a { color: #f3c98b; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .muted { font-size: 0.85rem; color: rgba(255,255,255,0.5); }

/* ============== HOME CTA (banner promocional) ============== */
.home-torneo-cta {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  padding: clamp(2.5rem, 6vw, 4rem) 0;
  position: relative;
  overflow: hidden;
}
.home-torneo-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg,
      rgba(255,255,255,0.04) 0,
      rgba(255,255,255,0.04) 2px,
      transparent 2px,
      transparent 14px);
  pointer-events: none;
}
.home-torneo-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.home-torneo-text {
  flex: 1 1 320px;
  max-width: 540px;
}
.home-torneo-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f3c98b;
  margin-bottom: 0.75rem;
}
.home-torneo-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  margin: 0 0 0.75rem;
  line-height: 1.1;
}
.home-torneo-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
  margin: 0 0 1.5rem;
}
.home-torneo-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #f3c98b;
  color: var(--brand-dark);
  padding: 1rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s;
}
.home-torneo-btn:hover { background: #fff; }
.home-torneo-graphic {
  font-size: clamp(5rem, 12vw, 8rem);
  flex: 0 0 auto;
  text-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
