/* Pinacoteca360 - mapa integrado, exclusivo de esta sección. */
#p360map, #p360map *{box-sizing:border-box}
#p360map{display:flex;flex-direction:column;width:100%;height:640px;min-height:240px;position:relative;margin:0;padding:0!important;border:1px solid #DECDB5;border-radius:11px;overflow:hidden;background:#F7EEDC;color:#292423;font:normal 15px/1.4 Arial,Helvetica,sans-serif;text-align:left}
#p360map .p360map-visualmente-oculto{position:absolute!important;width:1px!important;height:1px!important;clip-path:inset(50%)!important;overflow:hidden!important;white-space:nowrap!important}
#p360map .p360map-barra{display:flex;flex:0 0 auto;align-items:center;gap:6px;min-height:64px;padding:10px clamp(9px,2vw,18px);margin:0!important;background:#F7EEDC;border-bottom:1px solid #D8C5A9;z-index:400;position:relative;width:100%;max-width:none!important}
#p360map .p360map-lupa{display:flex;align-items:center;justify-content:center;color:#6B1F2A;flex:none}
#p360map .p360map-lupa svg{width:23px;height:23px;display:block}
#p360map input[type=search]{height:44px;min-width:0;max-width:none!important;width:100%!important;flex:1;box-sizing:border-box;background:#fff!important;color:#302B29!important;border:1px solid #D4BEA7!important;border-radius:999px!important;padding:0 15px!important;font:normal 16px Arial,Helvetica,sans-serif!important;box-shadow:none!important;appearance:auto!important}
#p360map input[type=search]:focus{outline:2px solid #6B1F2A!important;outline-offset:1px}
#p360map button{display:grid;place-items:center;flex:none;width:40px;height:40px;padding:0!important;border-radius:50%;border:1px solid transparent;cursor:pointer;font:normal 25px Arial,Helvetica,sans-serif;line-height:1;background:#6B1F2A;color:#FFFDF8}
#p360map button.p360map-buscar .p360-search-icon{display:block!important;width:21px!important;height:21px!important;stroke:currentColor!important;fill:none!important}
#p360map button:focus-visible{outline:3px solid #BA867F;outline-offset:2px}
#p360map button:hover{background:#501720}
#p360map button#p360map-localizar{background:#E9D9BF;color:#6B1F2A;border-color:#CBB397}
#p360map button#p360map-localizar:hover{background:#DAC4A7}
#p360map .p360map-superficie{position:relative;flex:1;min-height:0;width:100%;overflow:hidden;background:#DCDDD0}
#p360map #p360map-lienzo{position:absolute;inset:0;z-index:1;width:100%;height:100%;background:#DBE1D8}
#p360map .leaflet-container{font-family:Arial,Helvetica,sans-serif;text-align:left}
#p360map .p360map-estado{position:absolute;left:12px;bottom:12px;z-index:450;max-width:min(90%,500px);padding:8px 12px;border-radius:7px;color:#4C2129;background:rgba(255,253,248,.96);border:1px solid #D8C5A9;box-shadow:0 2px 9px #4D302522;font-size:12px;line-height:1.45;pointer-events:none}
#p360map .p360map-estado[hidden],#p360map .p360map-panel[hidden]{display:none!important}
#p360map .p360map-panel{position:absolute;right:12px;top:12px;bottom:12px;width:min(430px,calc(100% - 24px));z-index:850;overflow:auto;overscroll-behavior:contain;background:#FFFDF8;box-shadow:0 7px 28px #40272133;border:1px solid #DCC8B7;border-radius:11px;padding:18px 15px 23px;color:#2B2522}
#p360map .p360map-cerrar{position:sticky;top:0;float:right;z-index:2;width:34px!important;height:34px!important;font-size:24px!important;line-height:1!important}
#p360map .p360map-imagen{margin:0 0 13px;background:#E9D9BF;border-radius:8px;overflow:hidden}
#p360map .p360map-imagen img{display:block;width:100%;height:clamp(120px,23vh,230px);object-fit:cover}
#p360map .p360map-imagen figcaption{padding:6px 8px;font-size:10px;color:#62554E;line-height:1.35}
#p360map .p360map-categoria{font-size:11px;letter-spacing:.09em;text-transform:uppercase;font-weight:700;color:#8B5A61;margin:6px 0}
#p360map .p360map-panel h2{font-size:21px!important;line-height:1.25!important;margin:7px 40px 8px 0!important;color:#6B1F2A!important;font-weight:700!important}
#p360map .p360map-panel h3{font-size:16px!important;color:#6B1F2A!important;margin:23px 0 8px!important;padding-top:12px;border-top:1px solid #E7D9C9}
#p360map .p360map-panel p{font-size:13px;color:#4C443E;line-height:1.5;margin:7px 0}
#p360map .p360map-panel a{color:#6B1F2A;text-decoration:underline}
#p360map .p360map-work{display:flex;gap:10px;padding:8px 0;border-bottom:1px solid #EFE1D0;align-items:center;text-decoration:none!important;color:#3A2829!important}
#p360map .p360map-work img,#p360map .p360map-obra-vacia{width:62px;height:62px;flex:0 0 62px;object-fit:cover;background:#EFE5D5;border-radius:5px;display:grid;place-items:center;color:#987A68}
#p360map .p360map-work strong{display:block;color:#6B1F2A;font-size:13px;line-height:1.35}
#p360map .p360map-work small{display:block;color:#71645C;font-size:11px;line-height:1.4;margin-top:4px}
#p360map .p360map-mas{width:100%!important;height:auto!important;border-radius:7px!important;margin-top:12px;padding:9px 12px!important;font-size:13px!important;line-height:1.4!important}
/* Marcadores de obras: anillo beige y cifra corinto; interior completamente transparente.
   Tono beige tostado para conservar contraste sobre teselas claras. */
#p360map .p360map-pin{
    --p360map-color-obras:#B08B60;
    width:36px;
    height:36px;
    display:grid;
    place-items:center;
    border:3px solid var(--p360map-color-obras) !important;
    border-radius:50%;
    background:transparent !important;
    background-image:none !important;
    box-shadow:none !important;
    color:#6B1F2A !important;
    font-size:14px;
    font-weight:900;
    line-height:1;
    text-shadow:0 0 2px rgba(255,255,255,.95);
}
/* Agrupaciones de varias ubicaciones: anillo corinto y cifra corinto.
   El círculo del complemento MarkerCluster tiene un div interior:
   hay que dejar transparentes AMBOS niveles, no solo el exterior. */
#p360map .marker-cluster-small,
#p360map .marker-cluster-medium,
#p360map .marker-cluster-large{
    display:grid !important;
    place-items:center !important;
    padding:0 !important;
    border:3px solid #6B1F2A !important;
    border-radius:50% !important;
    background:transparent !important;
    background-image:none !important;
    box-shadow:none !important;
    color:#6B1F2A !important;
}
#p360map .marker-cluster-small > div,
#p360map .marker-cluster-medium > div,
#p360map .marker-cluster-large > div{
    width:100% !important;
    height:100% !important;
    margin:0 !important;
    padding:0 !important;
    display:grid !important;
    place-items:center !important;
    border:0 !important;
    border-radius:50% !important;
    background:transparent !important;
    background-image:none !important;
    box-shadow:none !important;
    color:#6B1F2A !important;
    font-size:15px;
    font-weight:900 !important;
    line-height:1 !important;
    text-shadow:0 0 2px rgba(255,255,255,.95);
}
#p360map .marker-cluster-small > div > span,
#p360map .marker-cluster-medium > div > span,
#p360map .marker-cluster-large > div > span{
    color:#6B1F2A !important;
    font-weight:900 !important;
    line-height:1 !important;
    background:transparent !important;
}
/* Sin tocar la cabecera ni los menús actuales; solo el área interior del Mapa. */
body:has(#p360map) .p360m-main{padding-top:0!important;padding-left:0!important;padding-right:0!important}
body:has(#p360map) .p360-cuerpo-publico .p360-publico{width:100%!important;max-width:none!important}
@media(max-width:720px){
 #p360map{border-radius:0;margin:0!important;border-left:0;border-right:0}
 #p360map .p360map-barra{padding:7px 8px;min-height:58px;gap:5px}
 #p360map .p360map-lupa{display:none}
 #p360map input[type=search]{height:42px;font-size:15px!important;padding:0 11px!important}
 #p360map button{width:42px;height:42px;font-size:23px}
 #p360map .p360map-panel{top:auto;bottom:0;right:0;left:0;width:100%;height:min(65%,540px);border-radius:13px 13px 0 0;padding:14px 13px 19px}
 #p360map .p360map-estado{bottom:9px;left:9px;max-width:calc(100% - 18px)}
}
/* Buscador unificado PC/móvil: barra compacta y conmutador de vistas. */
#p360map .p360map-barra{min-height:52px;padding:5px 8px;gap:5px}
#p360map input[type=search]{height:38px!important;font-size:14px!important;padding:0 11px!important;min-width:70px}
#p360map .p360map-barra button{width:36px;height:36px;min-width:36px;font-size:21px}
#p360map .p360map-vistas{display:flex;align-items:center;gap:2px;border-radius:9px;border:1px solid #d3bda1;background:#ebdfcc;padding:2px;flex-shrink:0}
#p360map .p360map-vistas button.p360map-vista{width:32px;height:32px;min-width:32px;border-radius:7px;background:transparent;color:#6B1F2A;border:0}
#p360map .p360map-vistas button.p360map-vista svg{width:19px;height:19px}
#p360map .p360map-vistas button.p360map-vista.p360map-elegida{background:#6B1F2A;color:white}
#p360map .p360map-superficie[hidden],#p360map .p360map-resultados[hidden]{display:none!important}
#p360map .p360map-resultados{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;background:#fffdf8;padding:12px clamp(10px,3vw,28px);}
#p360map .p360map-lista-cabecera{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;padding:4px 2px 12px;border-bottom:2px solid #d7c2a7;color:#6B1F2A;font-size:15px}
#p360map .p360map-lista-cabecera strong{font-size:18px}
#p360map .p360map-lista-cabecera small{font-size:12px;color:#77665f}
#p360map .p360map-lista-cabecera button.p360map-volver{display:inline-block;width:auto;height:auto;padding:6px 9px!important;background:#f3e8d6;color:#6B1F2A;border-radius:6px;font-size:13px}
#p360map button.p360map-fila{display:flex;align-items:center;justify-content:space-between;gap:15px;width:100%;height:auto;min-height:61px;padding:11px 10px!important;color:#342927;background:transparent;border:0;border-bottom:1px solid #eadfcf;border-radius:0;text-align:left;font-size:13px}
#p360map .p360map-fila:hover{background:#f9eee1}
#p360map .p360map-fila>span:first-child{flex:1;min-width:0}
#p360map .p360map-fila strong{display:block;color:#6B1F2A;font-size:14px;line-height:1.4}
#p360map .p360map-fila small{display:block;color:#6d625d;font-size:11px;margin-top:4px}
#p360map .p360map-fila .p360map-cantidad{flex:none;font-size:12px;font-weight:bold;background:#f1e4d4;color:#6B1F2A;padding:5px 9px;border-radius:999px;white-space:nowrap}
#p360map .p360map-fila .p360map-chevron{font-size:25px;color:#907b70}
#p360map .p360map-resultados .p360map-work,#p360map .p360map-panel .p360map-work{min-height:70px;padding:10px 6px}
#p360map .p360map-paginacion{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:15px 0 3px;font-size:12px;color:#5d5450}
#p360map .p360map-paginacion button{width:auto;height:auto;min-height:33px;padding:6px 10px!important;font-size:12px;border-radius:7px}
#p360map .p360map-paginacion button:disabled{opacity:.35;cursor:default}
#p360map .p360map-panel .p360map-lista-cabecera{margin-right:35px}
@media(max-width:720px){
 #p360map .p360map-barra{min-height:49px;padding:4px 5px;gap:3px}
 #p360map input[type=search]{height:37px!important;font-size:13px!important;padding:0 8px!important}
 #p360map .p360map-barra button{width:35px;height:35px;min-width:35px}
 #p360map .p360map-vistas{padding:1px}
 #p360map .p360map-vistas button.p360map-vista{width:30px;height:30px;min-width:30px}
 #p360map .p360map-resultados{padding:9px 9px 20px}
}

/* Noviembre 2026: clasificación artística en la relación móvil. */
#p360map .p360map-grupo-estilo{margin:12px 0 17px}
#p360map .p360map-resultados h3.p360map-titulo-estilo,
#p360map .p360map-panel h3.p360map-titulo-estilo{
 font-size:15px!important;font-weight:800!important;line-height:1.3!important;
 letter-spacing:.015em!important;color:#6B1F2A!important;background:#F0E3D1;
 border-left:4px solid #6B1F2A!important;border-top:0!important;
 border-radius:0 5px 5px 0;padding:10px 12px!important;margin:12px 0 10px!important
}
/* Total de obras por estilo en la ubicación, en ambas vistas y dispositivos. */
#p360map .p360map-resultados h3.p360map-titulo-estilo,
#p360map .p360map-panel h3.p360map-titulo-estilo{
 display:flex!important;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:5px 12px
}
#p360map .p360map-estilo-cuenta{
 font-size:12px!important;font-weight:600!important;white-space:nowrap;
 color:#6B1F2A;background:#fffaf1;border:1px solid #dfc7ac;
 border-radius:999px;padding:3px 9px;letter-spacing:0;line-height:1.25
}
#p360map .p360map-titulo-autor{font-size:13px!important;font-weight:700!important;
 color:#483733!important;line-height:1.35!important;margin:12px 0 3px!important;
 padding:0 4px 5px!important;border-bottom:1px solid #DCC8B7!important}
#p360map .p360map-grupo-autor{padding:0 3px}
#p360map .p360map-obras-autor{padding-left:5px}
#p360map dialog.p360map-panel{left:auto;margin:0;max-width:none;max-height:none}
#p360map dialog.p360map-panel:not([open]){display:none!important}
/* La vista móvil usa un modal nativo en primer plano, no un panel inferior.
   El dialog pertenece al top-layer y por tanto no queda recortado por el mapa. */
@media(max-width:720px){
 #p360map dialog.p360map-panel[open]{
   position:fixed!important;inset:max(8px,env(safe-area-inset-top)) 8px max(8px,env(safe-area-inset-bottom)) 8px!important;
   width:auto!important;height:auto!important;max-width:none!important;max-height:none!important;
   margin:0!important;padding:15px 14px 22px!important;overflow-y:auto!important;
   border:1px solid #D7BFAA!important;border-radius:16px!important;
   background:#FFFDF8!important;box-shadow:0 18px 48px rgba(22,16,14,.38)!important;
   overscroll-behavior:contain;z-index:99999
 }
 #p360map dialog.p360map-panel::backdrop{background:rgba(32,22,20,.64);backdrop-filter:blur(2px)}
 #p360map dialog.p360map-panel .p360map-cerrar{position:sticky;top:0;float:right;
   width:38px!important;height:38px!important;min-width:38px!important;
   box-shadow:0 2px 8px #38201533;z-index:5}
 #p360map .p360map-grupo-estilo{margin:9px 0 15px}
 #p360map .p360map-obras-autor{padding-left:2px}
}

/* Compatibilidad PC / móvil: dos presentaciones separadas de detalle.
   El panel PC conserva su contenedor aside original; sólo la vista móvil
   utiliza dialog con backdrop y ocupación casi completa. */
@media(min-width:721px){
 #p360map .p360map-panel-movil{display:none!important}
}
@media(max-width:720px){
 #p360map .p360map-panel-pc{display:none!important}
}

/* Carga progresiva de resultados, compartida por PC y móvil. */
#p360map .p360map-infinite-sentinel{
 display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:10px;
 min-height:26px;padding:7px 4px;text-align:center;color:#6B1F2A;font-size:12px
}
#p360map .p360map-infinite-sentinel:empty{min-height:14px;padding:0}
#p360map .p360map-infinite-retry{
 width:auto;height:auto;min-height:31px;padding:6px 11px!important;
 font-size:12px;line-height:1.3;border-radius:7px
}

/* Modal de obra: centrado al 80% en PC; casi pantalla completa en móvil.
   Muestra SOLO el contenido de
   la ficha pública. El botón X es el único control de retorno al buscador. */
#p360map dialog.p360map-ficha-dialog:not([open]){display:none!important}
#p360map dialog.p360map-ficha-dialog[open]{
 display:flex!important;flex-direction:column;position:fixed!important;
 inset:0!important;margin:auto!important;padding:0!important;
 width:80vw!important;
 height:80dvh!important;
 max-width:none!important;max-height:none!important;
 color:#2B2522;background:#FFFDF8;border:1px solid #CFB7A4;
 border-radius:12px;overflow:hidden;box-shadow:0 20px 80px rgba(24,15,15,.4)
}
#p360map dialog.p360map-ficha-dialog::backdrop{
 background:rgba(20,13,16,.72);backdrop-filter:blur(3px)
}
#p360map button.p360map-ficha-cerrar{
 position:absolute!important;right:14px!important;top:12px!important;z-index:40!important;
 display:flex!important;align-items:center!important;justify-content:center!important;
 width:42px!important;height:42px!important;min-width:42px!important;
 padding:0!important;margin:0!important;line-height:1!important;
 font-size:28px!important;font-weight:500!important;
 border-radius:50%!important;border:1px solid #bdaba0!important;
 background:#fffdf8!important;color:#6b1f2a!important;
 box-shadow:0 2px 12px rgba(0,0,0,.24)!important;cursor:pointer!important
}
#p360map button.p360map-ficha-cerrar:focus-visible{outline:3px solid #8A3340!important;outline-offset:2px}
#p360map .p360map-ficha-cuerpo{position:relative;display:flex;flex:1;min-height:0;min-width:0;background:#fff}
#p360map .p360map-ficha-cuerpo iframe{
 display:block;flex:1;width:100%;height:100%;min-width:0;min-height:0;
 border:0;background:white
}
#p360map .p360map-ficha-cargando{
 position:absolute;left:50%;top:40%;transform:translate(-50%,-50%);
 z-index:1;max-width:90%;padding:11px 18px;border-radius:9px;
 background:#FFFDF8;color:#6B1F2A;box-shadow:0 2px 15px rgba(0,0,0,.12);
 font-size:14px;text-align:center;pointer-events:none
}
#p360map .p360map-ficha-cargando[hidden]{display:none!important}
@media(max-width:720px){
 #p360map dialog.p360map-ficha-dialog[open]{
   width:calc(100vw - 10px)!important;
   height:calc(100dvh - 10px)!important;
   border-radius:10px!important;
 }
 #p360map button.p360map-ficha-cerrar{
   top:9px!important;right:9px!important;
   width:38px!important;height:38px!important;min-width:38px!important;
 }
}
