/* =========================================================
   Duyuru / Bilgilendirme Popup — Bursa Aile Danışmanlığı
   js/duyuru-popup.js tarafından oluşturulur.
   Tema renkleri JS'ten --dy-renk / --dy-koyu / --dy-cizgi ile gelir.
   ========================================================= */
html.bad-dy-kilit { overflow: hidden; }

.bad-dy {
    position: fixed; inset: 0; z-index: 99998; /* çerez bandının (99998) üstünde, randevu formunun (99999) altında */
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    --dy-renk: #1f3a4a; --dy-koyu: #1f3a4a; --dy-cizgi: #c69b3d;
}
.bad-dy *, .bad-dy *::before, .bad-dy *::after { box-sizing: border-box; }

.bad-dy-perde {
    position: absolute; inset: 0;
    background: rgba(15, 25, 32, .62);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    opacity: 0; transition: opacity .35s ease;
}

.bad-dy-kart {
    position: relative; width: 100%; max-width: 520px;
    max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px);
    display: flex; flex-direction: column;
    background: #faf7f2; border-radius: 18px; overflow: hidden;
    box-shadow: 0 50px 120px -30px rgba(15, 25, 32, .7), 0 0 0 1px rgba(255, 255, 255, .5) inset;
    opacity: 0; transform: translateY(28px) scale(.97);
    transition: opacity .4s cubic-bezier(.2, .7, .3, 1), transform .45s cubic-bezier(.2, .7, .3, 1);
}
.bad-dy-kart:focus { outline: none; }
.bad-dy.acik .bad-dy-perde { opacity: 1; }
.bad-dy.acik .bad-dy-kart { opacity: 1; transform: none; }

/* Kapat (X) */
.bad-dy-x {
    position: absolute; top: 14px; right: 14px; z-index: 4;
    width: 38px; height: 38px; padding: 0; margin: 0;
    border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .94); color: #1f3a4a;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .35);
    transition: transform .25s ease, background-color .2s ease;
}
.bad-dy-x svg { width: 18px; height: 18px; }
.bad-dy-x:hover { transform: rotate(90deg); background: #fff; }

/* Üst bölüm: görsel veya tema bandı */
.bad-dy-bant {
    position: relative; flex: 0 0 auto; height: 118px;
    background-color: var(--dy-renk);
    background-image:
        radial-gradient(circle at 14% 18%, rgba(255, 255, 255, .16) 0 54px, transparent 55px),
        radial-gradient(circle at 92% 120%, rgba(255, 255, 255, .12) 0 96px, transparent 97px),
        radial-gradient(circle at 70% -30%, rgba(255, 255, 255, .08) 0 70px, transparent 71px),
        linear-gradient(135deg, rgba(255, 255, 255, .10), rgba(0, 0, 0, .14));
    box-shadow: inset 0 -3px 0 var(--dy-cizgi);
}
.bad-dy-gorsel {
    position: relative; flex: 0 0 auto; background: var(--dy-renk);
}
.bad-dy-gorsel img {
    display: block; width: 100%; height: auto; max-height: 270px;
    object-fit: cover; margin: 0; border: 0; border-bottom: 3px solid var(--dy-cizgi);
}

/* Tema ikonu (üst bölümün altına taşar) */
.bad-dy-ikon {
    position: relative; z-index: 3; flex: 0 0 auto;
    width: 68px; height: 68px; margin: -34px auto 0;
    border-radius: 50%; border: 4px solid #faf7f2;
    background: #fff; color: var(--dy-renk);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 12px 28px -10px rgba(15, 25, 32, .45);
}
.bad-dy-ikon svg { width: 30px; height: 30px; }

/* İçerik */
.bad-dy-govde {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 14px 38px 4px; text-align: center;
}
.bad-dy-ust {
    display: inline-flex; align-items: center; gap: 10px;
    margin: 0 0 8px; font-size: 11.5px; font-weight: 600; line-height: 1.4;
    letter-spacing: 1.8px; text-transform: uppercase; color: var(--dy-koyu);
}
.bad-dy-ust::before, .bad-dy-ust::after {
    content: ""; width: 20px; height: 1px; background: currentColor; opacity: .45;
}
.bad-dy .bad-dy-baslik {
    margin: 0 0 12px; padding: 0;
    font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    font-size: 31px; font-weight: 600; line-height: 1.15; letter-spacing: 0;
    text-transform: none; color: #1f3a4a;
}
.bad-dy-icerik {
    font-size: 15px; line-height: 1.7; color: #5b6068; text-align: center; word-wrap: break-word;
}
.bad-dy-kart.bad-dy-uzun { max-width: 600px; }
.bad-dy-uzun .bad-dy-icerik { text-align: left; font-size: 14.5px; }
.bad-dy-icerik p { margin: 0 0 10px; font-size: inherit; line-height: inherit; color: inherit; }
.bad-dy-icerik p:last-child { margin-bottom: 0; }
.bad-dy-icerik a { color: var(--dy-koyu); text-decoration: underline; text-underline-offset: 3px; }
.bad-dy-icerik strong, .bad-dy-icerik b { color: #2d2d2d; font-weight: 600; }
.bad-dy-icerik ul, .bad-dy-icerik ol { display: inline-block; margin: 4px 0 10px; padding-left: 20px; text-align: left; }
.bad-dy-icerik ul { list-style: disc; }
.bad-dy-icerik ol { list-style: decimal; }
.bad-dy-icerik li { display: list-item; margin: 0 0 4px; list-style: inherit; }
.bad-dy-icerik li::marker { color: var(--dy-renk); }
.bad-dy-icerik img { max-width: 100%; height: auto; border-radius: 8px; }
.bad-dy-icerik h2, .bad-dy-icerik h3, .bad-dy-icerik h4, .bad-dy-icerik h5, .bad-dy-icerik h6 {
    margin: 12px 0 6px; font-size: 17px; line-height: 1.35; font-weight: 600; color: #1f3a4a;
}
.bad-dy-icerik blockquote {
    margin: 10px 0; padding: 10px 14px; border-left: 3px solid var(--dy-cizgi);
    background: rgba(31, 58, 74, .05); text-align: left; font-size: 14.5px;
}

/* Alt: butonlar */
.bad-dy-alt {
    flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 20px 38px 26px;
}
.bad-dy .bad-dy-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; margin: 0; padding: 15px 22px;
    border: 0; border-radius: 10px;
    background: var(--dy-koyu); color: #fff;
    font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.2;
    letter-spacing: .6px; text-transform: none; text-decoration: none;
    cursor: pointer;
    box-shadow: 0 14px 28px -14px rgba(15, 25, 32, .6);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.bad-dy .bad-dy-btn:hover, .bad-dy .bad-dy-btn:focus { color: #fff; text-decoration: none; }
.bad-dy .bad-dy-btn:hover { transform: translateY(-2px); filter: brightness(1.15); box-shadow: 0 18px 32px -14px rgba(15, 25, 32, .65); }
.bad-dy-btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.bad-dy-sonra {
    margin: 0; padding: 8px 12px; border: 0; background: none;
    font-family: inherit; font-size: 13px; font-weight: 500; color: #8a9097;
    cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.bad-dy-sonra:hover { color: #1f3a4a; }

.bad-dy-x:focus-visible, .bad-dy .bad-dy-btn:focus-visible, .bad-dy-sonra:focus-visible {
    outline: 3px solid #c69b3d !important; outline-offset: 2px; /* style.css button{outline:none!important} */
}

/* Mobil: alttan açılan kart */
@media (max-width: 575px) {
    .bad-dy { align-items: flex-end; padding: 0; }
    .bad-dy-kart {
        max-width: none; border-radius: 22px 22px 0 0;
        max-height: 92vh; max-height: 92dvh;
        transform: translateY(100%);
    }
    .bad-dy.acik .bad-dy-kart { transform: none; }
    .bad-dy-kart::before {
        content: ""; position: absolute; top: 8px; left: 50%; z-index: 4;
        width: 42px; height: 4px; margin-left: -21px; border-radius: 4px;
        background: rgba(255, 255, 255, .7);
    }
    .bad-dy-x { top: 16px; right: 12px; width: 34px; height: 34px; }
    .bad-dy-bant { height: 96px; }
    .bad-dy-gorsel img { max-height: 200px; }
    .bad-dy-govde { padding: 12px 22px 4px; }
    .bad-dy .bad-dy-baslik { font-size: 26px; }
    .bad-dy-icerik { font-size: 14.5px; }
    .bad-dy-alt { padding: 16px 22px calc(18px + env(safe-area-inset-bottom, 0px)); }
}

/* Alçak ekranlar (yatay telefon): görsel ve boşluklar küçülsün, metin ve butonlar sığsın */
@media (max-height: 560px) {
    .bad-dy-gorsel img { max-height: 28vh; }
    .bad-dy-bant { height: 64px; }
    .bad-dy-ikon { width: 56px; height: 56px; margin-top: -28px; }
    .bad-dy-ikon svg { width: 24px; height: 24px; }
    .bad-dy .bad-dy-baslik { font-size: 24px; margin-bottom: 8px; }
    .bad-dy-alt { padding-top: 10px; padding-bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .bad-dy-perde, .bad-dy-kart, .bad-dy-x, .bad-dy .bad-dy-btn { transition: none; }
}
