/* VARIABLES DE DISEÑO (Basadas en el uniforme y logo oficial) */
:root {
  --color-dark-bg: #141414;
  /* Negro de fondo base */
  --color-panel: #1f2022;
  /* Gris grafito oscuro del uniforme */
  --color-text-light: #ffffff;
  /* Texto blanco */
  --color-text-muted: #b3b3b3;
  /* Texto secundario gris */
  --color-accent-green: #00b050;
  /* Verde brillante del logo (Swim) */
  --color-accent-neon: #ccff00;
  /* Amarillo flúor reactivo (Bike) */
  --font-base: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* RESET GENERAL */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-base);
  background-color: #fafafa;
  color: #333333;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* MODAL */
.padded {
  padding: 80px 0;
}

.text-center {
  text-align: center;
}

.section-dark {
  background-color: var(--color-dark-bg);
  color: var(--color-text-light);
}

.section-subtitle {
  color: var(--color-text-muted);
  margin-bottom: 40px;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* NAVBAR RESPONSIVE */
.main-header {
  background-color: rgba(20, 20, 20, 0.95);
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  border-bottom: 2px solid var(--color-panel);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}

.logo img {
  height: 60px;
  width: auto;
  padding: 5px;
}

#menu-check {
  display: none;
}

.icons-toggle {
  display: none;
  cursor: pointer;
}

.main-nav a {
  color: var(--color-text-light);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.3s;
  margin: 0 15px;
}

.main-nav a:hover {
  color: var(--color-accent-neon);
}

/* Botón llamativo para Eventos Organizados */
.main-nav .btn-nav {
  background-color: var(--color-accent-green);
  padding: 8px 16px;
  border-radius: 4px;
  color: white;
  transition: background-color 0.3s;
}

.main-nav .btn-nav:hover {
  background-color: #00843c;
  color: white;
}

/* HERO SECTION CON VIDEO */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: white;
  text-align: center;
  margin-top: 85px;
  /* Ajuste para compensar el header fijo */
}

.hero-video {
  position: absolute;
  top: 65%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: -2;
  object-position: center 35% !important;
  /* Ajuste para centrar mejor el video */
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(0deg, rgba(20, 20, 20, 0.85) 0%, rgba(20, 20, 20, 0.4) 100%);
  z-index: -1;
}

.hero-content h1 {
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  margin-bottom: 10px;
}

.hero-content p {
  font-size: 1.5rem;
  margin-bottom: 30px;
  color: #e0e0e0;
}

.btn-accent {
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--color-accent-neon);
  color: #000;
  font-weight: bold;
  text-decoration: none;
  text-transform: uppercase;
  border-radius: 4px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(204, 255, 0, 0.4);
}

/* HISTORIA, MISION, VISION */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.about-card {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding-bottom: 25px;
  text-align: center;
}

.about-img {
  height: 180px;
  background-size: cover;
  background-position: center;
  margin-bottom: 20px;
}

.about-card h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--color-panel);
}

.about-card p {
  padding: 0 20px;
  color: #666;
  line-height: 1.6;
}

/* BLOQUE DE ANUNCIO INDIVIDUAL (ACT) */
.anuncio-banner {
  position: relative;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 100px 0;
  color: white;
  height: 330px;
}

.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(20, 20, 20, 0.7);
  z-index: 1;
}

.tag-publicidad {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--color-accent-neon);
  letter-spacing: 2px;
}

h2.tag-publicidad {
  color: #ccff00 !important;
  /* Verde neón potente */
  /* Sombra oscura proyectada en 4 direcciones para delinear la letra */
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000,
    0 3px 8px rgba(0, 0, 0, 0.8) !important;
}

.banner-content p {
  color: #ffffff !important;
  /* Blanco para que lea perfecto sobre el borde negro */
  font-weight: 600;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000 !important;
}

/* SECCIÓN HERO DE MIEMBROS EN EL HOME */
.members-hero-section {
  padding: 60px 20px;
  background-color: #f8f9fa;
}


.members-banner {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #111827;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  min-height: 400px;
}

.banner-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 65%;
}

/* Oscurece suavemente la foto para que el texto resalte */
.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top left,
      rgba(17, 24, 39, 0.85) 0%,
      rgba(17, 24, 39, 0.4) 40%,
      transparent 70%);
}

.banner-content {
  position: relative;
  z-index: 2;
  padding: 30px;
  max-width: 550px;
}

.banner-content h2 {
  font-size: 2rem;
  font-weight: 800;
  margin: 15px 0 10px 0;
  color: #ffffff;
}

.banner-content p {
  color: #d1d5db;
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 25px;
}

/* BOTÓN DE REDIRECCIÓN */
.btn-primary-team {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--color-accent-green);
  color: #111827;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.btn-primary-team:hover {
  background-color: var(--color-accent-green);
  transform: translateY(-2px);
}

.btn-arrow {
  font-size: 1.1rem;
}

/* --- BOTÓN DE LEER MÁS --- */
.btn-history {
  background-color: transparent;
  color: #00a859;
  /* Verde representativo */
  border: 1.5px solid #00a859;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.3s ease;
}

.btn-history:hover {
  background-color: #00a859;
  color: #fff;
}

/* --- ESTRUCTURA DEL MODAL --- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: #ffffff;
  border-radius: 12px;
  width: 100%;
  max-width: 650px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  color: #666;
  cursor: pointer;
  line-height: 1;
}

.modal-header {
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 12px;
  margin-bottom: 18px;
}

.modal-header h2 {
  margin: 0;
  color: #111;
}

.modal-body p {
  color: #444;
  line-height: 1.6;
  margin-bottom: 14px;
  font-size: 0.95rem;
}

/* --- DISEÑO RESPONSIVE (TABLETS Y SMARTPHONES) --- */
@media (max-width: 990px) {
  .about-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1 columna */
    max-width: 650px; /* Evita que se deformen a lo ancho */
    margin: 0 auto; /* Centra el contenedor */
    gap: 20px;

  }
}

@media (max-width: 640px) {
  .about-grid {
    grid-template-columns: 1fr;
    /* 1 columna en Celulares */
  }

  .modal-content {
    padding: 20px;
    max-height: 90vh;
  }

  .modal-header h2 {
    font-size: 1.4rem;
  }
}

/* RESPONSIVE PARA CELULARES */
@media (max-width: 768px) {
  .banner-overlay {
    background: linear-gradient(to top,
        rgba(0, 0, 0, 0.7) 0%,
        /* Sombra tenue abajo para que resalte el texto */
        rgba(0, 0, 0, 0.2) 60%,
        /* Muy transparente al centro */
        rgba(0, 0, 0, 0) 100%
        /* Totalmente transparente arriba para ver la playa/cielo */
      );
  }

  .members-banner {
    flex-direction: column;
    justify-content: flex-end;
    min-height: 420px;
  }

  .banner-content {
    padding: 25px;
  }

  .banner-content h2 {
    font-size: 1.8rem;
  }
}

/* SECCIÓN Y ENCABEZADOS */
.section-title {
  text-align: center;
  font-size: 2.2rem;
  color: #1a1d20;
  margin-bottom: 5px;
  font-weight: 800;
}

.section-subtitle {
  text-align: center;
  color: #6c757d;
  font-size: 1rem;
  margin-bottom: 40px;
}

/* SECCIÓN LOGROS */
.logros-container {
  max-width: 800px;
  margin: 0 auto;
}

.logro-item {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 20px 0;
  border-bottom: 1px solid #e0e0e0;
}

.logro-year {
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-accent-green);
  min-width: 80px;
}

/* BLOQUE DE ANUNCIO DOBLE (Academia / Movement) */
.anuncio-doble {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
}

.sponsor-half {
  flex: 1;
  min-width: 320px;
  position: relative;
  min-height: 435px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: flex-start;
  color: #0f172a;
}

.sponsor-half:first-child .half-content h3,
.sponsor-half:first-child .half-content p {
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  /* Sombra suave para separar */
}

.half-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 25px;
}

/* PRÓXIMOS EVENTOS */
.events-grid {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.event-card {
  display: flex;
  background-color: rgba(255, 255, 255, 0.03);
  ;
  border-left: 4px solid var(--color-accent-neon);
  border-radius: 0 6px 6px 0;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-card:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.event-date {
  background-color: rgba(255, 255, 255, 0.05);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--color-accent-neon);
  min-width: 100px;
}

.event-details {
  padding: 20px;
}

/* FOOTER Y CONTACTO */
.main-footer {
  background-color: #0d0d0d;
  color: white;
  padding: 60px 0 20px;
  border-top: 4px solid var(--color-accent-green);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-socials a {
  display: inline-block;
  color: var(--color-text-muted);
  margin-right: 15px;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-socials a:hover {
  color: var(--color-accent-green);
}

.footer-bottom {
  border-top: 1px solid var(--color-panel);
  padding-top: 20px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.powered-by span {
  color: var(--color-accent-neon);
  font-weight: bold;
}

/* RESPONSIVE DESIGN (MEDIA QUERIES) */
@media (max-width: 890px) {
  .nav-container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 0 !important;
    position: relative !important;
  }

  /* 2. DESAPARECER EL CUADRO BLANCO DE LA FOTO (Fuerza bruta) */
  #menu-check {
    display: none;
  }

  /* 3. Estilo del contenedor de los iconos */
  .icons-toggle {
    display: inline-flex;
    cursor: pointer;
    z-index: 1001;
  }

  /* Forzamos el tamaño y color blanco para que los iconos se vean fuertes */
  .icons-toggle i {
    font-size: 2.3rem !important;
    color: #ffffff !important;
    display: block !important;
  }

  /* Estado inicial: la X oculta, la hamburguesa visible */
  .icons-toggle #close-icon {
    display: none !important;
  }

  .icons-toggle #menu-icon {
    display: block !important;
  }

  /* Cuando activas el check: ocultamos hamburguesa y se enciende la X en amarillo neón */
  #menu-check:checked~.icons-toggle #menu-icon {
    display: none !important;
  }

  #menu-check:checked~.icons-toggle #close-icon {
    display: block !important;
    color: var(--color-accent-neon) !important;
  }

  #menu-check:checked~.icons-toggle {
    position: fixed !important;
    top: 85px !important;
    /* Alineado exactamente donde empieza tu cortina */
    left: 0 !important;
    width: 100vw !important;
    height: calc(100vh - 85px) !important;
    z-index: 1 !important;
    /* Se pone justo detrás de las letras */
  }

  /* Forzamos a que tus iconos (la X o la hamburguesa) sigan fijos en su esquina y no se estiren */
  #menu-check:checked~.icons-toggle i {
    position: absolute !important;
    top: -55px !important;
    /* Lo regresamos a la altura de tu header negro */
    right: 20px !important;
    z-index: 1002 !important;
  }

  /* 4. EL NAVBAR CORTINA (Apaga los estilos de lista viejos y se esconde arriba) */
  .main-nav {
    position: fixed !important;
    top: 85px !important;
    /* Cae justo debajo del header */
    left: 0 !important;
    right: 0 !important;
    height: 0 !important;
    /* Escondido por completo */
    overflow: hidden !important;
    background-color: rgba(20, 20, 20, 0.98) !important;
    backdrop-filter: blur(15px) !important;
    border-bottom: 3px solid var(--color-accent-neon) !important;
    transition: height 0.35s ease-in-out !important;
    z-index: 99 !important;

    /* Cambiamos el comportamiento a una sola columna centrada */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Cuando el check cambia, la cortina baja cubriendo la pantalla */
  #menu-check:checked~.main-nav {
    height: calc(100vh - 70px) !important;
  }

  /* Estilos para cada enlace dentro de la cortina */
  .main-nav a {
    display: block !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    margin: 1rem 0 !important;
    text-transform: uppercase !important;
    text-align: center !important;

    /* Animación de caída */
    transform: translateY(-40px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease !important;

    position: relative !important;
    z-index: 1005 !important;
  }

  /* Botón verde de eventos resaltado dentro del menú */
  .main-nav a.btn-nav {
    background-color: var(--color-accent-green) !important;
    padding: 12px 35px !important;
    border-radius: 4px !important;
    font-size: 1.1rem !important;
    margin-top: 1.5rem !important;

    position: relative !important;
    z-index: 2 !important;

  }

  /* Cuando se abre, los enlaces caen en cascada limpia usando tu variable --i */
  #menu-check:checked~.main-nav a {
    transform: translateY(0) !important;
    opacity: 1 !important;
    transition-delay: calc(0.08s * var(--i)) !important;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content p {
    font-size: 1.1rem;
  }

  .banner-content {
    text-align: center;
    padding: 0 20px;
  }

  .logro-item {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

}

@media (max-width: 868px) {

  /* 1. Cambiamos el banner a flujo vertical */
  .members-banner {
    flex-direction: column;
    min-height: auto;
    background: #111827;
  }

  /* 2. La foto pasa a ocupar la parte superior limpia */
  .banner-image-wrapper {
    position: relative;
    /* Ya no es absolute */
    width: 100%;
    height: 240px;
    /* Altura ideal para que la foto grupal luzca entera */
  }

  .banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 70%;
    /* Enfoca las caras del equipo */
  }

  /* 4. El contenido de texto se ubica abajo con espacio */
  .banner-content {
    padding: 24px 20px;
    text-align: center;
    max-width: 100%;
  }

  .banner-content h2 {
    font-size: 1.6rem;
    margin: 12px 0 8px 0;
  }

  .banner-content p {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }

  /* Botón adaptado al ancho en móvil */
  .btn-primary-team {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
  }
}