/* DesignMaster Ads - Public Styles */

.dm-ads-container {
    position: relative;
    display: block;
    overflow: hidden;
    margin: 20px auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dm-ads-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.dm-ads-banner {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    background: #f5f5f5;
}

/* Lazy Loading */
.dm-ads-banner-image {
    display: block;
    width: 100%;
    height: auto;
    transition: opacity 0.3s ease;
}

.dm-ads-banner-image[loading="lazy"] {
    opacity: 0;
}

.dm-ads-banner-image[loading="lazy"].loaded,
.dm-ads-banner-image:not([loading="lazy"]) {
    opacity: 1;
}

/* Loading Placeholder */
.dm-ads-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 0px, #f8f8f8 40px, #f0f0f0 80px);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    z-index: -1;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.dm-ads-banner img {
    display: block;
    width: 100%;
    height: auto;
}

.dm-ads-banner a {
    display: block;
    text-decoration: none;
}

/* Timed rotation banners */
.dm-ads-timed {
    position: relative;
}

.dm-ads-timed .dm-ads-slide {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.dm-ads-timed .dm-ads-slide.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Navigation dots for timed rotation */
.dm-ads-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dm-ads-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease;
}

.dm-ads-dot.active {
    background: rgba(255, 255, 255, 0.9);
}

/* Responsive */
@media (max-width: 768px) {
    .dm-ads-container {
        margin: 10px auto;
    }
}
