/* Ad Containers */
.ad-container {
    margin: 20px 0;
    text-align: center;
    overflow: hidden;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 10px;
}

/* Responsive Ad Container */
.responsive-ad {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    text-align: center;
}

/* Sticky Sidebar Ad */
.sticky-ad {
    position: sticky;
    top: 20px;
    text-align: center;
    margin-bottom: 20px;
    z-index: 100;
}

/* In-content Ad */
.in-content-ad {
    margin: 30px auto;
    text-align: center;
    clear: both;
}

/* Header Ad */
.header-ad {
    background: #fff;
    padding: 10px 0;
    margin: 0 auto;
    text-align: center;
    border-bottom: 1px solid #eee;
}

/* Footer Ad */
.footer-ad {
    background: #f5f5f5;
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
    border-top: 1px solid #eee;
}

/* Ad Placeholder (before ads load) */
.ad-placeholder {
    background: #f0f0f0;
    color: #999;
    padding: 40px 20px;
    text-align: center;
    font-size: 14px;
    border: 1px dashed #ccc;
    border-radius: 4px;
    margin: 20px 0;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .sticky-ad {
        position: static;
        margin: 20px auto;
    }
    
    .header-ad {
        padding: 10px;
    }
}

@media (max-width: 768px) {
    .ad-container, .responsive-ad, .in-content-ad {
        margin: 15px 0;
        padding: 5px;
    }
    
    .header-ad {
        padding: 5px;
    }
}

/* AdSense Responsive Fix */
.adsbygoogle {
    margin: 0 auto;
}

/* Hide empty ad containers */
.ad-container:empty {
    display: none;
}

/* Loading animation for ads */
@keyframes adLoading {
    0% { opacity: 0.5; }
    50% { opacity: 0.8; }
    100% { opacity: 0.5; }
}

.ad-loading {
    animation: adLoading 1.5s infinite;
    background: #f0f0f0;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}
