/* General */
nav {
    position: relative;
    z-index: 9999; /* Valor alto para asegurarte de que quede encima */
}

footer {
    clear: both;
    position: relative;
    z-index: 10;
    color: #fff;
    padding: 20px 0;
    text-align: center;
    border: none;
    box-shadow: none;
    margin-top: 0;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    height: 100%; /* Garantiza que el cuerpo ocupe toda la altura */
}

html {
    box-sizing: border-box;
    height: 100%; /* Garantiza que HTML ocupe toda la altura */
}

/* Contenedor Principal */
.ruta-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    overflow: auto; /* Permitir barras de desplazamiento si es necesario */
    position: relative;
    z-index: 0; /* Asegura que no interfiera con el menú */
}

/* Títulos */
.ruta-titulo {
    font-size: 2rem;
    margin-bottom: 10px;
    text-align: left;
    color: #333;
}

.ruta-subtitulo {
    font-size: 1.5rem;
    margin: 10px 0;
    font-weight: bold;
    text-align: left;
    color: #333;
}

/* Mapa */
#mapa-ruta {
    width: 100%;
    height: 400px; /* Ocupa todo el contenedor */
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 0; /* Asegura que no interfiera con el menú */
}

/* Contenedor para mapa y estadísticas */
.ruta-mapa-estadisticas {
    display: flex;
    flex-wrap: nowrap; /* Evita que se rompa en múltiples filas */
    gap: 20px;
    margin-bottom: 20px;
    align-items: stretch; /* Igualar altura entre mapa y estadísticas */
}

/* Mapa */
.ruta-mapa {
    flex: 2;
    min-width: 300px;
    display: flex;
    align-items: stretch; /* Ajustar a la altura del contenedor */
    overflow: hidden;
    position: relative;
}

/* Estadísticas */
.ruta-estadisticas {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

/* Título de Estadísticas */
.ruta-estadisticas h3 {
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: #333; /* Color del texto */
    border-bottom: 1px solid #e0e0e0; /* Línea inferior */
    padding-bottom: 5px; /* Espaciado debajo del título */
}

/* Contenedor general de estadísticas */
.stats-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Dos columnas */
    gap: 10px 10px; /* Espaciado entre filas y columnas */
    margin: 0 auto; /* Centrado */
}

/* Elementos individuales de las estadísticas */
.stat-item {
    text-align: left; /* Alineación a la izquierda */
    padding: 5px 0;
    border-bottom: 1px solid #e0e0e0; /* Línea divisoria */
}

.stat-item:last-child {
    border-bottom: none; /* Elimina la línea inferior del último elemento */
}

/* Etiqueta de la estadística */
.stat-item h4 {
    font-size: 0.9rem;
    font-weight: 300;
    color: #757575; /* Color gris para el texto */
    margin: 0;
    text-transform: capitalize; /* Capitalización */
}

/* Valor de la estadística */
.stat-item p {
    font-size: 0.9rem;
    font-weight: bold;
    color: #333; /* Texto oscuro */
    margin: 5px 0 0; /* Espaciado superior */
}
/* Imagen Miniatura */
.imagen-miniatura {
    width: 100px; /* Tamaño más pequeño */
    height: auto; /* Mantiene la proporción */
    cursor: pointer; /* Cambia el cursor para indicar que es clicable */
    border-radius: 8px; /* Bordes redondeados */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease; /* Animación al pasar el cursor */
}

.imagen-miniatura:hover {
    transform: scale(1.05); /* Hace zoom al pasar el ratón */
}

/* Lightbox */
.lightbox {
    display: none; /* Oculto por defecto */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Fondo oscuro */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox-img {
    max-width: 80%;
    max-height: 80%;
    border-radius: 8px;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-lightbox:hover {
    color: #f00; /* Cambia a rojo al pasar el cursor */
}
/* Contenido */
.contenido-post {
    margin-top: 30px;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

/* Botón de retorno */
.boton-retorno {
    text-align: center;
    margin-top: 20px;
}

.boton-retorno a {
    background-color: #54B435;
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.boton-retorno a:hover {
    background-color: #28a745;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 16px;
    text-align: left;
    background-color: #f9f9f9;
}

table thead tr {
    background-color: #4CAF50;
    color: white;
    text-align: left;
    font-weight: bold;
}

table th, table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
}

table tbody tr:nth-child(even) {
    background-color: #f2f2f2;
}

table tbody tr:hover {
    background-color: #f1f1f1;
}

table a {
    color: #4CAF50;
    text-decoration: none;
}

table a:hover {
    text-decoration: underline;
}


/* Responsividad */
@media (max-width: 768px) {
    .ruta-mapa-estadisticas {
        flex-direction: column;
    }

    .ruta-mapa {
        min-height: 300px; /* Asegura una altura mínima */
    }

    .ruta-estadisticas {
        margin-top: 20px;
        min-height: auto; /* Elimina la altura fija */
    }

    .stats-container {
        grid-template-columns: 1fr; /* Una columna en dispositivos móviles */
    }
}
