/*
 Theme Name: Read Next 3
 Theme URI: https://example.com/read-next-3
 Description: Green header theme with overlay card design
 Version: 1.0
 Author: Developer
 */

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base */
body {
    font-family: 'Helvetica Neue', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.5;
    color: #222;
    background: #f0f2f5;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.site-header {
    background: #1b5e20;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.header-brand {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.site-logo {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
}

.header-tagline {
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.5px;
}

.site-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-menu a {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.3px;
    transition: color 0.2s;
}

.nav-menu a:hover {
    color: #a5d6a7;
}

/* Main Content */
.main-content {
    padding: 40px 0 60px;
}

.section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #1b5e20;
    margin-bottom: 28px;
    padding-bottom: 12px;
    border-bottom: 2px solid #1b5e20;
    display: inline-block;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.masonory-container {
    margin-top: 24px;
}

/* News Card */
.news-card {
    position: relative;
    overflow: hidden;
}

.news-card-link {
    display: block;
}

.news-card-image {
    height: 100%;
    position: relative;
    overflow: hidden;
    background: #e0e0e0;
}

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

.news-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 16px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 50%, transparent 100%);
}

.news-card-overlay a {
    pointer-events: auto;
}

.news-card-source {
    margin-left: auto;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    transition: background 0.2s;
}

.news-card-source:hover {
    background: rgba(255, 255, 255, 0.3);
}

.news-card-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #2e7d32;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 10px;
    border-radius: 4px;
}

.news-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-title a {
    color: inherit;
}

.news-card-title:hover {
    color: #a5d6a7;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.news-card-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Footer */
.site-footer {
    background: #1b5e20;
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

/* Responsive */
@media (max-width: 1000px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .header-inner {
        flex-direction: column;
        height: auto;
        padding: 16px 0;
        gap: 16px;
    }

    .nav-menu {
        gap: 20px;
    }

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

    .news-card-title {
        font-size: 15px;
    }
}