/* ============================================================
   GO AI Blog styles — layered on top of styles.css
   Uses the site's existing custom properties (--bg, --fg, --muted,
   --dim, --border, --accent-gold, --accent-blue, --font-ui,
   --font-display, --r-*, --pad-x). Ship as /assets/blog.css.

   Direction-sensitive rules use CSS logical properties (-inline-start,
   text-align: start, float: inline-end) so they flip automatically under
   dir="rtl" for the ar and ur locales. styles.css carries no [dir=rtl]
   overrides anywhere on this site - keep it that way and stay logical.
   ============================================================ */

/* ---------- Shared page frame ---------- */
.blog-page {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(96px, 14vh, 150px) var(--pad-x) 80px;
}

/* ---------- Blog index ---------- */
.blog-hero { max-width: 720px; margin-bottom: clamp(40px, 7vh, 72px); }
.blog-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.blog-hero p { color: var(--muted); font-size: 1.06rem; line-height: 1.65; margin: 0; }

.blog-cluster { margin-bottom: clamp(36px, 6vh, 56px); }
.blog-cluster > h2 {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-gold);
  margin: 0 0 18px;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.blog-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-soft);
  text-decoration: none;
  color: var(--fg);
  transition: border-color var(--d-fast) var(--ease-out), transform var(--d-fast) var(--ease-out);
}
.blog-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.blog-card h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}
.blog-card p { color: var(--muted); font-size: 0.92rem; line-height: 1.55; margin: 0; flex: 1; }
.blog-card time { color: var(--dim); font-size: 0.8rem; }

/* ---------- Post ---------- */
.post { max-width: 760px; margin: 0 auto; }

.post__crumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--dim);
  margin-bottom: 22px;
}
.post__crumbs a { color: var(--muted); text-decoration: none; }
.post__crumbs a:hover { color: var(--fg); }

.post h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.6vw, 2.9rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--dim);
  font-size: 0.88rem;
  margin-bottom: 30px;
}
.post__meta strong { color: var(--muted); font-weight: 500; }

/* Answer block — the quotable summary AI assistants and Overviews lift */
.post__tldr {
  border: 1px solid var(--border-strong);
  border-inline-start: 3px solid var(--accent-gold);
  border-radius: var(--r-sm);
  background: var(--bg-soft);
  padding: 18px 22px;
  margin: 0 0 36px;
}
/* Only the leading TL;DR label gets the eyebrow treatment. Emphasis inside
   the answer text stays inline — scoping this to the first child stops
   every <strong> in the box rendering as a stray uppercase heading. */
.post__tldr > strong:first-child { color: var(--accent-gold); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; display: block; margin-bottom: 8px; }
.post__tldr p strong { color: var(--fg); font-weight: 600; }
.post__tldr p { margin: 0; color: var(--fg); line-height: 1.65; }

/* Body typography */
.post h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 44px 0 14px;
}
.post h3 { font-family: var(--font-display); font-size: 1.12rem; font-weight: 700; margin: 30px 0 10px; }
.post p, .post li { color: var(--muted); font-size: 1.02rem; line-height: 1.72; }
.post p { margin: 0 0 16px; }
.post ul, .post ol { margin: 0 0 16px; padding-inline-start: 22px; }
.post li { margin-bottom: 6px; }
.post li::marker { color: var(--accent-gold); }
.post a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.post a:hover { text-decoration-color: var(--accent-gold); }
.post strong { color: var(--fg); font-weight: 600; }
.post blockquote {
  margin: 0 0 16px;
  padding-block: 4px;
  padding-inline: 18px 0;
  border-inline-start: 2px solid var(--accent-blue);
  color: var(--muted);
  font-style: italic;
}
.post code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--section-card, oklch(0.985 0.01 80 / 0.05));
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
}
.post pre {
  background: var(--section-bg, oklch(0.07 0.005 80));
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 16px 18px;
  overflow-x: auto;
  margin: 0 0 16px;
}
.post pre code { background: none; border: 0; padding: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.6; }

/* Tables (comparison posts) */
.post .post__tablewrap { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--border); border-radius: var(--r-sm); }
.post table { border-collapse: collapse; width: 100%; font-size: 0.94rem; }
.post th, .post td { text-align: start; padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--muted); vertical-align: top; line-height: 1.5; }
.post th { color: var(--fg); font-weight: 600; font-size: 0.85rem; white-space: nowrap; background: var(--bg-soft); }
.post tr:last-child td { border-bottom: 0; }

/* Screenshot / media frames. While a real capture is missing, keep the
   data-todo attribute — it renders a visible "replace me" chip. */
.post__shot {
  margin: 6px 0 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-soft);
}
.post__shot img, .post__shot video { display: block; width: 100%; height: auto; }
.post__shot figcaption { padding: 10px 16px; font-size: 0.84rem; color: var(--dim); border-top: 1px solid var(--border); }
.post__shot[data-todo] { position: relative; min-height: 220px; display: flex; align-items: flex-end; }
.post__shot[data-todo]::before {
  content: "🖼 " attr(data-todo);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: var(--dim);
  font-size: 0.9rem;
}

/* Portrait phone captures: a 9:19.5 screenshot at full column width is taller
   than the viewport. Cap the frame instead, centred, the way the product
   pages size .detail-shot--phone. Landscape shots keep the full width. */
.post__shot--phone { max-width: 340px; margin-inline: auto; }

/* Standing advisory note — YMYL posts (health, legal-adjacent) carry one.
   Quieter than the TL;DR box: this is a caveat, not the headline. */
.post__note {
  margin: 28px 0;
  padding: 14px 18px;
  border-inline-start: 2px solid var(--border);
  background: var(--bg-soft);
  border-radius: 0;
  border-start-end-radius: var(--r-sm);
  border-end-end-radius: var(--r-sm);
  color: var(--dim);
  font-size: 0.9rem;
  line-height: 1.6;
}
.post__note strong { color: var(--muted); }
.post__note p { margin: 0; }

/* FAQ */
.post__faq { margin-top: 44px; }
.post__faq details {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  margin-bottom: 10px;
  background: var(--bg-soft);
}
.post__faq summary {
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 600;
  color: var(--fg);
  list-style: none;
}
.post__faq summary::-webkit-details-marker { display: none; }
.post__faq summary::after { content: "+"; float: inline-end; color: var(--accent-gold); }
.post__faq details[open] summary::after { content: "–"; }
.post__faq details p { padding: 0 18px 14px; margin: 0; }

/* Product CTA card */
.post__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin: 48px 0 8px;
  padding: 26px 28px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, oklch(0.16 0.02 82 / 0.6), oklch(0.14 0.02 250 / 0.4));
}
.post__cta img { width: 64px; height: 64px; border-radius: 14px; }
.post__cta-copy { flex: 1; min-width: 220px; }
.post__cta-copy h2 { margin: 0 0 6px; font-size: 1.2rem; }
.post__cta-copy p { margin: 0; font-size: 0.94rem; }
.post__cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  min-height: 44px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg) !important;
  font-weight: 700;
  text-decoration: none !important;
  font-size: 0.95rem;
  white-space: nowrap;
}
.post__cta-btn:hover { opacity: 0.9; }

/* Related posts */
.post__related { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border); }
.post__related h2 { font-size: 1.05rem; margin: 0 0 14px; }
.post__related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.post__related a { text-decoration: none; color: var(--muted); }
.post__related a:hover { color: var(--fg); }

/* Standing author line */
.post__byline {
  margin-top: 36px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--dim);
  font-size: 0.88rem;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .blog-page { padding-top: 88px; }
  .post th, .post td { padding: 8px 10px; }
}
