/*
Theme Name:  YourLegalAnswers
Theme URI:   https://yourlegalanswers.com
Author:      YourLegalAnswers.com
Author URI:  https://yourlegalanswers.com
Description: A fast, AdSense-optimized legal information blog theme built for YourLegalAnswers.com. Navy blue and red color scheme, mobile-first, high CTR layout.
Version:     1.0.0
License:     GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yourlegalanswers
Tags: blog, legal, adsense, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* =====================================================================
   CSS CUSTOM PROPERTIES
   ===================================================================== */
:root {
  --navy:       #1B3A6B;
  --navy-dark:  #142d54;
  --navy-light: #2a5298;
  --red:        #C0392B;
  --red-dark:   #96281b;
  --gold:       #D4AC0D;
  --white:      #FFFFFF;
  --off-white:  #F8F9FA;
  --light-gray: #F0F2F5;
  --mid-gray:   #DEE2E6;
  --text:       #2C3E50;
  --text-light: #555E6D;
  --text-muted: #888888;
  --border:     #E0E4EA;
  --success:    #27AE60;
  --warning:    #E67E22;

  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;

  --radius:     6px;
  --radius-lg:  10px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow:     0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.14);

  --container:  1200px;
  --content:    780px;
  --sidebar:    340px;
}

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

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: color .2s; }
a:hover { color: var(--red); }
ul, ol { padding-left: 1.5rem; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy);
  margin-bottom: .75rem;
}
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.2rem; }
h5 { font-size: 1rem; }
h6 { font-size: .9rem; }

p { margin-bottom: 1.25rem; }
p:last-child { margin-bottom: 0; }

blockquote {
  border-left: 4px solid var(--navy);
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background: var(--off-white);
  color: var(--text-light);
  font-style: italic;
  border-radius: 0 var(--radius) var(--radius) 0;
}

code {
  background: var(--light-gray);
  padding: .1em .4em;
  border-radius: 3px;
  font-size: .9em;
  font-family: 'Courier New', monospace;
}

pre {
  background: var(--light-gray);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

pre code { background: none; padding: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: .95rem;
}
table th {
  background: var(--navy);
  color: var(--white);
  padding: .7rem 1rem;
  text-align: left;
  font-weight: 600;
}
table td {
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--border);
}
table tr:nth-child(even) td { background: var(--off-white); }
table tr:hover td { background: #eef2f8; }

hr {
  border: none;
  border-top: 2px solid var(--border);
  margin: 2rem 0;
}

/* =====================================================================
   LAYOUT UTILITIES
   ===================================================================== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* =====================================================================
   SKIP LINK
   ===================================================================== */
.skip-link {
  position: absolute;
  top: -9999px; left: 1rem;
  background: var(--navy);
  color: var(--white);
  padding: .5rem 1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 9999;
}
.skip-link:focus { top: 0; }

/* =====================================================================
   TOP BAR
   ===================================================================== */
.top-bar {
  background: var(--navy-dark);
  color: rgba(255,255,255,.75);
  font-size: .8rem;
  padding: .4rem 0;
  display: flex;
  align-items: center;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.top-bar a { color: rgba(255,255,255,.8); }
.top-bar a:hover { color: var(--white); }
.top-bar-disclaimer { font-style: italic; }
.top-bar-links { display: flex; gap: 1rem; }

/* =====================================================================
   HEADER
   ===================================================================== */
#masthead {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: var(--shadow);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: .85rem 0;
}

/* Logo */
.site-branding { flex-shrink: 0; }
.site-branding a { display: flex; align-items: center; gap: .75rem; }
.custom-logo { height: 44px; width: auto; }
.site-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -.02em;
}
.site-title span { color: var(--red); }
.site-description {
  font-size: .72rem;
  color: rgba(255,255,255,.65);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-top: .15rem;
}

/* Navigation */
#site-navigation { flex: 1; }
.nav-menu {
  display: flex;
  list-style: none;
  padding: 0; margin: 0;
  gap: .2rem;
  flex-wrap: wrap;
  justify-content: center;
}
.nav-menu li { position: relative; }
.nav-menu > li > a {
  display: block;
  color: rgba(255,255,255,.9);
  font-size: .88rem;
  font-weight: 600;
  padding: .5rem .85rem;
  border-radius: var(--radius);
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current-menu-ancestor > a {
  background: rgba(255,255,255,.15);
  color: var(--white);
}

/* Dropdown */
.nav-menu .sub-menu {
  position: absolute;
  top: 100%; left: 0;
  background: var(--white);
  border-top: 3px solid var(--red);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  list-style: none;
  padding: .5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .2s;
  z-index: 100;
}
.nav-menu li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-menu .sub-menu a {
  display: block;
  padding: .5rem 1.2rem;
  color: var(--text);
  font-size: .88rem;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-menu .sub-menu a:hover { background: var(--light-gray); color: var(--navy); }

/* Header Search + CTA */
.header-actions { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.header-search-toggle {
  background: none;
  border: none;
  color: rgba(255,255,255,.8);
  cursor: pointer;
  padding: .5rem;
  border-radius: var(--radius);
  transition: background .2s, color .2s;
  display: flex; align-items: center;
}
.header-search-toggle:hover { background: rgba(255,255,255,.15); color: var(--white); }
.header-search-toggle svg { width: 18px; height: 18px; fill: currentColor; }
.menu-toggle {
  display: none;
  background: none;
  border: 2px solid rgba(255,255,255,.4);
  color: var(--white);
  padding: .4rem .7rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  align-items: center;
  gap: .4rem;
  transition: border-color .2s;
}
.menu-toggle:hover { border-color: rgba(255,255,255,.8); }
.menu-toggle .icon-bar {
  display: block;
  width: 20px; height: 2px;
  background: var(--white);
  transition: all .3s;
}
.menu-toggle .icon-bar + .icon-bar { margin-top: 4px; }

/* Header Search Overlay */
.header-search-overlay {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--navy-dark);
  padding: 1rem 0;
  display: none;
  z-index: 800;
}
.header-search-overlay.active { display: block; }
.header-search-form { display: flex; gap: .5rem; }
.header-search-form input {
  flex: 1;
  padding: .6rem 1rem;
  border: 2px solid rgba(255,255,255,.3);
  border-radius: var(--radius);
  background: rgba(255,255,255,.1);
  color: var(--white);
  font-size: .95rem;
}
.header-search-form input::placeholder { color: rgba(255,255,255,.5); }
.header-search-form button {
  background: var(--red);
  color: var(--white);
  border: none;
  padding: .6rem 1.2rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: background .2s;
}
.header-search-form button:hover { background: var(--red-dark); }

/* =====================================================================
   BREADCRUMBS
   ===================================================================== */
.breadcrumbs-bar {
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
  padding: .55rem 0;
  font-size: .8rem;
  color: var(--text-muted);
}
.breadcrumbs-bar a { color: var(--navy); }
.breadcrumbs-bar a:hover { color: var(--red); }
.breadcrumb-sep { margin: 0 .4rem; color: var(--mid-gray); }

/* =====================================================================
   HERO / FEATURED AREA (Homepage)
   ===================================================================== */
.home-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 3.5rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.home-hero-inner { position: relative; z-index: 1; }
.home-hero h1 {
  color: var(--white);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.2;
  margin-bottom: .75rem;
}
.home-hero h1 em {
  font-style: normal;
  color: #f9c84a;
}
.home-hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,.85);
  max-width: 600px;
  margin-bottom: 1.5rem;
}
.hero-search-form {
  display: flex;
  gap: .5rem;
  max-width: 560px;
  flex-wrap: wrap;
}
.hero-search-form input {
  flex: 1;
  min-width: 200px;
  padding: .85rem 1.2rem;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  background: rgba(255,255,255,.12);
  color: var(--white);
  outline: none;
  transition: border-color .2s;
}
.hero-search-form input::placeholder { color: rgba(255,255,255,.6); }
.hero-search-form input:focus { border-color: rgba(255,255,255,.7); }
.hero-search-form button {
  background: var(--red);
  color: var(--white);
  border: none;
  padding: .85rem 1.75rem;
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, transform .1s;
}
.hero-search-form button:hover { background: var(--red-dark); transform: translateY(-1px); }
.hero-badges {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.hero-badge {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px;
  padding: .3rem .9rem;
  font-size: .8rem;
  color: rgba(255,255,255,.9);
}
.hero-badge svg { width: 14px; height: 14px; fill: #f9c84a; flex-shrink: 0; }

/* =====================================================================
   CATEGORY PILLS (Homepage)
   ===================================================================== */
.category-pills-section {
  background: var(--white);
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.category-pills {
  display: flex;
  gap: .6rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  padding-bottom: .25rem;
}
.category-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--light-gray);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: .4rem 1rem;
  font-size: .83rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
  text-decoration: none;
}
.category-pill:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.category-pill .cat-icon { font-size: 1em; }

/* =====================================================================
   AD ZONES
   ===================================================================== */
.ad-zone {
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
}
.ad-zone::before {
  content: 'Advertisement';
  display: block;
  font-size: .68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .35rem;
}
.ad-zone-leaderboard {
  background: var(--light-gray);
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  min-height: 90px;
}
.ad-zone-rectangle {
  background: var(--light-gray);
  padding: .5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  min-height: 250px;
}

/* =====================================================================
   MAIN LAYOUT
   ===================================================================== */
#primary {
  padding: 2rem 0 3rem;
}
.content-area-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar);
  gap: 2.5rem;
  align-items: start;
}
.content-area-inner.no-sidebar {
  grid-template-columns: minmax(0, 1fr);
  max-width: var(--content);
  margin: 0 auto;
}

/* =====================================================================
   POST CARDS (Archive / Home)
   ===================================================================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .25s, transform .2s;
}
.post-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.post-card-thumbnail {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--light-gray);
  position: relative;
}
.post-card-thumbnail img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.post-card:hover .post-card-thumbnail img { transform: scale(1.04); }
.post-card-thumbnail-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  font-size: 2.5rem;
}
.post-card-category {
  position: absolute;
  top: .75rem; left: .75rem;
  background: var(--red);
  color: var(--white);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .2rem .65rem;
  border-radius: 3px;
}
.post-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
  margin-bottom: .6rem;
}
.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--red); }
.post-card-excerpt {
  font-size: .88rem;
  color: var(--text-light);
  line-height: 1.6;
  flex: 1;
  margin-bottom: .9rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: .75rem;
  flex-wrap: wrap;
}
.post-card-meta svg { width: 13px; height: 13px; fill: currentColor; flex-shrink: 0; }
.post-card-meta span { display: flex; align-items: center; gap: .25rem; }
.read-more-link {
  color: var(--navy);
  font-weight: 700;
  font-size: .82rem;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-top: .6rem;
  transition: color .2s;
}
.read-more-link:hover { color: var(--red); }
.read-more-link::after { content: '→'; transition: transform .2s; }
.read-more-link:hover::after { transform: translateX(3px); }

/* =====================================================================
   FEATURED POST (Homepage top)
   ===================================================================== */
.featured-post {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 300px;
}
.featured-post-image {
  overflow: hidden;
  background: var(--light-gray);
  position: relative;
}
.featured-post-image img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.featured-post-badge {
  position: absolute;
  top: 1rem; left: 1rem;
  background: var(--gold);
  color: var(--navy);
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: .25rem .75rem;
  border-radius: 3px;
}
.featured-post-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured-post-category {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .2rem .65rem;
  border-radius: 3px;
  margin-bottom: .75rem;
}
.featured-post h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.75rem);
  margin-bottom: .75rem;
}
.featured-post h2 a { color: var(--navy); }
.featured-post h2 a:hover { color: var(--red); }
.featured-post-meta {
  font-size: .82rem;
  color: var(--text-muted);
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* =====================================================================
   SINGLE POST
   ===================================================================== */
.entry-header { margin-bottom: 1.75rem; }
.entry-categories {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}
.cat-badge {
  background: var(--red);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .25rem .75rem;
  border-radius: 3px;
  text-decoration: none;
  transition: background .2s;
}
.cat-badge:hover { background: var(--red-dark); color: var(--white); }
.entry-title {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  line-height: 1.25;
  color: var(--navy);
  margin-bottom: .75rem;
}
.entry-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: .85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--border);
}
.entry-meta svg { width: 14px; height: 14px; fill: currentColor; }
.entry-meta span { display: flex; align-items: center; gap: .3rem; }
.entry-meta a { color: var(--navy); font-weight: 500; }
.entry-meta a:hover { color: var(--red); }

/* Featured Image */
.entry-featured-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow);
}
.entry-featured-image img { width: 100%; }

/* Quick Answer Box */
.quick-answer-box {
  background: linear-gradient(135deg, #eef4ff 0%, #f0f7ff 100%);
  border: 2px solid var(--navy);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  position: relative;
}
.quick-answer-box::before {
  content: '⚡ Quick Answer';
  display: block;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--navy);
  margin-bottom: .5rem;
}
.quick-answer-box p { color: var(--text); font-weight: 500; margin: 0; }

/* Table of Contents */
.toc-box {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.toc-box h3 {
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--navy);
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.toc-box ol {
  padding-left: 1.25rem;
  margin: 0;
}
.toc-box li {
  margin-bottom: .4rem;
  font-size: .9rem;
}
.toc-box a {
  color: var(--navy);
  font-weight: 500;
  transition: color .15s;
}
.toc-box a:hover { color: var(--red); }

/* Article Content */
.entry-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
}
.entry-content h2 {
  font-size: 1.5rem;
  margin-top: 2.25rem;
  margin-bottom: .75rem;
  padding-top: 1rem;
  border-top: 2px solid var(--border);
  color: var(--navy);
}
.entry-content h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.entry-content h3 {
  font-size: 1.2rem;
  margin-top: 1.75rem;
  margin-bottom: .6rem;
  color: var(--red);
}
.entry-content h4 { font-size: 1.05rem; color: var(--navy); margin-top: 1.5rem; }

.entry-content ul, .entry-content ol {
  margin-bottom: 1.25rem;
}
.entry-content li { margin-bottom: .4rem; }
.entry-content strong { color: var(--navy); }

/* Callout boxes in content */
.entry-content .wp-block-callout,
.callout-box {
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
}
.callout-warning {
  background: #fff8f0;
  border-left: 4px solid var(--warning);
}
.callout-info {
  background: #eef7ff;
  border-left: 4px solid var(--navy-light);
}
.callout-success {
  background: #f0faf5;
  border-left: 4px solid var(--success);
}
.callout-danger {
  background: #fff5f5;
  border-left: 4px solid var(--red);
}

/* In-article ad after paragraph 2 */
.ad-in-content {
  margin: 1.75rem 0;
  text-align: center;
}
.ad-in-content::before {
  content: 'Advertisement';
  display: block;
  font-size: .68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .35rem;
}

/* Entry Footer */
.entry-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .85rem;
  color: var(--text-muted);
}
.entry-tags { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.tag-link {
  background: var(--light-gray);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: .2rem .75rem;
  font-size: .78rem;
  color: var(--text);
  transition: background .15s, color .15s;
}
.tag-link:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* Post Navigation */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}
.nav-previous, .nav-next {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  transition: background .2s, border-color .2s;
}
.nav-previous:hover, .nav-next:hover {
  background: var(--light-gray);
  border-color: var(--navy);
}
.nav-next { text-align: right; }
.nav-label {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  margin-bottom: .3rem;
}
.nav-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--navy);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

/* Author Box */
.author-box {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 2.5rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.author-avatar img {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--navy);
}
.author-avatar-placeholder {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}
.author-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .25rem;
}
.author-role {
  font-size: .78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .5rem;
}
.author-bio { font-size: .9rem; color: var(--text-light); margin: 0; }

/* Disclaimer Box */
.legal-disclaimer-box {
  background: #fafafa;
  border: 1px solid var(--mid-gray);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-top: 2rem;
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.legal-disclaimer-box strong { color: var(--text); }

/* FAQ Section */
.faq-section { margin: 2rem 0; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: .75rem;
  overflow: hidden;
}
.faq-question {
  padding: 1rem 1.25rem;
  background: var(--off-white);
  font-weight: 700;
  font-size: .95rem;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  transition: background .15s;
}
.faq-question:hover { background: var(--light-gray); }
.faq-question .faq-icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
  transition: transform .25s;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  padding: 0 1.25rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s;
  font-size: .95rem;
  color: var(--text);
  line-height: 1.75;
}
.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}

/* =====================================================================
   SIDEBAR
   ===================================================================== */
.widget-area { display: flex; flex-direction: column; gap: 1.5rem; }
.widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.widget-title {
  background: var(--navy);
  color: var(--white);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: .75rem 1.25rem;
  margin: 0;
}
.widget-content { padding: 1.1rem 1.25rem; }

/* Popular Posts Widget */
.popular-posts-list { list-style: none; padding: 0; margin: 0; }
.popular-post-item {
  display: flex;
  gap: .75rem;
  padding: .65rem 0;
  border-bottom: 1px solid var(--border);
}
.popular-post-item:last-child { border-bottom: none; padding-bottom: 0; }
.popular-post-item:first-child { padding-top: 0; }
.popular-post-num {
  width: 28px; height: 28px;
  background: var(--navy);
  color: var(--white);
  font-size: .75rem;
  font-weight: 800;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.popular-post-title {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}
.popular-post-title a { color: inherit; }
.popular-post-title a:hover { color: var(--red); }

/* Categories Widget */
.categories-list { list-style: none; padding: 0; margin: 0; }
.categories-list li {
  border-bottom: 1px solid var(--border);
}
.categories-list li:last-child { border-bottom: none; }
.categories-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .6rem 0;
  font-size: .88rem;
  color: var(--text);
  font-weight: 500;
  transition: color .15s;
}
.categories-list a:hover { color: var(--navy); }
.categories-list .cat-count {
  background: var(--light-gray);
  border-radius: 10px;
  padding: .1rem .5rem;
  font-size: .75rem;
  color: var(--text-muted);
}

/* Disclaimer Widget */
.disclaimer-widget {
  background: #fff8f0;
  border-color: var(--warning) !important;
}
.disclaimer-widget .widget-title { background: var(--warning); }
.disclaimer-widget .widget-content {
  font-size: .82rem;
  color: var(--text-light);
  line-height: 1.65;
}

/* Newsletter Widget */
.newsletter-widget { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%) !important; }
.newsletter-widget .widget-title { background: rgba(0,0,0,.25); }
.newsletter-widget .widget-content { padding: 1.25rem; }
.newsletter-widget p { color: rgba(255,255,255,.85); font-size: .88rem; margin-bottom: .85rem; }
.newsletter-form { display: flex; flex-direction: column; gap: .5rem; }
.newsletter-form input {
  padding: .65rem 1rem;
  border: 2px solid rgba(255,255,255,.3);
  border-radius: var(--radius);
  background: rgba(255,255,255,.12);
  color: var(--white);
  font-size: .9rem;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,.55); }
.newsletter-form button {
  background: var(--red);
  color: var(--white);
  border: none;
  padding: .7rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  transition: background .2s;
}
.newsletter-form button:hover { background: var(--red-dark); }

/* =====================================================================
   ARCHIVE / CATEGORY PAGE
   ===================================================================== */
.archive-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 2.5rem 0 2rem;
  margin-bottom: 0;
}
.archive-header .archive-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.archive-header .archive-title {
  color: var(--white);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: .5rem;
}
.archive-header .archive-description {
  color: rgba(255,255,255,.8);
  font-size: .95rem;
  max-width: 700px;
  line-height: 1.7;
}
.archive-meta-bar {
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
  padding: .65rem 0;
  font-size: .82rem;
  color: var(--text-muted);
}

/* =====================================================================
   PAGINATION
   ===================================================================== */
.pagination {
  display: flex;
  gap: .4rem;
  justify-content: center;
  align-items: center;
  padding: 2rem 0 1rem;
  flex-wrap: wrap;
}
.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-size: .9rem;
  font-weight: 600;
  transition: all .15s;
}
.page-numbers:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.page-numbers.current { background: var(--navy); color: var(--white); border-color: var(--navy); }
.page-numbers.dots { border: none; background: none; width: auto; }

/* =====================================================================
   SEARCH RESULTS
   ===================================================================== */
.search-header {
  padding: 1.5rem 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
}
.search-header h1 { font-size: 1.5rem; margin-bottom: .5rem; }
.search-header p { color: var(--text-muted); font-size: .9rem; margin: 0; }
.search-header .search-term { color: var(--red); font-weight: 700; }

/* =====================================================================
   404 PAGE
   ===================================================================== */
.error-404 {
  text-align: center;
  padding: 4rem 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}
.error-404 .error-code {
  font-size: 7rem;
  font-weight: 900;
  color: var(--border);
  line-height: 1;
  margin-bottom: .5rem;
}
.error-404 h1 { color: var(--navy); margin-bottom: 1rem; }
.error-404 p { color: var(--text-light); margin-bottom: 1.5rem; }
.error-back-btn {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  padding: .75rem 2rem;
  border-radius: var(--radius-lg);
  font-weight: 700;
  transition: background .2s;
}
.error-back-btn:hover { background: var(--red); color: var(--white); }

/* =====================================================================
   COMMENTS
   ===================================================================== */
#comments {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}
.comments-title {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
}
.comment-list { list-style: none; padding: 0; }
.comment-body {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.comment-meta { display: flex; gap: .75rem; align-items: center; margin-bottom: .75rem; }
.comment-author-name { font-weight: 700; font-size: .9rem; color: var(--navy); }
.comment-date { font-size: .78rem; color: var(--text-muted); }
.comment-content { font-size: .92rem; }
.comment-reply-link {
  font-size: .8rem;
  color: var(--navy);
  font-weight: 600;
  margin-top: .5rem;
  display: inline-block;
}
.comment-form label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: .35rem;
}
.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: .7rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem;
  transition: border-color .2s;
  font-family: var(--font-sans);
}
.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27,58,107,.1);
}
.comment-form textarea { min-height: 120px; resize: vertical; }
.submit-button {
  background: var(--navy);
  color: var(--white);
  border: none;
  padding: .75rem 2rem;
  border-radius: var(--radius-lg);
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.submit-button:hover { background: var(--red); }

/* =====================================================================
   FOOTER
   ===================================================================== */
#colophon {
  background: #0f2444;
  color: rgba(255,255,255,.75);
  padding-top: 3rem;
}
.footer-widgets {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand p {
  font-size: .88rem;
  color: rgba(255,255,255,.65);
  margin-top: .75rem;
  line-height: 1.7;
}
.footer-logo-text {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
}
.footer-logo-text span { color: #f9c84a; }
.footer-tagline {
  font-size: .75rem;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.footer-widget-title {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.9);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--red);
  display: inline-block;
}
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: .45rem; }
.footer-links a {
  font-size: .88rem;
  color: rgba(255,255,255,.6);
  transition: color .15s;
}
.footer-links a:hover { color: var(--white); }
.footer-disclaimer {
  background: rgba(0,0,0,.3);
  padding: 1.25rem 0;
  font-size: .78rem;
  color: rgba(255,255,255,.4);
  line-height: 1.6;
  text-align: center;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  font-size: .82rem;
  flex-wrap: wrap;
  gap: .75rem;
}
.footer-bottom-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.footer-bottom-links a { color: rgba(255,255,255,.5); }
.footer-bottom-links a:hover { color: var(--white); }

/* =====================================================================
   SCROLL TO TOP
   ===================================================================== */
#scroll-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px; height: 44px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .3s, transform .3s, background .2s;
  z-index: 500;
}
#scroll-top.visible { opacity: 1; transform: translateY(0); }
#scroll-top:hover { background: var(--red); }
#scroll-top svg { width: 18px; height: 18px; fill: currentColor; }

/* =====================================================================
   READING PROGRESS BAR
   ===================================================================== */
#reading-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--red) 0%, var(--gold) 100%);
  z-index: 9999;
  transition: width .1s linear;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1024px) {
  .content-area-inner {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 2rem;
  }
  .footer-widgets {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root { --container: 100%; }

  /* Header */
  .top-bar-disclaimer { display: none; }
  .site-header-inner { flex-wrap: wrap; }
  .menu-toggle { display: flex; }
  #site-navigation { width: 100%; order: 3; }
  .nav-menu {
    display: none;
    flex-direction: column;
    background: var(--navy-dark);
    border-radius: var(--radius);
    padding: .5rem 0;
    margin-top: .5rem;
  }
  .nav-menu.open { display: flex; }
  .nav-menu > li > a { border-radius: 0; padding: .7rem 1.25rem; }
  .nav-menu .sub-menu {
    position: static;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    border-top: none;
    background: rgba(0,0,0,.2);
    padding: 0;
    display: none;
    min-width: auto;
  }
  .nav-menu li.open > .sub-menu { display: block; }
  .nav-menu .sub-menu a { color: rgba(255,255,255,.75); padding-left: 2rem; }

  /* Featured Post */
  .featured-post { grid-template-columns: 1fr; }
  .featured-post-image { min-height: 220px; }

  /* Content */
  .content-area-inner { grid-template-columns: 1fr; }
  .widget-area { order: -1; }

  /* Post nav */
  .post-navigation { grid-template-columns: 1fr; }

  /* Footer */
  .footer-widgets { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .posts-grid { grid-template-columns: 1fr; }
  .home-hero { padding: 2rem 0 1.5rem; }
  .hero-badges { display: none; }
  .category-pills { gap: .4rem; }
  .entry-title { font-size: 1.4rem; }
  .entry-content { font-size: 1rem; }
  .author-box { flex-direction: column; }
}

/* =====================================================================
   PRINT
   ===================================================================== */
@media print {
  #masthead, .top-bar, .widget-area, .post-navigation,
  #scroll-top, #reading-progress, .ad-zone, .ad-in-content { display: none !important; }
  .content-area-inner { grid-template-columns: 1fr; }
  body { font-size: 12pt; }
  a { text-decoration: underline; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 10pt; color: #666; }
}
