/* Módulo «modal de exploración» (KIT 3.3). Toma los colores de la marca del proyecto (assets/brand.css). */
.explore-modal {
  --em-primary: var(--brand, #145342);
  --em-secondary: var(--brand, #145342);
  --em-surface: #fff;
  --em-text: var(--ink, #17332c);
  --em-muted: #55615b;
  --em-soft: #eef2ef;
  --em-radius: var(--radius, 6px);
  font: 16px/1.5 var(--body, system-ui), sans-serif;
}
@supports (background: color-mix(in srgb, red 10%, white)) {
  .explore-modal { --em-soft: color-mix(in srgb, var(--em-primary) 9%, #fff); --em-muted: color-mix(in srgb, var(--em-text) 72%, #fff); }
}
.explore-modal, .explore-modal * { box-sizing: border-box; }
.explore-modal:not([open]) { display: none; }
.explore-modal {
  position: fixed; width: min(460px, calc(100% - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  margin: auto; padding: 36px 28px 22px; border: 1px solid var(--em-soft); border-radius: calc(var(--em-radius) + 10px);
  color: var(--em-text); background: var(--em-surface); box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
  text-align: center; overflow: auto; overscroll-behavior: contain;
}
.explore-modal::backdrop { background: rgba(10, 20, 16, .55); }
.explore-modal h2 { margin: 0 0 14px; color: var(--em-text); font-family: var(--heading, inherit), serif; font-size: clamp(1.45rem, 5vw, 1.85rem); font-weight: 700; line-height: 1.2; text-transform: none; }
.explore-modal h2::after { display: none; }
.explore-modal p { margin: 0; color: var(--em-muted); font-size: 1rem; line-height: 1.6; }
.explore-modal button { font-family: inherit; }
.explore-modal :focus-visible { outline: 2px solid var(--em-primary); outline-offset: 3px; box-shadow: none; }
.explore-modal__close { position: absolute; top: 12px; right: 12px; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--em-radius); background: transparent; color: var(--em-muted); cursor: pointer; }
.explore-modal__close svg { display: block; flex: none; }
.explore-modal__close:hover { background: var(--em-soft); color: var(--em-text); }
.explore-modal__close:focus-visible { outline-offset: -4px; }
.explore-modal__icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: calc(var(--em-radius) + 8px); background: var(--em-soft); color: var(--em-primary); }
.explore-modal__icon img { width: 40px; height: 40px; object-fit: contain; }
.explore-modal .explore-modal__eyebrow { margin: 20px 0 8px; color: var(--em-secondary); font-size: .82rem; font-weight: 700; }
.explore-modal__icon + h2 { margin-top: 20px; }
.explore-modal__actions { display: grid; gap: 10px; margin-top: 24px; }
.explore-modal .explore-modal__action { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px; padding: 13px 18px; border: 1px solid var(--em-primary); border-radius: var(--em-radius); background: var(--em-primary); color: #fff; font-weight: 700; font-size: 15px; line-height: 1.4; text-decoration: none; white-space: normal; }
.explore-modal .explore-modal__action:hover { filter: brightness(.9); }
.explore-modal .explore-modal__action--secondary { background: transparent; color: var(--em-text); border-color: var(--em-muted); }
.explore-modal .explore-modal__action--secondary:hover { filter: none; background: var(--em-soft); border-color: var(--em-secondary); }
.explore-modal__dismiss { min-height: 44px; margin-top: 12px; padding: 8px 16px; border: 0; background: transparent; color: var(--em-muted); text-decoration: underline; cursor: pointer; font: inherit; }
.explore-modal .explore-modal__bookmark { display: block; width: 100%; min-height: 44px; margin: 12px 0 0; padding: 10px 6px; border: 0; border-radius: var(--em-radius); background: transparent; color: var(--em-secondary); font-weight: 600; font-size: 14px; line-height: 1.5; text-align: center; text-decoration: underline; cursor: pointer; }
.explore-modal .explore-modal__bookmark-help { margin: 4px 0 8px; padding: 12px 14px; border-radius: var(--em-radius); background: var(--em-soft); color: var(--em-text); font-size: .875rem; line-height: 1.6; }
.explore-modal .explore-modal__bookmark-help[hidden] { display: none; }
.explore-modal .explore-modal__bookmark-help kbd { display: inline-block; min-width: 1.7em; padding: 1px 6px; border: 1px solid var(--em-muted); border-bottom-width: 2px; border-radius: 5px; background: var(--em-surface); color: var(--em-text); font: 600 .9em/1.5 system-ui, sans-serif; text-align: center; white-space: nowrap; }
html.explore-modal-open, html.explore-modal-open body { overflow: hidden; }
@media (max-width: 380px) { .explore-modal { padding: 32px 18px 16px; } }
@media (prefers-reduced-motion: no-preference) { .explore-modal[open] { animation: explore-modal-in .18s ease-out; } }
@keyframes explore-modal-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media print { .explore-modal { display: none !important; } }
