* {
    margin: 0;
    padding: 0;
}

#mapa {
    width: 100vw;
    height: 93vh;
    margin: 0;
}


nav {
    top: 0px;
    background-color: #2E593E;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

.imagen {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    object-position: top;
}


h3 {
    color: #D19A30;
    padding: 20px;
    text-align: center;
    font-family: "Bebas Neue", sans-serif;
    font-size: 18px;
    box-shadow: black;
}

.menu-item {
    color: white;
    text-decoration: none;
    font-family: "Roboto Condensed", sans-serif;
    font-size: 16px;
    margin: 0 15px;
}

.menu-item:hover {
    color: #D19A30;
}

.haro {
    color: #6EC4B7;
}

.legend {
    background-color: white;
    /* Fondo blanco */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    bottom: 30px;
}

/* Estilos para el icono de fullscreen */
.image-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.fullscreen-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    padding: 5px;
    cursor: pointer;
    z-index: 1000;
    transition: background-color 0.3s;
}

.fullscreen-icon:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.fullscreen-icon i {
    color: #333;
    font-size: 16px;
}

/* Estilos para el modal/lightbox */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.modal-content {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-modal:hover {
    color: #bbb;
}

.text-block {
    padding: 4em;
    margin-inline: auto;
    max-width: 800px;
    text-align: left;
}

/* Control de capas personalizado */
.custom-layer-control {
    background: #2E593E !important;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 2px solid #D19A30;
    max-width: 280px;
}

/* Asegurar que los estilos de Leaflet no interfieran */
.leaflet-control-layers.custom-layer-control {
    background: #2E593E !important;
}

.layer-control-content {
    padding: 15px;
}

.layer-section {
    margin-bottom: 15px;
}

.layer-section:last-child {
    margin-bottom: 0;
}

.layer-section-title {
    font-family: "Bebas Neue", sans-serif;
    font-size: 14px;
    color: #D19A30;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #D19A30;
    line-height: 1.2;
}

.layer-item {
    display: flex;
    align-items: center;
    margin: 6px 0;
    font-family: "Roboto Condensed", sans-serif;
    font-size: 13px;
    color: white;
    cursor: pointer;
    transition: color 0.3s ease;
}

.layer-item:hover {
    color: #D19A30;
}

.layer-item input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #D19A30;
    transform: scale(1.1);
}

/* Estilos para el slideshow en popups */
.slideshow-container {
    position: relative;
    max-width: 100%;
    margin: auto;
}

.slides {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 4px;
}

.slide {
    display: none;
    width: 100%;
    height: 100%;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.slideshow-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding: 0 5px;
}

.prev-btn,
.next-btn {
    background: #2E593E;
    color: #D19A30;
    border: 1px solid #D19A30;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.prev-btn:hover,
.next-btn:hover {
    background: #D19A30;
    color: #2E593E;
}

.slide-counter {
    font-family: "Roboto Condensed", sans-serif;
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.popup-content {
    margin-top: 10px;
}

/* Ajustes para dispositivos móviles */
@media only screen and (max-width: 700px) {
    .text-block {
        padding: 1.5em;
    }

    .custom-layer-control {
        max-width: 220px;
        font-size: 12px;
    }

    .layer-section-title {
        font-size: 12px;
    }

    .layer-item {
        font-size: 11px;
    }

    .slides {
        height: 150px;
    }

    .prev-btn,
    .next-btn {
        padding: 4px 8px;
        font-size: 12px;
    }

    .slide-counter {
        font-size: 11px;
    }
}