/* Ad Placeholder Styles */
.ad-container {
    position: relative;
    background-color: #f1f1f1;
    margin: 0 auto 10px; /* Center and add bottom margin */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ad-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #888;
    background-color: #f9f9f9;
    font-size: 12px;
    font-family: sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 1; /* Ensure it stays below the ad iframe but above the container background */
    border: 1px solid #e0e0e0;
}

/* Hide placeholder when ad is loaded */
.ad-container.ad-loaded .ad-placeholder {
    display: none;
}

/* Ensure the ad slot itself is visible above placeholder */
.ad-container div[id^="div-gpt-ad"] {
    position: relative;
    z-index: 2;
}

/* Specific Sizes to reserve space */
.ad-container.size-728x90 {
    width: 728px;
    height: 90px;
}

.ad-container.size-300x250 {
    width: 300px;
    height: 250px;
}

.ad-container.size-320x50 {
    width: 320px;
    height: 50px;
}

.ad-container.size-120x600 {
    width: 120px;
    height: 600px;
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
    .ad-container.size-728x90 {
        width: 320px; /* Fallback for mobile if 728 is used (though usually it shouldn't be) */
        height: 50px;
        display: none; /* Often 728 ads are hidden on mobile */
    }
    
    /* Adjust container width if it overflows */
    .ad-container {
        max-width: 100%;
    }
}
