/*
Theme Name: Liberty Planet
Theme URI: https://libertyplanet.com
Author: Liberty Planet
Author URI: https://libertyplanet.com
Description: A patriotic, editorially-driven theme for Liberty Planet — independent reporting on liberty, the Constitution, and American sovereignty.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: liberty-planet
Tags: news, magazine, editorial, conservative, featured-images, custom-logo, custom-menu, theme-options, threaded-comments, translation-ready, wide-blocks
*/

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

:root {
  --blue:       #1e40af;
  --blue-dark:  #0c1f5a;
  --blue-mid:   #2952c4;
  --crimson:    #dc2626;
  --crimson-d:  #991b1b;
  --cream:      #fdf6e3;
  --cream-dk:   #f4ecd5;
  --paper:      #faf7f0;
  --white:      #ffffff;
  --ink:        #1c1f26;
  --ink-soft:   #3a3f4b;
  --muted:      #6b7280;
  --line:       #e6dfc6;
  --gold:       #b8860b;
  --font-head:  'Playfair Display', Georgia, serif;
  --font-body:  'Source Sans Pro', -apple-system, sans-serif;
  --font-ui:    'Inter', -apple-system, sans-serif;
  --radius:     2px;
  --shadow-sm:  0 1px 2px rgba(28,31,38,.06);
  --shadow-md:  0 4px 12px rgba(28,31,38,.08);
  --maxw:       1240px;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: color .2s; }
a:hover { color: var(--crimson); }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.top-bar {
  background: var(--blue-dark);
  color: var(--cream);
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: .04em;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-bar .date { text-transform: uppercase; opacity: .85; }
.top-bar .social a { color: var(--cream); margin-left: 12px; opacity: .85; }
.top-bar .social a:hover { color: var(--white); opacity: 1; }

/* ============================================================
   HEADER / MASTHEAD
   ============================================================ */
.site-header {
  background: var(--cream);
  border-bottom: 4px double var(--blue);
}
.masthead {
  text-align: center;
  padding: 28px 24px 22px;
}
.masthead .site-logo img { max-height: 110px; width: auto; margin: 0 auto; }
.masthead .tagline {
  font-family: var(--font-head);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 15px;
  letter-spacing: .04em;
  margin-top: 8px;
}

/* ============================================================
   NAV
   ============================================================ */
.primary-nav {
  background: var(--blue);
  border-bottom: 3px solid var(--crimson);
}
.primary-nav .container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 22px;
  padding: 12px;
  cursor: pointer;
}
.nav-menu {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
}
.nav-menu > li { position: relative; }
.nav-menu > li > a {
  display: block;
  color: var(--cream);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 16px 22px;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  transition: all .2s;
}
.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a {
  color: var(--white);
  border-bottom-color: var(--crimson);
  background: rgba(255,255,255,.04);
}

/* ============================================================
   HEADLINE STRIP (replaces ticker)
   ============================================================ */
.dispatch-strip {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  font-family: var(--font-head);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-soft);
}
.dispatch-strip .container { display: flex; align-items: center; gap: 18px; }
.dispatch-strip .badge {
  background: var(--crimson);
  color: var(--white);
  padding: 4px 12px;
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  border-radius: 2px;
  flex-shrink: 0;
}
.dispatch-strip a { color: var(--blue); border-bottom: 1px dotted var(--blue); padding-bottom: 1px; }
.dispatch-strip a:hover { color: var(--crimson); border-bottom-color: var(--crimson); }

/* ============================================================
   HERO — single big + 2 stacked
   ============================================================ */
.hero-section { padding: 36px 0; background: var(--paper); }
.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
}
.hero-main {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.hero-main img { width: 100%; height: 520px; object-fit: cover; }
.hero-main .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(12,31,90,.92) 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 36px;
}
.hero-main .category {
  display: inline-block;
  background: var(--crimson);
  color: var(--white);
  padding: 5px 14px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 12px;
  align-self: flex-start;
}
.hero-main h2 {
  font-family: var(--font-head);
  font-size: 36px;
  line-height: 1.2;
  color: var(--white);
  margin-bottom: 10px;
}
.hero-main h2 a { color: var(--white); }
.hero-main h2 a:hover { color: var(--cream); }
.hero-main .excerpt { color: rgba(255,255,255,.85); font-size: 16px; max-width: 640px; }

.hero-secondary { display: flex; flex-direction: column; gap: 18px; }
.hero-secondary article {
  background: var(--white);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  transition: transform .2s, box-shadow .2s;
}
.hero-secondary article:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.hero-secondary img { width: 120px; height: 90px; object-fit: cover; }
.hero-secondary h3 {
  font-family: var(--font-head);
  font-size: 17px;
  line-height: 1.3;
  color: var(--ink);
}
.hero-secondary h3 a { color: var(--ink); }
.hero-secondary h3 a:hover { color: var(--blue); }
.hero-secondary .meta {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: 4px;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-main img { height: 360px; }
  .hero-main h2 { font-size: 26px; }
}

/* ============================================================
   CONTENT LAYOUT
   ============================================================ */
.content-area {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  padding: 40px 0 60px;
}
.content-main { min-width: 0; }
.section-title {
  font-family: var(--font-head);
  font-size: 22px;
  color: var(--blue-dark);
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--crimson);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 14px; height: 14px;
  background: var(--crimson);
  transform: rotate(45deg);
}

/* ============================================================
   ARTICLE CARDS
   ============================================================ */
.article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.article-card {
  background: var(--white);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.article-card .thumb {
  position: relative;
  display: block;
  overflow: hidden;
  height: 220px;
}
.article-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.article-card:hover .thumb img { transform: scale(1.04); }
.article-card .badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--blue);
  color: var(--white);
  padding: 4px 10px;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.article-card .body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.article-card h3 {
  font-family: var(--font-head);
  font-size: 20px;
  line-height: 1.3;
  margin-bottom: 10px;
}
.article-card h3 a { color: var(--ink); }
.article-card h3 a:hover { color: var(--blue); }
.article-card .meta {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.article-card .excerpt { color: var(--ink-soft); font-size: 15px; flex: 1; }
.article-card .read-more {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--crimson);
}

@media (max-width: 900px) {
  .content-area { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { font-family: var(--font-body); }
.widget {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 22px;
  margin-bottom: 24px;
}
.widget-title {
  font-family: var(--font-head);
  color: var(--blue-dark);
  font-size: 18px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--crimson);
}
.widget ul { list-style: none; }
.widget ul li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--ink); font-size: 14px; }
.widget ul li a:hover { color: var(--crimson); }

.newsletter-widget { background: var(--blue-dark); color: var(--cream); border: none; }
.newsletter-widget .widget-title { color: var(--white); border-bottom-color: var(--crimson); }
.newsletter-widget p { color: var(--cream); opacity: .9; font-size: 14px; margin-bottom: 14px; }
.newsletter-widget input[type=email] {
  width: 100%; padding: 10px 12px; border: none; background: rgba(255,255,255,.95);
  font-family: var(--font-body); font-size: 14px; margin-bottom: 8px;
}
.newsletter-widget button {
  width: 100%; padding: 10px; background: var(--crimson); color: var(--white); border: none;
  font-family: var(--font-ui); font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  cursor: pointer; font-size: 13px;
}
.newsletter-widget button:hover { background: var(--crimson-d); }

/* ============================================================
   SINGLE POST
   ============================================================ */
.single-post { background: var(--white); padding: 40px; border: 1px solid var(--line); }
.entry-meta { color: var(--muted); font-family: var(--font-ui); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.entry-meta .category { color: var(--crimson); }
.entry-title {
  font-family: var(--font-head);
  font-size: 38px;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 18px;
}
.featured-image { margin-bottom: 28px; }
.entry-content { font-size: 18px; line-height: 1.75; color: var(--ink-soft); }
.entry-content p { margin-bottom: 22px; }
.entry-content h2 { font-family: var(--font-head); color: var(--blue-dark); margin: 32px 0 14px; font-size: 28px; }
.entry-content h3 { font-family: var(--font-head); color: var(--blue-dark); margin: 24px 0 10px; font-size: 22px; }
.entry-content a { color: var(--blue); border-bottom: 1px solid var(--blue); }
.entry-content a:hover { color: var(--crimson); border-bottom-color: var(--crimson); }
.entry-content blockquote {
  font-family: var(--font-head);
  font-style: italic;
  font-size: 22px;
  color: var(--blue-dark);
  border-left: 4px solid var(--crimson);
  padding: 8px 0 8px 24px;
  margin: 24px 0;
}

.author-box {
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 22px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-top: 36px;
}
.author-box img { width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0; }
.author-box h4 { font-family: var(--font-head); font-size: 18px; color: var(--blue-dark); margin-bottom: 4px; }
.author-box .author-bio { font-size: 14px; color: var(--ink-soft); }

/* ============================================================
   COMMENTS
   ============================================================ */
.comments-section { margin-top: 40px; padding: 32px; background: var(--white); border: 1px solid var(--line); }
.comments-section h3 { font-family: var(--font-head); color: var(--blue-dark); margin-bottom: 20px; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination { display: flex; justify-content: center; gap: 6px; margin: 40px 0; }
.pagination ul.page-numbers { display: flex; gap: 6px; list-style: none; }
.pagination ul.page-numbers li { display: inline-flex; }
.pagination a, .pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
  font-family: var(--font-ui); font-size: 14px; font-weight: 700;
}
.pagination .current { background: var(--blue); color: var(--white); border-color: var(--blue); }
.pagination a:hover { background: var(--cream); color: var(--blue); }
.pagination .prev, .pagination .next { width: auto; padding: 0 14px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--blue-dark); color: var(--cream); margin-top: 60px; }
.footer-top { padding: 50px 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 36px;
}
.footer-widget h4 {
  font-family: var(--font-head);
  color: var(--white);
  font-size: 17px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--crimson);
}
.footer-widget ul { list-style: none; }
.footer-widget ul li { padding: 6px 0; }
.footer-widget a { color: var(--cream); font-size: 14px; opacity: .85; }
.footer-widget a:hover { color: var(--white); opacity: 1; }
.footer-brand img { max-height: 64px; margin-bottom: 14px; filter: brightness(0) invert(1) drop-shadow(0 0 4px rgba(0,0,0,.6)); }
.footer-brand p { font-size: 13px; color: var(--cream); opacity: .8; line-height: 1.6; }

.footer-newsletter-form { display: flex; flex-direction: column; gap: 8px; }
.footer-newsletter-form input {
  padding: 10px 14px; background: rgba(255,255,255,.95); border: none;
  font-family: var(--font-body); font-size: 14px;
}
.footer-newsletter-form button {
  padding: 10px; background: var(--crimson); color: var(--white); border: none;
  font-family: var(--font-ui); font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; cursor: pointer; font-size: 12px;
}
.footer-newsletter-form button:hover { background: var(--crimson-d); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 18px 0;
  font-size: 12px;
  color: var(--cream);
  opacity: .75;
}
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-bottom a { color: var(--cream); margin: 0 8px; }
.footer-bottom a:hover { color: var(--white); opacity: 1; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   FORMS (CF7)
   ============================================================ */
.wpcf7 .lp-form-intro { margin-bottom: 22px; }
.wpcf7 .lp-form-intro h2 { font-family: var(--font-head); color: var(--blue-dark); font-size: 26px; margin-bottom: 8px; }
.wpcf7 label { display: block; margin: 14px 0 4px; font-family: var(--font-ui); font-weight: 600; font-size: 13px; color: var(--blue-dark); letter-spacing: .04em; text-transform: uppercase; }
.wpcf7 input[type=text], .wpcf7 input[type=email], .wpcf7 input[type=tel] {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); background: var(--white);
  font-family: var(--font-body); font-size: 15px;
}
.wpcf7 input:focus { outline: 2px solid var(--blue); border-color: var(--blue); }
.lp-consent { background: var(--cream); border-left: 4px solid var(--blue); padding: 14px 16px; margin: 18px 0; font-size: 13px; line-height: 1.55; }
.lp-consent.lp-consent-sms { border-left-color: var(--crimson); }
.lp-disclosure-summary { background: var(--white); border: 1px solid var(--line); padding: 12px 14px; margin: 16px 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.lp-disclosure-summary a { color: var(--crimson); }
.wpcf7 input[type=submit] {
  display: block; width: 100%; padding: 14px 24px; margin-top: 24px;
  background: var(--crimson); color: var(--white); border: none;
  font-family: var(--font-ui); font-size: 14px; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 800; cursor: pointer;
}
.wpcf7 input[type=submit]:hover { background: var(--crimson-d); }

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .site-header, .site-footer, .sidebar, .dispatch-strip, .top-bar { display: none; }
  .content-area { grid-template-columns: 1fr; }
  body { font-size: 12pt; color: #000; background: #fff; }
}
