/* =========================================================
   BLOG.CSS — Blog carousel (scroll-snap cards + edge fades)
   ========================================================= */

.blog {
  padding: clamp(2.75rem, 5vw, 4rem) 0;
}

/* Head stays aligned with the site's main content container */
.blog-head {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header row: title left */
.blog-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.blog-top .section-head {
  align-items: flex-start;
  text-align: left;
  margin-bottom: 0;
}

.blog-nav {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
}

.blog-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: var(--border-1);
  border-radius: 50%;
  background: var(--surface);
  color: var(--navy);
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), opacity 0.2s var(--ease);
}

.blog-btn:hover:not(:disabled) {
  transform: translate(-2px, -2px);
  background: var(--navy);
  color: #fff;
  box-shadow: 4px 4px 0 rgba(105, 159, 71, 0.6);
}

.blog-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.blog-btn [data-lucide] {
  width: 18px;
  height: 18px;
}

/* Full-bleed viewport: spans the whole browser width and clips its
   own overflow; the track scrolls underneath it. A very subtle ~20px
   fade sits ONLY at the actual screen edges — cards stay fully
   opaque across the whole main-content area. */
.blog-bleed {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 20px, #000 calc(100% - 20px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 20px, #000 calc(100% - 20px), transparent);
  padding: 0.5rem 0 1.25rem; /* room for hover shadows */
  margin: -0.5rem 0 -1.25rem;
}

.blog-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  /* Align the first card with the site's main container left edge */
  scroll-padding-inline: calc(max((100% - var(--container)) / 2, 0px) + 1.5rem);
  padding-inline: calc(max((100% - var(--container)) / 2, 0px) + 1.5rem);
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* old Edge */
}

.blog-track::-webkit-scrollbar {
  display: none;                  /* Chrome/Safari */
}

/* ---- Card ---- */
.blog-card {
  flex: 0 0 min(360px, 82vw);
  scroll-snap-align: start;
  background: var(--surface);
  border: var(--border-1);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.blog-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 rgba(105, 159, 71, 0.45);
}

.blog-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: var(--border-1);
  background: linear-gradient(135deg, var(--green-light), var(--navy-light));
  display: grid;
  place-items: center;
}

.blog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease);
}

.blog-card:hover .blog-thumb img {
  transform: scale(1.05);
}

.blog-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 0.3rem 0.7rem;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--navy));
  border: 2px solid var(--navy);
  border-radius: 999px;
}

.blog-thumb-icon [data-lucide] {
  width: 40px;
  height: 40px;
  color: rgba(255, 255, 255, 0.85);
}

.blog-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 1.1rem 1.2rem 1.3rem;
  flex: 1;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
}

.blog-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--green);
}

.blog-title {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.blog-excerpt {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-soft);
}

.blog-link {
  margin-top: auto;
  padding-top: 0.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--green-dark);
}

.blog-link [data-lucide] {
  width: 14px;
  height: 14px;
  transition: transform 0.2s var(--ease);
}

.blog-link:hover [data-lucide] {
  transform: translateX(3px);
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .blog-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .blog-card {
    flex-basis: min(300px, 85vw);
  }
}
