/* ===== Açılır pencere (siteye girenlere ekranı kaplayan duyuru/reklam) ===== */
body.popup-open { overflow: hidden; }
.popup { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 2.5vh 2.5vw; font-family: var(--font, 'Segoe UI', sans-serif); }
.popup[hidden] { display: none; }
.popup-backdrop { position: absolute; inset: 0; background: rgba(var(--blue-950-rgb), .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: popFade .45s ease both; cursor: pointer; }

.popup-card { position: relative; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); width: min(1360px, 100%); max-height: 100%; background: #fff; border-radius: 28px; overflow: hidden; box-shadow: 0 50px 140px rgba(0, 0, 0, .6); animation: popIn .6s cubic-bezier(.2, .9, .25, 1.08) both; }
.popup-full { height: min(94vh, 900px); }
.popup-box { width: min(780px, 100%); grid-template-columns: minmax(0, 1fr); height: auto; max-height: 94vh; }
.popup-card.no-media { grid-template-columns: minmax(0, 1fr); width: min(820px, 100%); height: auto; }
.popup-card.no-text { grid-template-columns: minmax(0, 1fr); width: auto; max-width: 100%; height: auto; background: #050c1d; }

.popup-media { position: relative; display: grid; place-items: center; min-height: 0; background: radial-gradient(circle at 50% 40%, #1a2f5c, #050c1d 75%); overflow: hidden; }
.popup-media img, .popup-media video { width: 100%; height: 100%; max-height: 94vh; object-fit: contain; display: block; }
.popup-media iframe { width: 100%; height: 100%; min-height: 320px; aspect-ratio: 16 / 9; border: 0; display: block; }
.popup-box .popup-media { max-height: 56vh; }
.popup-box .popup-media img, .popup-box .popup-media video { max-height: 56vh; }
.popup-card.no-text .popup-media { width: auto; }
.popup-card.no-text .popup-media img, .popup-card.no-text .popup-media video { width: auto; max-width: 100%; max-height: 94vh; margin-inline: auto; }

.popup-body { display: flex; flex-direction: column; justify-content: center; gap: 1rem; padding: clamp(1.4rem, 3.4vw, 3.4rem); overflow-x: hidden; overflow-y: auto; position: relative; }
.popup-body::before { content: ""; position: absolute; right: -20px; top: -30px; width: 150px; height: 170px; background: rgba(var(--cyan-rgb), .16); clip-path: polygon(0 0, 100% 50%, 0 100%); pointer-events: none; }
.popup-kind { align-self: flex-start; padding: .35rem 1rem; border-radius: 99px; font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--blue-950); background: var(--yellow); }
.popup-body h2 { margin: 0; font-size: clamp(1.7rem, 3.6vw, 3rem); line-height: 1.12; font-weight: 800; letter-spacing: -.02em; color: var(--blue-900); }
.popup-sub { margin: 0; font-size: 1.05rem; font-weight: 600; color: var(--cyan); }
.popup-rich { font-size: 1.02rem; color: #3a4a66; max-height: 38vh; overflow-y: auto; }
.popup-rich p:last-child { margin-bottom: 0; }
.popup-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: .6rem; }
.btn-ghost-dark { background: transparent; color: var(--blue-900); border: 2px solid var(--line-strong, #b7c4da); }
.btn-ghost-dark:hover { background: var(--blue-900); color: #fff; border-color: var(--blue-900); }

.popup-close { position: absolute; top: 14px; right: 14px; z-index: 6; width: 50px; height: 50px; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer; font-size: 2rem; line-height: 1; color: #fff; background: rgba(var(--blue-950-rgb), .72); backdrop-filter: blur(6px); transition: transform .25s, background .25s; }
.popup-close:hover { transform: rotate(90deg) scale(1.08); background: var(--blue-900); }
.popup-timer { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(0, 0, 0, .12); z-index: 5; }
.popup-timer b { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--cyan), var(--yellow)); transform-origin: left; animation: popTimer var(--popup-ms, 10s) linear forwards; }

@keyframes popFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(40px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes popTimer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.popup.is-closing .popup-card { animation: popOut .3s ease both; }
.popup.is-closing .popup-backdrop { animation: popFadeOut .3s ease both; }
@keyframes popOut { to { opacity: 0; transform: translateY(24px) scale(.96); } }
@keyframes popFadeOut { to { opacity: 0; } }

@media (max-width: 900px) {
  .popup { padding: 0; }
  .popup-card, .popup-full, .popup-box, .popup-card.no-media { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
  .popup-card.no-text { grid-template-rows: 1fr; background: #050c1d; }
  .popup-media { max-height: 46vh; }
  .popup-media img, .popup-media video { max-height: 46vh; }
  .popup-card.no-text .popup-media { max-height: 100%; }
  .popup-card.no-text .popup-media img, .popup-card.no-text .popup-media video { max-height: 94vh; }
  .popup-body { justify-content: flex-start; }
  .popup-rich { max-height: none; }
}
@media (prefers-reduced-motion: reduce) { .popup-backdrop, .popup-card, .popup-timer b { animation: none !important; } }
