/* ==========================================================
   Blog posts — Buena Park Auto Glass

   Loaded after homepage.css, which stays the source of truth for
   the theme tokens (--hp-*), header, footer and the shared blocks
   (.hero-section, .section-head, .quote-form, .cta-call-btn).
   Only the blog-specific rules live here: the article hero, the
   prose cards the post body re-flows into, and the contact band.
   ========================================================== */

/* ==========================================================
   In-content address is hidden on blog pages
   ==========================================================
   Only the address inside a post's own "Get in Touch" block is
   hidden — it stays in the markup, so this is reversible. The
   FOOTER address is deliberately left visible: the footer is the
   one place the business address is meant to appear. */
body.blog-page .blog-address {
  display: none !important;
}

/* ==========================================================
   Article hero — post title + opening copy + quote form
   ========================================================== */
#hero.blog-hero {
  padding-top: 9.5rem !important;
  padding-bottom: 6.5rem !important;
}

#hero.blog-hero .hero-content h1 {
  /* Post titles run longer than the marketing H1s the hero was
     built for — ease the tracking so they stay readable. */
  font-size: clamp(1.75rem, 1rem + 1.8vw, 2.5rem);
  letter-spacing: -0.6px;
}

#hero.blog-hero .blog-hero-lead {
  font-size: 1.06rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.15rem;
}

#hero.blog-hero .blog-hero-lead:last-of-type {
  margin-bottom: 1.9rem;
}

#hero.blog-hero .blog-hero-lead a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(var(--primary-color-rgb), 0.7);
  text-underline-offset: 3px;
  transition: color 0.25s ease;
}

#hero.blog-hero .blog-hero-lead a:hover {
  color: var(--hp-accent);
}

.blog-hero-form {
  position: relative;
  z-index: 2;
}

/* ==========================================================
   Post body
   ========================================================== */
.blog-body-section {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 5rem;
  background:
    radial-gradient(65% 45% at 100% 0%, rgba(79, 195, 240, 0.07) 0%, rgba(79, 195, 240, 0) 60%),
    linear-gradient(180deg, #ffffff 0%, var(--hp-light-bg) 100%);
}

.blog-body-section + .blog-body-section {
  padding-top: 0;
  background: var(--hp-light-bg);
}

.blog-wrap {
  max-width: 60rem;
  margin: 0 auto;
}

/* Each H2 of the post becomes its own card, so a long run of
   headings reads as distinct steps rather than one grey column. */
.blog-card {
  position: relative;
  padding: 2.1rem 2.25rem 1.85rem;
  margin-bottom: 1.5rem;
  border-radius: var(--hp-radius-lg);
  background: #ffffff;
  border: 1px solid rgba(8, 11, 18, 0.07);
  box-shadow: var(--hp-shadow-sm);
  transition: transform 0.32s ease, box-shadow 0.32s ease, border-color 0.32s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--primary-color-rgb), 0.22);
  box-shadow: 0 26px 50px rgba(8, 11, 18, 0.1);
}

.blog-card:last-child {
  margin-bottom: 0;
}

.blog-card h2 {
  font-size: clamp(1.3rem, 1.05rem + 0.7vw, 1.65rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.4px;
  color: var(--hp-lead-strong);
  margin-bottom: 1.1rem;
}

/* Accent rule above each post heading, echoing .section-rule */
.blog-card h2::before {
  content: "";
  display: block;
  width: 54px;
  height: 4px;
  border-radius: 4px;
  margin-bottom: 1.1rem;
  background: linear-gradient(90deg, var(--hp-accent) 0%, var(--hp-ice) 100%);
  box-shadow: 0 0 18px rgba(var(--primary-color-rgb), 0.4);
}

.blog-prose p {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--hp-slate);
  margin-bottom: 1.1rem;
}

.blog-prose p:last-child {
  margin-bottom: 0;
}

/* The post writes its sub-points as "<strong>Label:</strong> text" —
   lift the label so each point is scannable without touching copy. */
.blog-prose p > strong:first-child {
  color: var(--hp-lead-strong);
  font-weight: 700;
}

.blog-prose a {
  color: var(--hp-accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(var(--primary-color-rgb), 0.35);
  text-underline-offset: 3px;
  transition: color 0.25s ease, text-decoration-color 0.25s ease;
}

.blog-prose a:hover {
  color: var(--hp-accent-deep);
  text-decoration-color: currentColor;
}

/* "Tip:" paragraphs get a tinted callout — a class on the existing
   <p>, no wording changed. */
.blog-prose p.blog-tip {
  position: relative;
  margin-top: 1.35rem;
  padding: 1rem 1.25rem 1rem 1.5rem;
  border-radius: var(--hp-radius);
  background: linear-gradient(180deg, rgba(var(--primary-color-rgb), 0.05) 0%, rgba(79, 195, 240, 0.05) 100%);
  border: 1px solid rgba(var(--primary-color-rgb), 0.16);
  color: var(--hp-graphite);
  overflow: hidden;
}

.blog-prose p.blog-tip::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--hp-accent) 0%, var(--hp-ice) 100%);
}

.blog-prose ul,
.blog-prose ol {
  margin: 0 0 1.1rem;
  padding-left: 1.35rem;
  color: var(--hp-slate);
}

.blog-prose li {
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 0.5rem;
}

.blog-prose li::marker {
  color: var(--hp-accent);
  font-weight: 700;
}

/* Base heading for any H3 a post uses inside its prose */
.blog-prose h3 {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.2px;
  color: var(--hp-lead-strong);
  margin-bottom: 0.7rem;
}

/* ==========================================================
   Q&A block
   ==========================================================
   A run of numbered question/answer pairs reads as an undifferentiated
   column of text in plain prose. Each pair gets its own tinted panel so
   the questions are scannable, with the number promoted to a gradient
   badge. Answers stay visible — collapsing them would hide copy from
   readers and crawlers alike. */
.blog-faq {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.6rem;
}

.blog-faq-item {
  position: relative;
  overflow: hidden;
  padding: 1.35rem 1.5rem 1.25rem;
  border-radius: var(--hp-radius);
  background: linear-gradient(180deg, #ffffff 0%, var(--hp-light-bg) 100%);
  border: 1px solid rgba(8, 11, 18, 0.08);
  box-shadow: var(--hp-shadow-sm);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

/* Accent rail down the left edge, matching .cta-strap */
.blog-faq-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--hp-accent) 0%, var(--hp-accent-deep) 55%, var(--hp-ice) 100%);
  opacity: 0.55;
  transition: opacity 0.28s ease;
}

.blog-faq-item:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--primary-color-rgb), 0.28);
  box-shadow: 0 18px 36px rgba(8, 11, 18, 0.1);
}

.blog-faq-item:hover::before {
  opacity: 1;
}

/* Question: number badge sits beside the text rather than inline with
   it, so multi-line questions stay aligned under themselves. */
.blog-prose .blog-faq-q {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 1.04rem;
  line-height: 1.5;
  color: var(--hp-lead-strong);
  margin-bottom: 0.65rem;
}

.blog-prose .blog-faq-q .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: linear-gradient(140deg, var(--hp-accent) 0%, var(--hp-accent-deep) 100%);
  box-shadow: 0 8px 18px rgba(var(--primary-color-rgb), 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Answer lines up with the question text, clear of the badge */
.blog-prose .blog-faq-a {
  margin: 0;
  padding-left: calc(30px + 0.75rem);
  font-size: 0.98rem;
  line-height: 1.8;
  color: var(--hp-slate);
}

/* Closing paragraph sits apart from the panels it summarises */
.blog-prose .blog-faq-outro {
  margin-bottom: 0;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(8, 11, 18, 0.08);
}

/* Post illustration: same glass frame idiom as the homepage hero */
.blog-figure {
  margin: 0;
  padding: 8px;
  border-radius: var(--hp-radius-lg);
  background: linear-gradient(150deg, rgba(8, 11, 18, 0.06) 0%, rgba(8, 11, 18, 0.02) 60%, rgba(var(--primary-color-rgb), 0.07) 100%);
  border: 1px solid rgba(8, 11, 18, 0.07);
  box-shadow: var(--hp-shadow);
}

.blog-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

/* ==========================================================
   Illustrated cards
   ==========================================================
   These used to be a 7/5 column split. The prose always ran far
   taller than the image, so the image column ended in a deep well
   of empty space. Floating the figure lets the copy wrap it and
   then reclaim the full width underneath — no dead column. */
.blog-card-figure {
  /* contains the float, so the card still wraps its full height */
  display: flow-root;
}

@media (min-width: 992px) {
  .blog-figure-float {
    float: right;
    width: 38%;
    margin: 0.35rem 0 1.35rem 1.85rem;
  }
}

/* Below the breakpoint the float would squeeze the copy into a
   narrow gutter — let the image span the column instead. */
@media (max-width: 991px) {
  .blog-figure-float {
    float: none;
    width: 100%;
    margin: 0 0 1.5rem 0;
  }
}

/* Phone CTA that closes the article body */
.blog-cta-row {
  display: flex;
  justify-content: center;
  margin-top: 2.25rem;
}

/* ==========================================================
   Get in Touch band
   ========================================================== */
.blog-contact-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 5.5rem 0 6rem;
  color: #fff;
  background:
    radial-gradient(110% 85% at 50% 0%, rgba(var(--primary-color-rgb), 0.22) 0%, rgba(var(--primary-color-rgb), 0) 58%),
    radial-gradient(80% 70% at 8% 95%, rgba(79, 195, 240, 0.14) 0%, rgba(79, 195, 240, 0) 62%),
    linear-gradient(160deg, var(--hp-ink-3) 0%, var(--hp-ink-2) 45%, var(--hp-ink) 100%);
}

.blog-contact-section .container {
  position: relative;
  z-index: 1;
}

.blog-contact-card {
  padding: 2rem 2.1rem;
  border-radius: var(--hp-radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0.028) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.blog-contact-card h4 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #ffffff;
}

.blog-contact-card p {
  font-size: 0.97rem;
  line-height: 2.1;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0;
}

.blog-contact-card p strong {
  display: inline-block;
  min-width: 8.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.blog-contact-card a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  transition: color 0.25s ease, border-color 0.25s ease;
}

.blog-contact-card a:hover {
  color: var(--hp-accent);
  border-color: rgba(var(--primary-color-rgb), 0.6);
}

/* ==========================================================
   Mobile responsiveness
   ========================================================== */
@media (max-width: 991px) {
  #hero.blog-hero {
    padding-top: 9rem !important;
    padding-bottom: 5.5rem !important;
  }

  .blog-body-section {
    padding: 3.5rem 0 4rem;
  }

  .blog-card {
    padding: 1.75rem 1.6rem 1.5rem;
  }

  .blog-figure {
    margin-top: 1.5rem;
  }
}

@media (max-width: 767px) {
  #hero.blog-hero {
    padding-bottom: 4.5rem !important;
    text-align: left;
  }

  /* The shared hero centres its text on phones; a post title and its
     opening paragraphs read better ranged left. */
  #hero.blog-hero .hero-content h1::before {
    margin-left: 0;
  }

  #hero.blog-hero .blog-hero-lead {
    margin-left: 0;
    margin-right: 0;
  }

  .blog-card {
    padding: 1.5rem 1.25rem 1.35rem;
    border-radius: var(--hp-radius);
  }

  .blog-prose p,
  .blog-prose li {
    font-size: 0.97rem;
  }

  .blog-faq-item {
    padding: 1.15rem 1.15rem 1.05rem;
  }

  .blog-prose .blog-faq-q {
    font-size: 0.99rem;
    gap: 0.6rem;
  }

  .blog-prose .blog-faq-q .num {
    width: 26px;
    height: 26px;
    font-size: 0.78rem;
  }

  /* The badge indent costs too much width on a phone — let the answer
     run the full column instead. */
  .blog-prose .blog-faq-a {
    padding-left: 0;
  }

  .blog-contact-section {
    padding: 3.5rem 0 4rem;
  }

  .blog-contact-card {
    padding: 1.5rem 1.35rem;
  }

  /* Stacked, the fixed label column strands the values on their own
     line — let each label sit tight against its value instead. */
  .blog-contact-card p strong {
    display: block;
    min-width: 0;
    margin-top: 0.6rem;
  }

  .blog-cta-row {
    margin-top: 1.75rem;
  }

  .blog-cta-row .btn-hero-cta {
    width: 100%;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-card,
  .blog-prose a,
  .blog-contact-card a {
    transition: none;
  }
}
