/* ============================================
   ADSENSE STYLES FOR BESTHAIRCLINIC
   Optimized ad positions for maximum CTR
   ============================================ */

/* Base AdSense Container */
.adsense-slot {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    overflow: hidden;
}

/* Header Leaderboard (728x90) */
.adsense-header-leaderboard {
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

.dark .adsense-header-leaderboard {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-bottom-color: #334155;
}

/* Footer Banner (970x250 or 728x90) */
.adsense-footer-banner {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
}

.dark .adsense-footer-banner {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

/* In-Feed Ads (Native Ads) */
.adsense-in-feed {
    background: #ffffff;
    border-radius: 16px;
    border: 2px dashed #e5e7eb;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.adsense-in-feed:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.dark .adsense-in-feed {
    background: #1e293b;
    border-color: #334155;
}

.dark .adsense-in-feed:hover {
    border-color: #60a5fa;
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.2);
}

/* Sidebar Sticky Ad (300x600 or 336x280) */
.adsense-sidebar {
    position: sticky;
    top: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 12px;
    min-height: 600px;
}

.dark .adsense-sidebar {
    background: #1e293b;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .adsense-header-leaderboard .adsense-slot {
        min-height: 50px;
    }
    
    .adsense-footer-banner .adsense-slot {
        min-height: 100px;
    }
    
    .adsense-sidebar {
        position: static;
        margin-bottom: 20px;
        min-height: 280px;
    }
}

/* Ad Label */
.adsense-slot::before {
    content: '';
    display: none;
}

.adsense-label {
    font-size: 10px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: block;
    text-align: center;
}

/* Placeholder Styling (for development) */
.adsense-slot > div {
    border: 1px solid #e5e7eb;  
}

.dark .adsense-slot > div {
    border-color: #374151;
}

/* In-Feed Ad Wrapper for Grid */
.adsense-in-feed-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Prevent layout shift */
.adsense-slot[data-ad-format="auto"] {
    width: 100%;
    display: block;
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    .adsense-header-leaderboard {
        display: block;
    }
    
    .adsense-slot {
        width: 100%;
        overflow-x: auto;
    }
}

/* AdSense Loading Animation */
@keyframes adsense-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.adsense-loading {
    animation: adsense-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* High Performance Settings */
.adsense-slot ins {
    display: block;
    text-align: center;
}

/* Prevent Ad Blocker Detection Conflicts */
.adsense-slot[data-loaded="true"] {
    min-height: 0;
}
