/* Reklam alanları — ziyaretçi sayfaları */
.ad-slot {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin: 20px auto;
    padding: 8px 12px;
    box-sizing: border-box;
    overflow: hidden;
    min-height: 0;
}

.ad-slot ins.adsbygoogle {
    display: block;
    width: 100%;
    max-width: 728px;
    margin: 0 auto;
}

/* Ana sayfa — reklam alanı önizleme (dashed placeholder) */
.ad-slot--marker {
    position: relative;
    min-height: 110px;
    margin: 24px auto;
    padding: 14px 16px;
    border: 2px dashed rgba(59, 130, 246, 0.45);
    border-radius: 14px;
    background:
        repeating-linear-gradient(
            -45deg,
            rgba(239, 246, 255, 0.85),
            rgba(239, 246, 255, 0.85) 10px,
            rgba(219, 234, 254, 0.55) 10px,
            rgba(219, 234, 254, 0.55) 20px
        );
    gap: 8px;
}

.ad-slot--marker.ad-slot--off {
    min-height: 88px;
    border-color: rgba(148, 163, 184, 0.55);
    background:
        repeating-linear-gradient(
            -45deg,
            rgba(248, 250, 252, 0.95),
            rgba(248, 250, 252, 0.95) 10px,
            rgba(241, 245, 249, 0.85) 10px,
            rgba(241, 245, 249, 0.85) 20px
        );
    opacity: 0.92;
}

.ad-slot__marker-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.2;
}

.ad-slot--off .ad-slot__marker-label {
    color: #64748b;
    border-color: rgba(148, 163, 184, 0.35);
}

.ad-slot__marker-note {
    color: #475569;
    font-size: 0.8125rem;
    font-weight: 500;
    text-align: center;
}

.ad-slot--marker:has(ins.adsbygoogle),
.ad-slot--marker:has(iframe) {
    min-height: 110px;
    background: rgba(248, 250, 252, 0.65);
}

.ad-slot--marker:has(ins.adsbygoogle) .ad-slot__marker-note,
.ad-slot--marker:has(iframe) .ad-slot__marker-note {
    display: none;
}

/* Ders / ünite sayfaları */
.unit-main .ad-slot {
    margin: 16px 0 24px;
}

.unit-shell > .ad-slot:first-child {
    margin-top: 0;
}

/* Ana sayfa bölüm arası */
.home-section + .ad-slot,
.ad-slot + .home-section {
    margin-top: 0;
}

.ad-slot-wrap {
    margin: 0 auto;
}

.ad-slot-wrap .ad-slot--marker {
    margin-left: auto;
    margin-right: auto;
}

/* Ana sayfa — sol/sağ dikey reklam rayları */
.ad-rails {
    pointer-events: none;
}

.ad-rail {
    position: fixed;
    top: 96px;
    bottom: 24px;
    width: 160px;
    z-index: 40;
    pointer-events: auto;
}

.ad-rail--left {
    left: max(8px, calc((100vw - 1280px) / 2 - 176px));
}

.ad-rail--right {
    right: max(8px, calc((100vw - 1280px) / 2 - 176px));
}

.ad-slot-wrap--rail {
    height: 100%;
    width: 100%;
    margin: 0;
}

.ad-slot--sidebar {
    min-height: 320px;
    height: 100%;
    max-height: calc(100vh - 120px);
    width: 100%;
    margin: 0;
    padding: 10px 8px;
}

.ad-slot--sidebar .ad-slot__marker-label {
    font-size: 0.62rem;
    text-align: center;
    line-height: 1.25;
}

.ad-slot--sidebar .ad-slot__custom,
.ad-slot--sidebar ins.adsbygoogle {
    width: 100%;
    max-width: 160px;
}

.ad-slot__custom {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.ad-slot--marker:has(.ad-slot__custom ins.adsbygoogle),
.ad-slot--marker:has(.ad-slot__custom iframe),
.ad-slot--marker:has(.ad-slot__custom script) {
    background: rgba(248, 250, 252, 0.65);
}

.ad-slot--marker:has(.ad-slot__custom) .ad-slot__marker-note {
    display: none;
}

.ad-slot--marker + .home-section,
.home-section + .ad-slot-wrap {
    margin-top: 8px;
}

@media (max-width: 720px) {
    .ad-slot {
        margin: 14px auto;
        padding: 6px 8px;
    }

    .ad-slot--marker {
        min-height: 96px;
        margin: 18px auto;
        padding: 12px;
    }
}

@media (max-width: 1480px) {
    .ad-rails {
        display: none;
    }
}
