/* ============================================
   Denver Garden Plant Guide — Stylesheet
   ============================================ */

:root {
  --green-dark: #2d5016;
  --green-mid: #4a7c28;
  --green-light: #7cb342;
  --green-pale: #e8f5e9;
  --earth-brown: #5d4037;
  --earth-light: #8d6e63;
  --sand: #f5f0e8;
  --cream: #faf8f3;
  --gold: #f9a825;
  --foliage-orange: #e8a030;
  --berry-plum: #9b2d5b;
  --coral: #e8725a;
  --sky: #64b5f6;
  --winter-blue: #90a4ae;
  --text: #2e2e2e;
  --text-light: #666;
  --text-muted: #999;
  --border: #e0ddd5;
  --shadow: rgba(0,0,0,0.08);
  --radius: 12px;
  --radius-sm: 8px;
}

@keyframes hero-pan {
  from { background-position: center 100%; }
  to   { background-position: center 30%; }
}

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

body {
  font-family: 'transat', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 18px;
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
}

/* === HERO === */
.hero {
  background: url('images/hero.jpg') center 100% / cover no-repeat;
  animation: hero-pan 30s linear infinite alternate;
  color: white;
  padding: 4rem 2rem 3rem;
  text-align: center;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}
.hero-content {
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}
.hero .subtitle {
  font-size: 1.3rem;
  opacity: 0.9;
  margin-bottom: 0.3rem;
}
.hero .meta {
  font-size: 0.95rem;
  opacity: 0.7;
}

/* === STICKY NAV === */
.sticky-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: white;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px var(--shadow);
}
.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.nav-filters {
  display: flex;
  gap: 0.5rem;
}
.filter-btn {
  padding: 0.4rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: white;
  color: var(--text-light);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.filter-btn:hover {
  border-color: var(--green-mid);
  color: var(--green-mid);
}
.filter-btn.active {
  background: var(--green-mid);
  border-color: var(--green-mid);
  color: white;
}
.nav-sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-sort label {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.nav-sort select {
  padding: 0.35rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  font-size: 0.9rem;
  color: var(--text);
}
.sort-dir-btn {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: white;
  color: var(--text-light);
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
  line-height: 1;
}
.sort-dir-btn:hover {
  border-color: var(--green-mid);
  color: var(--green-mid);
}
.sort-dir-btn.desc {
  transform: scaleY(-1);
}
.nav-search {
  margin-left: auto;
  position: relative;
}
.nav-search input {
  padding: 0.4rem 2rem 0.4rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 0.9rem;
  width: 220px;
  transition: border-color 0.2s;
}
.nav-search input:focus {
  outline: none;
  border-color: var(--green-mid);
}
.search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-clear:hover {
  color: var(--text);
  background: var(--border);
}

/* === FILTER PANEL === */
.filter-panel-toggle {
  padding: 0.4rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: white;
  color: var(--text-light);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.filter-panel-toggle:hover,
.filter-panel-toggle.active {
  border-color: var(--green-mid);
  color: var(--green-mid);
}
.filter-sliders {
  display: none;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 1.25rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem 1rem;
  align-items: end;
  border-top: 1px solid var(--border);
}
.filter-sliders.open {
  display: grid;
}
.slider-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}
.slider-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
  display: flex;
  justify-content: space-between;
}
.slider-group label span {
  font-weight: 400;
  color: var(--text-muted);
}
/* Dual-range: two inputs stacked on top of each other */
.dual-range {
  position: relative;
  height: 28px;
}
.dual-range input[type="range"] {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  height: 28px;
  margin: 0;
  padding: 0;
}
.dual-range input[type="range"]:first-child::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: var(--border);
}
.dual-range input[type="range"]:last-child::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: transparent;
}
.dual-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green-mid);
  border: 2px solid white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  margin-top: -7px;
  pointer-events: auto;
  cursor: pointer;
  position: relative;
  z-index: 2;
}
/* Single range (bloom months) */
.slider-group > input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  outline: none;
  margin: 12px 0;
}
.slider-group > input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green-mid);
  border: 2px solid white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  cursor: pointer;
}
.filter-reset {
  padding: 0.4rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: white;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  align-self: end;
  transition: all 0.2s;
}
.filter-reset:hover {
  border-color: var(--coral);
  color: var(--coral);
}

/* === BLOOM CALENDAR === */
.bloom-calendar {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}
.bloom-calendar h2 {
  font-size: 1.6rem;
  color: var(--green-dark);
  margin-bottom: 0.3rem;
}
.section-intro {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.calendar-grid {
  display: grid;
  grid-template-columns: 180px 50px repeat(12, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.95rem;
}
.cal-header {
  background: var(--green-dark);
  color: white;
  padding: 0.5rem 0.3rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.75rem;
}
.cal-header.name-col {
  text-align: left;
  padding-left: 0.75rem;
}
.cal-plant-name {
  background: white;
  padding: 0.4rem 0.75rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-plant-name:hover {
  background: var(--green-pale);
}
.cal-cell {
  background: white;
  padding: 0.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
}
.cal-bloom {
  width: 100%;
  height: 18px;
  border-radius: 9px;
}
.bloom-flower { background: var(--coral); }
.bloom-berry { background: var(--berry-plum); }
.bloom-bark { background: var(--earth-light); }
.bloom-seedhead { background: var(--winter-blue); }
.bloom-foliage { background: var(--foliage-orange); }

.cal-header.size-col {
  font-size: 0.65rem;
}
.cal-size-cell {
  padding: 0.2rem;
}
.cal-size-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.cal-size-shape {
  opacity: 0.5;
  flex-shrink: 0;
}
.cal-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  background: white;
}

.calendar-legend {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-light);
}
.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 7px;
}

/* === PLANT CARDS === */
.plants-section {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}
.plants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}
.plant-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.plant-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}
.card-image-wrapper {
  width: 100%;
  height: 220px;
  overflow: hidden;
}
.card-image-placeholder {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: linear-gradient(145deg, #e8f5e9 0%, #c8e6c9 30%, #a5d6a7 60%, #dcedc8 100%);
  position: relative;
}
.card-image-placeholder::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.4) 0%, transparent 70%);
}
.badge-flower + .card-image-placeholder,
.plant-card:nth-child(even) .card-image-placeholder {
  background: linear-gradient(145deg, #fce4ec 0%, #f8bbd0 30%, #f48fb1 50%, #fce4ec 100%);
}
.card-body {
  padding: 1.25rem;
}
.card-type-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}
.badge-shrub {
  background: var(--green-pale);
  color: var(--green-dark);
}
.badge-flower {
  background: #fce4ec;
  color: #c62828;
}
.card-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 0.1rem;
}
.card-scientific {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}
.card-desc {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.stat {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.95rem;
  color: var(--text-light);
}
.stat-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}
.card-seasons {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.season-tag {
  font-size: 0.85rem;
  padding: 0.15rem 0.5rem;
  border-radius: 8px;
  font-weight: 500;
}
.season-spring { background: #e8f5e9; color: #2e7d32; }
.season-summer { background: #fff3e0; color: #e65100; }
.season-fall { background: #fbe9e7; color: #bf360c; }
.season-winter { background: #e3f2fd; color: #1565c0; }

/* === MODAL === */
.plant-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1000;
}
.plant-modal.open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
}
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}
.modal-content {
  position: relative;
  background: white;
  border-radius: var(--radius);
  max-width: 900px;
  width: 100%;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  margin-top: 2rem;
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 10;
}
.modal-hero-img {
  width: 100%;
  height: 350px;
  object-fit: cover;
}
.modal-hero-wrapper {
  width: 100%;
  height: 350px;
  overflow: hidden;
}
.modal-hero-placeholder {
  width: 100%;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  background: linear-gradient(145deg, #e8f5e9 0%, #c8e6c9 30%, #a5d6a7 60%, #dcedc8 100%);
  position: relative;
}
.modal-hero-placeholder::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.4) 0%, transparent 70%);
}
.image-credit {
  padding: 0.4rem 2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--sand);
}
.image-credit a {
  color: var(--text-light);
  text-decoration: underline;
}
.image-credit a:hover {
  color: var(--green-mid);
}
.modal-body {
  padding: 2rem;
}
.modal-body h2 {
  font-size: 1.8rem;
  color: var(--green-dark);
  margin-bottom: 0.2rem;
}
.modal-body .scientific {
  font-style: italic;
  color: var(--text-muted);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}
.modal-body .description {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.detail-card {
  background: var(--sand);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}
.detail-card h3 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.detail-card p, .detail-card li {
  font-size: 1.2rem;
  color: var(--text);
}
.detail-card ul {
  list-style: none;
  padding: 0;
}
.detail-card li {
  padding: 0.25rem 0;
  padding-left: 1.2rem;
  position: relative;
}
.detail-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-mid);
}

.seasonal-interest {
  margin-bottom: 2rem;
}
.seasonal-interest h3 {
  font-size: 1.1rem;
  color: var(--green-dark);
  margin-bottom: 0.75rem;
}
.season-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}
.season-card {
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
}
.season-card.spring { background: #e8f5e9; }
.season-card.summer { background: #fff8e1; }
.season-card.fall { background: #fbe9e7; }
.season-card.winter { background: #e3f2fd; }
.season-card .season-name {
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}
.season-card .season-desc {
  font-size: 1.2rem;
  color: var(--text-light);
}

.size-visual {
  margin-bottom: 2rem;
}
.size-visual h3 {
  font-size: 1.1rem;
  color: var(--green-dark);
  margin-bottom: 0.75rem;
}
.size-diagram {
  background: var(--sand);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2rem;
  min-height: 200px;
  overflow: hidden;
}
.size-plant {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.size-shape {
  border-radius: 50%;
  background: var(--green-light);
  opacity: 0.6;
  position: relative;
}
.size-label {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-light);
  text-align: center;
  white-space: nowrap;
}
.size-person {
  width: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.size-person-body {
  width: 2px;
  background: var(--text-muted);
}
.size-person-head {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
}
.size-person-label {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  text-align: center;
}

.reviews-section {
  margin-bottom: 1.5rem;
}
.reviews-section h3 {
  font-size: 1.1rem;
  color: var(--green-dark);
  margin-bottom: 0.75rem;
}
.review-card {
  background: var(--sand);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  border-left: 3px solid var(--green-mid);
}
.review-text {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.6;
}
.review-source {
  font-size: 1rem;
  color: var(--text-muted);
}

.sources-section {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}
.sources-section h3 {
  font-size: 1.1rem;
  color: var(--green-dark);
  margin-bottom: 0.75rem;
}
.sources-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sources-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--sand);
  font-size: 1.2rem;
}
.sources-list li:last-child {
  border-bottom: none;
}
.sources-list a {
  color: var(--green-mid);
  text-decoration: none;
}
.sources-list a:hover {
  text-decoration: underline;
  color: var(--green-dark);
}

.care-section {
  margin-bottom: 1.5rem;
}
.care-section h3 {
  font-size: 1.1rem;
  color: var(--green-dark);
  margin-bottom: 0.75rem;
}
.care-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.care-item {
  background: var(--sand);
  border-radius: var(--radius-sm);
  padding: 1rem;
}
.care-item h4 {
  font-size: 0.95rem;
  color: var(--earth-brown);
  margin-bottom: 0.4rem;
}
.care-item p {
  font-size: 1.2rem;
  color: var(--text-light);
}

/* === FOOTER === */
footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 2rem;
  font-size: 0.85rem;
}
footer p { margin-bottom: 0.3rem; }
footer a { color: rgba(255,255,255,0.85); }
footer a:hover { color: white; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .nav-inner { flex-direction: column; align-items: stretch; }
  .nav-search { margin-left: 0; }
  .nav-search input { width: 100%; }
  .filter-sliders.open { grid-template-columns: 1fr 1fr; }
  .plants-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .season-cards { grid-template-columns: 1fr 1fr; }
  .care-grid { grid-template-columns: 1fr; }

  /* Calendar: horizontal scroll with sticky plant name */
  .bloom-calendar { padding: 0 0 0 0; margin-left: 0; margin-right: 0; }
  .bloom-calendar h2,
  .bloom-calendar .section-intro,
  .bloom-calendar .calendar-legend { padding: 0 1rem; }
  .calendar-grid {
    display: grid;
    grid-template-columns: 110px 36px repeat(12, 48px);
    font-size: 0.7rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }
  .cal-header.name-col,
  .cal-plant-name {
    position: sticky;
    left: 0;
    z-index: 2;
    background: white;
    box-shadow: 2px 0 4px rgba(0,0,0,0.06);
  }
  .cal-header.name-col {
    background: var(--green-dark);
  }
  .plant-modal.open { padding: 1rem; }
  .modal-body { padding: 1.25rem; }
  .modal-body h2 { font-size: 1.4rem; }
}

/* === HIDDEN UTILITY === */
.hidden { display: none !important; }

/* === WATER METER === */
.water-meter {
  display: flex;
  gap: 3px;
}
.water-drop {
  width: 10px;
  height: 14px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: var(--sky);
  opacity: 0.3;
}
.water-drop.filled {
  opacity: 1;
}

/* === RESILIENCE METER === */
.resilience-meter {
  display: flex;
  gap: 2px;
}
.resilience-bar {
  width: 16px;
  height: 6px;
  border-radius: 3px;
  background: var(--green-light);
  opacity: 0.2;
}
.resilience-bar.filled {
  opacity: 1;
}

/* === NO RESULTS === */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}
