/* ==========================================================================
   Blog section — Plumbing Advice & Local Service Guides
   ========================================================================== */

.blog-section {
  --blog-navy: #00274e;
  --blog-ink: #040a10;
  --blog-yellow: #fab72a;
  /* Figma section: 1920x1121; first card 338x500 at top 385 / left 240
     (4 x 338 cards across the 1440 content width, ~29px gaps) */
  --blog-h: 1121px;
  --blog-card-w: 338px;
  --blog-card-h: 500px;
  --blog-row-w: 1440px;
  background: #fff;
  min-height: var(--blog-h);
  padding: 78px 0 0;
}

.blog-section__title {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 0 16px;
  text-align: center;
  font-family: 'Gilroy-ExtraBoldItalic', var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: 54px;
  line-height: 72px;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--blog-navy);
}

.blog-section__title-line {
  display: block;
}

.blog-section__lead {
  /* lead ends at 78+144+16+56 = 294; cards start at 385 per Figma */
  margin: 0 0 91px;
  text-align: center;
  font-family: 'Gilroy-Medium', var(--font);
  font-weight: 400;
  font-size: 18px;
  line-height: 28px;
  letter-spacing: 0;
  color: var(--blog-ink);
}

/* -------------------------------- Carousel -------------------------------- */

.blog-section__carousel {
  position: relative;
  max-width: var(--blog-row-w);
  margin: 0 auto;
}

.blog-section__grid {
  display: grid;
  grid-template-columns: repeat(4, var(--blog-card-w));
  justify-content: space-between;
  gap: calc((var(--blog-row-w) - 4 * var(--blog-card-w)) / 3);
}

.blog-section__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: transform .15s;
}

.blog-section__nav:hover {
  transform: translateY(-50%) scale(1.06);
}

.blog-section__nav svg {
  width: 18px;
  height: 18px;
}

.blog-section__nav--prev {
  left: -62px;
  background: rgba(246, 166, 35, .45);
  color: #fff;
}

.blog-section__nav--next {
  right: -62px;
  background: var(--blog-yellow);
  color: #fff;
}

/* ---------------------------------- Cards ---------------------------------- */

.blog-section__card {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: var(--blog-card-w);
  height: var(--blog-card-h);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(11, 27, 52, .12);
  opacity: 1;
}

.blog-section__card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-section__card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 27, 52, 0) 40%, rgba(11, 27, 52, .9) 100%);
}

.blog-section__body {
  position: relative;
  z-index: 2;
  padding: 20px 18px 22px;
  color: #fff;
}

.blog-section__tag {
  display: block;
  margin-bottom: 8px;
  font-family: 'Gilroy-Medium', var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0;
  color: #fff;
}

.blog-section__card-title {
  margin: 0 0 14px;
  font-family: 'Gilroy-SemiBold', var(--font);
  font-weight: 400;
  font-size: 20px;
  line-height: 30px;
  letter-spacing: 0;
  color: #fff;
}

.blog-section__read {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.blog-section__read-label {
  font-family: 'Gilroy-Medium', var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 26px;
  letter-spacing: 0;
  color: var(--blog-yellow);
  text-decoration: underline;
  text-decoration-style: solid;
  text-decoration-skip-ink: auto;
}

.blog-section__read-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.blog-section__read-ico svg {
  width: 20px;
  height: 20px;
}

/* ------------------------------ View All button ----------------------------- */

.blog-section__more {
  /* cards end at 885 (385+500); button centered in the remaining band of the
     1121px-tall section */
  margin-top: 90px;
  padding-bottom: 96px;
  text-align: center;
}

.blog-section__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 50px;
  background: var(--blog-yellow);
  color: var(--blog-navy);
  font-family: var(--display);
  font-weight: 800;
  font-size: .95rem;
  box-shadow: 0 4px 14px rgba(246, 166, 35, .35);
  transition: background .15s;
}

.blog-section__btn:hover {
  background: #e8920a;
}

.blog-section__btn-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--blog-navy);
  color: var(--blog-navy);
}

.blog-section__btn-ico svg {
  width: 12px;
  height: 12px;
}

/* ------------------------------- Responsive ------------------------------- */

@media (max-width: 1560px) {
  .blog-section__nav--prev { left: 8px; }
  .blog-section__nav--next { right: 8px; }
}

@media (max-width: 1480px) {
  .blog-section__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }

  .blog-section__card {
    width: auto;
  }
}

@media (max-width: 1024px) {
  .blog-section {
    min-height: 0;
  }

  .blog-section__title {
    font-size: clamp(1.5rem, 4vw, 2.4rem);
    line-height: 1.25;
  }

  .blog-section__lead {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 40px;
  }

  .blog-section__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-section__card {
    height: 420px;
  }

  .blog-section__more {
    margin-top: 44px;
    padding-bottom: 64px;
  }
}

@media (max-width: 560px) {
  .blog-section {
    padding: 52px 0 0;
  }

  .blog-section__grid {
    grid-template-columns: 1fr;
  }

  .blog-section__card {
    height: 380px;
  }
}
