/* =======================================================
   CONFIGURACIÓN GENERAL Y FUENTES
   ======================================================= */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    color: #333;
    min-height: 100vh;
    /* Fondo con overlay oscuro para mantener la estética de la marca */
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url('../img/mtb1.jpg') no-repeat center center fixed;
    background-size: cover;
    line-height: 1.6;
}

/* =======================================================
   CABECERA PRINCIPAL
   ======================================================= */
.main-header {
    padding: 60px 20px 40px;
    text-align: center;
}

.main-title {
    font-family: 'Montserrat', sans-serif;
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 3px 3px 15px rgba(0,0,0,0.9);
    margin: 0 0 10px 0;
}

/* =======================================================
   SISTEMA DE BOTONES (AMARILLO Y NEGRO)
   ======================================================= */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-secondary {
    background-color: #ffcc00; /* Amarillo vibrante */
    color: #000000 !important; /* Letras negras */
    box-shadow: 0 4px 10px rgba(255, 204, 0, 0.3);
}

.btn-secondary:hover {
    background-color: #e6b800;
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(255, 204, 0, 0.4);
}

/* =======================================================
   CONTENEDOR Y TARJETAS
   ======================================================= */
.container {
    max-width: 1000px; /* Un poco más estrecho para centrar bien la info de lectura */
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    width: 100%;
    max-width: 850px;
}

.card-content {
    padding: 40px;
    text-align: center;
}

/* =======================================================
   TÍTULOS INTERNOS DE LAS TARJETAS
   ======================================================= */
.section-title {
    font-family: 'Montserrat', sans-serif;
    color: #1a1a1a;
    font-weight: 700;
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 25px;
    text-transform: uppercase;
    border-bottom: 3px solid #ffcc00; /* Línea decorativa amarilla */
    display: inline-block;
    padding-bottom: 8px;
}

/* =======================================================
   SECCIÓN DE DESCARGAS (KMZ / GPX)
   ======================================================= */
.download-section {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
}

.icon-link img {
    height: 70px;
    width: auto;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

.icon-link:hover img {
    transform: translateY(-5px) scale(1.1);
}

/* =======================================================
   GALERÍA DE RUTAS
   ======================================================= */
.route-gallery {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.route-img {
    max-width: 100%;
    width: 350px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border: 2px solid #eaeaea;
    transition: transform 0.3s ease;
}

.route-img:hover {
    transform: scale(1.03);
}

/* =======================================================
   CRONOGRAMA
   ======================================================= */
/* Forzamos que el título de la sección "CRONOGRAMA" esté al centro */
.section-title.text-center {
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Centramos los títulos de los días (Viernes/Sábado) */
.schedule-day {
    color: #d35400; 
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 700;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
    text-align: center !important; /* El !important asegura que gane al text-left del HTML */
    width: 100%;
    display: block;
}

/* Centramos el bloque de la lista */
.schedule-list {
    list-style-type: none;
    padding: 0 !important;   /* Quitamos el margen interno por defecto */
    margin: 20px auto !important; /* Centra el bloque de la lista en la tarjeta */
    max-width: 500px;        /* Ancho ideal para que no se vea gigante */
    display: block;
}

/* Los items de la lista se mantienen alineados a la izquierda para leer bien las horas */
.schedule-list li {
    background: #f8f9fa;
    margin-bottom: 10px;
    padding: 12px 20px;
    border-radius: 8px;
    border-left: 5px solid #ffcc00; 
    color: #333;
    font-size: 1.05rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-align: left;
    display: block;
}

/* =======================================================
   UBICACIÓN (MAPA) Y CONTACTO
   ======================================================= */
.map-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.divider {
    border: 0;
    height: 1px;
    background: #ddd;
    margin: 40px 0;
}

.social-contact {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.social-contact img {
    height: 80px;
    width: auto;
    transition: transform 0.3s;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.15));
}

.social-contact img:hover {
    transform: scale(1.1) translateY(-5px);
}

/* =======================================================
   PIE DE PÁGINA (FOOTER)
   ======================================================= */
.site-footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    padding: 50px 20px;
    margin-top: 50px;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer h3 {
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.site-footer p { 
    margin: 5px 0; 
    font-size: 0.95rem; 
    line-height: 1.5;
}

/* =======================================================
   ADAPTACIÓN A MÓVILES
   ======================================================= */
@media (max-width: 768px) {
    .main-title { font-size: 1.8rem; }
    .card-content { padding: 25px 15px; }
    .section-title { font-size: 1.5rem; }
    .route-img { width: 100%; }
    .icon-link img { height: 50px; }
    .social-contact img { height: 60px; }
}

/* =======================================================
   ESTILOS PARA AGRANDAR IMÁGENES (LIGHTBOX)
   ======================================================= */
.modal-overlay {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9); /* Fondo negro traslúcido */
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #ffcc00;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
}

/* Cambiamos el cursor de las imágenes de ruta para indicar que son clickeables */
.route-img {
    cursor: zoom-in;
}

/* =======================================================
   MENÚ DE NAVEGACIÓN STICKY
   ======================================================= */
.sticky-nav {
    position: -webkit-sticky; /* Para Safari */
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.9);
    padding: 10px 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    gap: 15px;
    border-bottom: 2px solid #ffcc00;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.sticky-nav a {
    color: #ffffff;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 8px 15px;
    border-radius: 5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.sticky-nav a:hover {
    background-color: #ffcc00;
    color: #000000;
}

/* Suavizar el salto del ancla */
html {
    scroll-behavior: smooth;
}

/* Ajuste para que el título no quede tapado por el menú al saltar */
.card {
    scroll-margin-top: 80px; 
}

@media (max-width: 768px) {
    .sticky-nav {
        gap: 5px;
        padding: 8px 5px;
    }
    .sticky-nav a {
        font-size: 0.7rem;
        padding: 6px 10px;
    }
}