/* ==========================================================================
   1. VARIABLES DE DISEÑO (Design Tokens)
   ========================================================================== */
:root {
    /* Colores oficiales extraídos de la equipación y pancarta */
    --rojo-oficial: #D2142B;     
    --amarillo-oficial: #F4B216; 
    
    /* Modos de fondo */
    --oscuro-puro: #0A0A0A;      /* Fondo Principal Home */
    --oscuro-card: #161616;      /* Tarjetas Home */
    --claro-bg: #FFFFFF;         /* Fondo General Páginas Interiores */
    --claro-card: #F8F9FA;       /* Tarjetas Páginas Interiores */
    
    /* Paleta de Texto */
    --texto-oscuro: #1A1A1A;
    --texto-claro: #FFFFFF;
    --texto-gris: #707070;
    
    /* Tipografías */
    --fuente-titulos: 'Impact', 'Arial Black', sans-serif;
    --fuente-cuerpo: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ==========================================================================
   2. REINICIO & ESTILOS BASE (Reset)
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--fuente-cuerpo);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================================================
   3. COMPONENTES GLOBALES (Estructura Común)
   ========================================================================== */

/* Menú de Navegación */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background 0.3s ease;
}

.navbar .nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.navbar .nav-links a {
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.navbar .logo img {
    height: 45px;
}

/* Botón de Acción Principal (CTA) */
.btn-cta {
    display: inline-block;
    background-color: var(--rojo-oficial);
    color: var(--texto-claro);
    padding: 12px 30px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-family: inherit;  
    cursor: pointer;      
}

.btn-cta:hover {
    background-color: transparent;
    border-color: var(--amarillo-oficial);
    color: var(--amarillo-oficial);
    transform: translateY(-2px);
}
/* ==========================================================================
   BOTONES DE ACCIÓN EN NAVEGACIÓN (Instagram + Únete)
   ========================================================================== */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px; 
}

.btn-icon-ig {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--texto-oscuro); /* Por defecto oscuro para páginas interiores */
    transition: color 0.3s ease, transform 0.2s ease;
}

.btn-icon-ig svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Efecto hover: Cambio al amarillo corporativo y un sutil zoom */
.btn-icon-ig:hover {
    color: var(--amarillo-oficial);
    transform: scale(1.15); 
}

/* Adaptación inteligente para la cabecera oscura del index.html */
.theme-dark-home .btn-icon-ig {
    color: var(--texto-claro);
}

.theme-dark-home .btn-icon-ig:hover {
    color: var(--amarillo-oficial);
}
/* Bloque Inferior de Patrocinadores (Footer Ticker) */
.partner-ticker-section {
    padding: 40px 5%;
    background-color: var(--claro-bg);
    border-top: 1px solid #EAEAEA;
    text-align: center;
}

.partner-ticker-section h3 {
    font-family: var(--fuente-titulos);
    font-size: 1.2rem;
    color: var(--texto-gris);
    letter-spacing: 2px;
    margin-bottom: 25px;
}

.ticker-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px 50px; 
    flex-wrap: wrap;
}

/* Contenedor individual de cada logotipo */
.ticker-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px; /* Altura fija de la "caja" para alinear todos los logos por igual */
    width: 140px; /* Ancho máximo de la "caja" */
}

/* Control estricto de la imagen interior */
.ticker-logo img {
    height: auto;
    width: auto;
    max-height: 60px; /* Ningún logo será más alto que esto */
    max-width: 100%;  /* Ningún logo se saldrá de los 150px de ancho */
    object-fit: contain; /* CRÍTICO: Ajusta la imagen sin deformar ni recortar */
    
    /* Efecto corporativo premium (escala de grises que recupera el color) */
    filter: grayscale(100%);
    opacity: 0.55;
    transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

/* Interacción al pasar el ratón */
.ticker-logo img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05); /* Pequeño realce visual */
}

.main-footer {
    padding: 60px 5% 40px 5%;
    background-color: #FAFAFA;
    border-top: 1px solid #EEEEEE;
    text-align: center;
}

.main-footer .ticker-container {
    margin-bottom: 50px; 
}

/* CONTENEDOR EN UNA SOLA LÍNEA FLUIDA */
.footer-bottom {
    border-top: 1px solid #EAEAEA;
    padding-top: 25px;
    display: flex;
    justify-content: center; /* Centrado absoluto de toda la tira de elementos */
    align-items: center;
    flex-wrap: wrap;         /* Permite envolver filas limpiamente en pantallas pequeñas */
    gap: 10px 18px;          /* 10px vertical si se envuelve, 18px horizontal de separación */
    font-size: 0.8rem;
    color: var(--texto-gris);
}

.footer-bottom span {
    font-family: var(--fuente-cuerpo);
}

.footer-bottom a {
    color: var(--texto-gris);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-bottom a:hover {
    color: var(--rojo-oficial);
    text-decoration: underline;
}

/* Separador estético vertical inline */
.footer-bottom .footer-divider {
    color: #DCDCDC;
    user-select: none;       /* Evita que se seleccione accidentalmente al arrastrar */
}

/* ==========================================================================
   4. CONTROLADORES DE TEMA (Modo Oscuro vs Modo Claro)
   ========================================================================== */

/* Configuración para index.html (Home Premium Dark) */
.theme-dark-home {
    background-color: var(--oscuro-puro);
    color: var(--texto-claro);
}

.theme-dark-home .navbar {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-dark-home .nav-links a {
    color: var(--texto-claro);
}

.theme-dark-home .nav-links a:hover, 
.theme-dark-home .nav-links a.active {
    color: var(--amarillo-oficial);
}

/* Configuración para Páginas Interiores (Geométrico Sencillo) */
.theme-light-inner {
    background-color: var(--claro-bg);
    color: var(--texto-oscuro);
    padding-top: 80px;
}

.theme-light-inner .navbar {
    background: var(--claro-bg);
    border-bottom: 3px solid var(--amarillo-oficial);
}

.theme-light-inner .nav-links a {
    color: var(--texto-oscuro);
}

.theme-light-inner .nav-links a:hover,
.theme-light-inner .nav-links a.active {
    color: var(--rojo-oficial);
}

.content-container {
    padding: 60px 10%;
}

/* ==========================================================================
   5. SECCIÓN ESPECÍFICA: PÁGINA DE INICIO (index.html)
   ========================================================================== */
.hero-home {
    height: 100vh;
    background: linear-gradient(rgba(10, 10, 10, 0.6), rgba(10, 10, 10, 0.9)), 
                url('img/fondohome.jpg') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 10%;
}

.hero-home h1 {
    font-family: var(--fuente-titulos);
    font-size: 5rem;
    line-height: 0.95;
    color: var(--texto-claro);
    text-transform: uppercase;
    max-width: 800px;
    margin-bottom: 20px;
}

.hero-home h1 span {
    color: var(--amarillo-oficial);
}

.hero-home p {
    font-size: 1.4rem;
    max-width: 600px;
    margin-bottom: 35px;
    color: rgba(255, 255, 255, 0.8);
}

.race-data-section {
    padding: 80px 10%;
    background-color: var(--oscuro-puro);
}

.race-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.data-card {
    background-color: var(--oscuro-card);
    border-left: 4px solid var(--rojo-oficial);
    padding: 30px;
    border-radius: 4px;
}

.data-card h4 {
    font-family: var(--fuente-titulos);
    font-size: 1.2rem;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: var(--amarillo-oficial);
}

.data-card .metric {
    font-family: var(--fuente-titulos);
    font-size: 3rem;
    color: var(--texto-claro);
}

/* ==========================================================================
   6. SECCIÓN ESPECÍFICA: CABECERAS GEOMÉTRICAS (COMPETICIONES Y NOTICIAS)
   ========================================================================== */

/* Mantener el diseño geométrico plano original para Noticias */
.banner-noticias,
.newspaper-vintage,
.inner-header-banner.newspaper-vintage {
    background: linear-gradient(135deg, var(--amarillo-oficial) 40%, var(--rojo-oficial) 40%);
    color: #ffffff; 
    border-bottom: 5px solid var(--rojo-oficial); 
    text-align: center;
    padding: 60px 10% 40px 10%;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    display: block;
}

/* NUEVA PORTADA CON FOTOGRAFÍA GRUPAL COMPARTIDA */
.banner-competiciones {
    /* Capa oscura superpuesta + la foto grupal centrada en el encuadre */
    background: linear-gradient(rgba(10, 10, 10, 0.45), rgba(10, 10, 10, 0.75)), 
                url('img/portada_entrenamientos.jpeg') center 56% / cover no-repeat;
    color: #ffffff; 
    border-bottom: 5px solid var(--rojo-oficial); 
    text-align: center;
    
    /* Ampliamos ligeramente el padding para darle más aire y que luzca el grupo */
    padding: 250px 10% 110px 10%; 
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    display: block;
}

.banner-competiciones h1 {
    font-family: var(--fuente-titulos);
    font-size: 4.8rem;
    font-weight: 900;
    color: #ffffff; 
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    line-height: 1.1;
    text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.6); 
}

.banner-noticias h1,
.newspaper-vintage h1,
.inner-header-banner.newspaper-vintage h1 {
    font-family: 'Times New Roman', Georgia, serif;
    font-size: 4.8rem;
    font-weight: 900;
    color: #ffffff; 
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    line-height: 1.1;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5); 
}

.newspaper-meta,
.competiciones-meta {
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 1rem;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.4); 
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    padding: 8px 0;
    display: flex;
    justify-content: space-between;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff; 
}
/* --- SECCIÓN GRUPO ALTO RENDIMIENTO DAPLES --- */
.daples-group-section {
    width: 100%;
    max-width: 900px;
    margin: 50px auto;
    background-color: #FFFDF9;
    border: 1px solid #F5E6C4;
    border-top: 4px solid var(--rojo-oficial);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.daples-header {
    font-family: var(--fuente-titulos);
    font-size: 1.9rem;
    text-transform: uppercase;
    margin-bottom: 15px;
    color: var(--texto-oscuro);
    letter-spacing: 0.5px;
}

.daples-header span {
    color: var(--rojo-oficial);
}

.daples-desc {
    color: var(--texto-gris);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.daples-coach {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    border-top: 1px dashed #F5E6C4;
    padding-top: 25px;
}

.daples-coach-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #EAEAEA;
    background-size: cover;
    background-position: center;
    border: 2px solid var(--amarillo-oficial);
}

.daples-coach-info {
    text-align: left;
}

.daples-coach-info strong {
    display: block;
    font-size: 1.15rem;
    color: var(--texto-oscuro);
    margin-bottom: 2px;
}

.daples-coach-info span {
    font-size: 0.85rem;
    color: var(--rojo-oficial);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   7. SECCIÓN ESPECÍFICA: NUESTRA ESCUELA (interna.html)
   ========================================================================== */
.banner-escuela {
    height: 65vh; 
    min-height: 480px;
    display: flex;
    justify-content: flex-end; 
    align-items: flex-start;
    padding-top: 190px;   
    padding-right: 25%;  
    padding-left: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.4) 45%, rgba(0, 0, 0, 0.75) 100%), 
                url('img/banner_escuela_nuevo.jpg') center 15% / cover no-repeat;
    box-shadow: inset 0 -30px 30px rgba(0,0,0,0.15);
}

.banner-escuela h1 {
    font-family: var(--fuente-titulos);
    font-size: 3.2rem; 
    line-height: 1.1;
    text-transform: uppercase;
    color: #ffffff;
    text-align: right;
    margin: 0;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    max-width: 500px; 
}

.banner-escuela h1 .text-highlight {
    color: var(--rojo-oficial); 
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.athlete-card {
    background-color: var(--claro-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: center;
    padding: 20px;
    border: 1px solid #EDEDED;
    transition: transform 0.2s ease;
}

.athlete-card:hover {
    transform: translateY(-5px);
}

.athlete-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #DDD;
    margin: 0 auto 15px;
    background-size: cover;
    background-position: center;
    border: 3px solid var(--amarillo-oficial);
}

.athlete-card h4 {
    font-family: var(--fuente-titulos);
    font-size: 1.5rem;
    text-transform: uppercase;
    color: var(--texto-oscuro);
    margin-bottom: 5px;
}

.coach-title {
    font-size: 0.82rem;
    color: var(--texto-gris);
    margin: 4px 0 10px 0;
    font-weight: 600;
}

.discipline-blocks {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.discipline-badge {
    background-color: var(--rojo-oficial);
    color: var(--texto-claro);
    font-size: 0.75rem;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}

/* ==========================================================================
   8. SECCIÓN ESPECÍFICA: COMPETICIONES (competiciones.html)
   ========================================================================== */
.section-title {
    font-family: var(--fuente-titulos);
    font-size: 2.2rem;
    text-transform: uppercase;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--amarillo-oficial);
    padding-bottom: 10px;
    text-align: center; /* CORREGIDO Y MANTENIDO: Título perfectamente centrado */
}

.race-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 60px;
}

.race-row {
    display: grid;
    grid-template-columns: 120px 1fr 180px 150px;
    align-items: center;
    background-color: var(--claro-card);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #EDEDED;
    gap: 20px;
}

.race-date {
    font-family: var(--fuente-titulos);
    font-size: 1.4rem;
    color: var(--rojo-oficial);
    text-align: center;
    line-height: 1;
}

.race-date span {
    display: block;
    font-size: 0.9rem;
    color: var(--texto-gris);
    font-family: var(--fuente-cuerpo);
    font-weight: bold;
}

.race-info {
    text-align: left;
}

.race-info h3 {
    font-size: 1.2rem;
    color: var(--texto-oscuro);
}

.race-info p {
    color: var(--texto-gris);
    font-size: 0.9rem;
}

.race-type {
    justify-self: start;
    background-color: var(--texto-oscuro);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.btn-register {
    background-color: transparent;
    border: 2px solid var(--rojo-oficial);
    color: var(--rojo-oficial);
    padding: 8px 15px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: all 0.3s;
}

.btn-register:hover {
    background-color: var(--rojo-oficial);
    color: white;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 15px;
    margin-bottom: 60px;
}

.calendar-day {
    background-color: var(--claro-card);
    border: 1px solid #EDEDED;
    border-top: 4px solid var(--amarillo-oficial);
    padding: 20px 12px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
}

.calendar-day.weekend {
    border-top-color: var(--rojo-oficial);
}

/* --- ADAPTACIÓN UNIFICADA: CALENDARIO ADULTOS (tc-) --- */
.training-calendar-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columnas fijas (Lunes-Jueves arriba, resto abajo) */
    gap: 20px; 
    align-items: start;
    
    /* CONTROL DE VÉRTICES EXCLUSIVO: Centrado y ancho máximo acotado solo aquí */
    width: 100%;
    max-width: 1100px; 
    margin: 30px auto; 
}

.tc-day-column {
    background-color: var(--claro-card);
    border: 1px solid #EDEDED;
    border-top: 4px solid var(--texto-oscuro);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.tc-day-column.tc-weekend-day {
    border-top-color: var(--rojo-oficial);
}

.tc-day-name {
    background-color: #FAFAFA;
    color: var(--texto-oscuro);
    font-family: var(--fuente-titulos);
    font-size: 1.2rem;
    text-transform: uppercase;
    padding: 10px 14px;
    text-align: left;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #EDEDED;
}

.tc-weekend-day .tc-day-name {
    color: var(--rojo-oficial);
}

.tc-sessions-stack {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tc-item {
    background-color: #FFFFFF;
    border: 1px solid #EAEAEA;
    padding: 10px;
    border-radius: 6px;
    position: relative;
    text-align: left;
}

.tc-item.t-swim { border-left: 4px solid #007bff; }
.tc-item.t-run { border-left: 4px solid #28a745; }
.tc-item.t-bike { border-left: 4px solid var(--amarillo-oficial); }
.tc-item.t-multi { border-left: 4px solid #6f42c1; }

.tc-discipline-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    background-color: #F5F5F5;
    padding: 2px 5px;
    border-radius: 4px;
    margin-bottom: 4px;
    color: #444444;
    border: 1px solid #EAEAEA;
}

.tc-activity {
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--texto-oscuro);
}
.tc-activity strong { color: #000000; }

.tc-desc {
    font-size: 0.75rem;
    color: var(--texto-gris);
    line-height: 1.35;
    margin-top: 2px;
}

.tc-rest-day {
    border-top-color: var(--texto-gris);
    background-color: #FAF9F6;
}

.tc-rest-box {
    padding: 25px 15px;
    text-align: center;
}

.tc-rest-box span {
    display: block;
    font-family: var(--fuente-titulos);
    font-size: 1rem;
    color: var(--texto-gris);
    margin-bottom: 4px;
}

.tc-rest-box p {
    font-size: 0.75rem;
    color: var(--texto-gris);
    line-height: 1.3;
}

/* Tarjeta de Objetivos independiente y centrada debajo */
.tc-objectives-card {
    width: 100%;
    max-width: 540px; 
    margin: 40px auto 10px auto; 
    background-color: #FFFDF9;
    border: 1px solid #F5E6C4;
    border-top: 4px solid var(--amarillo-oficial);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    overflow: hidden;
}

.objectives-header {
    background-color: transparent;
    color: var(--texto-oscuro);
    border-bottom: 1px solid #F5E6C4;
}

.tc-objectives-content {
    padding: 15px;
}

.tc-race-inline {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px dashed #F1F1F1;
}

.tc-race-inline:last-child {
    border-bottom: none;
}

.tc-race-badge {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    color: #FFFFFF;
    flex-shrink: 0;
}

.tc-race-badge.badge-duathlon { background-color: #E65100; }
.tc-race-badge.badge-triathlon { background-color: var(--rojo-oficial); }

.tc-race-text {
    text-align: left;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--texto-oscuro);
}

.tc-race-text p {
    font-size: 0.78rem;
    color: var(--texto-gris);
    margin-top: 2px;
}

/* ==========================================================================
   9. SECCIÓN ESPECÍFICA: NOTICIAS (noticias.html) - ESTILO PRENSA VINTAGE
   ========================================================================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.news-card.newspaper-style {
    background-color: #ffffff;
    border: 1px solid #1a1a1a;
    padding: 25px;
    border-radius: 0;
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.news-card.newspaper-style:hover {
    transform: translate(-2px, -2px);
    box-shadow: 10px 10px 0px rgba(210, 20, 43, 0.15);
}

.news-header.newspaper-border {
    border-bottom: 2px double #1a1a1a;
    padding-bottom: 8px;
    margin-bottom: 15px;
    text-align: left;
}

.news-section-tag {
    font-family: Georgia, serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1.5px;
    color: var(--rojo-oficial);
}

.news-body.newspaper-texts {
    text-align: left;
    flex-grow: 1;
}

.news-body.newspaper-texts h3 {
    font-family: 'Times New Roman', Georgia, serif;
    font-size: 1.6rem;
    font-weight: bold;
    line-height: 1.15;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.news-body.newspaper-texts h3 a {
    color: inherit;
    text-decoration: none;
}
.news-body.newspaper-texts h3 a:hover {
    text-decoration: underline;
}

.news-excerpt {
    font-family: Georgia, serif;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #333333;
    margin-bottom: 20px;
}

.news-footer.newspaper-meta-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #1a1a1a;
    padding-top: 10px;
    font-family: Georgia, serif;
    font-size: 0.78rem;
    font-style: italic;
    color: #555555;
}

.btn-read-more {
    color: #000000;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 1px solid #000000;
    padding-bottom: 1px;
    transition: color 0.2s;
}
.btn-read-more:hover {
    color: var(--rojo-oficial);
    border-color: var(--rojo-oficial);
}

/* ==========================================================================
   10. VENTANA EMERGENTE (Modal Form & Instagram) - DISEÑO CUADRADO V1.2
   ========================================================================== */
.modal-overlay {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal-content {
    background-color: var(--claro-bg);
    color: var(--texto-oscuro);
    width: 100%;
    max-width: 760px; 
    max-height: 92vh;
    overflow-y: auto; 
    padding: 40px 45px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.35);
    border-top: 6px solid var(--rojo-oficial);
    animation: modalFadeIn 0.3s ease-out;
}

.modal-content::-webkit-scrollbar { width: 5px; }
.modal-content::-webkit-scrollbar-track { background: transparent; }
.modal-content::-webkit-scrollbar-thumb { background: #DCDCDC; border-radius: 10px; }

@keyframes modalFadeIn {
    from { transform: translateY(-15px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--texto-gris);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.modal-close:hover { color: var(--rojo-oficial); }

.modal-content h2 {
    font-family: var(--fuente-titulos);
    font-size: 2.3rem;
    text-transform: uppercase;
    margin-bottom: 4px;
    line-height: 1.1;
    text-align: left;
}

.modal-subtitle {
    color: var(--texto-gris);
    font-size: 0.95rem;
    margin-bottom: 25px;
    text-align: left;
}

#formInscripcion {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 4px 25px; 
}

.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-group label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 6px;
    color: var(--texto-oscuro);
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #DCDCDC;
    border-radius: 6px;
    font-family: var(--fuente-cuerpo);
    font-size: 0.95rem;
    background-color: #FAFAFA;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--rojo-oficial);
    background-color: #FFFFFF;
}

.form-group.form-privacy,
.rgpd-first-layer,
.btn-submit {
    grid-column: span 2; 
}

.form-group.form-privacy {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 10px;
    margin-bottom: 12px;
}

.form-group.form-privacy input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.form-group.form-privacy label {
    font-weight: normal;
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: normal;
    color: var(--texto-oscuro);
    line-height: 1.4;
    margin-bottom: 0;
    cursor: pointer;
}

.form-group.form-privacy .privacy-link {
    color: var(--rojo-oficial);
    text-decoration: underline;
    font-weight: bold;
}
.form-group.form-privacy .privacy-link:hover { color: var(--amarillo-oficial); }

.rgpd-first-layer {
    background-color: rgba(0, 0, 0, 0.03);
    border-left: 3px solid var(--rojo-oficial); 
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 0.75rem;
    line-height: 1.45;
    color: #444444;
    text-align: left;
    border-radius: 0 6px 6px 0;
}
.rgpd-first-layer p { margin-bottom: 4px; }
.rgpd-first-layer p:last-child { margin-bottom: 0; }

.btn-submit {
    width: 100%;
    background-color: var(--texto-oscuro);
    color: var(--texto-claro);
    border: none;
    padding: 14px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: inherit;
}
.btn-submit:hover { background-color: var(--rojo-oficial); }

.modal-divider {
    grid-column: span 2; 
    text-align: center;
    margin: 20px 0 15px 0;
    position: relative;
}
.modal-divider::before {
    content: ""; position: absolute; top: 50%; left: 0; width: 100%; height: 1px; background-color: #EAEAEA; z-index: 1;
}
.modal-divider span {
    background-color: var(--claro-bg); padding: 0 15px; color: var(--texto-gris); font-size: 0.85rem; position: relative; z-index: 2; text-transform: uppercase; font-weight: 600;
}

.btn-instagram {
    grid-column: span 2; 
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    text-decoration: none;
    padding: 12px;
    font-weight: 700;
    border-radius: 6px;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-instagram:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(220, 39, 67, 0.3); }

/* ==========================================================================
   10.5. MAQUETACIÓN PARA PÁGINAS LEGALES (privacidad.html / aviso-legal.html)
   ========================================================================== */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    font-family: var(--fuente-cuerpo);
    color: var(--texto-oscuro);
    line-height: 1.6;
    text-align: left;
}

.legal-content h1 {
    font-family: var(--fuente-titulos);
    font-size: 2.6rem;
    text-transform: uppercase;
    color: var(--texto-oscuro);
    margin-bottom: 25px;
    border-bottom: 4px solid var(--amarillo-oficial);
    padding-bottom: 10px;
    letter-spacing: 0.5px;
}

.legal-content h2 {
    font-family: var(--fuente-cuerpo);
    font-weight: 700;
    font-size: 1.25rem;
    margin-top: 35px;
    margin-bottom: 12px;
    color: var(--rojo-oficial);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legal-content p {
    margin-bottom: 16px;
    font-size: 0.95rem;
    color: #333333;
}

.legal-content .legal-email {
    color: var(--rojo-oficial);
    font-weight: bold;
    text-decoration: none;
    transition: color 0.2s ease;
}
.legal-content .legal-email:hover {
    color: var(--amarillo-oficial);
    text-decoration: underline;
}

/* ==========================================================================
   11. ELEMENTOS DE LA ESCUELA (Cronograma Semanal y Servicios Extra)
   ========================================================================== */

/* Solución Quirúrgica al Conflicto: Rejilla fluida y auto-organizable */
.school-calendar-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 25px;
    margin-bottom: 60px;
    align-items: start;
}

.sc-day-column {
    background-color: var(--claro-card);
    border: 1px solid #EDEDED;
    border-top: 4px solid var(--texto-oscuro);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.sc-day-column.sc-weekend {
    border-top-color: var(--rojo-oficial);
}

.sc-day-name {
    background-color: #FAFAFA;
    color: var(--texto-oscuro);
    font-family: var(--fuente-titulos);
    font-size: 1.2rem;
    text-transform: uppercase;
    padding: 10px 14px;
    text-align: left;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #EDEDED;
}

.sc-weekend .sc-day-name {
    color: var(--rojo-oficial);
}

.sc-sessions-stack {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sc-item {
    background-color: #FFFFFF;
    border: 1px solid #EAEAEA;
    padding: 10px;
    border-radius: 6px;
    position: relative;
    text-align: left;
}

/* Distintivos por grupo según documentación oficial */
.sc-item.g-light { border-left: 4px solid #007bff; }  /* G1 - Azul */
.sc-item.g-mid { border-left: 4px solid #28a745; }    /* G2-3 - Verde */
.sc-item.g-high { border-left: 4px solid var(--amarillo-oficial); } /* G4-5 - Amarillo */

.sc-group-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    background-color: #F5F5F5;
    padding: 2px 5px;
    border-radius: 4px;
    margin-bottom: 4px;
    color: #444444;
    border: 1px solid #EAEAEA;
}

.sc-activity {
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--texto-oscuro);
}
.sc-activity strong { color: #000000; }

.sc-alt-venue {
    font-size: 0.7rem;
    color: var(--rojo-oficial);
    font-style: italic;
    margin-top: 3px;
    font-weight: 600;
}

/* Domingo de Descanso */
.sc-rest-day {
    border-top-color: var(--texto-gris);
    background-color: #FAF9F6;
}
.sc-rest-box {
    padding: 25px 15px;
    text-align: center;
}
.sc-rest-box span {
    display: block;
    font-family: var(--fuente-titulos);
    font-size: 1rem;
    color: var(--texto-gris);
    margin-bottom: 4px;
}
.sc-rest-box p {
    font-size: 0.75rem;
    color: var(--texto-gris);
    line-height: 1.3;
}

/* Servicios Asociados (Fisioterapia y Campus) */
.school-services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.school-service-card {
    background-color: #FFFDF9;
    border: 1px solid #F5E6C4;
    border-left: 4px solid var(--amarillo-oficial);
    padding: 25px;
    border-radius: 8px;
    text-align: left;
}

.school-service-card h4 {
    font-family: var(--fuente-cuerpo);
    font-weight: 700;
    font-size: 1.25rem;
    text-transform: uppercase;
    color: var(--texto-oscuro);
    margin-bottom: 6px;
}

.service-partner {
    font-weight: bold;
    color: var(--rojo-oficial);
    margin-bottom: 12px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.service-prices-badges {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    font-size: 0.9rem;
}

.service-prices-badges span {
    background-color: #FFFFFF;
    border: 1px solid #EAEAEA;
    padding: 6px 12px;
    border-radius: 4px;
}

.school-camps-list {
    padding-left: 18px;
    font-size: 0.9rem;
    color: #333333;
    line-height: 1.5;
}
.school-camps-list li { margin-bottom: 6px; }

/* ==========================================================================
   12. MEDIA QUERIES GENERALES & OPTIMIZACIÓN RESPONSIVA (Siempre al final)
   ========================================================================== */

/* Botón de Menú Hamburguesa Móvil */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--texto-oscuro);
    transition: all 0.3s ease-in-out;
}

.theme-dark-home .menu-toggle span {
    background-color: var(--texto-claro);
}

/* ÚNICO BREAKPOINT DE PRODUCCIÓN (768px) */
@media (max-width: 768px) {
    
    /* A) Menú Adaptativo Común */
    .navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .navbar .logo { flex: 1; display: flex; justify-content: flex-start; }
    .navbar .menu-toggle { display: flex; flex: 0 0 auto; }
    .navbar > div:not(.logo) { flex: 1; display: flex; justify-content: flex-end; }
    .navbar .btn-cta { padding: 8px 16px; font-size: 0.8rem; }

    .navbar .nav-links {
        position: absolute;
        top: 100%;        
        left: 0;
        width: 100%;   
        background-color: #ffffff; 
        flex-direction: column;
        align-items: center;
        gap: 20px;
        max-height: 0; 
        opacity: 0;
        overflow: hidden;
        padding: 0;
        transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out, padding 0.4s ease-in-out;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        z-index: 1050;
    }

    .theme-dark-home .navbar .nav-links {
        background-color: var(--oscuro-puro);
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar .nav-links.mobile-open {
        max-height: 300px; 
        opacity: 1;
        padding: 25px 0;   
    }

    .navbar .nav-links a {
        font-size: 1.1rem;
        display: block;
        width: 100%;
        text-align: center;
    }

    .menu-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    .content-container {
        padding: 40px 5% !important; 
    }

    /* B) Adaptación de la Página de Inicio (index.html) */
    .hero-home h1 { font-size: 2.8rem !important; }
    .hero-home p { font-size: 1.0rem !important; }
    .hero-home {background-position: 70% center !important; }

    /* C) Adaptación de las Cabeceras de Páginas Internas */
    .banner-competiciones, .banner-noticias, .newspaper-vintage, .inner-header-banner.newspaper-vintage {
        padding: 40px 5% 30px 5% !important;
    }
    .banner-competiciones h1, .banner-noticias h1, .newspaper-vintage h1, .inner-header-banner.newspaper-vintage h1 {
        font-size: 2.8rem !important;
    }
    .newspaper-meta, .competiciones-meta {
        font-size: 0.8rem !important;
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    /* D) Adaptación de las Filas de Carreras (competiciones.html) */
    .race-row {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 15px !important;
    }
    .race-date { text-align: center !important; }
    .race-type { justify-self: center !important; }
    .btn-register { width: 100%; display: block; }
    .calendar-grid { grid-template-columns: 1fr !important; gap: 10px !important; }

    /* UNIFICACIÓN: Forzamos la caída lineal del nuevo calendario en móviles */
    .training-calendar-container {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    .tc-day-name { padding: 10px 15px !important; font-size: 1.2rem !important; }
    .tc-sessions-stack { padding: 12px !important; }
    .tc-activity { font-size: 0.88rem !important; }
    .tc-rest-box { padding: 20px !important; text-align: left !important; }

    /* E) Adaptación del Formato Prensa (noticias.html) */
    .news-grid { grid-template-columns: 1fr !important; gap: 25px !important; }
    .news-card.newspaper-style { padding: 20px !important; }
    .news-body.newspaper-texts h3 { font-size: 1.4rem !important; }

    /* F) Adaptación de Nuestra Escuela (interna.html) */
    .banner-escuela {
        height: 50vh;
        min-height: 340px;
        justify-content: center;
        align-items: center;
        padding: 40px 20px;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.75) 100%), 
                    url('img/banner_escuela_nuevo.jpg') center 15% / cover no-repeat;
    }
    .banner-escuela h1 { text-align: center !important; font-size: 2.3rem !important; }
    .school-calendar-container { grid-template-columns: 1fr !important; gap: 15px !important; }
    .school-services-grid { grid-template-columns: 1fr !important; gap: 20px !important; }
    .school-service-card { padding: 20px !important; }
    .service-prices-badges { flex-direction: column !important; gap: 8px !important; }
    .sc-day-name { padding: 10px 15px !important; font-size: 1.2rem !important; }
    .sc-sessions-stack { padding: 12px !important; }
    .sc-activity { font-size: 0.88rem !important; }

    /* G) Adaptación Legal (privacidad.html / aviso-legal.html) */
    .legal-content h1 { font-size: 2.2rem !important; margin-bottom: 20px !important; }
    .legal-content h2 { font-size: 1.15rem !important; margin-top: 25px !important; }

    /* H) Adaptación del Modal de Registro Cuadrado V1.2 */
    .modal-content { max-width: 100% !important; padding: 30px 20px !important; }
    #formInscripcion { grid-template-columns: 1fr !important; gap: 0 !important; }
    .form-group.form-privacy, .rgpd-first-layer, .btn-submit, .modal-divider, .btn-instagram {
        grid-column: auto !important;
    }

    /* Adaptación del cierre legal en dispositivos móviles */
    .footer-bottom {
        flex-direction: column !important;
        gap: 12px !important;
        text-align: center !important;
    }
    .footer-legal-links {
        justify-content: center !important;
        gap: 20px !important;
    }
    /* Adaptación del bloque Daples en móviles */
    .daples-group-section {
        padding: 25px 20px !important;
        margin: 35px auto !important;
    }
    .daples-header {
        font-size: 1.5rem !important;
    }

    /* Adaptación específica para la portada de Entrenamientos (Foto grupal) */
    .banner-competiciones {
        padding: 100px 5% 80px 5% !important; /* Más altura para encuadrar al grupo en móvil */
    }
    .banner-competiciones h1 {
        font-size: 2.1rem !important; /* Tamaño reducido para evitar el desbordamiento de la palabra */
        line-height: 1.2 !important;
        text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8) !important;
    }
    /* Adaptación de los botones de cabecera en móviles */
    .nav-actions {
        gap: 15px !important;
    }
    .btn-icon-ig svg {
        width: 22px !important;
        height: 22px !important;
    }

    /* Adaptación del tamaño de los logos en el Footer para móviles */
    .ticker-logo {
        height: 40px !important;
        width: 120px !important;
    }
    .ticker-logo img {
        max-height: 40px !important;
    }
    .ticker-container {
        gap: 10px 5px !important; /* Reduce la separación entre logos */
    }
}