/* VARIABLES GLOBALES */
:root { 
    --primary: #112F4F; 
    --accent: #ff4757; 
    --purple: #6c5ce7; 
    --bg: #f8f9fc; 
    --white: #ffffff; 
    --text: #2d3436;
    --instagram: #E1306C; 
    --whatsapp: #25D366;
    --gray-light: #edf2f7;
}

/* BASE */
body { 
    font-family: 'Montserrat', sans-serif; 
    background: var(--bg); 
    color: var(--text); 
    margin: 0; 
    padding: 0; 
    overflow-x: hidden; 
}

@keyframes pulse-glow {
    0% { color: white; transform: scale(1); }
    50% { color: var(--accent); transform: scale(1.2); text-shadow: 0 0 10px var(--accent); }
    100% { color: white; transform: scale(1); }
}

/* NAVEGACIÓN Y MENÚ */
.navbar { 
    background: var(--primary); 
    color: white; 
    padding: 0 15px; 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    display: flex; 
    align-items: center; 
    height: 60px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
    gap: 15px; 
}

.menu-icon { 
    font-size: 28px; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    animation: pulse-glow 2.5s infinite; 
}

.nav-brand { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    cursor: pointer; 
    transition: opacity 0.2s;
}
.nav-brand:hover { opacity: 0.8; }

.nav-logo { 
    width: 38px; 
    height: 38px; 
    border-radius: 50%; 
    background: white; 
    border: 2px solid var(--white); 
    object-fit: cover; 
}

.nav-main-title { 
    font-weight: 700; 
    font-size: 1rem; 
    letter-spacing: -0.5px; 
    white-space: nowrap; 
}

.current-section-indicator { 
    margin-left: auto; 
    font-size: 0.75rem; 
    font-weight: 700; 
    color: var(--accent); 
    background: rgba(255,255,255,0.1); 
    padding: 5px 12px; 
    border-radius: 15px; 
    text-transform: uppercase; 
}

/* SIDEBAR */
.sidebar { 
    position: fixed; 
    left: -280px; 
    top: 0; 
    height: 100%; 
    width: 280px; 
    background: white; 
    z-index: 1001; 
    transition: 0.3s; 
    box-shadow: 5px 0 15px rgba(0,0,0,0.1); 
    overflow-y: auto; 
}

.sidebar.open { left: 0; }

.sidebar-header { 
    padding: 30px 20px; 
    background: var(--primary); 
    color: white; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 10px; 
    border-bottom: 4px solid var(--accent); 
}

.sidebar-logo-large { 
    width: 70px; 
    height: 70px; 
    border-radius: 50%; 
    background: white; 
    padding: 3px; 
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.sidebar-logo-large:hover { transform: scale(1.1) rotate(5deg); }

.sidebar-title { font-weight: 700; font-size: 1.1rem; }

.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: none; z-index: 1000; }
.overlay.show { display: block; }

.menu-item { padding: 16px 25px; cursor: pointer; font-weight: 600; border-bottom: 1px solid #f0f0f0; transition: 0.2s; color: var(--primary); }
.menu-item:hover { background: #f8f9fc; color: var(--accent); padding-left: 32px; }

/* CONTENIDO PRINCIPAL */
.main-content { max-width: 950px; margin: 20px auto; padding: 0 15px; }
#content-card { background: white; border-radius: 20px; padding: 25px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); min-height: 400px; }

.seccion-intro {
    padding: 18px;
    background: #fff5f5;
    border-left: 5px solid var(--accent);
    margin-bottom: 25px;
    border-radius: 12px;
    font-style: italic;
    font-size: 14px;
    line-height: 1.5;
    color: #444;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

/* SECCIÓN CALENDARIO OPTIMIZADA */
.calendar-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 100%; /* Cuadrado para móvil */
    border-radius: 12px;
    background: #eee;
}

@media (min-width: 768px) {
    .calendar-container { padding-top: 600px; } /* Altura fija en desktop */
}

.calendar-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* SECCIÓN NOSOTROS */
.nosotros-contenedor { display: flex; flex-direction: column; gap: 5px; }
.nosotros-titulo-principal { font-size: 1.5rem; font-weight: 800; margin: 30px 0 10px 0; color: var(--primary); display: inline-block; align-self: flex-start; }
.nosotros-bloque-texto-agrupado { font-size: 17px; font-weight: 700; line-height: 1.6; color: var(--text); margin-bottom: 20px; padding-left: 15px; border-left: 5px solid var(--accent); }
.nosotros-bloque-texto-agrupado p { margin: 0 0 12px 0; }

/* RADAR DE JUGONES */
.day-selector { 
    display: flex; 
    gap: 10px; 
    overflow-x: auto; 
    padding: 10px 0; 
    margin-bottom: 20px; 
    scrollbar-width: none; 
}
.day-selector::-webkit-scrollbar { display: none; }

.day-btn { 
    padding: 12px 20px; 
    background: #f1f2f6; 
    border-radius: 25px; 
    border: none; 
    font-weight: 700; 
    cursor: pointer; 
    white-space: nowrap; 
    transition: 0.3s; 
    font-size: 12px; 
    color: var(--primary); 
    flex-shrink: 0; 
    text-align: center;
}

.day-btn.active { 
    background: var(--accent); 
    color: white; 
    box-shadow: 0 4px 10px rgba(255, 71, 87, 0.3); 
}

.player-card { background: white; border: 1px solid var(--gray-light); border-radius: 15px; margin-bottom: 12px; transition: 0.2s; cursor: pointer; border-left: 6px solid var(--whatsapp); padding: 18px; display: flex; justify-content: space-between; align-items: center; }
.player-card:hover { transform: translateY(-3px); box-shadow: 0 6px 15px rgba(0,0,0,0.08); border-color: var(--accent); }
.player-card.not-available { border-left-color: #bdc3c7; opacity: 0.65; background: #fafafa; }

.user-detail { background: #fdfdfd; padding: 20px; border: 1px solid var(--gray-light); border-radius: 15px; margin-top: -15px; margin-bottom: 20px; display: none; animation: slideDown 0.3s ease-out; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.grid-ficha { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.label-ficha { font-weight: 800; color: var(--accent); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; display: block; margin-bottom: 4px; }
.val-ficha { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.4; }
.excepcion-box { background: #fff9db; padding: 12px; border-radius: 10px; font-size: 13px; border: 1px solid #ffe066; margin-top: 15px; font-style: italic; }

/* TABLAS Y PESTAÑAS */
.sub-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid #eee; }
.sub-tab { padding: 10px 18px; background: #f0f0f0; border-radius: 20px; cursor: pointer; font-size: 13px; font-weight: 600; transition: 0.3s; }
.sub-tab.active { background: var(--purple); color: white; }

.table-scroll { width: 100%; overflow-x: auto; border: 1px solid #eee; border-radius: 12px; margin-top: 10px; }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { padding: 14px 16px; border-bottom: 1px solid #f0f0f0; font-size: 14px; text-align: left; }
.table-main-title { font-size: 1.2rem; text-align: center !important; padding: 20px; font-weight: 700; }

/* FOOTER */
.section-footer { margin-top: 50px; padding-top: 30px; border-top: 2px solid #f0f0f0; text-align: center; }
.footer-label { font-size: 11px; font-weight: 800; color: #b2bec3; text-transform: uppercase; margin-bottom: 20px; letter-spacing: 2px; }
.footer-btns { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; max-width: 800px; margin: 0 auto; }
.footer-btn { padding: 8px 15px; background: #f1f2f6; border-radius: 20px; text-decoration: none; color: var(--primary); font-size: 12px; font-weight: 600; transition: 0.2s; }
.footer-btn:hover { background: var(--purple); color: white; }

.contact-bar { margin-top: 30px; display: flex; justify-content: center; gap: 20px; padding: 15px; flex-wrap: wrap; }
.social-link { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 14px; padding: 10px 25px; border-radius: 30px; transition: 0.3s; }
.link-ig { background: #fff0f5; color: var(--instagram); border: 2px solid var(--instagram); }
.link-ig:hover { background: var(--instagram); color: white; }
.link-ws { background: #e8f9ee; color: var(--whatsapp); border: 2px solid var(--whatsapp); }
.link-ws:hover { background: var(--whatsapp); color: white; }

.button-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 15px; }
.custom-button { padding: 18px; border: 1px solid #e0e0e0; border-radius: 12px; text-decoration: none; color: var(--primary); text-align: center; font-weight: 700; background: white; transition: 0.3s; display: flex; align-items: center; justify-content: center; }
.custom-button:hover { background: var(--primary); color: white; transform: translateY(-3px); }

/* LOADER */
.loader { border: 4px solid #f3f3f3; border-top: 4px solid var(--accent); border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 60px auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* RESPONSIVE: ORGANIZACIÓN EN CUADRÍCULA */
@media (max-width: 600px) {
    .day-selector {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        overflow-x: visible; 
        padding: 10px;
    }
    
    .day-btn {
        width: 100%;
        white-space: normal;
        font-size: 11px;
        padding: 10px 5px;
        border-radius: 12px;
    }

    .grid-ficha { grid-template-columns: 1fr; }
}
