/**
 * Newspaper Style CSS
 * Professional news layout with multiple templates
 */

/* ========== RESET & BASE STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #c8102e;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --border-color: #ddd;
    --link-color: #0066cc;
    --max-width: 1200px;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    color: var(--text-color);
    background: #fff;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========== HEADER STYLES ========== */
.site-header {
    border-bottom: 3px solid var(--primary-color);
    margin-bottom: 30px;
}

.header-top {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9em;
}

.current-date {
    color: #666;
    font-style: italic;
}

.top-nav a {
    margin-left: 20px;
    color: var(--text-color);
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 30px 20px;
    text-align: center;
}

.logo-section {
    display: flex;
    flex-direction: column; /* Default: stacked (for mobile) */
    align-items: center;
    gap: 10px;
}

/* When the screen is wide enough (desktop), place logo + banner side by side */
@media (min-width: 768px) {
    .logo-section {
        flex-direction: row;       /* side by side */
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }

    .logo-container {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
}

.site-logo {
    max-height: 80px;
    width: auto;
}

.site-banner {
    max-height: 80px;
    width: auto;
}

.site-title {
    font-family: 'Georgia', serif;
    font-size: 3.5em;
    font-weight: bold;
    color: var(--primary-color);
    letter-spacing: 2px;
    text-transform: uppercase;
    border-top: 3px double var(--primary-color);
    border-bottom: 3px double var(--primary-color);
    padding: 15px 0;
    margin: 10px 0;
}

.site-tagline {
    font-size: 1.1em;
    color: #666;
    font-style: italic;
}

.breaking-news-bar {
    background: var(--secondary-color);
    color: white;
    padding: 12px 20px;
    text-align: center;
    font-size: 1em;
}

.breaking-label {
    font-weight: bold;
    text-transform: uppercase;
    margin-right: 15px;
    padding: 3px 8px;
    background: rgba(0,0,0,0.2);
}

.header-divider {
    height: 2px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
}

/* ========== MAIN CONTENT ========== */
.main-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* ========== LEAD STORY (Front Page) ========== */
.lead-story {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 3px solid var(--primary-color);
}

.lead-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.lead-content h2 {
    font-size: 2.5em;
    line-height: 1.2;
    margin-bottom: 15px;
    font-weight: bold;
}

.lead-content h2 a {
    color: var(--primary-color);
}

.article-meta {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
    font-family: Arial, sans-serif;
}

.article-meta .time {
    margin-left: 15px;
}

.lead-excerpt {
    font-size: 1.2em;
    line-height: 1.7;
    margin-bottom: 20px;
    color: #444;
}

.read-more {
    display: inline-block;
    padding: 10px 20px;
    background: var(--secondary-color);
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.5px;
    border-radius: 3px;
}

.read-more:hover {
    background: #a00c25;
    color: white;
}

/* ========== FEATURED ROW ========== */
.featured-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.featured-article {
    border: 1px solid var(--border-color);
    padding: 15px;
    transition: box-shadow 0.3s;
}

.featured-article:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.featured-article img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    margin-bottom: 15px;
}

.featured-article h3 {
    font-size: 1.3em;
    margin-bottom: 8px;
    line-height: 1.3;
}

.featured-article h3 a {
    color: var(--primary-color);
}

.article-date {
    color: #666;
    font-size: 0.85em;
    margin-bottom: 10px;
    font-family: Arial, sans-serif;
}

.featured-article p {
    font-size: 0.95em;
    color: #555;
}

/* ========== CONTENT WITH SIDEBAR ========== */
.content-sidebar-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.main-grid {
    display: grid;
    gap: 30px;
}

.grid-article {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.grid-thumbnail {
    width: 200px;
    height: 140px;
    object-fit: cover;
}

.grid-content h4 {
    font-size: 1.4em;
    margin-bottom: 8px;
    line-height: 1.3;
}

.grid-content h4 a {
    color: var(--primary-color);
}

.grid-content p {
    font-size: 0.95em;
    color: #555;
    margin-bottom: 8px;
}

/* ========== SIDEBAR ========== */
.sidebar {
    background: var(--light-gray);
    padding: 20px;
    border-left: 3px solid var(--secondary-color);
}

.sidebar-section h3 {
    font-size: 1.3em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

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

.sidebar-item h5 {
    font-size: 1.05em;
    line-height: 1.4;
    margin-bottom: 5px;
}

.sidebar-item h5 a {
    color: var(--primary-color);
}

.sidebar-date {
    font-size: 0.8em;
    color: #777;
    font-family: Arial, sans-serif;
}

/* ========== MASONRY LAYOUT (Page 2, 5, 8...) ========== */
.masonry-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.masonry-item {
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.masonry-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.masonry-item.size-large {
    grid-column: span 2;
}

.masonry-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.masonry-content {
    padding: 20px;
}

.masonry-content h3 {
    font-size: 1.3em;
    margin-bottom: 8px;
    line-height: 1.3;
}

.masonry-content h3 a {
    color: var(--primary-color);
}

.masonry-content p {
    font-size: 0.95em;
    color: #555;
    margin-bottom: 10px;
}

.read-link {
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 0.9em;
}

/* ========== MAGAZINE LAYOUT (Page 3, 6, 9...) ========== */
.magazine-layout {
    margin-bottom: 40px;
}

.magazine-featured {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.magazine-featured img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.magazine-featured-content h2 {
    font-size: 2.2em;
    margin-bottom: 10px;
    line-height: 1.2;
}

.magazine-featured-content h2 a {
    color: var(--primary-color);
}

.magazine-featured-content p {
    margin-bottom: 15px;
}

.btn-read {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
    border-radius: 3px;
}

.btn-read:hover {
    background: var(--secondary-color);
    color: white;
}

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

.magazine-item {
    border: 1px solid var(--border-color);
    padding: 15px;
    transition: box-shadow 0.2s;
}

.magazine-item:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.magazine-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    margin-bottom: 12px;
}

.magazine-item h4 {
    font-size: 1.1em;
    margin-bottom: 8px;
    line-height: 1.3;
}

.magazine-item h4 a {
    color: var(--primary-color);
}

.magazine-item p {
    font-size: 0.85em;
    color: #555;
}

/* ========== CLASSIC LAYOUT (Page 4, 7, 10...) ========== */
.classic-layout {
    display: grid;
    gap: 30px;
}

.classic-article {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    padding: 25px 0;
    border-bottom: 2px solid var(--border-color);
}

.classic-content h3 {
    font-size: 1.8em;
    margin-bottom: 10px;
    line-height: 1.3;
}

.classic-content h3 a {
    color: var(--primary-color);
}

.classic-content p {
    font-size: 1.05em;
    margin-bottom: 15px;
    color: #444;
}

.read-more-link {
    color: var(--secondary-color);
    font-weight: bold;
}

.classic-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

/* ========== PAGE HEADER ========== */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--primary-color);
}

.page-header h2 {
    font-size: 2em;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
    padding: 25px 0;
    border-top: 2px solid var(--border-color);
}

.pagination-btn, .pagination-num {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.95em;
    transition: all 0.2s;
}

.pagination-btn:hover, .pagination-num:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-num.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.pagination-dots {
    padding: 0 5px;
    color: #999;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--light-gray);
    border: 2px dashed var(--border-color);
}

.empty-state h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.empty-state p {
    font-size: 1.2em;
    color: #666;
}

.no-articles {
    text-align: center;
    padding: 60px 20px;
}

/* ========== FOOTER ========== */
.site-footer {
    background: var(--primary-color);
    color: white;
    margin-top: 60px;
    padding: 40px 20px 20px;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #ccc;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
    color: #999;
    font-size: 0.9em;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 968px) {
    .site-title {
        font-size: 2.5em;
    }
    
    .lead-story {
        grid-template-columns: 1fr;
    }
    
    .featured-row {
        grid-template-columns: 1fr;
    }
    
    .content-sidebar-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        border-left: none;
        border-top: 3px solid var(--secondary-color);
    }
    
    .masonry-layout {
        grid-template-columns: 1fr;
    }
    
    .masonry-item.size-large {
        grid-column: span 1;
    }
    
    .magazine-featured {
        grid-template-columns: 1fr;
    }
    
    .magazine-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .classic-article {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .site-title {
        font-size: 2em;
    }
    
    .grid-article {
        grid-template-columns: 1fr;
    }
    
    .magazine-grid {
        grid-template-columns: 1fr;
    }
    
    .top-nav a {
        margin-left: 10px;
        font-size: 0.85em;
    }
}