/* ==========================================================================
   Blog cards — home carousel + /blog grid (BUILD-001)
   Typography inherits the site body font (var(--font-body), Nunito Sans);
   nothing here renders in monospace/Courier.
   ========================================================================== */

/* Launch flag: hide the /blog nav item (desktop + mobile) until ready.
   Pairs with .our-blog-section.is-hidden in header-footer-trim.css. */
.header-navigations-item-wrapper.is-hidden,
.mobile-link-wrapper.is-hidden {
  display: none !important;
}

/* ---------- section eyebrow + admin-managed icon ---------- */
.our-blog-section .blog-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.our-blog-section .section-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--primary-color, currentColor);
  flex: 0 0 auto;
}
.our-blog-section .section-title-icon svg {
  width: 20px;
  height: 20px;
}
/* No icon set → don't reserve the gap */
.our-blog-section .section-title-icon:empty {
  display: none;
}

/* ---------- card ---------- */
.blog-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  height: 100%;
  text-align: left;
}

.blog-card__thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #eef1f6;
  overflow: hidden;
}
.blog-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-card__thumb--empty {
  display: flex;
  align-items: flex-end;
}

.blog-card__category {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: #f88e24;
  color: #fff;
  font-family: var(--font-ui, 'Nunito Sans', sans-serif);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.blog-card__content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 18px;
  flex: 1;
}

.blog-card__date {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-color-muted, #6b7280);
  font-family: var(--font-ui, 'Nunito Sans', sans-serif);
  font-size: 13px;
}

.blog-card__title {
  font-family: var(--font-heading, 'Baloo 2', cursive);
  color: var(--text-color-heading, #1a1a1a);
  font-size: 20px;
  line-height: 1.25;
  margin: 0;
}

/* Body — brand body font, never monospace, even for pasted code */
.blog-card__body,
.blog-card__body p,
.blog-card__body li,
.blog-card__body h3,
.blog-card__body h4,
.blog-card__body h5,
.blog-card__body h6,
.blog-card__body a,
.blog-card__body strong,
.blog-card__body em,
.blog-card__body code {
  font-family: var(--font-body, 'Nunito Sans', sans-serif) !important;
  color: var(--text-color-body, #333);
}
.blog-card__body {
  font-size: 15px;
  line-height: 1.6;
}
.blog-card__body p { margin: 0 0 8px; }
.blog-card__body ul,
.blog-card__body ol { margin: 0 0 8px; padding-left: 20px; }
.blog-card__body a { color: #5271ff; text-decoration: underline; }
.blog-card__body code { background: rgba(0, 0, 0, 0.05); padding: 1px 4px; border-radius: 4px; }

/* Clamp + Read more */
.blog-card__body--clamped {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card__more {
  align-self: flex-start;
  margin-top: auto;
  background: none;
  border: none;
  padding: 6px 0 0;
  color: #f88e24;
  font-family: var(--font-ui, 'Nunito Sans', sans-serif);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.blog-card__more:hover { text-decoration: underline; }

/* ---------- carousel (home) ---------- */
.blog-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}
.blog-carousel__viewport {
  flex: 1;
  overflow: hidden;
}
.blog-carousel__page {
  display: grid;
  gap: 24px;
  will-change: transform, opacity;
}

.blog-carousel__chevron {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #f88e24;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.blog-carousel__chevron:hover { transform: scale(1.08); }
.blog-carousel__chevron:active { transform: scale(0.96); }

/* ---------- grid (/blog) ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 8px;
}
.blog-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-color-muted, #6b7280);
  font-family: var(--font-body, 'Nunito Sans', sans-serif);
  padding: 48px 0;
}

/* ---------- narrow: 1-up, vertical (up/down) chevrons ---------- */
@media (max-width: 991px) {
  .blog-carousel {
    flex-direction: column;
  }
  .blog-carousel__viewport { width: 100%; order: 2; }
  /* prev chevron above, next chevron below → up/down navigation */
  .blog-carousel__chevron--prev { order: 1; }
  .blog-carousel__chevron--next { order: 3; }
  .blog-carousel__chevron { transform: rotate(90deg); }
  .blog-carousel__chevron:hover { transform: rotate(90deg) scale(1.08); }

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