/* ── STANDARD PAGE POPUP ─────────────────────────────────────────────────────
   One image size for every page's load popup (OMS → Page Popups): 16:9,
   designed at 1640 × 920. Each page used to size its own popup differently —
   the homepage was 820 × 460 on desktop but a tall 350 × 480 crop on phones,
   and the flight/visa/hotel/tour popups put the image in a near-square half —
   so one picture never looked right everywhere. Now the image is always a 16:9
   frame (a 16:9 upload fills it exactly), with the text, when there is any,
   underneath it rather than beside it.

   Loaded after each page's own popup styles. Selectors are scoped to the popup
   ids so they win over the per-page .popup-* rules, and !important only where
   index-mobile-responsive.css already uses it. Sizes in px: the site root font
   is 10px. */

/* Image-only popup (homepage) */
#pageLoadPopup .popup-content.popup-image-only {
  width: min(820px, 92vw) !important;
  max-width: 92vw !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  aspect-ratio: 16 / 9;
  display: block;
}
#pageLoadPopup .popup-image-only a { display: block; width: 100%; height: 100%; }
#pageLoadPopup .popup-only-image {
  display: block;
  width: 100%; height: 100%;
  max-height: none !important;
  object-fit: cover;
}

/* Image + text popups (flight, visa, hotel, tours)
   Never scrolls: on a short screen the card narrows, and because the image keeps its 16:9
   shape it gets shorter too, so image + text always fit. 290px is the text block's height
   (title, two lines of copy, button); 16/9 turns the height left over into a width. */
#pageLoadPopup .popup-content:not(.popup-image-only),
#adventureModal .adventure-modal-content {
  flex-direction: column !important;
  width: min(600px, 92vw, calc((90vh - 290px) * 16 / 9)) !important;
  min-width: min(300px, 92vw);
  max-width: 92vw !important;
  height: auto !important;
  max-height: 94vh !important;
  margin: 0 !important;
  overflow: hidden !important;
}
#pageLoadPopup .popup-image,
#adventureModal .adventure-modal-img {
  flex: 0 0 auto !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
}
#pageLoadPopup .popup-image img,
#adventureModal .adventure-modal-img img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
}
#pageLoadPopup .popup-text,
#adventureModal .adventure-modal-body {
  flex: 0 0 auto !important;
  width: 100% !important;
  height: auto !important;
  padding: 22px 26px 26px !important;
  text-align: center;
  align-items: center;
}
#adventureModal .adventure-modal-content:not(.has-image) .adventure-modal-body { padding: 34px 28px !important; }

/* Same text block on every page — the pages styled their own title (h1 on some, h2 on
   others) and the hotel page left its link unstyled, so it read as plain text. */
#pageLoadPopup .popup-text h1,
#pageLoadPopup .popup-text h2 {
  font-size: 22px !important;
  line-height: 1.25;
  margin: 0 0 8px !important;
  color: #0f172a;
}
#pageLoadPopup .popup-text p {
  font-size: 15px !important;
  line-height: 1.5;
  color: #475569;
  margin: 0 0 16px !important;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
#pageLoadPopup .popup-text strong { display: block; }
#pageLoadPopup .popup-text .read-more-btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 30px;
  background: linear-gradient(135deg, #048ED3, #036ca3);
  color: #fff !important;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 6px 18px rgba(4, 142, 211, 0.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
#pageLoadPopup .popup-text .read-more-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(4, 142, 211, 0.45);
  color: #fff !important;
}

@media (max-width: 768px) {
  #pageLoadPopup .popup-text,
  #adventureModal .adventure-modal-body { padding: 16px 18px 20px !important; }
  #pageLoadPopup .popup-text h1,
  #pageLoadPopup .popup-text h2 { font-size: 18px !important; }
  #pageLoadPopup .popup-text p { font-size: 14px !important; }
}

/* Image-only popup on a short screen: shrink with the height too, so it never overflows. */
#pageLoadPopup .popup-content.popup-image-only {
  width: min(820px, 92vw, calc(88vh * 16 / 9)) !important;
}
