/* ==========================================================================
   FEVEDA - Federación Venezolana de Deportes Acuáticos
   Frontpage Institucional | Tricolor Venezuela | Mobile-First
   Tipografía: Inter (body) + Montserrat (headings)
   ========================================================================== */

/* ---------- 1. Variables y Reset ---------- */
:root {
  /* Tricolor Venezuela */
  --azul: #0033A0;
  --azul-claro: #1a4fc7;
  --azul-oscuro: #001f6e;
  --amarillo: #FFCC00;
  --amarillo-claro: #ffd633;
  --rojo: #CF142B;
  --rojo-claro: #e02940;

  /* Neutros */
  --blanco: #FFFFFF;
  --gris-50: #FAFAFA;
  --gris-100: #F2F4F7;
  --gris-200: #E4E7EC;
  --gris-300: #D0D5DD;
  --gris-500: #667085;
  --gris-700: #344054;
  --gris-900: #101828;
  --negro: #000000;

  /* Tipografía */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Espaciado */
  --container-max: 1280px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.12);
  --shadow-xl: 0 24px 48px rgba(16, 24, 40, 0.18);

  /* Transiciones */
  --t-fast: 150ms ease;
  --t-base: 250ms ease;
  --t-slow: 400ms ease;

  /* Z-index */
  --z-header: 100;
  --z-overlay: 200;
  --z-modal: 300;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--gris-900);
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, picture, video, svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--azul);
  text-decoration: none;
  transition: color var(--t-fast);
}

a:hover {
  color: var(--azul-claro);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--gris-900);
}

/* ---------- 2. Utilidades ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 16px;
}

.section {
  padding: 48px 0;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
  position: relative;
}

.section-subtitle {
  text-align: center;
  color: var(--gris-500);
  font-size: 1rem;
  margin-bottom: 32px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--amarillo) 0%, var(--azul) 50%, var(--rojo) 100%);
  margin: 12px auto 0;
  border-radius: 2px;
}

.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;
}

/* ---------- 3. Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  transition: all var(--t-base);
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--azul);
  color: var(--blanco);
}

.btn-primary:hover {
  background: var(--azul-oscuro);
  color: var(--blanco);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--amarillo);
  color: var(--gris-900);
}

.btn-secondary:hover {
  background: var(--amarillo-claro);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--blanco);
  border-color: var(--blanco);
}

.btn-outline:hover {
  background: var(--blanco);
  color: var(--azul);
}

.btn-ghost {
  background: transparent;
  color: var(--azul);
  border-color: var(--azul);
}

.btn-ghost:hover {
  background: var(--azul);
  color: var(--blanco);
}

/* ---------- 4. Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--blanco);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t-base);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

/* Barra superior tricolor */
.topbar {
  background: linear-gradient(90deg, var(--amarillo) 0%, var(--amarillo) 33%, var(--azul) 33%, var(--azul) 66%, var(--rojo) 66%, var(--rojo) 100%);
  height: 4px;
  width: 100%;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  max-width: var(--container-max);
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--azul);
  text-decoration: none;
}

.logo:hover {
  color: var(--azul-oscuro);
}

.logo-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text small {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--gris-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--gris-700);
  transition: all var(--t-fast);
}

.icon-btn:hover {
  background: var(--gris-100);
  color: var(--azul);
}

.icon-btn svg {
  width: 22px;
  height: 22px;
}

/* Selector de idioma */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--gris-100);
  padding: 4px;
  border-radius: var(--radius-md);
}

.lang-switcher a {
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gris-500);
  border-radius: 6px;
  transition: all var(--t-fast);
}

.lang-switcher a.active {
  background: var(--blanco);
  color: var(--azul);
  box-shadow: var(--shadow-sm);
}

/* Menú móvil hamburguesa */
.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: var(--radius-md);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gris-900);
  border-radius: 2px;
  transition: all var(--t-base);
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Nav principal */
.nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 360px;
  height: 100vh;
  background: var(--blanco);
  box-shadow: var(--shadow-xl);
  padding: 80px 24px 24px;
  transition: right var(--t-base);
  z-index: var(--z-overlay);
  overflow-y: auto;
}

.nav.active {
  right: 0;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all var(--t-base);
  z-index: calc(var(--z-overlay) - 1);
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  border-bottom: 1px solid var(--gris-200);
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 12px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--gris-900);
  transition: all var(--t-fast);
}

button.nav-link {
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--gris-900);
}

.nav-link:hover, .nav-link:focus {
  background: var(--gris-100);
  color: var(--azul);
  padding-left: 18px;
}

.nav-link svg {
  width: 18px;
  height: 18px;
  color: var(--gris-300);
}

.nav-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gris-500);
  padding: 16px 12px 8px;
}

/* ---------- 5. Hero Rotativo ---------- */
.hero {
  position: relative;
  height: 520px;
  overflow: hidden;
  background: var(--azul-oscuro);
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 800ms ease;
  display: flex;
  align-items: center;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.45);
}

/* Video de fondo para desktop */
.hero-slide-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5);
}

/* En móvil ocultamos el video y mostramos la imagen */
.hero-slide-mobile-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.45);
  display: none; /* solo visible en móvil vía media query */
}

@media (max-width: 767px) {
  .hero-slide-video {
    display: none;
  }
  .hero-slide-mobile-bg {
    display: block;
  }
}

.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 31, 110, 0.85) 0%, rgba(0, 51, 160, 0.55) 50%, rgba(207, 20, 43, 0.4) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  color: var(--blanco);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 204, 0, 0.95);
  color: var(--gris-900);
  padding: 6px 14px;
  border-radius: 20px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 12px;
  max-width: 600px;
  color: #FFFFFF !important;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 51, 160, 0.4);
}

.hero-text {
  font-size: 1rem;
  margin-bottom: 24px;
  max-width: 540px;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* Indicadores del hero */
.hero-indicators {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}

.hero-indicator {
  width: 28px;
  height: 4px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 2px;
  transition: all var(--t-base);
  cursor: pointer;
}

.hero-indicator.active {
  background: var(--amarillo);
  width: 40px;
}

/* Flechas del hero */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blanco);
  z-index: 3;
  transition: all var(--t-fast);
  cursor: pointer;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
}

.hero-arrow svg {
  width: 22px;
  height: 22px;
}

.hero-arrow.prev {
  left: 12px;
}

.hero-arrow.next {
  right: 12px;
}

/* ---------- 6. Buscador Overlay ---------- */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  z-index: var(--z-modal);
  opacity: 0;
  visibility: hidden;
  transition: all var(--t-base);
  padding: 80px 16px 24px;
  overflow-y: auto;
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-form {
  max-width: 720px;
  margin: 0 auto 24px;
  position: relative;
}

.search-input {
  width: 100%;
  height: 56px;
  padding: 0 56px 0 24px;
  font-size: 1.1rem;
  font-family: var(--font-body);
  border: 2px solid var(--gris-300);
  border-radius: var(--radius-lg);
  background: var(--blanco);
  color: var(--gris-900);
  transition: border-color var(--t-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--azul);
}

.search-submit {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: var(--azul);
  color: var(--blanco);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gris-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gris-700);
}

.search-results {
  max-width: 720px;
  margin: 0 auto;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  transition: background var(--t-fast);
  color: var(--gris-900);
}

.search-result-item:hover, .search-result-item:focus {
  background: var(--gris-100);
  color: var(--azul);
}

.search-result-icon {
  width: 40px;
  height: 40px;
  background: var(--gris-100);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--azul);
  flex-shrink: 0;
}

.search-result-content {
  flex: 1;
}

.search-result-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: inherit;
}

.search-result-desc {
  font-size: 0.8rem;
  color: var(--gris-500);
}

.search-no-results {
  text-align: center;
  color: var(--gris-500);
  padding: 32px;
}

/* ---------- 7. Accesos Rápidos (Grid de tarjetas) ---------- */
.quick-access {
  background: var(--gris-50);
}

.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.quick-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 16px;
  background: var(--blanco);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gris-200);
  transition: all var(--t-base);
  color: var(--gris-900);
  min-height: 140px;
  position: relative;
  overflow: hidden;
}

.quick-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--azul);
  transition: width var(--t-base);
}

.quick-card:hover, .quick-card:focus {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--azul-claro);
  color: var(--gris-900);
}

.quick-card:hover::before {
  width: 100%;
  opacity: 0.08;
}

.quick-card[data-color="amarillo"]::before {
  background: var(--amarillo);
}

.quick-card[data-color="rojo"]::before {
  background: var(--rojo);
}

.quick-card-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--azul) 0%, var(--azul-claro) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blanco);
  flex-shrink: 0;
}

.quick-card[data-color="amarillo"] .quick-card-icon {
  background: linear-gradient(135deg, var(--amarillo) 0%, var(--amarillo-claro) 100%);
  color: var(--gris-900);
}

.quick-card[data-color="rojo"] .quick-card-icon {
  background: linear-gradient(135deg, var(--rojo) 0%, var(--rojo-claro) 100%);
}

.quick-card-icon svg {
  width: 24px;
  height: 24px;
}

.quick-card-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
}

.quick-card-desc {
  font-size: 0.78rem;
  color: var(--gris-500);
  line-height: 1.4;
  margin-top: auto;
}

/* ---------- 8. Noticias Destacadas ---------- */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.news-card {
  background: var(--blanco);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gris-200);
  transition: all var(--t-base);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.news-card-image {
  width: 100%;
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: var(--gris-200);
  position: relative;
}

.news-card-category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--rojo);
  color: var(--blanco);
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
}

.news-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card-date {
  font-size: 0.75rem;
  color: var(--gris-500);
  margin-bottom: 8px;
}

.news-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.news-card-excerpt {
  font-size: 0.875rem;
  color: var(--gris-700);
  line-height: 1.5;
  margin-bottom: 12px;
  flex: 1;
}

.news-card-link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--azul);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.news-card-link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--t-fast);
}

.news-card-link:hover svg {
  transform: translateX(4px);
}

/* ---------- 9. Calendario de Eventos ---------- */
.events {
  background: var(--gris-900);
  color: var(--blanco);
}

.events .section-title {
  color: var(--blanco);
}

.events .section-subtitle {
  color: rgba(255, 255, 255, 0.7);
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 800px;
  margin: 0 auto;
}

.event-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--amarillo);
  transition: all var(--t-base);
}

.event-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.event-date {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  background: var(--amarillo);
  color: var(--gris-900);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
}

.event-date-day {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

.event-date-month {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.event-info {
  flex: 1;
  min-width: 0;
}

.event-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--blanco);
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

.event-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.event-meta-item svg {
  width: 14px;
  height: 14px;
}

.event-badge {
  background: var(--azul);
  color: var(--blanco);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.event-badge.clavados { background: #6c5ce7; }
.event-badge.natacion { background: var(--azul); }
.event-badge.waterpolo { background: var(--rojo); }
.event-badge.artistica { background: #00b894; }
.event-badge.aguas-abiertas { background: var(--amarillo); color: var(--gris-900); }

/* ---------- 10. Sobre FEVEDA ---------- */
.about {
  background: var(--blanco);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

.about-text h2 {
  font-size: 1.75rem;
  margin-bottom: 16px;
}

.about-text p {
  color: var(--gris-700);
  margin-bottom: 16px;
  line-height: 1.7;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.stat-card {
  text-align: center;
  padding: 20px 12px;
  background: var(--gris-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--gris-200);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--azul);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--gris-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* ---------- 11. Disciplinas ---------- */
.disciplines-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.discipline-card {
  position: relative;
  padding: 24px 16px;
  background: linear-gradient(135deg, var(--azul) 0%, var(--azul-oscuro) 100%);
  color: var(--blanco);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all var(--t-base);
  overflow: hidden;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.discipline-card:nth-child(2) {
  background: linear-gradient(135deg, var(--rojo) 0%, #a00f23 100%);
}

.discipline-card:nth-child(3) {
  background: linear-gradient(135deg, var(--amarillo) 0%, #d4a900 100%);
  color: var(--gris-900);
}

.discipline-card:nth-child(4) {
  background: linear-gradient(135deg, #00b894 0%, #00806d 100%);
}

.discipline-card:nth-child(5) {
  background: linear-gradient(135deg, #6c5ce7 0%, #4834b3 100%);
}

.discipline-card:nth-child(6) {
  background: linear-gradient(135deg, #e17055 0%, #d35400 100%);
}

.discipline-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.discipline-card img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.discipline-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
}

.discipline-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
}

/* ---------- 11b. Aliados / Instituciones ---------- */
.allies {
  background: var(--blanco);
  padding: 48px 0;
}

.allies-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  align-items: center;
  justify-items: center;
}

.ally-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--gris-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--gris-200);
  transition: all var(--t-base);
  width: 100%;
  height: 100px;
  filter: grayscale(60%);
  opacity: 0.85;
}

.ally-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--azul-claro);
}

.ally-logo img {
  max-width: 100%;
  max-height: 70px;
  object-fit: contain;
}

/* ---------- 12. CTA Banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--azul) 0%, var(--azul-oscuro) 100%);
  color: var(--blanco);
  text-align: center;
  padding: 48px 16px;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--amarillo) 0%, var(--amarillo) 33%, var(--blanco) 33%, var(--blanco) 66%, var(--rojo) 66%, var(--rojo) 100%);
}

.cta-banner h2 {
  color: var(--blanco);
  font-size: 1.75rem;
  margin-bottom: 12px;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 540px;
  margin: 0 auto 24px;
}

.cta-banner .hero-actions {
  justify-content: center;
}

/* ---------- 13. Footer ---------- */
.footer {
  background: var(--gris-900);
  color: rgba(255, 255, 255, 0.8);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand .logo {
  color: var(--blanco);
  margin-bottom: 16px;
}

.footer-brand .logo small {
  color: rgba(255, 255, 255, 0.6);
}

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 16px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blanco);
  transition: all var(--t-fast);
}

.footer-social a:hover {
  background: var(--azul);
  transform: translateY(-2px);
}

.footer-social svg {
  width: 18px;
  height: 18px;
}

.footer-col h4 {
  color: var(--blanco);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 8px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--amarillo);
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  transition: all var(--t-fast);
  display: inline-block;
}

.footer-col ul a:hover {
  color: var(--amarillo);
  padding-left: 4px;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-contact-item svg {
  width: 18px;
  height: 18px;
  color: var(--amarillo);
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom a:hover {
  color: var(--amarillo);
}

/* ---------- 14. Botón "Volver arriba" ---------- */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  background: var(--azul);
  color: var(--blanco);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--t-base);
  z-index: var(--z-header);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--azul-oscuro);
  transform: translateY(-4px);
}

/* ---------- 15. PWA Install Button (en header, no flotante) ---------- */
.install-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  background: var(--azul);
  color: var(--blanco);
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--t-fast);
  cursor: pointer;
  border: 2px solid var(--azul);
  white-space: nowrap;
}

.install-btn:hover {
  background: var(--azul-oscuro);
  border-color: var(--azul-oscuro);
  transform: translateY(-1px);
}

.install-btn svg {
  width: 18px;
  height: 18px;
}

/* Ocultar el botón en pantallas muy pequeñas para no saturar header móvil */
@media (max-width: 480px) {
  .install-btn span { display: none; }
  .install-btn { padding: 0 10px; }
  .install-btn svg { width: 20px; height: 20px; }
}

/* ---------- 15b. Menú Dropdown (submenu) ---------- */
.has-dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.dropdown-arrow {
  display: inline-block;
  width: 16px;
  height: 16px;
  transition: transform var(--t-base);
  color: var(--gris-500);
}

.has-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

/* En desktop: submenu flotante */
@media (min-width: 768px) {
  .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: var(--blanco);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--t-base);
    z-index: calc(var(--z-header) + 10);
  }

  .has-dropdown:hover .submenu,
  .has-dropdown:focus-within .submenu,
  .has-dropdown.open .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .has-dropdown > .nav-link::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    margin-left: 6px;
    vertical-align: middle;
    opacity: 0.6;
  }

  .submenu .nav-link {
    padding: 10px 14px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
  }

  .submenu .nav-link:hover {
    background: var(--gris-100);
    padding-left: 18px;
  }
}

/* En móvil: submenu colapsable dentro del menú */
@media (max-width: 767px) {
  .submenu {
    list-style: none;
    padding-left: 16px;
    border-left: 2px solid var(--gris-200);
    margin-left: 12px;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--t-base);
  }

  .has-dropdown.open .submenu {
    max-height: 800px;
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .submenu .nav-link {
    padding: 10px 12px;
    font-size: 0.9rem;
    color: var(--gris-700);
  }

  .submenu .nav-link:hover {
    color: var(--azul);
  }

  /* Indicador visual de dropdown en móvil (flecha que rota al abrir) */
  .has-dropdown > .nav-link::after,
  .has-dropdown > .dropdown-parent::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--gris-500);
    margin-left: auto;
    transition: transform var(--t-base);
  }

  .has-dropdown.open > .nav-link::after,
  .has-dropdown.open > .dropdown-parent::after {
    transform: rotate(180deg);
  }

  /* Asegurar que el botón dropdown-parent tenga layout flex */
  .has-dropdown > .dropdown-parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
}

/* ---------- 16. Skip Link (Accesibilidad) ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--azul);
  color: var(--blanco);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  z-index: var(--z-modal);
  font-weight: 600;
  transition: top var(--t-base);
}

.skip-link:focus {
  top: 16px;
  color: var(--blanco);
}

/* ==========================================================================
   RESPONSIVE: TABLET (≥768px)
   ========================================================================== */
@media (min-width: 768px) {
  .container { padding: 0 24px; }
  .section { padding: 64px 0; }
  .section-title { font-size: 2.25rem; }

  .header-inner { padding: 14px 24px; }

  .menu-toggle { display: none; }

  .nav {
    position: static;
    width: auto;
    max-width: none;
    height: auto;
    padding: 0;
    box-shadow: none;
    background: transparent;
    overflow: visible;
  }

  .nav-list {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4px;
  }

  .nav-item {
    border-bottom: none;
  }

  .nav-link {
    padding: 10px 14px;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
  }

  .nav-link:hover {
    background: var(--gris-100);
    padding-left: 14px;
  }

  .nav-link svg { display: none; }

  /* Button que actúa como nav-link para dropdowns padres */
  button.nav-link {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-heading);
    color: var(--gris-900);
    display: inline-flex;
    align-items: center;
  }

  button.nav-link:hover {
    background: var(--gris-100);
    color: var(--azul);
  }

  .nav-section-label { display: none; }

  .nav-divider {
    width: 1px;
    height: 24px;
    background: var(--gris-200);
    margin: 0 4px;
  }

  .hero { height: 600px; }
  .hero-title { font-size: 3rem; }
  .hero-text { font-size: 1.125rem; }
  .hero-arrow { width: 52px; height: 52px; }
  .hero-arrow.prev { left: 24px; }
  .hero-arrow.next { right: 24px; }

  .quick-access-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  .quick-card { min-height: 160px; padding: 24px; }

  .news-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
  .news-card-image { height: 200px; }

  .events-list { gap: 16px; }
  .event-item { padding: 20px; }

  .about-grid {
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
  }
  .about-stats { grid-template-columns: repeat(4, 1fr); }

  .disciplines-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
  }

  .allies-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
  .ally-logo {
    height: 120px;
  }
  .ally-logo img {
    max-height: 90px;
  }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 40px;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ==========================================================================
   RESPONSIVE: DESKTOP (≥1024px)
   ========================================================================== */
@media (min-width: 1024px) {
  .section { padding: 80px 0; }
  .section-title { font-size: 2.5rem; }
  .hero { height: 640px; }
  .hero-title { font-size: 3.5rem; }
  .quick-access-grid { grid-template-columns: repeat(4, 1fr); }
  .quick-card { min-height: 180px; }
  .news-card-image { height: 220px; }
}

/* ==========================================================================
   REDUCED MOTION (Accesibilidad)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   PRINT
   ========================================================================== */
@media print {
  .header, .nav, .hero-arrow, .hero-indicators, .back-to-top,
  .menu-toggle, .search-overlay, .install-btn { display: none !important; }
  .hero { height: auto; min-height: 200px; }
  body { color: #000; background: #fff; }
}
