/* --------------------------------------------------
   CLEANUP UNUSED THEME ELEMENTS
-------------------------------------------------- */

.site-main .comment-navigation,
.site-main .posts-navigation,
.site-main .post-navigation,
.articlewave-site-layout--separate .articlewave-author-container {
    display: none;
}

/* Keep footer visible */
footer#colophon {
    display: block !important;
}

/* Optional: hide footer links */
.footer-text a {
    opacity: 0;
    pointer-events: none;
}

/* --------------------------------------------------
   GLOBAL AD CONTAINERS
-------------------------------------------------- */

.ad-container,
.widget_advertisement,
.articlewave-ad {
    display: block;
    width: 100%;
    min-height: 250px;
    margin: 40px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: #f3f3f3;
    clear: both;
    contain: layout paint;
}

/* Responsive ad creatives */

.ad-container img,
.widget_advertisement img,
.articlewave-ad img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

/* --------------------------------------------------
   SINGLE POST SPACING
-------------------------------------------------- */

.single-post .ad-container,
.single-post .articlewave-ad {
    margin: 60px 0;
}

/* --------------------------------------------------
   SIDEBAR ADS
-------------------------------------------------- */

.sidebar .widget_advertisement,
.sidebar-inner-wrap .widget_advertisement,
.sidebar-inner-wrap .ad-container {
    width: 100%;
    margin-bottom: 25px;
    min-height: 250px;
    position: relative;
    text-align: center;
}

/* --------------------------------------------------
   SIDEBAR AD LOADING OPTIMIZATION
-------------------------------------------------- */

/* Before ads load */

.sidebar-inner-wrap[data-slot-rendered-sidebarbtf="false"] 
.widget_advertisement,

.sidebar-inner-wrap[data-slot-rendered-sidebarbtf="false"] 
.ad-container {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

/* After ads load */

.sidebar-inner-wrap[data-slot-rendered-sidebarbtf="true"] 
.widget_advertisement,

.sidebar-inner-wrap[data-slot-rendered-sidebarbtf="true"] 
.ad-container {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.25s ease;
}

/* --------------------------------------------------
   REMOVE STICKY SIDEBAR REPAINTS
-------------------------------------------------- */

.theiaStickySidebar,
#secondary.widget-area.sidebar-layout-right-sidebar {
    position: static !important;
    top: auto !important;
    transform: none !important;
}

/* --------------------------------------------------
   MOBILE OPTIMIZATION
-------------------------------------------------- */

@media (max-width: 768px) {

    .ad-container,
    .widget_advertisement,
    .articlewave-ad {
        min-height: 120px;
        margin: 30px 0;
    }

    .sidebar .widget_advertisement {
        margin-bottom: 20px;
    }
}