/* Custom Ads Styles */
.custom-ad {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    background: #fff;
    transition: all 0.3s ease;
}

.custom-ad:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* Position-specific styles */
.custom-ad--top {
    margin-bottom: 30px;
}

.custom-ad--sidebar {
    margin-bottom: 25px;
}

.custom-ad--bottom {
    margin-top: 30px;
    margin-bottom: 20px;
}

.custom-ad--inline {
    margin: 20px 0;
    display: inline-block;
    width: 100%;
}

/* Image styles */
.custom-ad__image {
    position: relative;
    overflow: hidden;
}

.custom-ad__image img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.custom-ad__image:hover img {
    transform: scale(1.05);
}

/* Content styles */
.custom-ad__content {
    padding: 15px;
}

.custom-ad__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
}

.custom-ad__text {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 12px;
}

.custom-ad__action {
    text-align: center;
}

.custom-ad__button {
    display: inline-block;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.custom-ad__button:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Responsive styles */
@media (max-width: 768px) {
    .custom-ad {
        margin-bottom: 15px;
    }
    
    .custom-ad__content {
        padding: 12px;
    }
    
    .custom-ad__title {
        font-size: 1rem;
    }
    
    .custom-ad__text {
        font-size: 0.85rem;
    }
}

/* Special styles for different positions */
.custom-ad--top {
    border-left: 4px solid #007bff;
}

.custom-ad--sidebar {
    border-left: 4px solid #28a745;
}

.custom-ad--bottom {
    border-left: 4px solid #ffc107;
}

.custom-ad--inline {
    border-left: 4px solid #dc3545;
}

/* Animation for new ads */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-ad {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading placeholder */
.custom-ad--loading {
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.custom-ad--loading::before {
    content: "Loading ad...";
    font-style: italic;
}

/* Ad label */
.custom-ad::after {
    content: "Ad";
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
    z-index: 10;
}

.custom-ad {
    position: relative;
}

/* Multiple ads container */
.custom-ads-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.custom-ads-container--horizontal {
    flex-direction: row;
    flex-wrap: wrap;
}

.custom-ads-container--horizontal .custom-ad {
    flex: 1;
    min-width: 250px;
    margin-right: 15px;
    margin-bottom: 0;
}

.custom-ads-container--horizontal .custom-ad:last-child {
    margin-right: 0;
}

@media (max-width: 768px) {
    .custom-ads-container--horizontal {
        flex-direction: column;
    }
    
    .custom-ads-container--horizontal .custom-ad {
        margin-right: 0;
        margin-bottom: 15px;
    }
}