/* ════════════════════════════════════════════
   Teal Blog System — Public Styles
   Teal / Dark Green Theme
════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&family=DM+Serif+Display:ital@0;1&display=swap');

:root {
  --tbs-teal-950: #061510;
  --tbs-teal-900: #0a2218;
  --tbs-teal-800: #0f3327;
  --tbs-teal-700: #165239;
  --tbs-teal-600: #1e6b4a;
  --tbs-teal-500: #27855e;
  --tbs-teal-400: #3aa876;
  --tbs-teal-300: #6dc9a0;
  --tbs-teal-200: #b8ecd5;
  --tbs-teal-100: #e8f8f0;
  --tbs-teal-50:  #f3fbf7;
  --tbs-gold:     #c8a84b;
  --tbs-text:     #1a2e24;
  --tbs-muted:    #5a7d6a;
  --tbs-border:   #d0e8db;
  --tbs-white:    #ffffff;
  --tbs-shadow:   0 2px 16px rgba(15,51,39,.09);
  --tbs-shadow-lg: 0 8px 40px rgba(15,51,39,.14);
  --tbs-radius:   14px;
  --tbs-radius-sm: 8px;
}

/* ─── Reset within scope ──────────────────────── */
.tbs-site-wrap *,
.tbs-site-wrap *::before,
.tbs-site-wrap *::after { box-sizing: border-box; }

.tbs-site-wrap {
  font-family: 'DM Sans', sans-serif;
  color: var(--tbs-text);
  background: var(--tbs-white);
  line-height: 1.7;
}

/* ═══════════════════════════════════════════
   TITLE BAR / HERO HEADER
═══════════════════════════════════════════ */
.tbs-hero {
  background: linear-gradient(135deg, var(--tbs-teal-900) 0%, var(--tbs-teal-700) 55%, var(--tbs-teal-600) 100%);
  padding: 72px 24px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Decorative circles */
.tbs-hero::before,
.tbs-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: .08;
  background: var(--tbs-teal-300);
}
.tbs-hero::before {
  width: 420px; height: 420px;
  top: -160px; right: -80px;
}
.tbs-hero::after {
  width: 280px; height: 280px;
  bottom: -120px; left: -60px;
}

.tbs-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
}

.tbs-hero-badge {
  display: inline-block;
  background: rgba(61,168,118,.25);
  color: var(--tbs-teal-200);
  border: 1px solid rgba(61,168,118,.3);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 14px;
  margin-bottom: 18px;
}

.tbs-hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(38px, 6vw, 60px);
  font-weight: 400;
  color: var(--tbs-white);
  margin: 0 0 14px;
  line-height: 1.15;
  letter-spacing: -.01em;
}

.tbs-hero-tagline {
  font-size: 17px;
  color: var(--tbs-teal-200);
  margin: 0 0 32px;
  font-weight: 300;
  opacity: .9;
}

/* Category filter pills */
.tbs-cat-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}
.tbs-cat-pill {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(180,236,213,.3);
  color: var(--tbs-teal-200);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
  background: transparent;
}
.tbs-cat-pill:hover,
.tbs-cat-pill.active {
  background: var(--tbs-teal-500);
  border-color: var(--tbs-teal-500);
  color: #fff;
}

/* ═══════════════════════════════════════════
   BLOG GRID
═══════════════════════════════════════════ */
.tbs-blog-section {
  background: var(--tbs-teal-50);
  padding: 56px 24px;
}

.tbs-container {
  max-width: 1180px;
  margin: 0 auto;
}

.tbs-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

/* ── Card ──────────────────────────────────── */
.tbs-card {
  background: var(--tbs-white);
  border-radius: var(--tbs-radius);
  overflow: hidden;
  box-shadow: var(--tbs-shadow);
  border: 1px solid var(--tbs-border);
  display: flex;
  flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease;
}
.tbs-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tbs-shadow-lg);
}

.tbs-card-img {
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: var(--tbs-teal-800);
  position: relative;
  overflow: hidden;
}
.tbs-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10,34,24,.5) 100%);
}
.tbs-card-img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--tbs-teal-800), var(--tbs-teal-700));
}
.tbs-leaf { font-size: 40px; opacity: .4; }

.tbs-card-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.tbs-cat-badge {
  display: inline-block;
  background: var(--tbs-teal-100);
  color: var(--tbs-teal-700);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 10px;
  align-self: flex-start;
}

.tbs-card-title {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  font-weight: 400;
  margin: 0;
  line-height: 1.3;
}
.tbs-card-title a {
  color: var(--tbs-teal-900);
  text-decoration: none;
  transition: color .18s;
}
.tbs-card-title a:hover { color: var(--tbs-teal-600); }

.tbs-card-excerpt {
  font-size: 14px;
  color: var(--tbs-muted);
  margin: 0;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.tbs-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tbs-date {
  font-size: 12px;
  color: var(--tbs-muted);
  font-weight: 500;
}

.tbs-read-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--tbs-teal-600);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  margin-top: auto;
  transition: gap .18s, color .18s;
}
.tbs-read-more:hover {
  color: var(--tbs-teal-400);
  gap: 9px;
}

.tbs-no-posts {
  grid-column: 1/-1;
  text-align: center;
  color: var(--tbs-muted);
  font-size: 16px;
  padding: 60px;
}

/* ═══════════════════════════════════════════
   SINGLE POST
═══════════════════════════════════════════ */
.tbs-single-wrap {
  font-family: 'DM Sans', sans-serif;
  color: var(--tbs-text);
}

/* Post Hero */
.tbs-post-hero {
  background: linear-gradient(135deg, var(--tbs-teal-900) 0%, var(--tbs-teal-700) 100%);
  padding: 64px 24px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.tbs-post-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .18;
  filter: blur(4px);
  transform: scale(1.05);
}
.tbs-post-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}
.tbs-post-hero .tbs-cat-badge {
  background: rgba(61,168,118,.2);
  color: var(--tbs-teal-200);
  margin-bottom: 16px;
}
.tbs-post-hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(30px, 5vw, 50px);
  color: var(--tbs-white);
  margin: 0 0 16px;
  font-weight: 400;
  line-height: 1.2;
}
.tbs-post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 13px;
  color: var(--tbs-teal-200);
}
.tbs-post-meta-sep { opacity: .4; }

/* Featured Image */
.tbs-post-featured-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

/* Post Content */
.tbs-post-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 52px 24px 80px;
}

.tbs-post-content {
  font-size: 17px;
  line-height: 1.85;
  color: var(--tbs-text);
}
.tbs-post-content h1,
.tbs-post-content h2,
.tbs-post-content h3,
.tbs-post-content h4 {
  font-family: 'DM Serif Display', serif;
  color: var(--tbs-teal-900);
  margin-top: 1.6em;
  margin-bottom: .5em;
  font-weight: 400;
  line-height: 1.25;
}
.tbs-post-content h1 { font-size: 2.1em; }
.tbs-post-content h2 { font-size: 1.6em; }
.tbs-post-content h3 { font-size: 1.3em; }
.tbs-post-content h4 { font-size: 1.05em; font-weight: 600; }
.tbs-post-content p { margin: 0 0 1.1em; }
.tbs-post-content ul,
.tbs-post-content ol { padding-left: 1.5em; margin-bottom: 1.1em; }
.tbs-post-content li { margin-bottom: .4em; }
.tbs-post-content ul li::marker { color: var(--tbs-teal-500); }
.tbs-post-content ol li::marker { color: var(--tbs-teal-500); font-weight: 600; }
.tbs-post-content a { color: var(--tbs-teal-600); font-weight: 500; }
.tbs-post-content a:hover { color: var(--tbs-teal-400); }
.tbs-post-content blockquote {
  border-left: 4px solid var(--tbs-teal-400);
  margin: 1.8em 0;
  padding: 18px 24px;
  background: var(--tbs-teal-50);
  border-radius: 0 var(--tbs-radius-sm) var(--tbs-radius-sm) 0;
  font-style: italic;
  font-size: 1.05em;
  color: var(--tbs-teal-800);
}
.tbs-post-content hr {
  border: none;
  border-top: 2px solid var(--tbs-border);
  margin: 2.5em 0;
}
.tbs-post-content img {
  max-width: 100%;
  border-radius: var(--tbs-radius-sm);
  margin: 1em 0;
  box-shadow: var(--tbs-shadow);
}
.tbs-post-content code {
  background: var(--tbs-teal-100);
  color: var(--tbs-teal-800);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: .9em;
  font-family: 'Roboto Mono', monospace;
}
.tbs-post-content pre {
  background: var(--tbs-teal-900);
  color: var(--tbs-teal-200);
  padding: 20px 24px;
  border-radius: var(--tbs-radius-sm);
  overflow-x: auto;
  font-family: 'Roboto Mono', monospace;
  font-size: .9em;
  line-height: 1.6;
  margin: 1.5em 0;
}

/* Back link */
.tbs-back-to-blog {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--tbs-teal-600);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 36px;
  padding: 8px 16px;
  border: 1.5px solid var(--tbs-border);
  border-radius: 20px;
  background: var(--tbs-teal-50);
  transition: all .18s;
}
.tbs-back-to-blog:hover {
  background: var(--tbs-teal-100);
  border-color: var(--tbs-teal-300);
  color: var(--tbs-teal-700);
}

/* ── Related Posts ─────────────────────────── */
.tbs-related {
  background: var(--tbs-teal-900);
  padding: 52px 24px;
}
.tbs-related-inner {
  max-width: 1180px;
  margin: 0 auto;
}
.tbs-related h2 {
  font-family: 'DM Serif Display', serif;
  color: var(--tbs-teal-200);
  font-size: 26px;
  font-weight: 400;
  margin: 0 0 28px;
}
.tbs-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.tbs-related-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(180,236,213,.12);
  border-radius: var(--tbs-radius);
  padding: 20px 22px;
  text-decoration: none;
  transition: background .2s, transform .2s;
  display: block;
}
.tbs-related-card:hover {
  background: rgba(255,255,255,.1);
  transform: translateY(-3px);
}
.tbs-related-card h3 {
  font-family: 'DM Serif Display', serif;
  color: var(--tbs-white);
  font-size: 16px;
  font-weight: 400;
  margin: 0 0 8px;
  line-height: 1.35;
}
.tbs-related-card span {
  font-size: 12px;
  color: var(--tbs-teal-300);
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 640px) {
  .tbs-hero { padding: 48px 16px 40px; }
  .tbs-blog-grid { grid-template-columns: 1fr; }
  .tbs-post-body { padding: 36px 16px 60px; }
  .tbs-post-content { font-size: 16px; }
}
