/* Down Sea Charters: the species section on the trip pages (Figma: Inshore 186:2 / 188:56, Deep Sea 210:51 / 213:39).
   One component for every trip page: season chart, one profile per species, optional "more fish" list, rules line.
   The booking card sits beside it on desktop and sticks while this section scrolls (the card's own styles are in trip.css).
   Markup comes from tools/species/build.mjs; after that the page file is the master. */

.sp { padding-block: 96px 120px; }
.sp__grid { display: grid; grid-template-columns: minmax(0, 780px) 380px; justify-content: space-between; gap: 60px; align-items: start; }
.sp__main > .trip-eyebrow { margin-bottom: 10px; }
.sp__h2 { font-size: clamp(40px, 3.89vw, 56px); line-height: .92; }

/* ---------- season chart ---------- */
.sp-chart { margin-top: 28px; padding: 28px; background: var(--dark); }
.sp-chart__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; }
.sp-legend { display: flex; gap: 20px; font-size: 14px; line-height: 20px; }
.sp-legend li { display: flex; align-items: center; gap: 8px; }
.sp-legend li::before { content: ""; flex: none; width: 14px; height: 14px; background: var(--accent); }
.sp-legend .is-g::before { background: rgba(255, 255, 255, .35); }
.sp-legend .is-s::before { background: rgba(255, 255, 255, .1); }
/* A real table, so the months and species are read out with each cell. The 2px column gaps come from
   border-spacing (pulled back at the two outer edges); the 12px row gaps are see-through top borders. */
.sp-chart table { width: calc(100% + 4px); margin: 28px -2px 0; border-collapse: separate; border-spacing: 2px 0; table-layout: fixed; }
.sp-chart col.sp-chart__label { width: 20.3%; }
.sp-chart thead th { padding: 0; font: 500 12px/17px var(--body); letter-spacing: .14em; text-transform: uppercase; text-align: left; }
.sp-chart abbr { text-decoration: none; }
.sp-chart tbody th, .sp-chart tbody td { height: 40px; padding: 0; border-top: 12px solid transparent; background-clip: padding-box; }
.sp-chart tbody th { font: 800 22px/1 var(--display); letter-spacing: .01em; text-transform: uppercase; text-align: left; vertical-align: middle; white-space: nowrap; }
.sp-chart td.is-p { background-color: var(--accent); }
.sp-chart td.is-g { background-color: rgba(255, 255, 255, .35); }
.sp-chart td.is-s { background-color: rgba(255, 255, 255, .1); }
.sp-chart__note { margin-top: 28px; font-size: 14px; line-height: 1.65; color: rgba(255, 255, 255, .7); }

/* ---------- species profiles ---------- */
.sp-fish { padding-block: 36px 40px; border-top: 1px solid rgba(255, 255, 255, .15); }
.sp-chart + .sp-fish { margin-top: 56px; }
.sp-fish__top { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 32px; align-items: start; }
.sp-fish__photo { aspect-ratio: 320 / 240; overflow: hidden; }
.sp--tall .sp-fish__photo { aspect-ratio: 320 / 400; }
.sp-fish__photo img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }
.sp-fish__photo--todo { display: grid; place-items: center; padding: 16px; background: var(--dark); text-align: center; font-size: 16px; line-height: 1.65; color: rgba(255, 255, 255, .7); }
.sp-fish__name { font-size: 36px; line-height: 1; }
.sp-fish__copy p { margin-top: 12px; font-size: 17px; line-height: 1.65; }
.sp-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 28px; }
.sp-facts dt { font: 500 12px/17px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.sp-facts dd { margin-top: 8px; font-size: 15px; line-height: 1.45; }

/* ---------- more fish (Deep Sea) ---------- */
.sp-more__title { padding-top: 36px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: 36px; line-height: .95; }
.sp-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; margin-block: 20px 40px; }
.sp-more h4 { margin: 0; font-size: 22px; line-height: .95; }
.sp-more p { margin-top: 6px; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .85); }

.sp-rules { padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: 15px; line-height: 1.65; color: rgba(255, 255, 255, .8); }
.sp-rules a { color: #fff; }
.sp-after { margin-top: 20px; font-size: 16px; line-height: 1.45; }

/* ---------- 1024 to 1279: the card column is narrower, so photos shrink and the facts go two by two ---------- */
@media (min-width: 1024px) and (max-width: 1279px) {
  .sp__grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; }
  .sp-fish__top { grid-template-columns: 220px minmax(0, 1fr); gap: 24px; }
  .sp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-chart { padding: 24px 20px; }
  .sp-chart tbody th { font-size: 19px; }
  .sp-chart thead th { font-size: 11px; letter-spacing: .08em; }
}

/* ---------- tablet: no card beside it (trip.js moves the card under the FAQ) ---------- */
@media (max-width: 1023px) {
  .sp { padding-block: 96px; }
  .sp__grid { display: block; }
  .sp__main { max-width: 780px; margin-inline: auto; }
}

/* ---------- phone ---------- */
@media (max-width: 767px) {
  .sp { padding-block: 56px; }
  .page-trip--inshore .sp { padding-block: 48px 32px; }
  .sp__main > .trip-eyebrow { margin-bottom: 10px; }
  .page-trip--inshore .sp__main > .trip-eyebrow { margin-bottom: 8px; }
  .sp__h2 { font-size: 40px; }

  .sp-chart { margin-top: 16px; padding: 18px 16px; }
  .page-trip--inshore .sp-chart { margin-top: 18px; }
  .sp-chart__head { display: block; }
  .sp-legend { gap: 16px; margin-top: 10px; font-size: 13px; line-height: 19px; }
  .sp-legend li { gap: 6px; }
  .sp-legend li::before { width: 12px; height: 12px; }
  .sp-chart table { margin-top: 22px; }
  .sp-chart col.sp-chart__label { width: 22.7%; }
  .sp-chart thead th { font-size: 10px; line-height: 14px; color: rgba(255, 255, 255, .6); }
  .sp-m { display: none; }                         /* months show as initials: J F M ... */
  .sp-chart tbody th, .sp-chart tbody td { height: 32px; border-top-width: 10px; }
  .sp-chart tbody th { font-size: 18px; }
  .sp-chart__note { margin-top: 22px; font-size: 12px; }

  .sp-fish { padding-block: 28px 32px; }
  .sp-chart + .sp-fish { margin-top: 36px; }
  .sp-fish__top { display: block; }
  .sp-fish__photo { aspect-ratio: 358 / 240; }
  .sp--tall .sp-fish__photo { aspect-ratio: 342 / 420; }
  .sp-fish__photo img { object-position: var(--pos-phone, var(--pos, 50% 50%)); }
  .sp-fish__name { margin-top: 16px; font-size: 30px; }
  .sp-fish__copy p { margin-top: 8px; font-size: 16px; }
  .sp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
  .sp-facts dt { font-size: 11px; line-height: 16px; }
  .sp-facts dd { margin-top: 6px; font-size: 14px; }

  .sp-more__title { padding-top: 32px; font-size: 30px; }
  .sp-more { display: block; margin-block: 20px 0; }
  .sp-more li { padding: 14px 0 18px; border-top: 1px solid rgba(255, 255, 255, .15); }
  .sp-rules { padding-top: 20px; font-size: 14px; line-height: 1.45; }
  .sp--tall .sp-rules { font-size: 15px; line-height: 1.65; }
  .sp-after { margin-top: 14px; font-size: 14px; }
}
