/* HQM flipbook cover + pop-up reader */

.hqm-cover {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  line-height: 0;
}
.hqm-cover img {
  display: block;
  width: 100%;
  height: auto;
  box-shadow: 0 12px 30px rgba(11, 42, 74, 0.20);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hqm-cover:hover img,
.hqm-cover:focus-visible img {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(11, 42, 74, 0.30);
}
.hqm-cover:focus-visible { outline: 3px solid #1a5eb8; outline-offset: 3px; }

/* Modal */
body.hqm-modal-open { overflow: hidden; }

.hqm-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5vmin;
  background: rgba(6, 20, 38, 0.93);
  opacity: 1;
  transition: opacity 0.18s ease;
}
/* Preloading: kept in the DOM at full size (so Issuu measures + loads the reader)
   but invisible and non-interactive until the cover is clicked. */
.hqm-modal--preload {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.hqm-modal__inner {
  position: relative;
  width: min(1440px, 100%);
  height: 100%;
}
.hqm-modal__frame {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hqm-modal__frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.hqm-modal__frame.is-loaded iframe { opacity: 1; }
.hqm-modal__loading {
  color: rgba(255, 255, 255, 0.7);
  font: 500 15px/1.4 "Barlow", system-ui, sans-serif;
}
.hqm-modal__frame.is-loaded .hqm-modal__loading { display: none; }

.hqm-modal__close {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 2;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #0b2a4a;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease;
}
.hqm-modal__close:hover { transform: scale(1.06); }

@media (max-width: 640px) {
  .hqm-modal { padding: 0; }
  .hqm-modal__close { top: 6px; right: 6px; width: 40px; height: 40px; font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .hqm-modal, .hqm-cover img, .hqm-modal__frame iframe { animation: none; transition: none; }
}
