/* Reseteo de estilos básicos */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.leaflet-control-attribution {
    font-size: 8px;
    bottom: 65px;
    right: 5px;
    background: transparent;
    box-shadow: none;
}
.boton-control {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
}

.boton-control img {
    width: 32px;
    height: 32px;
}

/* Reglas comunes para la botonera */
.botonera-horizontal {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 0px;
    margin-bottom: 40px;
}

.boton-control img {
    width: 32px;
    height: 32px;
}
body, html {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

/* Pantalla de inicio */
.pantalla-inicio {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f0f8ff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow-y: auto; /* Permitir scroll vertical */
}

.contenedor-inicio {
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin: 20px 0; /* Añadir margen para pantallas pequeñas */
}

.contenedor-inicio h1 {
    color: #0078d4;
    margin-bottom: 30px;
    font-size: 2.2rem;
}

.seleccion-idioma {
    margin-bottom: 25px;
}

.seleccion-idioma h2 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.5rem;
}

.botones-idioma {
    display: flex;
    flex-wrap: wrap; /* Permitir que los botones se ajusten */
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.boton-idioma {
    background-color: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 5px; /* Espaciado entre filas */
}

.boton-idioma.activo {
    background-color: #0078d4;
    color: white;
    border-color: #0078d4;
}

.aviso-geocalizacion {
    background-color: #fffacd;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.aviso-geocalizacion p {
    margin-bottom: 15px;
    color: #856404;
}

.botones-aviso {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap; /* Permitir que los botones se ajusten */
}

.botones-aviso button {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: 5px;
}

#btn-continuar {
    background-color: #28a745;
    color: white;
}

#btn-continuar:hover {
    background-color: #218838;
}

#btn-salir {
    background-color: #dc3545;
    color: white;
}

#btn-salir:hover {
    background-color: #c82333;
}

/* Aplicación principal */
.pantalla-app {
    position: relative;
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
}

header {
    background-color: #001111;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

header h1 {
    position: relative;
    z-index: 1000;
    display: block !important;
    color: black; /* o blanc, segons el fons */
}
.controles-rango {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.controles-rango label {
    font-size: 0.85rem;
    margin-bottom: 5px;
}

#rango-distancia {
    width: 150px;
}

   #mapa {
    flex-grow: 1;
    z-index: 10;
    height: 80%;
    transform: translateZ(0);
    will-change: transform;
}

.controles-app {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 100;
}

.controles-principales {
    display: flex;
    gap: 15px;
}

.boton-control {
    background-color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.boton-control img {
    width: 30px;
    height: 30px;
}

.boton-control.activo {
    background-color: #0078d4;
}

.boton-control.activo img {
    filter: brightness(0) invert(1);
}

.selector-tipo {
    background-color: white;
    border-radius: 25px;
    padding: 5px 15px;
    display: flex;
    align-items: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    
}

.selector-tipo label {
    margin-right: 10px;
    font-size: 0.9rem;
}

#tipo-narracion {
    border: none;
    background: transparent;
    font-size: 0.9rem;
    outline: none;
}

.panel-texto {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.panel-contenido {
    background-color: white;
    border-radius: 15px;
    padding: 25px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.boton-cerrar {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.oculto {
    display: none !important;
}

.marcador-custom {
    width: 30px;
    height: 30px;
}

.marcador-custom div {
    width: 100%;
    height: 100%;
    background-color: #0078d4;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #0078d4;
    animation: pulse 2s infinite;
}

.marcador-punto {
    width: 14px !important;
    height: 14px !important;
}

.marcador-punto div {
    width: 100%;
    height: 100%;
    background-color: #dc3545;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 1px #dc3545;
}

.radio-exploracion {
    fill-opacity: 0.1;
    stroke: #0078d4;
    stroke-width: 2;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Estilos responsive adicionales */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }
    
    header h1 {
        margin-bottom: 10px;
    }
    
    .controles-rango {
        width: 100%;
        align-items: center;
    }
    
    #rango-distancia {
        width: 100%;
        max-width: 300px;
    }
    
    .controles-app {
        gap: 10px;
    }
    
    .boton-control {
        width: 50px;
        height: 50px;
    }
    
    .boton-control img {
        width: 25px;
        height: 25px;
    }
    
    .selector-tipo {
        width: 90%;
        justify-content: center;
    }
 
}