img {
    width: 350px !important;
}
.contentPopupMap {
    position: absolute;
    left: 0px;
    top: 0px;
    z-index: 99999;
    background-color: #FFF;
    width: 400px;
    height: 800px;
    display: none;
    padding:25px;
}
/*.contentPopupMap div {
    font-family: "Noto sans", Sans-serif;
    font-size: 18px;
}
.contentPopupMap .nom {
    font-size: 20px !important;
    font-weight: bold;
    text-align: center;
    margin-top: 20px;
    margin-bottom:20px;
}
.contentPopupMap .foto {
    margin-bottom:20px; 
    margin-top:20px; 
}
.descripcio {
    font-size: 15px !important;
    margin-top:20px;
}*/
.contentPopupMap::after {
    content: '✕';
    position: absolute;
    top: 15px;
    right: 20px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contentPopupMap:hover::after {
    background: rgba(255, 255, 255, 1);
    color: #333;
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Alternativa con fondo rojo al hover */
.contentPopupMap::after:hover {
    background: #ff4757;
    color: white;
    border-color: #ff4757;
}

html{
    overflow: hidden;
}
.contentPopupMap {
    /*background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    max-width: 420px;
    width: 100%;
    position: relative;*/
    margin-left: 10px !important;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.08);
    max-height: 90vh;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: auto;
    top: 50%;
    transform: translateY(-50%);
}

.fitxa {
    height: 5px;
    background: linear-gradient(135deg, #8B4513 0%, #D2691E 50%, #CD853F 100%);
    position: relative;
    max-width: 90%;
    margin-top: 4px;
}

.fitxa::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.nom {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    padding: 20px 24px 12px;
    line-height: 1.3;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.coordenades {
    font-size: 13px;
    color: #7f8c8d;
    padding: 0 24px 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: #f8f9fa;
    margin: 0 24px;
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid #D2691E;
    display: flex;
    align-items: center;
}

.coordenades::before {
    content: "📍";
    margin-right: 8px;
    font-size: 14px;
}

.enllac {
    padding: 16px 24px 12px;
    font-size: 14px;
    color: #5d6d7e;
}

.enllac a {
    color: #D2691E;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 4px 8px;
    border-radius: 4px;
}

.enllac a:hover {
    background: rgba(210, 105, 30, 0.1);
    transform: translateY(-1px);
}

.enllac a::after {
    content: "↗";
    margin-left: 4px;
    font-size: 12px;
    opacity: 0.7;
}

.descripcio {
    padding: 12px 24px 20px;
    font-size: 15px;
    line-height: 1.6;
    color: #34495e;
    text-align: justify;
    background: linear-gradient(to bottom, rgba(248, 249, 250, 0.3), transparent);
}

.foto {
    background: #f8f9fa;
    padding: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    text-align: center;
}

.foto img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.foto img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

/* Efectos adicionales */
.contentPopupMap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
}

/* Responsive */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .contentPopupMap {
        max-width: 100%;
        margin: 0;
        border-radius: 12px;
    }
    
    .nom {
        font-size: 18px;
        padding: 16px 20px 10px;
    }
    
    .coordenades,
    .enllac,
    .descripcio {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .foto {
        padding: 16px;
    }
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .fitxa::after,
    .foto img {
        animation: none;
        transition: none;
    }
}

/* Tema oscuro */
@media (prefers-color-scheme: dark) {
    .contentPopupMap {
        background: #2c3e50;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .nom {
        color: #ecf0f1;
        -webkit-text-fill-color: #ecf0f1;
    }
    
    .coordenades {
        background: #34495e;
        color: #bdc3c7;
    }
    
    .descripcio {
        color: #bdc3c7;
        background: linear-gradient(to bottom, rgba(52, 73, 94, 0.3), transparent);
    }
    
    .foto {
        background: #34495e;
        border-color: rgba(255, 255, 255, 0.1);
    }
}
.maps-link {
    display: inline-block;
    margin-left: 10px;
    padding: 3px 8px;
    background-color: #4285f4;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 12px;
}
.maps-link:hover {
    background-color: #3367d6;
    color: white;
}

/* Estilos para el control de capas personalizado */

/* Capas base intercambiables - estilo de enlace */
.panel ul li.layer label.capa-base {
    cursor: pointer !important;
    color: #0066cc !important;
    transition: all 0.2s ease;
    padding: 2px 0;
    display: inline-block;
}

.panel ul li.layer label.capa-base:hover {
    color: #004499 !important;
    text-decoration: underline;
}

/* Capa activa - en negrita */
.panel ul li.layer label.capa-base.activa {
    font-weight: bold !important;
    color: #003366 !important;
}

/* Capas fijas - no interactivas */
.panel ul li.layer label.capa-fija {
    cursor: default !important;
    color: #666 !important;
    opacity: 0.8;
    pointer-events: none;
}

/* Barraques - título principal */
.panel ul li.layer label.capa-barraques {
    cursor: default !important;
    color: #333 !important;
    font-weight: bold !important;
}

/* Items de Barraques - clickeables */
.panel ul li.layer label.capa-barraques img {
    cursor: pointer !important;
    margin-right: 5px;
    vertical-align: middle;
    transition: transform 0.15s ease;
}

.panel ul li.layer label.capa-barraques img:hover {
    transform: scale(1.1);
}

.panel ul li.layer label.capa-barraques span.item-barraca {
    cursor: pointer !important;
    color: #0066cc !important;
    transition: color 0.2s ease;
}

.panel ul li.layer label.capa-barraques span.item-barraca:hover {
    color: #004499 !important;
    text-decoration: underline;
}

/* Ocultar checkboxes */
.panel ul li.layer input[type="checkbox"].oculto {
    display: none !important;
}

/* Animación suave para cambios de capa */
.panel ul li.layer {
    transition: opacity 0.2s ease;
}

/* Separador visual entre tipos de capas */
.panel ul li.layer.separador {
    border-bottom: 1px solid #ddd;
    margin-bottom: 5px;
    padding-bottom: 5px;
}
/* Deshabilitar hover del layer-switcher */
.layer-switcher:hover .panel {
    display: none !important;
}

.layer-switcher.shown .panel {
    display: block !important;
}

/* Asegurar que el panel solo se muestre cuando tiene la clase 'shown' */
.layer-switcher .panel {
    display: none !important;
}

.layer-switcher.shown .panel {
    display: block !important;
}