/* ===== BLOG POST STYLES ===== */
/* Matches Baldwin Builders dark theme: --teal #128C99, --tan rgb(228,221,189), --black #070A0C */

:root {
  --teal: #128C99;
  --teal-deep: #0B5F68;
  --teal-soft: rgba(18, 140, 153, 0.18);
  --tan: rgb(228, 221, 189);
  --tan-soft: rgba(228, 221, 189, 0.18);
  --black: #070A0C;
  --charcoal: #0D1216;
  --panel: #10171C;
  --radius: 18px;
  --font-sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* --- Breadcrumb --- */
.breadcrumb {
  padding: clamp(120px, 12vw, 160px) clamp(16px, 3vw, 40px) 0;
  max-width: 880px;
  margin: 0 auto;
}
.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}
.breadcrumb li + li::before {
  content: "/";
  margin-right: 6px;
  color: rgba(255, 255, 255, 0.2);
}
.breadcrumb a {
  color: var(--teal);
  text-decoration: none;
  transition: color 0.2s ease;
}
.breadcrumb a:hover {
  color: var(--tan);
}
.breadcrumb li[aria-current="page"] {
  color: rgba(255, 255, 255, 0.6);
}

/* --- Article Wrapper --- */
.blog-post {
  background: var(--black);
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-sans);
}

/* --- Post Header --- */
.blog-post__header {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(32px, 4vw, 52px) clamp(16px, 3vw, 40px) clamp(24px, 3vw, 36px);
}
.blog-post__meta {
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  margin: 0 0 16px;
  letter-spacing: 0.02em;
}
.blog-post__meta strong {
  color: var(--teal);
  font-weight: 600;
}
.blog-post__meta time {
  color: rgba(255, 255, 255, 0.55);
}
.blog-post__header h1 {
  color: var(--tan);
  font-size: clamp(28px, 3.8vw, 48px);
  font-weight: 300;
  font-style: italic;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0 0 20px;
}
.blog-post__intro {
  color: rgba(255, 255, 255, 0.6);
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.75;
  margin: 0;
  max-width: 70ch;
  border-left: 3px solid var(--teal);
  padding-left: 20px;
}

/* --- Post Body --- */
.blog-post__body {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 40px) clamp(56px, 6vw, 80px);
}
.blog-post__body section {
  margin-bottom: clamp(36px, 4vw, 52px);
}
.blog-post__body h2 {
  color: rgba(228, 221, 189, 0.95);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 16px;
  padding-top: 8px;
  border-top: 1px solid rgba(18, 140, 153, 0.2);
}
.blog-post__body h3 {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 24px 0 10px;
}
.blog-post__body p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
  line-height: 1.78;
  margin: 0 0 16px;
  max-width: 70ch;
}
.blog-post__body a {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-color: rgba(18, 140, 153, 0.35);
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.blog-post__body a:hover {
  color: var(--tan);
  text-decoration-color: rgba(228, 221, 189, 0.4);
}
.blog-post__body ul,
.blog-post__body ol {
  color: rgba(255, 255, 255, 0.58);
  font-size: 15px;
  line-height: 1.75;
  margin: 0 0 16px;
  padding-left: 24px;
  max-width: 70ch;
}
.blog-post__body li {
  margin-bottom: 6px;
}
.blog-post__body li strong {
  color: rgba(255, 255, 255, 0.8);
}

/* --- Tables --- */
.blog-post__body section {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.blog-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
  min-width: 480px;
}
.blog-table thead {
  border-bottom: 2px solid rgba(18, 140, 153, 0.5);
}
.blog-table th {
  color: var(--tan);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  padding: 10px 14px;
  background: rgba(18, 140, 153, 0.06);
}
.blog-table td {
  color: rgba(255, 255, 255, 0.6);
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.blog-table tbody tr:hover {
  background: rgba(18, 140, 153, 0.04);
}

/* --- FAQ Section (in blog posts) --- */
.faq-section {
  background: rgba(16, 23, 28, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: clamp(24px, 3vw, 36px);
  margin-top: clamp(32px, 4vw, 48px);
}
.faq-section h2 {
  border-top: none;
  padding-top: 0;
  margin-bottom: 24px;
}
.faq-section h3 {
  color: rgba(255, 255, 255, 0.92);
  font-size: 16px;
  font-weight: 650;
  margin: 20px 0 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.faq-section h3:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
.faq-section p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  line-height: 1.75;
  margin: 0 0 4px;
}

/* --- Blog CTA --- */
.blog-cta {
  background: linear-gradient(135deg, rgba(18, 140, 153, 0.08), rgba(228, 221, 189, 0.04));
  border: 1px solid rgba(18, 140, 153, 0.2);
  border-radius: 14px;
  padding: clamp(28px, 3.5vw, 44px);
  text-align: center;
  margin-top: clamp(32px, 4vw, 48px);
}
.blog-cta h2 {
  border-top: none;
  padding-top: 0;
  text-align: center;
}
.blog-cta p {
  max-width: 55ch;
  margin: 0 auto;
  text-align: center;
}
.blog-cta a {
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
}
.blog-cta a:hover {
  color: var(--tan);
  text-decoration: underline;
  text-decoration-color: rgba(228, 221, 189, 0.4);
  text-underline-offset: 3px;
}

/* --- Author Bio --- */
.author-bio {
  background: rgba(16, 23, 28, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin: clamp(32px, 4vw, 48px) 0;
  padding: clamp(20px, 2.5vw, 28px);
}
.author-bio p:first-child {
  color: rgba(228, 221, 189, 0.95);
  font-weight: 600;
  margin: 0 0 8px;
  font-size: 15px;
}
.author-bio p:last-child {
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}
.author-bio a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 500;
}
.author-bio a:hover {
  color: var(--tan);
}

/* --- Blog Listing Cards (for resources page) --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.blog-card {
  background: linear-gradient(180deg, rgba(16, 23, 28, 0.92), rgba(13, 18, 22, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.22s ease, border-color 0.22s ease;
}
.blog-card:hover {
  border-color: rgba(18, 140, 153, 0.22);
  transform: translateY(-4px);
}
.blog-card__body {
  padding: clamp(20px, 2.5vw, 28px);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card__tag {
  background: rgba(18, 140, 153, 0.12);
  border: 1px solid rgba(18, 140, 153, 0.25);
  border-radius: 999px;
  color: var(--teal);
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  padding: 4px 10px;
  text-transform: uppercase;
  width: fit-content;
  margin-bottom: 12px;
}
.blog-card__title {
  color: rgba(228, 221, 189, 0.95);
  font-size: clamp(17px, 1.6vw, 20px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0 0 10px;
}
.blog-card__desc {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13.5px;
  line-height: 1.65;
  margin: 0 0 16px;
  flex: 1;
}
.blog-card__link {
  align-items: center;
  color: var(--teal);
  display: inline-flex;
  font-size: 13px;
  font-weight: 600;
  gap: 6px;
  letter-spacing: 0.02em;
  margin-top: auto;
}
.blog-card__link svg {
  transition: transform 0.2s ease;
}
.blog-card:hover .blog-card__link svg {
  transform: translateX(3px);
}
.blog-card__date {
  color: rgba(255, 255, 255, 0.35);
  font-size: 12px;
  margin-top: 10px;
}

/* --- Comparison table (used in some posts) --- */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
  min-width: 480px;
}
.comparison-table th {
  color: var(--tan);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  padding: 10px 14px;
  background: rgba(18, 140, 153, 0.06);
  border-bottom: 2px solid rgba(18, 140, 153, 0.5);
}
.comparison-table td {
  color: rgba(255, 255, 255, 0.6);
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.comparison-table tbody tr:hover {
  background: rgba(18, 140, 153, 0.04);
}

/* --- Related Articles --- */
.related-articles {
  border-top: 1px solid rgba(18, 140, 153, 0.2);
  padding-top: clamp(24px, 3vw, 36px);
  margin-top: clamp(32px, 4vw, 48px);
}
.related-articles h2 {
  border-top: none;
  padding-top: 0;
  font-size: clamp(18px, 1.8vw, 22px);
  margin-bottom: 14px;
}
.related-articles ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.related-articles li {
  margin: 0;
}
.related-articles a {
  color: var(--teal);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(18, 140, 153, 0.05);
  border: 1px solid rgba(18, 140, 153, 0.12);
  border-radius: 10px;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.related-articles a:hover {
  background: rgba(18, 140, 153, 0.1);
  border-color: rgba(18, 140, 153, 0.3);
}

/* --- Responsive --- */
@media (max-width: 980px) {
  .blog-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .blog-table,
  .comparison-table {
    font-size: 13px;
  }
  .blog-table th,
  .blog-table td,
  .comparison-table th,
  .comparison-table td {
    padding: 8px 10px;
  }
  .blog-post__intro {
    padding-left: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .blog-card {
    transition: none;
  }
  .blog-card:hover {
    transform: none;
  }
  .blog-card__link svg {
    transition: none;
  }
}