

/* =========================
   MODAL OVERLAY
========================= */

.ad-modal {
  position: fixed;
  inset: 0;

  display: flex;
  justify-content: center;
  align-items: center;

  background: rgba(0, 0, 0, 0.92);

  opacity: 0;
  visibility: hidden;

  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;

  z-index: 99999;
}

/* active state */
.ad-modal.active {
  opacity: 1;
  visibility: visible;
}

/* =========================
   MODAL CONTENT
========================= */

.ad-content {
  position: relative;

  transform: translateY(40px) scale(0.96);

  transition: transform 0.35s ease;
}

/* animate content in */
.ad-modal.active .ad-content {
  transform: translateY(0) scale(1);
}

/* =========================
   IMAGE
========================= */

.ad-link img {
  display: block;

  max-width: 85vw;
  max-height: 85vh;

  object-fit: contain;

  border-radius: 12px;

  box-shadow:
    0 25px 60px rgba(0,0,0,0.45),
    0 0 40px rgba(255,255,255,0.08);
}

/* =========================
   CLOSE BUTTON
========================= */

.ad-close-btn {
  position: absolute;

  top: -14px;
  right: -14px;

  width: 42px;
  height: 42px;

  border: none;
  border-radius: 999px;

  background: white;
  color: black;

  font-size: 28px;
  line-height: 1;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.ad-close-btn:hover {
  transform: scale(1.08);

  background: rgb(13, 19, 45);
  color: white;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 600px) {

  .ad-link img {
    max-width: 92vw;
    max-height: 78vh;
  }

  .ad-close-btn {
    top: -10px;
    right: -10px;
  }
}