:root {
    --bg: #ffffff;
    --bg-soft: #f5f8ff;
    --card: #ffffff;
    --accent: #495fc7;
    --text: #1a2b4c;
    --text-soft: #5c6f91;
    --border: rgba(0,0,0,0.08);
}

/* RESET BÁSICO */
body {
    margin: 0;
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
    background: var(--bg);
    color: #adb9ce;
    scroll-behavior: smooth;
}

img {
    max-width: 100%;
    display: block;
}

header {
    position: fixed; 
    width: 100%; 
    padding: 20px 40px;
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    background: rgba(255,255,255,0.9); 
    backdrop-filter: blur(10px);
    z-index: 1000; 
    box-sizing: border-box;
    border-bottom: 1px solid var(--border);
}

header a { 
    color: var(--text); 
    margin-left: 20px; 
    text-decoration: none; 
    font-size: 13px; 
    font-weight: 500;
}

header strong { color: var(--text); }

@media (min-width: 1024px) {
  .h1 { font-size: 4rem; }
  .subtitulo { font-size: 1.5rem; }
}

@media (max-width: 600px) {
    header { flex-direction: column; padding: 15px; }
    nav { margin-top: 10px; }
    header a { margin: 0 5px; font-size: 14px; }
}

@media (max-width: 480px) {
    .filters {
        justify-content: flex-start;
        overflow-x: auto; /* Permite deslizar los botones si son muchos */
        white-space: nowrap;
        padding-bottom: 10px;
    }
    .filter-btn {
        flex: 0 0 auto; /* No permite que los botones se encojan */
    }
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
    .item img, .item video {
        height: 300px;
    }
}


/* SECCIONES */
.section {
    padding: 60px 25px;
    max-width: 900px;
    margin: auto;
    /* Mantenemos la visibilidad inicial para evitar que el texto no se vea */
    opacity: 1; 
    transform: translateY(0);
}

/* Si usas JS para animar, usa estas clases */
.section.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: all 1s ease;
}

.section.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

p { line-height: 1.7; color: var(--text-soft); }
strong { color: var(--accent); }
h2 { font-size: 34px; color: var(--text); }

/* CARDS */
.card {
    background: var(--card);
    padding: 30px;
    border-radius: 14px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
}

.card h3 {
    color: var(--accent);
    margin-top: 0;
}

/* PRICING */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.price-card {
    background: var(--card);
    padding: 40px 30px;
    border-radius: 15px;
    border: 1px solid var(--border);
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.price-card:hover {
    border-color: var(--accent);
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(47,111,255,0.1);
}

.price-card .cost {
    font-size: 32px;
    color: var(--accent);
    font-weight: bold;
}

/* HERO */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero video,
.hero img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
   /* background: rgba(0,0,0,0.3); /* Capa oscura suave para leer texto sobre imagen */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    color: white; /* El texto en el hero suele ser blanco sobre imagen */
}

.hero h1 {
    font-size: clamp(40px, 8vw, 75px);
    margin: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.hero-sub {
    font-size: clamp(10px, 4vw, 20px);
    padding-top:320px; 
    color:rgb(255, 215, 0);
}

/* WHATSAPP */
.wa-pro {
    position: fixed;
    bottom: 25px;
    left: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 50px;
    background: white;
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 9999;
    transition: 0.3s;
}

.wa-pro:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}
.audio-control {
    position: fixed;
    bottom: 85px; /* Un poco más arriba del botón de admin */
    right: 25px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--border);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: 0.3s;
}

.audio-control:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.audio-control.muted {
    opacity: 0.7;
}

/* ADMIN BOTÓN */
.admin-pro {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    border: 1px solid var(--border);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    z-index: 9999;
    transition: 0.3s;
}

/* GALERÍA */
.gallery-grid {
    display: grid;
    /* Esto crea columnas de mínimo 150px y máximo 1 fracción del espacio */
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); 
    gap: 15px;
    padding: 15px;
}


.item {
    position: relative;
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: #f0f0f0;
    transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.item img,
.item video {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.item:hover img {
    transform: scale(1.08);
}

/* --- CORRECCIÓN LIGHTBOX REAL --- */
#lb {
    display: none; /* Se activa con el JS */
    position: fixed; /* Esto hace que flote sobre la web */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95); /* Fondo oscuro transparente */
    z-index: 99999; /* Por encima de TODO */
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* El contenedor de la imagen/video */
#lb-content {
    width: 90%;
    height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#lb-content img, #lb-content video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Evita que se deforme */
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
}

/* El título debajo de la foto */
#lb-title {
    color: white !important; /* Forzamos color blanco */
    margin-top: 20px;
    font-size: 1.2rem;
    text-align: center;
    position: static !important; /* Quitamos el absolute que tenías en el HTML */
}

/* Flechas de navegación */
.lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 80px;
    color: white;
    cursor: pointer;
    padding: 20px;
    user-select: none;
    transition: color 0.3s;
}

.lb-nav:hover { color: var(--accent); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }

/* Móvil: flechas más pequeñas */
@media (max-width: 600px) {
    .lb-nav { font-size: 40px; padding: 10px; }
}


/* Ajuste preventivo para el grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
}


/* OVERLAY GRADIENTE */
.item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent 50%);
    z-index: 1;
}

.item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 20px;
    z-index: 2;
}

.item-info h3 {
    margin: 0;
    font-size: 18px;
    color: white; /* Texto blanco sobre el gradiente oscuro de la foto */
}

.item-info p {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    margin-top: 5px;
}

/* FORM */
input, select {
    background: #f8f9fa;
    color: var(--text);
    border: 1px solid var(--border);
    padding: 12px;
    border-radius: 8px;
    width: 100%;
}

.btn-save {
    background: var(--accent);
    color: white;
    font-weight: bold;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-save:hover {
    filter: brightness(1.1);
}

/* FILTROS */
.filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap; /* Para que bajen de línea en móvil */
    padding: 0 15px;
}

.filter-btn {
    background: #f0f4ff;
    border: 1px solid rgba(47,111,255,0.1);
    color: var(--accent);
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
}

.filter-btn.active {
    background: var(--accent);
    color: white;
}



/* ===== ESTILOS CALENDARIO ===== */
.calendar-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 140px 25px 80px;
}

.calendar-header {
    text-align: center;
    margin-bottom: 80px;
}

.calendar-header h1 {
    color: var(--text);
    margin-bottom: 10px;
}

.calendar-header p {
    color: var(--accent);
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 600;
}

.calendar-divider {
    width: 50px;
    height: 3px;
    background: var(--accent);
    margin: 25px auto;
}

.section-title-alt {
    color: var(--text);
    font-size: 14px;
    letter-spacing: 2px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 700;
    text-transform: uppercase;
}

.section-title-alt span {
    background: var(--accent);
    width: 40px;
    height: 2px;
}

/* Grilla de Próximas Regatas */
.regata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.regata-card {
    background: var(--card);
    padding: 40px 30px;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    text-align: center;
    transition: 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.regata-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(47,111,255,0.1);
}

.regata-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
    border: 1px solid #eee;
    margin-bottom: 25px;
}

.regata-date-text {
    color: var(--accent);
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.regata-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    color: var(--text-soft);
    font-size: 15px;
}

.regata-badge {
    margin-top: 25px;
    display: inline-block;
    padding: 6px 18px;
    background: #f0f4ff;
    border-radius: 50px;
    color: var(--accent);
    font-weight: 700;
}

/* Regatas Pasadas */
.pasadas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    opacity: 0.7;
}

.pasada-card {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid #edf2f7;
}
