/* Mapa interactivo de Adopta un Pana — colores y tipografías de zooasis.org */
@font-face { font-family: Galindo; src: url(fuentes/galindo-latin.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: Montserrat; src: url(fuentes/montserrat-latin.woff2) format('woff2'); font-weight: 300 800; font-display: swap; }

:root {
  --rosa: #E85D77; --rosa-claro: #FDA2B3; --rosa-oscuro: #C94A62; --naranja: #F2A32C;
  --crema: #FDEBD3; --hueso: #FFFBFC; --borde: #EFE3E6; --oscuro: #2B1B21; --gris: #7A7A7A;
  --sombra: 0 10px 0 rgba(201, 74, 98, .18), 0 18px 40px rgba(43, 27, 33, .12);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { font-family: Montserrat, 'Helvetica Neue', Arial, sans-serif; color: var(--oscuro); background: var(--crema); -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

/* fondo como el cartel: manchas suaves y corazones */
.fondo { position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 3% 104%, #F9D3D8 0 24%, transparent 24.2%),
    radial-gradient(circle at 22% 112%, #F9D3D8 0 19%, transparent 19.2%),
    radial-gradient(circle at 101% 96%, #F9D3D8 0 16%, transparent 16.2%),
    radial-gradient(circle at 96% -6%, #FFF4EA 0 18%, transparent 18.2%),
    radial-gradient(circle at 2% -8%, #FFF4EA 0 16%, transparent 16.2%),
    var(--crema); }

#mapa { position: fixed; inset: 0; touch-action: none; }
#mapa canvas { display: block; }
#mapa.sobre-zona canvas { cursor: pointer; }
.capa-etiquetas { position: absolute; inset: 0; pointer-events: none; }

/* cabecera */
.cabecera { position: fixed; top: 18px; left: 18px; display: flex; align-items: center; gap: 14px; padding: 10px 20px 10px 12px;
  background: var(--hueso); border: 3px solid var(--borde); border-radius: 28px; box-shadow: var(--sombra); max-width: calc(100vw - 36px); }
.cabecera img { width: 132px; height: auto; display: block; }
.cabecera h1 { font-family: Galindo, sans-serif; font-weight: 400; font-size: 26px; margin: 2px 0; color: var(--oscuro); letter-spacing: .5px; }
.cab-sup { margin: 0; color: var(--rosa); font-weight: 700; font-size: 13px; }
.cab-fecha { margin: 0; font-weight: 600; font-size: 13px; }

.acciones { position: fixed; top: 22px; right: 18px; display: flex; gap: 10px; align-items: center; }
.boton-entrada, .boton-programa { padding: 12px 20px; border-radius: 999px; background: var(--rosa); color: #fff; cursor: pointer;
  font: inherit; font-weight: 700; text-decoration: none; border: 3px solid #fff; box-shadow: var(--sombra); font-size: 15px; }
.boton-entrada:hover { background: var(--rosa-oscuro); }
.boton-programa { background: var(--oscuro); }   /* acción secundaria en granate, como en la web */
.boton-programa:hover { background: #3d2a31; }

.controles { position: fixed; right: 18px; bottom: 22px; display: flex; flex-direction: column; gap: 8px; }
.controles button { width: 48px; height: 48px; border-radius: 50%; border: 3px solid #fff; background: var(--rosa); color: #fff;
  font-size: 24px; line-height: 1; cursor: pointer; box-shadow: 0 6px 0 rgba(201, 74, 98, .25); }
.controles button:hover { background: var(--rosa-oscuro); }
.controles button:focus-visible, .boton-entrada:focus-visible, .ficha button:focus-visible { outline: 3px solid var(--naranja); outline-offset: 2px; }

.ayuda { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); margin: 0; padding: 9px 18px; border-radius: 999px;
  background: rgba(255, 251, 252, .92); border: 2px solid var(--borde); font-size: 13px; font-weight: 500; white-space: nowrap; }

/* carteles y pines (capa CSS sobre el 3D) */
.cartel, .pin { pointer-events: auto; cursor: pointer; }
.cartel { transition: opacity .25s; }
.cartel.oculto { opacity: 0; pointer-events: none; }
.cartel > span { display: inline-block; transform: scale(var(--escala, 1)); transform-origin: 50% 100%; transition: transform .15s; }
.cartel b { display: block; font-family: Galindo, sans-serif; font-weight: 400; font-size: 17px; letter-spacing: .5px; color: #fff; padding: 6px 15px 5px;
  background: var(--rosa); border: 3px solid #fff; border-radius: 999px; box-shadow: 0 4px 0 rgba(43, 27, 33, .22); white-space: nowrap; }
.cartel:nth-of-type(3n) b { background: var(--rosa-oscuro); }
.cartel:hover > span { transform: scale(calc(var(--escala, 1) * 1.08)); }
.cartel i { display: block; width: 3px; height: 26px; margin: 0 auto; background: var(--oscuro); border-radius: 2px; }
.pin { width: 34px; height: 44px; transition: opacity .2s; }
.pin svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 3px 0 rgba(43, 27, 33, .2)); }
.pin:hover svg { transform: translateY(-3px); }
#mapa.lejos .pin { opacity: 0; pointer-events: none; }

.tooltip { position: fixed; z-index: 5; pointer-events: none; padding: 6px 12px; border-radius: 999px; background: var(--oscuro); color: #fff;
  font-weight: 700; font-size: 13px; transform: translate(14px, -130%); white-space: nowrap; }
.aviso { position: fixed; left: 50%; top: 110px; transform: translateX(-50%); z-index: 6; padding: 12px 20px; border-radius: 999px;
  background: var(--naranja); color: var(--oscuro); font-weight: 700; border: 3px solid #fff; box-shadow: var(--sombra); }

/* ficha de información */
.ficha { position: fixed; z-index: 4; top: 90px; right: 84px; width: 360px; max-height: calc(100vh - 130px); overflow: auto;
  background: var(--hueso); border: 3px solid var(--borde); border-radius: 28px; box-shadow: var(--sombra); padding: 22px 22px 24px;
  animation: entra .22s ease-out; }
@keyframes entra { from { opacity: 0; transform: translateY(10px); } }
.ficha .cerrar { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--borde);
  color: var(--oscuro); font-size: 24px; line-height: 1; cursor: pointer; }
.ficha .grupo { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 999px; background: var(--rosa);
  color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .6px; text-transform: uppercase; }
.ficha .grupo svg { width: 20px; height: 20px; }
.ficha h2 { font-family: Galindo, sans-serif; font-weight: 400; color: var(--rosa); font-size: 30px; line-height: 1.05; margin: 12px 40px 8px 0; }
.ficha p { margin: 0 0 12px; line-height: 1.5; font-size: 15px; }
.ficha h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--rosa-oscuro); margin: 16px 0 8px; }
.ficha .actividad { display: block; padding: 10px 14px; border-radius: 16px; background: #fff; border: 2px solid var(--borde); margin-bottom: 8px;
  color: inherit; text-decoration: none; }
.ficha a.actividad:hover { border-color: var(--rosa-claro); }
.ficha .actividad b { display: block; font-size: 15px; }
.ficha .actividad span { font-size: 13px; color: var(--gris); font-weight: 600; }
.ficha .acto { width: 100%; text-align: left; font: inherit; color: inherit; cursor: default; display: grid; grid-template-columns: 52px 1fr; column-gap: 8px; }
.ficha a.acto, .ficha button.acto { cursor: pointer; }
.ficha button.acto:hover { border-color: var(--rosa-claro); }
.ficha .acto time { grid-row: span 2; font-weight: 800; color: var(--rosa); }
.ficha .acto span { grid-column: 2; }
.ficha button.boton { border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.ficha .chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.ficha .chips li { padding: 6px 12px; border-radius: 999px; background: var(--crema); font-weight: 600; font-size: 13px; }
.ficha .boton { display: inline-block; margin: 14px 8px 0 0; padding: 11px 18px; border-radius: 999px; background: var(--rosa); color: #fff;
  font-weight: 700; text-decoration: none; font-size: 14px; }
.ficha .boton:hover { background: var(--rosa-oscuro); }

/* pantalla de carga */
.carga { position: fixed; inset: 0; z-index: 10; display: grid; place-content: center; justify-items: center; gap: 10px; background: var(--crema);
  transition: opacity .5s; }
.carga img { width: min(300px, 70vw); animation: late 1.6s ease-in-out infinite; }
@keyframes late { 50% { transform: scale(1.04) rotate(-2deg); } }
.carga p { margin: 0; font-weight: 700; text-align: center; padding: 0 20px; }
.carga .barra { width: 220px; height: 10px; border-radius: 99px; background: var(--borde); overflow: hidden; }
.carga .barra i { display: block; height: 100%; width: 0; background: var(--rosa); transition: width .2s; }
.carga.lista { opacity: 0; pointer-events: none; }
.carga.error p { color: var(--rosa-oscuro); }

/* dentro de zooasis.org/adopta-un-pana la página ya pone el título */
.incrustado .cabecera { display: none; }
@media (min-width: 761px) { .incrustado .ficha { top: 18px; max-height: calc(100% - 36px); } }

@media (max-width: 760px) {
  .cabecera { top: 10px; left: 10px; padding: 6px 12px 6px 8px; gap: 8px; border-radius: 20px; }
  .cabecera img { width: 82px; }
  .cabecera h1 { font-size: 18px; }
  .cab-sup { display: none; }
  .cab-fecha { font-size: 11px; }
  .acciones { top: auto; bottom: 16px; left: 10px; right: auto; flex-direction: column-reverse; align-items: flex-start; gap: 8px; }
  .boton-entrada, .boton-programa { padding: 10px 14px; font-size: 13px; }
  .controles { right: 10px; bottom: 16px; }
  .controles button { width: 42px; height: 42px; font-size: 20px; }
  .ayuda { display: none; }
  .ficha { top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 58vh; border-radius: 26px 26px 0 0; border-bottom: 0; padding: 18px 18px 26px; }
  .ficha h2 { font-size: 25px; }
  .cartel b { font-size: 14px; padding: 5px 11px 4px; }
}
@media (prefers-reduced-motion: reduce) { .carga img, .ficha { animation: none; } }
