/* =========================================================
   AI Blog Creator — KCM-Inspired Real Estate Blog Styles
   Clean, professional, trustworthy
   ========================================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy: #1a2e4a;
  --navy-light: #243d60;
  --blue: #2a6ebb;
  --blue-light: #3a82d8;
  --gold: #c9952a;
  --gold-light: #e0aa38;
  --white: #ffffff;
  --gray-50: #f8f9fb;
  --gray-100: #f0f2f5;
  --gray-200: #e2e6ea;
  --gray-400: #9ba3b0;
  --gray-600: #6b7280;
  --gray-800: #1f2937;
  --text: #2d3748;
  --text-light: #4a5568;
  --border: #e2e6ea;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 12px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.08);
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-serif: 'Georgia', 'Times New Roman', serif;
  --max-width: 1100px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--gray-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-light); text-decoration: underline; }

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

/* ─── SITE HEADER ─────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.site-logo .logo-mark {
  width: 36px;
  height: 36px;
  background: var(--gold);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: var(--navy);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.site-logo .logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.site-logo .logo-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.2px;
}

.site-logo .logo-tagline {
  font-size: 10px;
  color: var(--gold-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.header-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  opacity: 0.85;
}

/* ─── AGENT HEADER BAND ───────────────────────────────────── */
.agent-band {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
}

.agent-band .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.agent-band .agent-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.agent-band .agent-avatar-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.agent-band .agent-info .agent-name-sm {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
}

.agent-band .agent-info .agent-market-sm {
  font-size: 12px;
  color: var(--gray-600);
}

.agent-band .back-link {
  margin-left: auto;
  font-size: 13px;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ─── POST HERO ────────────────────────────────────────────── */
.post-hero {
  width: 100%;
  aspect-ratio: 16 / 5.5;
  object-fit: cover;
  object-position: center;
  max-height: 420px;
  background: var(--gray-200);
}

.post-hero-placeholder {
  width: 100%;
  height: 340px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-hero-placeholder svg {
  opacity: 0.15;
  width: 80px;
  height: 80px;
}

/* ─── MAIN LAYOUT ──────────────────────────────────────────── */
.page-body {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 64px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

@media (max-width: 768px) {
  .page-body {
    grid-template-columns: 1fr;
    padding: 24px 16px 48px;
    gap: 32px;
  }
}

/* ─── ARTICLE ──────────────────────────────────────────────── */
.article-header {
  margin-bottom: 28px;
}

.article-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
  margin-bottom: 12px;
}

.article-category::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--gold);
}

.article-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--gray-600);
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

.article-meta .meta-divider {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gray-400);
}

/* ─── ARTICLE CONTENT ──────────────────────────────────────── */
.article-content {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
}

.article-content p {
  margin-bottom: 20px;
}

.article-content h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  margin: 36px 0 14px;
  line-height: 1.3;
  padding-top: 4px;
  border-top: 2px solid var(--gold);
  padding-top: 16px;
}

.article-content h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--navy-light);
  margin: 28px 0 10px;
  line-height: 1.35;
}

.article-content ul, .article-content ol {
  margin: 0 0 20px 0;
  padding-left: 24px;
}

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

.article-content strong {
  font-weight: 700;
  color: var(--gray-800);
}

.article-content em {
  font-style: italic;
  color: var(--text-light);
}

/* ─── SIDEBAR ──────────────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* Agent card */
.agent-card {
  text-align: center;
  padding: 28px 24px;
}

.agent-headshot-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.agent-headshot {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--navy), var(--shadow);
}

.agent-headshot-placeholder {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 28px;
  font-weight: 700;
  box-shadow: 0 0 0 2px var(--navy-light), var(--shadow);
}

.agent-card .agent-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.agent-card .agent-market {
  font-size: 13px;
  color: var(--gray-600);
  margin-bottom: 12px;
}

.agent-card .agent-bio {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.55;
  margin-bottom: 16px;
  text-align: left;
}

.agent-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.agent-contact a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: var(--blue);
  padding: 6px 10px;
  background: var(--gray-50);
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: background 0.15s;
}

.agent-contact a:hover {
  background: var(--gray-100);
  text-decoration: none;
}

.btn-view-all {
  display: block;
  width: 100%;
  padding: 10px;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.2px;
  transition: background 0.15s;
}

.btn-view-all:hover {
  background: var(--navy-light);
  color: var(--white);
  text-decoration: none;
}

/* Subscribe card */
.subscribe-card {
  padding: 24px;
}

.subscribe-card .card-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
  margin-bottom: 8px;
}

.subscribe-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 8px;
}

.subscribe-card p {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.5;
  margin-bottom: 16px;
}

.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.subscribe-form input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.subscribe-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(42,110,187,0.12);
}

.subscribe-form input::placeholder {
  color: var(--gray-400);
}

.btn-subscribe {
  width: 100%;
  padding: 11px;
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-sans);
  letter-spacing: 0.2px;
  transition: background 0.15s, transform 0.1s;
}

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

.btn-subscribe:active {
  transform: translateY(0);
}

.subscribe-success {
  display: none;
  text-align: center;
  padding: 12px;
  background: #ecfdf5;
  border-radius: var(--radius);
  color: #065f46;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #a7f3d0;
}

/* ─── AGENT INDEX PAGE ─────────────────────────────────────── */
.index-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: 60px 24px;
  text-align: center;
  color: var(--white);
}

.index-hero .agent-photo-lg {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
  margin: 0 auto 16px;
  box-shadow: var(--shadow);
}

.index-hero .agent-photo-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: var(--white);
  border: 3px solid var(--gold);
  margin: 0 auto 16px;
}

.index-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 700;
  margin-bottom: 6px;
}

.index-hero .hero-market {
  font-size: 15px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 12px;
}

.index-hero .hero-bio {
  font-size: 15px;
  color: rgba(255,255,255,0.85);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

.index-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 5px 14px;
  background: rgba(201,149,42,0.2);
  border: 1px solid var(--gold);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 0.3px;
}

.posts-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 64px;
}

.posts-section-heading {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-600);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.post-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  text-decoration: none;
}

.post-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--gray-100);
}

.post-card-thumb-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card-thumb-placeholder svg {
  opacity: 0.2;
  width: 40px;
  height: 40px;
}

.post-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-date {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gold);
  margin-bottom: 8px;
}

.post-card-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  margin-bottom: 10px;
}

.post-card-desc {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.55;
  margin-bottom: 16px;
  flex: 1;
}

.post-card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
}

.post-card:hover .post-card-link {
  text-decoration: none;
}

.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--gray-600);
}

.empty-state p {
  font-size: 16px;
  margin-top: 8px;
}

/* ─── FOOTER ───────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  padding: 32px 24px;
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
}

.site-footer .footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-footer .footer-brand {
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 8px;
}

.site-footer .disclaimer {
  max-width: 640px;
  margin: 0 auto;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}

/* ─── UTILITIES ────────────────────────────────────────────── */
@media (max-width: 640px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }

  .index-hero {
    padding: 40px 16px;
  }

  .posts-section {
    padding: 24px 16px 48px;
  }
}

/* =========================================================
   Social Share Bar
   ========================================================= */

.share-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 2px solid #e8edf2;
}

.share-label {
  font-size: 14px;
  font-weight: 600;
  color: #4a5568;
  white-space: nowrap;
}

.share-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Arial', sans-serif;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1;
}

.share-x {
  background: #000;
  color: white;
  border-color: #000;
}
.share-x:hover { background: #333; border-color: #333; }

.share-fb {
  background: #1877f2;
  color: white;
  border-color: #1877f2;
}
.share-fb:hover { background: #166fe5; border-color: #166fe5; }

.share-li {
  background: #0a66c2;
  color: white;
  border-color: #0a66c2;
}
.share-li:hover { background: #0958a8; border-color: #0958a8; }

.share-copy {
  background: white;
  color: #4a5568;
  border-color: #cbd5e0;
}
.share-copy:hover { background: #f7fafc; border-color: #a0aec0; }
