/* ============================================
   Naba Ads — Ad Container Styles
   ============================================ */

/* ── حاوية الإعلان العامة ── */
.naba-ad {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    overflow: hidden;
    clear: both;
    text-align: center;
}

.naba-ad img.naba-ad-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.naba-ad a {
    display: inline-block;
    line-height: 0;
}

/* ── إعلان الهيدر ── */
.naba-ad-header {
    margin: 0;
}

/* ── إعلانات بين أقسام الرئيسية ── */
.naba-ad-home_after_slider,
.naba-ad-home_after_grid,
.naba-ad-home_after_third,
.naba-ad-home_after_spotlight,
.naba-ad-home_after_video {
    margin: 25px auto;
    padding: 10px 0;
}

/* ── إعلانات السايدبار ── */
.naba-ad-home_front_sidebar_top,
.naba-ad-home_front_sidebar_bottom,
.naba-ad-home_third_sidebar_top,
.naba-ad-home_third_sidebar_bottom,
.naba-ad-home_tiled_sidebar_top,
.naba-ad-home_tiled_sidebar_bottom,
.naba-ad-home_point_sidebar_top,
.naba-ad-home_point_sidebar_bottom,
.naba-ad-single_sidebar,
.naba-ad-archive_sidebar {
    margin: 15px 0;
}

/* ── إعلان وسط المقال ── */
.naba-ad-single_mid_content {
    margin: 25px auto;
}

/* ── إعلان ثابت عائم أسفل الشاشة ── */
.naba-sticky-footer-ad {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.85);
    padding: 8px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.3);
    animation: naba-slide-up 0.4s ease-out;
}

.naba-sticky-footer-close {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--naba-primary, #0d3b4c);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
}

.naba-sticky-footer-close:hover {
    background: #c0392b;
}

.naba-sticky-footer-content {
    text-align: center;
}

.naba-sticky-footer-content img {
    max-height: 90px;
    width: auto;
}

@keyframes naba-slide-up {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* ── إعلان الشاشة الكاملة (Interstitial) ── */
.naba-interstitial {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.naba-interstitial-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.naba-interstitial-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 85vh;
    animation: naba-scale-in 0.35s ease-out;
}

.naba-interstitial-close {
    position: absolute;
    top: -18px;
    left: -18px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--naba-primary, #0d3b4c);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.2s, transform 0.2s;
}

.naba-interstitial-close:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.naba-interstitial-close:not(:disabled):hover {
    background: #c0392b;
    transform: scale(1.1);
}

.naba-interstitial-timer {
    font-size: 14px;
    font-weight: 700;
}

.naba-interstitial-body {
    text-align: center;
}

.naba-interstitial-body img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
}

@keyframes naba-scale-in {
    from {
        transform: scale(0.85);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ── Responsive ── */
@media (max-width: 768px) {

    .naba-ad-header,
    .naba-ad-below_header,
    .naba-ad-above_footer {
        margin: 10px auto;
    }

    .naba-sticky-footer-content img {
        max-height: 50px;
    }

    .naba-interstitial-content {
        max-width: 95vw;
    }

    .naba-interstitial-close {
        top: -14px;
        left: -14px;
        width: 32px;
        height: 32px;
    }
}