/* Mapa interactivo · Expo Diseñarte 2026
   Todo va dentro de .em para no chocar con los estilos del portal. */
.em {
  --em-vino: #7a1430;
  --em-vino-2: #9c1c3e;
  --em-vino-osc: #3d0918;
  --em-oro: #c9a46a;
  --em-crema: #fbf7f2;
  --em-crema-2: #f3ebe1;
  --em-tinta: #2a1d21;
  --em-gris: #6f6166;
  --em-linea: #e6dbd0;
  --em-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --em-sans: 'Manrope', 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --em-h: min(880px, calc(100vh - 140px));
  --em-r: 22px;

  position: relative;
  box-sizing: border-box;
  color: var(--em-tinta);
  font-family: var(--em-sans);
  font-size: 15px;
  line-height: 1.45;
  background: var(--em-crema);
  border-radius: calc(var(--em-r) + 6px);
  overflow: hidden;
  box-shadow: 0 30px 80px -40px rgba(61, 9, 24, .45), 0 0 0 1px rgba(122, 20, 48, .06);
  -webkit-font-smoothing: antialiased;
}
.em *, .em *::before, .em *::after { box-sizing: border-box; }
:where(.em) button { font: inherit; color: inherit; cursor: pointer; }
.em h3, .em h4, .em p { margin: 0; }
.em :focus-visible { outline: 2px solid var(--em-oro); outline-offset: 2px; }

.em-loading { padding: 80px 20px; text-align: center; color: var(--em-gris); font-family: var(--em-sans); }

/* ---------------------------------------------------------------- Cabecera */
.em-head {
  position: relative;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 26px 28px 22px;
  color: #fff;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(201, 164, 106, .28) 0%, transparent 45%),
    radial-gradient(90% 120% at 0% 100%, rgba(0, 0, 0, .35) 0%, transparent 60%),
    linear-gradient(120deg, var(--em-vino-osc) 0%, var(--em-vino) 55%, var(--em-vino-2) 100%);
  overflow: hidden;
}
.em-head::after { /* luz diagonal, como la sombra de ventana del afiche */
  content: ''; position: absolute; inset: -40% -10% auto auto; width: 60%; height: 220%;
  background: repeating-linear-gradient(100deg, rgba(255, 255, 255, .06) 0 18px, transparent 18px 46px);
  transform: rotate(8deg); pointer-events: none; mask-image: linear-gradient(90deg, transparent, #000 40%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%, transparent);
}
.em-title { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 2px; }
.em-title .em-kicker { color: var(--em-oro); }
.em-title strong {
  font-family: var(--em-serif); font-style: italic; font-weight: 600;
  font-size: clamp(28px, 4.2vw, 42px); line-height: 1.05; letter-spacing: -.01em;
}
.em-kicker {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--em-vino);
}

/* Segmented control de zonas */
.em-zonas {
  position: relative; z-index: 1; display: inline-flex; padding: 4px; gap: 4px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px; backdrop-filter: blur(6px);
}
.em-zonas button {
  border: 0; background: transparent; color: rgba(255, 255, 255, .82);
  padding: 9px 20px; border-radius: 999px; font-weight: 700; font-size: 13px; letter-spacing: .02em;
  transition: background .25s, color .25s, box-shadow .25s;
}
.em-zonas button:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.em-zonas button[aria-selected="true"] { background: var(--em-crema); color: var(--em-vino); box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .45); }

/* ---------------------------------------------------------------- Cuerpo */
.em-body { display: grid; grid-template-columns: minmax(0, 1fr) 370px; height: var(--em-h); min-height: 560px; }

.em-stage {
  position: relative; overflow: hidden; min-width: 0;
  background:
    radial-gradient(circle at 50% 40%, #fff 0%, var(--em-crema) 55%, var(--em-crema-2) 100%);
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.em-stage::before { /* trama sutil de puntos */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(122, 20, 48, .12) 1px, transparent 1.2px); background-size: 18px 18px;
}
.em-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; animation: em-in .9s cubic-bezier(.2, .8, .2, 1) both; }
.em-svg.is-drag { cursor: grabbing; }
.em-svg image { filter: drop-shadow(0 10px 22px rgba(61, 9, 24, .22)); }
@keyframes em-in { from { opacity: 0; transform: scale(.97) translateY(10px); } to { opacity: 1; transform: none; } }

/* Velo tipo "reflector": oscurece todo menos lo resaltado */
.em-veil { fill: rgba(42, 6, 18, .62); opacity: 0; transition: opacity .45s ease; pointer-events: none; }
.em-veil.is-on { opacity: 1; }

/* Zonas clicables */
.em-st, .em-poi { fill: transparent; stroke: transparent; stroke-width: 2; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .2s, stroke .2s; outline: none; }
.em-st:hover, .em-st:focus-visible { fill: rgba(201, 164, 106, .22); stroke: var(--em-oro); }
.em-poi { stroke-dasharray: 4 3; }
.em-poi:hover, .em-poi:focus-visible { fill: rgba(122, 20, 48, .1); stroke: var(--em-vino); }
.em-st.is-match { fill: rgba(201, 164, 106, .16); stroke: var(--em-oro); stroke-width: 2.5; }
.em-st.is-sel, .em-poi.is-sel { fill: transparent; stroke: #fff; stroke-width: 2.5; stroke-dasharray: none; }

.em-ring {
  fill: none; stroke: var(--em-oro); stroke-width: 3; vector-effect: non-scaling-stroke; pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(201, 164, 106, .9));
  animation: em-pulse 1.6s ease-in-out infinite;
}
@keyframes em-pulse { 0%, 100% { stroke-opacity: 1; stroke-width: 3; } 50% { stroke-opacity: .45; stroke-width: 6; } }

/* Controles */
.em-ctrls {
  position: absolute; top: 16px; right: 16px; display: flex; flex-direction: column; overflow: hidden;
  background: rgba(255, 255, 255, .92); border-radius: 14px; backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px -12px rgba(61, 9, 24, .35), 0 0 0 1px rgba(122, 20, 48, .08);
}
.em-ctrls button {
  width: 42px; height: 42px; border: 0; background: transparent; font-size: 22px; font-weight: 500; line-height: 1;
  color: var(--em-vino); display: grid; place-items: center; transition: background .2s;
}
.em-ctrls button + button { border-top: 1px solid var(--em-linea); }
.em-ctrls button:hover { background: var(--em-crema-2); }

.em-hint {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  padding: 8px 16px; border-radius: 999px; white-space: nowrap; pointer-events: none;
  font-size: 12px; font-weight: 600; color: #fff; background: rgba(42, 6, 18, .78); backdrop-filter: blur(6px);
  transition: opacity .5s; animation: em-hint 7s 1.2s forwards;
}
.em-touched .em-hint, .em.has-card .em-hint { animation: none; opacity: 0; }
@keyframes em-hint { 0%, 85% { opacity: 1; } 100% { opacity: 0; } }

.em-tip {
  position: absolute; left: 0; top: 0; z-index: 4; max-width: 240px; pointer-events: none;
  padding: 7px 12px; border-radius: 10px; font-size: 13px; font-weight: 700; color: #fff;
  background: var(--em-vino-osc); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5);
  opacity: 0; transition: opacity .15s;
}
.em-tip.is-on { opacity: 1; }

/* Leyenda (escritorio) */
.em-legend {
  position: absolute; top: 18px; left: 18px; z-index: 3; width: 210px; display: grid; gap: 9px;
  padding: 16px 18px; border-radius: 18px; background: rgba(255, 255, 255, .88); backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px -24px rgba(61, 9, 24, .45), 0 0 0 1px rgba(122, 20, 48, .07);
  transition: opacity .3s, transform .3s;
}
.em-lg { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; }
.em-sw { flex: none; width: 18px; height: 18px; border-radius: 5px; border: 2.5px solid; background: #fff; }
.em-sw-diamond { border-color: #8f9361; background: #e5e3b8; }
.em-sw-platinum { border-color: #3c55d8; background: #e6ebff; }
.em-sw-gold { border-color: #d94a35; background: #fdeeea; }
.em-sw-s2x2 { border-color: #e45bc4; }
.em-sw-comida { border-color: #f08a3c; }
.em-lg-tip { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--em-linea); font-size: 12.5px; color: var(--em-gris); }
.em.has-card .em-legend { opacity: 0; transform: translateY(-8px); pointer-events: none; }
@media (max-width: 1180px) { .em-legend { display: none; } }

/* Tarjeta de detalle */
.em-card {
  position: absolute; left: 18px; bottom: 18px; z-index: 5; width: min(360px, calc(100% - 36px));
  padding: 20px 22px 18px; border-radius: 20px;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(14px);
  box-shadow: 0 30px 60px -25px rgba(42, 6, 18, .6), 0 0 0 1px rgba(122, 20, 48, .08);
  animation: em-card .45s cubic-bezier(.2, .9, .25, 1.15) both;
  overflow: hidden;
}
.em-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--em-vino), var(--em-oro)); }
.em-card[hidden] { display: none; }
@keyframes em-card { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.em-card h3 {
  margin: 4px 30px 6px 0; font-family: var(--em-serif); font-style: italic; font-weight: 600;
  font-size: 26px; line-height: 1.12; color: var(--em-vino-osc);
}
.em-note { color: var(--em-gris); font-size: 14px; margin-bottom: 8px; }
.em-meta {
  display: inline-block; padding: 6px 12px; border-radius: 10px; font-size: 13px; font-weight: 700;
  color: var(--em-vino); background: var(--em-crema-2);
}
.em-x {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: var(--em-crema-2); font-size: 20px; line-height: 1; color: var(--em-vino); transition: transform .2s, background .2s;
}
.em-x:hover { background: var(--em-linea); transform: rotate(90deg); }
.em-acts-wrap { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--em-linea); }
.em-sub { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--em-oro); }
.em-acts { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.em-acts li { display: grid; gap: 1px; font-size: 14px; font-weight: 600; }
.em-acts .em-hora { font-size: 12px; color: var(--em-vino); font-weight: 800; }
.em-actions { margin-top: 14px; display: flex; gap: 8px; }
.em-btn {
  border: 0; padding: 10px 16px; border-radius: 12px; font-size: 13px; font-weight: 800; color: #fff;
  background: linear-gradient(120deg, var(--em-vino), var(--em-vino-2)); box-shadow: 0 8px 18px -8px rgba(122, 20, 48, .7);
  transition: transform .15s, box-shadow .2s;
}
.em-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 22px -8px rgba(122, 20, 48, .8); }

/* ---------------------------------------------------------------- Panel lateral */
.em-side { display: flex; flex-direction: column; min-height: 0; background: #fff; border-left: 1px solid var(--em-linea); }
.em-searchbox { padding: 18px 18px 12px; }
.em-q {
  width: 100%; height: 48px; padding: 0 16px 0 44px; border-radius: 14px;
  border: 1.5px solid var(--em-linea); background: var(--em-crema) no-repeat 15px 50% / 18px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a1430' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  font: 600 15px var(--em-sans); color: var(--em-tinta); transition: border-color .2s, box-shadow .2s, background-color .2s;
  -webkit-appearance: none; appearance: none;
}
.em-q::placeholder { color: #a3959a; font-weight: 500; }
.em-q:focus { outline: none; border-color: var(--em-vino); background-color: #fff; box-shadow: 0 0 0 4px rgba(122, 20, 48, .1); }

.em-tabs { display: flex; gap: 22px; padding: 0 20px; border-bottom: 1px solid var(--em-linea); }
.em-tabs button {
  position: relative; border: 0; background: none; padding: 10px 0 12px; font-weight: 800; font-size: 14px; color: var(--em-gris);
}
.em-tabs button::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--em-vino); transform: scaleX(0); transition: transform .25s; }
.em-tabs button[aria-selected="true"] { color: var(--em-vino); }
.em-tabs button[aria-selected="true"]::after { transform: scaleX(1); }

.em-panel { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--em-linea) transparent; }
.em-panel[hidden] { display: none; }

.em-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 18px 4px; }
.em-chip {
  border: 1.5px solid var(--em-linea); background: #fff; padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; color: var(--em-gris); transition: all .2s;
}
.em-chip:hover { border-color: var(--em-vino); color: var(--em-vino); }
.em-chip[aria-pressed="true"] { background: var(--em-vino); border-color: var(--em-vino); color: #fff; }

.em-list { padding: 4px 10px 24px; }
.em-group h4 {
  position: sticky; top: 0; z-index: 1; padding: 16px 10px 6px; background: linear-gradient(#fff 70%, rgba(255, 255, 255, 0));
  font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--em-oro);
}
.em-item {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px;
  border: 0; background: transparent; padding: 11px 12px; border-radius: 12px; text-align: left;
  transition: background .18s, transform .18s;
}
.em-item:hover { background: var(--em-crema); transform: translateX(3px); }
.em-item.is-sel { background: linear-gradient(120deg, var(--em-vino), var(--em-vino-2)); color: #fff; box-shadow: 0 10px 22px -12px rgba(122, 20, 48, .8); transform: none; }
.em-name { font-weight: 700; font-size: 14.5px; }
.em-where {
  flex: none; font-size: 12px; font-weight: 800; color: var(--em-vino); background: var(--em-crema-2);
  padding: 3px 9px; border-radius: 8px; font-variant-numeric: tabular-nums;
}
.em-where:empty { display: none; }
.em-item.is-sel .em-where { background: rgba(255, 255, 255, .18); color: #fff; }
.em-empty { padding: 24px 12px; color: var(--em-gris); font-size: 14px; }

/* Agenda */
.em-day { padding: 18px 18px 8px; }
.em-day h4 { font-family: var(--em-serif); font-style: italic; font-weight: 600; font-size: 24px; color: var(--em-vino); }
.em-hours { font-size: 12px; font-weight: 700; color: var(--em-gris); margin: 2px 0 10px; }
.em-ev { display: grid; grid-template-columns: 104px 1fr; gap: 12px; padding: 13px 0; border-top: 1px solid var(--em-linea); }
.em-ev .em-hora { font-size: 13px; font-weight: 800; color: var(--em-vino); line-height: 1.3; }
.em-ev strong { display: block; font-size: 14.5px; line-height: 1.3; }
.em-quien { display: block; font-size: 13px; color: var(--em-gris); margin-top: 2px; }
.em-tag { display: inline-block; margin-top: 5px; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--em-vino-2); }
.em-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 7px; padding: 0; border: 0; background: none;
  font-size: 12.5px; font-weight: 800; color: var(--em-vino); text-align: left;
}
.em-link::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--em-oro); box-shadow: 0 0 0 3px rgba(201, 164, 106, .25); }
.em-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.em-ev.is-live { margin: 0 -10px; padding: 13px 10px; border-radius: 14px; background: var(--em-crema); border-top-color: transparent; }
.em-live {
  display: inline-block; margin-bottom: 4px; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; color: #fff; background: var(--em-vino-2); animation: em-blink 1.6s infinite;
}
@keyframes em-blink { 50% { opacity: .55; } }

/* ---------------------------------------------------------------- Móvil */
@media (max-width: 860px) {
  .em { border-radius: 0; box-shadow: none; }
  .em-head { padding: 18px 16px 16px; gap: 14px; }
  .em-zonas { width: 100%; }
  .em-zonas button { flex: 1; }
  .em-body { display: block; height: auto; min-height: 0; }
  .em-stage { height: min(78vh, 720px); min-height: 440px; scroll-margin-top: 8px; }
  .em-side { border-left: 0; border-top: 1px solid var(--em-linea); }
  .em-searchbox { padding: 14px 16px 10px; }
  .em-panel { overflow: visible; }
  .em-ctrls { top: 12px; right: 12px; }
  .em-card { left: 10px; right: 10px; bottom: 10px; width: auto; padding: 18px 18px 16px; }
  .em-card h3 { font-size: 22px; margin-bottom: 2px; }
  .em-card { max-height: 48%; overflow-y: auto; padding-top: 16px; }
  .em-note { font-size: 13px; margin-bottom: 6px; }
  .em-acts-wrap { margin-top: 10px; padding-top: 10px; }
  .em-actions { margin-top: 10px; }
  .em-ev { grid-template-columns: 80px 1fr; }
  .em-hint { bottom: 12px; font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .em *, .em *::before, .em *::after { animation: none !important; transition: none !important; }
}
