/* ==========================================================================
   Latest Posts (Scrollable)
   - Centered section title with arrows on the right
   - 4-up horizontal scroller with snap
   - Cards use a 4-row grid (date | title | excerpt | link) so rows align
   - Clean clamps for titles/excerpts
   - Background tint helpers match your system
   ========================================================================== */

/* ---------- Wrapper ---------- */
.acf-latest-posts {
  padding: clamp(2.5rem, 4vw, 4rem) 0;
}
.acf-latest-posts .lp-inner {
  max-width: 1350px;
  margin-inline: auto;
  padding-inline: 1rem;
}

/* ---------- Header: title centered, arrows at right ---------- */
.lp-header {
  margin-bottom: clamp(1.1rem, 2.2vw, 1.6rem);
  position: relative;
}
.lp-header--center {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* left spacer | title | arrows */
  align-items: center;
}
.lp-header--center .lp-title {
  grid-column: 2 / 3;
  text-align: center;
  margin: 0;
  letter-spacing: .02em;
}
h4.lp-title {
  font-family:'gotham', sans-serif;
  color:#B3425A;
}
.lp-header--center .lp-arrows {
  grid-column: 3 / 4;
  justify-self: end;
  display: flex;
  gap: .5rem;
}

/* ---------- Arrows ---------- */
.lp-arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.15);
  background: #fff;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  transition: transform .2s ease, background .2s ease, opacity .2s ease;
}
.lp-arrow:hover { transform: translateY(-1px); }
.lp-arrow[disabled] { opacity: .35; cursor: default; }

/* ---------- Scroller ---------- */
.lp-viewport { overflow: hidden; }
.lp-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(340px, 25%); /* 4-up on desktop */
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-block: 2rem; /* avoids border clipping */
}
.lp-track:focus { outline: none; }

/* Scrollbar cosmetics */
.lp-track::-webkit-scrollbar { height: 10px; }
.lp-track::-webkit-scrollbar-thumb { background: rgba(0,0,0,.12); border-radius: 8px; }
.lp-track::-webkit-scrollbar-track { background: transparent; }

/* ---------- Card: 4-row grid to align content ---------- */
.lp-card {
  scroll-snap-align: start;
  position: relative;
  padding-inline: clamp(1rem, 2vw, 1.25rem);
  display: grid;
  grid-template-rows: auto auto 1fr auto; /* date | title | excerpt flex | link */
  row-gap: .5rem;
  min-height: 1px; /* prevent collapse */
}
.lp-card + .lp-card {
  border-left: 1px solid #F0B040;
  padding-left: clamp(1rem, 2vw, 1.25rem);
}

/* Date, Title, Excerpt, Link — aligned horizontally across cards */
.lp-date {
  color: #B34259;               /* brand-ish date accent */
  font-weight: 700;
  letter-spacing: .04em;
  margin: 0;
}
.lp-card-title a {
  box-shadow:none !important;
  color:#000;
}
.lp-card-title {
  margin: 0;
  font-size: clamp(1.15rem, 1.8vw, 1.25rem);
  line-height: 1.15;
  font-family:'gotham', sans-serif;
  /* keep titles tidy to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lp-card-title a { color: black !important; font-weight:500 !important; text-decoration: none; }
.lp-card-title a:hover { text-decoration: underline; text-underline-offset: .24em; color:white;}

.lp-excerpt {
  margin: 0;
  max-width: 46ch;
  /* clamp to 4 lines for clean rows */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
	margin-bottom:.1rem !important;
  overflow: hidden;
}

.lp-read { margin: .25rem 0 0 0; }
.lp-read-link {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .18em;
}

/* ---------- Responsive columns ---------- */
@media (max-width: 1100px) {
  .lp-track { grid-auto-columns: minmax(300px, 33.333%); } /* ~3-up */
}
@media (max-width: 900px) {
  .lp-track { grid-auto-columns: minmax(280px, 50%); }
  .lp-header--center .lp-arrows {
    grid-column: 4 / 4;
    justify-self: end;
    display: flex;
    gap: 1rem;
  }     /* ~2-up */
}
@media (max-width: 600px) {
  .lp-track { grid-auto-columns: minmax(280px, 85%);
    padding-block:1rem; }     /* ~1-up */
}

/* ---------- Background tint helpers (approved palette) ---------- */
.bg-white        { background: #ffffff; }
.bg-tint-ivory   { background: #fffaf0; } /* option 1 */
.bg-tint-mint    { background: #edf7f7; } /* option 2 */
.bg-tint-peach   { background: #fff0d9; } /* extras if needed */
.bg-tint-sand    { background: #f5e0b0; }
.bg-tint-seafoam { background: #d6f5eb; }
.bg-tint-teal    { background: #8ac9c2; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .lp-track { scroll-behavior: auto; }
  .lp-arrow { transition: none; }
}
