/*
Theme Name: Reformed Life Journal
Theme URI: https://reformedlifejournal.com
Author: Reformed Life Journal
Author URI: https://reformedlifejournal.com
Description: A New York Times-inspired news aggregator theme for Reformed Christian journalism. Features RSS feed aggregation from Reformed sources, daily article rotation, editorial commentary, and a metered paywall for premium content.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rlj
Tags: news, magazine, blog, custom-menu, featured-images, translation-ready

Reformed Life Journal WordPress Theme
Sola Scriptura · Sola Fide · Sola Gratia · Solus Christus · Soli Deo Gloria
*/

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  --rlj-black: #121212;
  --rlj-dark-gray: #333;
  --rlj-medium-gray: #666;
  --rlj-light-gray: #999;
  --rlj-border: #dfdfdf;
  --rlj-cream: #faf9f6;
  --rlj-burgundy: #6b1d2a;
  --rlj-burgundy-dark: #521522;
  --rlj-gold: #c4a35a;
  --rlj-section-bg: #f7f7f5;
  --rlj-max-width: 1280px;
  --rlj-font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --rlj-font-body: 'Lora', Georgia, 'Times New Roman', serif;
  --rlj-font-sans: 'Libre Franklin', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--rlj-font-body);
  background: #fff;
  color: var(--rlj-black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ============================================================
   TOP BAR
   ============================================================ */
.rlj-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  font-family: var(--rlj-font-sans);
  font-size: 11px;
  color: var(--rlj-medium-gray);
  border-bottom: 1px solid var(--rlj-border);
  max-width: var(--rlj-max-width);
  margin: 0 auto;
}
.rlj-top-bar__left,
.rlj-top-bar__right { display: flex; gap: 16px; align-items: center; }
.rlj-top-bar a {
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}
.rlj-btn-subscribe {
  background: var(--rlj-burgundy);
  color: #fff;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border: none;
  cursor: pointer;
  font-family: var(--rlj-font-sans);
  display: inline-block;
}
.rlj-btn-subscribe:hover {
  background: var(--rlj-burgundy-dark);
  text-decoration: none;
}

/* ============================================================
   MASTHEAD
   ============================================================ */
.rlj-masthead {
  text-align: center;
  padding: 18px 20px 14px;
  border-bottom: 2px solid var(--rlj-black);
  max-width: var(--rlj-max-width);
  margin: 0 auto;
  position: relative;
}
.rlj-masthead__date {
  font-family: var(--rlj-font-sans);
  font-size: 11px;
  color: var(--rlj-light-gray);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.rlj-masthead__title {
  font-family: var(--rlj-font-serif);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.rlj-masthead__title a { color: inherit; }
.rlj-masthead__title a:hover { text-decoration: none; }
.rlj-masthead__tagline {
  font-family: var(--rlj-font-body);
  font-style: italic;
  font-size: 13px;
  color: var(--rlj-medium-gray);
  margin-top: 4px;
}
.rlj-masthead__motto {
  position: absolute;
  left: 20px;
  bottom: 18px;
  font-family: var(--rlj-font-sans);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--rlj-light-gray);
}
.rlj-masthead__right {
  position: absolute;
  right: 20px;
  bottom: 18px;
  font-family: var(--rlj-font-sans);
  font-size: 11px;
  color: var(--rlj-light-gray);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.rlj-nav {
  border-bottom: 1px solid var(--rlj-border);
  max-width: var(--rlj-max-width);
  margin: 0 auto;
  overflow-x: auto;
}
.rlj-nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
}
.rlj-nav li a {
  display: block;
  padding: 10px 15px;
  font-family: var(--rlj-font-sans);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--rlj-dark-gray);
  white-space: nowrap;
  transition: color 0.2s;
}
.rlj-nav li a:hover,
.rlj-nav li.current-menu-item a {
  color: var(--rlj-burgundy);
  text-decoration: none;
}
.rlj-premium-badge {
  display: inline-block;
  background: var(--rlj-gold);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 1px 5px;
  vertical-align: middle;
  margin-left: 4px;
}

/* ============================================================
   TICKER
   ============================================================ */
.rlj-ticker {
  background: var(--rlj-burgundy);
  color: #fff;
  font-family: var(--rlj-font-sans);
  font-size: 12px;
  font-weight: 500;
  padding: 8px 20px;
  text-align: center;
}
.rlj-ticker strong {
  font-weight: 700;
  margin-right: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================================================
   METER BAR (Soft Paywall)
   ============================================================ */
.rlj-meter-bar {
  display: none;
  background: var(--rlj-cream);
  border-bottom: 1px solid var(--rlj-border);
  padding: 8px 20px;
  text-align: center;
  font-family: var(--rlj-font-sans);
  font-size: 12px;
  color: var(--rlj-medium-gray);
}
.rlj-meter-bar.visible { display: block; }
.rlj-meter-bar strong { color: var(--rlj-burgundy); }
.rlj-meter-bar a {
  color: var(--rlj-burgundy);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* ============================================================
   CONTENT WRAPPER
   ============================================================ */
.rlj-wrapper {
  max-width: var(--rlj-max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   SOURCE BADGES
   ============================================================ */
.rlj-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--rlj-font-sans);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border: 1px solid var(--rlj-border);
  color: var(--rlj-medium-gray);
  margin-top: 8px;
  transition: all 0.2s;
}
.rlj-source-badge:hover {
  border-color: var(--rlj-burgundy);
  color: var(--rlj-burgundy);
  text-decoration: none;
}
.rlj-source-badge .arrow { font-size: 9px; }
.rlj-source-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* Source Colors */
.dot--aquila    { background: #2a6496; }
.dot--byfaith   { background: #3a7d44; }
.dot--tgc       { background: #d4a017; }
.dot--ligonier  { background: #8b4513; }
.dot--r21       { background: #6b1d2a; }
.dot--world     { background: #c0392b; }
.dot--mtw       { background: #1a5276; }
.dot--covenant  { background: #1e3a5f; }
.dot--rts       { background: #4a235a; }
.dot--dg        { background: #2c3e50; }
.dot--crossway  { background: #27ae60; }
.dot--rf        { background: #7d6608; }
.dot--wi        { background: #4a6fa5; }

/* Source Legend */
.rlj-source-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rlj-border);
  font-family: var(--rlj-font-sans);
  font-size: 10px;
  color: var(--rlj-light-gray);
  align-items: center;
}
.rlj-source-legend__title {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-right: 4px;
  color: var(--rlj-medium-gray);
}
.rlj-source-legend__item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================================
   LABELS & BYLINES
   ============================================================ */
.rlj-label {
  font-family: var(--rlj-font-sans);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--rlj-burgundy);
  margin-bottom: 6px;
}
.rlj-byline {
  font-family: var(--rlj-font-sans);
  font-size: 11px;
  color: var(--rlj-light-gray);
  margin-top: 4px;
}

/* ============================================================
   EDITORIAL VOICE ("Our Take")
   ============================================================ */
.rlj-editorial {
  font-size: 13px;
  line-height: 1.5;
  color: var(--rlj-medium-gray);
  font-style: italic;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dotted var(--rlj-border);
}
.rlj-editorial::before {
  content: "Our Take: ";
  font-style: normal;
  font-weight: 700;
  color: var(--rlj-burgundy);
  font-family: var(--rlj-font-sans);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ============================================================
   HERO SECTION (3-Column)
   ============================================================ */
.rlj-hero {
  display: grid;
  grid-template-columns: 1fr 370px 1fr;
  gap: 0;
  padding: 24px 0;
  border-bottom: 1px solid var(--rlj-border);
}
.rlj-hero__left {
  padding-right: 24px;
  border-right: 1px solid var(--rlj-border);
}
.rlj-hero__center { padding: 0 24px; }
.rlj-hero__right {
  padding-left: 24px;
  border-left: 1px solid var(--rlj-border);
}
.rlj-hero__headline {
  font-family: var(--rlj-font-serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.18;
  margin-bottom: 8px;
}
.rlj-hero__summary {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--rlj-dark-gray);
  margin-bottom: 4px;
}

/* ============================================================
   STORY CARDS
   ============================================================ */
.rlj-side-story {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rlj-border);
}
.rlj-side-story:last-child { border-bottom: none; }
.rlj-side-story h3 {
  font-family: var(--rlj-font-serif);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 4px;
}
.rlj-side-story p {
  font-size: 13px;
  line-height: 1.45;
  color: var(--rlj-medium-gray);
}
.rlj-center-story {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rlj-border);
}
.rlj-center-story:last-child { border-bottom: none; }
.rlj-center-story h3 {
  font-family: var(--rlj-font-serif);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.22;
  margin-bottom: 5px;
}
.rlj-center-story p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--rlj-dark-gray);
}

/* ============================================================
   SECTION BLOCKS
   ============================================================ */
.rlj-section {
  padding: 24px 0;
  border-bottom: 1px solid var(--rlj-border);
}
.rlj-section__title {
  font-family: var(--rlj-font-sans);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--rlj-dark-gray);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--rlj-black);
  display: inline-block;
}
.rlj-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.rlj-grid-3 .rlj-story-card {
  padding-right: 24px;
  border-right: 1px solid var(--rlj-border);
}
.rlj-grid-3 .rlj-story-card:last-child {
  padding-right: 0;
  border-right: none;
}
.rlj-story-card h3 {
  font-family: var(--rlj-font-serif);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 6px;
}
.rlj-story-card p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--rlj-medium-gray);
}

/* ============================================================
   OPINION RIBBON
   ============================================================ */
.rlj-opinion-ribbon {
  background: var(--rlj-section-bg);
  border-top: 3px solid var(--rlj-black);
  border-bottom: 1px solid var(--rlj-border);
  padding: 20px 20px;
}
.rlj-opinion-ribbon__inner {
  max-width: var(--rlj-max-width);
  margin: 0 auto;
}
.rlj-opinion-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.rlj-opinion-card h3 {
  font-family: var(--rlj-font-serif);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 5px;
}
.rlj-opinion-card p {
  font-size: 12px;
  line-height: 1.45;
  color: var(--rlj-medium-gray);
  margin-top: 4px;
}
.rlj-opinion-author {
  font-family: var(--rlj-font-sans);
  font-size: 10px;
  font-weight: 600;
  color: var(--rlj-burgundy);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================================
   DUAL COLUMN (Main + Sidebar)
   ============================================================ */
.rlj-dual {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0;
  padding: 24px 0;
  border-bottom: 1px solid var(--rlj-border);
}
.rlj-dual__main {
  padding-right: 28px;
  border-right: 1px solid var(--rlj-border);
}
.rlj-dual__sidebar { padding-left: 28px; }

.rlj-list-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--rlj-border);
}
.rlj-list-item:first-child { padding-top: 0; }
.rlj-list-item:last-child { border-bottom: none; }
.rlj-list-item h4 {
  font-family: var(--rlj-font-serif);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 3px;
}

.rlj-trending-item {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--rlj-border);
}
.rlj-trending-item:first-child { padding-top: 0; }
.rlj-trending-item:last-child { border-bottom: none; }
.rlj-trending-number {
  font-family: var(--rlj-font-sans);
  font-size: 22px;
  font-weight: 700;
  color: var(--rlj-border);
  min-width: 32px;
  line-height: 1;
}

/* ============================================================
   SCRIPTURE BLOCK
   ============================================================ */
.rlj-scripture {
  background: var(--rlj-cream);
  border-top: 3px double var(--rlj-gold);
  border-bottom: 3px double var(--rlj-gold);
  padding: 24px 40px;
  margin: 24px 0;
  text-align: center;
}
.rlj-scripture__label {
  font-family: var(--rlj-font-sans);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--rlj-gold);
  margin-bottom: 10px;
}
.rlj-scripture blockquote {
  font-family: var(--rlj-font-serif);
  font-size: 20px;
  font-style: italic;
  line-height: 1.5;
  color: var(--rlj-dark-gray);
  max-width: 700px;
  margin: 0 auto;
}
.rlj-scripture cite {
  display: block;
  margin-top: 10px;
  font-family: var(--rlj-font-sans);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  color: var(--rlj-light-gray);
}

/* ============================================================
   ARCHIVE PAGE
   ============================================================ */
.rlj-archive-header {
  text-align: center;
  padding: 32px 0 24px;
  border-bottom: 2px solid var(--rlj-black);
  margin-bottom: 24px;
}
.rlj-archive-header h1 {
  font-family: var(--rlj-font-serif);
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 6px;
}
.rlj-archive-header p {
  font-family: var(--rlj-font-body);
  font-style: italic;
  font-size: 15px;
  color: var(--rlj-medium-gray);
}

/* Archive Filters */
.rlj-archive-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rlj-border);
}
.rlj-archive-filters label {
  font-family: var(--rlj-font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--rlj-medium-gray);
  margin-right: 4px;
}
.rlj-archive-filters select,
.rlj-archive-filters input[type="month"] {
  font-family: var(--rlj-font-sans);
  font-size: 12px;
  padding: 6px 12px;
  border: 1px solid var(--rlj-border);
  background: #fff;
  color: var(--rlj-dark-gray);
}
.rlj-archive-filters .rlj-filter-btn {
  font-family: var(--rlj-font-sans);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 16px;
  border: 1px solid var(--rlj-border);
  background: #fff;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--rlj-dark-gray);
  transition: all 0.2s;
}
.rlj-archive-filters .rlj-filter-btn:hover,
.rlj-archive-filters .rlj-filter-btn.active {
  background: var(--rlj-burgundy);
  color: #fff;
  border-color: var(--rlj-burgundy);
}

/* Archive Month Group */
.rlj-archive-month {
  margin-bottom: 32px;
}
.rlj-archive-month__title {
  font-family: var(--rlj-font-sans);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--rlj-dark-gray);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--rlj-black);
  margin-bottom: 12px;
}
.rlj-archive-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rlj-border);
}
.rlj-archive-item:last-child { border-bottom: none; }
.rlj-archive-item__date {
  font-family: var(--rlj-font-sans);
  font-size: 11px;
  color: var(--rlj-light-gray);
  min-width: 70px;
  padding-top: 3px;
}
.rlj-archive-item__content { flex: 1; }
.rlj-archive-item__content h3 {
  font-family: var(--rlj-font-serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
}
.rlj-archive-item__content p {
  font-size: 13px;
  line-height: 1.45;
  color: var(--rlj-medium-gray);
}
.rlj-archive-item__section {
  font-family: var(--rlj-font-sans);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--rlj-burgundy);
  min-width: 80px;
  padding-top: 3px;
  text-align: right;
}

/* Pagination */
.rlj-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 24px 0;
  font-family: var(--rlj-font-sans);
  font-size: 13px;
}
.rlj-pagination a,
.rlj-pagination span {
  padding: 8px 14px;
  border: 1px solid var(--rlj-border);
  color: var(--rlj-dark-gray);
}
.rlj-pagination .current {
  background: var(--rlj-burgundy);
  color: #fff;
  border-color: var(--rlj-burgundy);
}

/* ============================================================
   FOOTER
   ============================================================ */
.rlj-footer {
  border-top: 2px solid var(--rlj-black);
  background: #fff;
}
.rlj-footer__inner {
  max-width: var(--rlj-max-width);
  margin: 0 auto;
  padding: 28px 20px;
}
.rlj-footer__logo {
  font-family: var(--rlj-font-serif);
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 16px;
}
.rlj-footer__links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.rlj-footer__links a {
  font-family: var(--rlj-font-sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--rlj-medium-gray);
}
.rlj-footer__copy {
  text-align: center;
  font-family: var(--rlj-font-sans);
  font-size: 11px;
  color: var(--rlj-light-gray);
}
.rlj-footer__disclaimer {
  font-size: 10px;
  margin-top: 6px;
  display: block;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .rlj-hero { grid-template-columns: 1fr; }
  .rlj-hero__left, .rlj-hero__right {
    border: none; padding: 0;
    border-bottom: 1px solid var(--rlj-border);
    padding-bottom: 16px; margin-bottom: 16px;
  }
  .rlj-hero__center { padding: 0; }
  .rlj-opinion-grid { grid-template-columns: 1fr 1fr; }
  .rlj-grid-3 { grid-template-columns: 1fr; }
  .rlj-grid-3 .rlj-story-card {
    padding-right: 0; border-right: none;
    border-bottom: 1px solid var(--rlj-border);
    padding-bottom: 16px;
  }
  .rlj-grid-3 .rlj-story-card:last-child { border-bottom: none; }
  .rlj-dual { grid-template-columns: 1fr; }
  .rlj-dual__main {
    padding-right: 0; border-right: none;
    border-bottom: 1px solid var(--rlj-border);
    padding-bottom: 16px; margin-bottom: 16px;
  }
  .rlj-dual__sidebar { padding-left: 0; }
  .rlj-masthead__motto, .rlj-masthead__right { display: none; }
}
@media (max-width: 600px) {
  .rlj-opinion-grid { grid-template-columns: 1fr; }
  .rlj-hero__headline { font-size: 22px; }
  .rlj-source-legend { justify-content: center; }
  .rlj-archive-item { flex-direction: column; gap: 4px; }
  .rlj-archive-item__section { text-align: left; }
}

/* Animation */
@keyframes rljFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.rlj-hero, .rlj-opinion-ribbon, .rlj-section, .rlj-dual, .rlj-scripture {
  animation: rljFadeIn 0.45s ease both;
}
