:root {
  --bg: #f5f6f3;
  --bg-strong: #e8ece7;
  --surface: #ffffff;
  --surface-muted: #f8f9f7;
  --surface-deep: #eef2ee;
  --text: #141918;
  --ink: #141918;
  --muted: #68706d;
  --faint: #98a19d;
  --accent: #9a7a32;
  --accent-deep: #1d3531;
  --accent-cool: #245f66;
  --border: rgba(20, 25, 24, 0.1);
  --border-strong: rgba(20, 25, 24, 0.18);
  --shadow: 0 24px 70px rgba(20, 25, 24, 0.12);
  --shadow-soft: 0 14px 34px rgba(20, 25, 24, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 246, 243, 0.98) 32rem),
    repeating-linear-gradient(90deg, rgba(20, 25, 24, 0.022) 0 1px, transparent 1px 128px),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.hero__inner,
.content,
.detail-shell {
  width: min(1240px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.hero {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0.85rem 0 0.75rem;
  background: rgba(245, 246, 243, 0.86);
  border-bottom: 1px solid rgba(20, 25, 24, 0.07);
  backdrop-filter: blur(20px);
  transition: padding 180ms ease, background 180ms ease;
}

.hero__inner {
  padding: 1.45rem 0 1.2rem;
  border-bottom: 1px solid var(--border);
  transition: padding 180ms ease;
}

.hero__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin: 0 0 0.75rem;
  color: var(--faint);
  font-size: 0.86rem;
}

.breadcrumbs a {
  color: var(--accent-deep);
}

.breadcrumbs a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
  margin: 0 0 0.65rem;
  color: var(--accent-deep);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
.detail-title {
  max-width: 58rem;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(2rem, 4.4vw, 4.25rem);
  font-weight: 700;
  line-height: 1;
}

.detail-title {
  font-size: clamp(1.9rem, 3.4vw, 3.35rem);
  line-height: 1.06;
}

.hero__text,
.detail-description {
  max-width: 45rem;
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.65;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.hero-chip,
.card__category,
.card__audience {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.38rem 0.66rem;
  border-radius: 999px;
  font-size: 0.8rem;
  line-height: 1;
}

.hero-chip {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.hero-chip:hover,
.hero-chip.is-active {
  border-color: rgba(29, 53, 49, 0.36);
  background: var(--accent-deep);
  color: #ffffff;
}

.card__category {
  border: 1px solid rgba(154, 122, 50, 0.24);
  background: #f7f2e4;
  color: #6f5520;
}

.card__audience {
  border: 1px solid rgba(36, 95, 102, 0.18);
  background: #edf5f4;
  color: var(--accent-cool);
}

.search-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(220px, 0.7fr) auto;
  gap: 0.65rem;
  margin-top: 0.72rem;
}

.search-bar:not(.is-offline) {
  grid-template-columns: minmax(0, 1fr) auto;
}

.search-bar:not(.is-offline) .search-wrap--city {
  display: none;
}

.search-wrap {
  position: relative;
}

#searchInput,
#cityInput,
.search-submit,
.listing-form input,
.listing-form textarea,
.listing-form select {
  width: 100%;
  min-height: 3.05rem;
  padding: 0.9rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  font-size: 1rem;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.search-submit {
  width: auto;
  min-width: 8.4rem;
  padding-right: 1.25rem;
  padding-left: 1.25rem;
  border-color: var(--accent-deep);
  background: var(--accent-deep);
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
}

.search-submit:hover,
.search-submit:focus {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(154, 122, 50, 0.14);
}

.format-filter {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 1.15rem;
  max-width: 48rem;
}

.format-filter__button {
  min-height: 4.05rem;
  padding: 0.74rem 0.86rem;
  border: 1px solid rgba(31, 41, 51, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.format-filter__button span,
.format-filter__button small {
  display: block;
}

.format-filter__button span {
  font-weight: 700;
  line-height: 1.1;
}

.format-filter__button small {
  margin-top: 0.28rem;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.format-filter__button:hover,
.format-filter__button.is-active {
  border-color: rgba(29, 53, 49, 0.34);
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(31, 41, 51, 0.1);
}

.format-filter__button.is-active {
  border-color: var(--accent-deep);
  background: var(--accent-deep);
  color: #ffffff;
}

.format-filter__button.is-active small {
  color: rgba(255, 255, 255, 0.78);
}

#searchInput:focus,
#cityInput:focus,
.listing-form input:focus,
.listing-form textarea:focus,
.listing-form select:focus {
  border-color: rgba(155, 107, 67, 0.55);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(154, 122, 50, 0.14);
}

.search-reset,
.category-section__toggle {
  margin-top: 0.7rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-deep);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.search-reset:hover,
.category-section__toggle:hover,
.back-link:hover {
  color: var(--accent);
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  right: 0;
  z-index: 10;
  display: grid;
  gap: 0.25rem;
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.search-suggestions[hidden] {
  display: none;
}

.search-suggestion {
  width: 100%;
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 0.7rem;
  align-items: center;
  padding: 0.75rem 0.85rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.search-suggestion:hover,
.search-suggestion.is-active {
  background: var(--surface-muted);
}

.search-suggestion__type {
  color: var(--faint);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-suggestion__text mark {
  padding: 0 0.12rem;
  border-radius: 3px;
  background: rgba(155, 107, 67, 0.18);
  color: inherit;
}

.hero.is-condensed {
  padding: 0.45rem 0;
}

.hero.is-condensed .hero__inner {
  padding: 0.4rem 0 0.6rem;
  border-bottom-color: transparent;
}

.hero.is-condensed h1,
.hero.is-condensed .hero__text,
.hero.is-condensed .hero__chips,
.hero.is-condensed .eyebrow {
  max-height: 0;
  margin: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero.is-condensed .search-bar {
  margin-top: 0;
}

.content,
.detail-page {
  padding-bottom: 3.25rem;
}

.content {
  padding-top: 1.15rem;
}

.results-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 1.8vw, 1.85rem);
  line-height: 1.18;
}

.results-count,
.section-head p,
.form-message,
.loading,
.error-text {
  color: var(--muted);
}

.results-count {
  margin: 0 0 1rem;
}

.category-links {
  margin-bottom: 1.25rem;
}

.category-links__head {
  margin-bottom: 0.7rem;
}

.category-links__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.category-links__item,
.category-directory__subitem {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.category-links__item {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0.5rem 0.76rem;
  border-radius: 999px;
  font-size: 0.9rem;
}

.category-links__item:hover,
.category-directory__subitem:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: #ffffff;
}

.category-directory {
  display: grid;
  gap: 0.8rem;
}

.category-section {
  padding: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.category-section__title {
  margin: 0;
  font-size: 1.12rem;
}

.category-section__description {
  margin: 0.38rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.category-section__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.category-directory__subitem {
  display: flex;
  align-items: center;
  min-height: 3.05rem;
  padding: 0.72rem 0.85rem;
  border-radius: 8px;
  line-height: 1.35;
}

.controls,
.form-section,
.detail-card {
  padding: 1.15rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.section-head h2,
.section-head p {
  margin: 0;
}

.section-head h2 {
  font-size: clamp(1.2rem, 1.7vw, 1.6rem);
  line-height: 1.2;
}

.listing-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.listing-form label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.listing-form span {
  color: var(--muted);
  font-size: 0.9rem;
}

.listing-form__wide,
.listing-form__actions {
  grid-column: 1 / -1;
}

.listing-form__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero__cta,
.card__link,
.listing-form__actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0.72rem 0.95rem;
  border: 1px solid var(--accent-deep);
  border-radius: 8px;
  background: var(--accent-deep);
  color: #ffffff;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.hero__cta:hover,
.card__link:hover,
.listing-form__actions button:hover {
  transform: translateY(-1px);
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  gap: 0.68rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(20, 25, 24, 0.055);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: 0 18px 40px rgba(20, 25, 24, 0.09);
}

.card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 0;
  overflow: hidden;
  border-radius: 6px;
  background: url("/card-placeholder.svg");
  background-size: cover;
  background-position: center;
}

.card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: inherit;
  pointer-events: none;
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.card__title {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.24;
}

.card__facts {
  display: grid;
  gap: 0.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.card__facts p,
.review p {
  margin: 0;
  line-height: 1.45;
}

.card__address {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.card__link {
  width: fit-content;
  margin-top: auto;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 1.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  text-align: center;
}

.detail-page {
  padding-top: 1.2rem;
}

.back-link {
  display: inline-flex;
  margin-bottom: 0.85rem;
  color: var(--accent-deep);
  font-size: 0.94rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 1rem;
  margin-top: 1.1rem;
}

.detail-panel {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.detail-panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.08rem;
}

.detail-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.75;
}

.external-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.program-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.program-list span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(36, 95, 102, 0.16);
  border-radius: 999px;
  background: #edf5f4;
  color: var(--accent-cool);
  font-size: 0.9rem;
  line-height: 1.1;
}

.external-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--accent-deep);
  border-radius: 8px;
  background: var(--accent-deep);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.external-link:hover {
  transform: translateY(-1px);
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

.external-link--secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--accent-deep);
}

.external-link--secondary:hover {
  background: var(--surface-muted);
  border-color: var(--accent-deep);
  color: var(--accent-deep);
}

.rating-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 0;
}

.reviews-panel {
  margin-top: 1rem;
}

.related-panel,
.internal-links {
  margin-top: 1rem;
}

.reviews-list {
  display: grid;
  gap: 0.75rem;
}

.review {
  padding: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.not-found-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.not-found-shell {
  width: min(760px, 100%);
  padding: clamp(1.2rem, 4vw, 2.4rem);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.not-found-code {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  margin-top: 1.4rem;
}

.not-found-link {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.internal-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.internal-links__group {
  padding: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.internal-links__group h2 {
  margin: 0 0 0.7rem;
  font-size: 1.05rem;
}

.internal-links__items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.internal-links__items a {
  display: inline-flex;
  min-height: 2.15rem;
  align-items: center;
  padding: 0.46rem 0.64rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent-deep);
  font-size: 0.88rem;
}

.internal-links__items a:hover {
  border-color: var(--border-strong);
  background: #ffffff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 960px) {
  .grid,
  .listing-form,
  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 760px) {
  .hero {
    position: static;
    padding: 0.5rem 0;
  }

  .hero__inner,
  .content,
  .detail-shell {
    width: calc(100% - 1.25rem);
  }

  .hero__inner {
    padding: 0.75rem 0 0.7rem;
  }

  .section-head,
  .listing-form__actions {
    flex-direction: column;
    align-items: start;
  }

  .search-bar,
  .search-bar:not(.is-offline),
  .format-filter,
  .grid,
  .listing-form,
  .detail-grid,
  .seo-intro,
  .internal-links,
  .hero.is-condensed .search-bar {
    grid-template-columns: 1fr;
  }

  h1,
  .detail-title {
    font-size: clamp(1.75rem, 7.2vw, 2.35rem);
    line-height: 1.08;
  }

  .detail-title {
    font-size: clamp(1.65rem, 6.4vw, 2.15rem);
  }

  .results-title {
    font-size: 1.34rem;
    line-height: 1.2;
  }

  .section-head h2,
  .detail-panel h2,
  .internal-links__group h2 {
    font-size: 1.08rem;
    line-height: 1.22;
  }

  .hero__text,
  .detail-description {
    margin-top: 0.65rem;
    font-size: 0.95rem;
    line-height: 1.48;
  }

  .hero__chips {
    display: none;
  }

  .format-filter {
    gap: 0.4rem;
  }

  .format-filter__button {
    min-height: 3.5rem;
    padding: 0.64rem 0.66rem;
  }

  .format-filter__button small {
    font-size: 0.68rem;
  }

  .search-suggestion {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  #searchInput,
  #cityInput,
  .listing-form input,
  .listing-form textarea,
  .listing-form select {
    min-height: 2.9rem;
    font-size: 16px;
  }

  .controls,
  .form-section,
  .detail-card {
    padding: 0.9rem;
  }

  .card {
    padding: 0.78rem;
  }

  .card__title {
    font-size: 0.98rem;
    line-height: 1.24;
  }

  .card__facts {
    font-size: 0.9rem;
  }

  .card__link,
  .external-link,
  .listing-form__actions button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  h1,
  .detail-title {
    font-size: 1.68rem;
    line-height: 1.1;
  }

  .breadcrumbs {
    font-size: 0.78rem;
  }

  .results-title {
    font-size: 1.22rem;
  }

  .hero__text,
  .detail-description {
    font-size: 0.9rem;
  }
}
