/* Progressive Pulse - US Left (Democratic Blue) */
:root {
    --primary-color: #0015BC;
    --secondary-color: #4169E1;
    --text-color: #333333;
    --background-color: #f5f7fa;
    --accent-color: #0015BC;
    --link-color: #0015BC;
    --header-bg: #0015BC;
    --header-text: #FFFFFF;
}

/* Base CSS - Shared styles for all sites */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color, #333);
    background-color: var(--background-color, #f5f5f5);
}

a {
    color: var(--link-color, var(--primary-color));
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Header */
.site-header {
    background-color: var(--header-bg, var(--primary-color));
    color: var(--header-text, #fff);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.party-icon {
    font-size: 2rem;
}

.site-title {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.site-title a {
    color: inherit;
    text-decoration: none;
}

.country-flag {
    font-size: 1.5rem;
}

/* Navigation */
.main-nav ul,
.site-switcher ul {
    list-style: none;
    display: flex;
    gap: 1rem;
}

.main-nav a,
.site-switcher a {
    color: var(--header-text, #fff);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.main-nav a:hover,
.site-switcher a:hover {
    background-color: rgba(255,255,255,0.1);
    text-decoration: none;
}

.site-switcher {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--header-bg, var(--primary-color));
    color: var(--header-text, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    z-index: 100;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

.site-switcher ul {
    list-style: none;
    display: flex;
    gap: 1rem;
}

.switcher-label {
    font-size: 0.85rem;
    opacity: 0.8;
}

.site-links a {
    color: var(--header-text, #fff);
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.site-links a:hover {
    background-color: rgba(255,255,255,0.1);
    text-decoration: none;
}

.site-links a[aria-current="page"] {
    background-color: rgba(255,255,255,0.2);
    font-weight: 600;
}

/* Dropdown - Removed, using simple topic links instead */


/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--primary-color);
}

.hero h2 {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    color: #666;
    font-size: 1.1rem;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.article-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.article-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-content {
    padding: 1.5rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.article-date {
    color: #666;
}

.topic-tag {
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

.topic-tag:hover {
    background-color: var(--secondary-color);
    text-decoration: none;
}

.article-title {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.article-title a {
    color: var(--text-color);
}

.article-title a:hover {
    color: var(--primary-color);
}

.article-summary {
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.article-sources {
    font-size: 0.8rem;
    color: #888;
}

.sources-label {
    font-weight: 600;
}

.source-name {
    color: #666;
}

.more-sources {
    color: var(--primary-color);
}

/* Article Page */
.article-page {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.article-header {
    margin-bottom: 2rem;
}

.article-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.article-headline {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 2.25rem;
    line-height: 1.3;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.article-summary-lead {
    font-size: 1.2rem;
    color: #555;
    font-style: italic;
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
}

.article-hero-image {
    margin: 2rem -2rem;
}

.article-hero-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-body p {
    margin-bottom: 1.5rem;
}


/* Other Viewpoints Section */
.other-viewpoints {
    margin-top: 3rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.other-viewpoints h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.viewpoint-links {
    list-style: none;
}

.viewpoint-link {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    transition: border-color 0.2s ease;
}

.viewpoint-link:hover {
    border-color: var(--primary-color);
    text-decoration: none;
}

.viewpoint-site {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.viewpoint-headline {
    color: var(--text-color);
    font-size: 0.95rem;
}

.no-viewpoints {
    color: #666;
    font-style: italic;
}

/* Sources Section (Fine Print) */
.article-sources-section {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.article-sources-section h4 {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.source-list {
    list-style: none;
    font-size: 0.85rem;
    color: #888;
}

.source-list li {
    margin-bottom: 0.25rem;
}

.source-list a {
    color: #666;
}

.source-list a:hover {
    color: var(--primary-color);
}

.source-date {
    font-size: 0.8rem;
    color: #999;
}

/* Topic Page */
.topic-container {
    max-width: 900px;
    margin: 0 auto;
}

.topic-header {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--primary-color);
}

.topic-header h2 {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 2rem;
    color: var(--primary-color);
}

.topic-description {
    color: #666;
    margin-top: 0.5rem;
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.article-row {
    display: flex;
    gap: 1.5rem;
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.article-thumbnail {
    flex-shrink: 0;
    width: 200px;
}

.article-thumbnail img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 4px;
}

.article-info {
    flex: 1;
}

.topic-nav {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.back-link {
    color: var(--primary-color);
    font-weight: 600;
}

/* Ad Placeholders */
.ad-placeholder {
    background: #f0f0f0;
    border: 1px dashed #ccc;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
    border-radius: 4px;
}

.ad-placeholder::before {
    content: "Advertisement";
    display: block;
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
    background: #333;
    color: #fff;
    padding: 2rem 0;
    padding-bottom: 4rem; /* Extra padding for fixed bottom bar */
    margin-top: 3rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

.disclaimer {
    font-size: 0.85rem;
    color: #999;
    margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    
    .site-switcher {
        flex-direction: column;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .article-row {
        flex-direction: column;
    }
    
    .article-thumbnail {
        width: 100%;
    }
    
    .article-headline {
        font-size: 1.75rem;
    }
    
    .article-page {
        padding: 1rem;
    }
    
    .article-hero-image {
        margin: 1rem -1rem;
    }
}

/* No Articles */
.no-articles {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.1rem;
}


/* Ad Containers */
.ad-container {
    margin: 2rem 0;
    text-align: center;
}

.ad-container ins {
    display: block;
}

/* Hide empty ad containers */
.ad-container:empty,
.ad-container ins:empty {
    display: none;
    margin: 0;
    padding: 0;
}


/* Sidebar Layout */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    align-items: start;
}

.content-area {
    min-width: 0;
}

.filter-sidebar {
    position: sticky;
    top: 80px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 1.5rem;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-section h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.filter-list {
    list-style: none;
}

.filter-list li {
    margin-bottom: 0.5rem;
}

.filter-link {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-color);
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-size: 0.9rem;
}

.filter-link:hover {
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
}

.filter-link.active {
    background-color: var(--primary-color);
    color: #fff;
}

.filter-link .count {
    float: right;
    color: #888;
    font-size: 0.8rem;
}

.filter-link:hover .count,
.filter-link.active .count {
    color: rgba(255,255,255,0.8);
}

/* Year filter specific */
.year-filters .filter-link {
    font-weight: 600;
}

/* Responsive sidebar */
@media (max-width: 1024px) {
    .content-with-sidebar {
        grid-template-columns: 1fr;
    }
    
    .filter-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .sidebar-section {
        margin-bottom: 0;
    }
}

@media (max-width: 600px) {
    .filter-sidebar {
        grid-template-columns: 1fr;
    }
}


/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-pill {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background-color: #f0f0f0;
    color: var(--text-color);
    border-radius: 20px;
    font-size: 0.85rem;
    transition: background-color 0.2s ease, color 0.2s ease;
    border: 1px solid #ddd;
}

.tag-pill:hover {
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-color: var(--primary-color);
}


/* Active Filters */
.active-filters {
    background: var(--primary-color);
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.active-filters .clear-filter {
    color: #fff;
    text-decoration: underline;
    font-size: 0.9rem;
}

.active-filters .clear-filter:hover {
    opacity: 0.8;
}


/* Archive Header */
.archive-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.archive-header h2 {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.archive-header p {
    color: #666;
    font-size: 0.95rem;
}
