/* ═══════════════════════════════════════════
   Home popup: image shown on load, auto-hides
   ═══════════════════════════════════════════ */
.home-popup {
  position: fixed;
  inset: 0;
  z-index: 10000; /* above header, share-value pin and anniversary flag */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(10, 31, 68, 0.65); /* #0A1F44 brand navy */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.home-popup.is-visible {
  opacity: 1;
  visibility: visible;
}

.home-popup-dialog {
  position: relative;
  max-width: min(720px, 92vw);
  max-height: 85vh;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  transform: scale(0.94);
  transition: transform 0.4s ease;
}

.home-popup.is-visible .home-popup-dialog {
  transform: scale(1);
}

.home-popup-dialog img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
}

.home-popup-close {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px; /* flips automatically on the RTL page */
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #0A1F44;
  font-size: 22px;
  line-height: 36px;
  text-align: center;
  cursor: pointer;
  z-index: 2;
}

.home-popup-close:hover,
.home-popup-close:focus-visible {
  background: #fff;
  outline: 2px solid #00417B;
}

/* Countdown bar along the bottom of the image */
.home-popup-timer {
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  height: 4px;
  width: 100%;
  background: #00417B;
  transform-origin: left;
}

[dir="rtl"] .home-popup-timer {
  transform-origin: right;
}

.home-popup.is-visible .home-popup-timer {
  animation: home-popup-countdown var(--popup-duration, 5000ms) linear forwards;
}

@keyframes home-popup-countdown {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .home-popup,
  .home-popup-dialog {
    transition: none;
  }
  .home-popup-timer {
    display: none;
  }
}
.home-popup-link {
  display: block;
  cursor: pointer;
}