﻿
:root {
    --color-burdeos-oscuro: #35031B;
    --color-burdeos-medio: #601623;
    --color-rosa-palido: #EFD2DC;
    --color-vino: #58152A;
    --color-magenta-claro: #F9D9D9;
    --color-magenta-oscuro: #7E1D37;
    --color-magenta-vivo: #AC4651;
    --color-magenta-medio: #8E1F1E;
    --color-aqua-claro: #95E5E0;
    --color-aqua-medio: #7FC8A5;
    --color-verde-claro: #39795E;
    --color-verde-marino: #1F7A62;
    --color-verde-profundo: #20705B;
    --color-verde-oscuro: #225655;
    --color-verde-petroleo: #174D47;
    --color-verde-profundo-oscuro: #11352C;
    --color-marron-oscuro: #491900;
    --color-mostaza-claro: #C69A04;
    --color-marron-medio: #764B13;
    --color-mostaza-amarillo: #C69A04;
    --color-amarillo-arena: #B88C23;
    --color-amarillo-suave: #DDAD2C;
    --color-amarillo-palido: #B86C46;
    --color-amarillo-claro: #FEC747;
    --color-rosa-suave: #FFBFD0;
    --color-rosa-pastel: #F5ADAB;
    --color-rojo-vino: #601805;
    --color-rojo-oscuro: #B64836;
    --color-rojo-vivo: #E24849;
    --color-rojo-coral: #E66A54;
    --color-naranja-coral: #E86D5A;
    --color-naranja-fuerte: #E85D33;
    --color-naranja-vivo: #E85D14;

    --font-family: 'Montserrat', sans-serif;
    --bg-color: #f5f5f5;
}

body {
    font-family: var(--font-family);
    background: radial-gradient(circle at 25% 20%, #ffffff 0%, #f5f6f7 
45%, #eceeef 100%);
    color: var(--color-burdeos-oscuro);
    padding-top: 0;
}

/* Navbar Institucional */
.institutional-navbar {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 4px solid var(--color-burdeos-medio);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar-brand-left,
.navbar-brand-right {
    display: flex;
    align-items: center;
}

.sener-logo,
.gob-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.navbar-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-burdeos-oscuro);
    margin: 0;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.navbar-subtitle {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-verde-profundo);
    margin: 0.25rem 0 0 0;
    text-transform: capitalize;
}

/* Efectos adicionales para el navbar */
.institutional-navbar::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
            var(--color-burdeos-medio) 0%,
            var(--color-vino) 25%,
            var(--color-magenta-oscuro) 50%,
            var(--color-vino) 75%,
            var(--color-burdeos-medio) 100%);
}

.sener-logo,
.gob-logo {
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.sener-logo:hover,
.gob-logo:hover {
    transform: scale(1.05);
}

.navbar-title {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments for navbar */
@media (max-width: 768px) {
    .institutional-navbar {
        padding: 0.75rem 0;
    }

    .navbar-title {
        font-size: 1.1rem;
    }

    .navbar-subtitle {
        font-size: 0.8rem;
    }

    .sener-logo,
    .gob-logo {
        height: 45px;
    }
}

@media (max-width: 576px) {
    .navbar-title {
        font-size: 0.95rem;
        line-height: 1.2;
    }

    .navbar-subtitle {
        font-size: 0.75rem;
    }

    .sener-logo,
    .gob-logo {
        height: 35px;
    }

    .institutional-navbar .col-md-3 {
        text-align: center;
        margin-bottom: 0.5rem;
    }

    .navbar-brand-left,
    .navbar-brand-right {
        justify-content: center;
    }

    .institutional-navbar .row {
        flex-direction: column;
    }

    .institutional-navbar .col-md-6 {
        order: 1;
        margin-bottom: 0.75rem;
    }

    .institutional-navbar .col-md-3:first-child {
        order: 2;
    }

    .institutional-navbar .col-md-3:last-child {
        order: 3;
    }
}

main {
    margin-top: 0;
}

h1 {
    color: var(--color-burdeos-oscuro);
}

.lead {
    color: var(--color-verde-profundo);
}

#map {
    width: 100%;
    height: 62vh;
    border-radius: 18px;
    box-shadow: 0 10px 28px -6px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.25);
    overflow: hidden;
}

@media (min-width: 992px) {
    #map {
        height: 70vh;
    }
}

#center-map-btn {
    position: absolute;
    bottom: 30px;
    left: 10px;
    z-index: 400;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(32, 112, 91, 0.3);
    color: var(--color-verde-profundo);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border-radius: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Switches dentro de las cards (personalizaciÃ³n leve) */
.layer-switch:checked {
    background-color: var(--color-verde-profundo);
    border-color: var(--color-verde-profundo);
}

.layer-switch:not(:checked) {
    background-color: #ccc;
}

.main-footer {
    background: linear-gradient(135deg,
            var(--color-burdeos-oscuro) 0%,
            var(--color-burdeos-medio) 25%,
            var(--color-vino) 50%,
            var(--color-magenta-oscuro) 75%,
            var(--color-burdeos-medio) 100%);
    color: #ffffff;
    padding: 3rem 0 2rem 0;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
            var(--color-aqua-claro) 0%,
            var(--color-verde-profundo) 25%,
            var(--color-amarillo-claro) 50%,
            var(--color-verde-profundo) 75%,
            var(--color-aqua-claro) 100%);
}

.main-footer h5 {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-aqua-claro);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.main-footer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.main-footer a:hover {
    color: var(--color-amarillo-claro);
    transform: translateX(3px);
}

.main-footer a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-amarillo-claro);
    transition: width 0.3s ease;
}

.main-footer a:hover::before {
    width: 100%;
}

.main-footer ul {
    list-style: none;
    padding: 0;
}

.main-footer ul li {
    margin-bottom: 0.75rem;
    padding-left: 0;
}

.main-footer .social-icons {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.main-footer .social-icons a {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.main-footer .social-icons a:hover {
    background: var(--color-amarillo-claro);
    color: var(--color-burdeos-oscuro);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 20px rgba(254, 199, 71, 0.3);
}

.main-footer .social-icons a::before {
    display: none;
}

.main-footer p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
}

.main-footer hr {
    border-color: rgba(255, 255, 255, 0.2);
    margin: 2rem 0 1.5rem 0;
}

/* Offcanvas eliminado */

.layer-control-item {
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    background-color: rgba(255, 255, 255, 0.5);
}

.layer-control-item.highlighted {
    background-color: var(--color-amarillo-suave);
}

.layer-control-item .form-range {
    margin-top: 0.5rem;
}

#preloader {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    z-index: 10000;
    backdrop-filter: blur(10px);
}

#preloader .spinner-border {
    color: var(--color-burdeos-medio) !important;
}

#preProgressBar {
    background: linear-gradient(90deg, var(--color-magenta-vivo), 
var(--color-rojo-vivo));
}

.preloader-hide {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease, visibility .5s ease;
}

/* Simple-DataTables */
.dataTable-wrapper {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Leaflet EasyPrint */
.leaflet-control-easyprint a {
    background-color: #fff;
    border-radius: 2px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.leaflet-control-easyprint a:hover {
    background-color: #f4f4f4;
}

/* Legend Styles */
#legend-container .card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

#legend-container .card-header {
    background: linear-gradient(135deg, var(--color-verde-profundo), 
var(--color-verde-marino));
    color: white;
    border-bottom: none;
    font-weight: 600;
}

#legend-container .card-body {
    background: rgba(255, 255, 255, 0.9);
}

.legend-item {
    font-size: 0.85rem;
    padding: 0.25rem 0;
    transition: all 0.2s ease;
}

.legend-item:hover {
    background-color: rgba(32, 112, 91, 0.1);
    border-radius: 4px;
    padding-left: 0.5rem;
}

/* Total Cards Styles (clean white variant) */
#total-cards-container .card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.15);
    background: #ffffff;
    color: #212529;
    transition: all 0.3s ease;
    overflow: hidden;
}

#total-cards-container .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.2);
}

#total-cards-container .card-title {
    font-weight: 700;
    color: #555;
    font-size: 0.65rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

#total-cards-container .card-text {
    font-weight: 800;
    color: #111;
    font-size: 1.4rem;
    margin: 0;
    font-variant-numeric: tabular-nums;
}

/* Horizontal scroll helpers for cards on mobile */
@media (max-width: 640px) {
    #total-cards-container {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        display: flex;
    }

    #total-cards-container>div {
        min-width: 150px;
        flex: 0 0 auto;
    }

    #total-cards-container::-webkit-scrollbar {
        height: 6px;
    }

    #total-cards-container::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.08);
    }

    #total-cards-container::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.35);
        border-radius: 3px;
    }
}

/* Legend items refined */
.legend-item span:last-child {
    letter-spacing: .25px;
}

/* Reduce motion for users preferring it */
@media (prefers-reduced-motion: reduce) {

    .glass,
    #map,
    .card {
        transition: none !important;
        animation: none !important;
    }
}

/* 
Mejoras adicionales para la interfaz */

/* Estilo para el tÃ­tulo principal */
h1 {
    font-weight: 700;
    font-size: 1.75rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    h1 {
        font-size: 2.25rem;
    }
}

/* Mejoras para el contenedor del mapa */
#map-container {
    position: relative;
    margin-bottom: 2rem;
}

#map-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(135deg,
            rgba(32, 112, 91, 0.1) 0%,
            rgba(96, 22, 35, 0.1) 50%,
            rgba(126, 29, 55, 0.1) 100%);
    border-radius: 28px;
    z-index: -1;
}

/* Mejoras para los switches */
.form-check-input:checked {
    background-color: var(--color-verde-profundo);
    border-color: var(--color-verde-profundo);
    box-shadow: 0 0 0 0.2rem rgba(32, 112, 91, 0.25);
}

.form-check-input:focus {
    border-color: var(--color-verde-marino);
    box-shadow: 0 0 0 0.2rem rgba(32, 112, 91, 0.25);
}

/* AnimaciÃ³n para el preloader */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

#preloader img {
    animation: pulse 2s ease-in-out infinite;
}

/* Mejoras para las cards en mobile */
@media (max-width: 576px) {
    #total-cards-container .card-body {
        padding: 0.75rem;
    }

    #total-cards-container .card-title {
        font-size: 0.6rem;
    }

    #total-cards-container .card-text {
        font-size: 1.2rem;
    }
}

/* Estilo para el botÃ³n de centrar mapa */
#center-map-btn:hover {
    background-color: var(--color-magenta-oscuro);
    color: white;
    transform: scale(1.05);
    transition: all 0.2s ease;
}

/* Footer spacing */
.main-footer {
    margin-top: 3rem;
}

/* Estilo para elementos de tabla si se usan */
#table-container .card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

#table-container .card-header {
    background: linear-gradient(135deg, var(--color-burdeos-medio), 
var(--color-vino));
    color: white;
    font-weight: 600;
}

/* Mejoras para controles de Leaflet */
.leaflet-control-layers {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.leaflet-control-layers-expanded {
    padding: 10px;
}

/* Estilo para popups del mapa */
.leaflet-popup-content-wrapper {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content h6 {
    margin-bottom: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.leaflet-popup-content .table {
    font-size: 0.85rem;
    margin-bottom: 0;
}

.leaflet-popup-content .table th {
    background-color: rgba(32, 112, 91, 0.1);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* M
ejoras de accesibilidad y UX */

/* Focus states mejorados */
.form-check-input:focus,
.btn:focus,
#center-map-btn:focus {
    outline: 2px solid var(--color-verde-profundo);
    outline-offset: 2px;
}

/* Mejoras para dispositivos tÃ¡ctiles */
@media (hover: none) and (pointer: coarse) {
    #total-cards-container .card {
        transition: none;
    }

    #total-cards-container .card:active {
        transform: scale(0.98);
    }

    .form-check-input {
        min-width: 20px;
        min-height: 20px;
    }

    #center-map-btn {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Mejoras para modo oscuro del sistema */
@media (prefers-color-scheme: dark) {
    .leaflet-control-layers {
        background: rgba(40, 40, 40, 0.95);
        color: #ffffff;
    }

    .leaflet-popup-content-wrapper {
        background: rgba(40, 40, 40, 0.95);
        color: #ffffff;
    }
}

/* Animaciones suaves para elementos interactivos */
.form-check-input,
.btn,
.card {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mejoras para el texto del preloader */
#preloader h3 {
    font-weight: 700;
    color: var(--color-burdeos-oscuro);
    margin-bottom: 0.5rem;
}

#preloader p {
    color: var(--color-verde-profundo);
    font-weight: 500;
}

/* Estilo para elementos con estado loading */
.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--color-verde-profundo);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Mejoras para la barra de progreso */
.progress {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg,
            var(--color-verde-profundo) 0%,
            var(--color-verde-marino) 50%,
            var(--color-aqua-medio) 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
}

/ * Efectos adicionales para el footer */ .main-footer .container {
    position: relative;
    z-index: 2;
}

.main-footer::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg,
            transparent 0%,
            rgba(0, 0, 0, 0.1) 100%);
    pointer-events: none;
}

/* AnimaciÃ³n sutil para los elementos del footer */
.main-footer .col-md-4,
.main-footer .col-lg-4,
.main-footer .col-lg-8 {
    animation: fadeInUp 0.8s ease-out;
}

.main-footer .col-md-4:nth-child(2) {
    animation-delay: 0.2s;
}

.main-footer .col-md-4:nth-child(3) {
    animation-delay: 0.4s;
}

.main-footer .col-lg-4 {
    animation-delay: 0.6s;
}

/* Logo blanco en el footer */
.main-footer img {
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.main-footer img:hover {
    filter: brightness(0) invert(1) drop-shadow(0 0 8px rgba(255, 255, 
255, 0.3));
    transform: scale(1.05);
}

/* Responsive mejoras para el footer */
@media (max-width: 768px) {
    .main-footer {
        padding: 2rem 0 1.5rem 0;
        text-align: center;
    }

    .main-footer .social-icons {
        justify-content: center;
    }

    .main-footer h5 {
        margin-top: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .main-footer .col-md-4:first-child h5 {
        margin-top: 0;
    }
}

@media (max-width: 576px) {
    .main-footer {
        font-size: 0.85rem;
    }

    .main-footer h5 {
        font-size: 1rem;
    }

    .main-footer .social-icons a {
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }
}/* Estilos 
para el control de localizaciÃ³n */
.leaflet-control-locate {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
}

.leaflet-control-locate a {
    background-color: white;
    color: var(--color-verde-profundo);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.leaflet-control-locate a:hover {
    background-color: var(--color-verde-profundo);
    color: white;
    transform: scale(1.05);
}

.leaflet-control-locate.active a {
    background-color: var(--color-magenta-oscuro);
    color: white;
}

/* Mejoras para los controles de MapTiler */
.leaflet-control-layers-toggle {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Estilos para el popup de ubicaciÃ³n */
.leaflet-popup-content {
    font-family: var(--font-family);
}

.leaflet-popup-content h6 {
    color: var(--color-burdeos-medio);
    font-weight: 700;
    margin-bottom: 0.5rem;
}/* N
otificaciones del mapa */
.map-notification {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    animation: slideInRight 0.3s ease-out;
}

.map-notification.alert-warning {
    background: rgba(255, 243, 205, 0.95);
    border-color: rgba(255, 193, 7, 0.3);
    color: #856404;
}

.map-notification.alert-info {
    background: rgba(217, 237, 247, 0.95);
    border-color: rgba(13, 202, 240, 0.3);
    color: #055160;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mejoras para tiles con error */
.leaflet-tile-container img {
    transition: opacity 0.3s ease;
}

.leaflet-tile-container img[src*="data:image"] {
    opacity: 0;
}/* Estil
os mejorados para marker clusters */
    background-clip: padding-box;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

    width: 30px !important;
    height: 30px !important;
}

    width: 40px !important;
    height: 40px !important;
}

    width: 50px !important;
    height: 50px !important;
}

/* Mejoras para los marcadores individuales */
.leaflet-marker-icon {
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.leaflet-marker-icon:hover {
    transform: scale(1.1);
    z-index: 1000;
}

/* AnimaciÃ³n para cuando se abren los clusters */
    animation: spiderfy 0.3s ease-out;
}

@keyframes spiderfy {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mejoras para los popups de clusters */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-tip {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}/* 
Estilos personalizados para clusters de Leaflet */

/* Clusters pequeÃ±os (2-10 elementos) */
    background: linear-gradient(135deg, var(--color-verde-profundo) 
0%, var(--color-verde-marino) 100%);
    border: 3px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(32, 112, 91, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(32, 112, 91, 0.4);
    border-color: var(--color-amarillo-claro);
}

    background: transparent;
    color: white;
    font-weight: 700;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-family: var(--font-family);
}

/* Clusters medianos (10-100 elementos) */
    background: linear-gradient(135deg, var(--color-burdeos-medio) 0%, 
var(--color-vino) 100%);
    border: 3px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(96, 22, 35, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(96, 22, 35, 0.4);
    border-color: var(--color-amarillo-claro);
}

    background: transparent;
    color: white;
    font-weight: 700;
    font-size: 13px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-family: var(--font-family);
}

/* Clusters grandes (100+ elementos) */
    background: linear-gradient(135deg, var(--color-magenta-oscuro) 
0%, var(--color-magenta-vivo) 100%);
    border: 3px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(126, 29, 55, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(126, 29, 55, 0.4);
    border-color: var(--color-amarillo-claro);
}

    background: transparent;
    color: white;
    font-weight: 700;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-family: var(--font-family);
}

/* AnimaciÃ³n de apariciÃ³n de clusters */
    animation: clusterFadeIn 0.4s ease-out;
}

@keyframes clusterFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Estilos para clusters al hacer zoom */
    transition: all 0.3s ease-out;
}

/* Mejoras para el Ã¡rea de cobertura del cluster */
    background: rgba(32, 112, 91, 0.1);
    border: 2px dashed var(--color-verde-profundo);
    border-radius: 50%;
}

/* Estilos para marcadores individuales dentro de clusters */
.leaflet-marker-icon {
    transition: all 0.2s ease;
}

.leaflet-marker-icon:hover {
    transform: scale(1.1);
    z-index: 1000;
}

/* Mejoras para popups de clusters */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-tip {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* Clusters con efecto glassmorphism */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Responsive adjustments para clusters */
@media (max-width: 768px) {
        font-size: 11px;
    }
    
        border-width: 2px;
    }
}

/* Estados activos y focus para accesibilidad */
    outline: 2px solid var(--color-amarillo-claro);
    outline-offset: 2px;
}

/* Mejoras para clusters en modo oscuro */
@media (prefers-color-scheme: dark) {
        border-color: rgba(255, 255, 255, 0.7);
    }
}/* Est
ilos especÃ­ficos por tipo de capa energÃ©tica */

/* Ductos GLP */
    background: linear-gradient(135deg, #E66A54 0%, #E85D33 100%);
    border-color: rgba(230, 106, 84, 0.3);
}

/* Ductos de ImportaciÃ³n */
    background: linear-gradient(135deg, #E24849 0%, #B64836 100%);
    border-color: rgba(226, 72, 73, 0.3);
}

/* Ductos no SISTRANGAS */
    background: linear-gradient(135deg, #B64836 0%, #601805 100%);
    border-color: rgba(182, 72, 54, 0.3);
}

/* Ductos PetrolÃ­feros */
    background: linear-gradient(135deg, #E85D33 0%, #E85D14 100%);
    border-color: rgba(232, 93, 51, 0.3);
}

/* Ductos SISTRANGAS */
    background: linear-gradient(135deg, #E85D14 0%, #C69A04 100%);
    border-color: rgba(232, 93, 20, 0.3);
}

/* Proyectos ElÃ©ctricos */
    background: linear-gradient(135deg, #20705B 0%, #1F7A62 100%);
    border-color: rgba(32, 112, 91, 0.3);
}

/* Gas LP */
    background: linear-gradient(135deg, #C69A04 0%, #B88C23 100%);
    border-color: rgba(198, 154, 4, 0.3);
}

/* Gas Natural */
    background: linear-gradient(135deg, #225655 0%, #174D47 100%);
    border-color: rgba(34, 86, 85, 0.3);
}

/* LÃ­neas de TransmisiÃ³n */
    background: linear-gradient(135deg, #58152A 0%, #35031B 100%);
    border-color: rgba(88, 21, 42, 0.3);
}

/* Subestaciones ElÃ©ctricas */
    background: linear-gradient(135deg, #7E1D37 0%, #AC4651 100%);
    border-color: rgba(126, 29, 55, 0.3);
}

/* Efectos hover especÃ­ficos por capa */
.cluster-ductos-glp:hover { box-shadow: 0 6px 20px rgba(230, 106, 84, 
0.4); }
.cluster-ductos-de-importacion:hover { box-shadow: 0 6px 20px 
rgba(226, 72, 73, 0.4); }
.cluster-ductos-no-sistrangas:hover { box-shadow: 0 6px 20px rgba(182, 
72, 54, 0.4); }
.cluster-ductos-petroliferos:hover { box-shadow: 0 6px 20px rgba(232, 
93, 51, 0.4); }
.cluster-ductos-sistrangas:hover { box-shadow: 0 6px 20px rgba(232, 
93, 20, 0.4); }
.cluster-proyectos-electricos:hover { box-shadow: 0 6px 20px rgba(32, 
112, 91, 0.4); }
.cluster-gas-lp:hover { box-shadow: 0 6px 20px rgba(198, 154, 4, 0.4); 
}
.cluster-gas-natural:hover { box-shadow: 0 6px 20px rgba(34, 86, 85, 
0.4); }
.cluster-lineas-de-transmision:hover { box-shadow: 0 6px 20px rgba(88, 
21, 42, 0.4); }
.cluster-subestaciones-electricas:hover { box-shadow: 0 6px 20px 
rgba(126, 29, 55, 0.4); }

/* AnimaciÃ³n de pulsaciÃ³n para clusters activos */
@keyframes clusterPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

    animation: clusterPulse 2s ease-in-out infinite;
}

/* Mejoras para el spiderfy (cuando se expanden los clusters) */
    stroke: var(--color-verde-profundo);
    stroke-width: 2;
    stroke-opacity: 0.6;
}

.leaflet-cluster-spiderfy .leaflet-marker-icon {
    animation: spiderfyFadeIn 0.3s ease-out;
}

@keyframes spiderfyFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Indicador de carga para clusters grandes */
.cluster-loading {
    position: relative;
}

.cluster-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}/*
 Tooltips personalizados para clusters */
.cluster-tooltip {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.cluster-tooltip::before {
    border-top-color: rgba(0, 0, 0, 0.8);
}

/* Mejoras para la cobertura del cluster */
.leaflet-cluster-cover-background {
    background: rgba(32, 112, 91, 0.1);
    border: 2px dashed var(--color-verde-profundo);
    border-radius: 50%;
    animation: coveragePulse 2s ease-in-out infinite;
}

@keyframes coveragePulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.02);
    }
}

/* Estilos para clusters en diferentes estados de zoom */
    transition: all 0.25s ease-out;
}

/* Mejoras para clusters en pantallas de alta densidad */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
        font-weight: 600;
        text-rendering: optimizeLegibility;
    }
}

/* Estados de accesibilidad mejorados */
    outline: 3px solid var(--color-amarillo-claro);
    outline-offset: 3px;
}

/* AnimaciÃ³n suave para cambios de tamaÃ±o de cluster */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mejoras para el contraste en modo de alto contraste */
@media (prefers-contrast: high) {
        border-width: 4px;
        border-color: white;
    }
    
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    }
}/* Est
ilos para centrar nÃºmeros en clusters */
    background-clip: padding-box;
    border-radius: 50%;
}

    width: 100%;
    height: 100%;
    border-radius: 50%;
    font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

    line-height: 1;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* C
ORRECCIÃ“N: Centrar nÃºmeros en clusters de Leaflet MarkerCluster */

/* Sobrescribir estilos por defecto de MarkerCluster */
    background-clip: padding-box !important;
    border-radius: 50% !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important;
    cursor: pointer !important; /* Asegurar que se vea clickeable */
    pointer-events: auto !important; /* Asegurar que reciba eventos de 
click */
}

    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    font-family: var(--font-family) !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    color: white !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7) !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    pointer-events: none !important; /* Evitar interferencia con 
eventos de click */
}

    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    font-size: inherit !important;
    pointer-events: none !important; /* Evitar que el texto interfiera 
con clicks */
}

/* TamaÃ±os y colores especÃ­ficos con colores institucionales */
    background-color: var(--color-verde-profundo) !important;
    width: 35px !important;
    height: 35px !important;
}

    background-color: var(--color-verde-profundo) !important;
    width: 35px !important;
    height: 35px !important;
    font-size: 12px !important;
}

    background-color: var(--color-burdeos-medio) !important;
    width: 42px !important;
    height: 42px !important;
}

    background-color: var(--color-burdeos-medio) !important;
    width: 42px !important;
    height: 42px !important;
    font-size: 13px !important;
}

    background-color: var(--color-magenta-oscuro) !important;
    width: 50px !important;
    height: 50px !important;
}

    background-color: var(--color-magenta-oscuro) !important;
    width: 50px !important;
    height: 50px !important;
    font-size: 14px !important;
}

/* Efectos hover sutiles para clusters (sin interferir con clicks) */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4) !important;
    border-width: 3px !important;
    transition: box-shadow 0.2s ease, border-width 0.2s ease 
!important;
}

/* AnimaciÃ³n suave solo para sombras */
    transition: box-shadow 0.2s ease, border-width 0.2s ease 
!important;
}

/* Clusters especÃ­ficos por capa con colores diferenciados */
    background-color: var(--color-rojo-coral) !important;
}

    background-color: var(--color-rojo-vivo) !important;
}

    background-color: var(--color-mostaza-amarillo) !important;
}

    background-color: var(--color-verde-oscuro) !important;
}

    background-color: var(--color-vino) !important;
}

    background-color: var(--color-magenta-oscuro) !important;
}


/* ===== ESTILOS MEJORADOS PARA POPUPS Y CONTROLES DE LEAFLET ===== */

/* Popups del mapa - Diseño elegante con bordes afinados */
.leaflet-popup-content-wrapper,
.leaflet-popup-content-wrapper * {
    background: white !important;
    background-color: white !important;
}

.leaflet-popup-content-wrapper {
    background: white !important;
    background-color: white !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(32, 112, 91, 0.3) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 
                0 2px 8px rgba(32, 112, 91, 0.08) !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    padding: 20px !important;
    font-family: var(--font-family) !important;
    line-height: 1.5 !important;
    max-width: 350px !important;
    background: white !important;
    background-color: white !important;
    color: var(--color-burdeos-oscuro) !important;
}

/* Encabezado del popup */
.leaflet-popup-content h6 {
    margin: 0 0 15px 0 !important;
    padding: 0 0 10px 0 !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-bottom: 2px solid var(--color-verde-profundo) !important;
    color: var(--color-burdeos-oscuro) !important;
}

/* Tabla dentro del popup */
.leaflet-popup-content .table-responsive {
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.leaflet-popup-content .table {
    margin-bottom: 0 !important;
    font-size: 0.9rem !important;
    background: white !important;
}

.leaflet-popup-content .table th {
    background: linear-gradient(135deg, var(--color-verde-profundo), var(--color-verde-marino)) !important;
    color: white !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    padding: 12px 10px !important;
    border: none !important;
}

.leaflet-popup-content .table td {
    padding: 10px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    color: var(--color-burdeos-oscuro) !important;
    font-weight: 500 !important;
}

.leaflet-popup-content .table tr:nth-child(even) {
    background-color: rgba(32, 112, 91, 0.03) !important;
}

.leaflet-popup-content .table tr:hover {
    background-color: rgba(32, 112, 91, 0.08) !important;
    transition: background-color 0.2s ease !important;
}

/* Punta del popup - Triangulo afinado */
.leaflet-popup-tip {
    background: white !important;
    background-color: white !important;
    border: none !important;
    box-shadow: -1px -1px 2px rgba(32, 112, 91, 0.05) !important;
    width: 14px !important;
    height: 14px !important;
    padding: 1px !important;
    margin: -8px auto 0 !important;
    transform: rotate(45deg) !important;
    border-top: 1px solid rgba(32, 112, 91, 0.3) !important;
    border-left: 1px solid rgba(32, 112, 91, 0.3) !important;
}

/* Botón cerrar del popup - Mejorado */
.leaflet-popup-close-button {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 16px !important;
    font-weight: bold !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: rgba(220, 53, 69, 0.8) !important;
    backdrop-filter: blur(10px) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    transition: all 0.3s ease !important;
    top: 8px !important;
    right: 8px !important;
    width: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    text-decoration: none !important;
    line-height: 1 !important;
}

.leaflet-popup-close-button:hover {
    background: rgba(220, 53, 69, 1) !important;
    color: white !important;
    transform: scale(1.1) rotate(90deg) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.4) !important;
}

.leaflet-popup-close-button:active {
    transform: scale(0.95) !important;
}

/* Control de capas - Diseño elegante */
.leaflet-control-layers {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15) !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.leaflet-control-layers-toggle {
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 12px !important;
    width: 44px !important;
    height: 44px !important;
    background-image: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
}

.leaflet-control-layers-toggle::before {
    content: "⚏" !important;
    font-size: 20px !important;
    color: var(--color-verde-profundo) !important;
    font-weight: bold !important;
}

.leaflet-control-layers-toggle:hover {
    background: var(--color-verde-profundo) !important;
    transform: scale(1.05) !important;
}

.leaflet-control-layers-toggle:hover::before {
    color: white !important;
}

.leaflet-control-layers-expanded {
    padding: 20px !important;
    min-width: 280px !important;
}

/* Secciones del control de capas */
.leaflet-control-layers-base,
.leaflet-control-layers-overlays {
    margin-bottom: 15px !important;
}

.leaflet-control-layers-separator {
    height: 2px !important;
    background: linear-gradient(90deg, transparent, var(--color-verde-profundo), transparent) !important;
    border: none !important;
    margin: 15px 0 !important;
}

/* Labels de las capas */
.leaflet-control-layers label {
    font-family: var(--font-family) !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    color: var(--color-burdeos-oscuro) !important;
    padding: 8px 12px !important;
    margin: 4px 0 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    background: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.leaflet-control-layers label:hover {
    background: rgba(32, 112, 91, 0.1) !important;
    border-color: var(--color-verde-profundo) !important;
    transform: translateX(4px) !important;
}

/* Inputs de radio y checkbox */
.leaflet-control-layers input[type="radio"],
.leaflet-control-layers input[type="checkbox"] {
    margin-right: 10px !important;
    transform: scale(1.2) !important;
    accent-color: var(--color-verde-profundo) !important;
}

/* Control de zoom - Mejorado */
.leaflet-control-zoom {
    border: none !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
}

.leaflet-control-zoom a {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    color: var(--color-verde-profundo) !important;
    font-weight: bold !important;
    font-size: 18px !important;
    transition: all 0.3s ease !important;
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.leaflet-control-zoom a:hover {
    background: var(--color-verde-profundo) !important;
    color: white !important;
    transform: scale(1.05) !important;
}

.leaflet-control-zoom a:first-child {
    border-radius: 12px 12px 0 0 !important;
}

.leaflet-control-zoom a:last-child {
    border-radius: 0 0 12px 12px !important;
}

/* Atribución - Mejorada */
.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 8px 8px 0 0 !important;
    padding: 6px 12px !important;
    font-size: 0.75rem !important;
    color: var(--color-burdeos-oscuro) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-bottom: none !important;
}

.leaflet-control-attribution a {
    color: var(--color-verde-profundo) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}

.leaflet-control-attribution a:hover {
    color: var(--color-burdeos-medio) !important;
    text-decoration: underline !important;
}

/* Animaciones suaves para todos los controles */
.leaflet-control {
    animation: fadeInUp 0.5s ease-out !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .leaflet-popup-content {
        max-width: 280px !important;
        padding: 15px !important;
    }
    
    .leaflet-control-layers-expanded {
        min-width: 240px !important;
        padding: 15px !important;
    }
    
    .leaflet-popup-content .table th,
    .leaflet-popup-content .table td {
        padding: 8px 6px !important;
        font-size: 0.8rem !important;
    }
}/* 
===== ESTILOS ADICIONALES PARA POPUPS MÁS ELEGANTES ===== */

/* Popup con efecto de entrada suave */
.leaflet-popup {
    animation: popupSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@keyframes popupSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Contenido del popup con mejor espaciado */
.leaflet-popup-content-wrapper {
    max-width: 400px !important;
    min-width: 280px !important;
}

/* Encabezado del popup con icono */
.leaflet-popup-content h6 {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: linear-gradient(135deg, var(--color-verde-profundo), var(--color-verde-marino)) !important;
    color: white !important;
    margin: -20px -20px 15px -20px !important;
    padding: 15px 20px !important;
    border-radius: 16px 16px 0 0 !important;
    border-bottom: none !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Icono en el encabezado del popup */
.leaflet-popup-content h6::before {
    content: "📍" !important;
    font-size: 1.2rem !important;
    filter: brightness(1.2) !important;
}

/* Tabla del popup con mejor diseño */
.leaflet-popup-content .table-responsive {
    margin: 0 -5px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(32, 112, 91, 0.1) !important;
}

.leaflet-popup-content .table {
    border-radius: 12px !important;
    overflow: hidden !important;
}

/* Filas de la tabla con mejor contraste */
.leaflet-popup-content .table th {
    background: var(--color-verde-profundo) !important;
    color: white !important;
    font-size: 0.75rem !important;
    padding: 8px 12px !important;
    font-weight: 600 !important;
    text-align: left !important;
    width: 40% !important;
}

.leaflet-popup-content .table td {
    background: white !important;
    padding: 8px 12px !important;
    font-weight: 500 !important;
    color: var(--color-burdeos-oscuro) !important;
    border-left: 3px solid var(--color-verde-profundo) !important;
}

/* Alternancia de colores en filas */
.leaflet-popup-content .table tr:nth-child(even) td {
    background: rgba(32, 112, 91, 0.02) !important;
}

/* Efecto hover en filas */
.leaflet-popup-content .table tr:hover td {
    background: rgba(32, 112, 91, 0.05) !important;
    transform: translateX(2px) !important;
    transition: all 0.2s ease !important;
}

/* Valores especiales en la tabla */
.leaflet-popup-content .table td[data-value*="Operativo"],
.leaflet-popup-content .table td:contains("Operativo") {
    color: var(--color-verde-profundo) !important;
    font-weight: 600 !important;
}

.leaflet-popup-content .table td[data-value*="Mantenimiento"],
.leaflet-popup-content .table td:contains("Mantenimiento") {
    color: var(--color-mostaza-amarillo) !important;
    font-weight: 600 !important;
}

.leaflet-popup-content .table td[data-value*="Fuera"],
.leaflet-popup-content .table td:contains("Fuera") {
    color: var(--color-rojo-vivo) !important;
    font-weight: 600 !important;
}

/* Footer del popup con información adicional */
.leaflet-popup-content::after {
    content: "" !important;
    display: block !important;
    width: 100% !important;
    height: 2px !important;
    background: linear-gradient(90deg, transparent, var(--color-verde-profundo), transparent) !important;
    margin: 15px 0 5px 0 !important;
}

/* Botón cerrar mejorado */
.leaflet-popup-close-button {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.leaflet-popup-close-button:hover {
    background: var(--color-rojo-vivo) !important;
    border-color: var(--color-rojo-vivo) !important;
    box-shadow: 0 4px 12px rgba(226, 72, 73, 0.3) !important;
}

/* Punta del popup con mejor integración */
.leaflet-popup-tip {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(15px) !important;
}

/* Popup para diferentes tipos de capas */
.leaflet-popup[data-layer*="ductos"] .leaflet-popup-content h6 {
    background: linear-gradient(135deg, var(--color-rojo-coral), var(--color-naranja-fuerte)) !important;
}

.leaflet-popup[data-layer*="electr"] .leaflet-popup-content h6 {
    background: linear-gradient(135deg, var(--color-verde-profundo), var(--color-verde-marino)) !important;
}

.leaflet-popup[data-layer*="gas"] .leaflet-popup-content h6 {
    background: linear-gradient(135deg, var(--color-mostaza-amarillo), var(--color-amarillo-suave)) !important;
    color: var(--color-burdeos-oscuro) !important;
}

/* Scrollbar personalizada para popups largos */
.leaflet-popup-content::-webkit-scrollbar {
    width: 6px !important;
}

.leaflet-popup-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05) !important;
    border-radius: 3px !important;
}

.leaflet-popup-content::-webkit-scrollbar-thumb {
    background: var(--color-verde-profundo) !important;
    border-radius: 3px !important;
}

.leaflet-popup-content::-webkit-scrollbar-thumb:hover {
    background: var(--color-verde-marino) !important;
}

/* Responsive para popups en móviles */
@media (max-width: 768px) {
    .leaflet-popup-content-wrapper {
        min-width: 260px !important;
        max-width: 320px !important;
    }
    
    .leaflet-popup-content {
        padding: 15px !important;
    }
    
    .leaflet-popup-content h6 {
        margin: -15px -15px 12px -15px !important;
        padding: 12px 15px !important;
        font-size: 1rem !important;
    }
    
    .leaflet-popup-content .table th,
    .leaflet-popup-content .table td {
        padding: 6px 8px !important;
        font-size: 0.8rem !important;
    }
}

/* Efecto de sombra dinámica según la posición */
.leaflet-popup-content-wrapper {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 
                0 4px 16px rgba(32, 112, 91, 0.1) !important;
}

/* Indicador de tipo de infraestructura */
.leaflet-popup-content h6::after {
    content: "" !important;
    position: absolute !important;
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 8px !important;
    height: 8px !important;
    background: rgba(255, 255, 255, 0.8) !important;
    border-radius: 50% !important;
    animation: pulse 2s infinite !important;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 0.7;
        transform: translateY(-50%) scale(1.2);
    }
}/* ===== FO
RZAR FONDO BLANCO EN TODOS LOS POPUPS ===== */

/* Forzar fondo blanco en toda la estructura del popup */
.leaflet-popup,
.leaflet-popup *,
.leaflet-popup-content-wrapper,
.leaflet-popup-content,
.leaflet-popup-tip,
.leaflet-popup-tip-container {
    background: white !important;
    background-color: white !important;
}

/* Asegurar que el contenido tenga fondo blanco */
.leaflet-popup-content .table-responsive,
.leaflet-popup-content .table,
.leaflet-popup-content .table tbody,
.leaflet-popup-content .table tbody tr,
.leaflet-popup-content .table tbody tr td {
    background: white !important;
    background-color: white !important;
}

/* Solo el header de la tabla debe tener color */
.leaflet-popup-content .table th {
    background: var(--color-verde-profundo) !important;
    background-color: var(--color-verde-profundo) !important;
    color: white !important;
}

/* Filas alternas con fondo muy sutil */
.leaflet-popup-content .table tr:nth-child(even) td {
    background: #f8f9fa !important;
    background-color: #f8f9fa !important;
}

/* Hover con fondo muy claro */
.leaflet-popup-content .table tr:hover td {
    background: #e8f5e8 !important;
    background-color: #e8f5e8 !important;
}

/* Encabezado del popup - solo este debe tener color */
.leaflet-popup-content h6 {
    background: linear-gradient(135deg, var(--color-verde-profundo), var(--color-verde-marino)) !important;
    background-color: var(--color-verde-profundo) !important;
    color: white !important;
}

/* Resto del contenido debe ser blanco */
.leaflet-popup-content p,
.leaflet-popup-content div:not(h6):not(.table):not(.table-responsive) {
    background: white !important;
    background-color: white !important;
    color: var(--color-burdeos-oscuro) !important;
}

/* Botón cerrar integrado con el diseño */
.leaflet-popup-close-button {
    background: rgba(220, 53, 69, 0.8) !important;
    background-color: rgba(220, 53, 69, 0.8) !important;
    color: white !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
}

/* Sobrescribir cualquier estilo oscuro que pueda venir del tema */
.leaflet-container .leaflet-popup-content-wrapper {
    background: white !important;
    background-color: white !important;
}

.leaflet-container .leaflet-popup-content {
    background: white !important;
    background-color: white !important;
}

.leaflet-container .leaflet-popup-tip {
    background: white !important;
    background-color: white !important;
}/* ===== C
ORRECCIÓN ADICIONAL PARA LA PUNTA DEL POPUP ===== */

/* Contenedor de la punta del popup */
.leaflet-popup-tip-container {
    background: transparent !important;
    width: 20px !important;
    height: 10px !important;
    position: relative !important;
    margin: 0 auto !important;
    overflow: visible !important;
}

/* Punta del popup - Triángulo perfecto */
.leaflet-popup-tip {
    background: white !important;
    width: 14px !important;
    height: 14px !important;
    position: absolute !important;
    left: 50% !important;
    margin-left: -7px !important;
    transform: rotate(45deg) !important;
    border: 1px solid rgba(32, 112, 91, 0.2) !important;
    border-bottom: none !important;
    border-right: none !important;
    box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.05) !important;
}

/* Asegurar que no haya interferencia con otros estilos */
.leaflet-popup-content-wrapper .leaflet-popup-tip {
    background: white !important;
    background-color: white !important;
}

/* Posicionamiento correcto del popup completo */
.leaflet-popup {
    margin-bottom: 20px !important;
}/* Hover p
ara el botón de centrar mapa */
#center-map-btn:hover {
    background: var(--color-verde-profundo) !important;
    color: white !important;
    transform: scale(1.05) !important;
    border-color: var(--color-verde-profundo) !important;
    box-shadow: 0 6px 20px rgba(32, 112, 91, 0.3) !important;
}

/* Focus para accesibilidad */
#center-map-btn:focus {
    outline: 2px solid var(--color-verde-profundo);
    outline-offset: 2px;
}

/* Asegurar que el botón esté por encima de otros elementos */
#center-map-btn {
    z-index: 1000 !important;
}/* 
===== BOTÓN CERRAR POPUP - ESTILO FINAL ===== */

/* Sobrescribir cualquier estilo conflictivo del botón cerrar */
.leaflet-container .leaflet-popup-close-button {
    background: rgba(220, 53, 69, 0.85) !important;
    color: white !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 50% !important;
    width: 28px !important;
    height: 28px !important;
    top: 8px !important;
    right: 8px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-align: center !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: blur(8px) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.leaflet-container .leaflet-popup-close-button:hover {
    background: rgba(220, 53, 69, 1) !important;
    border-color: rgba(255, 255, 255, 0.7) !important;
    transform: scale(1.1) rotate(90deg) !important;
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.5) !important;
}

.leaflet-container .leaflet-popup-close-button:active {
    transform: scale(0.9) rotate(90deg) !important;
    transition: transform 0.1s ease !important;
}

/* Asegurar que el símbolo × se vea centrado */
.leaflet-container .leaflet-popup-close-button::before {
    content: "×" !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    line-height: 24px !important;
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 700 !important;
}

/* Eliminar el contenido por defecto */
.leaflet-container .leaflet-popup-close-button {
    text-indent: -9999px !important;
    overflow: hidden !important;
}

/* Restaurar el contenido con el pseudo-elemento */
.leaflet-container .leaflet-popup-close-button::before {
    text-indent: 0 !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}