/* =========================================================
   FTB Sites Default Theme (Cleaned)
   - Inter font
   - 1200px container (.ftb-container)
   - Blog listing grid (auto: 1/2/3, and 2-even / 1-full)
   - Post page: 1200 card, 1100 reading width, images match reading width
========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root{
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #64748b;

  --card: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);

  --accent: #000000;
  --radius: 16px;

  --container: 1200px;
  --padX: 20px;

  --reading: 1100px;
}

*{ box-sizing: border-box; }

html, body{ height: 100%; }

/* Default behavior (non-Shopify sites): keep the old body styling */
body{
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Shopify Exact Mode:
   When we wrap blog content in .ftb-scope, apply FTB typography only inside it,
   so Dawn controls the header/footer exactly. */
.ftb-scope{
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* Default behavior (non-Shopify sites) */
a{ color: var(--accent); text-decoration: none; }
a:hover{ text-decoration: none; }

/* Shopify Exact Mode: only style links inside blog content */
.ftb-scope a{ color: var(--accent); text-decoration: none; }
.ftb-scope a:hover{ text-decoration: none; }


/* Default behavior */
img{ max-width: 100%; height: auto; }

/* Shopify Exact Mode (blog content only) */
.ftb-scope img{ max-width: 100%; height: auto; }


/* =========================================================
   Container utility (use this in header/article/footer)
========================================================= */

.ftb-container{
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--padX);
  padding-right: var(--padX);
}

/* If legacy templates still output .site-container, neutralize it
   so it won't double-pad/double-constrain when you use .ftb-container. */
.site-container{
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

/* =========================================================
   Legacy site shell (used by default header/footer templates)
========================================================= */

.site-shell{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main{
  flex: 1;
  padding-top: 18px;
}

.site-footer{
  border-top: 1px solid var(--border);
  padding: 22px var(--padX) 28px;
  margin-top: auto;
}

.site-footer-inner{
  max-width: var(--container);
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* =========================================================
   Blog hero (advanced header mode uses header > .ftb-container)
========================================================= */

.ftb-blog-hero-kicker{
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}

.ftb-blog-hero-title{
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 2.6vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.ftb-blog-hero-subtitle{
  margin: 0;
  max-width: 70ch;
  color: var(--muted);
  line-height: 1.6;
  font-size: 1.02rem;
}

/* =========================================================
   Home / Blog list (home.php)
========================================================= */

.ftb-blog-home{
  color: var(--text);
  padding: 6px 0 24px;
}

/* Empty state */
.ftb-blog-empty{
  margin: 22px 0 0;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px 18px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: #f8fafc;
  text-align: center;
}

.ftb-blog-empty-title{
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 6px;
}

.ftb-blog-empty-desc{
  color: var(--muted);
  margin: 0;
}

/* Smart grid:
   - 3 when space allows
   - if only 2 cards exist, they become 2 even columns
   - if only 1 card exists, it becomes full width */
.ftb-blog-grid{
  display: grid;
  gap: 18px;
  margin-top: 22px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

/* Make the entire card clickable */
.ftb-post-card-link{
  display: block;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

/* Card */
.ftb-post-card{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.ftb-post-card-link:hover .ftb-post-card{
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
}

.ftb-post-card-thumb img{
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.ftb-post-card-body{
  padding: 14px 16px 16px;
}

.ftb-post-card-title{
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.ftb-post-card-meta{
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 10px;
}

.ftb-post-card-excerpt{
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

.ftb-post-card-readmore{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
}

/* Pagination */
.ftb-blog-pagination{
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ftb-blog-pagination-info{
  color: var(--muted);
  font-size: 0.92rem;
}

.ftb-blog-pagination-links{
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.ftb-blog-pagination-link{
  font-weight: 600;
  color: var(--accent);
}

/* =========================================================
   Single Post (post.php)
   Structure:
   article > .ftb-container > .ftb-post-card > .ftb-post-content
========================================================= */

.ftb-post-card{
  /* reused on home + post page */
}

.ftb-post-breadcrumb{
  font-size: 0.95rem;
  margin: 0;
  padding: 18px 22px 0;
}

.ftb-post-back{
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.ftb-post-title{
  margin: 10px 0 10px;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.ftb-post-meta{
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 14px;
}

/* Reading column */
.ftb-post-content{
  max-width: var(--reading);
  margin: 0 auto;
  padding: 18px 22px 22px;
  font-size: 1.03rem;
  line-height: 1.8;
}

/* Typography */
.ftb-post-content :where(h2){
  margin: 1.6em 0 0.6em;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.ftb-post-content :where(h3){
  margin: 1.4em 0 0.5em;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.ftb-post-content :where(p){
  margin: 0 0 1.05em;
}

.ftb-post-content :where(ul, ol){
  margin: 0 0 1.05em 1.25em;
}

.ftb-post-content :where(li){
  margin: 0.35em 0;
}

.ftb-post-content :where(a){
  color: var(--accent);
  text-decoration: none;
}

.ftb-post-content :where(blockquote){
  margin: 1.3em 0;
  padding: 1em 1.1em;
  border-left: 4px solid #cbd5e1;
  background: #f8fafc;
  border-radius: var(--radius);
  color: var(--text);
}

.ftb-post-content :where(code){
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 1.03em;
  background: #f1f5f9;
  border: 1px solid var(--border);
  padding: 0.15em 0.35em;
  border-radius: 8px;
}

.ftb-post-content :where(pre){
  overflow: auto;
  padding: 14px 14px;
  border-radius: var(--radius);
  background: #0b1220;
  color: #e2e8f0;
  border: 1px solid #0f172a;
}

.ftb-post-content :where(hr){
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.8em 0;
}

/* TOC */
.ftb-post-content .ftb-toc{
  margin: 0 0 18px;
  padding: 14px 14px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f7f7f7;
}

.ftb-post-content .ftb-toc h2{
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.ftb-post-content .ftb-toc ul{
  margin: 0;
  padding-left: 1.1rem;
}

.ftb-post-content .ftb-toc li{
  margin: 6px 0;
}

/* Images: featured + inline match reading width */
.ftb-post figure.ftb-inline-image{
  display: block;
  margin: 18px auto;
  max-width: var(--reading);
  padding: 0;
}

.ftb-post figure.ftb-inline-image img{
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* Also apply border/radius to any other images inside content */
.ftb-post-content :where(img){
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* =========================================================
   Email CTA block
========================================================= */

.ftb-post-content .ftb-email-cta{
  margin: 28px 0 34px;
  padding: 26px 22px;
  text-align: center;
  background: #f7f7f7;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.ftb-post-content .ftb-email-cta p{
  margin: 0 0 16px;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
}

.ftb-post-content .ftb-cta-button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font-weight: 650;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}

.ftb-post-content .ftb-cta-button:hover{
  background: #020617;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.22);
}

/* =========================================================
   Not Found
========================================================= */

.ftb-notfound{
  max-width: var(--reading);
  margin: 0 auto;
  padding: 26px 0 40px;
}

.ftb-notfound-card{
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  padding: 20px 18px;
}

.ftb-notfound-kicker{
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.85);
  margin: 0 0 8px;
}

.ftb-notfound-title{
  margin: 0 0 8px;
  font-size: 1.55rem;
  line-height: 1.15;
}

.ftb-notfound-desc{
  margin: 0 0 14px;
  color: rgba(148, 163, 184, 0.9);
  line-height: 1.55;
}

.ftb-notfound-link{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #38bdf8;
  font-weight: 650;
  text-decoration: none;
}

.ftb-notfound-link:hover{
  text-decoration: underline;
}

/* =========================================================
   AI blocks: hide from humans
========================================================= */

.ftb-aio,
.ftb-geo-topic-map,
.ftb-geo,
.ftb-post-insights{
  display: none !important;
}

/* Dark mode tweaks (minimal) */
@media (prefers-color-scheme: dark){
  :root{
    --bg: #0b1220;
    --text: #e5e7eb;
    --muted: #9ca3af;

    --card: rgba(255,255,255,0.04);
    --border: rgba(255,255,255,0.10);
    --shadow: none;

    --accent: #ffffff;
  }

  /* Default behavior (non-Shopify sites) */
body{ background: var(--bg); color: var(--text); }

/* Shopify Exact Mode */
.ftb-scope{ color: var(--text); }


  .ftb-blog-empty,
  .ftb-post-content .ftb-toc,
  .ftb-post-content .ftb-email-cta,
  .ftb-post-content :where(blockquote){
    background: rgba(255,255,255,0.06);
  }

  .ftb-post-content :where(pre){
    border-color: rgba(255,255,255,0.10);
  }

  .ftb-post-content .ftb-cta-button{
    background: #ffffff;
    color: #020617;
    box-shadow: none;
  }
  .ftb-post-content .ftb-cta-button:hover{
    background: #e5e7eb;
  }
}
/* =========================================================
   FTB SHOPIFY EXACT MODE — SINGLE SCOPE BLOCK (EM-based)
   Drop this at the VERY END of your CSS file.
   Assumes your blog HTML is wrapped in: <div class="ftb-scope"> ... </div>
========================================================= */

.ftb-scope{
  /* ---- Base / Reset (scope-only) ---- */
  font-size: 16px !important;               /* 1em = 16px (immune to Dawn 62.5% rem) */
  line-height: 1.6;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);

  /* ---- Layout tokens (uses your :root vars) ---- */
  /* (no changes needed here; uses: --container, --padX, --reading, --radius, --border, --shadow, --card, --muted, --accent) */
}

/* Containers + media */
.ftb-scope .ftb-container{
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--padX);
  padding-right: var(--padX);
}

.ftb-scope img{
  max-width: 100%;
  height: auto;
}

/* Links (blog only) */
.ftb-scope a{
  color: var(--accent);
  text-decoration: none;
}
.ftb-scope a:hover{
  text-decoration: none;
}

/* =========================================================
   Blog home + cards
========================================================= */

.ftb-scope .ftb-blog-home{
  color: var(--text);
  padding: 6px 0 24px;
}

.ftb-scope .ftb-blog-grid{
  display: grid;
  gap: 18px;
  margin-top: 22px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.ftb-scope .ftb-post-card-link{
  display: block;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.ftb-scope .ftb-post-card{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.ftb-scope .ftb-post-card-link:hover .ftb-post-card{
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
}

.ftb-scope .ftb-post-card-thumb img{
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.ftb-scope .ftb-post-card-body{ padding: 14px 16px 16px; }

.ftb-scope .ftb-post-card-title{
  margin: 0 0 8px;
  font-size: 1.05em !important; /* EM */
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.ftb-scope .ftb-post-card-meta{
  font-size: 0.85em !important; /* EM */
  color: var(--muted);
  margin: 0 0 10px;
}

.ftb-scope .ftb-post-card-excerpt{
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.95em !important; /* EM */
}

.ftb-scope .ftb-post-card-readmore{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95em !important; /* EM */
  color: var(--accent);
}

/* =========================================================
   Single post
========================================================= */

.ftb-scope .ftb-post-breadcrumb{
  font-size: 0.95em !important; /* EM */
  margin: 0;
  padding: 18px 22px 0;
}

.ftb-scope .ftb-post-back{
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.ftb-scope .ftb-post-title{
  margin: 10px 0 10px;
  font-size: clamp(2em, 3vw, 3em) !important; /* EM */
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.ftb-scope .ftb-post-meta{
  font-size: 0.92em !important; /* EM */
  color: var(--muted);
  margin: 0 0 14px;
}

/* Reading column */
.ftb-scope .ftb-post-content{
  max-width: var(--reading);
  margin: 0 auto;
  padding: 18px 22px 22px;
  font-size: 1.03em !important; /* EM */
  line-height: 1.8;
}

/* Typography */
.ftb-scope .ftb-post-content :where(h2){
  margin: 1.6em 0 0.6em;
  font-size: 1.55em !important; /* EM */
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.ftb-scope .ftb-post-content :where(h3){
  margin: 1.4em 0 0.5em;
  font-size: 1.25em !important; /* EM */
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.ftb-scope .ftb-post-content :where(p){ margin: 0 0 1.05em; }
.ftb-scope .ftb-post-content :where(ul, ol){ margin: 0 0 1.05em 1.25em; }
.ftb-scope .ftb-post-content :where(li){ margin: 0.35em 0; }

/* Blockquote */
.ftb-scope .ftb-post-content :where(blockquote){
  margin: 1.3em 0;
  padding: 1em 1.1em;
  border-left: 4px solid #cbd5e1;
  background: #f8fafc;
  border-radius: var(--radius);
  color: var(--text);
}

/* Code */
.ftb-scope .ftb-post-content :where(code){
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 1.03em !important;
  background: #f1f5f9;
  border: 1px solid var(--border);
  padding: 0.15em 0.35em;
  border-radius: 8px;
}

.ftb-scope .ftb-post-content :where(pre){
  overflow: auto;
  padding: 14px 14px;
  border-radius: var(--radius);
  background: #0b1220;
  color: #e2e8f0;
  border: 1px solid #0f172a;
}

.ftb-scope .ftb-post-content :where(hr){
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.8em 0;
}

/* TOC */
.ftb-scope .ftb-post-content .ftb-toc{
  margin: 0 0 18px;
  padding: 14px 14px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f7f7f7;
}
.ftb-scope .ftb-post-content .ftb-toc h2{
  margin: 0 0 8px;
  font-size: 1.05em !important; /* EM */
}
.ftb-scope .ftb-post-content .ftb-toc ul{
  margin: 0;
  padding-left: 1.1em;
}
.ftb-scope .ftb-post-content .ftb-toc li{
  margin: 0.4em 0;
}

/* Images inside content */
.ftb-scope .ftb-post figure.ftb-inline-image{
  display: block;
  margin: 18px auto;
  max-width: var(--reading);
  padding: 0;
}

.ftb-scope .ftb-post figure.ftb-inline-image img{
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.ftb-scope .ftb-post-content :where(img){
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* Email CTA */
.ftb-scope .ftb-post-content .ftb-email-cta{
  margin: 28px 0 34px;
  padding: 26px 22px;
  text-align: center;
  background: #f7f7f7;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.ftb-scope .ftb-post-content .ftb-email-cta p{
  margin: 0 0 16px;
  font-size: 1.05em !important; /* EM */
  line-height: 1.65;
  color: var(--text);
}

/* Hide AI blocks (blog content only) */
.ftb-scope .ftb-aio,
.ftb-scope .ftb-geo-topic-map,
.ftb-scope .ftb-geo,
.ftb-scope .ftb-post-insights{
  display: none !important;
}
