/* Ad Styles */
.ad-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    text-align: center;
}

.ad-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0.5rem 0;
}

.ad-1x1 {
    width: 100%;
    aspect-ratio: 1/1;
    background: linear-gradient(135deg, var(--light) 0%, #f0f0f0 100%);
    border: 1px dashed var(--primary);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.ad-1x1:hover {
    background: linear-gradient(135deg, #f8f8f8 0%, #e8e8e8 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Horizontal Ad */
.horizontal-ad {
    padding: 20px 0;
    background-color: #f8f9fa;
    margin: 30px 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.ad-horizontal {
    width: 100%;
    height: 90px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 15px;
    transition: all 0.3s ease;
}

.ad-horizontal .ad-content {
    color: #4a5568;
}

.ad-horizontal .ad-content p {
    margin: 0 0 5px;
    font-weight: 500;
    font-size: 1.1rem;
}

.ad-horizontal .ad-content small {
    font-size: 0.8rem;
    opacity: 0.8;
}

.ad-horizontal:hover {
    background: linear-gradient(135deg, #eef2f7 0%, #d9e0e6 100%);
    border-color: #a0aec0;
}

/* Horizontal Ad */
.horizontal-ad {
    padding: 20px 0;
    margin: 30px 0;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.ad-horizontal {
    width: 100%;
    min-height: 90px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 15px;
    transition: all 0.3s ease;
}

.ad-horizontal .ad-content {
    color: #4a5568;
}

.ad-horizontal .ad-content p {
    margin: 0 0 5px;
    font-weight: 500;
    font-size: 1.1rem;
}

.ad-horizontal .ad-content small {
    font-size: 0.8rem;
    opacity: 0.8;
}

.ad-horizontal:hover {
    background: linear-gradient(135deg, #eef2f7 0%, #d9e0e6 100%);
    border-color: #a0aec0;
}

/* Layout */
.page-container {
    display: flex;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

.main-content {
    flex: 1;
    min-width: 0;
    padding: 20px 0;
}

.sidebar {
    width: 300px;
    padding: 20px 0 20px 30px;
}

.sidebar-widget {
    background: var(--light);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sidebar-widget h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text);
    font-size: 1.1rem;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--text-muted);
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 8px;
}

.category-list a {
    color: var(--text-light);
    text-decoration: none;
    display: block;
    padding: 6px 0;
    transition: color 0.2s;
}

.category-list a:hover {
    color: #4299e1;
}

/* Recent Stories Widget */
.recent-stories {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recent-story {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #edf2f7;
}

.recent-story:last-child {
    border-bottom: none;
}

.recent-story-img {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.recent-story:hover .recent-story-img {
    transform: scale(1.05);
}

.recent-story-content {
    flex: 1;
    min-width: 0;
}

.recent-story h4 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
    line-height: 1.3;
}

.recent-story h4 a {
    color: #2d3748;
    text-decoration: none;
    transition: color 0.2s;
}

.recent-story h4 a:hover {
    color: #4299e1;
}

.recent-story-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #718096;
}

.recent-story-category {
    background: #ebf8ff;
    color: #2b6cb0;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

.recent-story-time {
    font-size: 0.75rem;
    color: #a0aec0;
    display: flex;
    align-items: center;
}

/* Ad Placeholder Styles */
.ad-container {
    margin: 20px 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #f8f9fa;
    text-align: center;
    position: relative;
}

.ad-placeholder {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    border: 2px dashed #cbd5e0;
    color: #4a5568;
    font-family: 'Poppins', sans-serif;
    min-height: 100px;
    transition: all 0.3s ease;
}

.ad-placeholder:hover {
    background: linear-gradient(135deg, #eef2f7 0%, #d9e0e6 100%);
    border-color: #a0aec0;
}

.ad-label {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Specific Ad Sizes */

.ad-leaderboard {
    width: 100%;
    max-width: 728px;
    height: 90px;
}

.ad-banner {
    width: 100%;
    max-width: 468px;
    height: 60px;
}

.ad-medium-rectangle {
    width: 100%;
    max-width: 300px;
    height: 250px;
    margin: 0 auto;
}

.ad-large-rectangle {
    width: 100%;
    max-width: 336px;
    height: 280px;
    margin: 0 auto;
}

/* Sticky ad */
.ad-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    display: none; /* Hidden by default, shown via JS */
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .page-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 20px 0 0 0;
        order: 2;
    }
    
    .main-content {
        order: 1;
    }
    
    .ad-leaderboard {
        height: 60px;
    }
    
    .ad-banner {
        height: 50px;
    }
    
    .ad-medium-rectangle, 
    .ad-large-rectangle {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .sidebar-widget {
        margin: 0 0 20px 0;
    }
}

/* Animation for placeholder */
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 0.8; }
    100% { opacity: 0.6; }
}

.ad-placeholder.pulse {
    animation: pulse 2s infinite;
}

/* Ad in content */
.ad-in-content {
    margin: 30px auto;
    max-width: 100%;
}

/* Sidebar ad */
.ad-sidebar {
    margin-bottom: 20px;
}

/* Loading States */
.loading-recent {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    color: var(--text-light);
    text-align: center;
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid var(--background);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sidebar Ad Insert */
.sidebar-ad-insert {
    margin: 15px 0;
    padding: 10px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px dashed var(--primary);
}
