/* Gerty's List — simple, friendly, easy to read */
:root {
  --green: #2d6a4f;
  --green-dark: #1b4332;
  --green-light: #d8f3dc;
  --cream: #f8f9f4;
  --ink: #1a1a1a;
  --muted: #5c5c5c;
  --border: #dadce0;
  --shadow: 0 1px 6px rgba(32, 33, 36, 0.18);
  --shadow-hover: 0 2px 10px rgba(32, 33, 36, 0.22);
  --danger: #c1121f;
  --danger-bg: #fff0f0;
  --ok: #2d6a4f;
  --ok-bg: #e8f5e9;
  --radius: 24px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  min-height: 100vh;
  line-height: 1.5;
}

a {
  color: var(--green);
  text-decoration: none;
  cursor: pointer;
}

a:hover {
  text-decoration: underline;
}

/* ---------- Homepage (Google-style) ---------- */
.home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 500px at 50% -10%, #e7f5ec 0%, transparent 60%),
    var(--cream);
}

.home-top {
  position: relative;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.5rem;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.home-top a {
  color: var(--muted);
  cursor: pointer;
  position: relative;
  z-index: 21;
}

.home-top a.cta-link,
.page-header a.cta-link {
  color: var(--green-dark);
  font-weight: 600;
  background: var(--green-light);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
}

.home-top a.cta-link:hover,
.page-header a.cta-link:hover {
  background: var(--green);
  color: #fff;
  text-decoration: none;
}

.biz-cta {
  margin-top: 1.75rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
}

.biz-cta a {
  font-weight: 600;
  color: var(--green);
}

.home-footer a {
  color: var(--green);
}

/* Honeypot field — hidden from people, catches bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  height: 0 !important;
  width: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.form-note {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

.turnstile-wrap {
  margin: 0.25rem 0 0.5rem;
}

.turnstile-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.turnstile-status {
  min-height: 1.25rem;
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.cf-turnstile {
  min-height: 65px;
}

/* Sponsors, packages, reviews */
.sponsor-slot {
  width: min(520px, 94vw);
  margin: 0 0 1.35rem;
  text-align: center;
}

.sponsor-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.sponsor-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  justify-content: center;
}

/* When multiple sponsors, secondary row can sit side-by-side */
.sponsor-row.sponsor-row-multi {
  flex-direction: row;
  flex-wrap: wrap;
}

.sponsor-card {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(480px, 92vw);
  max-width: 100%;
  min-height: 120px;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  overflow: visible;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: #fff;
  text-decoration: none !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.sponsor-card.sponsor-card-secondary {
  width: min(220px, 42vw);
  min-height: 88px;
  padding: 0.5rem 0.65rem;
}

.sponsor-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  text-decoration: none !important;
}

/* Full logo visible — never crop business artwork */
.sponsor-card img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  object-position: center;
  background: transparent;
}

.sponsor-card.sponsor-card-secondary img {
  max-height: 110px;
}

.sponsor-admin {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: #fff;
}

.sponsor-preview-wrap {
  margin-top: 0.5rem;
  max-width: 360px;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sponsor-preview-wrap img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 4px;
}

.pkg-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--green-light);
  color: var(--green-dark);
  vertical-align: middle;
}

.pkg-featured {
  background: #fff3cd;
  color: #7a5b00;
}

.pkg-homepage {
  background: #e7e0ff;
  color: #3b2d7a;
}

.pkg-base {
  background: #eee;
  color: #444;
}

.card-top {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.card-rating {
  margin: 0.25rem 0 0.5rem;
}

.card-more {
  margin-top: 0.75rem;
  font-weight: 600;
}

.stars {
  color: #d4a017;
  letter-spacing: 0.05em;
}

.stars-meta {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0;
}

.stars-empty {
  color: #ccc;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.review-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: #fff;
}

.review-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.35rem;
}

.card h2 a {
  color: var(--green-dark);
  text-decoration: none;
}

.card h2 a:hover {
  text-decoration: underline;
}

.thanks-panel {
  text-align: center;
  padding: 2rem 1.5rem;
}

.thanks-panel h1 {
  color: var(--green-dark);
  margin-bottom: 0.75rem;
}

.thanks-panel .btn-row {
  justify-content: center;
  margin-top: 1.25rem;
}

.home-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 1rem 3rem;
  /* Do not pull content over the header — that steals clicks from "List your business" */
  margin-top: 0;
  position: relative;
  z-index: 1;
}

.weekly-graphic {
  display: block;
  width: min(520px, 94vw);
  /* Keep a real painted box even if the image fails */
  min-height: 180px;
  aspect-ratio: 420 / 180;
  margin: 0 auto 0.85rem;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(27, 67, 50, 0.14), var(--shadow);
  background:
    linear-gradient(165deg, #87ceeb 0%, #e0f4ff 45%, #d8f3dc 100%);
  border: 1px solid rgba(45, 106, 79, 0.14);
  text-decoration: none !important;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  position: relative;
  z-index: 2;
  pointer-events: auto;
  cursor: pointer;
}

a.weekly-graphic:hover {
  box-shadow: 0 12px 32px rgba(27, 67, 50, 0.18), var(--shadow-hover);
  transform: translateY(-2px);
  text-decoration: none !important;
}

a.weekly-graphic:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

/* height:auto — height:100% + object-fit was collapsing some SVG <img>s to 0 */
.weekly-graphic img,
.weekly-graphic svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 160px;
  max-height: none;
  object-fit: contain;
  background: transparent;
  vertical-align: middle;
  pointer-events: none; /* clicks go to the <a> */
}

.weekly-caption {
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 auto 1.35rem;
  max-width: 520px;
  line-height: 1.45;
  position: relative;
  z-index: 2;
}

.weekly-caption a {
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
}

.weekly-caption .week-num {
  color: var(--muted);
  font-weight: 500;
}

.logo {
  font-size: clamp(2.5rem, 8vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--green-dark);
  margin-bottom: 0.25rem;
  text-align: center;
}

.logo span {
  color: var(--green);
}

.tagline {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 1.75rem;
  text-align: center;
}

.search-wrap {
  width: min(560px, 92vw);
  position: relative;
}

.search-box {
  display: flex;
  align-items: center;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 0.35rem 0.5rem 0.35rem 1.1rem;
  transition: box-shadow 0.15s ease;
}

.search-box:hover,
.search-box:focus-within {
  box-shadow: var(--shadow-hover);
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.05rem;
  padding: 0.7rem 0.5rem;
  background: transparent;
  font-family: inherit;
  color: var(--ink);
}

.search-box input::placeholder {
  color: #9aa0a6;
}

.search-box button {
  border: none;
  background: var(--green);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  padding: 0.65rem 1.25rem;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
}

.search-box button:hover {
  background: var(--green-dark);
}

.hints {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.hints button {
  background: none;
  border: none;
  color: var(--green);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  padding: 0 0.15rem;
}

.home-footer,
.site-footer {
  text-align: center;
  padding: 1rem 1.25rem;
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: center;
  align-items: center;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: #fff;
  margin-top: auto;
}

.hit-counter {
  font-variant-numeric: tabular-nums;
}

.hit-counter strong {
  color: var(--green-dark);
  font-weight: 700;
}

/* ---------- Results page ---------- */
.page-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-header .logo-sm {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--green-dark);
  white-space: nowrap;
}

.page-header .logo-sm span {
  color: var(--green);
}

.page-header .search-box {
  flex: 1;
  min-width: 220px;
  max-width: 560px;
}

.page-header nav {
  margin-left: auto;
  display: flex;
  gap: 1rem;
  font-size: 0.95rem;
}

.results-area {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.results-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.card h2 {
  font-size: 1.2rem;
  color: var(--green-dark);
  margin-bottom: 0.2rem;
}

.card .category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--green);
  background: var(--green-light);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.card .meta {
  font-size: 0.9rem;
  color: var(--ink);
}

.card .meta span {
  display: block;
  margin-top: 0.15rem;
}

.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

.empty h2 {
  color: var(--ink);
  margin-bottom: 0.5rem;
}

/* ---------- Admin page ---------- */
.admin-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

.admin-wrap h1 {
  font-size: 1.75rem;
  color: var(--green-dark);
  margin-bottom: 0.35rem;
}

.admin-intro {
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

.admin-intro strong {
  color: var(--ink);
}

.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.5rem;
}

.panel h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--green-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
}

.form-grid {
  display: grid;
  gap: 0.85rem;
}

.form-grid label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  color: var(--ink);
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
  border-color: var(--green);
}

.form-grid textarea {
  min-height: 90px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.7rem 1.2rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  filter: brightness(0.95);
}

.btn-primary {
  background: var(--green);
  color: #fff;
}

.btn-primary:hover {
  background: var(--green-dark);
  color: #fff;
}

.btn-secondary {
  background: #e8eaed;
  color: var(--ink);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #f5c2c7;
}

.btn-small {
  font-size: 0.9rem;
  padding: 0.45rem 0.85rem;
}

.biz-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.biz-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  background: #fafafa;
}

.biz-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.biz-item .desc {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.65rem;
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--green-dark);
  color: #fff;
  padding: 0.85rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease;
  z-index: 100;
  max-width: 90vw;
  text-align: center;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast.error {
  background: var(--danger);
}

.help-box {
  background: var(--ok-bg);
  border: 1px solid #a5d6a7;
  border-radius: 10px;
  padding: 1rem 1.15rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.help-box h3 {
  color: var(--ok);
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.help-box ol {
  margin-left: 1.25rem;
}

.help-box li {
  margin-bottom: 0.25rem;
}

.hidden {
  display: none !important;
}

/* ---------- Admin login gate ---------- */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(160deg, #e8f5e9 0%, var(--cream) 45%, #dfeee3 100%);
}

.login-card {
  width: min(400px, 100%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: var(--shadow-hover);
}

.login-brand {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 0.75rem;
}

.login-brand span {
  color: var(--green);
}

.login-card h1 {
  font-size: 1.4rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.login-hint {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.15rem;
}

.login-error {
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid #f5c2c7;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.login-footer {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.page-header nav {
  align-items: center;
}

.edit-banner {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.85rem;
  font-weight: 600;
  font-size: 0.95rem;
}
