/* ============================================================
   BLOG — Public-facing styles
   Matches the exact brand aesthetic of pricing.html / about.html
   Requires: shared/style.css loaded first (CSS variables)
   ============================================================ */

/* ══════════════════════════════════════════════════════════
   ARCHIVE PAGE — blog/index.html
   ══════════════════════════════════════════════════════════ */

/* Hero — identical gradient to pricing.html */
.blog-hero {
  background: linear-gradient(135deg, var(--teal-dark) 0%, var(--teal-deep) 60%, var(--teal-mid) 100%);
  padding: 4.5rem 2rem 3.5rem;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: rgba(63, 184, 208, .06);
  pointer-events: none;
}
.blog-hero-eyebrow {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: .6rem;
}
.blog-hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: .75rem;
  color: var(--white);
}
.blog-hero p {
  font-size: .95rem;
  color: rgba(255, 255, 255, .7);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.75;
}

/* Body container */
.blog-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* ── Article Cards ── */
.blog-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.1rem;
}

.blog-card {
  background: var(--white);
  border-radius: 20px;
  padding: 1.5rem;
  border: 1px solid var(--teal-pale);
  display: flex;
  flex-direction: column;
  gap: .6rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s, border-color .18s, transform .16s;
  position: relative;
  overflow: hidden;
}
.blog-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: var(--teal-pale);
  transition: background .18s;
  border-radius: 20px 0 0 20px;
}
.blog-card:hover {
  box-shadow: 0 8px 32px rgba(13, 61, 71, .1);
  border-color: var(--teal-light);
  transform: translateY(-2px);
}
.blog-card:hover::before { background: var(--orange); }

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
}
.blog-card-date {
  font-size: .72rem;
  color: var(--gray);
  font-weight: 600;
}
.blog-card-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--teal-dark);
  line-height: 1.3;
  margin: 0;
}
.blog-card-excerpt {
  font-size: .84rem;
  color: var(--gray);
  line-height: 1.65;
  flex: 1;
}
.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-top: auto;
}
.blog-tag {
  background: var(--teal-pale);
  color: var(--teal-deep);
  border: 1px solid var(--teal-xlight);
  border-radius: 50px;
  font-size: .65rem;
  font-weight: 700;
  padding: .13rem .52rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.blog-card-arrow {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  font-weight: 800;
  color: var(--teal-mid);
  margin-top: .2rem;
  transition: color .15s, gap .15s;
}
.blog-card:hover .blog-card-arrow { color: var(--orange); gap: .55rem; }

/* ── Empty / Loading ── */
.blog-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray);
}
.blog-empty-icon { font-size: 2.5rem; margin-bottom: 1rem; opacity: .5; }
.blog-empty h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--teal-dark);
  margin-bottom: .4rem;
  font-weight: 900;
}
.blog-empty p { font-size: .86rem; line-height: 1.6; }

.blog-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  gap: 1rem;
  color: var(--gray);
  font-size: .88rem;
}
.blog-loading .spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--teal-pale);
  border-top-color: var(--teal-mid);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0;
}


/* ══════════════════════════════════════════════════════════
   ARTICLE PAGE — blog/article.html
   ══════════════════════════════════════════════════════════ */

/* Hero — same teal gradient, content left-aligned inside max-width */
.article-hero-section {
  background: linear-gradient(135deg, var(--teal-dark) 0%, var(--teal-deep) 60%, var(--teal-mid) 100%);
  padding: 3rem 2rem 3rem;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.article-hero-section::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(63, 184, 208, .06);
  pointer-events: none;
}
.article-hero-inner {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.article-back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, .65);
  text-decoration: none;
  margin-bottom: 1.25rem;
  transition: color .15s;
}
.article-back-link:hover { color: var(--orange); }

.article-hero-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .8rem;
}
.article-hero-date {
  font-size: .72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .55);
}
.article-hero-tag {
  background: rgba(245, 146, 30, .22);
  color: var(--orange-light);
  border: 1px solid rgba(245, 146, 30, .38);
  border-radius: 50px;
  font-size: .65rem;
  font-weight: 800;
  padding: .13rem .52rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.article-hero-title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.2;
  margin: 0 0 .7rem;
}
.article-hero-excerpt {
  font-size: .92rem;
  color: rgba(255, 255, 255, .7);
  line-height: 1.7;
  max-width: 640px;
}

/* All tags row below excerpt */
.article-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .85rem;
}

/* ── Article body container (white card below hero) ── */
.article-body-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}
.article-body-card {
  background: var(--white);
  border-radius: 0 0 20px 20px;
  border: 1px solid var(--teal-pale);
  border-top: none;
  padding: 2.5rem 2.5rem 2rem;
  box-shadow: 0 6px 28px rgba(13, 61, 71, .06);
}

/* Footer nav */
.article-footer-nav {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--teal-pale);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.article-back-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--teal-mid);
  text-decoration: none;
  transition: color .15s;
}
.article-back-btn:hover { color: var(--orange); }
.article-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .72rem 1.5rem;
  border-radius: 50px;
  background: linear-gradient(90deg, var(--orange), var(--orange-dark));
  color: var(--white);
  font-weight: 800;
  font-size: .88rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(245, 146, 30, .32);
  transition: all .15s;
}
.article-cta-btn:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 146, 30, .45);
}


/* ══════════════════════════════════════════════════════════
   STUDY-PROSE TYPOGRAPHY
   Applied to .study-prose on both public article page and
   the admin live-preview container.
   ══════════════════════════════════════════════════════════ */

.study-prose {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--gray-dark);
  word-break: break-word;
}

/* ── Uniform design enforcement ─────────────────────────────
   !important on typographic properties ensures that any inline
   styles still present in older AI-generated articles cannot
   override the brand colour scheme.
   ──────────────────────────────────────────────────────────── */

/* Body text: always dark-gray on white */
.study-prose p,
.study-prose li,
.study-prose dd,
.study-prose dt,
.study-prose span:not(.callout):not(.pill) {
  color: var(--gray-dark) !important;
  font-family: var(--font) !important;
  background-color: transparent !important;
}

/* Headings: always brand teal, Raleway serif */
.study-prose h1,
.study-prose h2,
.study-prose h3,
.study-prose h4,
.study-prose h5,
.study-prose h6 {
  color: var(--teal-dark) !important;
  font-family: var(--serif) !important;
  background-color: transparent !important;
}

/* Table cells */
.study-prose td,
.study-prose th {
  font-family: var(--font) !important;
  background-color: transparent !important;
}
.study-prose td { color: var(--gray-dark) !important; }
.study-prose th { color: #fff !important; }

/* Links */
.study-prose a {
  color: var(--teal-mid) !important;
  font-family: var(--font) !important;
}
.study-prose a:hover { color: var(--orange) !important; }

/* Divs used as paragraphs by some AI generators */
.study-prose div:not(.callout) {
  font-family: var(--font) !important;
  color: var(--gray-dark) !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 0 .85rem !important;
}

/* Headings */
.study-prose h1,
.study-prose h2,
.study-prose h3,
.study-prose h4,
.study-prose h5 {
  font-family: var(--serif);
  color: var(--teal-dark);
  line-height: 1.25;
  font-weight: 900;
}
.study-prose h1 { font-size: 1.7rem; margin: 2.25rem 0 1rem; }
.study-prose h2 {
  font-size: 1.35rem;
  margin: 2.25rem 0 .85rem;
  padding-bottom: .45rem;
  border-bottom: 2px solid var(--teal-pale);
}
.study-prose h3 {
  font-size: 1.08rem;
  margin: 1.75rem 0 .6rem;
  color: var(--teal-deep);
}
.study-prose h4 {
  font-size: .92rem;
  margin: 1.35rem 0 .45rem;
  color: var(--teal-mid);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.study-prose h5 { font-size: .86rem; margin: 1.1rem 0 .35rem; }
.study-prose > *:first-child { margin-top: 0; }

/* Paragraphs */
.study-prose p { margin: 0 0 1.1rem; }
.study-prose p:last-child { margin-bottom: 0; }

/* Inline */
.study-prose strong { font-weight: 800; color: var(--teal-dark); }
.study-prose em     { font-style: italic; color: var(--gray-dark); }
.study-prose a      { color: var(--teal-mid); text-decoration: underline; font-weight: 700; transition: color .15s; }
.study-prose a:hover{ color: var(--orange); }

/* Lists */
.study-prose ul,
.study-prose ol { margin: 0 0 1.1rem 1.35rem; padding: 0; }
.study-prose li { margin-bottom: .45rem; line-height: 1.7; }
.study-prose ul li::marker { color: var(--orange); }
.study-prose ol li::marker { color: var(--teal-mid); font-weight: 800; }

/* Blockquote */
.study-prose blockquote {
  margin: 1.35rem 0;
  padding: .85rem 1.25rem;
  border-left: 4px solid var(--orange);
  background: #FEF9EC;
  border-radius: 0 10px 10px 0;
  color: var(--gray-dark);
  font-style: italic;
}
.study-prose blockquote p { margin: 0; }

/* Code */
.study-prose code {
  background: var(--teal-pale);
  color: var(--teal-dark);
  border-radius: 5px;
  padding: .1rem .45rem;
  font-size: .87em;
  font-family: 'Courier New', monospace;
  font-weight: 700;
}
.study-prose pre {
  background: #0D1117;
  color: #e6edf3;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.35rem 0;
  font-size: .85rem;
  line-height: 1.6;
}
.study-prose pre code {
  background: none; color: inherit; padding: 0; border-radius: 0; font-weight: 400;
}

/* HR */
.study-prose hr {
  border: none;
  border-top: 2px solid var(--teal-pale);
  margin: 2rem 0;
}

/* Images */
.study-prose img {
  max-width: 100%; height: auto;
  border-radius: 12px; margin: 1.25rem 0; display: block;
  box-shadow: 0 4px 18px rgba(0,0,0,.1);
}

/* Tables */
.study-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .9rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(13,61,71,.07);
}
.study-prose thead { background: var(--teal-dark) !important; color: #fff !important; }
.study-prose thead th {
  padding: .75rem 1rem;
  text-align: left;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
}
.study-prose tbody tr { border-bottom: 1px solid var(--teal-pale); transition: background .12s; }
.study-prose tbody tr:nth-child(even) { background: #f9fdfe !important; }
.study-prose tbody tr:hover           { background: var(--teal-pale) !important; }
.study-prose tbody td {
  padding: .7rem 1rem;
  vertical-align: top;
  line-height: 1.55;
  color: var(--gray-dark);
}

/* Callout boxes */
.study-prose .callout {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin: 1.35rem 0;
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  font-size: .9rem;
  line-height: 1.6;
}
.study-prose .callout-info   { background: var(--teal-pale) !important; border-left: 4px solid var(--teal-mid) !important; color: var(--teal-dark) !important; }
.study-prose .callout-warn   { background: #FEF9EC !important;           border-left: 4px solid var(--orange) !important;   color: #7A3B0A !important; }
.study-prose .callout-tip    { background: #EBF6EF !important;           border-left: 4px solid var(--success) !important;  color: #1A4A2A !important; }
.study-prose .callout-danger { background: #FCEBEB !important;           border-left: 4px solid var(--danger) !important;   color: #7B1D1D !important; }
.study-prose .callout p { margin: 0; }

/* Pill badges */
.study-prose .pill {
  display: inline-flex; align-items: center;
  padding: .18rem .65rem;
  border-radius: 50px;
  font-size: .72rem; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase;
  background: var(--teal-pale) !important; color: var(--teal-deep) !important;
  margin: 0 .15rem;
}


/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */

@media (max-width: 680px) {
  .blog-hero           { padding: 3rem 1.25rem 2.5rem; }
  .blog-hero h1        { font-size: 1.7rem; }
  .blog-body           { padding: 2rem 1rem 3.5rem; }
  .blog-archive-grid   { grid-template-columns: 1fr; }

  .article-hero-section { padding: 2.25rem 1.25rem 2.25rem; }
  .article-hero-title   { font-size: 1.4rem; }
  .article-hero-excerpt { font-size: .88rem; }
  .article-body-wrap    { padding: 0 .9rem 3.5rem; }
  .article-body-card    { padding: 1.5rem 1.25rem 1.5rem; border-radius: 0 0 14px 14px; }

  .study-prose        { font-size: .95rem; }
  .study-prose h2     { font-size: 1.2rem; }
  .study-prose h3     { font-size: 1rem; }
  .study-prose table  { font-size: .8rem; }
  .study-prose thead th { padding: .6rem .75rem; }
  .study-prose tbody td { padding: .55rem .75rem; }
}
