* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #9d0e18;
  --primary-light: #c5192d;
  --primary-dark: #5b040d;
  --accent: #f3f0ea;
  --accent-strong: #ffffff;
  --accent-hover: #dfe3e8;
  --text-dark: #111111;
  --text-light: #ffffff;
  --bg-light: #f8f9fa;
  --bg-dark: #111111;
  --surface: rgba(17, 17, 17, 0.76);
  --border-color: rgba(255, 255, 255, 0.12);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(17, 17, 17, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.nav-logo:hover {
  transform: scale(1.05);
}

.nav-brand {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--accent);
  letter-spacing: 0.5px;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem;
  overflow: hidden;
  background:
    linear-gradient(110deg, rgba(10, 10, 10, 0.86), rgba(95, 7, 14, 0.68)),
    url('logos/dogos rugby finales_Mesa de trabajo 1.png') center/cover no-repeat,
    url('logos/dogos rugby finales-fondo transparente 3.png') bottom right/42% no-repeat;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero::before {
  background: url('logos/dogos rugby finales-06.png') center/42% no-repeat;
  opacity: 0.18;
  filter: grayscale(100%) brightness(1.4);
}

.hero::after {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.7));
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 760px;
  animation: fadeInUp 1s ease-out;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.eyebrow.dark {
  color: var(--primary);
}

h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2.6rem, 5vw, 5rem);
  font-weight: 800;
  color: var(--accent-strong);
  margin-bottom: 1rem;
  letter-spacing: -1px;
  animation: slideDown 0.8s ease-out 0.1s both;
}

h2 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1.5rem;
  letter-spacing: -0.5px;
}

.tagline {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 2rem;
  line-height: 1.8;
  animation: slideDown 0.8s ease-out 0.2s both;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  animation: slideDown 0.8s ease-out 0.3s both;
}

.cta-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 1rem 2rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.cta-button {
  background: var(--accent);
  color: var(--text-dark);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.22);
}

.cta-button:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--text-light);
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

/* Main Content */
main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

section {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid var(--border-color);
  border-radius: 22px;
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

section:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.18);
}

.gallery-section {
  padding-top: 2rem;
}

.training-section {
  margin-top: 0;
}

.section-header {
  margin-bottom: 1.75rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-item {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
  min-height: 220px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-note {
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.98rem;
  font-style: italic;
}

.gallery-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

.page-btn,
.page-number {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-light);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.page-btn:hover,
.page-number:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.24);
}

.page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.page-number.active {
  background: var(--accent);
  color: var(--text-dark);
  border-color: transparent;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 1.5rem;
}

.story-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 1.5rem;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.story-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.22);
}

.story-card h3 {
  color: var(--accent);
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

.story-card p,
.story-section p {
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.8;
}

.training-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.training-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 1.5rem;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.training-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.22);
}

.training-day {
  display: inline-block;
  margin-bottom: 0.7rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.training-card h3 {
  font-size: 2rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.training-card p {
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

.training-card a {
  color: var(--accent);
  font-weight: 700;
}

ul {
  padding-left: 2rem;
  list-style: none;
}

ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
}

ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 1.2rem;
}

.sponsors-showcase {
  overflow: hidden;
  margin-top: 0;
}

.sponsor-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 1rem;
}

.sponsor-card {
  display: flex;
  flex: 1 1 160px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 180px;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.sponsor-card:hover,
.sponsor-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.sponsor-card img {
  max-width: 130px;
  max-height: 90px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.sponsor-card span {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.92rem;
}

.inline-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.inline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  text-align: center;
  text-decoration: none;
}

.events-section {
  overflow: hidden;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.event-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.4rem;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.7rem;
}

.event-date {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.event-card h3 {
  margin: 0;
  color: var(--text-light);
  font-size: 1.3rem;
}

.event-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

.recruitment-section {
  position: relative;
}

.recruitment-intro {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.recruitment-intro p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.02rem;
}

/* Forms */
form {
  display: grid;
  gap: 1.2rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--accent);
  font-size: 0.95rem;
}

.hidden-field {
  display: none;
}

input,
textarea,
button {
  font: inherit;
  padding: 0.9rem 1.2rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
  transition: all 0.3s ease;
  width: 100%;
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(255, 206, 0, 0.1);
}

button {
  border: none;
  background: var(--accent);
  color: var(--text-dark);
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
  width: auto;
}

button:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 206, 0, 0.3);
}

button:active {
  transform: translateY(0);
}

.training-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.training-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.training-modal-card {
  position: relative;
  width: min(90vw, 540px);
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.96), rgba(25, 25, 25, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 2rem 1.75rem 1.5rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.training-modal-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.training-modal-list {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

.training-modal-item {
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.training-day-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.45rem;
}

.training-modal-item strong {
  display: block;
  font-size: 1.4rem;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.training-modal-item p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.training-map-link {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.training-map-link:hover {
  color: var(--accent-hover);
}

.training-modal-button {
  width: 100%;
  margin-top: 0.25rem;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1.5rem;
}

.modal.is-open {
  display: flex;
}

.modal-content {
  position: relative;
  max-width: 1100px;
  width: min(90vw, 1100px);
  background: rgba(17, 17, 17, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 1rem;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-light);
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modal-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
}

.modal-image {
  display: block;
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 14px;
}

a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
}

a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .hero {
    padding: 3rem 1.5rem;
    min-height: auto;
  }

  .hero-logo {
    height: 140px;
    margin-bottom: 1.5rem;
  }

  .tagline {
    font-size: 1rem;
  }

  .cta-button {
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
  }

  main {
    padding: 2rem 1rem;
  }

  section {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-container {
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-pagination {
    align-items: stretch;
  }

  .page-btn,
  .page-number {
    flex: 1;
  }
}
