/* ── Popup overlay (image/pdf) ── */
.popup-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.82); z-index: 900; align-items: center; justify-content: center; padding: 1.5rem; }
.popup-overlay.open { display: flex; }
.popup-modal { background: #ffffff; max-width: 70%; width: 100%; height: 94vh; display: flex; flex-direction: column; position: relative; }
.popup-modal--compact { width: auto; height: auto; max-width: 90vw; }
.popup-modal--image { width: fit-content; min-width: 40vw; }
.popup-close-btn { position: absolute; top: .6rem; right: .75rem; background: none; border: none; font-family: 'Barlow Condensed', sans-serif; font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #6b6459; cursor: pointer; z-index: 10; }
.popup-close-btn:hover { color: #c0392b; }
.popup-title-bar { padding: .75rem 3rem .75rem 1rem; font-family: 'Barlow Condensed', sans-serif; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #6b6459; border-bottom: 1px solid #d4cfc5; min-height: 2.5rem; }
.popup-body { flex: 1; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.popup-body img.popup-img { height: 100%; width: auto; display: block; }
.popup-body img.popup-img--natural { height: auto; width: auto; max-width: 100%; max-height: none; display: block; }
.popup-modal--compact .popup-body { overflow-y: auto; overflow-x: auto; max-height: 85vh; align-items: flex-start; justify-content: flex-start; }
.popup-body iframe.popup-pdf { width: 100%; height: 100%; border: none; flex: 1; }

/* ── Popup modal (text/TL;DR) ── */
.popup-modal--text { max-width: 640px; width: 100%; height: auto; max-height: 85vh; }
.popup-modal--text .popup-body {
  display: block;
  overflow-y: auto;
  text-align: left;
  padding: 1.5rem 1.75rem 2rem;
  font-family: var(--font-sans, 'Barlow', sans-serif);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-main, #2a2a2a);
}
.popup-modal--text .popup-body h3 {
  font-family: var(--font-cond, 'Barlow Condensed', sans-serif);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--crimson, #c0392b);
  margin: 1.25rem 0 .5rem;
}
.popup-modal--text .popup-body h3:first-child { margin-top: 0; }
.popup-modal--text .popup-body p { margin: 0 0 .9rem; }
.popup-modal--text .popup-body strong { font-weight: 600; }

@media (max-width: 767px) {
  .popup-overlay { padding: .5rem; }
  .popup-modal { max-width: 100%; width: 100%; height: auto; max-height: 90vh; }
  .popup-modal--image { width: 100%; min-width: unset; }
  .popup-body { max-height: 75vh; overflow-y: auto; }
  .popup-body img.popup-img { height: auto; width: 100%; max-height: 70vh; object-fit: contain; }
  .popup-body iframe.popup-pdf { height: 70vh; }
  .popup-modal--text { max-height: 90vh; }
}
