/* Newspaper Layout & Typography Styles */

/* Newspaper-specific styles */
.newspaper-wrapper {
    background-color: #f8f8f0;
    padding: 30px 0;
    min-height: 100vh;
}

.newspaper {
    background-color: #fffef7;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
    font-family: 'Georgia', 'Times New Roman', serif;
}

/* Masthead */
.masthead {
    text-align: center;
    border-top: 4px solid #000;
    border-bottom: 4px solid #000;
    padding: 20px 0;
    margin-bottom: 10px;
}

.masthead-title {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 4.5rem;
    font-weight: 900;
    letter-spacing: -2px;
    margin: 0;
    color: #000;
    text-transform: uppercase;
}

.masthead-tagline {
    font-size: 0.9rem;
    font-style: italic;
    color: #666;
    margin-top: 5px;
    letter-spacing: 2px;
}

.disclaimer-link {
    color: #0066cc;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s ease;
}

.disclaimer-link:hover {
    color: #004499;
    text-decoration: underline;
}

.publication-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: 10px 0;
    border-bottom: 2px solid #000;
    margin-bottom: 20px;
}

/* Headlines */
.headline {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 8px;
    color: #000;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: none;
}

.lead-headline {
    font-size: 3rem;
    border-bottom: 3px solid #000;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.main-headline {
    font-size: 2rem;
    border-bottom: 2px solid #000;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.side-headline {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

/* Standfirst (subheading) */
.standfirst {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
    color: #333;
}

/* Article body */
.article-body {
    font-size: 1rem;
    line-height: 1.7;
    color: #222;
    text-align: justify;
    column-gap: 30px;
    break-inside: avoid-column;
}

.article-body p {
    break-inside: avoid;
    margin-bottom: 1em;
}

.lead-article .article-body {
    columns: 3;
    font-size: 1.05rem;
}

.main-article .article-body {
    columns: 2;
}

.side-article .article-body {
    columns: 1;
}

/* Byline */
.byline {
    font-size: 0.9rem;
    font-style: italic;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.byline i {
    font-style: normal;
}

/* Category badge */
.article-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    margin-bottom: 8px;
    letter-spacing: 1px;
    font-family: 'Arial', sans-serif;
}

/* Layout sections */
.lead-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 3px double #000;
}

.main-stories-section {
    margin-bottom: 30px;
}

.story-separator {
    border: 0;
    border-top: 1px solid #ccc;
    margin: 25px 0;
}

.heavy-separator {
    border: 0;
    border-top: 3px double #000;
    margin: 30px 0;
}

/* Side column styling */
.side-stories {
    padding-left: 30px;
    border-left: 2px solid #000;
}

.side-story {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

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

/* Teaser boxes */
.teaser-box {
    border: 2px solid #000;
    padding: 15px;
    background-color: #f9f9f9;
    margin: 15px 0;
}

.teaser-box .headline {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

/* Drop cap */
.drop-cap::first-letter {
    font-size: 4em;
    font-weight: bold;
    float: left;
    line-height: 0.9;
    margin: 0.05em 0.1em 0 0;
    font-family: 'Playfair Display', Georgia, serif;
}

/* More Headlines Grid Layout */
.more-headlines-section {
    margin-top: 30px;
    border-top: 3px double #000;
    padding-top: 25px;
}

.section-title {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 1.8rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.section-title::before,
.section-title::after {
    content: '';
    flex-grow: 1;
    height: 2px;
    background: linear-gradient(to right, #000, transparent);
}

.section-title::after {
    background: linear-gradient(to left, #000, transparent);
}

.headlines-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* Headline Cards */
.headline-card {
    padding: 20px;
    border-top: 3px solid #000;
    background-color: #fafaf5;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.headline-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.headline-card--featured {
    grid-column: span 2;
    grid-row: span 2;
    background-color: #fff;
    border-top-width: 5px;
}

.headline-card__category {
    margin-bottom: 10px;
}

.headline-card__title {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 10px;
}

.headline-card--featured .headline-card__title {
    font-size: 1.75rem;
}

.headline-card__title a {
    color: #000;
    text-decoration: none;
    transition: color 0.2s ease;
}

.headline-card__title a:hover {
    color: #333;
}

.headline-card__excerpt {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #444;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.headline-card--featured .headline-card__excerpt {
    -webkit-line-clamp: 4;
}

.headline-card__meta {
    font-size: 0.8rem;
    color: #777;
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
}

.headline-card__author {
    font-weight: 600;
    color: #555;
}

.headline-card__preview {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 15px;
    text-align: justify;
}

.headline-card__preview p {
    margin-bottom: 0.8em;
}

.headline-card__link {
    font-size: 0.85rem;
    font-weight: 600;
    color: #000;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s ease;
}

.headline-card__link:hover {
    color: #555;
}

/* Brief Memories Section */
.brief-memories-section {
    margin-top: 25px;
}

.brief-memories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.brief-card {
    position: relative;
    padding: 15px;
    padding-left: 20px;
}

.brief-card__border {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #000;
}

.brief-card__title {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
}

.brief-card__title a {
    color: #000;
    text-decoration: none;
    transition: color 0.2s ease;
}

.brief-card__title a:hover {
    color: #444;
}

.brief-card__excerpt {
    font-size: 0.85rem;
    line-height: 1.4;
    color: #555;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.brief-card__meta {
    font-size: 0.75rem;
    color: #888;
}

/* Archive Teaser */
.archive-teaser {
    margin-top: 30px;
    border: 2px solid #000;
    background: linear-gradient(135deg, #f5f5f0 0%, #fffef7 100%);
}

.archive-teaser__content {
    padding: 25px;
    text-align: center;
}

.archive-teaser__title {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 10px;
}

.archive-teaser__text {
    font-size: 1rem;
    color: #555;
    margin-bottom: 15px;
}

.archive-teaser__button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 25px;
    background-color: #000;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.archive-teaser__button:hover {
    background-color: #333;
    color: #fff;
}

/* Newspaper-compatible preformatted text styles */
.newspaper-preformatted {
    font-family: 'Courier New', 'Lucida Console', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-left: 4px solid #000;
    padding: 15px;
    margin: 15px 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    column-span: all;
    break-inside: avoid;
    max-width: 100%;
    box-sizing: border-box;
}

/* Ensure preformatted content doesn't break column flow */
.article-body .newspaper-preformatted,
.interior-article-body .newspaper-preformatted,
.article-preview .newspaper-preformatted {
    column-span: all;
    break-inside: avoid;
    margin: 20px 0;
}

/* Handle code blocks within preformatted content */
.newspaper-preformatted code {
    background: none;
    padding: 0;
    border: none;
    font-size: inherit;
    color: inherit;
}