/* ============================================
   CUSTOM ADS (Your own banner ads)
   ============================================ */

/* Ad Zone Container */
.custom-ad-zone {
    margin: 30px 0;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
}

.custom-ad-zone:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(0, 229, 255, 0.2);
}

/* Ad Link */
.custom-ad-link {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.custom-ad-link:hover {
    transform: scale(1.02);
}

/* Ad Image */
.custom-ad-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Sidebar Ad (Sticky) */
.sidebar-custom-ad {
    position: sticky;
    top: 100px;
    margin-bottom: 30px;
}

.sidebar-custom-ad .custom-ad-zone {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.05), rgba(138, 43, 226, 0.05));
    border: 1px solid rgba(0, 229, 255, 0.15);
}

/* Header Ad (Leaderboard) */
.header-custom-ad {
    margin: 20px auto;
    max-width: 970px;
}

.header-custom-ad .custom-ad-zone {
    padding: 10px;
}

/* In-Article Ad */
.in-article-custom-ad {
    margin: 40px auto;
    max-width: 728px;
}

/* Category Ad */
.category-custom-ad {
    margin: 40px auto;
    max-width: 728px;
    text-align: center;
}

/* Tag Page Ads */
.tag-mid-ad {
    margin: 40px auto;
    max-width: 728px;
    text-align: center;
}

.tag-before-articles-ad {
    margin: 40px auto;
    max-width: 728px;
    text-align: center;
}

.tag-bottom-ad {
    margin: 40px auto;
    max-width: 728px;
    text-align: center;
}

/* Tag Page Header Ad */
.tag-page .header-custom-ad {
    margin: 30px auto;
    max-width: 970px;
}

.tag-page .header-custom-ad .custom-ad-zone {
    padding: 15px;
}

/* Rotating Ad */
.custom-ad-link.rotating {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Ad Label (Optional - shows "Advertisement") */
.custom-ad-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    opacity: 0.6;
}

/* ============================================
   LIGHT MODE
   ============================================ */

[data-theme="light"] .custom-ad-zone {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .custom-ad-zone:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 229, 255, 0.3);
}

[data-theme="light"] .sidebar-custom-ad .custom-ad-zone {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.08), rgba(138, 43, 226, 0.08));
    border-color: rgba(0, 229, 255, 0.2);
}

[data-theme="light"] .custom-ad-image {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .sidebar-custom-ad {
        position: relative;
        top: auto;
    }
}

@media (max-width: 768px) {
    .custom-ad-zone {
        padding: 10px;
        margin: 20px 0;
    }
    
    .header-custom-ad .custom-ad-zone {
        padding: 8px;
    }
    
    .in-article-custom-ad {
        margin: 30px auto;
    }
    
    /* Tag page ads responsive */
    .tag-mid-ad,
    .tag-before-articles-ad,
    .tag-bottom-ad {
        margin: 30px auto;
    }
    
    /* Scale down large ads on mobile */
    .custom-ad-image {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .custom-ad-zone {
        padding: 8px;
        margin: 15px 0;
    }
}

