/* ==========================================================================
   Category listings — Where to Stay, What to Do, Restaurants

   Shares the home page's palette and rhythm (assets/css/home.css): sandy
   ground, Amatic SC headings in San Pancho teal, rounded photos, open cards
   with the text sitting on the page rather than boxed in a panel.

   Namespaced under .sp- for the same reason as the home page: style.css
   redefines Bootstrap's .container as a 500%-wide flex row and gives bare
   h1/h3 a 7em/5em size with a text-shadow.
   ========================================================================== */

.sp-listing {
  --sp-teal:      #427c78;
  --sp-teal-deep: #2f5f5c;
  --sp-teal-soft: #eef4f3;
  --sp-ink:       #232c2b;
  --sp-soft:      #5f6f6c;
  --sp-line:      #e2eae8;
  --sp-sand:      #faf8f4;

  background-color: var(--sp-sand);
  color: var(--sp-ink);
  font-family: "Heebo", sans-serif;
}

.sp-listing h1,
.sp-listing h2,
.sp-listing h3,
.sp-listing h5 {
  margin: 0;
  color: inherit;
  text-shadow: none;
}

.sp-wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ----------------------------------------------------------------- head -- */

.sp-listing-head {
  padding: 72px 0 40px;
  text-align: center;
}

.sp-listing-head .sp-eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--sp-teal);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.sp-listing-head h1 {
  font-family: "Amatic SC", cursive;
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.02;
  color: var(--sp-teal);
}

.sp-listing-intro {
  max-width: 720px;
  margin: 14px auto 0;
  color: var(--sp-soft);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.sp-count {
  display: inline-block;
  margin-top: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--sp-teal-soft);
  color: var(--sp-teal);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* ----------------------------------------------------------------- grid -- */

.sp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px 28px;
  padding-bottom: 80px;
}

/* Open cards: no panel, no border. The photo carries the structure. */
.sp-place { display: flex; flex-direction: column; }

.sp-place-media {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  background: var(--sp-teal-soft);
}

.sp-place-media img {
  display: block;
  width: 100%;
  /* A fixed shape so a grid of mixed source ratios still lines up. */
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .3s ease;
}
.sp-place-media:hover img { transform: scale(1.04); }

.sp-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .93);
  color: var(--sp-teal);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sp-place h2 {
  margin-top: 16px;
  font-family: "Amatic SC", cursive;
  font-size: clamp(1.75rem, 2.6vw, 2.25rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--sp-teal);
  transition: color .16s ease;
}
.sp-place a:hover h2 { color: var(--sp-teal-deep); }
.sp-place a:hover { text-decoration: none; }

.sp-place-body {
  margin-top: 8px;
  color: var(--sp-soft);
  font-size: .9375rem;
  line-height: 1.65;
}
/* Bodies come out of the editor wrapped in their own <p>. */
.sp-place-body p { margin: 0; color: inherit; }

/* The facts strip under each entry — only the ones an entry actually has.
   margin-top:auto drops it to the foot of the card so the strips line up
   across a row whose descriptions run to different lengths. */
.sp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--sp-line);
  list-style: none;
  font-size: .875rem;
  color: var(--sp-soft);
}

.sp-meta li { display: flex; align-items: baseline; gap: 6px; }
.sp-meta .sp-meta-label {
  color: var(--sp-teal);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.sp-meta a { color: var(--sp-soft); }
.sp-meta a:hover { color: var(--sp-teal); }

/* --------------------------------------------------------------- empty -- */

.sp-empty {
  padding: 40px 0 90px;
  text-align: center;
  color: var(--sp-soft);
  font-size: 1.0625rem;
}

/* ---------------------------------------------------- pagination + more -- */

.sp-listing .pagination-links {
  padding-bottom: 40px;
  text-align: center;
}
.sp-listing .pagination-links a,
.sp-listing .pagination-links strong {
  display: inline-block;
  padding: 6px 12px;
  color: var(--sp-teal);
  font-weight: 600;
}

/* ----------------------------------------------------------- responsive -- */

@media (max-width: 980px) {
  .sp-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .sp-listing-head { padding: 52px 0 32px; }
  .sp-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .sp-place-media img { transition: none; }
  .sp-place-media:hover img { transform: none; }
}
