/* ============================================================
   BLOGS-PAGE.CSS
   Styles specific to blogs.html — Banner · Articles Grid · Pagination
   ============================================================ */


/* ─────────────────────────────────────────────────────────────
   PAGE-LEVEL HEADER OVERRIDE
   Same pattern as Services / About / Case Study:
   sticky at top, all corners rounded at page top,
   flatten top corners while scrolling (JS adds .is-stuck).
   ───────────────────────────────────────────────────────────── */
body.page--blogs .site-header.is-scrolled {
  position: sticky;
  top: 0;
  animation: none;
  border-radius: var(--radius-md); /* all 4 corners at page top */
}

body.page--blogs .site-header.is-scrolled.is-stuck {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}


/* ─────────────────────────────────────────────────────────────
   PAGE WRAPPER
   ───────────────────────────────────────────────────────────── */
.blogs-page {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 32px 0 0; /* top gap below sticky header; no horizontal — handled by page-wrapper */
}


/* ─────────────────────────────────────────────────────────────
   1. BLOGS BANNER
   Figma node 3535-9239
   Dark card (via mix-blend multiply over white bg),
   honeycomb texture overlay, "Blogs" 60px white heading
   ───────────────────────────────────────────────────────────── */
.blogs-banner {
  position: relative;
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  min-height: 360px;
  display: flex;
  align-items: center;
  padding: 100px 60px 100px 100px;
}

/* Texture overlay — multiply blend turns the dark image into the bg */
.blogs-banner__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.blogs-banner__bg img {
  position: absolute;
  width: 104.44%;
  height: 109.09%;
  left: -1.76%;
  top: 0;
  max-width: none;
  object-fit: cover;
}

.blogs-banner__heading {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: var(--fw-regular);
  font-size: 60px;
  line-height: 70px;
  letter-spacing: -1.6px;
  color: #ffffff;
  margin: 0;
}


/* ─────────────────────────────────────────────────────────────
   2. ARTICLES SECTION
   Figma node 3535-10483
   3 rows of 3 blog cards, 40px gap between rows and between cards
   ───────────────────────────────────────────────────────────── */
.blogs-articles {
  margin-top: 40px;
}

.blogs-articles__inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 0 24px; /* matches Figma row px-[24px] */
}

.blogs-articles__row {
  display: flex;
  gap: 40px;
  align-items: stretch;
}


/* ─────────────────────────────────────────────────────────────
   BLOG CARD
   Fixed height 613px with absolute-positioned internals to
   exactly match the Figma card layout.
   ───────────────────────────────────────────────────────────── */
.blog-card {
  position: relative;
  background: #ffffff;
  border-radius: 25px;
  overflow: hidden;
  height: 613px;
  flex: 1 0 0;
  min-width: 0;
}

/* Border sits on top of overflow (preserves border-radius) */
.blog-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid #e0e0e0;
  border-radius: 25px;
  pointer-events: none;
  z-index: 3;
}

/* ── Card Image ── */
.blog-card__img {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 314px;
  overflow: hidden;
  border-radius: 25px 25px 0 0;
  display: block;
  text-decoration: none;
}

.blog-card__img img {
  position: absolute;
  top: -2.5%;
  left: -2.5%;
  width: 105%;
  height: 105%;
  max-width: none;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card__img:hover img {
  transform: scale(1.04);
}

/* ── Meta badge wrapper — clips the box-shadow notch ── */
/* Matches Figma: div.post-meta-items-wrapper (overflow:clip, pr:20px) */
.blog-card__meta-wrap {
  position: absolute;
  top: 272px;
  left: 0;
  overflow: hidden;
  padding-right: 20px; /* reserves space for the concave notch */
  display: flex;
  align-items: flex-end;
  z-index: 2;
}

/* Concave corner notch — transparent element with rounded bottom-left.
   The white box-shadow fills downward; overflow:hidden on the wrapper
   clips it to only show within the badge area. Exact Figma technique. */
.blog-card__meta-wrap::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 20px;
  height: 40px;
  background: transparent;
  border-bottom-left-radius: 20px;
  box-shadow: 0 20px 0 0 #ffffff;
  pointer-events: none;
}

/* ── Meta badge (date / author) — white pill with rounded top corners ── */
/* Matches Figma: div.post-meta-items */
.blog-card__meta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 10px 24px 3px;
  background: #ffffff;
  border-radius: 25px 25px 0 0;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: #9b9b9b;
  line-height: 30px;
  white-space: nowrap;
  flex-shrink: 0;
}

.blog-card__meta .blog-card__sep {
  color: #9b9b9b;
}

/* ── Title ── */
.blog-card__title {
  position: absolute;
  top: 365px;
  left: 40px;
  right: 35px;
  z-index: 1;
  margin: 0;
}

.blog-card__title a {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 400;
  color: #111111;
  text-decoration: underline;
  text-decoration-color: #111111;
  letter-spacing: -0.75px;
  line-height: 35px;
  display: block;
}

.blog-card__title a:hover {
  color: #f14f44;
  text-decoration-color: #f14f44;
}

/* ── Categories ── */
.blog-card__cats {
  position: absolute;
  top: 491px;
  left: 40px;
  right: 31px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: #9b9b9b;
  line-height: 30px;
  z-index: 1;
}


/* ─────────────────────────────────────────────────────────────
   3. PAGINATION
   Figma node bottom of 3535-10483
   Page 1: red filled circle
   Page 2 + Next: gradient border (red → blue) via background-clip trick
   ───────────────────────────────────────────────────────────── */
.blogs-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 50px 0 60px;
}

.blogs-pagination__item {
  min-width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: #333333;
  line-height: 47px;
  padding: 0 22px;
  text-decoration: none;
  position: relative;
  cursor: pointer;
  user-select: none;
}

/* Page 1 — solid red fill */
.blogs-pagination__item--active {
  background: #f14f44;
  color: #ffffff;
  border: 1px solid transparent;
}

/* Page 2 + Next — gradient border via ::before pseudo-element */
.blogs-pagination__item--border {
  background: #ffffff;
  border: none;
  z-index: 0;
}

/* Gradient ring sits 1px behind the white background */
.blogs-pagination__item--border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 9999px;
  background: linear-gradient(262deg, rgb(226, 76, 74) 14.51%, rgb(56, 107, 183) 95.96%);
  z-index: -1;
}

/* White fill on top — 1px inset reveals the gradient ring */
.blogs-pagination__item--border::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: #ffffff;
  z-index: -1;
}

.blogs-pagination__item--border:hover::after {
  background: #fef5f5;
}

/* "Next" button — extra left padding for arrow icon */
.blogs-pagination__item--next {
  padding-left: 44px;
  padding-right: 31px;
  gap: 0;
}

.blogs-pagination__arrow {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 9px;
  display: block;
  flex-shrink: 0;
}


/* ─────────────────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .blogs-articles__row {
    gap: 24px;
  }

  .blog-card {
    height: 560px;
  }

  .blog-card__title {
    top: 330px;
  }

  .blog-card__cats {
    top: 450px;
  }
}

@media (max-width: 767px) {
  .blogs-banner {
    padding: 60px 32px;
    min-height: 260px;
  }

  .blogs-banner__heading {
    font-size: 40px;
    line-height: 48px;
  }

  .blogs-articles__inner {
    padding: 0 12px;
    gap: 24px;
  }

  .blogs-articles__row {
    flex-direction: column;
    gap: 24px;
  }

  .blog-card {
    height: auto;
    min-height: 540px;
  }

  .blog-card__img {
    height: 260px;
  }

  .blog-card__meta-wrap {
    top: 218px;
  }

  .blog-card__title {
    top: 302px;
  }

  .blog-card__cats {
    top: 420px;
    bottom: 24px;
  }
}
