/* =====================================================================
   blog-posts.css: BLOG POST TEMPLATE (.bp-*)
   Shared layout for blog articles published from October 2026 onward.
   Link this AFTER styles.css on every new blog post (same pattern as
   local-pages.css for the location pages).
   Every class is prefixed .bp- so it cannot collide with the older
   posts and location pages, which still define .page-hero, .article-body,
   .cta-box etc. in their own <style> blocks.

   Usage: <body class="bp-page bp-theme-teal">
   Themes set the hero/CTA gradient end colour and the accent colour:
   teal, blue, green, purple, brown, orange, red.
   ===================================================================== */
.bp-page {
  --bp-grad-end: #2d6a65;
  --bp-accent:   #5dd6d0;
}
.bp-theme-teal   { --bp-grad-end: #2d6a65; --bp-accent: #5dd6d0; }
.bp-theme-blue   { --bp-grad-end: #2d5282; --bp-accent: #8ecdf0; }
.bp-theme-green  { --bp-grad-end: #1a5c3a; --bp-accent: #5dd6a0; }
.bp-theme-purple { --bp-grad-end: #4a3f7a; --bp-accent: #c4b5fd; }
.bp-theme-brown  { --bp-grad-end: #7a4a2d; --bp-accent: #f5c99b; }
.bp-theme-orange { --bp-grad-end: #9a4d12; --bp-accent: #fdba74; }
.bp-theme-red    { --bp-grad-end: #7a2d3a; --bp-accent: #f9a8b4; }

.bp-top-anchor { position: absolute; top: 0; left: 0; width: 0; height: 0; }

/* ── Nav logo ── */
.bp-logo {
  width: 90px; height: 90px;
  margin-top: -11px; margin-bottom: -11px;
  border-radius: 50%; overflow: hidden; flex-shrink: 0;
}
.bp-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Hero ── */
.bp-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--bp-grad-end) 100%);
  padding: 4rem 0 3rem;
  text-align: center;
}
.bp-hero-badge {
  display: inline-block; background: rgba(255,255,255,0.15); color: var(--bp-accent);
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.4em 1.2em; border-radius: 50px; margin-bottom: 1.25rem;
  border: 1px solid rgba(255,255,255,0.2);
}
.bp-hero h1 {
  font-family: var(--font-display); font-size: clamp(1.8rem, 5vw, 2.8rem);
  color: #fff; line-height: 1.2; margin-bottom: 0.85rem; letter-spacing: normal;
}
.bp-hero h1 em { color: var(--bp-accent); font-style: italic; }
.bp-hero p { font-size: 1rem; color: rgba(255,255,255,0.8); max-width: 600px; margin: 0 auto; }
.bp-byline { margin-top: 1.1rem !important; font-size: 0.8rem !important; color: rgba(255,255,255,0.6) !important; font-weight: 700; }

/* ── Article body ── */
.bp-section { padding: 3.5rem 0; }
.bp-section-tight { padding-top: 0; }
.bp-body { max-width: 720px; margin: 0 auto; }
.bp-body h2 { font-family: var(--font-display); font-size: 1.55rem; color: var(--navy); margin: 2.5rem 0 0.75rem; letter-spacing: normal; }
.bp-body h3 { font-size: 1.05rem; font-weight: 900; color: var(--navy); margin: 1.75rem 0 0.5rem; }
.bp-body p { font-size: 0.95rem; color: var(--text-light); line-height: 1.75; margin-bottom: 1.1rem; }
.bp-body ul, .bp-body ol { margin: 0 0 1.35rem 0; padding-left: 1.5rem; }
.bp-body li { font-size: 0.93rem; color: var(--text-light); line-height: 1.7; margin-bottom: 0.5rem; }
.bp-body a { color: #2d7a75; font-weight: 700; text-decoration: none; }
.bp-body a:hover { text-decoration: underline; }
.bp-body strong { color: var(--navy); }
.bp-body sup a { font-size: 0.7rem; font-weight: 800; padding: 0 0.1rem; }

/* ── Featured-snippet box (answer-first summary) ── */
.bp-snippet {
  background: #f0fbfa; border: 1px solid #b2dfdb; border-radius: var(--radius);
  padding: 1.5rem 1.6rem; margin-bottom: 2.25rem;
}
.bp-snippet-label {
  display: inline-block; font-size: 0.68rem; font-weight: 900; letter-spacing: 0.1em;
  text-transform: uppercase; color: #2d7a75; margin-bottom: 0.6rem;
}
.bp-snippet p { font-size: 0.95rem; color: var(--text); line-height: 1.7; margin: 0; }

/* ── Callouts ── */
.bp-callout { border-radius: 0 var(--radius) var(--radius) 0; padding: 1.25rem 1.5rem; margin: 1.75rem 0; border-left: 4px solid; }
.bp-callout p { font-size: 0.9rem; margin: 0; line-height: 1.65; color: var(--text); }
.bp-callout-warning { background: #fff0f0; border-left-color: #e74c3c; }
.bp-callout-warning strong { color: #c0392b; }
.bp-callout-good { background: #f0fbfa; border-left-color: #3da5a0; }
.bp-callout-good strong { color: #2d7a75; }
.bp-callout-amber { background: #fffbeb; border-left-color: #f59e0b; }
.bp-callout-amber p { color: #78350f; }
.bp-callout-amber strong { color: #92400e; }

/* ── Emergency phone strip ── */
.bp-phones { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.9rem; margin: 1.5rem 0; }
.bp-phone {
  background: var(--navy); color: #fff; border-radius: var(--radius);
  padding: 1rem 1.2rem; text-decoration: none; display: block;
}
.bp-body a.bp-phone { color: #fff; }
.bp-body a.bp-phone:hover { text-decoration: none; background: var(--navy-mid); }
.bp-phone-name { display: block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bp-accent, #5dd6d0); }
.bp-phone-num { display: block; font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; }
.bp-phone-note { display: block; font-size: 0.74rem; color: rgba(255,255,255,0.65); font-weight: 600; }

/* ── Data table ── */
.bp-table-wrap { overflow-x: auto; margin: 1.75rem 0; -webkit-overflow-scrolling: touch; }
.bp-table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 0.88rem; }
.bp-table caption { caption-side: bottom; text-align: left; font-size: 0.75rem; color: var(--gray); padding-top: 0.75rem; line-height: 1.55; }
.bp-table th, .bp-table td { padding: 0.8rem 0.9rem; text-align: left; border-bottom: 1px solid #e2e8f0; vertical-align: top; }
.bp-table thead th {
  background: var(--navy); color: #fff; font-size: 0.72rem; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase; border-bottom: none;
}
.bp-table thead th:first-child { border-radius: 8px 0 0 0; }
.bp-table thead th:last-child { border-radius: 0 8px 0 0; }
.bp-table tbody tr:nth-child(even) { background: #f8fafc; }
.bp-table td:first-child { font-weight: 700; color: var(--navy); }
.bp-table .bp-hi { color: #c0392b; font-weight: 800; }
.bp-table .bp-mid { color: #b45309; font-weight: 800; }
.bp-table .bp-lo { color: #2d7a75; font-weight: 800; }

/* ── Stat / scenario cards ── */
.bp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 1.1rem; margin: 1.85rem 0; }
.bp-card { border: 2px solid #e2e8f0; border-radius: var(--radius); padding: 1.35rem 1.25rem; background: #f9fdfb; }
.bp-card-icon { font-size: 1.9rem; display: block; margin-bottom: 0.45rem; }
.bp-card h4 { font-size: 0.9rem; font-weight: 900; color: var(--navy); margin-bottom: 0.55rem; line-height: 1.35; }
.bp-big { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: #2d7a75; line-height: 1.1; margin-bottom: 0.15rem; }
.bp-big-sub { font-size: 0.78rem; color: var(--gray); font-weight: 700; margin-bottom: 0.6rem; }
.bp-card p { font-size: 0.8rem; color: var(--text-light); line-height: 1.55; margin: 0; }

/* ── Two-column split ── */
.bp-split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; margin: 1.85rem 0; }
.bp-col { border-radius: var(--radius); padding: 1.35rem 1.3rem; border: 2px solid #dfe7f1; background: #f9fdfb; }
.bp-col-alt { border-left: 4px solid var(--navy); }
.bp-col h4 { font-size: 0.92rem; font-weight: 900; color: var(--navy); margin-bottom: 0.7rem; }
.bp-col ul { margin: 0; padding-left: 1.35rem; }
.bp-col li { font-size: 0.84rem; color: var(--text-light); line-height: 1.55; margin-bottom: 0.5rem; }
@media (max-width: 600px) { .bp-split { grid-template-columns: 1fr; } }

/* ── Timeline ── */
.bp-timeline { margin: 1.85rem 0; padding: 0; list-style: none; }
.bp-body .bp-timeline { padding-left: 0; }
.bp-timeline li {
  position: relative; padding: 0 0 1.2rem 2.4rem; margin: 0;
  border-left: 2px solid #d7e3ee; font-size: 0.9rem; color: var(--text-light); line-height: 1.65;
}
.bp-timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.bp-timeline li::before {
  content: ''; position: absolute; left: -7px; top: 0.35rem;
  width: 12px; height: 12px; border-radius: 50%; background: #3da5a0; border: 2px solid #fff;
}
.bp-timeline strong { display: block; color: var(--navy); font-size: 0.88rem; margin-bottom: 0.15rem; }

/* ── Numbered checklist ── */
.bp-steps { list-style: none; counter-reset: bpstep; margin: 1.5rem 0; }
.bp-body .bp-steps { padding-left: 0; }
.bp-steps li { counter-increment: bpstep; position: relative; padding-left: 2.6rem; margin-bottom: 1rem; }
.bp-steps li::before {
  content: counter(bpstep); position: absolute; left: 0; top: 0.1rem;
  width: 28px; height: 28px; border-radius: 50%; background: var(--sky-dark); color: #fff;
  font-weight: 900; font-size: 0.82rem; display: flex; align-items: center; justify-content: center;
}

/* ── FAQ (uses global .faq-item/.faq-q/.faq-a behaviour from main.js) ── */
.bp-faq { max-width: 720px; margin: 0 auto; }

/* ── Sources ── */
.bp-sources { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid #e2e8f0; }
.bp-body .bp-sources h2 { font-size: 1.15rem; margin-top: 0; }
.bp-sources ol { padding-left: 1.3rem; }
.bp-sources li { font-size: 0.8rem; line-height: 1.55; margin-bottom: 0.4rem; color: var(--gray); }
.bp-sources li a { font-weight: 600; word-break: break-word; }
.bp-disclaimer { font-size: 0.78rem !important; color: var(--gray) !important; font-style: italic; }

/* ── Keep-reading cards ── */
.bp-more { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.bp-more-card {
  background: #f8fafc; border: 2px solid #e2e8f0; border-radius: 14px;
  padding: 1.2rem; text-decoration: none; display: block; transition: box-shadow 0.2s, transform 0.2s;
}
.bp-body a.bp-more-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); text-decoration: none; }
.bp-more-icon { font-size: 1.75rem; margin-bottom: 0.5rem; }
.bp-more-cat { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; color: #9ca3af; margin-bottom: 0.3rem; }
.bp-more-title { font-size: 0.9rem; font-weight: 800; color: var(--navy); line-height: 1.35; }

/* ── End-of-post CTA ── */
.bp-cta-section { background: var(--gray-light); padding: 3.5rem 0; }
.bp-cta {
  background: linear-gradient(135deg, var(--navy) 0%, var(--bp-grad-end) 100%); color: #fff;
  border-radius: var(--radius-lg); padding: 2.5rem 2rem; text-align: center; max-width: 640px; margin: 0 auto;
}
.bp-cta h3 { font-family: var(--font-display); font-size: 1.7rem; margin-bottom: 0.6rem; }
.bp-cta p { color: rgba(255,255,255,0.8); margin-bottom: 1.5rem; line-height: 1.65; }
.bp-cta-btn {
  display: inline-block; background: var(--bp-accent); color: var(--navy); padding: 0.85rem 2.5rem;
  border-radius: 50px; text-decoration: none; font-weight: 800; transition: all 0.3s ease;
}
.bp-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(30,58,95,0.2); }
.bp-cta-alt { display: block; margin-top: 0.9rem; font-size: 0.82rem; color: rgba(255,255,255,0.7); }
.bp-cta-alt a { color: var(--bp-accent); font-weight: 700; }

/* ── Footer (blog layout: map + 2 link columns + contact) ── */
.bp-page .footer-inner { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 2rem; }
.bp-page .footer-map { display: flex; flex-direction: column; min-width: 0; }
.bp-page .footer-map h4 { color: #a8c4e0; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.75rem; }
.bp-page .footer-map h4 a { color: #a8c4e0; }
.bp-page .footer-map-wrap { border-radius: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); flex: 1; }
.bp-map-crop { overflow: hidden; height: 260px; border-radius: 10px; position: relative; }
.bp-map-crop iframe { border: 0; margin-top: -75px; display: block; width: 100%; height: 340px; }
.bp-page .footer-map-note { font-size: 0.75rem; color: rgba(255,255,255,0.5); margin-top: 0.6rem; line-height: 1.5; }
.bp-page .footer-map-note a,
.bp-page .footer-referral a { color: #7fc8d5; font-weight: 700; }
@media (max-width: 768px) {
  .bp-page .footer-inner { grid-template-columns: 1fr 1fr; }
  .bp-page .footer-map { grid-column: 1 / -1; order: 2; }
  .bp-page .footer-contact { grid-column: 1 / -1; order: 3; }
  .bp-page .footer-links { order: 1; }
}
