/* General Ad Container */
.ad-container {
    position: relative;
    width: 100%;
    margin: 1rem 0;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Ad Images */
.ad-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.ad-link:hover .ad-image {
    transform: scale(1.05);
}

/* Popup Ads */
.ad-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
}

.ad-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: background-color 0.3s ease;
}

.ad-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Position-specific styles */
.ad-header {
    width: 100%;
    height: auto;
    max-height: 200px;
    margin-bottom: 1rem;
}

.ad-footer {
    width: 100%;
    height: auto;
    max-height: 150px;
    margin-top: 1rem;
}

.ad-sidebar {
    width: 100%;
    max-width: 300px;
    margin: 1rem auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ad-popup {
        width: 95vw;
    }
    
    .ad-sidebar {
        max-width: 100%;
    }
}
