:root {
  --ink: #17201b;
  --muted: #63706a;
  --line: #dfe7e2;
  --paper: #fbfcfa;
  --panel: #ffffff;
  --brand: #0f7b5f;
  --brand-dark: #075843;
  --accent: #d88a28;
  --soft: #eef7f2;
  --danger: #b42318;
  --shadow: 0 18px 45px rgba(23, 32, 27, .1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(251, 252, 250, .92);
  border-bottom: 1px solid rgba(223, 231, 226, .8);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: var(--brand);
  border-radius: 8px;
  font-size: 14px;
  letter-spacing: 0;
}
.top-nav, .footer-links { display: flex; align-items: center; gap: 20px; color: var(--muted); font-weight: 700; }
.nav-pill, .button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
  cursor: pointer;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: clamp(52px, 8vw, 108px) clamp(18px, 4vw, 56px);
  background:
    linear-gradient(115deg, rgba(15, 123, 95, .13), transparent 42%),
    radial-gradient(circle at 88% 18%, rgba(216, 138, 40, .18), transparent 28%),
    #f7fbf8;
}
.hero-copy { max-width: 860px; }
.eyebrow {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 18px; font-size: clamp(42px, 7vw, 86px); line-height: .97; letter-spacing: 0; }
h2 { font-size: clamp(24px, 3vw, 38px); line-height: 1.1; letter-spacing: 0; }
h3 { margin: 10px 0 8px; font-size: 20px; line-height: 1.2; }
.hero p, .page-hero p { max-width: 700px; color: var(--muted); font-size: 19px; }
.hero-search {
  display: flex;
  gap: 10px;
  max-width: 720px;
  padding: 8px;
  margin-top: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.hero-search input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 0;
  outline: 0;
  color: var(--ink);
}
.hero-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: rgba(255, 255, 255, .76);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.hero-panel div, .stat-grid div {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.hero-panel strong, .stat-grid strong { display: block; font-size: 38px; line-height: 1; }
.hero-panel span, .stat-grid span, .muted { color: var(--muted); }

.section, .page-hero, .directory-layout, .detail-hero, .detail-grid, .site-footer {
  padding-left: clamp(18px, 4vw, 56px);
  padding-right: clamp(18px, 4vw, 56px);
}
.section { padding-top: 70px; padding-bottom: 30px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.section-head a { color: var(--brand-dark); font-weight: 900; }
.listing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.listing-grid.single { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.listing-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(23, 32, 27, .06);
}
.listing-image { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--soft); }
.listing-image.placeholder { display: grid; place-items: center; color: var(--brand-dark); font-size: 56px; font-weight: 900; }
.listing-body { padding: 16px; }
.card-topline { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.chip {
  display: inline-flex;
  max-width: 100%;
  padding: 6px 10px;
  color: var(--brand-dark);
  background: var(--soft);
  border: 1px solid #cfe8dd;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.rating { color: var(--accent); font-weight: 900; white-space: nowrap; }
.rating small { color: var(--muted); }
.card-actions, .detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.card-actions a, .detail-actions a {
  min-height: 38px;
  padding: 8px 12px;
  color: var(--brand-dark);
  background: #f7fbf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.link-grid { display: grid; gap: 10px; }
.link-grid a {
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-cloud a { padding: 9px 12px; background: #fff; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-weight: 800; }

.page-hero.compact { padding-top: 62px; padding-bottom: 42px; background: linear-gradient(120deg, #f0f8f4, #fff8ef); }
.page-hero.compact h1 { max-width: 960px; font-size: clamp(36px, 5vw, 64px); }
.hero-search.narrow { box-shadow: none; }
.directory-layout { display: grid; grid-template-columns: 280px 1fr; gap: 28px; padding-top: 34px; padding-bottom: 70px; }
.filters {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.filters h2 { font-size: 18px; }
.filters a { display: block; padding: 9px 0; color: var(--muted); font-weight: 800; border-bottom: 1px solid #edf2ef; }
.result-bar { margin-bottom: 16px; color: var(--muted); }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.pagination a { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 900; }
.pagination a.active { color: #fff; background: var(--brand); }

.detail-hero { display: grid; grid-template-columns: 420px 1fr; gap: 34px; align-items: center; padding-top: 48px; padding-bottom: 48px; background: #f5faf7; }
.detail-hero img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; box-shadow: var(--shadow); }
.detail-hero h1 { max-width: 900px; font-size: clamp(36px, 5vw, 68px); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; color: var(--muted); font-weight: 800; }
.breadcrumbs a::after { content: "/"; margin-left: 8px; color: #aab7b0; }
.detail-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; padding-top: 46px; padding-bottom: 70px; }
.info-panel { padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
dl { display: grid; grid-template-columns: 140px 1fr; gap: 12px 18px; margin: 0; }
dt { color: var(--muted); font-weight: 900; }
dd { margin: 0; }
.site-footer { display: flex; justify-content: space-between; gap: 24px; padding-top: 38px; padding-bottom: 38px; border-top: 1px solid var(--line); background: #fff; }
.site-footer p { margin: 6px 0 0; color: var(--muted); }

.admin-body { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; background: #f6f8f7; }
.admin-sidebar { padding: 24px; background: #10231d; color: #fff; }
.admin-sidebar nav { display: grid; gap: 8px; margin-top: 32px; }
.admin-sidebar nav a { padding: 12px; border-radius: 8px; color: rgba(255,255,255,.82); font-weight: 800; }
.admin-sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-main { padding: 34px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.admin-head h1 { margin-bottom: 0; font-size: 42px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-grid.small { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.admin-panel, .auth-card {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(23, 32, 27, .06);
}
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(100%, 460px); }
label { display: grid; gap: 8px; margin-bottom: 14px; color: var(--muted); font-weight: 900; }
input[type="email"], input[type="password"], input[type="text"], input[type="file"], .upload-box input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.alert { padding: 12px 14px; color: var(--danger); background: #fff1ef; border: 1px solid #ffd7d2; border-radius: 8px; font-weight: 800; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 13px; text-transform: uppercase; }

@media (max-width: 1050px) {
  .listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero, .detail-hero, .detail-grid, .two-col { grid-template-columns: 1fr; }
  .directory-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
}

@media (max-width: 720px) {
  .site-header, .site-footer, .admin-head { align-items: flex-start; flex-direction: column; }
  .top-nav { width: 100%; justify-content: space-between; gap: 10px; }
  .hero { min-height: auto; padding-top: 42px; }
  h1 { font-size: 42px; }
  .hero-search { flex-direction: column; }
  .listing-grid, .listing-grid.single, .stat-grid, .stat-grid.small { grid-template-columns: 1fr; }
  .admin-body { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
  dl { grid-template-columns: 1fr; }
}
