/* RicherNews.com - Main Stylesheet */
/* New York Times inspired: serif headlines, clean columns, asymmetric grids */

:root {
    --rn-primary: #0f172a;
    --rn-primary-light: #1e293b;
    --rn-accent: #c41e3a;
    --rn-accent-hover: #a01830;
    --rn-text: #1e293b;
    --rn-text-muted: #64748b;
    --rn-bg: #ffffff;
    --rn-bg-alt: #f8fafc;
    --rn-border: #e2e8f0;
    --rn-border-dark: #cbd5e1;
    --rn-font-serif: 'Georgia', 'Times New Roman', Times, serif;
    --rn-font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --rn-container: 1200px;
    --rn-radius: 4px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--rn-font-sans);
    line-height: 1.6;
    color: var(--rn-text);
    background: var(--rn-bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--rn-font-serif);
    font-weight: 700;
    line-height: 1.25;
    color: var(--rn-primary);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }

p { margin-bottom: 1rem; color: var(--rn-text); }

a {
    color: var(--rn-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover { color: var(--rn-accent-hover); text-decoration: underline; }

.container {
    width: 95%;
    max-width: var(--rn-container);
    margin: 0 auto;
    padding: 0 1.25rem;
}
@media (min-width: 769px) {
    .container { width: 90%; }
}

/* ========== HEADER ========== */
.rn-header {
    background: var(--rn-primary);
    color: #fff;
    padding: 0.5rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.rn-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.rn-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
    font-family: var(--rn-font-serif);
    font-size: 1.5rem;
    font-weight: 700;
}
.rn-logo:hover { color: #fff; text-decoration: none; }

.rn-logo-img {
    height: 42px;
    width: auto;
    display: block;
}

.rn-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.rn-nav-toggle {
    background: none;
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: var(--rn-radius);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 44px;
    font-family: var(--rn-font-sans);
}
.rn-nav-toggle:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.6); }

.rn-nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    min-width: 200px;
    background: var(--rn-primary);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--rn-radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    z-index: 1001;
    overflow: hidden;
}

.rn-nav-dropdown.menu-open { display: block; }

.rn-nav-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: #fff !important;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-weight: 500;
    transition: background 0.2s;
}
.rn-nav-dropdown a:last-child { border-bottom: none; }
.rn-nav-dropdown a:hover {
    background: rgba(255,255,255,0.12);
    text-decoration: none;
    color: #fff !important;
}

/* ========== DATE BAR (NYT style thin strip) ========== */
.rn-datebar {
    background: var(--rn-bg);
    border-bottom: 2px solid var(--rn-primary);
    padding: 0.5rem 0;
    font-family: var(--rn-font-sans);
    font-size: 0.8rem;
    color: var(--rn-text-muted);
}
.rn-datebar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.rn-datebar-date { font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.rn-datebar-edition { font-style: italic; }

/* ========== FRONT PAGE GRID (featured + sidebar) ========== */
.rn-front {
    padding: 2rem 0 1.5rem;
    background: var(--rn-bg);
}

.rn-front-grid {
    display: grid;
    gap: 2rem;
}
@media (min-width: 769px) {
    .rn-front-grid {
        grid-template-columns: 2fr 1fr;
    }
}

/* Featured article */
.rn-featured-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}
.rn-featured-link:hover { opacity: 0.92; text-decoration: none; color: inherit; }

.rn-featured-img-wrap {
    position: relative;
    margin-bottom: 1rem;
    border-radius: var(--rn-radius);
    overflow: hidden;
}
.rn-featured-img {
    width: 100%;
    padding-bottom: 52%;
    background-size: cover;
    background-position: center;
    background-color: var(--rn-primary-light);
}

.rn-tag {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    font-family: var(--rn-font-sans);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.3rem 0.6rem;
    border-radius: 2px;
    color: #fff;
}
.rn-tag--red { background: var(--rn-accent); }

.rn-featured-headline {
    font-family: var(--rn-font-serif);
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
    line-height: 1.18;
    color: var(--rn-primary);
    margin-bottom: 0.6rem;
}

.rn-featured-meta {
    font-size: 0.85rem;
    color: var(--rn-text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
}
.rn-byline { font-weight: 600; color: var(--rn-text); }
.rn-dot { color: var(--rn-text-muted); }

/* Sidebar */
.rn-sidebar {
    border-left: 1px solid var(--rn-border);
    padding-left: 1.5rem;
}
@media (max-width: 768px) {
    .rn-sidebar { border-left: none; padding-left: 0; border-top: 1px solid var(--rn-border); padding-top: 1.5rem; }
}

.rn-sidebar-heading {
    font-family: var(--rn-font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--rn-accent);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--rn-accent);
}

.rn-sidebar-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--rn-border);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}
.rn-sidebar-item:last-child { border-bottom: none; }
.rn-sidebar-item:hover { background: var(--rn-bg-alt); text-decoration: none; color: inherit; }

.rn-sidebar-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--rn-primary);
    color: #fff;
    font-family: var(--rn-font-serif);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.1rem;
}

.rn-sidebar-title {
    font-family: var(--rn-font-serif);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--rn-primary);
    margin-bottom: 0.2rem;
}

.rn-sidebar-meta {
    font-size: 0.75rem;
    color: var(--rn-text-muted);
}

/* ========== SECTION DIVIDER ========== */
.rn-divider { padding: 0; }
.rn-divider hr {
    border: none;
    border-top: 1px solid var(--rn-border);
    margin: 0;
}

/* ========== ABOUT STRIP ========== */
.rn-about-strip {
    padding: 2rem 0;
    background: var(--rn-bg-alt);
}
.rn-about-inner {
    display: grid;
    gap: 2rem;
    align-items: center;
}
@media (min-width: 769px) {
    .rn-about-inner { grid-template-columns: 1fr 2fr; }
}
.rn-about-brand h2 {
    font-family: var(--rn-font-serif);
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    color: var(--rn-primary);
    margin-bottom: 0.3rem;
}
.rn-about-tagline {
    font-family: var(--rn-font-serif);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--rn-text-muted);
    margin: 0;
}
.rn-about-text p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--rn-text);
    margin: 0;
}

/* ========== RECENT / MOSAIC GRID ========== */
.rn-recent-section {
    padding: 2.5rem 0;
}

.rn-mosaic {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

@media (min-width: 640px) {
    .rn-mosaic {
        grid-template-columns: repeat(2, 1fr);
    }
    .rn-mosaic-card--large {
        grid-column: span 1;
    }
}

@media (min-width: 900px) {
    .rn-mosaic {
        grid-template-columns: repeat(3, 1fr);
    }
    .rn-mosaic-card--large:first-child {
        grid-column: span 2;
        grid-row: span 1;
    }
}

.rn-mosaic-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: var(--rn-bg);
    min-height: 160px;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: background 0.2s;
}
.rn-mosaic-card:hover { background: var(--rn-bg-alt); text-decoration: none; color: inherit; }

.rn-mosaic-card--large {
    min-height: 200px;
    padding: 1.75rem;
}

.rn-mosaic-card--large .rn-mosaic-title {
    font-size: 1.2rem;
}

.rn-mosaic-title {
    font-family: var(--rn-font-serif);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--rn-primary);
    margin-bottom: 0.4rem;
}

.rn-mosaic-meta {
    font-size: 0.78rem;
    color: var(--rn-text-muted);
}

/* ========== HOW WE REPORT - PILLARS ========== */
.rn-how-section {
    background: var(--rn-bg-alt);
}

.rn-pillars {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 640px) { .rn-pillars { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .rn-pillars { grid-template-columns: repeat(4, 1fr); } }

.rn-pillar {
    text-align: center;
    padding: 1.5rem 1rem;
}
.rn-pillar-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    background: var(--rn-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rn-pillar h3 {
    font-family: var(--rn-font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
    color: var(--rn-primary);
}
.rn-pillar p {
    font-size: 0.9rem;
    color: var(--rn-text-muted);
    line-height: 1.55;
    margin: 0;
}

/* ========== SECTIONS ========== */
.rn-section {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--rn-border);
}

.rn-section:last-of-type { border-bottom: none; }

.rn-section-title {
    font-family: var(--rn-font-serif);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--rn-primary);
    margin-bottom: 1.25rem;
}

.rn-section-heading {
    font-family: var(--rn-font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--rn-primary);
    margin: 0 0 1rem 0;
}

/* ========== FOOTER ========== */
.rn-footer {
    background: var(--rn-primary);
    color: rgba(255,255,255,0.9);
    padding: 2rem 0 1.5rem;
    margin-top: 0;
}

.rn-footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.rn-footer a { color: rgba(255,255,255,0.9) !important; }
.rn-footer a:hover { color: #fff !important; text-decoration: underline; }

.rn-footer-bottom {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    font-size: 0.875rem;
    color: rgba(255,255,255,0.7);
    text-align: center;
}

/* ========== ARTICLE LAYOUTS (shared) ========== */
.rn-article { padding: 2rem 0; }
.rn-article .container { max-width: 720px; }
.rn-article h1 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}
.rn-article-byline {
    font-size: 0.9rem;
    color: var(--rn-text-muted);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--rn-border);
}
.rn-article-body p { margin-bottom: 1.25rem; }
.rn-article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--rn-radius);
    margin: 1rem 0;
}

.rn-article-hero-img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border-radius: var(--rn-radius);
}

.rn-article-pullquote {
    font-family: var(--rn-font-serif);
    font-size: 1.35rem;
    font-style: italic;
    color: var(--rn-primary);
    border-left: 4px solid var(--rn-accent);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--rn-bg-alt);
}

/* ========== BLANK / INTERNAL PAGES ========== */
.rn-page-title { margin-bottom: 1.5rem; }
.rn-content p { margin-bottom: 1rem; }

/* Legacy classes kept for existing pages */
.rn-hero {
    background: var(--rn-bg-alt);
    padding: 2rem 0;
    border-bottom: 1px solid var(--rn-border);
}
.rn-hero-inner { display: grid; gap: 2rem; }
@media (min-width: 769px) {
    .rn-hero-inner { grid-template-columns: 1fr 2fr; align-items: start; }
}
.rn-hero-left h1 { margin-bottom: 1rem; }
.rn-hero-intro {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--rn-text-muted);
    padding: 1rem 1.25rem;
    background: var(--rn-bg);
    border-left: 4px solid var(--rn-accent);
    border-radius: 0 var(--rn-radius) var(--rn-radius) 0;
}
.rn-hero-right { min-width: 0; }
.rn-trending-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}
@media (max-width: 1024px) { .rn-trending-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .rn-trending-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; } }
.rn-trending-card {
    display: block;
    border-radius: var(--rn-radius);
    overflow: hidden;
    background: var(--rn-bg);
    border: 1px solid var(--rn-border);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}
.rn-trending-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
}
.rn-trending-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.rn-trending-card .card-label {
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--rn-primary);
    background: var(--rn-bg);
}
.rn-recent-wrap { margin-top: 2rem; }
.rn-recent-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}
@media (max-width: 1024px) { .rn-recent-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .rn-recent-grid { grid-template-columns: 1fr; } }
.rn-article-card {
    display: block;
    border-radius: var(--rn-radius);
    overflow: hidden;
    background: var(--rn-bg);
    border: 1px solid var(--rn-border);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}
.rn-article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
}
.rn-article-card .card-img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.rn-article-card .card-body { padding: 0.75rem 1rem; }
.rn-article-card .card-title {
    font-family: var(--rn-font-serif);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--rn-primary);
}
.rn-article-card .card-meta { font-size: 0.8rem; color: var(--rn-text-muted); }

.rn-eval-split { display: grid; gap: 2rem; }
@media (min-width: 769px) { .rn-eval-split { grid-template-columns: 1fr 1fr; } }
.rn-eval-content p { margin-bottom: 1rem; color: var(--rn-text); }
.rn-eval-bullets { list-style: none; }
.rn-eval-bullets li {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}
.rn-eval-bullets li::before {
    content: "";
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    background: var(--rn-accent);
    border-radius: 50%;
    margin-top: 0.5rem;
}
.rn-eval-bullets strong { display: block; margin-bottom: 0.25rem; }

/* ========== DESKTOP HOMEPAGE TWEAKS ========== */
@media (min-width: 769px) {
    .rn-sidebar-heading { padding-bottom: 0; margin-bottom: 0; }
    .rn-front-grid { padding-bottom: 0; }
    .rn-recent-section { padding-top: 12px; }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .rn-front { padding: 1.5rem 0 1rem; }
    .rn-section { padding: 1.5rem 0; }
    .rn-article { padding: 1.25rem 0; }
    .rn-about-strip { padding: 1.5rem 0; }
    .rn-recent-section { padding: 1.5rem 0; }
}
