/* Google AdSense and Ad Section Styling */

.ad-section {
    padding: 20px 0;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    margin: 30px 0;
}

.ad-container {
    text-align: center;
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

.ad-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    font-weight: 500;
}

/* Top Banner Ad */
.top-banner-ad {
    margin-top: 0;
    background: linear-gradient(135deg, #fff8e1 0%, #f3e5f5 100%);
}

.top-banner-ad .ad-container {
    max-width: 728px;
}

/* Responsive Rectangle Ad */
.responsive-ad {
    background-color: #fafafa;
}

.responsive-ad .ad-container {
    max-width: 336px;
}

/* Sidebar Ad */
.sidebar-ad {
    background-color: #f5f5f5;
    padding: 15px 0;
}

.sidebar-ad .ad-container {
    max-width: 300px;
}

/* Bottom Banner Ad */
.bottom-banner-ad {
    margin-bottom: 0;
    background: linear-gradient(135deg, #e8f5e8 0%, #e3f2fd 100%);
}

.bottom-banner-ad .ad-container {
    max-width: 728px;
}

/* AdSense Units Styling */
.adsbygoogle {
    display: block !important;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background-color: white;
    min-height: 250px;
}

/* Mobile Responsive Ad Styling */
@media (max-width: 768px) {
    .ad-section {
        padding: 15px 0;
        margin: 20px 0;
    }
    
    .top-banner-ad .ad-container,
    .bottom-banner-ad .ad-container {
        max-width: 320px;
    }
    
    .sidebar-ad .ad-container,
    .responsive-ad .ad-container {
        max-width: 300px;
    }
    
    .ad-label {
        font-size: 10px;
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    .ad-section {
        padding: 10px 0;
        margin: 15px 0;
    }
    
    .ad-container {
        padding: 0 10px;
    }
    
    .adsbygoogle {
        min-height: 200px;
    }
}

/* AdSense Compliance Styling */
.ad-disclosure {
    font-size: 10px;
    color: #888;
    text-align: center;
    margin-top: 5px;
    line-height: 1.2;
}

.ad-choices {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 9px;
    color: #999;
    text-decoration: none;
}

.ad-choices:hover {
    color: #666;
}

/* Cookie Consent Banner */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 15px;
    z-index: 10000;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-consent.show {
    transform: translateY(0);
}

.cookie-consent p {
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.4;
}

.cookie-consent-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cookie-btn.accept {
    background-color: #ff9800;
    color: white;
}

.cookie-btn.accept:hover {
    background-color: #f57c00;
}

.cookie-btn.decline {
    background-color: transparent;
    color: white;
    border: 1px solid #666;
}

.cookie-btn.decline:hover {
    background-color: #333;
}

.cookie-btn.settings {
    background-color: #666;
    color: white;
}

.cookie-btn.settings:hover {
    background-color: #555;
}

/* Language Selector Enhancements for RTL */
.language-selector[dir="rtl"] {
    margin-right: 1rem;
    margin-left: 0;
}

.language-selector[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
}

/* AdSense Loading Animation */
.ad-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 250px;
    background-color: #f0f0f0;
    border-radius: 8px;
}

.ad-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid #ddd;
    border-top: 3px solid #ff9800;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ad Placeholder for Development */
.ad-placeholder {
    background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%), 
                linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #f0f0f0 75%), 
                linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    color: #888;
    font-size: 14px;
    font-weight: 500;
}

/* SEO and Accessibility Enhancements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .ad-section {
        border-color: #000;
    }
    
    .ad-label {
        color: #000;
        font-weight: bold;
    }
    
    .adsbygoogle {
        border: 2px solid #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent {
        transition: none;
    }
    
    .ad-loading::after {
        animation: none;
    }
}