html,
body {
    margin: 0;
    padding: 0;
}

.page-container {
    margin: auto;
    padding: 20px 40px;
}

.news-layout {
    display: grid;
    grid-template-columns: 240px 1fr 340px;
    gap: 40px;
    margin: 30px auto;
    padding: 0 40px;
}

.main-content {
    min-width: 0;
}

.site-logo img {
    height: 52px;
    width: auto;
}

/* ===== NEWSROOM SHELL ===== */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
}

.branding-inner {
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 0 40px 8px 40px;
    border-bottom: 2px solid var(--text-primary, #111111);
}

.site-branding {
    background: #ffffff;
    padding: 24px 0 14px 0;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #111;
    margin-bottom: 6px;
}

.site-logo:hover {
    color: #111;
}

.site-title {
    font-size: 36px;
    font-weight: 900;
    color: #111;
}

.site-logo-text {
    line-height: 1;
}

.site-tagline {
    font-size: 16px;
    font-weight: 600;
    color: #555;
    margin-top: 4px;
}

.site-date {
    font-size: 13px;
    font-weight: 500;
    color: #777;
    margin-top: 4px;
}

/* ===== SHARED SIDEBAR COMPONENT ===== */
.sidebar-section {
    margin-bottom: 32px;
    padding: 10px 0;
}

.sidebar-title,
.sidebar-section-title {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #111;
}

.sidebar-list,
.category-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trending-item {
    display: flex;
    gap: 12px;
    font-size: 14px;
    padding: 16px 0;
    border-bottom: 1px solid #ddd;
    position: relative;
    cursor: pointer;
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-number {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-primary, #111111);
    line-height: 1;
    min-width: 30px;
}

.category-item {
    font-size: 14px;
    color: #111;
    text-decoration: none;
    font-weight: 600;
}

.category-item.active {
    font-weight: 700;
    color: #000;
}

.category-item:hover {
    color: #666;
}

.cat-count {
    font-size: 11px;
    color: #999;
    margin-left: 4px;
    font-weight: 400;
}

.sidebar-divider {
    border-top: 1px solid #eee;
    margin: 8px 0;
}

.category-sidebar {
    border-right: 1px solid #eee;
    padding-right: 20px;
}

.trending-sidebar {
    padding-left: 20px;
    position: sticky;
    top: 20px;
    align-self: start;
}

.quick-stats {
    margin-top: 20px;
}

.stat-card {
    padding: 10px 0;
}

.sidebar-article,
.trending-content,
.sidebar-article-title {
    font-size: 14px;
}

.sidebar-article-title a {
    color: var(--text-primary, #111111);
    text-decoration: none;
}

.sidebar-article-title a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.breaking-ticker {
    background: #111111;
    color: #ffffff;
    padding: 8px 16px;
    font-size: 13px;
}

/* Home hero breakline to emulate aggregator ticker row */
.hero-article .breaking-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-article .breaking-badge::before {
    content: "LIVE";
    display: inline-block;
    padding: 2px 6px;
    border-radius: 2px;
    background: #ffffff;
    color: #111111;
    font-size: 0.625rem;
    letter-spacing: 0.06em;
}

.card-category {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: #666666;
}

.page-container .unified-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Common footer and ad helpers */
.adsense-unit {
    display: block;
}

.footer-links {
    margin-top: 12px;
    font-size: 0.875rem;
}

.footer-link {
    color: #999999;
    text-decoration: none;
    margin: 0 10px;
}

.footer-link:hover {
    color: #ffffff;
}

/* Home template image wrappers */
.hero-article {
    position: relative;
    cursor: pointer;
}

.hero-article__image {
    width: 100%;
    aspect-ratio: 3 / 2;
    height: auto;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 20px;
}

.hero-article__image-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Article list controls */
.filters-form-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-field-label {
    display: block;
    font-size: 0.75rem;
    margin-bottom: 4px;
    color: var(--text-secondary, #666666);
}

.form-select-input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color, #dddddd);
    border-radius: 4px;
    font-size: 0.875rem;
}

.btn-filter-apply,
.btn-search-submit {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 4px;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-filter-apply {
    background: var(--dark-bg, #111111);
}

.btn-search-submit {
    background: var(--dark-bg, #111111);
}

.search-input-field {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color, #dddddd);
    border-radius: 4px;
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.link-clear-filters {
    text-align: center;
    padding: 8px;
    color: var(--text-primary, #111111);
    text-decoration: underline;
    font-size: 0.813rem;
    font-weight: 600;
}

.list-page-header {
    border-bottom: 3px solid var(--dark-bg, #111111);
    padding-bottom: 16px;
    margin-bottom: 30px;
}

.list-page-title {
    font-family: "Merriweather", serif;
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 8px;
}

.list-page-subtitle {
    color: var(--text-secondary, #666666);
    font-size: 0.875rem;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 30px 0;
    border-top: 2px solid var(--border-color, #dddddd);
    flex-wrap: wrap;
}

.page-nav-link {
    padding: 10px 16px;
    background: #ffffff;
    border: 2px solid var(--border-color, #dddddd);
    color: #222222;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 4px;
}

.page-status-badge {
    padding: 10px 20px;
    background: var(--dark-bg, #111111);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 4px;
}

.empty-state-cta {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    background: var(--dark-bg, #111111);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
}

/* Article detail controls and side widgets */
.back-to-list-link {
    display: block;
    padding: 12px 16px;
    background: var(--dark-bg, #111111);
    color: #ffffff;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    border-radius: 4px;
    margin-top: 20px;
}

.detail-trending-item {
    gap: 10px;
    align-items: flex-start;
}

.detail-trending-number {
    display: inline-block;
    min-width: 18px;
    background: transparent;
    color: #999;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.detail-trending-image {
    width: 70px;
    height: 70px;
    overflow: hidden;
    border-radius: 4px;
    flex-shrink: 0;
    background: #f0f0f0;
}

.detail-trending-image-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-trending-content {
    flex: 1;
    min-width: 0;
}

/* Article detail page styles */
.newsroom-article {
    max-width: 100%;
    background: #ffffff;
}

.article-header-section {
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color, #dddddd);
    margin-bottom: 30px;
}

.article-category-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.813rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-tag {
    color: #ffffff;
    background: var(--dark-bg, #111111);
    padding: 4px 12px;
    border-radius: 3px;
}

.separator {
    color: #999999;
}

.region-tag {
    color: var(--text-secondary, #666666);
}

.article-main-headline {
    font-family: "Merriweather", serif;
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1.2;
    color: var(--text-primary, #111111);
    margin: 0 0 20px;
    letter-spacing: -0.02em;
}

.article-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #444444;
    font-weight: 400;
    margin: 0 0 24px;
}

.article-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
    flex-wrap: wrap;
    gap: 16px;
}

.meta-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.875rem;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.author-label,
.publish-date {
    color: var(--text-secondary, #666666);
}

.author-name {
    font-weight: 600;
    color: var(--text-primary, #111111);
}

.meta-separator {
    color: #cccccc;
}

.language-badge {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
}

.article-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid var(--border-color, #dddddd);
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #e5e5e5;
    border-color: #aaaaaa;
}

.action-btn svg {
    width: 16px;
    height: 16px;
}

.article-hero-media {
    margin: 0 0 40px;
}

.hero-image-wrapper {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-caption {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 0;
    font-size: 0.875rem;
    color: var(--text-secondary, #666666);
    border-bottom: 1px solid #e5e5e5;
}

.caption-text {
    flex: 1;
    font-style: italic;
}

.caption-credit {
    flex-shrink: 0;
    font-weight: 600;
}

.article-body-content {
    font-family: "Merriweather", serif;
    font-size: 1.125rem;
    line-height: 1.8;
    color: #444444;
}

.article-lead-paragraph {
    font-size: 1.25rem;
    line-height: 1.7;
    margin-bottom: 30px;
    color: #333333;
}

.article-text-content {
    margin-bottom: 40px;
}

.article-text-content p {
    margin-bottom: 24px;
}

.article-text-content a {
    color: #111111;
    text-decoration: underline;
    font-weight: 600;
}

.article-text-content a:hover {
    color: #333333;
}

.inline-recommended-section {
    background: #f8f9fa;
    border-left: 4px solid var(--dark-bg, #111111);
    padding: 30px;
    margin: 50px 0;
}

.recommended-section-title {
    font-family: "Merriweather", serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary, #111111);
}

.inline-recommended-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.inline-recommended-card {
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color, #dddddd);
    position: relative;
    cursor: pointer;
}

.recommended-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f0f0f0;
}

.recommended-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recommended-card-content {
    padding: 16px;
}

.recommended-card-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-primary, #111111);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.recommended-card-title {
    font-family: "Inter", sans-serif;
    font-size: 0.938rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 10px;
}

.recommended-card-title a {
    color: var(--text-primary, #111111);
    text-decoration: none;
}

.recommended-card-title a:hover {
    text-decoration: underline;
}

.recommended-card-title a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.recommended-card-meta {
    font-size: 0.75rem;
    color: var(--text-secondary, #666666);
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-source-attribution {
    background: var(--light-bg, #f5f5f5);
    border: 1px solid var(--border-color, #dddddd);
    border-radius: 6px;
    padding: 24px;
    margin: 40px 0;
    font-family: "Inter", sans-serif;
}

.source-text {
    margin: 0 0 16px;
    font-size: 0.938rem;
    color: #444444;
}

.source-link {
    color: var(--text-primary, #111111);
    font-weight: 600;
    text-decoration: underline;
}

.read-original-btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--dark-bg, #111111);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    font-size: 0.938rem;
    transition: background 0.2s;
}

.read-original-btn:hover {
    background: #333333;
}

.article-tags-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 30px 0;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
    margin: 40px 0;
    font-family: "Inter", sans-serif;
}

.tags-label {
    font-weight: 600;
    color: var(--text-secondary, #666666);
    font-size: 0.875rem;
}

.article-tag {
    padding: 6px 14px;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 0.813rem;
    font-weight: 500;
    color: #444444;
    text-decoration: none;
    transition: all 0.2s;
}

.article-tag:hover {
    background: var(--dark-bg, #111111);
    color: #ffffff;
}

.article-share-bottom {
    padding: 30px 0;
    font-family: "Inter", sans-serif;
}

.article-share-bottom h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary, #111111);
}

.share-buttons-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.share-btn-social {
    padding: 10px 20px;
    border: 1px solid var(--border-color, #dddddd);
    background: #ffffff;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.share-btn-social.facebook:hover,
.share-btn-social.twitter:hover,
.share-btn-social.linkedin:hover {
    background: var(--dark-bg, #111111);
    color: #ffffff;
    border-color: var(--dark-bg, #111111);
}

.share-btn-social.email:hover {
    background: #666666;
    color: #ffffff;
    border-color: #666666;
}

.more-from-source {
    background: #f8f9fa;
    padding: 40px;
    margin: 60px 0 0;
    font-family: "Inter", sans-serif;
    border-radius: 8px;
}

.section-heading {
    font-family: "Merriweather", serif;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-primary, #111111);
}

.more-from-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}

.compact-article-card {
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color, #dddddd);
    position: relative;
    cursor: pointer;
}

.compact-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f0f0f0;
}

.compact-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.compact-card-image:hover img {
    transform: scale(1.05);
}

.compact-card-content {
    padding: 16px;
}

.compact-card-title {
    font-size: 0.938rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 10px;
}

.compact-card-title a {
    color: var(--text-primary, #111111);
    text-decoration: none;
}

.compact-card-title a:hover {
    text-decoration: underline;
}

.compact-card-title a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.compact-card-time {
    font-size: 0.75rem;
    color: var(--text-secondary, #666666);
}

.comments-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 2px solid var(--border-color, #dddddd);
}

.comment-messages {
    margin-bottom: 20px;
}

.comment-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 0.938rem;
}

.comment-message.success {
    background: #f0f0f0;
    color: #111111;
    border: 1px solid #cccccc;
}

.comment-message.error {
    background: #f0f0f0;
    color: #333333;
    border: 1px solid #999999;
}

.comments-list {
    margin-bottom: 40px;
}

.comment-item {
    padding: 20px;
    margin-bottom: 20px;
    background: #f9f9f9;
    border-left: 3px solid var(--border-color, #dddddd);
    border-radius: 4px;
}

.comment-item.admin-comment {
    background: #f0f0f0;
    border-left-color: #111111;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-badge {
    background: #111111;
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.comment-date {
    font-size: 0.813rem;
    color: var(--text-secondary, #666666);
}

.comment-content {
    color: #333333;
    line-height: 1.6;
    font-size: 0.938rem;
}

.no-comments {
    padding: 30px;
    text-align: center;
    color: var(--text-secondary, #666666);
    font-style: italic;
    background: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 40px;
}

.comment-form-section {
    background: #ffffff;
    padding: 30px;
    border: 1px solid var(--border-color, #dddddd);
    border-radius: 8px;
}

.form-heading {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary, #111111);
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 6px;
    color: #333333;
    font-size: 0.938rem;
}

.form-input,
.form-textarea {
    padding: 10px 12px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-size: 0.938rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #111111;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-help {
    font-size: 0.813rem;
    color: var(--text-secondary, #666666);
    margin-top: 4px;
}

.submit-btn {
    align-self: flex-start;
    padding: 12px 32px;
    background: #111111;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.submit-btn:hover {
    background: #333333;
}

.submit-btn:active {
    transform: translateY(1px);
}

/* Static pages */
.static-page-container {
    max-width: 900px;
    margin: 60px auto;
    padding: 0 20px;
}

.static-page-title {
    font-family: "Merriweather", serif;
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: var(--text-primary, #111111);
}

.static-page-body {
    line-height: 1.8;
    font-size: 1.063rem;
    color: #333333;
}

.static-page-body p {
    margin-bottom: 20px;
}

.static-page-meta {
    margin-bottom: 20px;
    color: var(--text-secondary, #666666);
    font-size: 0.938rem;
}

.static-page-heading {
    font-size: 1.5rem;
    margin: 40px 0 20px;
    color: var(--text-primary, #111111);
}

.static-page-list {
    margin-left: 20px;
    margin-bottom: 20px;
}

.static-page-list li {
    margin-bottom: 10px;
}

/* Shared filters include */
.filters-actions {
    align-self: flex-end;
}

@media (max-width: 1200px) {
    .news-layout {
        grid-template-columns: 220px 1fr 300px;
        gap: 24px;
        padding: 0 24px;
    }

    .page-container .unified-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .article-layout {
        grid-template-columns: 1fr 280px;
        gap: 30px;
    }

    .article-main-headline {
        font-size: 2rem;
    }

    .article-subtitle {
        font-size: 1.125rem;
    }
}

@media (max-width: 1100px) {
    .news-layout {
        grid-template-columns: 1fr 320px;
    }

    .category-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .page-container {
        padding: 12px 16px;
    }

    .news-layout {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
    }

    .main-content {
        order: 1;
    }

    .trending-sidebar {
        display: none;
    }

    .category-sidebar {
        display: none;
    }

    .article-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .article-sidebar {
        display: none;
    }

    .branding-inner,
    .site-branding {
        padding-left: 12px;
        padding-right: 12px;
    }

    .page-container .unified-news-grid {
        grid-template-columns: 1fr;
    }

    .article-main-headline {
        font-size: 1.75rem;
    }

    .article-subtitle {
        font-size: 1rem;
    }

    .article-body-content {
        font-size: 1rem;
    }

    .article-meta-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .more-from-source {
        padding: 20px;
    }

    .inline-recommended-grid {
        grid-template-columns: 1fr;
    }
}
