/* ============================================================
   Eldessouky Law — Single Blog Post CSS
   Matches approved HTML: templates/approved/single-blog-post.html
   ============================================================ */

/* ---- POST HERO ---- */
.post-hero {
  padding-top: 140px;
  padding-bottom: 3rem;
  background: var(--darker);
  text-align: center;
  margin-top: 60px;
}
.post-hero::before { display: none; }
.post-hero-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Post hero elements */
.post-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 1rem;
}
.post-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 1.5rem;
}
.post-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--gray);
  font-size: 0.9rem;
}
.post-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.post-meta-item svg {
  width: 16px;
  height: 16px;
  fill: var(--gold);
}
.post-meta-divider {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gray);
  opacity: 0.4;
}
/* breadcrumbs removed */
.post-hero .breadcrumb__unused {
  font-size: 0.8rem;
  color: var(--gray);
  margin-bottom: 2rem;
}
.post-hero .breadcrumb a { color: var(--gray); transition: color 0.3s; }
.post-hero .breadcrumb a:hover { color: var(--gold); }
.post-hero .breadcrumb span { margin: 0 0.5rem; color: var(--gray); }

/* ---- POST LAYOUT (3-column grid) ---- */
.post-body-wrap {
  padding: 4rem 0;
}
.post-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 860px) 300px;
  gap: 2.5rem;
  max-width: 1720px;
  margin: 0 auto;
  padding: 0 2.5rem;
  align-items: start;
  justify-content: center;
}

/* ---- LEFT SIDEBAR: TABLE OF CONTENTS ---- */
.post-toc {
  position: relative;
}
.toc-sticky {
  position: sticky;
  top: 140px;
}
.toc-title {
  font-family: var(--sans) !important;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(208, 169, 37, 0.15);
}
.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.toc-link {
  font-size: 0.85rem;
  color: var(--gray);
  text-decoration: none;
  padding-left: 0.75rem;
  border-left: 2px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}
.toc-link:hover, .toc-link.active {
  color: var(--gold);
  border-left-color: var(--gold);
}

/* ---- BLOG CONTENT READABILITY ---- */
/* Article body uses off-white bg with dark text in BOTH modes */
.post-body {
  background: var(--off-white);
  color: #1a1a1a;
  padding: 3rem;
  min-width: 0;
}
.post-body p {
  color: #333333;
  font-size: 1.1rem;
  line-height: 1.85;
  margin-bottom: 1.5rem;
}
.post-body h2, .post-body h3, .post-body h4 {
  color: #1a1a1a;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  scroll-margin-top: 100px;
}
.post-body h2 {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 700;
}
.post-body h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
}
.post-body h4 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
}
.post-body a {
  color: #b8941f;
}
.post-body ul, .post-body ol {
  color: #333333;
  margin: 1rem 0 1.5rem 1.5rem;
  line-height: 1.85;
}
.post-body li {
  margin-bottom: 0.5rem;
}
.post-body blockquote {
  border-left: 3px solid #b8941f;
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: rgba(184, 148, 31, 0.05);
  color: #444;
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.7;
}
.post-body blockquote cite {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: #777;
  font-style: normal;
}
.post-body .highlight {
  color: #b8941f;
  font-weight: 500;
}
.post-body .callout {
  background: rgba(184, 148, 31, 0.04);
  border-left: 3px solid var(--gold);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
}
.post-body .callout-label {
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #b8941f;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.post-body .callout p:last-child { margin-bottom: 0; }
.post-body img {
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
}
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
}
.post-body th, .post-body td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  text-align: left;
  font-size: 0.95rem;
  color: #333;
}
.post-body th {
  font-weight: 600;
  color: #1a1a1a;
}
.post-body hr {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.08);
  margin: 2.5rem 0;
}
.post-featured-img {
  margin: -3rem -3rem 3rem -3rem;
  overflow: hidden;
}
.post-featured-img img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---- RIGHT SIDEBAR: STICKY CTA (Gallo-style) ---- */
.post-sidebar {
  position: relative;
}
.sidebar-sticky {
  position: sticky;
  top: 140px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.sidebar-cta {
  background: var(--darker);
  padding: 2.5rem 2rem;
  border: 1px solid rgba(208, 169, 37, 0.1);
  text-align: center;
}
.sidebar-cta-label {
  font-family: var(--sans) !important;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold);
  display: block;
  margin-bottom: 1rem;
}
.sidebar-cta-headline {
  font-family: var(--serif) !important;
  font-size: clamp(1.75rem, 2.5vw, 2.25rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
.sidebar-cta-headline em {
  font-style: normal;
  color: var(--gold);
}
.sidebar-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white) !important;
  text-decoration: none !important;
  margin-bottom: 1rem;
  transition: color 0.3s;
}
.sidebar-phone:hover {
  color: var(--gold) !important;
}
.sidebar-phone svg {
  color: var(--gold);
  flex-shrink: 0;
}
.sidebar-btn {
  width: 100%;
  justify-content: center;
  padding: 1rem;
  font-size: 0.85rem;
}

/* Sidebar form */
.sidebar-form {
  background: var(--darker);
  padding: 2rem;
  border: 1px solid rgba(208, 169, 37, 0.1);
}
.sidebar-form .contact-form {
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
}
.sidebar-form .contact-form h3 {
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 1rem;
}
.sidebar-form-title {
  font-family: var(--sans) !important;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-align: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(208, 169, 37, 0.15);
}

/* Author link in meta */
.post-meta a {
  color: var(--gray) !important;
  text-decoration: none !important;
}
.post-meta a:hover {
  color: var(--gold) !important;
}
.sidebar-info h4 {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 1rem;
}
.sidebar-info p {
  font-size: 0.95rem;
  color: var(--gray);
  line-height: 1.6;
}
.sidebar-info a {
  color: var(--gold);
  font-weight: 600;
}

/* ---- RELATED POSTS ---- */
.related-section {
  padding: 6rem 0;
  background: var(--black);
}
.related-inner {
  max-width: 1720px;
  margin: 0 auto;
  padding: 0 2.5rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}
.related-card {
  display: block;
  text-decoration: none;
  background: var(--darker);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: border-color 0.3s, transform 0.3s;
}
.related-card:hover {
  border-color: rgba(208, 169, 37, 0.3);
  transform: translateY(-3px);
}
.related-card-image {
  width: 100%;
  height: 200px;
  background: var(--darker);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.related-body {
  padding: 1.5rem;
}
.related-cat {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 0.75rem;
}
.related-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--white);
  margin-bottom: 1rem;
}
.related-read-more {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

/* ========= RESPONSIVE ========= */
@media (max-width: 1024px) {
  .post-layout { grid-template-columns: 1fr; }
  .post-toc { display: none; }
  .post-sidebar { display: none; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .post-hero { padding-top: 120px; padding-bottom: 2rem; }
  .post-body { padding: 2rem; }
  .post-featured-img { margin: -2rem -2rem 2rem -2rem; }
  .related-grid { grid-template-columns: 1fr; }
  .author-box-inner { flex-direction: column; }
  .related-section { padding: 4rem 0; }
}

/* ========= LIGHT MODE ========= */
/* Article body stays light bg / dark text in both modes */
[data-theme="light"] .post-body {
  background: #ffffff;
  color: #1a1a1a;
}
[data-theme="light"] .sidebar-cta { border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .sidebar-info { border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .related-card { border-color: rgba(0, 0, 0, 0.08); }
[data-theme="light"] .related-card:hover { border-color: rgba(208, 169, 37, 0.4); }
[data-theme="light"] .related-card-image { border-bottom-color: rgba(0, 0, 0, 0.04); }

/* ============================================================
   EVOLUTION PASS — post.css
   Hand-tuned for the Evolution design system (Oswald/Lato,
   navy + gold). Overrides sit below the base rules on purpose.
   ============================================================ */
.post-hero h1 { font-size: clamp(2.3rem, 3.8vw, 3.2rem); font-weight: 600; text-transform: none; letter-spacing: 0.01em; }
.post-category { font-family: var(--serif); font-weight: 500; text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.72rem; color: var(--gold); }
.post-meta { font-family: var(--sans); }
.post-body h2 { font-size: 1.65rem; font-weight: 600; }
.post-body h3 { font-size: 1.25rem; font-weight: 600; }
/* TOC card lives on .toc-sticky (not the grid column) so it has padding and
   the column can stretch — which is what lets position:sticky actually work */
.post-toc { background: none; border: none; align-self: stretch; }
.toc-sticky {
  background: var(--darker);
  border: 1px solid rgba(208, 169, 37, 0.15);
  border-left: 4px solid var(--gold);
  padding: 1.5rem 1.4rem;
  top: 120px;
}
.toc-title { margin-bottom: 1rem; }
.toc-nav { gap: 0.65rem; }
.toc-link { font-size: 0.82rem; line-height: 1.45; }
.related-card { background: var(--darker); border: 1px solid rgba(208, 169, 37, 0.12); border-bottom: 3px solid transparent; transition: border-color 0.25s; }
.related-card:hover { border-bottom-color: var(--gold); }
.related-cat { font-family: var(--serif); font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.66rem; color: var(--gold); }
[data-theme="light"] .toc-sticky, [data-theme="light"] .related-card { background: #ffffff; border-color: rgba(0, 0, 0, 0.08); }
[data-theme="light"] .toc-sticky { border-left-color: var(--gold); }

/* ── DARK MODE ARTICLE = THEME NAVY (2026-07-16) ──
   Dark mode drops the white article card: body goes homepage navy with light
   text. Light mode keeps the white card (rules above are [data-theme] scoped). */
html:not([data-theme="light"]) .post-body { background: var(--black); color: var(--light-gray); }
html:not([data-theme="light"]) .post-body p,
html:not([data-theme="light"]) .post-body ul,
html:not([data-theme="light"]) .post-body ol,
html:not([data-theme="light"]) .post-body li,
html:not([data-theme="light"]) .post-body td { color: var(--light-gray); }
html:not([data-theme="light"]) .post-body h2,
html:not([data-theme="light"]) .post-body h3,
html:not([data-theme="light"]) .post-body h4,
html:not([data-theme="light"]) .post-body th,
html:not([data-theme="light"]) .post-body strong { color: var(--white); }
html:not([data-theme="light"]) .post-body a { color: var(--gold-bright); }
html:not([data-theme="light"]) .post-body .highlight,
html:not([data-theme="light"]) .post-body .callout-label { color: var(--gold-bright); }
html:not([data-theme="light"]) .post-body blockquote { border-left-color: var(--gold-bright); background: rgba(230, 181, 35, 0.06); color: var(--light-gray); }
html:not([data-theme="light"]) .post-body blockquote cite { color: var(--gray); }
html:not([data-theme="light"]) .post-body .callout { background: rgba(230, 181, 35, 0.05); }
html:not([data-theme="light"]) .post-body th,
html:not([data-theme="light"]) .post-body td { border-bottom-color: rgba(255, 255, 255, 0.1); }
html:not([data-theme="light"]) .post-body hr { border-top-color: rgba(255, 255, 255, 0.1); }
/* Imported boxes with inline light backgrounds keep dark text inside */
html:not([data-theme="light"]) .post-body [style*="background"] { color: #222222; }
html:not([data-theme="light"]) .post-body [style*="background"] :is(p, li, span, strong, b, h3, h4) { color: inherit; }

/* ── LIGHT MODE SIDEBAR = DARK TREATMENT (2026-07-16) ──
   Blog-post sidebar mirrors the default-page sidebar: navy cards in both themes. */
[data-theme="light"] .sidebar-cta,
[data-theme="light"] .sidebar-info {
  background: #0e1f33;
  border-color: rgba(208, 169, 37, 0.15);
}
[data-theme="light"] .sidebar-cta-label { color: #d0a925; }
[data-theme="light"] .sidebar-cta-headline { color: #ffffff; }
[data-theme="light"] .sidebar-cta-headline em { color: #d0a925; }
[data-theme="light"] .sidebar-phone { color: #ffffff !important; }
[data-theme="light"] .sidebar-phone:hover { color: #d0a925 !important; }
[data-theme="light"] .sidebar-phone svg { color: #d0a925; }
[data-theme="light"] .sidebar-info h4 { color: #d0a925; }
[data-theme="light"] .sidebar-info p { color: #8fa1b3; }
[data-theme="light"] .sidebar-info p strong { color: #ffffff; }
[data-theme="light"] .sidebar-info a { color: #d0a925; }
