/* Advertisement System Components Style */

/* General Containers */
.ad-modern-container {
    margin: 2rem 0;
    transition: transform 0.3s ease;
}

.ad-code-container {
    margin: 2rem auto;
    max-width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

/* Premium Card Design */
.ad-modern-card {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.ad-modern-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 30px 60px rgba(99, 102, 241, 0.4) !important;
}

/* Gradient Background */
.ad-gradient-bg {
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.15), transparent),
        linear-gradient(135deg, rgba(99, 102, 241, 0.8) 0%, rgba(168, 85, 247, 0.8) 100%);
    opacity: 0.95;
    z-index: 1;
}

.ad-content-wrapper {
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
}

/* Text & Content */
.ad-title {
    font-size: 1.6rem;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

.ad-description {
    font-size: 0.95rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
    max-width: 450px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}

/* CTA Button */
.ad-cta-button {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: white;
    color: #4f46e5;
    padding: 0.5rem 1.5rem;
    border-radius: 50rem;
    font-weight: 700;
}

.ad-modern-card:hover .ad-cta-button {
    background-color: #22d3ee !important;
    color: #0f172a !important;
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(34, 211, 238, 0.4);
}

/* Image Section */
.ad-image-frame {
    width: 240px;
    aspect-ratio: 16 / 9;
    height: auto;
    transition: all 0.4s ease;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.ad-modern-card:hover .ad-image-frame {
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
}

.ad-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s ease;
}

.ad-modern-card:hover .ad-image {
    transform: scale(1.08);
}

.ad-image-overlay {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ad-modern-card:hover .ad-image-overlay {
    opacity: 1;
}

/* Decorative Elements */
.ad-decorative-circle {
    background: rgba(255, 255, 255, 0.05);
    z-index: 1;
    position: absolute;
    border-radius: 50%;
}

.ad-circle-1 {
    width: 140px;
    height: 140px;
    top: -30px;
    right: -30px;
}

.ad-circle-2 {
    width: 90px;
    height: 90px;
    bottom: -20px;
    left: -20px;
}

.ad-circle-3 {
    width: 60px;
    height: 60px;
    top: 40%;
    left: 5%;
}

/* Layout-Specific Adjustments */
[data-slot="slider-alti-leaderboard"] .ad-content-wrapper {
    min-height: 120px;
    padding: 1rem 2rem !important;
}

[data-slot="slider-alti-leaderboard"] .ad-title {
    font-size: 1.5rem;
    margin-bottom: 0.25rem !important;
}

[data-slot="slider-alti-leaderboard"] .ad-image-frame {
    width: 150px;
    height: 90px;
}

[data-slot="sidebar-sticky"] .ad-modern-card {
    min-height: 300px;
}

[data-slot="sidebar-sticky"] .ad-content-wrapper {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
}

[data-slot="sidebar-sticky"] .ad-image-frame {
    width: 100%;
    height: 150px;
}

/* Sticky Structures */
.sticky-sidebar-ad {
    position: sticky;
    top: 1rem;
    z-index: 100;
}

.mobile-sticky-ad {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(34, 211, 238, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 991.98px) {
    .ad-content-wrapper {
        flex-direction: column !important;
        text-align: center;
        padding: 2rem !important;
    }

    .ad-text-section {
        align-items: center;
        display: flex;
        flex-direction: column;
    }

    .ad-title {
        font-size: 1.6rem;
    }

    .ad-image-frame {
        width: 100%;
        height: 180px;
        margin-top: 1rem;
    }

    .ad-description {
        max-width: 100%;
    }
}

@media (max-width: 575.98px) {
    .ad-title {
        font-size: 1.4rem;
    }

    .ad-description {
        display: none;
    }
}

/* Dark Mode Support */
[data-theme="dark"] .ad-modern-card {
    background: linear-gradient(135deg, #4338ca 0%, #7e22ce 100%);
    border-color: rgba(255, 255, 255, 0.05);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    .ad-modern-card,
    .ad-image,
    .ad-cta-button {
        transition: none !important;
        transform: none !important;
    }
}