/* Homepage "Seasonal Spotlight" band. Scoped .vl-spot — the band renders in header.php
 * BEFORE #main opens (same spot as .svc/service-cards), so it never lands under the
 * phx `#main <el>` specificity-101 rules; no #main prefix is needed here (contrast
 * css/faq-guide.css's .vl-citrus-band, which DOES sit inside #main and needs it).
 * Container width/typography reuse the shared .wrapper + Raleway body font; colors
 * and radius/shadow reuse the --green/--orange/--radius/--shadow tokens from
 * css/responsive.css §1 (loaded first — phx-responsive is this stylesheet's dependency).
 */
.vl-spot {
  background: #fff;
  padding: 40px 0;
  border-top: 1px solid #e8e2db;
}

/* .vl-spot-grid holds 1-4 .vl-spot-card entries (vl_current_spotlights() caps at 4).
 * The single-card case (no modifier class) lays the lone card out exactly as the old
 * single-card band always did: image beside body. The 2-card case (.vl-spot-grid-2)
 * switches to a side-by-side row of two bordered panels; the 3-4-card case
 * (.vl-spot-grid-4) switches to a real 2-column CSS grid (2 rows — a 3rd card simply
 * leaves the 4th cell empty rather than stretching to fill the row, which flexbox
 * would do). Both multi-card layouts stack to a single column <=820px — see media
 * block below — and both use the same bordered-panel, image-above-body card layout
 * since there isn't width for image-beside-body once the band is split up. */
.vl-spot-grid {
  display: flex;
  align-items: stretch;
  gap: 32px;
}

.vl-spot-grid:not(.vl-spot-grid-2):not(.vl-spot-grid-4) .vl-spot-card {
  display: flex;
  align-items: center;
  gap: 32px;
  width: 100%;
}

.vl-spot-card--noimg .vl-spot-bd {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.vl-spot-card--noimg .vl-spot-cta {
  margin-left: auto;
  margin-right: auto;
}

/* 3-4 cards: a true 2-column grid, not flexbox — see the comment above the base
 * .vl-spot-grid rule for why (an odd 3rd card must NOT stretch to fill its row). */
.vl-spot-grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.vl-spot-grid-2 .vl-spot-card,
.vl-spot-grid-4 .vl-spot-card {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #fbf9f6;
  border: 1px solid #e8e2db;
  border-radius: var(--radius);
  padding: 20px;
}

.vl-spot-grid-2 .vl-spot-pic,
.vl-spot-grid-4 .vl-spot-pic {
  flex: none;
  max-width: none;
  margin-bottom: 16px;
}

.vl-spot-grid-2 .vl-spot-card--noimg .vl-spot-bd,
.vl-spot-grid-2 .vl-spot-card--noimg .vl-spot-cta,
.vl-spot-grid-4 .vl-spot-card--noimg .vl-spot-bd,
.vl-spot-grid-4 .vl-spot-card--noimg .vl-spot-cta {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  text-align: left;
}

.vl-spot-pic {
  flex: 0 0 32%;
  max-width: 340px;
}

.vl-spot-pic img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.vl-spot-bd {
  flex: 1 1 auto;
  min-width: 0;
}

.vl-spot-eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--orange);
}

.vl-spot-title {
  font-family: 'Raleway', system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.2;
  color: var(--green);
  margin: .3em 0 .5em;
}

.vl-spot-text {
  font-family: 'Raleway', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #4a463f;
  margin: 0 0 20px;
}

/* Orange pill CTA — must beat upstream a:link{color:#bb4e1a} (0,1,1), same trap
 * a.btn-pill guards against in css/responsive.css §5. */
a.vl-spot-cta,
a.vl-spot-cta:link,
a.vl-spot-cta:visited,
a.vl-spot-cta:hover,
a.vl-spot-cta:active,
a.vl-spot-cta:focus {
  color: #fff !important;
  text-decoration: none !important;
}

a.vl-spot-cta {
  display: inline-flex;
  align-items: center;
  background: var(--orange);
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 4px 14px rgba(0,0,0,.20);
  transition: background .2s, transform .15s;
}

a.vl-spot-cta:hover {
  background: #9a3d0f;
  transform: translateY(-1px);
}

/* Multi-card layouts (2-card row, 3-4-card grid) stack to a single column at <=820px
 * (per the dual/multi-card spec) — well before the single-card layout's own <=640px
 * stack below, since side-by-side panels run out of room sooner than one
 * image-beside-body row does. */
@media (max-width: 820px) {
  .vl-spot-grid-2 {
    flex-direction: column;
    gap: 20px;
  }

  .vl-spot-grid-4 {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
}

/* Single-card layout: stack vertically on phone (unchanged from the original band). */
@media (max-width: 640px) {
  .vl-spot {
    padding: 30px 0;
  }

  .vl-spot-grid:not(.vl-spot-grid-2):not(.vl-spot-grid-4) .vl-spot-card {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }

  .vl-spot-grid:not(.vl-spot-grid-2):not(.vl-spot-grid-4) .vl-spot-pic {
    flex-basis: auto;
    max-width: none;
  }

  .vl-spot-grid:not(.vl-spot-grid-2):not(.vl-spot-grid-4) .vl-spot-card--noimg .vl-spot-bd {
    max-width: none;
    margin: 0;
    text-align: left;
  }

  .vl-spot-grid:not(.vl-spot-grid-2):not(.vl-spot-grid-4) .vl-spot-card--noimg .vl-spot-cta {
    margin-left: 0;
    margin-right: 0;
  }
}
