/*
Theme Name: DeedWatcher Blog
Theme URI: https://deedwatcher.com
Author: DeedWatcher
Description: Official blog theme for DeedWatcher — deed fraud protection.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: deedwatcher
*/

/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0a1628;
  --navy-light: #132040;
  --gold: #b8922a;
  --gold-light: #d4a843;
  --green: #059669;
  --text: #1a1a2e;
  --muted: #6b7e9e;
  --border: #e2e8f0;
  --bg: #f8fafc;
  --white: #ffffff;
  --radius: 12px;
}

html { font-size: 16px; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--navy);
  line-height: 1.25;
  font-weight: 700;
}

a { color: var(--gold); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold-light); }

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

/* ── Layout ───────────────────────────────────────────────────── */
.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-content { flex: 1; }

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.container--wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ───────────────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-branding { display: flex; align-items: center; gap: 12px; }

.site-branding a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  text-decoration: none;
}

.site-branding a:hover { color: var(--gold); }

.brand-shield {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.site-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
}

.site-tagline {
  font-size: 0.65rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-link {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}

.header-link:hover { color: var(--white); }

.header-btn {
  background: var(--gold);
  color: var(--navy) !important;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 8px;
  letter-spacing: 0.3px;
  transition: background 0.2s, transform 0.15s;
}

.header-btn:hover {
  background: var(--gold-light) !important;
  transform: translateY(-1px);
}

/* ── Hero (archive/home) ──────────────────────────────────────── */
.blog-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: 60px 24px;
  text-align: center;
  border-bottom: 1px solid rgba(184,146,42,0.3);
}

.blog-hero h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2.2rem;
  color: var(--white);
  margin-bottom: 12px;
}

.blog-hero p {
  color: rgba(255,255,255,0.7);
  font-size: 1.05rem;
  max-width: 540px;
  margin: 0 auto;
}

/* ── Post Cards ───────────────────────────────────────────────── */
.posts-grid {
  padding: 48px 0;
}

.posts-list { display: flex; flex-direction: column; gap: 24px; }

.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  transition: box-shadow 0.2s, transform 0.15s;
}

.post-card:hover {
  box-shadow: 0 8px 30px rgba(10,22,40,0.1);
  transform: translateY(-2px);
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.post-card-date {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

.post-card-category {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gold);
  background: rgba(184,146,42,0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.post-card h2 {
  font-size: 1.35rem;
  margin-bottom: 10px;
  line-height: 1.3;
}

.post-card h2 a { color: var(--navy); }
.post-card h2 a:hover { color: var(--gold); }

.post-card-excerpt {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 16px;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.read-more:hover { color: var(--gold-light); }
.read-more::after { content: '→'; }

/* ── Pagination ───────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 32px 0 48px;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--navy);
  font-weight: 600;
  font-size: 0.9rem;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* ── Single Post ──────────────────────────────────────────────── */
.single-post { padding: 48px 0 64px; }

.post-header { margin-bottom: 32px; }

.post-header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.post-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gold);
}

.post-date {
  font-size: 0.82rem;
  color: var(--muted);
}

.post-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.2;
  color: var(--navy);
  margin-bottom: 16px;
}

.post-thumbnail {
  border-radius: var(--radius);
  margin-bottom: 32px;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

/* ── Post Content ─────────────────────────────────────────────── */
.entry-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #2d3748;
}

.entry-content h2 { font-size: 1.55rem; margin: 40px 0 14px; }
.entry-content h3 { font-size: 1.25rem; margin: 32px 0 10px; }
.entry-content p { margin-bottom: 20px; }

.entry-content ul, .entry-content ol {
  margin: 0 0 20px 24px;
}

.entry-content li { margin-bottom: 8px; }

.entry-content blockquote {
  border-left: 4px solid var(--gold);
  background: rgba(184,146,42,0.06);
  padding: 16px 24px;
  margin: 28px 0;
  border-radius: 0 8px 8px 0;
  color: var(--navy);
  font-style: italic;
}

.entry-content a { color: var(--gold); text-decoration: underline; }
.entry-content a:hover { color: var(--gold-light); }

.entry-content strong { color: var(--navy); font-weight: 700; }

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 0.93rem;
}

.entry-content th {
  background: var(--navy);
  color: var(--white);
  padding: 10px 14px;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
}

.entry-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.entry-content tr:nth-child(even) td { background: rgba(10,22,40,0.03); }

/* ── CTA Box (in posts) ───────────────────────────────────────── */
.post-cta {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: var(--radius);
  padding: 32px;
  margin: 40px 0;
  text-align: center;
  border: 1px solid rgba(184,146,42,0.3);
}

.post-cta h3 {
  color: var(--white);
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.post-cta p {
  color: rgba(255,255,255,0.75);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.post-cta a {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: 9px;
  letter-spacing: 0.3px;
  transition: background 0.2s, transform 0.15s;
}

.post-cta a:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

/* ── Post Navigation ──────────────────────────────────────────── */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.nav-previous, .nav-next {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
}

.nav-next { text-align: right; }

.nav-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.nav-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}

.nav-previous a:hover .nav-title,
.nav-next a:hover .nav-title { color: var(--gold); }

/* ── Sidebar / State Alert Box ────────────────────────────────── */
.alert-box {
  background: rgba(5,150,105,0.07);
  border: 1px solid rgba(5,150,105,0.25);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 28px 0;
  font-size: 0.93rem;
  color: #064e3b;
}

.alert-box strong { color: #065f46; }

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  border-top: 3px solid var(--gold);
  padding: 40px 24px 24px;
  margin-top: 48px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer-brand {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.1rem;
  color: var(--white);
  font-weight: 700;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--gold); }

.footer-copy {
  color: rgba(255,255,255,0.4);
  font-size: 0.78rem;
}

/* ── 404 ──────────────────────────────────────────────────────── */
.error-404 { text-align: center; padding: 80px 24px; }
.error-404 h1 { font-size: 3rem; color: var(--navy); margin-bottom: 12px; }
.error-404 p { color: var(--muted); margin-bottom: 24px; }
.btn-home {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  padding: 12px 28px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 0.95rem;
}
.btn-home:hover { background: var(--navy-light); color: var(--white); }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 640px) {
  .header-link { display: none; }
  .blog-hero h1 { font-size: 1.6rem; }
  .post-card { padding: 20px; }
  .post-card h2 { font-size: 1.15rem; }
  .post-navigation { grid-template-columns: 1fr; }
  .nav-next { text-align: left; }
}
