/* ===== Prefijo único: cm26- · Línea gráfica El Heraldo ===== */
.cm26-wrap {
  --cm26-rojo: #990000;
  --cm26-rojo-accion: #C40000;
  --cm26-rojo-hover: #660000;
  --cm26-negro: #000000;
  --cm26-txt: #585858;
  --cm26-stroke: #E0E0E0;
  --cm26-mod: #F2F2F2;
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  font-family: inherit;
  color: var(--cm26-negro);
  background: #ffffff;
  box-sizing: border-box;
}
.cm26-wrap button,
.cm26-wrap .leaflet-container {
  font-family: inherit;
}
.cm26-wrap *,
.cm26-wrap *::before,
.cm26-wrap *::after {
  box-sizing: border-box;
}
.cm26-head {
  border-top: 3px solid var(--cm26-rojo);
  padding: 12px 0 10px;
}
.cm26-kicker {
  display: block;
  font-weight: 700;
  color: var(--cm26-rojo);
  font-size: 1rem;
  margin-bottom: 4px;
}
.cm26-title {
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--cm26-negro);
  font-size: clamp(1.4rem, 3.2vw, 2.1rem);
  line-height: 1.15;
  text-wrap: balance;
}
.cm26-sub {
  margin: 0;
  color: var(--cm26-txt);
  font-size: 1rem;
  line-height: 1.5;
}
.cm26-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 4px 0 12px;
}
.cm26-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 16px;
  border: 1px solid var(--cm26-stroke);
  background: #ffffff;
  color: var(--cm26-negro);
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  transition: opacity .2s, border-color .2s, background-color .2s;
}
.cm26-chip:hover {
  border-color: var(--cm26-negro);
}
.cm26-chip.cm26-start {
  background: var(--cm26-rojo-accion);
  border-color: var(--cm26-rojo-accion);
  color: #ffffff;
  font-weight: 700;
}
.cm26-chip.cm26-start:hover {
  background: var(--cm26-rojo-hover);
  border-color: var(--cm26-rojo-hover);
}
.cm26-count {
  margin-left: auto;
  color: var(--cm26-txt);
  font-size: 12px;
}

/* Escenario del mapa: mayor altura para evitar scroll */
.cm26-stage {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  height: clamp(580px, 80vh, 760px);
  min-height: 580px;
  border: 1px solid var(--cm26-stroke);
}
.cm26-map {
  position: absolute;
  inset: 0;
  background: var(--cm26-mod);
  z-index: 1;
}

/* Pines en el mapa con color institucional */
.cm26-pin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  background: var(--cm26-rojo-accion);
  color: #ffffff;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
  transition: transform .15s, box-shadow .15s;
}
.cm26-pin:hover,
.cm26-pin.cm26-active {
  transform: scale(1.25);
  box-shadow: 0 0 0 4px rgba(153, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.45);
}
.cm26-subpin {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--cm26-rojo);
  box-shadow: 0 0 0 4px rgba(153, 0, 0, 0.25);
}

/* Tooltip hover en escritorio */
.cm26-wrap .leaflet-tooltip.cm26-tip {
  background: #ffffff;
  color: var(--cm26-negro);
  border: 1px solid var(--cm26-stroke);
  border-radius: 4px;
  padding: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.cm26-wrap .leaflet-tooltip.cm26-tip::before {
  display: none;
}
.cm26-tip img {
  display: block;
  width: 170px;
  height: 105px;
  object-fit: cover;
  margin-bottom: 5px;
}
.cm26-tip b {
  display: block;
  font-size: .85rem;
  max-width: 170px;
  white-space: normal;
  line-height: 1.2;
}

/* Trama blanca degradada detrás de la card */
.cm26-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 450;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, 0.75) 65%, rgba(255, 255, 255, 0.92) 100%);
}
.cm26-stage.cm26-dim::after {
  opacity: 1;
}

/* Tarjeta lateral de fotos: altura automática y sin scroll innecesario */
.cm26-panel {
  position: absolute;
  z-index: 500;
  top: 14px;
  right: 14px;
  bottom: 14px;
  width: min(340px, 46%);
  max-width: 360px;
  background: #ffffff;
  border: 1px solid var(--cm26-stroke);
  border-top: 3px solid var(--cm26-rojo);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  transform: translateX(calc(100% + 24px));
  transition: transform .3s ease, visibility .3s;
  overflow: hidden;
  visibility: hidden;
  will-change: transform;
}
.cm26-wrap .cm26-panel {
  margin: 0;
  float: none;
}
.cm26-panel.cm26-open {
  transform: none;
  visibility: visible;
}
.cm26-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}
.cm26-close:hover {
  background: var(--cm26-rojo);
}
.cm26-photo {
  position: relative;
  background: #000000;
  height: 220px;
  flex: 0 0 220px;
  overflow: hidden;
}
.cm26-photo img {
  transition: opacity .2s;
}
.cm26-photo img.cm26-load {
  opacity: .25;
}
.cm26-wrap .cm26-photo img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0;
  object-fit: cover;
  object-position: center;
  display: block;
  cursor: zoom-in;
}
.cm26-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
}
.cm26-nav:hover {
  background: var(--cm26-rojo-accion);
}
.cm26-prev { left: 8px; }
.cm26-next { right: 8px; }
.cm26-nav[hidden] { display: none; }
.cm26-idx {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
}

/* Cuerpo de la tarjeta: optimizado verticalmente para que quepa todo */
.cm26-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.cm26-name {
  margin: 0 0 2px;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.25;
  color: var(--cm26-negro);
}
.cm26-thumbs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.cm26-thumbs button {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  width: 58px;
  height: 42px;
  background: var(--cm26-mod);
}
.cm26-thumbs button.cm26-sel {
  border-color: var(--cm26-rojo);
}
.cm26-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Botones Anterior / Siguiente protegidos contra estilos del sitio */
.cm26-wrap button {
  line-height: 1.2;
}
.cm26-stepper {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}
.cm26-stepper button {
  flex: 1;
  border: none;
  background: var(--cm26-rojo-accion);
  color: #ffffff;
  border-radius: 999px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  text-decoration: none;
  transition: background-color .15s;
}
.cm26-stepper button:hover {
  background: var(--cm26-rojo-hover);
}

.cm26-hint {
  position: absolute;
  z-index: 400;
  left: 12px;
  bottom: 12px;
  background: #ffffff;
  border: 1px solid var(--cm26-stroke);
  padding: 7px 11px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--cm26-txt);
  pointer-events: none;
}

/* Modal lightbox de pantalla completa */
.cm26-lb {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cm26-lb.cm26-open {
  display: flex;
}
.cm26-lb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.cm26-foot a {
  color: var(--cm26-txt);
}
.cm26-foot {
  padding: 8px 0 14px;
  color: var(--cm26-txt);
  font-size: 11px;
  line-height: 1.4;
}

/* En dispositivos móviles estrechos: hoja inferior */
@media (max-width: 600px) {
  .cm26-stage {
    height: 75vh;
    min-height: 520px;
  }
  .cm26-stage::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.8) 45%, rgba(255, 255, 255, 0.95) 100%);
  }
  .cm26-panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    max-height: 72%;
    border-radius: 12px 12px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    transform: translateY(105%);
  }
  .cm26-photo {
    height: 180px;
    flex-basis: 180px;
  }
  .cm26-hint {
    bottom: auto;
    top: 10px;
  }
  .cm26-count {
    width: 100%;
    margin-left: 0;
  }
}
