/* "Squeeze" photo carousel: a row of photos where the open one widens and the
   others narrow into slats. Shared across any page that has a `[data-fst]`
   block — loaded site-wide from partials/head.php / partials/script.php so
   it works wherever it's used without per-page wiring.
   Behaviour: assets/js/field-stories.js. */

.fst-controls { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 16px; }
.fst-arrow {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; border-radius: 8px; background: #1D3215; color: #6ABE52;
  cursor: pointer; transition: opacity 0.2s;
}
.fst-arrow:hover { opacity: 0.85; }
.fst-arrow:focus-visible { outline: 2px solid #1D3215; outline-offset: 2px; }

.fst-strip {
  position: relative; height: clamp(320px, 42vw, 540px); overflow: hidden;
  border-radius: 12px; background: #1D3215; outline: none;
}
.fst-strip:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1D3215; }

.fst-card {
  position: absolute; top: 0; height: 100%; padding: 0; border: 0; overflow: hidden;
  background: #1D3215; cursor: pointer;
  transition: left 1s cubic-bezier(0.16, 1, 0.3, 1), width 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.fst-card:focus-visible { outline: 2px solid #6ABE52; outline-offset: 2px; }
/* The photo is drawn at a fixed 16:9 width (set in JS) and centred, so it keeps one scale as the panel narrows. */
.fst-img {
  position: absolute; top: 0; left: 50%; height: 100%; max-width: none;
  transform: translateX(-50%); object-fit: cover; pointer-events: none;
}
.fst-label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 64px 24px 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
  color: #fff; font-family: var(--dm-sans-font); font-size: 15px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0;
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.fst-card.is-open .fst-label { opacity: 1; }

.fst-copy { display: grid; margin-top: 24px; }
.fst-copy-item {
  grid-area: 1 / 1; display: flex; flex-direction: column; gap: 16px;
  opacity: 0; visibility: hidden;
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), visibility 1s;
}
.fst-copy-item.is-open { opacity: 1; visibility: visible; }
.fst-text {
  max-width: 46rem; margin: 0; font-family: var(--dm-sans-font);
  font-size: 16px; line-height: 1.6; color: #6D4C41;
}
.fst-text-title { color: #1D3215; font-weight: 600; }
.fst-btn {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px; border-radius: 999px; background: #6ABE52; color: #1D3215;
  font-family: var(--dm-sans-font); font-size: 15px; font-weight: 700;
  text-decoration: none; white-space: nowrap; transition: opacity 0.2s;
}
.fst-btn:hover { opacity: 0.9; color: #1D3215; }
.fst-btn:focus-visible { outline: 2px solid #1D3215; outline-offset: 2px; }

@media (min-width: 992px) {
  .fst-copy-item { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 40px; }
}

/* One photo only: it fills the row and there is nothing to move between. */
.fst.is-single .fst-controls { display: none; }
.fst.is-single .fst-card { position: relative; width: 100% !important; left: 0 !important; }
.fst.is-single .fst-img { width: 100% !important; }
.fst.is-single .fst-card .fst-label { opacity: 1; }

/* Used when the carousel sits inside an already-framed, already-clipped box
   (e.g. the News page hero's rounded photo frame) and should fill it exactly,
   with its own controls tucked into a corner instead of sitting above it. */
.fst-fill { position: relative; height: 100%; }
.fst-fill .fst-strip { height: 100%; border-radius: 0; }
.fst-fill .fst-controls {
  position: absolute; right: 20px; bottom: 20px; z-index: 4; margin-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
  .fst-card, .fst-label, .fst-copy-item { transition: none !important; }
}
