/*
Theme Name: ClearSetup AI Blog
Theme URI: https://clearsetupai.com/blog
Author: ClearSetup AI
Author URI: https://clearsetupai.com
Description: A premium, trustworthy blog theme designed for ClearSetup AI — expert guides on AI assistants, digital security, and technology for adults 55+. Features a clean Backlinko-inspired layout with navy and gold branding.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: clearsetup-ai-blog
Tags: blog, one-column, three-columns, custom-menu, featured-images, theme-options, custom-logo
*/

/* ==========================================================================
   ClearSetup AI Blog Theme
   Premium, trustworthy, clean — Backlinko-inspired layout
   ========================================================================== */

:root {
  --navy: #0A1628;
  --navy-light: #121f36;
  --navy-dark: #060e1a;
  --gold: #C9973F;
  --gold-light: #d4aa5c;
  --gold-dark: #b0842f;
  --white: #FFFFFF;
  --off-white: #F8F9FB;
  --gray-50: #f5f6f8;
  --gray-100: #ebedf2;
  --gray-200: #d8dce5;
  --gray-300: #b8bfcc;
  --gray-400: #8a94a6;
  --gray-500: #64708a;
  --gray-600: #4a5568;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
  --shadow-sm: 0 1px 3px rgba(10,22,40,0.06);
  --shadow-md: 0 4px 12px rgba(10,22,40,0.08);
  --shadow-lg: 0 8px 30px rgba(10,22,40,0.12);
  --shadow-xl: 0 20px 60px rgba(10,22,40,0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --content-max: 1280px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-body); font-size: 16px; line-height: 1.6; color: var(--gray-700); background: var(--off-white); }
a { color: var(--gold-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; font-family: var(--font-body); }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); color: var(--navy); line-height: 1.3; font-weight: 700; }
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 24px; }

/* Shield Icon */
.shield-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; background: var(--gold); border-radius: 4px;
  margin-right: 8px; flex-shrink: 0;
}
.shield-icon::before {
  content: ''; width: 18px; height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-1 15l-4-4 1.41-1.41L11 13.17l5.59-5.59L18 9l-7 7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: contain;
}

/* ===== NAVIGATION ===== */
.top-nav { position: sticky; top: 0; z-index: 1000; background: var(--navy); border-bottom: 1px solid rgba(201,151,63,0.15); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; max-width: var(--content-max); margin: 0 auto; padding: 0 24px; }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo .shield-icon { width: 32px; height: 32px; border-radius: 6px; }
.nav-logo .shield-icon::before { width: 20px; height: 22px; }
.nav-logo-text { font-family: var(--font-heading); font-size: 20px; font-weight: 700; color: var(--white); letter-spacing: -0.3px; }
.nav-logo-text span { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { color: var(--gray-300); font-size: 14px; font-weight: 500; letter-spacing: 0.01em; transition: color var(--transition); }
.nav-links a:hover { color: var(--white); }
.nav-links a.active { color: var(--gold); }
.nav-links .current-menu-item a,
.nav-links .current_page_item a { color: var(--gold); }
.nav-cta { background: var(--gold); color: var(--navy) !important; padding: 10px 20px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; transition: all var(--transition); }
.nav-cta:hover { background: var(--gold-light); color: var(--navy) !important; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(201,151,63,0.3); }
.nav-toggle { display: none; background: none; border: none; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); margin: 5px 0; transition: var(--transition); border-radius: 2px; }

/* WordPress Nav Menu Integration */
.nav-links li { list-style: none; }
.nav-links .menu-item a { color: var(--gray-300); font-size: 14px; font-weight: 500; letter-spacing: 0.01em; transition: color var(--transition); }
.nav-links .menu-item a:hover { color: var(--white); }
.nav-links .current-menu-item > a { color: var(--gold); }

/* ===== CTA BANNER ===== */
.cta-banner { background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%); border-bottom: 2px solid var(--gold); padding: 14px 0; }
.cta-banner-inner { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; text-align: center; }
.cta-banner p { color: var(--gray-200); font-size: 15px; }
.cta-banner p strong { color: var(--white); font-weight: 600; }

/* Buttons */
.btn-gold { display: inline-flex; align-items: center; gap: 8px; background: var(--gold); color: var(--navy); padding: 10px 24px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; transition: all var(--transition); border: none; }
.btn-gold:hover { background: var(--gold-light); color: var(--navy); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(201,151,63,0.35); }
.btn-gold-outline { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--gold); padding: 10px 24px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; border: 2px solid var(--gold); transition: all var(--transition); }
.btn-gold-outline:hover { background: var(--gold); color: var(--navy); }

/* ===== BLOG INDEX ===== */
.blog-hero { background: var(--navy); padding: 72px 0 64px; text-align: center; position: relative; overflow: hidden; }
.blog-hero::before { content: ''; position: absolute; top: -50%; left: -20%; width: 140%; height: 200%; background: radial-gradient(ellipse at 50% 50%, rgba(201,151,63,0.06) 0%, transparent 70%); pointer-events: none; }
.blog-hero h1 { font-size: 48px; color: var(--white); margin-bottom: 16px; position: relative; }
.blog-hero h1 span { color: var(--gold); }
.blog-hero p { font-size: 18px; color: var(--gray-300); max-width: 620px; margin: 0 auto; line-height: 1.7; position: relative; }

/* Featured Post */
.featured-section { padding: 48px 0 0; }
.featured-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold); margin-bottom: 20px; }
.featured-card { display: block; background: var(--white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); transition: transform var(--transition), box-shadow var(--transition); }
.featured-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }
.featured-image { display: block; width: 100%; aspect-ratio: 21/9; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); position: relative; overflow: hidden; text-decoration: none; }
.featured-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.featured-image .placeholder-icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 64px; opacity: 0.3; }
.featured-content { padding: 40px 48px 44px; display: flex; flex-direction: column; }

.category-pill { display: inline-block; background: rgba(201,151,63,0.12); color: var(--gold-dark); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; padding: 4px 12px; border-radius: 100px; margin-bottom: 16px; width: fit-content; }
.category-pill a { color: var(--gold-dark); text-decoration: none; }
.category-pill a:hover { color: var(--gold); }
.featured-content h2 { font-size: 28px; margin-bottom: 12px; line-height: 1.3; }
.featured-content h2 a { color: var(--navy); transition: color var(--transition); }
.featured-content h2 a:hover { color: var(--gold-dark); }
.featured-content .excerpt { font-size: 16px; color: var(--gray-500); line-height: 1.7; margin-bottom: 20px; }

.post-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--gray-400); }
.post-meta .author-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--navy); display: flex; align-items: center; justify-content: center; color: var(--gold); font-weight: 700; font-size: 13px; flex-shrink: 0; overflow: hidden; }
.post-meta .author-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.post-meta .meta-text strong { color: var(--gray-700); font-weight: 600; }
.post-meta .meta-divider { color: var(--gray-200); }

/* Post Grid */
.posts-section { padding: 56px 0 80px; }
.posts-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.posts-section-header h2 { font-size: 28px; }
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-pill { background: var(--white); border: 1px solid var(--gray-200); padding: 6px 16px; border-radius: 100px; font-size: 13px; font-weight: 500; color: var(--gray-500); cursor: pointer; transition: all var(--transition); text-decoration: none; }
.filter-pill:hover, .filter-pill.active { background: var(--navy); color: var(--white); border-color: var(--navy); }
a.filter-pill { display: inline-block; }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

/* Post Card */
.post-card { background: var(--white); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); transition: all var(--transition); display: flex; flex-direction: column; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.post-card-image { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; }
.post-card-image .placeholder-icon { font-size: 40px; opacity: 0.25; }
.post-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.post-card-body .category-pill { margin-bottom: 12px; }
.post-card-body h3 { font-size: 20px; line-height: 1.35; margin-bottom: 10px; }
.post-card-body h3 a { color: var(--navy); transition: color var(--transition); }
.post-card-body h3 a:hover { color: var(--gold-dark); }
.post-card-body .excerpt { font-size: 14px; color: var(--gray-500); line-height: 1.65; margin-bottom: 16px; flex: 1; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 48px; }
.pagination a, .pagination span { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; color: var(--gray-500); border: 1px solid var(--gray-200); transition: all var(--transition); background: var(--white); }
.pagination a:hover { border-color: var(--gold); color: var(--gold); }
.pagination .active, .pagination .current { background: var(--navy); color: var(--white); border-color: var(--navy); }
.pagination .prev, .pagination .next { width: auto; padding: 0 16px; }
.pagination .page-numbers { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; color: var(--gray-500); border: 1px solid var(--gray-200); transition: all var(--transition); background: var(--white); }
.pagination .page-numbers:hover { border-color: var(--gold); color: var(--gold); }
.pagination .page-numbers.current { background: var(--navy); color: var(--white); border-color: var(--navy); }
.pagination .prev.page-numbers,
.pagination .next.page-numbers { width: auto; padding: 0 16px; }

/* WP Pagination */
.nav-links { display: flex; align-items: center; justify-content: center; gap: 8px; }

/* ===== SINGLE POST ===== */
.reading-progress { position: fixed; top: 68px; left: 0; height: 3px; background: var(--gold); z-index: 999; width: 0; transition: width 0.1s linear; }
.post-header { background: var(--white); padding: 48px 0 0; }
.post-header .breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gray-400); margin-bottom: 24px; }
.post-header .breadcrumb a { color: var(--gray-400); }
.post-header .breadcrumb a:hover { color: var(--gold); }
.post-header .breadcrumb .sep { color: var(--gray-300); }
.post-header .category-pills { display: flex; gap: 8px; margin-bottom: 20px; }
.post-title { font-size: 42px; line-height: 1.2; margin-bottom: 24px; max-width: 780px; }

/* Author Byline */
.author-byline { display: flex; align-items: center; gap: 16px; padding-bottom: 32px; }
.author-byline .avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--navy); display: flex; align-items: center; justify-content: center; color: var(--gold); font-family: var(--font-heading); font-weight: 700; font-size: 20px; flex-shrink: 0; overflow: hidden; }
.author-byline .avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.author-byline .info { display: flex; flex-direction: column; gap: 2px; }
.author-byline .name { font-weight: 600; color: var(--navy); font-size: 15px; }
.author-byline .role { color: var(--gray-400); font-size: 13px; }
.author-byline .date-row { display: flex; align-items: center; gap: 12px; color: var(--gray-400); font-size: 13px; }
.author-byline .date-row .dot { color: var(--gray-300); }

/* Hero Image */
.post-hero-image { margin: 0 auto; max-width: var(--content-max); padding: 0 24px; }
.post-hero-image .image-wrapper { aspect-ratio: 21/9; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); border-radius: var(--radius-lg); border: 2px solid rgba(201,151,63,0.2); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.post-hero-image .image-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.post-hero-image .placeholder-icon { font-size: 72px; opacity: 0.2; }

/* Three Column Layout */
.post-layout { display: grid; grid-template-columns: 210px 1fr 300px; gap: 40px; max-width: var(--content-max); margin: 0 auto; padding: 40px 24px 80px; align-items: start; }

/* Left Sidebar: ToC */
.toc-sidebar { position: sticky; top: 100px; }
.toc-heading { font-family: var(--font-body); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gray-400); margin-bottom: 16px; }
.toc-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.toc-list a { display: block; padding: 8px 0 8px 16px; font-size: 13px; color: var(--gray-500); border-left: 2px solid var(--gray-200); transition: all var(--transition); line-height: 1.4; }
.toc-list a:hover { color: var(--navy); border-left-color: var(--gray-400); }
.toc-list a.active { color: var(--navy); font-weight: 600; border-left-color: var(--gold); border-left-width: 3px; background: rgba(201,151,63,0.04); }

/* Mobile ToC */
.toc-mobile { display: none; margin-bottom: 32px; }
.toc-mobile-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md); font-size: 14px; font-weight: 600; color: var(--navy); cursor: pointer; }
.toc-mobile-toggle .chevron { transition: transform var(--transition); font-size: 12px; }
.toc-mobile-toggle.open .chevron { transform: rotate(180deg); }
.toc-mobile-list { list-style: none; background: var(--white); border: 1px solid var(--gray-200); border-top: 0; border-radius: 0 0 var(--radius-md) var(--radius-md); max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.toc-mobile-list.open { max-height: 500px; }
.toc-mobile-list a { display: block; padding: 10px 18px; font-size: 14px; color: var(--gray-600); border-bottom: 1px solid var(--gray-100); }
.toc-mobile-list a:hover { background: var(--gray-50); color: var(--navy); }

/* Center Content */
.post-content { background: var(--white); border-radius: var(--radius-lg); padding: 48px 44px; box-shadow: var(--shadow-sm); min-width: 0; }
.post-content > *:first-child { margin-top: 0; }
.post-content p { font-size: 18px; line-height: 1.8; color: var(--gray-700); margin-bottom: 24px; }
.post-content h2 { font-size: 30px; margin-top: 48px; margin-bottom: 20px; padding-top: 16px; }
.post-content h3 { font-size: 22px; margin-top: 36px; margin-bottom: 16px; }
.post-content h4 { font-size: 18px; margin-top: 28px; margin-bottom: 12px; }
.post-content strong { color: var(--navy); font-weight: 600; }
.post-content a { color: var(--gold-dark); text-decoration: underline; text-decoration-color: rgba(201,151,63,0.3); text-underline-offset: 3px; }
.post-content a:hover { text-decoration-color: var(--gold); }

/* Blockquote */
.post-content blockquote { border-left: 4px solid var(--gold); background: rgba(201,151,63,0.04); padding: 20px 24px; margin: 32px 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.post-content blockquote p { font-size: 17px; font-style: italic; color: var(--gray-600); margin-bottom: 0; }
.post-content blockquote p:not(:last-child) { margin-bottom: 12px; }

/* Lists */
.post-content ul, .post-content ol { margin: 0 0 24px 0; padding-left: 24px; }
.post-content li { font-size: 18px; line-height: 1.8; color: var(--gray-700); margin-bottom: 8px; }
.post-content ul li { list-style-type: none; position: relative; padding-left: 8px; }
.post-content ul li::before { content: ''; position: absolute; left: -18px; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* Images & Figures */
.post-content figure { margin: 36px 0; }
.post-content figure img { border-radius: var(--radius-md); width: 100%; }
.post-content figcaption { font-size: 13px; color: var(--gray-400); text-align: center; margin-top: 10px; font-style: italic; }

/* WP Image Classes */
.post-content .aligncenter { display: block; margin: 0 auto; }
.post-content .alignleft { float: left; margin: 0 24px 16px 0; }
.post-content .alignright { float: right; margin: 0 0 16px 24px; }
.post-content .wp-caption { max-width: 100%; }
.post-content .wp-caption-text { font-size: 13px; color: var(--gray-400); text-align: center; margin-top: 10px; font-style: italic; }

/* WP Block Images */
.post-content .wp-block-image { margin: 36px 0; }
.post-content .wp-block-image img { border-radius: var(--radius-md); width: 100%; height: auto; }
.post-content .wp-block-image figcaption { font-size: 13px; color: var(--gray-400); text-align: center; margin-top: 10px; font-style: italic; }
.post-content .wp-block-image.size-large img,
.post-content .wp-block-image.size-full img { width: 100%; max-width: 100%; }

/* Tables — Desktop */
.post-content table { width: 100%; border-collapse: collapse; margin: 32px 0; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--gray-100); font-size: 16px; line-height: 1.6; }
.post-content thead { background: var(--navy); }
.post-content thead th { color: var(--white); font-weight: 600; font-family: var(--font-heading); padding: 14px 18px; text-align: left; font-size: 15px; letter-spacing: 0.01em; white-space: nowrap; }
.post-content tbody tr { border-bottom: 1px solid var(--gray-100); transition: background var(--transition); }
.post-content tbody tr:nth-child(even) { background: var(--gray-50); }
.post-content tbody tr:hover { background: rgba(201,151,63,0.04); }
.post-content td { padding: 13px 18px; color: var(--gray-700); vertical-align: top; }
.post-content td:first-child { font-weight: 600; color: var(--navy); white-space: nowrap; }
.post-content td strong { color: var(--navy); }

/* Table responsive wrapper (added via JS) */
.table-scroll-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 32px 0; border-radius: var(--radius-md); border: 1px solid var(--gray-100); }
.table-scroll-wrapper table { margin: 0; border: none; border-radius: 0; min-width: 600px; }
.table-scroll-hint { display: none; font-size: 12px; color: var(--gray-400); text-align: center; margin-top: 6px; font-style: italic; }

/* Code */
.post-content code { font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 14px; background: var(--gray-50); padding: 3px 7px; border-radius: 4px; color: var(--navy); }
.post-content pre { background: var(--navy); color: var(--gray-200); padding: 24px; border-radius: var(--radius-md); overflow-x: auto; margin: 28px 0; }
.post-content pre code { background: none; color: inherit; padding: 0; }

/* Highlight Box */
.highlight-box { background: linear-gradient(135deg, rgba(201,151,63,0.08) 0%, rgba(201,151,63,0.03) 100%); border: 1px solid rgba(201,151,63,0.2); border-radius: var(--radius-md); padding: 24px 28px; margin: 32px 0; }
.highlight-box h4 { color: var(--gold-dark); margin-top: 0; margin-bottom: 8px; font-family: var(--font-body); font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.highlight-box p { font-size: 16px; margin-bottom: 0; }

/* Share Buttons */
.share-bar { display: flex; align-items: center; gap: 12px; padding-top: 32px; margin-top: 40px; border-top: 1px solid var(--gray-100); }
.share-bar .share-label { font-size: 13px; font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.06em; }
.share-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--gray-50); color: var(--gray-500); font-size: 16px; transition: all var(--transition); text-decoration: none; }
.share-btn:hover { background: var(--gold); color: var(--white); transform: translateY(-2px); }

/* Author Bio */
.author-bio { display: flex; gap: 24px; background: var(--gray-50); border-radius: var(--radius-lg); padding: 32px; margin-top: 48px; border: 1px solid var(--gray-100); }
.author-bio .avatar-large { width: 80px; height: 80px; border-radius: 50%; background: var(--navy); display: flex; align-items: center; justify-content: center; color: var(--gold); font-family: var(--font-heading); font-weight: 700; font-size: 28px; flex-shrink: 0; overflow: hidden; }
.author-bio .avatar-large img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.author-bio .bio-content h4 { font-size: 18px; margin-bottom: 4px; font-family: var(--font-body); }
.author-bio .bio-role { font-size: 13px; color: var(--gold-dark); font-weight: 500; margin-bottom: 12px; }
.author-bio .bio-text { font-size: 15px; color: var(--gray-600); line-height: 1.7; margin-bottom: 16px; }
.author-bio .social-links { display: flex; gap: 10px; }
.author-bio .social-links a { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--white); color: var(--gray-500); font-size: 14px; border: 1px solid var(--gray-200); transition: all var(--transition); }
.author-bio .social-links a:hover { background: var(--navy); color: var(--gold); border-color: var(--navy); }

/* Related Posts */
.related-posts { margin-top: 56px; }
.related-posts h3 { font-size: 24px; margin-bottom: 24px; font-family: var(--font-heading); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* Right Sidebar */
.right-sidebar { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 24px; }

/* CTA Card */
.sidebar-cta { background: var(--navy); border-radius: var(--radius-lg); padding: 32px 24px; text-align: center; box-shadow: var(--shadow-md); }
.sidebar-cta .cta-shield { width: 48px; height: 48px; background: var(--gold); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.sidebar-cta .cta-shield::before { content: ''; width: 28px; height: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-1 15l-4-4 1.41-1.41L11 13.17l5.59-5.59L18 9l-7 7z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: contain; }
.sidebar-cta h4 { color: var(--white); font-size: 20px; margin-bottom: 10px; font-family: var(--font-heading); }
.sidebar-cta p { color: var(--gray-300); font-size: 14px; line-height: 1.6; margin-bottom: 20px; }
.sidebar-cta .btn-gold { width: 100%; justify-content: center; padding: 14px 24px; font-size: 15px; }

/* Lead Capture Card */
.sidebar-lead { background: var(--white); border: 2px solid rgba(201,151,63,0.25); border-radius: var(--radius-lg); padding: 28px 24px; text-align: center; }
.sidebar-lead .ebook-cover { width: 140px; height: 181px; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); background-size: cover; background-position: center; border-radius: var(--radius-sm); margin: 0 auto 18px; box-shadow: 0 12px 30px rgba(10,22,40,0.25), 0 4px 10px rgba(10,22,40,0.15); border: 1px solid rgba(201,151,63,0.4); }
.sidebar-lead .ebook-desc { font-size: 13px; color: var(--gray-500); line-height: 1.55; margin: -8px 0 16px; }
.sidebar-lead .lead-form-status { font-size: 12px; line-height: 1.5; margin-top: 6px; min-height: 1em; }
.sidebar-lead h4 { font-size: 17px; margin-bottom: 16px; line-height: 1.4; font-family: var(--font-heading); }
.sidebar-lead .lead-form { display: flex; flex-direction: column; gap: 10px; }
.sidebar-lead input[type="email"] { width: 100%; padding: 12px 14px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); font-size: 14px; font-family: var(--font-body); color: var(--gray-700); outline: none; transition: border-color var(--transition); }
.sidebar-lead input[type="email"]:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,151,63,0.1); }
.sidebar-lead .btn-gold { width: 100%; justify-content: center; }
.sidebar-lead .privacy-text { font-size: 11px; color: var(--gray-400); margin-top: 8px; line-height: 1.5; }

/* ===== COMMENTS ===== */
.comments-area { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--gray-100); }
.comments-area .comments-title { font-size: 24px; margin-bottom: 32px; }
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list .comment { padding: 24px 0; border-bottom: 1px solid var(--gray-100); }
.comment-list .comment:last-child { border-bottom: none; }
.comment-list .comment .comment-body { display: flex; gap: 16px; }
.comment-list .comment .comment-author { flex-shrink: 0; }
.comment-list .comment .comment-author img { border-radius: 50%; }
.comment-list .comment .comment-author .fn { font-weight: 600; color: var(--navy); font-size: 15px; font-family: var(--font-body); }
.comment-list .comment .comment-metadata { font-size: 13px; color: var(--gray-400); margin-bottom: 8px; }
.comment-list .comment .comment-metadata a { color: var(--gray-400); }
.comment-list .comment .comment-content p { font-size: 15px; line-height: 1.7; color: var(--gray-600); }
.comment-list .comment .reply a { font-size: 13px; font-weight: 600; color: var(--gold-dark); text-transform: uppercase; letter-spacing: 0.04em; }
.comment-list .children { margin-left: 48px; padding-left: 24px; border-left: 2px solid var(--gray-100); }
.comment-respond { margin-top: 40px; }
.comment-respond .comment-reply-title { font-size: 22px; margin-bottom: 20px; }
.comment-form { display: flex; flex-direction: column; gap: 16px; }
.comment-form label { font-size: 14px; font-weight: 600; color: var(--navy); display: block; margin-bottom: 4px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea { width: 100%; padding: 12px 16px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); font-size: 15px; font-family: var(--font-body); color: var(--gray-700); transition: border-color var(--transition); outline: none; }
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,151,63,0.1); }
.comment-form textarea { min-height: 150px; resize: vertical; }
.comment-form .form-submit input[type="submit"] { background: var(--gold); color: var(--navy); padding: 14px 32px; border-radius: var(--radius-sm); font-weight: 600; font-size: 15px; border: none; cursor: pointer; transition: all var(--transition); }
.comment-form .form-submit input[type="submit"]:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(201,151,63,0.35); }

/* ===== 404 PAGE ===== */
.error-404-section { padding: 100px 0; text-align: center; }
.error-404-section .error-icon { font-size: 80px; margin-bottom: 24px; opacity: 0.3; }
.error-404-section h1 { font-size: 48px; margin-bottom: 16px; }
.error-404-section p { font-size: 18px; color: var(--gray-500); max-width: 520px; margin: 0 auto 32px; line-height: 1.7; }
.error-404-section .search-form { max-width: 480px; margin: 0 auto 24px; display: flex; gap: 12px; }
.error-404-section .search-form input[type="search"] { flex: 1; padding: 14px 18px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); font-size: 15px; font-family: var(--font-body); outline: none; }
.error-404-section .search-form input[type="search"]:focus { border-color: var(--gold); }
.error-404-section .search-form input[type="submit"] { background: var(--gold); color: var(--navy); padding: 14px 28px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; border: none; cursor: pointer; transition: all var(--transition); }
.error-404-section .search-form input[type="submit"]:hover { background: var(--gold-light); }

/* ===== SEARCH RESULTS ===== */
.search-header { background: var(--navy); padding: 48px 0; text-align: center; }
.search-header h1 { color: var(--white); font-size: 32px; margin-bottom: 8px; }
.search-header p { color: var(--gray-300); font-size: 16px; }
.search-header p span { color: var(--gold); font-weight: 600; }

/* ===== ARCHIVE HEADER ===== */
.archive-header { background: var(--navy); padding: 48px 0; text-align: center; }
.archive-header h1 { color: var(--white); font-size: 36px; margin-bottom: 8px; }
.archive-header .archive-description { color: var(--gray-300); font-size: 16px; max-width: 620px; margin: 0 auto; line-height: 1.7; }

/* ===== PAGE TEMPLATE ===== */
.page-header { background: var(--white); padding: 48px 0 32px; }
.page-header h1 { font-size: 42px; text-align: center; }
.page-content { max-width: 800px; margin: 0 auto; padding: 40px 24px 80px; }
.page-content .entry-content { background: var(--white); border-radius: var(--radius-lg); padding: 48px 44px; box-shadow: var(--shadow-sm); }

/* ===== FOOTER ===== */
.site-footer { background: var(--navy); padding: 64px 0 0; color: var(--gray-300); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand .footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; text-decoration: none; }
.footer-brand .footer-logo .shield-icon { width: 28px; height: 28px; }
.footer-brand .footer-logo-text { font-family: var(--font-heading); font-size: 18px; font-weight: 700; color: var(--white); }
.footer-brand .footer-logo-text span { color: var(--gold); }
.footer-brand p { font-size: 14px; line-height: 1.7; color: var(--gray-400); max-width: 300px; }
.footer-col h5 { font-family: var(--font-body); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--white); margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { color: var(--gray-400); font-size: 14px; transition: color var(--transition); }
.footer-col ul a:hover { color: var(--gold); }
.footer-col .menu { list-style: none; padding: 0; margin: 0; }
.footer-col .menu li { margin-bottom: 10px; }
.footer-col .menu a { color: var(--gray-400); font-size: 14px; transition: color var(--transition); }
.footer-col .menu a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 24px 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-size: 13px; color: var(--gray-500); }
.footer-bottom-links { display: flex; gap: 24px; }
.footer-bottom-links a { font-size: 13px; color: var(--gray-500); transition: color var(--transition); }
.footer-bottom-links a:hover { color: var(--gold); }

/* ===== NEWSLETTER STRIP ===== */
.newsletter-strip { background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%); border-top: 2px solid var(--gold); padding: 48px 0; text-align: center; }
.newsletter-strip h3 { color: var(--white); font-size: 28px; margin-bottom: 10px; }
.newsletter-strip p { color: var(--gray-300); font-size: 16px; margin-bottom: 24px; }
.newsletter-form { display: flex; gap: 12px; max-width: 480px; margin: 0 auto; }
.newsletter-form input[type="email"] { flex: 1; padding: 14px 18px; border: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius-sm); background: rgba(255,255,255,0.06); color: var(--white); font-size: 15px; font-family: var(--font-body); outline: none; transition: border-color var(--transition); }
.newsletter-form input[type="email"]::placeholder { color: var(--gray-400); }
.newsletter-form input[type="email"]:focus { border-color: var(--gold); }
.newsletter-form .btn-gold { padding: 14px 28px; white-space: nowrap; }

/* ===== SCREEN READER TEXT (WP Accessibility) ===== */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  background-color: var(--white);
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  clip-path: none;
  color: var(--navy);
  display: block;
  font-size: 14px;
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .post-layout { grid-template-columns: 1fr 300px; gap: 28px; }
  .toc-sidebar { display: none; }
  .toc-mobile { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .featured-image { aspect-ratio: 16/9; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--navy); flex-direction: column; padding: 16px 24px; gap: 16px; border-bottom: 1px solid rgba(201,151,63,0.15); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .blog-hero h1 { font-size: 32px; }
  .blog-hero p { font-size: 16px; }
  .posts-grid { grid-template-columns: 1fr; }
  .post-layout { grid-template-columns: 1fr; padding: 24px 16px 60px; gap: 24px; }
  .right-sidebar { position: static; }
  .post-title { font-size: 30px; }
  .post-content { padding: 28px 20px; }
  .post-content p { font-size: 16px; }
  .post-content h2 { font-size: 24px; }
  .post-content h3 { font-size: 19px; }
  .author-byline { flex-wrap: wrap; }
  .author-bio { flex-direction: column; align-items: center; text-align: center; }
  .related-grid { grid-template-columns: 1fr; }
  .featured-content { padding: 24px; }
  .featured-content h2 { font-size: 22px; }
  .posts-section-header { flex-direction: column; gap: 16px; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .newsletter-form { flex-direction: column; }
  .pagination { flex-wrap: wrap; }
  .share-bar { flex-wrap: wrap; }
  .comment-list .children { margin-left: 24px; padding-left: 16px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .nav-inner { padding: 0 16px; }
  .blog-hero { padding: 48px 0 40px; }
  .blog-hero h1 { font-size: 28px; }
  .cta-banner-inner { flex-direction: column; gap: 10px; }
  .post-hero-image { padding: 0 16px; }
  .post-hero-image .image-wrapper { aspect-ratio: 16/9; }
  .error-404-section h1 { font-size: 32px; }
  .error-404-section .search-form { flex-direction: column; }
}


/* ===== Mobile Top Spacing Fix v3 ===== */
@media (max-width: 1024px) {
  .post-layout { padding-top: 0 !important; gap: 0 !important; }
  .toc-mobile { margin-bottom: 0 !important; margin-top: 8px !important; }
}

@media (max-width: 768px) {
  .post-header { padding: 12px 0 0 !important; }
  .post-hero-image { margin: 0 auto !important; padding: 0 16px !important; }
  .post-hero-image .image-wrapper { border-radius: 8px; }
  .toc-mobile { margin: 4px 0 0 0 !important; }
  .post-layout { padding: 0 16px 60px !important; gap: 0 !important; }
  .post-content { padding: 16px 16px !important; margin-top: 0 !important; border-radius: 8px !important; }
  .post-content > *:first-child { margin-top: 0 !important; padding-top: 0 !important; }
  .post-content > figure:first-child { margin-top: 0 !important; }
  .post-content > h2:first-child { margin-top: 0 !important; padding-top: 0 !important; }
  .post-content p { font-size: 16px !important; }
  .post-content h2 { font-size: 24px !important; margin-top: 32px !important; }
  .right-sidebar { margin-top: 16px !important; }

  /* Tables — Mobile: horizontal scroll */
  .table-scroll-wrapper { margin: 24px -16px; border-radius: 0; border-left: none; border-right: none; }
  .table-scroll-wrapper table { min-width: 560px; }
  .table-scroll-hint { display: block; }
  .post-content table { font-size: 14px; }
  .post-content thead th { padding: 10px 14px; font-size: 13px; }
  .post-content td { padding: 10px 14px; }

  /* Images — Mobile: allow full bleed for clarity */
  .post-content figure { margin: 24px -16px; }
  .post-content figure img { border-radius: 0; width: calc(100% + 0px); }
  .post-content figcaption { padding: 0 16px; }
  .post-content .wp-block-image { margin: 24px -16px; }
  .post-content .wp-block-image img { border-radius: 0; }
  .post-content .wp-block-image figcaption { padding: 0 16px; }
}

@media (max-width: 480px) {
  .post-header { padding: 8px 0 0 !important; }
  .post-title { font-size: 24px !important; margin-bottom: 10px !important; }
  .author-byline { margin-bottom: 6px !important; }
  .toc-mobile { margin: 2px 0 0 0 !important; }
  .post-layout { padding: 0 12px 40px !important; }
  .post-content { padding: 12px 10px !important; }
}

/* ===== END-OF-POST CTA CARD ===== */
.cta-end-of-post { margin: 48px 0 40px; padding: 0; }
.cta-end-inner { background: linear-gradient(135deg, var(--navy) 0%, #0f2d4a 100%); border-radius: var(--radius-lg); padding: 40px 36px; text-align: center; border: 2px solid rgba(201,151,63,0.3); position: relative; overflow: hidden; }
.cta-end-inner::before { content: ''; position: absolute; top: -30%; right: -15%; width: 50%; height: 160%; background: radial-gradient(ellipse, rgba(201,151,63,0.08) 0%, transparent 70%); pointer-events: none; }
.cta-end-icon { font-size: 40px; margin-bottom: 12px; }
.cta-end-title { font-size: 24px; color: var(--white); margin-bottom: 12px; font-family: var(--font-heading); line-height: 1.3; }
.cta-end-desc { font-size: 15px; color: rgba(255,255,255,0.75); line-height: 1.65; max-width: 540px; margin: 0 auto 24px; }
.cta-end-form { max-width: 520px; margin: 0 auto; }
.cta-end-fields { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.cta-end-fields input[type="text"],
.cta-end-fields input[type="email"] { flex: 1; min-width: 160px; padding: 13px 16px; border: 1px solid rgba(255,255,255,0.2); border-radius: var(--radius-sm); font-size: 14px; font-family: var(--font-body); background: rgba(255,255,255,0.08); color: var(--white); outline: none; transition: border-color var(--transition); }
.cta-end-fields input::placeholder { color: rgba(255,255,255,0.45); }
.cta-end-fields input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,151,63,0.15); }
.cta-end-fields .btn-gold { padding: 13px 28px; white-space: nowrap; }
.cta-end-privacy { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 12px; line-height: 1.5; }

@media (max-width: 600px) {
  .cta-end-inner { padding: 28px 20px; }
  .cta-end-title { font-size: 20px; }
  .cta-end-fields { flex-direction: column; }
  .cta-end-fields input[type="text"],
  .cta-end-fields input[type="email"] { min-width: 100%; }
  .cta-end-fields .btn-gold { width: 100%; justify-content: center; }
}
