/* ============================================================
   Artistic Map Widget — Hoja de estilos
   ============================================================ */

/* --- Contenedor principal --- */
.amw-widget { position: relative; width: 100%; }

.amw-contenedor {
    position: relative;
    width: 100%;
    height: 520px;
    display: flex;
    overflow: hidden;
    font-family: var(--amb-font-cuerpo, 'Open Sans', sans-serif);
}

/* --- Mapa --- */
.amw-map { flex: 1; height: 100%; z-index: 1; cursor: pointer; }

.amw-widget .leaflet-tile {
    filter: sepia(15%) hue-rotate(8deg) saturate(88%) brightness(1.02);
}
.amw-widget .leaflet-control-zoom a {
    color: var(--color-base, #252525) !important;
    font-weight: 700;
}
.amw-widget .leaflet-control-zoom a:hover {
    background: var(--color-dorado, #8C862A) !important;
    color: #fff !important;
}
.amw-widget .amw-tooltip {
    background: var(--color-base, #252525);
    border: none;
    border-radius: 2px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .4px;
    padding: 5px 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.22);
}
.amw-widget .amw-tooltip::before { border-top-color: var(--color-base, #252525) !important; }

/* --- Marcador --- */
.amw-marker-wrap  { width: 42px; height: 52px; }
.amw-marker-pin   {
    width: 42px; height: 42px;
    background-color: var(--color-dorado, #8C862A);
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 4px 14px rgba(0,0,0,.32);
    display: flex; align-items: center; justify-content: center;
    transition: background .3s;
}
.amw-marker-pin:hover { background-color: var(--color-rojo, #F21B2D); }
.amw-marker-inner {
    transform: rotate(45deg);
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
}
.amw-marker-inner img { width: 100%; height: 100%; object-fit: contain; }
.amw-marker-letra {
    font-family: var(--color-font-titulo, 'Droid Serif', Georgia, serif);
    font-size: 17px; font-weight: 700; color: #fff; line-height: 1;
}

/* --- Hint --- */
.amw-hint {
    position: absolute;
    bottom: 18px; left: 50%;
    transform: translateX(-50%);
    z-index: 490;
    background: rgba(37,37,37,.82);
    color: #fff; font-size: .72rem; letter-spacing: .4px;
    padding: 7px 16px; border-radius: 2px;
    pointer-events: none;
    transition: opacity 1s ease;
    white-space: nowrap;
}
.amw-hint.oculto { opacity: 0; }

/* --- Panel lateral --- */
.amw-panel {
    position: absolute; top: 0; right: 0;
    width: 340px; height: 100%;
    background: #fff;
    z-index: 500;
    display: flex; flex-direction: column;
    padding: 34px 28px 26px;
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0,0,0,.13);
}
.amw-panel-titulo {
    font-family: var(--color-font-titulo, 'Droid Serif', Georgia, serif);
    font-size: 1.4rem; font-weight: 700;
    color: var(--color-base, #252525);
    line-height: 1.2; margin-bottom: 13px;
}
.amw-panel-desc {
    font-size: .85rem; color: #555;
    line-height: 1.65; margin-bottom: 18px;
}
.amw-btn-mas {
    display: inline-block;
    padding: 9px 24px;
    background: transparent;
    border: 1px solid var(--color-dorado, #8C862A);
    color: var(--color-dorado, #8C862A);
    font-size: .72rem; font-weight: 700;
    letter-spacing: 1.2px; text-transform: uppercase;
    cursor: pointer;
    transition: background .3s, color .3s;
    margin-bottom: 24px;
    align-self: flex-start;
    font-family: inherit;
}
.amw-btn-mas:hover { background: var(--color-dorado, #8C862A); color: #fff; }
.amw-sep { border: none; border-top: 1px solid #e2e2e2; margin-bottom: 20px; padding: 1.5rem 0;}
.amw-info-lista { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 13px; }
.amw-info-item  { display: flex; align-items: flex-start; gap: 11px; font-size: .83rem; color: var(--color-base, #252525); line-height: 1.45; }
.amw-info-item a { color: var(--color-rojo, #F21B2D); text-decoration: none; transition: color .3s; }
.amw-info-item a:hover { color: var(--color-rojo-osc, #9A0F12); }
.amw-ico { flex-shrink: 0; width: 19px; height: 19px; color: var(--color-dorado, #8C862A); margin-top: 1px; }

/* --- Popup pantalla completa --- */
.amw-popup-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(37,37,37,.55);
    backdrop-filter: blur(3px);
    align-items: center; justify-content: center;
}
.amw-popup-overlay.activo { display: flex; }

.amw-popup {
    background: #fff;
    width: min(820px, 94vw); max-height: 88vh;
    display: flex; flex-direction: column;
    box-shadow: 0 16px 48px rgba(0,0,0,.3);
    animation: amwEntrada .32s ease;
}
@keyframes amwEntrada {
    from { opacity:0; transform:translateY(24px); }
    to   { opacity:1; transform:translateY(0); }
}
.amw-popup-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 26px;
    background: var(--color-base, #252525);
    flex-shrink: 0;
}
.amw-popup-titulo {
    font-family: var(--color-font-titulo, 'Droid Serif', Georgia, serif);
    font-size: 1.15rem; font-weight: 700; color: #fff;
}
.amw-popup-cerrar {
    background: none; border: none; cursor: pointer; color: #fff;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    transition: background .3s; border-radius: 2px; flex-shrink: 0;
}
.amw-popup-cerrar:hover { background: var(--color-rojo, #F21B2D); }
.amw-popup-cuerpo { overflow-y: auto; padding: 30px 34px; flex: 1; }

/* Estilos del contenido HTML de cómo llegar */
.amw-popup-cuerpo h2 {
    font-family: var(--color-font-titulo, 'Droid Serif', Georgia, serif);
    font-size: .95rem; font-weight: 700;
    color: var(--color-base, #252525);
    text-transform: uppercase; letter-spacing: .5px;
    margin: 22px 0 7px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--color-dorado, #8C862A);
    display: inline-block;
}
.amw-popup-cuerpo h2:first-child { margin-top: 0; }
.amw-popup-cuerpo p   { font-size: .875rem; color: #444; line-height: 1.72; margin-bottom: 6px; }
.amw-popup-cuerpo ul  { list-style: none; padding: 0; margin-bottom: 6px; }
.amw-popup-cuerpo ul li {
    font-size: .875rem; color: #444; line-height: 1.65;
    padding-left: 18px; position: relative;
}
.amw-popup-cuerpo ul li::before { content: '—'; position: absolute; left: 0; color: var(--color-dorado, #8C862A); }
.amw-popup-cuerpo strong { color: var(--color-base, #252525); font-weight: 700; }
.amw-popup-cuerpo a { color: var(--color-rojo, #F21B2D); text-decoration: none; }
.amw-popup-cuerpo a:hover { color: var(--color-rojo-osc, #9A0F12); }

/* --- Responsive --- */
@media (max-width: 768px) {
    .amw-contenedor { height: auto !important; flex-direction: column; }
    .amw-map        { height: 300px; width: 100%; }
    .amw-panel      {
        position: relative; width: 100% !important; height: auto;
        box-shadow: none;
        border-top: 3px solid var(--amw-panel-borde, var(--color-dorado, #8C862A));
        padding: 22px 18px;
    }
    .amw-panel-desc { display: none; }
    .amw-hint       { transform: translateX(-50%); bottom: auto; top: 266px; }
    .amw-popup-cuerpo { padding: 20px 18px; }
}
@media (max-width: 480px) {
    .amw-panel-titulo { font-size: 1.15rem; }
    .amw-popup        { width: 98vw; max-height: 94vh; }
    .amw-popup-header { padding: 14px 16px; }
}
