/* Newstodon Custom Theme - Newspaper Style */

/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Droid+Serif:wght@400;700&display=swap');

/* Reset and base styles */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Droid Serif', serif;
    font-size: 15px;
    line-height: 1.6;
    color: #2f2f2f;
    background-color: #f9f7f1;
    margin: 0;
    padding: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: #2f2f2f;
    margin: 0;
}

h1 {
    font-size: 3.5rem;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 1.5rem 0 1rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 1.25rem 0 0.75rem;
}

h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 1rem 0 0.5rem;
}

p {
    margin: 0 0 1.25rem 0;
}

a {
    color: #2f2f2f;
    text-decoration: none;
    border-bottom: 1px solid #2f2f2f;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.7;
}

/* Header */
.site-header {
    border-bottom: 3px solid #2f2f2f;
    padding: 1rem 0;
    margin-bottom: 0.75rem;
    background-color: #f9f7f1;
}

.header-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.site-title {
    font-size: 2.5rem;
    font-weight: 900;
    text-transform: uppercase;
    margin: 0;
    line-height: 1;
    font-family: 'Playfair Display', serif;
    letter-spacing: -0.05em;
}

.site-title a {
    color: #2f2f2f;
    border-bottom: none;
}

/* Language selector in navigation - discrete styling */
.nav-lang {
    font-family: 'Droid Serif', serif;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex-shrink: 0;
}

.nav-lang a {
    border-bottom: 1px dotted #666;
    color: #666;
}

.nav-lang a:hover {
    color: #2f2f2f;
    border-bottom: 1px solid #2f2f2f;
}

.nav-lang .lang-current {
    color: #2f2f2f;
    opacity: 0.5;
}

/* Separator pushes language selector to the right */
nav li.nav-separator {
    opacity: 0.4;
    font-size: 0.8rem;
    margin-left: auto !important;
    flex-shrink: 0;
    padding-right: 1rem;
}

.site-description {
    font-size: 0.8rem;
    font-style: italic;
    text-transform: uppercase;
    margin: 0.3rem 0 0 0;
    border-top: 2px solid #2f2f2f;
    border-bottom: 2px solid #2f2f2f;
    padding: 0.5rem 0;
    display: inline-block;
}

/* Navigation */
nav {
    margin: 0.75rem 0 0 0;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 2rem;
    align-items: center;
    width: 100%;
}

nav li:not(.nav-lang) a {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: none;
}

nav li:not(.nav-lang) a:hover {
    border-bottom: 2px solid #2f2f2f;
}

/* Main content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
}

/* Multi-column layout - Newspaper/Magazine style with CSS Columns */
.article-grid {
    column-count: 5;
    column-gap: 2rem;
    column-rule: 1px solid #2f2f2f;
    margin-bottom: 3rem;
}

.article-column {
    break-inside: avoid;
    page-break-inside: avoid;
    padding: 0 0 2rem 0;
    margin-bottom: 0;
}

/* Size variations for better mosaic pattern */
.article-col-1 {
    column-span: all;
}

.article-col-2 {
    /* normal spanning */
}

.article-col-3 {
    /* normal spanning */
}

.article-col-4 {
    /* normal spanning */
}

.article-col-5 {
    /* normal spanning */
}

/* Article cards */
.article {
    padding: 0;
}

.article-headline {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
}

.article-headline a {
    border-bottom: none;
}

.article-headline a:hover {
    opacity: 0.7;
}

.article-subheadline {
    font-size: 1rem;
    font-style: italic;
    font-weight: 400;
    margin: 0.75rem 0 1rem 0;
    padding-top: 0.75rem;
    border-top: 1px solid #2f2f2f;
}

.article-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
    font-style: italic;
}

.article-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.article-section {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    display: inline-block;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #2f2f2f;
}

.article-section.stiri {
    color: #2f2f2f;
}

.article-section.criza {
    color: #d9534f;
}

/* Section headers */
.section-header {
    border-bottom: 3px solid #2f2f2f;
    padding: 0.75rem 0;
    margin: 1rem 0 1.5rem 0;
}

.section-header h2 {
    margin: 0;
    font-size: 2.5rem;
    text-transform: uppercase;
}

/* Single article page */
.article-full-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.article-full-content h1 {
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
}

.article-full-meta {
    font-style: italic;
    color: #666;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #2f2f2f;
}

.article-full-body {
    font-size: 1rem;
    line-height: 1.8;
}

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

/* Footer */
.site-footer {
    border-top: 2px solid #2f2f2f;
    margin-top: 4rem;
    padding: 2rem;
    text-align: center;
    font-size: 0.9rem;
    background-color: #f2f0eb;
}

.site-footer a {
    margin: 0 0.5rem;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem 0;
    filter: sepia(30%) contrast(1.1) opacity(0.95);
}

figure {
    margin: 1.5rem 0;
}

figcaption {
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 0.5rem;
    text-align: center;
}

/* Responsive design */
@media (max-width: 1300px) {
    h1 {
        font-size: 3rem;
    }

    .article-grid {
        column-count: 3;
    }
}

@media (max-width: 1000px) {
    h1 {
        font-size: 2.5rem;
    }

    .article-grid {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 2rem;
    }

    .site-title {
        font-size: 2.5rem;
    }

    .article-grid {
        column-count: 1;
        column-rule: none;
    }

    .article-column {
        margin-bottom: 1.5rem;
    }

    nav ul {
        gap: 1rem;
    }

    nav a {
        font-size: 0.95rem;
    }

    .main-content {
        padding: 0 1rem 1.5rem;
    }

    .header-wrapper {
        padding: 0 1rem;
    }
}

/* Pagination in header */
.section-header-with-pagination {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    margin-bottom: 2rem;
}

.section-header {
    flex: 1;
}

.header-pagination {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    white-space: nowrap;
}

.pagination-prev,
.pagination-next {
    padding: 0.5rem 0.85rem;
    background-color: #2f2f2f;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.pagination-prev:hover,
.pagination-next:hover {
    background-color: #555;
}

.pagination-numbers {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.pagination-link {
    padding: 0.4rem 0.6rem;
    background-color: #e8e5df;
    color: #2f2f2f;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.pagination-link:hover {
    background-color: #d0cec8;
}

.pagination-current {
    padding: 0.4rem 0.6rem;
    background-color: #2f2f2f;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 3px;
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }

    .site-title {
        font-size: 1.75rem;
    }

    .site-description {
        font-size: 0.85rem;
    }

    nav ul {
        flex-direction: column;
        gap: 0.75rem;
    }
}
