/* =============================================================
   Hoja de estilos principal de Jaguazul
   Estructura y convenciones:
   - Reset y base tipográfica
   - Header y navegación (desktop y móvil)
   - Banner/Hero
   - Secciones (about-us, news, contact, footer)
   - Slider (contenedor, slides, controles, dots)
   - Componentes reutilizables (.btn, .image-gallery, .icon-gallery, .feature-image)
   - Utilitarios y responsive
   Nota: Mantener este orden y añadir comentarios claros al crear nuevas secciones.
   ============================================================= */

/* ===== Reset básico y base de documento ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body, html {
  margin: 0;
  padding: 0;
  overflow-x: hidden;   /* Evita scroll horizontal accidental */
  width: 100%;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Fuente base legible */
  background: #f9f9f9;  /* Fondo gris claro para contraste suave */
  color: #333;          /* Texto principal */
  line-height: 1.5;     /* Altura de línea base */
}

/* ======= HEADER ======= */
/* Contenedor principal del encabezado (sticky) */
.site-header {
  background-color: #004884; /* Azul corporativo */
  padding: 15px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; /* Mantiene visible al hacer scroll */
  top: 0;
  z-index: 9999;    /* Por encima de otros elementos */
}

/* Logo dentro del header */
.site-header .logo img {
  max-height: 50px; /* Altura controlada del logo */
}

/* Pastilla blanca detrás del logo (estética) */
.logo{
  background-color: white;
  border-radius: 45px;
}

/* Botón hamburguesa móvil (controla apertura del menú en móvil) */
.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  /* En desktop se oculta, ver bloque de visibilidad más abajo */
}

/* Oculta el botón en escritorio */
.menu-toggle {
  display: none;
}

/* Muestra el botón solo en pantallas pequeñas */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Icono del botón: rotación al activar */
.menu-toggle svg {
  transition: transform 0.3s ease;
}

.menu-toggle.active svg {
  transform: rotate(90deg);
}

/* Barras del botón hamburguesa */
.menu-toggle span {
  height: 3px;
  background: white;
  border-radius: 2px;
  display: block;
  transition: 0.3s;
}

/* Animación al activar (forma de X) */
.menu-toggle.active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Navegación principal */
.main-nav { flex-grow: 1; margin-left: 30px; }

/* Lista horizontal en desktop */
.main-nav ul.menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 25px;
}

.main-nav ul.menu > li { position: relative; }

/* Links de primer nivel */
.main-nav ul.menu > li > a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 12px 15px;
  display: block;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.main-nav ul.menu > li > a:hover,
.main-nav ul.menu > li > a:focus { background-color: #09af03; outline: none; }

/* Submenú desplegable */
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #fff;
  min-width: 220px;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
}

/* Muestra submenú al hover/focus en desktop */
.has-submenu:hover > .submenu,
.has-submenu:focus-within > .submenu { display: block; opacity: 1; transform: translateY(0); }

/* Items del submenú */
.submenu li a {
  display: block;
  padding: 12px 18px;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: background-color 0.2s ease;
}

.submenu li a:hover,
.submenu li a:focus { background-color: #f0f0f0; outline: none; }

/* Indicador ▼ de submenú en items con hijos */
.has-submenu > a::after {
  content: "▼";
  font-size: 10px;
  margin-left: 6px;
  vertical-align: middle;
  color: #ccc;
  transition: transform 0.3s ease;
}

.has-submenu:hover > a::after,
.has-submenu:focus-within > a::after { color: #fff; transform: rotate(180deg); }



/* ======= BANNER PRINCIPAL ======= */
/* Sección hero con imagen de fondo y overlay azul corporativo */
.hero-banner{
    position:relative;
    height:420px;

    display:flex;
    justify-content:center;
    align-items:center;
    text-align:center;

    overflow:hidden;

    background:
        linear-gradient(
            rgba(0,72,132,.70),
            rgba(0,72,132,.55)
        ),
        url("img/hero-water.jpg") center center/cover no-repeat;
}

.hero-content{

    position:relative;
    z-index:2;

    max-width:800px;

    padding:20px;

    color:white;

}

.hero-content h1{

    font-size:3.4rem;
    font-weight:700;

    margin-bottom:20px;

    text-shadow:0 3px 12px rgba(0,0,0,.35);

}

.hero-content p{

    font-size:1.4rem;

    margin-bottom:35px;

    color:#f2f2f2;

    text-shadow:0 2px 8px rgba(0,0,0,.30);

}

.hero-content .btn{

    padding:14px 35px;

    font-size:1rem;

}





/* Botón primario del hero */
.btn-primary { background-color: #0073e6; color: white; padding: 12px 28px; text-decoration: none; font-weight: 600; border-radius: 6px; transition: background 0.3s ease; display: inline-block; }
.btn-primary:hover { background-color: #005bb5; }

/* ======= SECCIÓN QUIÉNES SOMOS ======= */
/* Tarjeta blanca con sombra suave para contenido principal */
.about-us {
  background-color: #fff;
  padding: 60px 30px;
  max-width: 1100px;
  margin: 0 auto 60px;
  text-align: center;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgb(0 0 0 / 0.05);
}

.about-us h2 { font-size: 2.2rem; margin-bottom: 20px; color: #004884; }
.about-us p  { font-size: 1.1rem; margin-bottom: 25px; color: #555; }

/* Botón secundario gris neutro */
.btn-secondary { background-color: #e0e0e0; color: #333; padding: 10px 24px; border-radius: 6px; text-decoration: none; font-weight: 600; transition: background 0.3s ease; }
.btn-secondary:hover { background-color: #c2c2c2; }

/* ======= SECCIÓN NOTICIAS ======= */
/* Contenedor de sección noticias */
.news { padding: 0 30px 60px; max-width: 1100px; margin: 0 auto; }
.news h2 { font-size: 2rem; margin-bottom: 30px; color: #004884; text-align: center; }

/* Grid de tarjetas de noticias */
.news-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }

/* Tarjeta de noticia */
.news-item {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgb(0 0 0 / 0.05);
  transition: box-shadow 0.3s ease;
}

/* Imágenes de cabecera de tarjeta, con altura uniforme */
.news-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
  margin-bottom: 15px;
  display: block;
}

/* Variante con imagen más grande */
.news-item img.img-large { height: 340px; }
@media (max-width: 768px) { .news-item img.img-large { height: 220px; } }

/* Elevación al hover */
.news-item:hover { box-shadow: 0 8px 25px rgb(0 0 0 / 0.1); }

/* Título y párrafos dentro de la tarjeta */
.news-item h3 { color: #004884; margin-bottom: 12px; font-size: 1.25rem; }
.news-item p  { font-size: 1rem; margin-bottom: 15px; color: #555; text-align: justify; }

/* Links de la tarjeta */
.news-item a {  text-decoration: none; font-weight: 600; }


/* Listas dentro de tarjeta: sangría cómoda */
.news-item ul { padding-left: 30px; }
@media (max-width: 768px) { .news-item ul { padding-left: 22px; } }

/* ======= SECCIÓN CONTACTO ======= */
/* Tarjeta de contacto con inputs y botón */
.contact { background: #fff; padding: 60px 30px; max-width: 600px; margin: 0 auto 80px; border-radius: 8px; box-shadow: 0 4px 12px rgb(0 0 0 / 0.05); }
.contact h2 { font-size: 2rem; margin-bottom: 25px; color: #004884; text-align: center; }
.contact p  { font-size: 1.1rem; margin-bottom: 25px; text-align: center; color: #555; }

/* Formulario vertical con espacios cómodos */
.contact form { display: flex; flex-direction: column; gap: 15px; }
.contact label { font-weight: 600; color: #333; }

/* Campos de formulario */
.contact input[type="text"],
.contact input[type="email"],
.contact textarea { padding: 10px 15px; font-size: 1rem; border: 1px solid #ccc; border-radius: 6px; resize: vertical; font-family: inherit; transition: border-color 0.3s ease; }

/* Enfoque de campos */
.contact input[type="text"]:focus,
.contact input[type="email"]:focus,
.contact textarea:focus { border-color: #004884; outline: none; }

/* Botón del formulario de contacto */
.contact button { background-color: #004884; color: white; padding: 14px; font-weight: 700; border: none; border-radius: 6px; cursor: pointer; transition: background-color 0.3s ease; font-size: 1rem; }
.contact button:hover { background-color: #003366; }

/* ======= PIE DE PÁGINA ======= */
footer.site-footer {
  background-color: #004884;
  color: white;
  padding: 25px 30px;
  text-align: center;
  font-size: 0.9rem;
  user-select: none;
}

/* ======= Responsive ======= */
/* Reglas móviles generales (<= 768px) para navegación y hero */
@media (max-width: 768px) {
  .menu-toggle { display: flex; align-items: center; justify-content: center; }

  /* Menú móvil como panel lateral */
  .main-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 260px;
    height: 100vh;
    background-color: #004884;
    padding-top: 70px;
    flex-grow: 0;
    transition: left 0.3s ease;
    overflow-y: auto;
    z-index: 99999;
  }
  .main-nav.active { left: 0; }
  .main-nav ul.menu { flex-direction: column; gap: 0; }
  .main-nav ul.menu > li { width: 100%; }
  .main-nav ul.menu > li > a { padding: 15px 25px; border-bottom: 1px solid rgba(255,255,255,0.15); }

  /* Submenús en móvil: se muestran al activar la clase en el padre */
  .submenu { position: static; display: none !important; opacity: 1 !important; transform: none !important; background-color: #0357b4; border-radius: 0; box-shadow: none; }
  .submenu li a { padding-left: 40px; color: #eee; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .submenu li a:hover,
  .submenu li a:focus { background-color: #0270e2; color: #fff; }
  .has-submenu.active > .submenu { display: block !important; }
  .has-submenu > a::after { float: right; transform: rotate(0); }
  .has-submenu.active > a::after { transform: rotate(90deg); }

  /* Hero más compacto en móvil */
  .hero-banner { height: 300px; }
  .hero-content h1 { font-size: 2rem; }
  .hero-content p  { font-size: 1rem; }
}

/* === CONTENEDOR DEL SLIDER === */
/* Sección a pantalla completa con desbordes ocultos para slides */
.slider-container {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw; /* Hace que el slider ocupe todo el ancho */
  margin-right: -50vw;
  overflow: hidden;
}

/* === SLIDER MODERNO Y LIMPIO === */
.slider { width: 100%; overflow: hidden; position: relative; background-color: #ffffff; padding: 0; margin: 0; }

/* Contenedor de slides apilados verticalmente (se posicionan absolute) */
.slides { position: relative; display: flex; flex-direction: column; }

/* Cada slide ocupa el viewport, está oculto por defecto */
.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  z-index: 1;
}

/* Slide activo visible por encima */
.slide.active { opacity: 1; visibility: visible; position: relative; z-index: 2; }

/* Imágenes del slider: ancho completo de la ventana */
.slide img {
  width: 100vw !important;   /* Ancho total del viewport */
  max-width: none !important;
  height: auto;
  max-height: 80vh;          /* Evita ocupar altura excesiva */
  margin: auto;
  object-fit: cover;         /* Recorte elegante */
  display: block;
}

/* Leyenda del slider (abajo a la izquierda) */
.caption {
  position: absolute;
  bottom: 30px;
  left: 30px;                 /* Alineación izquierda */
  transform: none;            /* Sin centrado horizontal */
  font-size: 1.5rem;
  color: #004884;
  background-color: rgba(255, 255, 255, 0.85);
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  text-align: left;           /* Asegura alineación del texto */
  max-width: 60%;             /* Evita excesiva anchura */
}

/* Flechas de navegación del slider */
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0, 0, 0, 0.05); color: #004884; font-size: 2rem; border: none; padding: 8px 14px; cursor: pointer; border-radius: 50%; transition: background 0.3s ease; z-index: 10; }
.slider-btn:hover { background: rgba(0, 0, 0, 0.15); }
.slider-btn.prev { left: 20px; }
.slider-btn.next { right: 20px; }

/* Puntos indicadores del slider */
.slider-dots { text-align: center; padding: 20px 0; background-color: #fff; }
.dot { height: 12px; width: 12px; margin: 0 6px; background-color: #ccc; border-radius: 50%; display: inline-block; cursor: pointer; transition: background-color 0.3s ease; border: none; }
.dot.active,
.dot:hover { background-color: #004884; }

/* Responsive específico del slider */
@media (max-width: 768px) {
  .caption { font-size: 1.1rem; padding: 8px 16px; bottom: 20px; }
  .slider-btn { font-size: 1.5rem; padding: 6px 10px; }
  .slide img { max-height: 60vh; }
}

/* ======= Componentes reutilizables ======= */
/* Botón genérico reutilizable (color ajustable por diseño) */
.btn {
  display: inline-block;
  padding: 10px 16px;
  background: #09af03; /* Color actual del botón (verde) */
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease;
}
.btn:hover { background: #003a6b; text-decoration: none; }

/* Botón de WhatsApp (CTA) */
.whatsapp-wrapper { text-align: center; margin-top: 25px; }
.whatsapp-btn {
  background-color: #25d366;
  color: #fff;
}
.whatsapp-btn:hover {
  background-color: #1ebd5a;
}

/* Galería de imágenes en grid responsive */
.image-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; align-items: stretch; }
.image-gallery img { width: 100%; height: 200px; object-fit: cover; border-radius: 12px; box-shadow: 0 8px 20px rgba(0,0,0,0.12); transition: transform 0.2s ease, box-shadow 0.2s ease; display: block; }
.image-gallery img:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,0.18); }

/* Variante más grande para métodos de pago */
.image-gallery.payment-methods { 
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
  gap: 16px; 
  margin-top: 20px;
}
.image-gallery.payment-methods img { 
  height: 180px; 
  border-radius: 12px; 
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.image-gallery.payment-methods img:hover { 
  transform: scale(0.95);
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}

/* Textos descriptivos para métodos de pago */
.payment-caption {
  text-align: center;
  margin-top: 12px;
  font-weight: 600;
  color: #004884;
  font-size: 1.1rem;
}

/* Imagen destacada grande reutilizable */
.news-item img.feature-image,
.feature-image { width: 100%; height: 360px; object-fit: cover; object-position: center; border-radius: 12px; box-shadow: 0 10px 24px rgba(0,0,0,0.12); display: block; }
@media (max-width: 768px) {
  .news-item img.feature-image,
  .feature-image { height: 240px; }
}

/* Galería de íconos (cards con SVG inline) */
.icon-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.icon-card { background: #fff; border-radius: 12px; box-shadow: 0 8px 20px rgba(0,0,0,0.08); padding: 16px; display: flex; flex-direction: column; align-items: center; text-align: center; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.icon-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,0.12); }
.icon-card svg { width: 100%; max-width: 200px; height: 160px; margin-bottom: 10px; }
.icon-card p { margin: 0; color: #444; font-weight: 600; }

/* ======= Utilitarios ======= */
.intro-center { text-align: center; }

/* ======= SECCIÓN PAGE HEADER (apertura de cada página) ======= */
.page-header { padding: 60px 30px; text-align: center; background: #004884; color: white; }
.page-header h1 { font-size: 2.5rem; margin-bottom: 10px; }
.page-header p  { font-size: 1.2rem; }

/* Variante con imagen de fondo para el club */
.page-header.club-header {
  background: linear-gradient(rgba(0, 72, 132, 0.85), rgba(0, 72, 132, 0.85)), 
              url('img/piscina3.JPG') center/cover no-repeat;
}

/*==================================================
    CARTELERA ELECTRÓNICA
==================================================*/

.official-board{

    max-width:1100px;
    margin:60px auto;
    padding:0 20px;

}

.board-header{

    text-align:center;
    margin-bottom:35px;

}

.board-header h2{

    color:#004884;
    font-size:2.2rem;
    margin-bottom:10px;

}

.board-header p{

    color:#666;
    font-size:1.05rem;

}

.board-card{

    background:#fff;
    border-radius:12px;
    box-shadow:0 8px 20px rgba(0,0,0,.08);

    display:flex;
    align-items:center;

    gap:30px;

    padding:30px;

    border-left:6px solid #09af03;

}

.board-preview{

    width:180px;
    min-width:180px;

}

.board-preview img{

    width:100%;
    display:block;
    border-radius:8px;

    box-shadow:0 5px 15px rgba(0,0,0,.15);

    transition:.3s;

}

.board-preview img:hover{

    transform:scale(1.03);

}

.board-content{

    flex:1;

}

.board-tag{

    display:inline-block;

    background:#004884;

    color:white;

    padding:6px 15px;

    border-radius:30px;

    font-size:.85rem;

    font-weight:bold;

    margin-bottom:15px;

}

.board-content h3{

    color:#004884;

    margin-bottom:15px;

    font-size:1.6rem;

}

.board-content p{

    color:#555;

    line-height:1.7;

    margin-bottom:20px;

    text-align:justify;

}

.board-date{

    color:#777;

    font-weight:600;

}

.board-buttons{

    display:flex;

    flex-direction:column;

    gap:15px;

}

.board-buttons .btn{

    width:180px;

    text-align:center;

}

.btn-download{

    background:#004884;

}

.btn-download:hover{

    background:#003366;

}

/*=========================
        Responsive
==========================*/

@media(max-width:900px){

.board-card{

    flex-direction:column;

    text-align:center;

}

.board-content p{

    text-align:center;

}

.board-buttons{

    width:100%;

}

.board-buttons .btn{

    width:100%;

}

.board-preview{

    width:220px;

}

}