/* ARQSEO — Galería pública del mapa de enlaces (portada y /mapa-de-enlaces). */

.mg-rejilla {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
}
.mg-tarjeta {
  display: flex; flex-direction: column;
  background: var(--color-cards, #fff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 6px 22px rgba(15, 23, 42, .06);
  transition: transform .2s, box-shadow .2s;
  scroll-margin-top: 90px;
}
.mg-tarjeta:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(15, 23, 42, .12); }
.mg-tarjeta__img { aspect-ratio: 16 / 10; overflow: hidden; background: #f1f5f9; border-bottom: 1px solid var(--color-border, #e2e8f0); }
.mg-tarjeta__img picture, .mg-tarjeta__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mg-tarjeta__texto { display: flex; flex-direction: column; gap: .5rem; padding: 1rem 1.1rem 1.15rem; flex: 1; }
.mg-tarjeta__nombre { display: flex; align-items: center; gap: .45rem; margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--color-text, #1e293b); }
.mg-tarjeta__nombre svg { width: 18px; height: 18px; color: #7c3aed; }
.mg-tarjeta__pregunta { margin: 0; font-size: .92rem; line-height: 1.5; color: var(--color-text, #334155); font-weight: 500; }
.mg-tarjeta__desc { margin: 0; font-size: .85rem; line-height: 1.6; color: var(--color-text-secondary, #64748b); }
.mg-tarjeta__acciones { margin-top: auto; padding-top: .35rem; }
.mg-probar {
  display: inline-flex; align-items: center; gap: .45rem;
  font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
  padding: .55rem 1.05rem; border-radius: 9px; border: 0;
  background: linear-gradient(135deg, #7c3aed, #6d28d9); color: #fff;
}
.mg-probar svg { width: 15px; height: 15px; }
.mg-probar:hover { filter: brightness(1.08); }
.mg-probar:focus-visible, .mg-enlace:focus-visible, .mg-modal__cerrar:focus-visible { outline: 3px solid #a78bfa; outline-offset: 2px; }
.mg-tarjeta__ancha { display: none; margin: .25rem 0 0; font-size: .8rem; line-height: 1.5; color: var(--color-text-secondary, #64748b); }
.mg-enlace { font: inherit; padding: 0; border: 0; background: none; color: #6d28d9; text-decoration: underline; cursor: pointer; }

/* En el móvil, las vistas que no caben lo dicen y proponen otra. */
@media (max-width: 700px) {
  .mg-rejilla { grid-template-columns: 1fr; }
  .mg-probar--ancha { display: none; }
  .mg-probar--ancha + .mg-tarjeta__ancha { display: block; }
}

.mg-nota { max-width: 760px; margin: 2rem auto 0; text-align: center; font-size: .88rem; line-height: 1.6; color: var(--color-text-secondary, #64748b); }

/* Portada: seis vistas y enlace a las diez */
.mg-portada__pie { text-align: center; margin-top: 1.75rem; }

/* ── Modal con el mapa interactivo ── */
html.mg-sin-scroll, html.mg-sin-scroll body { overflow: hidden; }
.mg-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 2vh 2vw; background: rgba(15, 23, 42, .72);
}
.mg-modal[hidden] { display: none; }
.mg-modal__caja {
  display: flex; flex-direction: column; width: min(1400px, 100%); height: 100%;
  background: var(--color-bg, #f8fafc); border-radius: 14px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.mg-modal__cab {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .6rem .8rem .6rem 1.1rem; background: #1e1b4b; color: #fff;
}
.mg-modal__titulo { margin: 0; font-size: 1rem; font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-modal__cerrar {
  display: inline-flex; align-items: center; gap: .4rem; flex-shrink: 0;
  font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
  padding: .4rem .8rem; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .4);
  background: rgba(255, 255, 255, .08); color: #fff;
}
.mg-modal__cerrar svg { width: 15px; height: 15px; }
.mg-modal__cerrar kbd { font: inherit; font-size: .7rem; padding: 0 .35rem; border-radius: 4px; border: 1px solid rgba(255, 255, 255, .35); opacity: .8; }
.mg-modal__cerrar:hover { background: rgba(255, 255, 255, .18); }
.mg-modal__marco { flex: 1; position: relative; }
.mg-modal__iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--color-bg, #f8fafc); }
@media (max-width: 700px) {
  .mg-modal { padding: 0; }
  .mg-modal__caja { border-radius: 0; }
  .mg-modal__cerrar kbd { display: none; }
}
@media (prefers-reduced-motion: reduce) { .mg-tarjeta { transition: none; } .mg-tarjeta:hover { transform: none; } }
