/* Site popup & banner */
body.site-popup-open {
  overflow: hidden;
}

.site-popup-banner {
  position: relative;
  z-index: 190;
  background: linear-gradient(90deg, #0f172a 0%, #1e3a8a 55%, #047857 100%);
  color: #fff;
  border-bottom: 1px solid rgb(255 255 255 / 0.12);
  box-shadow: 0 8px 24px rgb(15 23 42 / 0.18);
}

.site-popup-banner__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.site-popup-banner__text {
  flex: 1;
  min-width: 0;
}

.site-popup-banner__title {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.95rem;
}

.site-popup-banner__content {
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgb(226 232 240 / 0.95);
}

.site-popup-banner__content p:last-child {
  margin-bottom: 0;
}

.site-popup-banner__cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.site-popup-banner__cta:hover {
  background: #f8fafc;
}

.site-popup-banner__close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgb(255 255 255 / 0.22);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.08);
  color: #fff;
  cursor: pointer;
}

.site-popup-banner__close:hover {
  background: rgb(255 255 255 / 0.16);
}

.site-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right))
    max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  background: rgb(15 23 42 / 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.site-popup-modal {
  position: relative;
  width: min(100%, 560px);
  max-height: min(88vh, 720px);
  overflow: auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 64px rgb(15 23 42 / 0.28);
}

.site-popup-modal--sm { width: min(100%, 420px); }
.site-popup-modal--md { width: min(100%, 560px); }
.site-popup-modal--lg { width: min(100%, 720px); }

/* Görsel içeren popup — viewport içine sığdır */
.site-popup-modal--has-media {
  width: min(calc(100vw - 1.5rem), 560px);
  max-height: calc(100dvh - 1.5rem);
  overflow: hidden;
}

.site-popup-modal--has-media.site-popup-modal--sm {
  width: min(calc(100vw - 1.5rem), 420px);
}

.site-popup-modal--has-media.site-popup-modal--lg {
  width: min(calc(100vw - 1.5rem), 640px);
}

/* Afiş popup — görsel öncelikli, iç scrollbar yok */
.site-popup-modal--poster {
  width: min(calc(100vw - 1.5rem), 440px);
}

.site-popup-modal--poster .site-popup-modal__body {
  display: block;
}

.site-popup-modal--poster .site-popup-modal__media {
  display: block;
  overflow: hidden;
  line-height: 0;
  text-align: center;
  background: #0b1220;
  border-radius: 18px 18px 0 0;
}

.site-popup-modal--poster .site-popup-modal__media img {
  display: inline-block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100dvh - 1.5rem - 3.75rem);
  object-fit: contain;
  vertical-align: top;
}

.site-popup-modal--poster .site-popup-modal__copy {
  padding: 0.75rem 1rem 0.95rem;
}

/* Afiş + kısa başlık: metin afişte zaten var, tam ekran görsel */
.site-popup-modal--poster.site-popup-modal--title-only .site-popup-modal__copy {
  display: none;
}

.site-popup-modal--poster.site-popup-modal--title-only .site-popup-modal__media {
  border-radius: 18px;
}

.site-popup-modal--poster.site-popup-modal--title-only .site-popup-modal__media img {
  max-height: calc(100dvh - 1.5rem);
}

.site-popup-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 999px;
  background: rgb(15 23 42 / 0.06);
  color: #334155;
  cursor: pointer;
}

.site-popup-modal__close:hover {
  background: rgb(15 23 42 / 0.12);
}

.site-popup-modal--has-media .site-popup-modal__close {
  background: rgb(15 23 42 / 0.72);
  color: #fff;
  border: 1px solid rgb(255 255 255 / 0.22);
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.25);
}

.site-popup-modal--has-media .site-popup-modal__close:hover {
  background: rgb(15 23 42 / 0.88);
}

.site-popup-modal__body {
  display: grid;
  grid-template-columns: 1fr;
}

.site-popup-modal--has-media .site-popup-modal__body {
  max-height: calc(100dvh - 1.5rem);
  overflow-y: auto;
}

.site-popup-modal--has-media:not(.site-popup-modal--poster) .site-popup-modal__media img {
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 1.5rem - 12rem);
  object-fit: contain;
}

.site-popup-modal--poster .site-popup-modal__body {
  overflow: hidden;
  max-height: none;
}

.site-popup-modal__copy {
  padding: 1.35rem 1.35rem 1.5rem;
}

.site-popup-modal__media {
  line-height: 0;
  background: #0b1220;
  border-radius: 18px 18px 0 0;
}

.site-popup-modal__media img {
  display: block;
  width: 100%;
  height: auto;
}

.site-popup-modal--poster .site-popup-modal__title {
  margin: 0;
  text-align: center;
  font-size: 1.0625rem;
}

.site-popup-modal--poster .site-popup-modal__copy:has(.site-popup-modal__title:only-child) {
  padding-top: 0.65rem;
  padding-bottom: 0.85rem;
}

.site-popup-modal__title {
  margin: 0 2rem 0.75rem 0;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  line-height: 1.25;
  color: #0f172a;
}

.site-popup-modal__content {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #334155;
}

.site-popup-modal__actions {
  margin-top: 1.15rem;
}

.site-popup-modal__cta {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #1d4ed8, #047857);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

.site-popup-modal__cta:hover {
  filter: brightness(1.05);
}

html.site-preset-ogrenci .site-popup-modal__title {
  font-family: var(--og-font-display, 'Fraunces', Georgia, serif);
}

@media (max-width: 640px) {
  .site-popup-banner__inner {
    flex-wrap: wrap;
  }

  .site-popup-banner__cta {
    width: 100%;
    justify-content: center;
  }

  .site-popup-modal--has-media {
    width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem);
  }

  .site-popup-modal--poster {
    width: calc(100vw - 1rem);
  }
}
