/*
Theme Name: Realty Blog Pro
Theme URI: https://codewithamit.netlify.app
Author: Code with Amit
Author URI: https://codewithamit.netlify.app
Description: A modern, responsive real estate blog WordPress theme inspired by top FSBO listing sites. Clean layout with sidebar, featured posts, and professional typography.
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: realty-blog-pro
Tags: blog, real-estate, responsive, clean, professional
*/

/* ===========================
   CSS CUSTOM PROPERTIES
   =========================== */
:root {
  --primary: #1a6fc4;
  --primary-dark: #1255a0;
  --primary-light: #e8f1fb;
  --accent: #f97316;
  --accent-dark: #ea6c0a;
  --success: #22c55e;
  --text-dark: #1a1a2e;
  --text-body: #374151;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  --bg-gray: #f1f5f9;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.13);
  --shadow-hover: 0 12px 40px rgba(26,111,196,0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-heading: 'Merriweather', 'Georgia', serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
  --font-mono: 'Fira Code', monospace;
  --transition: all 0.22s cubic-bezier(0.4,0,0.2,1);
  --container-max: 1240px;
  --sidebar-width: 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-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-body);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

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

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  line-height: 1.3;
  font-weight: 700;
}

ul, ol { list-style: none; }

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

/* ===========================
   LAYOUT CONTAINERS
   =========================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main { flex: 1; }

/* ===========================
   TOP BAR
   =========================== */
.top-bar {
  background: var(--text-dark);
  color: rgba(255,255,255,0.85);
  font-size: 0.8rem;
  padding: 7px 0;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.top-bar a { color: rgba(255,255,255,0.75); }
.top-bar a:hover { color: #fff; }
.top-bar-left, .top-bar-right { display: flex; align-items: center; gap: 18px; }
.top-bar-item { display: flex; align-items: center; gap: 6px; }
.top-bar-item svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ===========================
   SITE HEADER
   =========================== */
.site-header {
  background: var(--bg-white);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--container-max);
  margin: 0 auto;
  gap: 20px;
}

/* Logo */
.site-logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dark);
}
.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  font-weight: 900;
  flex-shrink: 0;
}
.logo-text { font-family: var(--font-heading); font-size: 1.35rem; font-weight: 700; }
.logo-text span { color: var(--primary); }

/* Navigation */
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  color: var(--text-body);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* Header CTA */
.header-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.btn-primary {
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(249,115,22,0.3);
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(249,115,22,0.4);
  color: white;
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-outline:hover {
  background: var(--primary);
  color: white;
}

/* Hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.menu-toggle:hover { background: var(--bg-gray); }
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  color: var(--text-body);
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  display: block;
  transition: var(--transition);
}
.mobile-nav a:hover { background: var(--primary-light); color: var(--primary); }

/* ===========================
   BREADCRUMB
   =========================== */
.breadcrumb-bar {
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-light);
  padding: 10px 0;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.83rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--primary); font-weight: 500; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--text-light); font-size: 0.75rem; }
.breadcrumb-current { color: var(--text-muted); }

/* ===========================
   BLOG LISTING PAGE (index/archive)
   =========================== */
.blog-page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 48px 0 40px;
  color: white;
  position: relative;
  overflow: hidden;
}
.blog-page-header::after {
  content: '';
  position: absolute;
  right: -60px;
  top: -60px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.blog-page-header h1 {
  font-size: 2.2rem;
  color: white;
  margin-bottom: 10px;
}
.blog-page-header p { font-size: 1.05rem; opacity: 0.88; max-width: 520px; }

.blog-search-bar {
  display: flex;
  align-items: center;
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  max-width: 420px;
  margin-top: 22px;
  box-shadow: var(--shadow-md);
}
.blog-search-bar input {
  flex: 1;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--text-dark);
  background: transparent;
}
.blog-search-bar button {
  background: var(--accent);
  color: white;
  padding: 12px 20px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.blog-search-bar button:hover { background: var(--accent-dark); }

/* ===========================
   MAIN CONTENT + SIDEBAR LAYOUT
   =========================== */
.content-sidebar-wrap {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 36px;
  padding: 40px 0 60px;
}

/* ===========================
   POST CARDS (Blog Listing)
   =========================== */
.posts-grid { display: flex; flex-direction: column; gap: 0; }

.post-card {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 0;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.post-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  border-color: var(--primary);
}

.post-card-content {
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.post-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.post-category {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.post-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.read-time {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.post-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.35;
}
.post-card-title a {
  color: var(--text-dark);
  transition: var(--transition);
}
.post-card-title a:hover { color: var(--primary); }

.post-card-excerpt {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.post-author-mini {
  display: flex;
  align-items: center;
  gap: 8px;
}
.author-avatar-sm {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  overflow: hidden;
  flex-shrink: 0;
}
.author-avatar-sm img { width: 100%; height: 100%; object-fit: cover; }
.author-name-sm { font-size: 0.82rem; font-weight: 600; color: var(--text-body); }

.read-more-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}
.read-more-link:hover { gap: 8px; color: var(--primary-dark); }

.post-card-image {
  position: relative;
  overflow: hidden;
  background: var(--bg-gray);
  min-height: 200px;
}
.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.post-card:hover .post-card-image img { transform: scale(1.04); }
.post-card-image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 200px;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg-gray) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 3rem;
}

/* Featured Post Card */
.post-card.featured {
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  border: 2px solid var(--primary);
}
.post-card.featured .post-card-image {
  min-height: 260px;
}
.post-card.featured .post-card-title { font-size: 1.5rem; }
.featured-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--accent);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 2;
}

/* ===========================
   PAGINATION
   =========================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.page-number {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-body);
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}
.page-number:hover, .page-number.current {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.page-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
}
.page-nav:hover { background: var(--primary-light); }

/* ===========================
   SIDEBAR
   =========================== */
.sidebar { display: flex; flex-direction: column; gap: 24px; }

.sidebar-widget {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.widget-title {
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* CTA Widget */
.cta-widget {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
}
.cta-widget-inner { padding: 24px; }
.cta-widget h3 {
  font-size: 1.15rem;
  color: white;
  margin-bottom: 6px;
  line-height: 1.35;
}
.cta-widget p { font-size: 0.85rem; opacity: 0.88; margin-bottom: 18px; line-height: 1.55; }
.address-input-wrap {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.address-input-wrap input {
  width: 100%;
  padding: 12px 14px;
  font-size: 0.9rem;
  color: var(--text-dark);
  background: transparent;
}
.address-input-wrap input::placeholder { color: var(--text-light); }
.address-btn {
  width: 100%;
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.address-btn:hover { background: var(--accent-dark); transform: translateY(-1px); }
.cta-note {
  font-size: 0.77rem;
  opacity: 0.78;
  margin-top: 10px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

/* App/Rating Widget */
.app-links { padding: 6px 0; }
.app-link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
  cursor: pointer;
}
.app-link-item:last-child { border-bottom: none; }
.app-link-item:hover { background: var(--bg-light); }
.app-link-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}
.app-link-icon.blue { background: var(--primary-light); }
.app-link-icon.star { background: #fef9c3; }
.app-link-text h4 { font-size: 0.88rem; font-weight: 700; color: var(--text-dark); }
.app-link-text p { font-size: 0.78rem; color: var(--text-muted); margin-top: 1px; }
.app-link-arrow { margin-left: auto; color: var(--text-light); font-size: 1.1rem; }

/* Category Widget */
.category-list { padding: 6px 0; }
.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 20px;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}
.category-item:last-child { border-bottom: none; }
.category-item:hover { background: var(--primary-light); }
.category-item a { font-size: 0.88rem; font-weight: 600; color: var(--text-body); flex: 1; }
.category-item:hover a { color: var(--primary); }
.category-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-gray);
  padding: 2px 8px;
  border-radius: 20px;
}

/* Recent Posts Widget */
.recent-posts-list { padding: 6px 0; }
.recent-post-item {
  display: flex;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}
.recent-post-item:last-child { border-bottom: none; }
.recent-post-item:hover { background: var(--bg-light); }
.recent-post-thumb {
  width: 64px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-gray);
}
.recent-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.recent-post-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.4rem;
}
.recent-post-info h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.recent-post-info h4 a { color: inherit; }
.recent-post-info h4 a:hover { color: var(--primary); }
.recent-post-date { font-size: 0.75rem; color: var(--text-muted); }

/* Newsletter Widget */
.newsletter-widget-inner { padding: 22px 20px; }
.newsletter-widget-inner p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 14px; line-height: 1.55; }
.newsletter-form { display: flex; flex-direction: column; gap: 10px; }
.newsletter-form input {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--text-dark);
  width: 100%;
  transition: var(--transition);
}
.newsletter-form input:focus { border-color: var(--primary); }
.newsletter-form button {
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.newsletter-form button:hover { background: var(--primary-dark); }

/* ===========================
   SINGLE POST PAGE
   =========================== */
.post-header { padding: 40px 0 0; }
.post-header-inner { max-width: 860px; }

.post-categories { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.post-cat-tag {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.25;
  margin-bottom: 20px;
}

.post-byline {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary);
  font-size: 1rem;
  overflow: hidden;
  flex-shrink: 0;
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-details { display: flex; flex-direction: column; }
.author-label { font-size: 0.73rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.author-name { font-size: 0.9rem; font-weight: 700; color: var(--text-dark); }

.post-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  flex-wrap: wrap;
}
.post-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.post-stat svg { width: 15px; height: 15px; }
.verified-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--success);
}

/* Post Featured Image */
.post-featured-image {
  margin-bottom: 36px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--bg-gray);
  min-height: 380px;
  max-height: 500px;
}
.post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-featured-image-placeholder {
  min-height: 380px;
  background: linear-gradient(135deg, var(--primary-light), var(--bg-gray));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: var(--primary);
}

/* Inline CTA Box */
.inline-cta-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 32px 0;
}
.inline-cta-box h3 { color: white; font-size: 1.2rem; margin-bottom: 6px; }
.inline-cta-box p { font-size: 0.9rem; opacity: 0.88; margin-bottom: 16px; }
.inline-cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.inline-cta-row input {
  flex: 1;
  min-width: 180px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-dark);
  border: none;
}
.inline-cta-row button {
  background: var(--accent);
  color: white;
  font-weight: 700;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.inline-cta-row button:hover { background: var(--accent-dark); }

/* TOC */
.toc-box {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin: 28px 0;
}
.toc-box h4 {
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.toc-list { counter-reset: toc-counter; }
.toc-list li { counter-increment: toc-counter; }
.toc-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}
.toc-list li:last-child a { border-bottom: none; }
.toc-list li a::before {
  content: counter(toc-counter, decimal-leading-zero);
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-light);
  flex-shrink: 0;
  font-family: var(--font-mono);
}
.toc-list li a:hover { color: var(--primary-dark); padding-left: 4px; }

/* Post Body Content */
.post-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-body);
  max-width: 720px;
}
.post-body h2 {
  font-size: 1.7rem;
  margin: 40px 0 18px;
  color: var(--text-dark);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}
.post-body h3 { font-size: 1.3rem; margin: 30px 0 14px; color: var(--text-dark); }
.post-body h4 { font-size: 1.1rem; margin: 22px 0 10px; color: var(--text-dark); }
.post-body p { margin-bottom: 18px; }
.post-body strong { color: var(--text-dark); font-weight: 700; }
.post-body a { color: var(--primary); font-weight: 500; text-decoration: underline; }
.post-body a:hover { color: var(--primary-dark); }
.post-body ul, .post-body ol {
  margin: 16px 0 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body li { font-size: 0.97rem; }
.post-body blockquote {
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  padding: 18px 22px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 22px 0;
  font-style: italic;
  color: var(--text-body);
}
.post-body img {
  border-radius: var(--radius-md);
  margin: 22px 0;
  box-shadow: var(--shadow-sm);
}
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  font-size: 0.92rem;
}
.post-body th {
  background: var(--primary);
  color: white;
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
}
.post-body td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
}
.post-body tr:nth-child(even) td { background: var(--bg-light); }

/* Pro/Con Box */
.pro-con-box { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
.pros-box, .cons-box {
  padding: 18px 20px;
  border-radius: var(--radius-md);
}
.pros-box { background: #f0fdf4; border: 1px solid #86efac; }
.cons-box { background: #fff1f2; border: 1px solid #fca5a5; }
.pros-box h4 { color: #16a34a; margin-bottom: 12px; font-size: 0.95rem; }
.cons-box h4 { color: #dc2626; margin-bottom: 12px; font-size: 0.95rem; }
.pros-box ul, .cons-box ul { margin: 0; list-style: none; gap: 6px; }
.pros-box li::before { content: '✓ '; color: #16a34a; font-weight: 700; }
.cons-box li::before { content: '✗ '; color: #dc2626; font-weight: 700; }
.pros-box li, .cons-box li { font-size: 0.88rem; }

/* Highlight Box */
.highlight-box {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-left: 4px solid #f59e0b;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 18px 22px;
  margin: 22px 0;
}
.highlight-box strong { color: #92400e; }

/* ===========================
   POST TAGS & SHARE
   =========================== */
.post-footer-meta {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 2px solid var(--border);
}
.post-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.post-tag-label { font-size: 0.82rem; font-weight: 700; color: var(--text-muted); }
.post-tag {
  background: var(--bg-gray);
  color: var(--text-body);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  transition: var(--transition);
}
.post-tag:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }

.share-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.share-label { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); }
.share-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: none;
}
.share-btn.fb { background: #1877f2; color: white; }
.share-btn.tw { background: #000; color: white; }
.share-btn.ln { background: #0a66c2; color: white; }
.share-btn.wa { background: #25d366; color: white; }
.share-btn:hover { opacity: 0.88; transform: translateY(-1px); }

/* ===========================
   AUTHOR BOX
   =========================== */
.author-box {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 36px 0;
  display: flex;
  gap: 20px;
}
.author-box-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  flex-shrink: 0;
  overflow: hidden;
}
.author-box-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-box-info h3 { font-size: 1.05rem; margin-bottom: 4px; }
.author-box-info .author-role { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 10px; }
.author-box-info p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }

/* ===========================
   RELATED POSTS
   =========================== */
.related-posts { margin: 40px 0; }
.related-posts h2 {
  font-size: 1.4rem;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.related-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  border-color: var(--primary);
}
.related-card-image {
  height: 140px;
  background: var(--primary-light);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--primary);
}
.related-card-image img { width: 100%; height: 100%; object-fit: cover; }
.related-card-body { padding: 16px; }
.related-card-body h3 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-card-body h3 a { color: var(--text-dark); }
.related-card-body h3 a:hover { color: var(--primary); }
.related-card-date { font-size: 0.75rem; color: var(--text-muted); }

/* ===========================
   SITE FOOTER
   =========================== */
.site-footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.8);
  padding: 56px 0 0;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo-text { color: white; }
.footer-brand .logo-text span { color: var(--accent); }
.footer-brand p {
  font-size: 0.88rem;
  opacity: 0.72;
  margin-top: 14px;
  line-height: 1.65;
  max-width: 280px;
}
.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.social-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
  transition: var(--transition);
}
.social-btn:hover { background: var(--primary); color: white; }

.footer-col h4 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.72);
  transition: var(--transition);
}
.footer-links a:hover { color: white; padding-left: 4px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 0.82rem; opacity: 0.6; }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { font-size: 0.82rem; color: rgba(255,255,255,0.6); }
.footer-bottom-links a:hover { color: white; }

/* Rating Stars */
.stars { color: #fbbf24; font-size: 0.9rem; letter-spacing: 1px; }

/* ===========================
   UTILITY CLASSES
   =========================== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ===========================
   RESPONSIVE - TABLET
   =========================== */
@media (max-width: 1024px) {
  :root { --sidebar-width: 300px; }
  .content-sidebar-wrap { gap: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .post-title { font-size: 1.9rem; }
}

@media (max-width: 900px) {
  .main-nav { display: none; }
  .menu-toggle { display: flex; }
  .header-cta .btn-outline { display: none; }
  .content-sidebar-wrap { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
  .cta-widget { display: block; }
  .post-card { grid-template-columns: 1fr 220px; }
  .top-bar-left { display: none; }
}

/* ===========================
   RESPONSIVE - MOBILE
   =========================== */
@media (max-width: 640px) {
  :root { --container-max: 100%; }
  .container { padding: 0 16px; }

  .header-inner { padding: 12px 16px; }
  .logo-text { font-size: 1.15rem; }
  .btn-primary { padding: 9px 14px; font-size: 0.82rem; }

  .blog-page-header { padding: 32px 0 28px; }
  .blog-page-header h1 { font-size: 1.65rem; }
  .blog-page-header p { font-size: 0.92rem; }
  .blog-search-bar { max-width: 100%; }

  .content-sidebar-wrap { padding: 24px 0 40px; }

  .post-card { grid-template-columns: 1fr; }
  .post-card-image { min-height: 180px; order: -1; }

  .post-title { font-size: 1.55rem; }
  .post-byline { gap: 12px; }
  .post-stats { margin-left: 0; }

  .pro-con-box { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .author-box { flex-direction: column; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
  .footer-bottom-links { flex-wrap: wrap; gap: 14px; }

  .post-byline { flex-direction: column; align-items: flex-start; }
  .share-bar { flex-wrap: wrap; }
  .inline-cta-row { flex-direction: column; }
  .inline-cta-row input { min-width: unset; }
}

/* ===========================
   PRINT
   =========================== */
@media print {
  .site-header, .sidebar, .site-footer, .share-bar, .related-posts { display: none; }
  .content-sidebar-wrap { grid-template-columns: 1fr; }
  body { font-size: 12pt; }
}
