/* ==========================================================================
   Orchards Near Me - bubbly gardening theme (green / red / white)
   ========================================================================== */

:root {
  --green: #2e8b3d;
  --green-dark: #1f6e2c;
  --green-light: #e8f6ea;
  --red: #e23b3b;
  --red-dark: #c12d2d;
  --white: #ffffff;
  --cream: #fbfdf7;
  --ink: #243024;
  --muted: #5d6b5d;
  --border: #dcebdd;
  --shadow: 0 8px 24px rgba(31, 110, 44, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}

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

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  font-family: "Baloo 2", "Nunito", system-ui, sans-serif;
  line-height: 1.15;
  color: var(--green-dark);
  margin: 0 0 0.5em;
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 4px solid var(--green);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: 1.45rem;
  color: var(--green-dark);
}

.brand:hover {
  text-decoration: none;
}

.logo-icon {
  width: 34px;
  height: 34px;
  display: inline-block;
  flex: none;
  margin-right: 2px;
}

.main-nav {
  display: flex;
  gap: 8px;
}

.main-nav a {
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 700;
  color: var(--ink);
  transition: background 0.15s, color 0.15s;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--green-light);
  color: var(--green-dark);
  text-decoration: none;
}

.main-nav a.cta {
  background: var(--red);
  color: var(--white);
}

.main-nav a.cta:hover {
  background: var(--red-dark);
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--green) 0%, var(--green-dark) 100%);
  color: var(--white);
  padding: 40px 0 28px;
  text-align: center;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  margin-bottom: 10px;
}

.hero p {
  margin: 0 auto;
  max-width: 640px;
  font-size: 1.1rem;
  opacity: 0.95;
}

.hero .pills {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.hero .pills span {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
}

/* ---------- Search / filter bar ---------- */
.controls {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 72px;
  z-index: 900;
}

.controls .container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.search-form {
  display: flex;
  gap: 8px;
  flex: 1 1 320px;
}

.search-form input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 999px;
  font-size: 1rem;
  font-family: inherit;
}

.search-form input:focus {
  outline: none;
  border-color: var(--green);
}

.btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  font-size: 1rem;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  transition: background 0.15s, transform 0.1s;
}

.btn:hover {
  background: var(--red-dark);
}

.btn:active {
  transform: scale(0.97);
}

.btn-ghost {
  background: var(--green-light);
  color: var(--green-dark);
}

.btn-ghost:hover {
  background: #d8efdb;
}

.filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-chip {
  border: 2px solid var(--border);
  background: var(--white);
  color: var(--ink);
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.filter-chip:hover {
  border-color: var(--green);
}

.filter-chip.active {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

.state-select {
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  color: var(--ink);
  background: var(--white);
  cursor: pointer;
}

/* ---------- Find layout (cards + map) ---------- */
.find-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 22px;
  padding: 24px 0 40px;
  align-items: stretch;
  height: calc(100vh - 220px);
  min-height: 560px;
}

.results-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.results-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}

.results-head h2 {
  margin: 0;
  font-size: 1.35rem;
}

.results-count {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
}

.cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  overflow-y: auto;
  padding-right: 8px;
  min-height: 0;
}

.cards::-webkit-scrollbar {
  width: 8px;
}

.cards::-webkit-scrollbar-track {
  background: var(--green-light);
  border-radius: 4px;
}

.cards::-webkit-scrollbar-thumb {
  background: var(--green);
  border-radius: 4px;
}

.cards::-webkit-scrollbar-thumb:hover {
  background: var(--green-dark);
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  transition: transform 0.12s, box-shadow 0.12s;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(31, 110, 44, 0.18);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.card h3 {
  margin: 0 0 4px;
  font-size: 1.25rem;
  color: var(--ink);
}

.badge {
  flex: none;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge.Orchard {
  background: var(--red);
  color: #fff;
}

.badge.Farm {
  background: var(--green);
  color: #fff;
}

.badge.GardenCenter {
  background: #6b4f2a;
  color: #fff;
}

.card-meta {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
  margin: 2px 0 8px;
}

.stars {
  color: #f0a500;
  font-weight: 800;
  letter-spacing: 1px;
}

.card-address {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 10px;
}

.card-review {
  background: var(--green-light);
  border-left: 4px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-style: italic;
  font-size: 0.92rem;
  color: #34452f;
  margin: 0 0 10px;
}

.card-review cite {
  display: block;
  font-style: normal;
  font-weight: 700;
  margin-top: 6px;
  color: var(--green-dark);
}

.card-links {
  display: flex;
  gap: 14px;
  font-weight: 700;
  font-size: 0.92rem;
}


.no-results {
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  color: var(--muted);
}

/* ---------- Map ---------- */
.map-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#map {
  flex: 1;
  min-height: 0;
  border-radius: var(--radius);
  border: 3px solid var(--white);
  box-shadow: var(--shadow);
  z-index: 1;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 700;
}

.map-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
}

.map-legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: none;
  position: relative;
}

.map-legend-dot::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 4px;
  background: #8b6f47;
  border-radius: 1px;
}

.map-legend-dot.orchard { background: #e23b3b; }
.map-legend-dot.farm    { background: #2e8b3d; }
.map-legend-dot.garden  { background: #6b4f2a; }

.leaflet-popup-content {
  font-family: "Nunito", sans-serif;
}

.map-popup h4 {
  margin: 0 0 4px;
  font-family: "Baloo 2", sans-serif;
  color: var(--green-dark);
  font-size: 1.05rem;
}

.map-popup .pop-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 4px;
}

/* ---------- Content pages ---------- */
.page {
  padding: 40px 0 60px;
}

.page .container {
  max-width: 820px;
}

.page h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
}

.page h2 {
  margin-top: 1.6em;
  font-size: 1.4rem;
}

.page p,
.page li {
  font-size: 1.04rem;
}

.page ul {
  padding-left: 1.2em;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.info-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 5px solid var(--green);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.info-card.red {
  border-top-color: var(--red);
}

.info-card h3 {
  margin-top: 0;
}

.sitemap-list {
  list-style: none;
  padding: 0;
}

.sitemap-list li {
  margin: 10px 0;
  font-size: 1.1rem;
  font-weight: 700;
}

/* ---------- Contact form ---------- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  margin-top: 24px;
}

.contact-form label {
  font-weight: 700;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-form input,
.contact-form textarea {
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--green);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-dark);
  color: #eaf6ec;
  padding: 30px 0;
  margin-top: 20px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.footer-nav a {
  color: #fff;
  font-weight: 700;
}

.footer-nav a:hover {
  color: #ffd9d9;
}

.footer-bottom {
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.85;
}

/* ---------- Mobile view toggle ---------- */
.view-toggle {
  display: none;
  gap: 6px;
}

.view-toggle button {
  flex: 1;
  padding: 9px 14px;
  border: 2px solid var(--border);
  background: var(--white);
  color: var(--ink);
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.view-toggle button.active {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .find-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .map-col {
    order: -1;
    height: 56vh;
    min-height: 360px;
  }
  .controls {
    position: static;
  }
  .cards {
    max-height: 60vh;
  }
}

@media (max-width: 768px) {
  .find-layout {
    gap: 12px;
    height: auto;
  }
  .view-toggle {
    display: flex;
    margin-bottom: 12px;
  }
  .results-col.hidden {
    display: none;
  }
  .map-col.hidden {
    display: none;
  }
  .map-col {
    height: 60vh;
    min-height: 320px;
  }
  .cards {
    max-height: calc(100vh - 380px);
  }
}

@media (max-width: 560px) {
  .main-nav a {
    padding: 8px 12px;
  }
  .brand {
    font-size: 1.2rem;
  }
  .search-form {
    flex: 1 1 100%;
  }
  .view-toggle {
    margin-bottom: 12px;
  }
  .map-col {
    height: 55vh;
    min-height: 280px;
  }
}
