/* ===========================================
   MY TOBAGO GUIDE - Directory Page Styles
   =========================================== */

/* --- Hero --- */
.guide-hero {
  position: relative;
  min-height: 45vh;
  min-height: 45dvh; /* dvh excludes mobile browser chrome — prevents iOS Safari jump */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, var(--green-deep) 0%, #0a2e15 40%, #132e1a 70%, #1a3520 100%);
  padding: 9rem var(--space-md) 4rem;
  overflow: hidden;
}

/* Dark tint + decorative radials — sits above the video, below content.
   No pointer-events: none here so this layer intercepts mouse events,
   preventing YouTube hover UI from ever activating. */
.guide-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 30% 60%, rgba(26, 74, 46, 0.3) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 30%, rgba(212, 160, 48, 0.06) 0%, transparent 50%),
    linear-gradient(rgba(13, 31, 18, 0.72), rgba(9, 22, 14, 0.8));
}

/* YouTube background video (desktop) */
.guide-hero-video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.guide-hero-video-bg.video-ready {
  opacity: 1;
}

.guide-hero-video-bg video {
  position: absolute;
  top: 50%;
  left: 50%;
  /* Cover formula for 16:9 video:
     - Wide containers: width wins (100%), height = 56.25vw fills proportionally.
     - Tall containers: height wins (100%), width = 177.78vh fills proportionally.
     max() picks whichever is larger so the video always covers without gaps. */
  width: max(100%, 177.78vh);
  height: max(56.25vw, 100%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.guide-hero .container {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.guide-hero-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

.guide-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.guide-hero-description {
  font-size: 1.15rem;
  color: rgba(232, 228, 220, 0.75);
  line-height: 1.8;
  max-width: 550px;
  margin: 0 auto;
  text-wrap: balance;
}

/* --- Mobile Search Trigger (inside hero, hidden on desktop) --- */
.guide-search-mobile-trigger {
  display: none;
}

/* --- Search Tray Backdrop (mobile only, off by default) --- */
.guide-tray-backdrop {
  display: none;
}

body.guide-tray-open .guide-tray-backdrop {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 499;
  animation: guide-backdrop-in 0.25s ease forwards;
}

body.guide-tray-closing .guide-tray-backdrop {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 499;
  animation: guide-backdrop-out 0.28s ease forwards;
}

/* --- Tray Header (handle + title + close — hidden on desktop) --- */
.guide-tray-header {
  display: none;
}

/* --- Tray animations --- */
@keyframes guide-tray-slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

@keyframes guide-tray-slide-down {
  from { transform: translateY(0); }
  to   { transform: translateY(100%); }
}

@keyframes guide-backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes guide-backdrop-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* --- Search Bar Wrapper (floats out of hero) --- */
.guide-search-bar-wrapper {
  position: relative;
  z-index: 10;
  margin-top: -2.5rem;
  padding-bottom: 0;
}

/* --- Search Form Card --- */
.guide-search-form {
  position: relative;
  display: flex;
  align-items: center;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.12);
  border: 1px solid rgba(26, 74, 46, 0.08);
}

/* --- Search Fields --- */
.guide-search-field {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  padding: 0 1.25rem;
  height: 64px;
}

.guide-search-field--keyword {
  flex: 2;
  gap: 0.75rem;
}

.guide-search-field-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.guide-search-field input,
.guide-search-field select {
  width: 100%;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-dark);
  background: transparent;
  cursor: pointer;
}

.guide-search-field input::placeholder { color: transparent; } /* label replaces placeholder */
.guide-search-field select { color: transparent; appearance: none; -webkit-appearance: none; }
.guide-search-field select:focus,
.guide-search-field input:focus { color: var(--text-dark); }
.guide-search-field.has-value select,
.guide-search-field.has-value input { color: var(--text-dark); }

/* --- Floating label wrapper --- */
.guide-field-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.guide-field-label {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-muted);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  transition: top 0.2s ease, transform 0.2s ease, font-size 0.2s ease, color 0.2s ease, font-weight 0.2s ease;
}

/* Float label up on focus or when field has a value */
.guide-search-field:focus-within .guide-field-label,
.guide-search-field.has-value .guide-field-label {
  top: 11px;
  transform: translateY(0);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.04em;
}

/* Push input/select down to sit below the floated label */
.guide-search-field:focus-within input,
.guide-search-field.has-value input,
.guide-search-field:focus-within select,
.guide-search-field.has-value select {
  padding-top: 14px;
}

/* Subtle background tint on the active field */
.guide-search-field:focus-within {
  background: rgba(212, 160, 48, 0.025);
  border-radius: 12px;
}

/* --- Divider --- */
.guide-search-divider {
  width: 1px;
  height: 36px;
  background: rgba(26, 74, 46, 0.12);
  flex-shrink: 0;
}

/* --- Search Button --- */
.guide-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: var(--green-deep);
  border: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.65rem 1.5rem;
  margin-right: 1.25rem;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity var(--transition);
  flex-shrink: 0;

  &:hover { opacity: 0.9; }
}

/* --- Search hint tooltip (shown when Search is clicked with no filters active) --- */
.guide-search-hint {
  position: absolute;
  top: calc(100% + 10px);
  right: 1.25rem;
  background: var(--green-deep);
  color: var(--cream);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(212, 160, 48, 0.3);
  white-space: nowrap;
  pointer-events: none;
  z-index: 20;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.guide-search-hint::before {
  content: '';
  position: absolute;
  bottom: 100%;
  right: 2.2rem;
  border: 5px solid transparent;
  border-bottom-color: rgba(212, 160, 48, 0.3);
}

.guide-search-hint::after {
  content: '';
  position: absolute;
  bottom: calc(100% - 1px);
  right: 2.2rem;
  border: 5px solid transparent;
  border-bottom-color: var(--green-deep);
}

.guide-search-hint.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Browse by Category Section --- */
.guide-browse {
  background: var(--warm-white);
  padding: 6rem 0 1rem;
}

/* --- Category Cards Grid --- */
.guide-cat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.guide-cat-card {
  background: white;
  border-radius: 16px;
  padding: 4rem 1.5rem;
  border: 1px solid rgba(26, 74, 46, 0.08);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  text-align: center;

  &:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(26, 74, 46, 0.1);
  }

  &.is-active {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px var(--gold-glow), 0 12px 32px rgba(26, 74, 46, 0.1);

    .guide-cat-card-count {
      background: linear-gradient(135deg, var(--gold), var(--orange));
      color: var(--green-deep);
      border-color: transparent;
    }
  }
}

.guide-cat-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green-deep), var(--green-mid));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  margin: 0 auto 1rem;
}

.guide-cat-card-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green-deep);
  margin-bottom: 0.6rem;
}

.guide-cat-card-count {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--warm-white);
  border: 1px solid rgba(26, 74, 46, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1rem auto 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
}


/* --- Category expand toggle (mobile only) --- */
.guide-cat-expand {
  display: none;
}

/* --- Category Pills --- */
.guide-cat-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  padding-bottom: 0.5rem;
}

.guide-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.5rem;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition);

  svg { color: inherit; }
  &:hover { color: var(--green-deep); }
  &.is-active { color: var(--green-deep); font-weight: 600; }
}

/* --- Results Bar (active filter status + clear) --- */
.guide-results-bar {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  overflow: hidden;
  transition: grid-template-rows 300ms ease, opacity 220ms ease;

  &.is-active {
    grid-template-rows: 1fr;
    opacity: 1;
  }
}

.guide-results-bar-inner {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: white;
  border: 1px solid rgba(212, 160, 48, 0.25);
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.5rem;
}

.guide-results-bar-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.guide-results-bar-count {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--green-deep);
}

.guide-results-bar-sep {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.guide-filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  background: rgba(26, 74, 46, 0.07);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green-mid);
}

.guide-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.85rem;
  border: 1.5px solid rgba(212, 160, 48, 0.5);
  border-radius: 20px;
  background: none;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
  flex-shrink: 0;

  &:hover {
    background: var(--gold);
    color: var(--green-deep);
    border-color: var(--gold);
  }
}

/* --- Results Footer (centered filter status, sits between search bar and category cards) --- */
.guide-results-footer {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  overflow: hidden;
  transition: grid-template-rows 300ms ease, opacity 220ms ease;
  background: var(--warm-white);

  &.is-active {
    grid-template-rows: 1fr;
    opacity: 1;
  }

}

.guide-results-footer-inner {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.guide-results-footer-count {
  font-weight: 700;
  color: var(--green-deep);
}

.guide-clear-btn-text {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gold);
  cursor: pointer;
  padding: 0;
  transition: opacity var(--transition);

  &:hover { opacity: 0.75; }
}

/* --- Category card — dimmed when filter yields 0 results --- */
.guide-cat-card.is-empty {
  opacity: 0.45;
  pointer-events: none;
}

/* --- Results Grid --- */
.guide-results {
  background: var(--warm-white);
  padding: 2rem 0 5rem;
  min-height: 40vh;
}

.guide-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* --- Category Group --- */
.guide-category-group {
  background: rgba(212, 160, 48, 0.04);
  border: 1px solid rgba(212, 160, 48, 0.12);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.guide-category-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  container-type: inline-size;
}

@container (max-width: 340px) {
  .guide-card-body { padding: 1.25rem; }
  .guide-card-title { font-size: 1.1rem; }
}

/* --- Category Heading --- */
.guide-category-heading {
  margin-bottom: 1rem;
}

.guide-category-heading h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green-deep);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.guide-category-note {
  background: rgba(212, 160, 48, 0.06);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* --- Guide Card --- */
.guide-card {
  position: relative;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(212, 160, 48, 0.12);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  cursor: pointer;

  &:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(26, 74, 46, 0.15);

    .guide-card-link {
      color: var(--gold);
      gap: 0.5rem;
    }
  }

  &.featured {
    border-color: var(--gold);
    box-shadow: 0 0 0 1px var(--gold-glow);
  }
}

/* --- Card image wrapper (overlay-capable) --- */
.guide-card-img-area {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  aspect-ratio: 3 / 4;
}

/* Stronger gradient — supports description text in overlay */
.guide-card-img-area::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.0) 0%,
    rgba(0, 0, 0, 0.05) 20%,
    rgba(13, 31, 18, 0.45) 50%,
    rgba(13, 31, 18, 0.9) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* All content overlaid — fills image area, pushes text to bottom */
.guide-card-img-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.1rem 1.1rem 0.9rem;
  z-index: 2;
}

.guide-card-img-overlay .guide-card-title {
  color: var(--cream);
  font-size: 1.1rem;
  margin: 0 0 0.35rem;
  text-wrap: balance;
}

.guide-card-img-overlay .guide-card-description {
  color: rgba(232, 228, 220, 0.82);
  font-size: 0.8rem;
  line-height: 1.5;
  margin: 0 0 0.35rem;
  -webkit-line-clamp: 3;
}

.guide-card-img-overlay .guide-card-footer {
  margin-top: 0;
  border-color: rgba(255, 255, 255, 0.15);
  padding-top: 0.65rem;
}

.guide-card-img-overlay .guide-card-location,
.guide-card-img-overlay .guide-card-directions {
  color: rgba(232, 228, 220, 0.7);
}

.guide-card-img-overlay .guide-card-location svg,
.guide-card-img-overlay .guide-card-directions svg {
  color: rgba(232, 228, 220, 0.6);
}

.guide-card-img-overlay .guide-card-link,
.guide-card-img-overlay .guide-card-action-link {
  color: rgba(232, 228, 220, 0.7);
}

.guide-card:hover .guide-card-img-overlay .guide-card-link,
.guide-card:hover .guide-card-img-overlay .guide-card-action-link {
  color: var(--gold);
}

/* --- Card image banner --- */
.guide-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Card body (wraps text content) --- */
.guide-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.75rem;
}

/* --- Category icon badge --- */
.guide-card-cat-icon {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--warm-white);
  border: 1px solid rgba(26, 74, 46, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  z-index: 2;
  flex-shrink: 0;
}

/* No-image cards: push content below the icon badge (top: 1.25rem + 48px height + gap) */
.guide-card:not(:has(.guide-card-img-area)) .guide-card-body {
  padding-top: 5rem;
}

/* --- Heart button --- */
.guide-card-heart {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  color: rgba(0, 0, 0, 0.3);
  transition: color var(--transition), background var(--transition), transform var(--transition);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);

  &:hover {
    color: #e8652a;
    transform: scale(1.15);
  }

  svg {
    fill: none;
    transition: fill var(--transition);
  }

  &.is-active {
    color: #e8652a;

    svg { fill: #e8652a; }
  }
}

/* Heart sits in image corner when a photo is present */
.guide-card:has(.guide-card-img-area) .guide-card-heart {
  top: 1.25rem;
  right: 1.25rem;
}

/* --- Favourites pill variant --- */
.guide-cat-pill--fav {
  gap: 0.4rem;
}

.guide-cat-pill--fav-active {
  color: #e8652a;
  font-weight: 600;
}


.guide-card-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(26, 74, 46, 0.08);
  color: var(--green-mid);
  margin-bottom: 1rem;
  width: fit-content;
}

.guide-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--green-deep);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.guide-card-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;

  &.is-expanded {
    display: block;
    overflow: visible;
  }
}

/* "…" link shown when description is truncated */
.guide-card-more-link {
  display: none; /* shown by JS when description overflows */
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  cursor: pointer;
  margin-bottom: 0.5rem;
  background: none;
  border: none;
  padding: 0;
  transition: color var(--transition);

  &:hover { color: var(--gold-light); }
}

/* --- Card footer (location + visit link row) --- */
.guide-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(26, 74, 46, 0.08);
}

.guide-card-location {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.guide-card-location svg {
  color: var(--green-mid);
  flex-shrink: 0;
}

/* Get Directions button (shown when plusCode is set on a listing) */
.guide-card-directions {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--green-mid);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color var(--transition);

  &:hover { color: var(--gold); }

  svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    color: var(--green-mid);
    transition: color var(--transition);
  }

  &:hover svg { color: var(--gold); }
}

.guide-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--green-mid);
  transition: color var(--transition), gap var(--transition);
}

.guide-card-link svg {
  width: 12px;
  height: 12px;
}

/* --- Card Actions (multi-link cards e.g. radio) --- */
.guide-card-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.guide-card-action-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--green-mid);
  transition: color var(--transition), gap var(--transition);

  &:hover {
    color: var(--gold);
    gap: 0.75rem;
  }

  svg {
    width: 16px;
    height: 16px;
  }
}

/* --- Empty State --- */
.guide-empty {
  display: none;
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
  font-size: 1.1rem;

  &.visible { display: block; }
}

/* --- Book Cross-sell --- */
.guide-book-promo {
  background: linear-gradient(135deg, var(--green-deep) 0%, #0a2e15 50%, var(--green-dark) 100%);
  padding: 4rem 0;
}

.guide-book-promo-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.guide-book-promo-text .section-label {
  color: var(--gold);
  text-align: left;
}

.guide-book-promo-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.guide-book-promo-desc {
  color: rgba(232, 228, 220, 0.7);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 500px;
  margin: 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  /* Hero: push content well below the fixed header + music player notch */
  .guide-hero {
    min-height: auto;
    padding: 9rem var(--space-sm) 4rem;
  }

  .guide-hero-description {
    font-size: 1rem;
  }

  /* Mobile search trigger pill */
  .guide-search-mobile-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 2rem;
    padding: 0.95rem 1.6rem;
    background: white;
    border: none;
    border-radius: 40px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--green-deep);
    cursor: pointer;
    transition: box-shadow var(--transition), transform var(--transition);

    &:hover {
      box-shadow: 0 6px 30px rgba(0, 0, 0, 0.28);
      transform: translateY(-1px);
    }
  }

  .guide-search-trigger-arrow {
    color: var(--text-muted);
    margin-left: 0.15rem;
  }

  /* Hide the desktop-style floating search bar */
  .guide-search-bar-wrapper {
    display: none;
  }

  /* Tray open: transform wrapper into a fixed bottom sheet */
  body.guide-tray-open .guide-search-bar-wrapper {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 500;
    margin-top: 0;
    min-height: 58vh;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: white;
    border-radius: 24px 24px 0 0;
    overflow: hidden;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.22);
    will-change: transform;
    animation: guide-tray-slide-up 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  /* Tray closing: slide back down before display:none kicks in */
  body.guide-tray-closing .guide-search-bar-wrapper {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 500;
    min-height: 58vh;
    background: white;
    border-radius: 24px 24px 0 0;
    overflow: hidden;
    will-change: transform;
    animation: guide-tray-slide-down 0.28s cubic-bezier(0.32, 0, 0.67, 0) forwards;
  }

  /* Remove container side padding — form handles its own spacing */
  body.guide-tray-open .guide-search-bar-wrapper .container {
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
  }

  body.guide-tray-open .guide-search-form {
    flex-direction: column;
    border-radius: 0;
    box-shadow: none;
    border: none;
    height: auto;
    gap: 0.85rem;
    padding: 1.25rem 1.25rem 3.75rem;
    background: white;
  }

  /* Tray header */
  body.guide-tray-open .guide-tray-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.25rem 0.9rem;
    position: relative;
    border-bottom: 1px solid rgba(26, 74, 46, 0.07);
  }

  .guide-tray-pill {
    position: absolute;
    top: 0.55rem;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(0, 0, 0, 0.14);
    border-radius: 2px;
  }

  .guide-tray-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--green-deep);
    margin-top: 0.6rem;
    padding: 0 3rem;
  }

  .guide-tray-close {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.06);
    border: none;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    transition: background var(--transition);

    &:hover { background: rgba(0, 0, 0, 0.1); }
  }

  /* Individual field cards in tray */
  body.guide-tray-open .guide-search-field {
    width: 100%;
    height: auto;
    min-height: 72px;
    border-bottom: none;
    border: 1.5px solid rgba(26, 74, 46, 0.12);
    background: var(--warm-white);
    border-radius: 14px;
    padding: 0.6rem 1.25rem;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    cursor: pointer;
  }

  body.guide-tray-open .guide-search-field--keyword {
    flex-direction: row;
    align-items: stretch;
    gap: 0.75rem;
  }

  body.guide-tray-open .guide-search-field:focus-within {
    border-color: var(--gold);
    background: rgba(212, 160, 48, 0.03);
  }

  /* Label: always visible at top, clickable (for= routes tap to input/select) */
  body.guide-tray-open .guide-field-label {
    position: relative;
    top: auto;
    transform: none;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    pointer-events: auto;
    cursor: pointer;
    margin-bottom: 0.25rem;
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* Wrap stretches to fill the field, stacks label above input/select */
  body.guide-tray-open .guide-field-wrap {
    flex: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  /* Input/select grow to fill the remaining wrap space — full card is tappable */
  body.guide-tray-open .guide-search-field input,
  body.guide-tray-open .guide-search-field select {
    flex: 1;
    width: 100%;
    color: var(--text-dark);
    font-size: 1rem;
    padding-top: 0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
  }

  body.guide-tray-open .guide-search-field input {
    padding-top: 0.3rem;
  }

  body.guide-tray-open .guide-search-field select {
    color: var(--text-muted);
  }

  body.guide-tray-open .guide-search-field-icon {
    color: var(--green-mid);
    flex-shrink: 0;
    margin-top: 0.1rem;
  }

  .guide-search-divider { display: none; }

  body.guide-tray-open .guide-search-btn {
    width: 100%;
    justify-content: center;
    margin: 0.5rem 0 0;
    padding: 1rem 1.5rem;
    border-radius: 14px;
    font-size: 1rem;
  }

  /* Hint is inline inside the tray, not a tooltip */
  body.guide-tray-open .guide-search-hint {
    position: static;
    white-space: normal;
    text-align: center;
    margin: 0.5rem 0 0;
    transform: none;
  }

  body.guide-tray-open .guide-search-hint::before,
  body.guide-tray-open .guide-search-hint::after {
    display: none;
  }

  /* Category cards: 2-col flex on mobile */
  .guide-cat-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 0.5rem;
  }

  /* Cards 1 & 2: keep full card styling, sized to fill 2 columns */
  .guide-cat-card {
    flex: 0 0 calc(50% - 0.625rem);
    padding: 2rem 1.25rem;
  }

  /* Cards 3 & 4: pill style, hidden by default */
  .guide-cat-card:nth-child(n+3) {
    display: none;
    flex: 0 0 auto;
    background: none;
    border: none;
    border-radius: 0;
    padding: 0.3rem 0.5rem;
    box-shadow: none;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
  }

  .guide-cat-card:nth-child(n+3):hover {
    transform: none;
    box-shadow: none;
    color: var(--green-deep);
  }

  .guide-cat-card:nth-child(n+3).is-active {
    border-color: transparent;
    box-shadow: none;
    color: var(--green-deep);
    font-weight: 600;
  }

  .guide-cat-card:nth-child(n+3) .guide-cat-card-icon {
    width: auto;
    height: auto;
    background: none;
    border: none;
    box-shadow: none;
    border-radius: 0;
    color: inherit;
    margin: 0;
  }

  .guide-cat-card:nth-child(n+3) .guide-cat-card-icon svg {
    width: 15px;
    height: 15px;
  }

  .guide-cat-card:nth-child(n+3) .guide-cat-card-count {
    display: none;
  }

  .guide-cat-card:nth-child(n+3) .guide-cat-card-name {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: inherit;
    color: inherit;
    margin: 0;
  }

  /* Show pills when expanded */
  .guide-cat-cards.is-expanded .guide-cat-card:nth-child(n+3) {
    display: inline-flex;
  }

  /* Expand / collapse toggle — centered pill */
  .guide-cat-expand {
    display: block;
    width: auto;
    margin: 0 auto;
    text-align: center;
    padding: 0.5rem 1.25rem;
    border: 1px solid rgba(212, 160, 48, 0.4);
    border-radius: 20px;
    background: none;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gold);
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition);
    margin-bottom: 0.25rem;

    &:hover { color: var(--gold-light); }
  }

  .guide-category-group {
    padding: 1.25rem;
  }

  .guide-category-cards {
    grid-template-columns: 1fr;
  }

  .guide-book-promo-content {
    flex-direction: column;
    text-align: center;
  }

  .guide-book-promo-text .section-label {
    text-align: center;
  }

  .guide-book-promo-desc {
    max-width: 100%;
  }
}

/* --- Blog Invite --- */
.guide-blog-invite {
  background: linear-gradient(160deg, #0a1a0f 0%, var(--green-deep) 60%, #060f09 100%);
  padding: 5rem 0;
  text-align: center;
}

.guide-blog-invite .section-label {
  color: var(--gold);
}

.guide-blog-invite-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--cream);
  margin: 0.5rem 0 1.25rem;
  line-height: 1.2;
}

.guide-blog-invite-desc {
  max-width: 560px;
  margin: 0 auto 2.5rem;
  color: rgba(245, 240, 232, 0.7);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* --- Love Tobago scroll modal --- */
.guide-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(5, 15, 8, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: guide-modal-fade-in 0.3s ease both;
}

.guide-modal-overlay[hidden] {
  display: none;
}

@keyframes guide-modal-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.guide-modal-box {
  position: relative;
  background: linear-gradient(145deg, var(--green-deep) 0%, #0a2e15 60%, #060f09 100%);
  border: 1px solid rgba(212, 160, 48, 0.18);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  animation: guide-modal-scale-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes guide-modal-scale-in {
  from { transform: scale(0.94); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.guide-modal-close {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.07);
  border: none;
  border-radius: 50%;
  color: var(--cream);
  cursor: pointer;
  transition: background var(--transition);
}

.guide-modal-close:hover {
  background: rgba(255, 255, 255, 0.14);
}

.guide-modal-label {
  color: var(--gold);
  text-align: left;
  margin-bottom: 0.75rem;
}

.guide-modal-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.2;
  margin: 0 0 1rem;
}

.guide-modal-desc {
  color: rgba(232, 228, 220, 0.72);
  font-size: 1rem;
  line-height: 1.75;
  margin: 0 0 2rem;
}

.guide-modal-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .guide-modal-box {
    padding: 2.25rem 1.5rem;
  }

  .guide-modal-ctas .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* --- Listing detail tray --- */
.guide-listing-tray {
  position: fixed;
  inset: 0;
  z-index: 700;
}

.guide-listing-tray[hidden] { display: none; }

.guide-listing-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 15, 8, 0.52);
  animation: guide-modal-fade-in 0.25s ease both;
}

.guide-listing-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 92vw);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  box-shadow: -8px 0 50px rgba(0, 0, 0, 0.18);
  animation: guide-listing-panel-in 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes guide-listing-panel-in {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

@keyframes guide-listing-panel-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

@keyframes guide-listing-panel-out {
  from { transform: translateX(0); }
  to   { transform: translateX(100%); }
}

@keyframes guide-listing-panel-out-up {
  from { transform: translateY(0); }
  to   { transform: translateY(100%); }
}

@keyframes guide-listing-backdrop-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

.guide-listing-panel.is-closing {
  animation: guide-listing-panel-out 0.28s ease-in both;
}

.guide-listing-backdrop.is-closing {
  animation: guide-listing-backdrop-out 0.28s ease both;
}

@media (max-width: 768px) {
  .guide-listing-panel.is-closing {
    animation: guide-listing-panel-out-up 0.28s ease-in both;
  }
}

.guide-listing-panel-head {
  flex-shrink: 0;
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0.65rem 0.7rem 0;
  min-height: 3rem;
}

.guide-listing-pill { display: none; }

.guide-listing-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  background: rgba(0, 0, 0, 0.06);
  border: none;
  border-radius: 50%;
  color: var(--text-dark);
  cursor: pointer;
  transition: background var(--transition);
  flex-shrink: 0;
}

.guide-listing-close:hover { background: rgba(0, 0, 0, 0.12); }

.guide-listing-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.guide-listing-image {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
}

.guide-listing-content {
  padding: 1.25rem 1.5rem 2.5rem;
}

.guide-listing-cat {
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.guide-listing-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.25;
  margin: 0 0 0.6rem;
}

.guide-listing-location {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  text-decoration: none;
}

a.guide-listing-location:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

.guide-listing-desc {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-dark);
  margin: 0 0 1.25rem;
}

/* Quincy's personal note */
.guide-listing-note {
  background: rgba(26, 74, 46, 0.05);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.guide-listing-note-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

.guide-listing-note p {
  font-size: 0.9rem;
  line-height: 1.72;
  color: var(--text-dark);
  font-style: italic;
  margin: 0;
}

/* Leaflet mini map */
.guide-listing-map {
  height: 175px;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(26, 74, 46, 0.12);
}

.guide-map-pin {
  display: block;
  width: 14px;
  height: 14px;
  background: var(--green-deep);
  border: 2.5px solid var(--gold);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.guide-listing-ctas {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .guide-listing-panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 85dvh;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.2);
    animation: guide-listing-panel-up 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .guide-listing-pill {
    display: block;
    position: absolute;
    top: 0.55rem;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 2px;
    pointer-events: none;
  }

  .guide-listing-image { height: 170px; }

  .guide-listing-ctas .btn {
    flex: 1;
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .guide-hero {
    padding: 8.5rem var(--space-sm) 3.5rem;
  }

  .guide-hero-title {
    font-size: 2rem;
  }

  .guide-hero-description {
    font-size: 0.9rem;
  }

  .guide-card-body {
    padding: 1.25rem;
  }

  .guide-category-heading h2 {
    font-size: 1.25rem;
  }
}

