/* =========================================
   BLOG.CSS - SELF-CONTAINED
   Merged: all styles.css rules used by the
   blog post page + blog-specific styles.
   Load this ONE file instead of both
   styles.css and blog.css.
========================================= */


/* =========================================
   BASE / TOKENS
========================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --primary: #b30000;
  --primary-light: #e5f1ff;
  --primary-dark: #730000;
  --accent: #e53935;
  --bg-light: #f5f7fb;
  --text-main: #1f2733;
  --text-muted: #6b7280;
  --border-subtle: #e2e8f0;
  --radius-lg: 1rem;
  --shadow-soft: 0 10px 30px rgba(42, 15, 15, 0.12);
  --btn-bg: #CC2127;
  --btn-bg-hover: #ff000089;
  --btn-border: rgba(255, 0, 0, 0.25);
}

html {
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background-color: #ffffff;
  scroll-behavior: smooth;
  max-width: 100vw;
  /* clip stops horizontal scroll without creating a scroll container
     that would clip absolutely-positioned children like the mobile menu */
  overflow-x: clip;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}


/* =========================================
   LAYOUT
========================================= */

.container {
  width: min(1120px, 100% - 2rem);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: clamp(1.8rem, 2.4vw, 2.3rem);
  margin: 0 0 0.5rem;
}

.section-header p {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
}


/* =========================================
   TOP BAR
========================================= */

.top-bar {
  background: var(--primary-dark);
  color: #ffffff;
  font-size: 0.9rem;
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0;
  gap: 1rem;
}

.top-bar-location {
  opacity: 0.9;
}

.top-bar-contact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.top-bar-phone-label {
  opacity: 0.75;
}

.top-bar-phone {
  font-weight: 600;
}


/* =========================================
   HEADER / NAVIGATION
========================================= */

.site-header {
  border-bottom: 1px solid var(--border-subtle);
  background: #0A99D8;
  position: sticky;
  top: 0;
  z-index: 10000;
}

/* Prevents layout shift while header.html loads via fetch */
#site-header {
  min-height: 70px;
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  padding: 0.75rem 0;
  gap: 12px;
  position: relative;
}

.header-spacer {
  min-width: 1px;
}

.logo {
  display: flex;
  align-items: center;
  line-height: 0;
}

.logo a {
  display: inline-flex;
}

.logo-image {
  height: 90px;
  width: auto;
}

.main-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  font-size: 0.95rem;
}

.main-nav > a,
.main-nav .dropdown-trigger {
  position: relative;
  padding-bottom: 0.15rem;
  font-weight: 500;
  white-space: nowrap;
}

.main-nav > a::after,
.main-nav .dropdown-trigger::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.2s ease;
}

.main-nav > a:hover::after,
.main-nav .dropdown:hover .dropdown-trigger::before {
  width: 100%;
}

.header-cta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}


/* =========================================
   DESKTOP DROPDOWN
========================================= */

.main-nav .dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.main-nav .dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.main-nav .dropdown-trigger::after {
  content: "▾";
  font-size: 0.85em;
  opacity: 0.7;
  line-height: 1;
}

.main-nav .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  padding: 8px;
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.main-nav .dropdown-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  white-space: nowrap;
}

.main-nav .dropdown-menu a:hover,
.main-nav .dropdown-menu a:focus {
  background: rgba(0, 0, 0, 0.06);
  outline: none;
}

.main-nav .dropdown:hover .dropdown-menu,
.main-nav .dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}


/* =========================================
   MOBILE HAMBURGER + MENU
========================================= */

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  color: #111;
  position: relative;
}

.nav-toggle-bar {
  position: absolute;
  left: 50%;
  width: 28px;
  height: 3px;
  background: currentColor;
  border-radius: 999px;
  margin: 0;
  transform: translateX(-50%);
  transform-origin: center;
  transition: transform 200ms ease, opacity 160ms ease;
}

.nav-toggle-bar:nth-child(1) { top: 14px; }
.nav-toggle-bar:nth-child(2) { top: 50%; transform: translateX(-50%) translateY(-50%); }
.nav-toggle-bar:nth-child(3) { bottom: 14px; }

.site-header.menu-open .nav-toggle-bar:nth-child(1) {
  top: 50%;
  transform: translateX(-50%) translateY(-50%) rotate(45deg);
}

.site-header.menu-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
  transform: translateX(-50%) translateY(-50%) scaleX(0);
}

.site-header.menu-open .nav-toggle-bar:nth-child(3) {
  top: 50%;
  bottom: auto;
  transform: translateX(-50%) translateY(-50%) rotate(-45deg);
}

.mobile-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  padding: 12px 16px;
  z-index: 9999;
  /* Keep menu within viewport */
  width: 100%;
  max-width: 100vw;
}

.mobile-menu[hidden] {
  display: none !important;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.mobile-link {
  width: 100%;
  display: block;
  padding: 12px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  color: #111;
}

.mobile-link:hover {
  background: rgba(0, 0, 0, 0.05);
}

.mobile-dropdown {
  width: 100%;
}

.mobile-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mobile-summary::-webkit-details-marker {
  display: none;
}

.mobile-summary::after {
  content: "▾";
  opacity: 0.75;
  font-size: 0.95em;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform 160ms ease;
}

.mobile-dropdown[open] .mobile-summary::after {
  transform: rotate(180deg);
}

.mobile-dropdown[open] .mobile-summary {
  opacity: 0.95;
}

.mobile-submenu {
  padding: 6px 0 10px 12px;
  display: grid;
  gap: 6px;
}

.mobile-sublink {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.04);
}

.mobile-sublink:hover {
  background: rgba(0, 0, 0, 0.07);
}


/* =========================================
   CALL BUTTON
========================================= */

.call-box {
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 180px;
  background: var(--btn-bg);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
  border: 1px solid var(--btn-border);
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
  flex-shrink: 0;
}

.call-box:hover {
  background: var(--btn-bg-hover);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16);
}

.call-box:active {
  transform: translateY(0);
}

.call-box-icon {
  width: 25px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: inherit;
}

.call-box-text {
  font-size: 1rem;
  line-height: 1;
  white-space: nowrap;
  font-weight: 700;
}


/* =========================================
   BUTTONS
========================================= */

.book-box {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  margin: 5px;
  border-radius: 180px;
  background: var(--btn-bg);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
  border: 1px solid var(--btn-border);
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--btn-border);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  background: var(--btn-bg);
  color: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease,
    color 0.12s ease, border-color 0.12s ease;
}

.btn:hover {
  background: var(--btn-bg-hover);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border-color: rgba(15, 23, 42, 0.18);
  box-shadow: none;
}

.btn-outline:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}


/* =========================================
   BOOKING MODAL
========================================= */

#book-now-btn {
  color: white;
  text-align: center;
}

.hero-card {
  background: #0A99D8;
  border-radius: 1.25rem;
  padding: 1.6rem 1.4rem;
  box-shadow: var(--shadow-soft);
  color: #ffffff;
  min-height: fit-content;
}

.booking-modal[hidden] {
  display: none;
}

.booking-modal {
  position: fixed;
  inset: 0;
  z-index: 20000;
  color: white;
}

.booking-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.booking-modal-content {
  position: relative;
  z-index: 1;
  width: min(620px, calc(100% - 2rem));
  margin: 5vh auto;
  max-height: 90vh;
  overflow-y: auto;
}

.booking-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.hero-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.4rem;
}

.hero-card p {
  margin: 0 0 1.1rem;
}

.hero-form label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.hero-form input,
.hero-form select,
.hero-form textarea {
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.6rem 0.65rem;
  border-radius: 0.6rem;
  border: 1px solid var(--border-subtle);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hero-form input:focus,
.hero-form select:focus,
.hero-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 89, 179, 0.12);
}

.hero-form textarea {
  resize: vertical;
  overflow: auto;
}

.hero-form-note {
  font-size: 0.75rem;
  margin-top: 0.4rem;
  text-align: center;
}

.hero-cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}


/* =========================================
   MOBILE STICKY ACTION BAR
========================================= */

.mobile-action-bar {
  display: none;
}


/* =========================================
   FOOTER
========================================= */

.site-footer {
  background: #020617;
  color: #e5e7eb;
  padding-top: 2.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.4);
}

.footer-column h3,
.footer-column h4 {
  margin: 0 0 0.6rem;
}

.footer-column p {
  font-size: 0.9rem;
  color: #cbd5f5;
}

.footer-column ul li {
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.footer-column a {
  color: #e5e7eb;
  opacity: 0.9;
}

.footer-column a:hover {
  opacity: 1;
}

.footer-phone,
.footer-email {
  margin: 0.4rem 0;
}

.footer-bottom {
  padding: 0.9rem 0 1.3rem;
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #9ca3af;
}


/* =========================================
   CUSTOM DROPDOWN (booking modal)
========================================= */

.custom-select {
  position: relative;
  display: block;
  font-size: 0.85rem;
}

.select-trigger {
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  border: none;
  background: #ffffff;
  color: #424242bb;
  font: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.select-arrow {
  width: 10px;
  height: 10px;
  border-right: 2px solid #555;
  border-bottom: 2px solid #555;
  transform: rotate(45deg);
}

.select-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 9999;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  border-radius: 0.75rem;
  background: #fff;
  color: #000;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  max-height: 260px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.select-menu li {
  padding: 14px 20px;
  cursor: pointer;
  font-size: 0.9rem;
}

.select-menu li:hover {
  background: #f3f3f3;
}

.custom-select.open .select-menu {
  display: block;
}

.real-select {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  height: 0;
  width: 0;
}

.custom-select.locked .select-trigger {
  opacity: 0.75;
  cursor: not-allowed;
}

.select-menu li.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.cf-turnstile {
  display: flex;
  justify-content: center;
  margin: 0.75rem auto;
}


/* =========================================
   NAV STRIP
========================================= */

.nav-strip {
  background: #cdcdcd;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.nav-strip-inner {
  padding: 0.35rem 0;
}

.nav-strip .main-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.6rem;
  font-size: 0.95rem;
}


/* =========================================
   SERVICE ACTIONS & CTA BOX
========================================= */

.service-actions,
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.cta-box {
  margin-top: 2rem;
  padding: 1.5rem 1.35rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(229, 57, 53, 0.18);
  background: rgba(229, 57, 53, 0.08);
  box-shadow: var(--shadow-soft);
  max-width: 900px;
}

.cta-box h2,
.cta-box h3 {
  margin: 0 0 0.35rem;
}

.cta-box p {
  margin: 0.35rem 0 0.9rem;
  color: var(--text-muted);
}


/* =========================================
   RESPONSIVE - shared header/footer/nav
========================================= */

@media (max-width: 900px) {
  .main-nav {
    display: none;
  }

  .header-cta {
    display: flex;
  }

  .nav-toggle {
    display: inline-block;
  }

  .nav-strip {
    display: none;
  }

  /* Mobile sticky bar */
  .mobile-action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    padding: 12px;
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-subtle);
  }

  .mobile-action-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.08);
    pointer-events: none;
  }

  .mobile-action-bar > a {
    position: relative;
  }

  .mobile-action-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 14px;
    border-radius: 16px;
    font-weight: 800;
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    color: #ffffff;
  }

  .mobile-action-btn:hover {
    background: var(--btn-bg-hover);
  }

  .mobile-action-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body {
    padding-bottom: 88px;
  }
}

@media (max-width: 768px) {
  .call-box {
    padding: 9px 10px;
    justify-content: center;
  }

  .call-box-text {
    display: none;
  }

  .book-box {
    display: none;
  }
}

@media (max-width: 720px) {
  .top-bar-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
  }

  .top-bar-contact {
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
  }

  .top-bar-phone-label,
  .top-bar-phone {
    white-space: nowrap;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .call-box {
    padding: 9px 10px;
  }

  .call-box-icon {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .call-box svg {
    width: 38px;
    height: 38px;
  }

  .call-box-text {
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1;
  }
}


/* =========================================
   BLOG - BLOG-SPECIFIC STYLES
========================================= */

/* ── Blog Index Hero ────────────────────── */

.blog-hero {
  background: linear-gradient(135deg, #0A99D8 0%, #0077aa 100%);
  color: #fff;
  padding: 3.5rem 0 2.75rem;
}

.blog-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
}

.blog-hero p {
  margin: 0;
  opacity: 0.88;
  font-size: 1.05rem;
  max-width: 600px;
}

/* ── Blog Index Grid ────────────────────── */

.blog-index {
  padding: 3rem 0 4rem;
  background: #f8fafc;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.blog-card {
  background: #fff;
  border-radius: 1rem;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  text-decoration: none;
  color: inherit;
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

.blog-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #e0f4ff, #b3e0f5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  overflow: hidden;
}

.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-body {
  padding: 1.2rem 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  line-height: 1.35;
  color: var(--text-main);
}

.blog-card-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 0.75rem;
  flex: 1;
}

.blog-card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.blog-card-read {
  font-size: 0.82rem;
  font-weight: 700;
  color: #CC2127;
  margin-top: 0.6rem;
  display: inline-block;
}

/* ── Shared Tag Pill ────────────────────── */

.blog-tag,
.blog-post-tag {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: fit-content;
}

.blog-tag {
  background: rgba(10, 153, 216, 0.1);
  color: #0077aa;
  margin-bottom: 0.6rem;
}

.blog-post-tag {
  background: rgba(10, 153, 216, 0.12);
  color: #0077aa;
  margin-bottom: 0.75rem;
}

.blog-post-tag.tag-heating {
  background: rgba(204, 33, 39, 0.1);
  color: #CC2127;
}

/* ── Blog Post Hero ─────────────────────── */

.blog-post-hero {
  background: linear-gradient(135deg, #e0f4ff, #f8fafc);
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.blog-post-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin: 0 0 0.75rem;
  max-width: 820px;
  line-height: 1.2;
  word-break: break-word;
}

.blog-post-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  align-items: center;
}

/* ── Breadcrumb ─────────────────────────── */

.blog-breadcrumb {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  word-break: break-word;
}

.blog-breadcrumb a {
  color: #0077aa;
  text-decoration: underline;
}

/* ── Post Body & Layout ─────────────────── */

.blog-body {
  padding: 2.75rem 0 3.5rem;
  background: #fff;
}

.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 3rem;
  align-items: start;
}

/* ── Post Content Typography ────────────── */

.blog-content {
  /* Prevent any child from overflowing the column */
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.blog-content h2 {
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  margin: 2rem 0 0.6rem;
  color: var(--text-main);
  line-height: 1.3;
}

.blog-content h3 {
  font-size: clamp(1rem, 2vw, 1.1rem);
  margin: 1.5rem 0 0.45rem;
  line-height: 1.35;
}

.blog-content p {
  line-height: 1.8;
  color: var(--text-main);
  margin: 0 0 1rem;
}

.blog-content ul {
  margin: 0.5rem 0 1rem 1.25rem;
  list-style: disc;
}

.blog-content ul li {
  line-height: 1.7;
  margin-bottom: 0.35rem;
  color: var(--text-main);
}

.blog-content ol {
  margin: 0.5rem 0 1rem 1.25rem;
}

.blog-content ol li {
  line-height: 1.7;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.blog-content a {
  text-underline-offset: 3px;
  overflow-wrap: break-word;
}

/* ── Callout Boxes ──────────────────────── */

.blog-tip-box {
  background: rgba(10, 153, 216, 0.08);
  border-left: 4px solid #0A99D8;
  border-radius: 0 0.75rem 0.75rem 0;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}

.blog-tip-box strong {
  color: #0077aa;
}

.blog-warning-box {
  background: rgba(204, 33, 39, 0.06);
  border-left: 4px solid #CC2127;
  border-radius: 0 0.75rem 0.75rem 0;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}

.rebate-box {
  background: rgba(34, 197, 94, 0.07);
  border-left: 4px solid #16a34a;
  border-radius: 0 0.75rem 0.75rem 0;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}

.rebate-box strong {
  color: #15803d;
}

/* ── Inline Blog Image ──────────────────── */

.blog-img {
  width: 100%;
  border-radius: 0.75rem;
  margin: 1rem 0 1.25rem;
  border: 1px solid var(--border-subtle);
}

/* ── Comparison Grid ────────────────────── */

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.compare-card {
  border-radius: 0.85rem;
  padding: 1.1rem;
  border: 1px solid var(--border-subtle);
  min-width: 0;
}

.compare-card.heat-pump {
  background: rgba(10, 153, 216, 0.06);
  border-color: rgba(10, 153, 216, 0.25);
}

.compare-card.furnace {
  background: rgba(204, 33, 39, 0.05);
  border-color: rgba(204, 33, 39, 0.2);
}

.compare-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.compare-card ul {
  margin: 0 0 0 1.1rem;
  list-style: disc;
}

.compare-card ul li {
  font-size: 0.88rem;
  margin-bottom: 0.3rem;
  line-height: 1.5;
}

/* ── Filter Table ───────────────────────── */
/*
 * The table has no wrapper div in the HTML, so we make the table
 * itself a scrollable block. min-width forces the scroll to kick
 * in before the columns get crushed.
 */

.filter-table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1rem 0 1.5rem;
  /* Subtle scroll hint on mobile */
  scrollbar-width: thin;
}

/* Re-apply table layout inside the block wrapper */
.filter-table thead,
.filter-table tbody,
.filter-table tr {
  display: table-row-group;
}

.filter-table thead {
  display: table-header-group;
}

.filter-table tr {
  display: table-row;
}

.filter-table th,
.filter-table td {
  display: table-cell;
}

.filter-table th {
  background: #0A99D8;
  color: #fff;
  padding: 0.6rem 0.8rem;
  text-align: left;
  white-space: nowrap;
}

.filter-table td {
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
  min-width: 120px;
}

.filter-table tr:nth-child(even) td {
  background: #f8fafc;
}

/* ── FAQ ────────────────────────────────── */

.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: 0.9rem;
  padding: 0.6rem 0.85rem;
  background: #fff;
  margin-top: 0.75rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 800;
  list-style: none;
  padding: 0.5rem 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.4;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "▾";
  flex-shrink: 0;
  opacity: 0.7;
  transition: transform 160ms ease;
}

.faq-item[open] summary::after {
  transform: rotate(180deg);
}

.faq-item p {
  margin: 0.75rem 0 0.35rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Author Bio ─────────────────────────── */

.author-bio {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1.25rem;
  margin-top: 2.5rem;
}

.author-bio-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0A99D8;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.author-bio-text h4 {
  margin: 0 0 0.3rem;
  font-size: 0.95rem;
  line-height: 1.35;
}

.author-bio-text p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ── Sidebar ────────────────────────────── */

.blog-sidebar {
  position: sticky;
  top: 90px;
  min-width: 0;
}

.sidebar-card {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1.3rem;
  margin-bottom: 1.25rem;
}

.sidebar-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.sidebar-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 0.85rem;
}

.sidebar-related a {
  display: block;
  font-size: 0.88rem;
  color: #CC2127;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

/* ── Review Snippet ─────────────────────── */

.review-snippet {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* =========================================
   BLOG RESPONSIVE BREAKPOINTS
========================================= */

/* Tablet: 2-col blog index grid */
@media (max-width: 960px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Tablet: collapse article + sidebar into single column */
@media (max-width: 860px) {
  .blog-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .blog-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .blog-sidebar .sidebar-card {
    margin-bottom: 0;
  }

  /* Related links card spans full width */
  .blog-sidebar .sidebar-card:last-child {
    grid-column: 1 / -1;
  }

  .compare-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile: single column everything */
@media (max-width: 600px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-post-hero {
    padding: 1.75rem 0 1.5rem;
  }

  .blog-body {
    padding: 1.75rem 0 3rem;
  }

  .blog-post-meta {
    font-size: 0.78rem;
    gap: 0.4rem 0.75rem;
  }

  /* Sidebar: single column on small mobile */
  .blog-sidebar {
    grid-template-columns: 1fr;
  }

  .blog-sidebar .sidebar-card:last-child {
    grid-column: auto;
  }

  /* Callout boxes: tighter padding */
  .blog-tip-box,
  .blog-warning-box,
  .rebate-box {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
  }

  /* CTA box */
  .cta-box {
    padding: 1.25rem 1rem;
    max-width: 100%;
  }

  /* Stack CTA buttons full-width */
  .service-actions,
  .cta-actions {
    flex-direction: column;
  }

  .service-actions .btn,
  .cta-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Author bio stacks vertically */
  .author-bio {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
  }

  .author-bio-text h4 {
    font-size: 0.9rem;
  }

  /* FAQ touch targets */
  .faq-item summary {
    font-size: 0.88rem;
  }

  /* Reduce heading margins on small screens */
  .blog-content h2 {
    margin-top: 1.5rem;
  }

  .blog-content h3 {
    margin-top: 1.25rem;
  }
}