/* ==== Club Aqua Polo Antofagasta — colores azul/dorado del logo ==== */
:root {
  --azul-oscuro: #0d2c54;
  --azul: #1560a8;
  --azul-claro: #3fa9f5;
  --dorado: #f5a623;
  --dorado-claro: #ffc94d;
  --blanco: #ffffff;
  --gris: #f2f6fa;
  --texto: #22303f;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Arial, sans-serif; color: var(--texto); background: var(--blanco); line-height: 1.6; }
img { max-width: 100%; }
a { color: var(--azul); }
.contenedor { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.angosto { max-width: 620px; margin-left: auto; margin-right: auto; }
.centrado { text-align: center; }
.mini { font-size: .85rem; color: #5b6b7b; }

/* ---- Barra superior ---- */
.barra { position: sticky; top: 0; z-index: 50; background: var(--azul-oscuro); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.barra-int { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px 20px 10px; }
.marca { display: flex; align-items: center; gap: 10px; color: var(--blanco); text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.marca img { height: 46px; width: 46px; border-radius: 50%; }
.barra nav ul { list-style: none; display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.barra nav a { color: var(--blanco); text-decoration: none; padding: 8px 14px; border-radius: 6px; display: block; }
.barra nav a:hover, .barra nav a.activo { background: var(--azul); color: var(--dorado-claro); }
#menu-chk, .menu-btn { display: none; }

/* ---- Portada con video ---- */
.portada { position: relative; min-height: 88vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.portada video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.portada-velo { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,44,84,.55), rgba(13,44,84,.75)); }
.portada-texto { position: relative; text-align: center; color: var(--blanco); padding: 40px 20px; }
.portada-logo { height: 130px; width: 130px; border-radius: 50%; box-shadow: 0 4px 24px rgba(0,0,0,.4); margin-bottom: 18px; }
.portada-texto h1 { font-size: clamp(1.8rem, 5vw, 3.2rem); text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.portada-texto p { font-size: clamp(1rem, 2.5vw, 1.3rem); margin: 10px 0 26px; text-shadow: 0 1px 6px rgba(0,0,0,.5); }

/* ---- Botones ---- */
.botones { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.boton { display: inline-block; padding: 13px 28px; border-radius: 30px; text-decoration: none; font-weight: 700; border: none; cursor: pointer; font-size: 1rem; transition: transform .15s, box-shadow .15s; }
.boton:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.boton-principal { background: var(--dorado); color: var(--azul-oscuro); }
.boton-secundario { background: transparent; color: var(--blanco); border: 2px solid var(--blanco); }
.seccion .boton-secundario { color: var(--azul); border-color: var(--azul); }

/* ---- Secciones ---- */
.seccion { padding: 70px 0; }
.seccion-alta { min-height: 60vh; }
.seccion h2 { color: var(--azul-oscuro); font-size: 2rem; margin-bottom: 18px; }
.franja { background: linear-gradient(135deg, var(--azul-oscuro), var(--azul)); color: var(--blanco); }
.franja h2 { color: var(--dorado-claro); }
.tarjetas { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 24px 0; }
.tarjeta { background: var(--gris); border-radius: 12px; padding: 22px; border-top: 4px solid var(--dorado); color: var(--texto); }
.tarjeta h3 { color: var(--azul-oscuro); margin-bottom: 8px; }

#horarios .tarjeta { text-align: center; display: flex; flex-direction: column; }
#horarios .tarjeta p:last-child { margin-top: auto; padding-top: 12px; }

#nosotros .tarjeta h3 { text-align: center; }
#horarios { background: linear-gradient(rgba(13,44,84,.82), rgba(13,44,84,.88)), url('fondo-horarios.jpg') center/cover no-repeat; }

/* ---- Formularios ---- */
.formulario { display: grid; gap: 16px; margin-top: 20px; }
.formulario label { font-weight: 600; color: var(--azul-oscuro); display: grid; gap: 6px; }
.formulario input, .formulario select, .formulario textarea {
  padding: 11px 12px; border: 1.5px solid #c6d4e2; border-radius: 8px; font-size: 1rem; font-family: inherit; width: 100%;
}
.formulario input:focus, .formulario select:focus, .formulario textarea:focus { outline: 2px solid var(--azul-claro); border-color: var(--azul-claro); }

/* ---- Avisos ---- */
.aviso { border-radius: 10px; padding: 18px 22px; margin: 18px 0; }
.aviso ul { margin-left: 18px; }
.aviso-ok    { background: #e8f7ec; border-left: 5px solid #2e9e4f; }
.aviso-error { background: #fdecea; border-left: 5px solid #d64541; }
.aviso-info  { background: #eaf3fd; border-left: 5px solid var(--azul); }

/* ---- Tablas ---- */
.tabla-scroll { overflow-x: auto; margin-bottom: 34px; }
.tabla, .tabla-detalle { border-collapse: collapse; width: 100%; margin-top: 10px; }
.tabla th, .tabla td, .tabla-detalle td { border: 1px solid #d7e2ec; padding: 8px 10px; text-align: left; font-size: .92rem; }
.tabla th { background: var(--azul-oscuro); color: var(--blanco); }
.tabla tr:nth-child(even) { background: var(--gris); }
.estado-pagado td strong { color: #2e9e4f; }
.estado-rechazado td strong, .estado-anulado td strong { color: #d64541; }
.tabla-detalle td:first-child { font-weight: 700; color: var(--azul-oscuro); background: var(--gris); }

.boton-wsp { display: inline-block; background: #25d366; color: #fff; text-decoration: none; font-weight: 700; font-size: .85rem; padding: 6px 12px; border-radius: 16px; white-space: nowrap; }
.boton-wsp:hover { background: #1eb457; }

/* ---- Banner certificado médico ---- */
.banner-cert { background: var(--dorado); padding: 18px 0; }
.banner-cert-int { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; color: var(--azul-oscuro); font-size: 1.05rem; text-align: center; }
.boton-azul { display: inline-block; background: var(--azul-oscuro); color: #fff; font-weight: 700; text-decoration: none; padding: 11px 24px; border-radius: 26px; white-space: nowrap; }
.boton-azul:hover { background: var(--azul); }

/* ---- Botones de redes sociales ---- */
.redes { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.boton-red { display: inline-flex; align-items: center; gap: 10px; padding: 12px 26px; border-radius: 30px; font-weight: 700; text-decoration: none; color: #fff; font-size: 1rem; transition: transform .15s, box-shadow .15s; }
.boton-red:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.boton-red svg { width: 22px; height: 22px; flex-shrink: 0; }
.red-ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.red-fb { background: #1877f2; }

/* ---- Contacto ---- */
.contacto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin: 30px 0 10px; }
.contacto-card { background: var(--gris); border-radius: 14px; padding: 26px 20px; text-align: center; border-top: 4px solid var(--dorado); }
.contacto-card h3 { color: var(--azul-oscuro); margin: 12px 0 2px; font-size: 1.05rem; }
.contacto-card .fono { font-weight: 700; color: var(--azul); margin: 6px 0 14px; }
.avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--azul-oscuro); color: var(--dorado-claro); font-weight: 700; font-size: 1.4rem; display: flex; align-items: center; justify-content: center; margin: 0 auto; }
.contacto-botones { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.boton-llamar { display: inline-block; background: var(--azul); color: #fff; text-decoration: none; font-weight: 700; font-size: .85rem; padding: 6px 14px; border-radius: 16px; white-space: nowrap; }
.boton-llamar:hover { background: var(--azul-oscuro); }
.mapa { margin-top: 34px; }
.mapa h3 { color: var(--azul-oscuro); margin-bottom: 12px; }
.mapa iframe { width: 100%; height: 320px; border: 0; border-radius: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.15); }

/* ---- Galería ---- */
.galeria { max-width: 860px; margin: 10px auto 18px; }
.galeria img { width: 100%; height: 430px; object-fit: cover; border-radius: 14px; box-shadow: 0 4px 16px rgba(0,0,0,.2); transition: opacity .4s; }
@media (max-width: 760px) { .galeria img { height: 240px; } }

/* ---- Contacto con foto de fondo ---- */
.contacto-fondo { background: linear-gradient(rgba(13,44,84,.82), rgba(13,44,84,.88)), url('galeria/foto-final.jpg') center/cover no-repeat; }
.contacto-fondo h2, .contacto-fondo > .contenedor > p, .contacto-fondo .mapa h3 { color: #fff; }
.contacto-fondo .mapa .mini, .contacto-fondo > .contenedor > p.mini { color: #fff; }
.franja .boton-secundario { color: #fff; border-color: #fff; }

/* ---- Zona de juego ---- */
.juego-marco { max-width: 1000px; margin: 20px auto; }
.juego-marco iframe { width: 100%; height: 78vh; min-height: 480px; border: 0; border-radius: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.35); background: #062C40; }

/* ---- Panel Power BI ---- */
.panel-bi { max-width: 1000px; margin: 24px auto; }
.panel-bi iframe { width: 100%; height: 72vh; min-height: 420px; border: 0; border-radius: 14px; box-shadow: 0 4px 16px rgba(0,0,0,.2); background: #fff; }

/* ---- Pie ---- */
.pie { background: var(--azul-oscuro); color: var(--blanco); text-align: center; padding: 30px 0; margin-top: 0; }
.pie a { color: #fff; text-decoration: none; }
.pie a:hover { text-decoration: underline; }
.pie-redes { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; margin: 10px 0 6px; }
.pie-redes svg { width: 17px; height: 17px; vertical-align: -3px; margin-right: 6px; }

/* ---- Acordeón móvil (Nosotros, Horarios, Contacto) ---- */
@media (max-width: 760px) {
  .acordeon .tarjeta, .acordeon .contacto-card { padding-top: 4px; padding-bottom: 4px; }
  .acordeon .tarjeta h3, .acordeon .contacto-card h3 { cursor: pointer; position: relative; padding: 12px 26px 12px 0; margin: 0; user-select: none; }
  .acordeon .tarjeta h3::after, .acordeon .contacto-card h3::after { content: '▾'; position: absolute; right: 2px; top: 50%; transform: translateY(-50%); transition: transform .3s; color: var(--dorado); font-size: 1.1rem; }
  .acordeon .abierta h3::after { transform: translateY(-50%) rotate(180deg); }
  .acordeon .tarjeta > *:not(h3), .acordeon .contacto-card > *:not(h3) { max-height: 0; opacity: 0; margin: 0; overflow: hidden; transition: max-height .45s ease, opacity .3s ease, margin .3s ease; }
  .acordeon .abierta > *:not(h3) { max-height: 900px; opacity: 1; margin: 8px 0; }
}

/* ---- Móvil ---- */
@media (max-width: 760px) {
  .portada video { object-position: 80% 25%; }
  .barra-int { flex-direction: row; justify-content: space-between; gap: 10px; padding: 8px 16px; }
  .menu-btn { display: block; color: var(--blanco); font-size: 1.8rem; padding: 4px 10px; cursor: pointer; }
  .barra nav ul { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--azul-oscuro); flex-direction: column; width: 100%; padding: 8px 0; text-align: center; box-shadow: 0 10px 16px rgba(0,0,0,.35); }
  #menu-chk:checked ~ ul { display: flex; }
  .marca span { font-size: .9rem; }
}
