/*
 * fsnews-legacy.css — v1.0
 * Compatibility styles for legacy pages (article.php, category.php,
 * archives.php, corrections.php, about.php) using the new fsnews.css header.
 *
 * Rules here:
 *  - NO bare element selectors that touch header/nav/footer
 *  - NO .container (fsnews.css owns that)
 *  - Only scoped class names used by legacy page body content
 *  - Safe to load AFTER fsnews.css
 */

/* ── Breadcrumbs ─────────────────────────────────────── */
.breadcrumbs {
    margin-bottom: 1.5rem;
    color: #777;
    font-size: 0.9rem;
}
.breadcrumbs a { color: #777; }
.breadcrumbs a:hover { color: #1c3c7c; }
.breadcrumbs .separator { margin: 0 0.5rem; }

/* ── Single Article Layout ───────────────────────────── */
.single-article {
    max-width: 1000px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 2rem;
    background: none !important;
}

.article-header h1 {
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.article-meta {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: block !important;
    line-height: 1.5;
}

.article-meta span {
    display: inline !important;
    margin-right: 0.75rem;
}

.article-date,
.article-author,
.article-category {
    display: inline !important;
    white-space: normal !important;
}

.article-hero-image {
    margin-bottom: 2.5rem;
}

.article-hero-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.image-caption,
.media-caption {
    margin-top: 0.5rem;
    font-style: italic;
    color: #777;
    font-size: 0.9rem;
}

.article-summary {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #ddd;
}

/* ── Article body content ────────────────────────────── */
.article-content {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    padding: 0;               /* override any flex padding from grid context */
    flex-grow: unset;
    display: block;
    background: none;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2,
.article-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

/* Blockquotes */
.article-content blockquote:not(.twitter-tweet),
.article-content .blockquote:not(.twitter-tweet) {
    width: 75%;
    margin: 2rem auto;
    background-color: #fff;
    border-top: 2px solid red;
    border-bottom: 2px solid blue;
    padding: 1.2rem 3rem;
    font-size: 1.3rem;
    font-style: oblique;
    font-family: Georgia, serif;
    line-height: 1.6;
    color: #343a40;
}

/* Twitter embeds */
.twitter-embed-container {
    display: flex;
    justify-content: center;
    width: 100% !important;
    max-width: 550px;
    margin: 2rem auto !important;
}

.twitter-embed-container blockquote.twitter-tweet {
    width: 100% !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
}

/* ── Featured Quote callout ──────────────────────────── */
.quote-callout {
    margin: 2em auto;
    max-width: 80%;
    text-align: center;
    font-style: italic;
    color: #666;
    border-top: 3px solid darkred;
    border-bottom: 3px solid #0033a0;
    padding: 1em 0;
}

/* ── Jump to Flipside ────────────────────────────────── */
.jump-to-flipside {
    text-align: center;
    margin: 1.5rem 0 2rem;
}

.jump-to-flipside a {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background-color: #7241b4;
    color: white;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.3s;
}

.jump-to-flipside a:hover {
    background-color: #633aa0;
    transform: translateY(-2px);
    color: white;
}

/* ── Correction notice ───────────────────────────────── */
.correction-notice {
    margin: 0.5rem 0 1.5rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-left: 3px solid #1c3c7c;
    font-size: 0.9rem;
    color: #444;
}

.correction-notice a {
    color: #1c3c7c;
    text-decoration: underline;
}

/* ── Perspectives section ────────────────────────────── */
.perspectives-section {
    margin: 3rem 0;
    padding: 2rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

.perspectives-section > h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #7241b4;
    text-align: center;
    color: #7241b4;
}

.perspectives-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.common-ground-container {
    margin-top: 1.5rem;
}

.perspective-box {
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
    color: white;
}

.perspective-box h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.perspective-box.progressive { background-color: #1c3c7c; }
.perspective-box.conservative { background-color: #b22234; }
.perspective-box.common {
    background-color: #7241b4;
    margin-top: 1.5rem;
    grid-column: 1 / 3;
}

.perspective-content {
    font-size: 0.95rem;
    line-height: 1.5;
}

.perspective-content p { margin-bottom: 1em; }
.perspective-content p:last-child { margin-bottom: 0; }

/* ── Article footer / sharing / mission ─────────────── */
.article-footer {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.site-mission {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 8px;
    border-left: 5px solid #1c3c7c;
}

.site-mission h3 {
    margin-bottom: 0.75rem;
    color: #1c3c7c;
}

/* ── Social sharing buttons ──────────────────────────── */
.article-sharing {
    margin: 1rem 0;
    display: flex;
    justify-content: center;
    width: 100%;
}

.sharing-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.sharing-label {
    margin-right: 0.5rem;
    font-weight: 500;
    color: #555;
    font-size: 0.95rem;
    white-space: nowrap;
}

.social-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-right: 0.3rem;
    border-radius: 3px;
    color: white;
    transition: transform 0.2s;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.social-btn:hover { transform: translateY(-2px); color: #fff; }
.social-btn.facebook { background-color: #3b5998; }
.social-btn.twitter  { background-color: #1da1f2; }
.social-btn.linkedin { background-color: #0077b5; }
.social-btn.email    { background-color: #777; }
.social-btn.link     { background-color: #555; }

/* ── Author block ────────────────────────────────────── */
.author-block {
    margin: 3rem 0;
    border-top: 2px solid red;
    border-bottom: 2px solid blue;
    padding: 2rem 0;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.author-container {
    display: flex;
    align-items: flex-start;
}

.author-image {
    width: 120px;
    flex-shrink: 0;
    margin-right: 2rem;
}

.author-image img {
    width: 100%;
    height: auto;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.default-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    border: 3px solid #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.author-info { flex: 1; }
.author-name { margin-top: 0; margin-bottom: 0.3rem; font-size: 1.6rem; color: #333; }
.author-title { color: #666; font-style: italic; margin-bottom: 0.8rem; }
.author-bio { margin-bottom: 1.2rem; line-height: 1.6; }

.author-meta {
    display: flex;
    align-items: center;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.author-articles {
    display: flex;
    align-items: center;
    margin-right: 1.5rem;
    color: #666;
}

.meta-count { font-weight: bold; margin-right: 0.3rem; color: #333; }

.author-social { display: flex; align-items: center; color: #1DA1F2; text-decoration: none; }
.author-social svg { margin-right: 0.3rem; }
.author-social:hover { text-decoration: underline; }

.author-links { display: flex; flex-wrap: wrap; }

.btn-secondary {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
    background-color: #f2f2f2;
    color: #333;
    text-decoration: none;
    border-radius: 3px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-secondary:hover { background-color: #e0e0e0; }

/* ── Related articles ────────────────────────────────── */
.related-articles {
    margin-top: 3rem;
}

.related-articles > h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ddd;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.article-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: white;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.article-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.article-image {
    height: 180px;
    background-size: cover;
    background-position: center;
}

/* ── Comments section ────────────────────────────────── */
.comments-section { margin-top: 3rem; }

.comments-section > h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ddd;
}

.comments-list { margin-bottom: 2rem; }

.comment {
    padding: 1.5rem;
    border-bottom: 1px solid #ddd;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.comment-author { font-weight: 600; }
.comment-date { color: #777; font-size: 0.9rem; }
.comment-form h3 { margin-bottom: 1rem; }

/* ── Contact form (article page) ─────────────────────── */
.contact-form-section {
    padding: 2rem;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.contact-form-section > h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #1c3c7c;
    color: #1c3c7c;
}

.form-group { margin-bottom: 1.5rem; }

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #1c3c7c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.btn:hover { background-color: #152f63; color: white; }

/* ── Success/error messages ──────────────────────────── */
.success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 0.75rem 1.25rem;
    border-radius: 4px;
    margin: 1rem 0;
}

.error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 0.75rem 1.25rem;
    border-radius: 4px;
    margin: 1rem 0;
}

/* ── Category page ───────────────────────────────────── */
.category-header {
    margin-bottom: 2rem;
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(to right, rgba(178,34,52,0.1), rgba(28,60,124,0.1));
    border-radius: 8px;
}

.category-header h1 { color: #333; margin-bottom: 1rem; }

.category-description {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.6;
}

.category-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.category-item {
    display: block;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 3px solid #1c3c7c;
    text-decoration: none;
    color: inherit;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.category-item h3 { margin-bottom: 0.5rem; color: #1c3c7c; }
.article-count { color: #777; font-size: 0.9rem; }

.categories-section {
    margin: 3rem 0;
}

.categories-section > h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    color: #1c3c7c;
    text-align: center;
}

/* ── Archives page ───────────────────────────────────── */
.archives-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 1rem;
    background: linear-gradient(to right, rgba(178,34,52,0.1), rgba(28,60,124,0.1));
    border-radius: 8px;
}

.archives-header h1 { margin-bottom: 0.5rem; color: #333; }

.archive-filters {
    max-width: 800px;
    margin: 2rem auto 0;
    padding: 1.5rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#archive-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.filter-group { flex: 1; min-width: 150px; }

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    background-color: white;
}

.btn-link {
    color: #1c3c7c;
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.75rem 0;
    font-family: inherit;
    font-weight: 600;
}

.archives-list { margin-bottom: 3rem; }

.archives-list h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ddd;
    color: #333;
}

.articles-table {
    overflow-x: auto;
    margin-bottom: 2rem;
}

.articles-table table {
    width: 100%;
    border-collapse: collapse;
}

.articles-table th,
.articles-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.articles-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.articles-table tr:hover { background-color: #f8f9fa; }

.archived-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge-archived {
    display: inline-block;
    padding: 2px 6px;
    background-color: #6c757d;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 3px;
    vertical-align: middle;
}

/* ── Pagination (shared) ─────────────────────────────── */
.pagination {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.page-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.page-link:hover { background-color: #f8f9fa; }
.page-link.active { background-color: #1c3c7c; color: white; border-color: #1c3c7c; }
.page-link.prev,
.page-link.next { font-weight: 600; }

.no-articles {
    text-align: center;
    padding: 3rem 0;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 2rem;
}

/* ── Ad containers ───────────────────────────────────── */
.ad-container {
    margin: 2rem 0;
    background-color: #f7f7f7;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
}

.ad-label {
    text-transform: uppercase;
    font-size: 0.7rem;
    color: #999;
    margin-bottom: 0.5rem;
}

/* ── Inline media (article body images/video) ────────── */
.article-media {
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.article-media img,
.article-media video {
    display: block;
    width: 100%;
    height: auto;
}

.media-left  { float: left;  margin-right: 1.5rem; margin-bottom: 1rem; width: 40%; }
.media-right { float: right; margin-left: 1.5rem;  margin-bottom: 1rem; width: 40%; }
.media-center { margin: 2rem auto; width: 70%; }

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
    /* Article */
    .article-content blockquote:not(.twitter-tweet),
    .article-content .blockquote:not(.twitter-tweet) {
        width: 90%;
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
    }

    .perspectives-container {
        grid-template-columns: 1fr;
    }

    .perspective-box.common { grid-column: 1; }

    .author-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .author-image { margin-right: 0; margin-bottom: 1.5rem; }
    .author-meta  { justify-content: center; }
    .author-links { justify-content: center; }

    .media-left,
    .media-right,
    .media-center {
        float: none;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

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

    /* Category */
    .category-header { padding: 1.5rem 1rem; }

    /* Archives */
    #archive-filter { flex-direction: column; }
    .filter-group { width: 100%; }
}

@media (max-width: 480px) {
    .article-content blockquote:not(.twitter-tweet),
    .article-content .blockquote:not(.twitter-tweet) {
        width: 95%;
        padding: 0.8rem 1rem;
        margin: 1.5rem auto;
    }

    .jump-to-flipside a {
        display: block;
        width: 85%;
        margin: 0 auto;
        text-align: center;
        padding: 1rem;
    }
}

/* ── Article content area background lift ────────────── */
.single-article {
    background: #fff;
    border-radius: 10px;
    padding: 2rem 2.5rem;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

/* The outer wrap gets the grey */
.fsn-main-wrap {
    background: #f2f3f5;
}

/* ── Responsive banner fix — hide vertical by default ── */
.vertical-banner { display: none !important; }

@media (max-width: 768px) {
    .horizontal-banner { display: none !important; }
    .vertical-banner   { display: block !important; }
}

.rel-img-link {
    display: block !important;
    width: 100% !important;
    height: 180px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    line-height: 0 !important;
}

.rel-img {
    width: 100% !important;
    height: 180px !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}
.single-article {
    max-width: 1000px;  /* change to: */
    max-width: 1100px;
    margin: 0 auto;
}