/*
Theme Name: North Idaho Republican
Theme URI: https://northidahorepublican.com
Author: Cedar Line Media
Description: Conservative news and community theme for North Idaho Republican. Covers Kootenai, Bonner, Boundary, Benewah, and Shoshone counties.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: nir
*/

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  --red: #8B1A1A;
  --red-hover: #A02222;
  --navy: #1B2838;
  --navy-light: #2B3F56;
  --cream: #F7F4EF;
  --sand: #EDE8E0;
  --gold: #B89B4A;
  --text: #2C2C2C;
  --text-light: #6B6560;
  --white: #FFFFFF;
  --border: #DDD8D0;
  --font-display: 'Lora', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-body); color: var(--text); background: var(--cream); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--navy); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); color: var(--navy); line-height: 1.25; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ============================================
   UTILITY BAR
   ============================================ */
.util-bar {
  background: var(--navy); color: rgba(255,255,255,0.6);
  font-size: 11.5px; padding: 7px 0; letter-spacing: 0.3px;
}
.util-bar .wrap { display: flex; justify-content: space-between; align-items: center; }
.util-bar a { color: var(--gold); font-weight: 500; }
.util-bar a:hover { color: #D4B65E; }

/* ============================================
   HEADER
   ============================================ */
.site-header {
  background: var(--white); border-bottom: 3px solid var(--red); padding: 18px 0;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; }
.brand h1 { font-size: 26px; line-height: 1.05; letter-spacing: -0.3px; margin: 0; }
.brand h1 a { color: var(--navy); text-decoration: none; }
.brand h1 em { color: var(--red); font-style: normal; }
.brand .tagline {
  font-size: 11px; color: var(--text-light); letter-spacing: 2.5px;
  text-transform: uppercase; margin-top: 3px; font-weight: 500; font-family: var(--font-body);
}
.main-nav { display: flex; align-items: center; gap: 0; }
.main-nav a, .main-nav .menu-item a {
  font-size: 13px; font-weight: 600; color: var(--navy); text-decoration: none;
  margin-left: 26px; text-transform: uppercase; letter-spacing: 0.7px;
}
.main-nav a:hover, .main-nav .menu-item a:hover { color: var(--red); }
.main-nav ul { list-style: none; display: flex; margin: 0; padding: 0; }
.main-nav ul li { display: inline-block; }

/* Mobile menu toggle */
.menu-toggle { display: none; background: none; border: none; font-size: 24px; color: var(--navy); cursor: pointer; }

/* ============================================
   HERO / FEATURED
   ============================================ */
.hero-section {
  background: linear-gradient(170deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: 44px 0;
}
.hero-grid { display: grid; grid-template-columns: 1fr 320px; gap: 36px; }
.hero-main .cat-label {
  display: inline-block; background: var(--red); color: white;
  font-size: 10.5px; font-weight: 700; padding: 4px 12px;
  text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 14px;
  font-family: var(--font-body);
}
.hero-main h2 { font-size: 30px; color: white; line-height: 1.25; margin-bottom: 14px; letter-spacing: -0.2px; }
.hero-main h2 a { color: white; }
.hero-main h2 a:hover { color: var(--gold); }
.hero-main .excerpt { color: rgba(255,255,255,0.7); font-size: 15px; line-height: 1.6; margin-bottom: 6px; }
.hero-main .byline { color: rgba(255,255,255,0.4); font-size: 12px; font-weight: 500; }

.side-stories { display: flex; flex-direction: column; }
.side-story {
  padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,0.1);
  transition: padding-left 0.15s;
}
.side-story:hover { padding-left: 6px; }
.side-story:last-child { border-bottom: none; }
.side-story .cat {
  color: var(--gold); font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px;
}
.side-story h3 { font-size: 15px; color: white; line-height: 1.3; }
.side-story h3 a { color: white; }
.side-story h3 a:hover { color: var(--gold); }
.side-story .date { color: rgba(255,255,255,0.35); font-size: 11.5px; margin-top: 4px; }

/* ============================================
   SECTION LABELS
   ============================================ */
.sec-label {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 32px 0 14px; border-bottom: 2px solid var(--navy); margin-bottom: 20px;
}
.sec-label h2 { font-size: 20px; }
.sec-label a {
  font-size: 12px; color: var(--red); font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase;
}

/* ============================================
   ARTICLE CARDS (3-up grid)
   ============================================ */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 32px; }
.card {
  background: var(--white); border: 1px solid var(--border);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.07); transform: translateY(-2px); }
.card-img {
  height: 180px; background: var(--sand); position: relative; overflow: hidden;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img .tag {
  position: absolute; top: 12px; left: 12px; background: var(--red); color: white;
  font-size: 10px; font-weight: 700; padding: 3px 10px;
  text-transform: uppercase; letter-spacing: 1.2px; font-family: var(--font-body);
}
.card-body { padding: 18px 20px 20px; }
.card-body h3 { font-size: 16.5px; line-height: 1.3; margin-bottom: 8px; }
.card-body h3 a { color: var(--navy); }
.card-body h3 a:hover { color: var(--red); }
.card-body p { font-size: 13.5px; color: var(--text-light); line-height: 1.55; margin-bottom: 10px; }
.card-body .meta { font-size: 11.5px; color: #AAA; font-weight: 500; }

/* ============================================
   TWO COLUMN LAYOUT
   ============================================ */
.two-col { display: grid; grid-template-columns: 1fr 300px; gap: 32px; padding-bottom: 48px; }

/* ============================================
   LIST ARTICLES
   ============================================ */
.list-item {
  display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.list-item:hover { background: rgba(0,0,0,0.015); }
.list-thumb {
  width: 110px; height: 74px; background: var(--sand);
  flex-shrink: 0; border-radius: 2px; overflow: hidden;
}
.list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-item h3 { font-size: 15px; line-height: 1.3; margin-bottom: 5px; }
.list-item h3 a { color: var(--navy); }
.list-item h3 a:hover { color: var(--red); }
.list-item .meta { font-size: 11.5px; color: #AAA; }

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar-box { margin-bottom: 20px; }

/* Newsletter */
.newsletter-box { background: var(--navy); padding: 24px; color: white; }
.newsletter-box h3 { font-family: var(--font-display); font-size: 17px; margin-bottom: 6px; }
.newsletter-box p { font-size: 13px; color: rgba(255,255,255,0.65); line-height: 1.45; margin-bottom: 14px; }
.newsletter-box input[type="email"],
.newsletter-box input[type="text"] {
  width: 100%; padding: 11px 12px; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15); color: white; font-size: 13px;
  margin-bottom: 8px; font-family: var(--font-body);
}
.newsletter-box input::placeholder { color: rgba(255,255,255,0.35); }
.newsletter-box button, .newsletter-box input[type="submit"] {
  width: 100%; padding: 11px; background: var(--red); border: none; color: white;
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; cursor: pointer; font-family: var(--font-body);
}
.newsletter-box button:hover, .newsletter-box input[type="submit"]:hover { background: var(--red-hover); }

/* County/Link boxes */
.link-box { background: var(--white); border: 1px solid var(--border); padding: 20px; }
.link-box h3 { font-family: var(--font-display); font-size: 15px; color: var(--navy); margin-bottom: 10px; }
.link-box a { display: block; font-size: 13.5px; color: var(--red); padding: 7px 0; border-bottom: 1px solid var(--border); }
.link-box a:last-child { border-bottom: none; }
.link-box a:hover { color: var(--navy); }
.link-box .sub { font-size: 11.5px; color: var(--text-light); margin-left: 4px; }

/* ============================================
   OPINION BAR
   ============================================ */
.opinion-section { background: var(--sand); padding: 32px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.opinion-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.opinion-item { background: var(--white); border: 1px solid var(--border); padding: 20px; transition: box-shadow 0.2s; }
.opinion-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.opinion-item h3 { font-size: 16px; line-height: 1.3; margin-bottom: 8px; }
.opinion-item h3 a { color: var(--navy); }
.opinion-item h3 a:hover { color: var(--red); }
.opinion-item p { font-size: 13px; color: var(--text-light); line-height: 1.5; margin-bottom: 8px; }
.opinion-item .author { font-size: 12px; color: var(--gold); font-weight: 600; }

/* ============================================
   SINGLE ARTICLE
   ============================================ */
.article-header { padding: 40px 0 20px; }
.article-header .cat-label {
  display: inline-block; background: var(--red); color: white;
  font-size: 10.5px; font-weight: 700; padding: 4px 12px;
  text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 16px;
}
.article-header h1 { font-size: 34px; line-height: 1.2; margin-bottom: 14px; max-width: 720px; }
.article-meta { font-size: 13px; color: var(--text-light); margin-bottom: 8px; }
.article-meta time { font-weight: 500; }

.article-content { max-width: 720px; padding-bottom: 48px; }
.article-content p { font-size: 17px; line-height: 1.75; margin-bottom: 20px; color: var(--text); }
.article-content h2 { font-size: 24px; margin: 36px 0 16px; }
.article-content h3 { font-size: 20px; margin: 28px 0 12px; }
.article-content blockquote {
  border-left: 3px solid var(--red); padding: 12px 20px; margin: 24px 0;
  background: var(--sand); font-style: italic;
}
.article-content ul, .article-content ol { margin: 16px 0 20px 24px; }
.article-content li { font-size: 17px; line-height: 1.75; margin-bottom: 8px; }
.article-content img { margin: 24px 0; border-radius: 2px; }

.article-footer { border-top: 1px solid var(--border); padding: 24px 0; margin-bottom: 48px; max-width: 720px; }
.article-footer .tags { font-size: 13px; color: var(--text-light); }
.article-footer .tags a { color: var(--red); margin-right: 8px; }

/* ============================================
   ARCHIVE / CATEGORY PAGES
   ============================================ */
.archive-header { padding: 36px 0 20px; }
.archive-header h1 { font-size: 28px; margin-bottom: 8px; }
.archive-header p { font-size: 15px; color: var(--text-light); max-width: 600px; }

/* ============================================
   PAGE TEMPLATE
   ============================================ */
.page-content { max-width: 720px; padding: 40px 0 48px; }
.page-content h1 { font-size: 34px; margin-bottom: 20px; }
.page-content p { font-size: 17px; line-height: 1.75; margin-bottom: 20px; }

/* Subscribe page */
.subscribe-page { max-width: 560px; margin: 0 auto; padding: 48px 24px; text-align: center; }
.subscribe-page h1 { font-size: 30px; margin-bottom: 12px; }
.subscribe-page .subtitle { font-size: 16px; color: var(--text-light); margin-bottom: 32px; line-height: 1.5; }
.subscribe-form { background: var(--white); border: 1px solid var(--border); padding: 32px; text-align: left; }
.subscribe-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--navy); text-transform: uppercase; letter-spacing: 0.5px; }
.subscribe-form input[type="text"],
.subscribe-form input[type="email"],
.subscribe-form select {
  width: 100%; padding: 12px; border: 1px solid var(--border); font-size: 15px;
  margin-bottom: 18px; font-family: var(--font-body); background: var(--cream);
}
.subscribe-form button {
  width: 100%; padding: 14px; background: var(--red); border: none; color: white;
  font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  cursor: pointer; font-family: var(--font-body);
}
.subscribe-form button:hover { background: var(--red-hover); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.55); padding: 36px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; }
.site-footer h4 { color: white; font-family: var(--font-display); font-size: 15px; margin-bottom: 10px; }
.site-footer p { font-size: 12.5px; line-height: 1.55; }
.site-footer a { color: var(--gold); }
.footer-links p { margin-bottom: 4px; }
.disclaimer {
  margin-top: 24px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 11px; color: rgba(255,255,255,0.35); text-align: center; line-height: 1.5;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination { padding: 24px 0; display: flex; gap: 8px; justify-content: center; }
.pagination a, .pagination span {
  display: inline-block; padding: 8px 14px; border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--navy); background: var(--white);
}
.pagination .current { background: var(--navy); color: white; border-color: var(--navy); }
.pagination a:hover { background: var(--sand); }

/* ============================================
   404
   ============================================ */
.error-404 { text-align: center; padding: 80px 24px; }
.error-404 h1 { font-size: 48px; margin-bottom: 12px; }
.error-404 p { font-size: 17px; color: var(--text-light); margin-bottom: 24px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .opinion-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .card-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .menu-toggle { display: block; }
  .main-nav.active { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); padding: 20px; border-bottom: 3px solid var(--red); z-index: 100; }
  .main-nav.active a, .main-nav.active .menu-item a { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--border); display: block; }
  .hero-main h2 { font-size: 24px; }
  .article-header h1 { font-size: 26px; }
}
