:root {
  --cream: #faf7f2;
  --sage: #8b9d77;
  --sage-dark: #6b7d5a;
  --forest: #2d3b2d;
  --terracotta: #c4785a;
  --moss: #4a5d3c;
  --sand: #e8e2d9;
  --charcoal: #2c2c2c;
  --gold: #b8956a;
}

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

body {
  font-family: "Outfit", sans-serif;
  background: var(--cream);
  color: var(--charcoal);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Decorative elements */
/* Header */
header {
  background: linear-gradient(135deg, var(--forest) 0%, var(--moss) 100%);
  color: var(--cream);
  padding: 80px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='50' r='40' fill='none' stroke='%23ffffff' stroke-width='0.3' opacity='0.1'/%3E%3C/svg%3E")
    repeat;
  background-size: 60px;
  opacity: 0.3;
}

header h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 30px;
  position: relative;
  animation: fadeInDown 0.8s ease-out;
}

header p {
  font-size: 1.1rem;
  font-weight: 300;
  max-width: 700px;
  margin: 0 auto;
  opacity: 0.9;
  position: relative;
  animation: fadeIn 1s ease-out 0.3s both;
}

.subtitle-accent {
  display: inline-block;
  background: var(--terracotta);
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 25px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  animation: fadeIn 1s ease-out 0.3s both;
}

header .data-source {
  display: block;
  margin-top: 20px;
  font-size: 0.9rem;
  font-style: italic;
  animation: fadeIn 1s ease-out 0.5s both;
}

header .data-source a {
  color: var(--cream);
  text-decoration: underline;
  text-underline-offset: 2px;
}

header .data-source a:hover {
  opacity: 0.8;
}

.header-intro {
  max-width: 700px;
  margin: 40px auto 0;
  padding-top: 35px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 1rem;
  line-height: 1.7;
  opacity: 0.85;
  text-align: left;
}

.header-intro p {
  margin-bottom: 1em;
  font-size: 1rem;
  max-width: none;
  text-align: left;
}

.header-intro p:last-child {
  margin-bottom: 0;
}

.header-intro a {
  color: var(--cream);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.header-intro a:hover {
  opacity: 0.8;
}

/* Main content */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 20px;
  position: relative;
  z-index: 1;
}

.credits-page main {
  max-width: 900px;
}

.section-heading {
  font-family: "Cormorant Garamond", serif;
  font-size: 4rem;
  color: var(--forest);
  text-align: center;
  line-height: 1.2;
  margin-bottom: 25px;
}

/* Info section */
.info-section {
  background: white;
  border-radius: 20px;
  padding: 50px;
  margin-bottom: 60px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--sand);
}

.info-section h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  color: var(--forest);
  line-height: 1.2;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.info-section h2::before {
  content: "";
  width: 40px;
  height: 3px;
  background: var(--sage);
  border-radius: 2px;
}

.info-content {
  display: grid;
  gap: 30px;
}

@media (min-width: 900px) {
  .info-content {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.info-text {
  line-height: 1.8;
}

.info-text p {
  margin-bottom: 1em;
}

.info-text p:last-child {
  margin-bottom: 0;
}

.info-text a {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.info-text a:hover {
  color: var(--sage-dark);
}

.info-text .note {
  font-size: 0.85rem;
  color: #888;
  font-style: italic;
}

.light-levels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

@media (max-width: 500px) {
  .light-levels {
    grid-template-columns: 1fr;
  }
}

.light-level-card {
  position: relative;
  background: var(--cream);
  padding: 25px;
  border-radius: 15px;
  border-left: 4px solid var(--sage);
  box-shadow: 0 0 0 rgba(139, 119, 90, 0);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.light-level-card.off {
  border-left-color: #4a4a4a;
}

.light-level-card.low {
  border-left-color: var(--sage);
}

.light-level-card.medium {
  border-left-color: #958778;
}

.light-level-card.high {
  border-left-color: #e8b86d;
}

.light-level-card .light-icon {
  background: none;
}

.light-level-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(139, 119, 90, 0.18);
}

.light-level-card h4 {
  font-weight: 600;
  color: var(--forest);
  line-height: 1.2;
  margin-bottom: 4px;
}

.light-level-card .unit-conversions {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 8px;
}

.light-level-card p {
  font-size: 0.95rem;
  color: #666;
}

/* Legend */
.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 15px;
  margin-bottom: 20px;
  padding: 15px;
  background: linear-gradient(135deg, var(--sand) 0%, #f5f2ed 100%);
  border-radius: 15px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.9rem;
}

.legend-item.low {
  color: var(--sage-dark);
}

.legend-item.medium {
  color: #7a6350;
}

.legend-item.high {
  color: #9a7033;
}

.legend-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.legend-icon svg {
  width: 100%;
  height: 100%;
}

.legend-icon.low svg {
  color: var(--sage);
}

.legend-icon.medium svg {
  color: #958778;
}

.legend-icon.high svg {
  color: #e8b86d;
}

/* Plant cards grid */
.plants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 25px;
}

.plant-card {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(139, 119, 90, 0.12);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid var(--sand);
  animation: fadeInUp 0.6s ease-out both;
}

.plant-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(139, 119, 90, 0.2);
}

/* Image Carousel */
.plant-carousel {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: var(--sand);
}

.carousel-images {
  display: flex;
  height: 100%;
  transition: transform 0.3s ease-out;
}

.carousel-images img {
  min-width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 2;
  color: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.plant-carousel:hover .carousel-btn {
  opacity: 1;
}

.carousel-btn:hover {
  background: white;
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

.carousel-btn svg {
  width: 20px;
  height: 20px;
  color: var(--forest);
  pointer-events: none;
}

.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.2s;
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

.carousel-dot.active {
  background: white;
}

/* Hide carousel controls for single image */
.plant-carousel[data-total="1"] .carousel-btn,
.plant-carousel[data-total="1"] .carousel-dots {
  display: none;
}

.plant-header {
  padding: 25px 30px;
  color: white;
  position: relative;
  overflow: hidden;
}

/* Badge in header */
.plant-header .light-badge {
  position: absolute;
  top: 50%;
  right: 30px;
  transform: translateY(-50%);
  font-size: 0.85rem;
  padding: 6px 14px 6px 10px;
}

.plant-header .light-badge .badge-icon {
  width: 20px;
  height: 20px;
}

.plant-header .light-badge.low-light {
  background: rgba(255, 255, 255, 0.9);
  color: var(--sage-dark);
}

.plant-header .light-badge.low-light .badge-icon {
  color: var(--sage);
}

.plant-header .light-badge.medium-light {
  background: rgba(255, 255, 255, 0.9);
  color: #7a6350;
}

.plant-header .light-badge.medium-light .badge-icon {
  color: #958778;
}

.plant-header .light-badge.high-light {
  background: rgba(255, 255, 255, 0.9);
  color: #9a7033;
}

.plant-header .light-badge.high-light .badge-icon {
  color: #e8b86d;
}

.plant-card[data-light="low"] .plant-header {
  background: linear-gradient(135deg, var(--sage) 0%, var(--sage-dark) 100%);
}

.plant-card[data-light="medium"] .plant-header {
  background: linear-gradient(135deg, #958778 0%, #766758 100%);
}

.plant-card[data-light="high"] .plant-header {
  background: linear-gradient(135deg, #e8b86d 0%, #d4a03c 100%);
  color: var(--charcoal);
}

.plant-header::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  opacity: 0.3;
}

.plant-name {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
}

.plant-scientific {
  font-size: 0.85rem;
  opacity: 0.85;
  font-style: italic;
}

.plant-details {
  padding: 10px 30px;
  display: flex;
  flex-direction: column;
}

/* Make details grow to fill space when no comment */
.plant-card:not(:has(.plant-comment)) .plant-details {
  flex: 1;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--sand);
}

.detail-row:last-of-type {
  border-bottom: none;
}

.detail-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  font-weight: 500;
  flex: 0 0 40%;
}

.detail-value {
  font-weight: 500;
  color: var(--forest);
  text-align: right;
  flex: 0 0 60%;
}


/* Flourish for cards without comments */
.plant-card:not(:has(.plant-comment)) .plant-details::after {
  content: "";
  flex: 1;
  min-height: 80px;
  width: 80px;
  margin: 0 auto 20px;
  background-color: var(--sand);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  opacity: 0.3;
}

.plant-card:not(:has(.plant-comment)):nth-child(10n+1) .plant-details::after {
  -webkit-mask-image: url('assets/illustrations/botanical-05.svg');
  mask-image: url('assets/illustrations/botanical-05.svg');
}

.plant-card:not(:has(.plant-comment)):nth-child(10n+2) .plant-details::after {
  -webkit-mask-image: url('assets/illustrations/botanical-08.svg');
  mask-image: url('assets/illustrations/botanical-08.svg');
}

.plant-card:not(:has(.plant-comment)):nth-child(10n+3) .plant-details::after {
  -webkit-mask-image: url('assets/illustrations/botanical-10.svg');
  mask-image: url('assets/illustrations/botanical-10.svg');
}

.plant-card:not(:has(.plant-comment)):nth-child(10n+4) .plant-details::after {
  -webkit-mask-image: url('assets/illustrations/botanical-14.svg');
  mask-image: url('assets/illustrations/botanical-14.svg');
}

.plant-card:not(:has(.plant-comment)):nth-child(10n+5) .plant-details::after {
  -webkit-mask-image: url('assets/illustrations/botanical-15.svg');
  mask-image: url('assets/illustrations/botanical-15.svg');
}

.plant-card:not(:has(.plant-comment)):nth-child(10n+6) .plant-details::after {
  -webkit-mask-image: url('assets/illustrations/botanical-18.svg');
  mask-image: url('assets/illustrations/botanical-18.svg');
}

.plant-card:not(:has(.plant-comment)):nth-child(10n+7) .plant-details::after {
  -webkit-mask-image: url('assets/illustrations/botanical-20.svg');
  mask-image: url('assets/illustrations/botanical-20.svg');
}

.plant-card:not(:has(.plant-comment)):nth-child(10n+8) .plant-details::after {
  -webkit-mask-image: url('assets/illustrations/botanical-23.svg');
  mask-image: url('assets/illustrations/botanical-23.svg');
}

.plant-card:not(:has(.plant-comment)):nth-child(10n+9) .plant-details::after {
  -webkit-mask-image: url('assets/illustrations/botanical-25.svg');
  mask-image: url('assets/illustrations/botanical-25.svg');
}

.plant-card:not(:has(.plant-comment)):nth-child(10n) .plant-details::after {
  -webkit-mask-image: url('assets/illustrations/botanical-28.svg');
  mask-image: url('assets/illustrations/botanical-28.svg');
}

.plant-comment {
  background: var(--cream);
  padding: 20px;
  margin: -5px 20px 30px;
  border-radius: 12px;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.6;
  border-left: 3px solid #999;
}

/* Light indicator badges */
.light-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px 4px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.light-badge .badge-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.light-badge.low-light {
  background: rgba(139, 157, 119, 0.2);
  color: var(--sage-dark);
}

.light-badge.medium-light {
  background: rgba(149, 135, 120, 0.15);
  color: #7a6350;
}

.light-badge.high-light {
  background: rgba(232, 184, 109, 0.2);
  color: #9a7033;
}

/* Category headers */
.category-header {
  grid-column: 1 / -1;
  padding: 40px 0 20px;
  text-align: center;
}

.category-header h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
  color: var(--forest);
  position: relative;
  display: inline-block;
}

.category-header h3::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--sage);
  border-radius: 2px;
}

/* Footer */
footer {
  background: var(--forest);
  color: var(--cream);
  text-align: center;
  padding: 50px 20px;
  margin-top: 80px;
}

footer p {
  opacity: 0.8;
  font-size: 0.9rem;
}

footer .data-source {
  font-size: 1rem;
  opacity: 1;
  margin-bottom: 5px;
}

footer a {
  color: var(--sage);
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--cream);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered animation delays */
.plant-card:nth-child(1) {
  animation-delay: 0.1s;
}
.plant-card:nth-child(2) {
  animation-delay: 0.15s;
}
.plant-card:nth-child(3) {
  animation-delay: 0.2s;
}
.plant-card:nth-child(4) {
  animation-delay: 0.25s;
}
.plant-card:nth-child(5) {
  animation-delay: 0.3s;
}
.plant-card:nth-child(6) {
  animation-delay: 0.35s;
}


/* Search/Filter */
.filter-bar {
  background: white;
  padding: 25px 30px;
  border-radius: 15px;
  margin-bottom: 20px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
  .plants-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .info-section {
    padding: 30px 20px;
  }

  header {
    padding: 50px 20px;
  }

  .section-heading {
    font-size: 2.5rem;
    margin-bottom: 15px;
  }

  .plant-header {
    padding-left: 25px;
    padding-right: 25px;
  }

  .plant-details {
    padding-left: 25px;
    padding-right: 25px;
  }
  main {
    padding-left: 15px;
    padding-right: 15px;
  }
  .filter-bar, .legend {
    margin-bottom: 15px;
  }
}

.search-container {
  position: relative;
  flex: 1;
  min-width: 250px;
}

.search-input {
  width: 100%;
  padding: 15px 80px 15px 25px;
  border: 2px solid var(--sand);
  border-radius: 30px;
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 4px rgba(139, 157, 119, 0.1);
}

.filter-btn {
  padding: 15px 25px;
  border: 2px solid var(--sand);
  background: white;
  border-radius: 30px;
  font-family: "Outfit", sans-serif;
  font-size: 0.9rem;
  color: var(--charcoal);
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--forest);
  border-color: var(--forest);
  color: white;
}

.filter-btn[data-filter="low"]:hover,
.filter-btn[data-filter="low"].active {
  background: var(--sage);
  border-color: var(--sage);
}

.filter-btn[data-filter="medium"]:hover,
.filter-btn[data-filter="medium"].active {
  background: #958778;
  border-color: #958778;
}

.filter-btn[data-filter="high"]:hover,
.filter-btn[data-filter="high"].active {
  background: #e8b86d;
  border-color: #e8b86d;
  color: var(--charcoal);
}

.filter-icon {
  width: 18px;
  height: 18px;
  margin-right: 5px;
  vertical-align: -4px;
}

/* Color-coded icons in unselected state */
.filter-btn[data-filter="all"] .filter-icon {
  color: var(--forest);
}

.filter-btn[data-filter="low"] .filter-icon {
  color: var(--sage);
}

.filter-btn[data-filter="medium"] .filter-icon {
  color: #958778;
}

.filter-btn[data-filter="high"] .filter-icon {
  color: #e8b86d;
}

/* White icons when button is active/hovered */
.filter-btn:hover .filter-icon,
.filter-btn.active .filter-icon {
  color: white;
}

.filter-btn[data-filter="high"]:hover .filter-icon,
.filter-btn[data-filter="high"].active .filter-icon {
  color: var(--charcoal);
}

.result-count {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: var(--charcoal);
  opacity: 0.5;
  pointer-events: none;
}

/* Compact sticky filter bar */
.filter-bar-sticky {
  position: fixed;
  top: -100px;
  left: 0;
  right: 0;
  z-index: 100;
  background: white;
  padding: 10px 20px;
  box-shadow: 0 2px 10px rgba(139, 119, 90, 0.15);
  visibility: hidden;
  transition: top 0.3s ease, visibility 0.3s ease;
}

.filter-bar-sticky-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-bar-sticky.visible {
  top: 0;
  visibility: visible;
}

.search-container-compact {
  position: relative;
  flex: 1;
  min-width: 120px;
}

.search-input-compact {
  width: 100%;
  padding: 8px 70px 8px 15px;
  border: 2px solid var(--sand);
  border-radius: 20px;
  font-family: "Outfit", sans-serif;
  font-size: 0.85rem;
  color: var(--charcoal);
  transition: all 0.3s ease;
}

.search-input-compact:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(139, 157, 119, 0.1);
}

.result-count-compact {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--charcoal);
  opacity: 0.5;
  pointer-events: none;
  white-space: nowrap;
}

.filter-btns-compact {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.filter-btn-compact {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 2px solid var(--sand);
  background: white;
  border-radius: 20px;
  font-family: "Outfit", sans-serif;
  font-size: 0.75rem;
  color: var(--charcoal);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-icon-compact {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Color-coded icons in unselected state (sticky bar) */
.filter-btn-compact[data-filter="all"] .filter-icon-compact {
  color: var(--forest);
}

.filter-btn-compact[data-filter="low"] .filter-icon-compact {
  color: var(--sage);
}

.filter-btn-compact[data-filter="medium"] .filter-icon-compact {
  color: #958778;
}

.filter-btn-compact[data-filter="high"] .filter-icon-compact {
  color: #e8b86d;
}

/* White icons when button is active/hovered (sticky bar) */
.filter-btn-compact:hover .filter-icon-compact,
.filter-btn-compact.active .filter-icon-compact {
  color: white;
}

.filter-btn-compact[data-filter="high"]:hover .filter-icon-compact,
.filter-btn-compact[data-filter="high"].active .filter-icon-compact {
  color: var(--charcoal);
}

/* Default: show full text, hide short */
.btn-text-short {
  display: none;
}

.filter-btn-compact:hover,
.filter-btn-compact.active {
  background: var(--forest);
  border-color: var(--forest);
  color: white;
}

.filter-btn-compact[data-filter="low"]:hover,
.filter-btn-compact[data-filter="low"].active {
  background: var(--sage);
  border-color: var(--sage);
}

.filter-btn-compact[data-filter="medium"]:hover,
.filter-btn-compact[data-filter="medium"].active {
  background: #958778;
  border-color: #958778;
}

.filter-btn-compact[data-filter="high"]:hover,
.filter-btn-compact[data-filter="high"].active {
  background: #e8b86d;
  border-color: #e8b86d;
  color: var(--charcoal);
}

/* Responsive text hiding for sticky bar buttons */
@media (max-width: 900px) {
  .btn-text-full {
    display: none;
  }
  .btn-text-short {
    display: inline;
  }
}

@media (max-width: 600px) {
  .btn-text-full,
  .btn-text-short {
    display: none;
  }
  .filter-btn-compact {
    padding: 6px 10px;
  }
}

@media (max-width: 768px) {
  .search-input-compact {
    font-size: 16px;
    transform: scale(0.85);
    transform-origin: left center;
    width: 117.65%;
  }
  .search-container-compact {
    overflow: visible;
  }
}

@media (max-width: 400px) {
  .search-input-compact {
    padding-right: 15px;
  }
  .result-count-compact {
    display: none;
  }
}

@media (max-width: 1280px) {
  .filter-bar {
    gap: 10px;
  }

  .filter-btn {
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  .search-input {
    padding: 10px 60px 10px 15px;
    font-size: 0.9rem;
  }
}

@media (max-width: 1000px) {
  .search-container {
    flex-basis: 100%;
    min-width: unset;
  }
}

@media (max-width: 768px) {
  .filter-bar {
    padding: 15px;
    gap: 8px;
  }

  .search-container {
    flex-basis: 100%;
    min-width: unset;
  }

  .search-input {
    padding: 10px 60px 10px 15px;
    font-size: 16px;
  }
}

/* Search highlight */
.plant-name mark,
.plant-scientific mark {
  background: rgba(184, 149, 106, 0.3);
  color: inherit;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(184, 149, 106, 0.5);
}

/* Scroll to top */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--forest);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  font-size: 1.2rem;
  z-index: 100;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: var(--sage);
  transform: translateY(-3px);
}

/* ===== Photo Credits Page ===== */
.credits-section {
  background: white;
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 40px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--sand);
}

.credits-section h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
  color: var(--forest);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.credits-section h2::before {
  content: "";
  width: 40px;
  height: 3px;
  background: var(--sage);
  border-radius: 2px;
}

.credits-section .section-intro {
  color: #666;
  margin-bottom: 25px;
  line-height: 1.7;
}

.attribution-note {
  background: var(--cream);
  padding: 15px 20px;
  border-radius: 10px;
  border-left: 3px solid var(--gold);
  margin-bottom: 25px;
  font-size: 0.9rem;
}

.attribution-note code {
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

.data-attribution {
  background: linear-gradient(135deg, var(--cream) 0%, #f5f2ed 100%);
  border-radius: 15px;
  padding: 30px;
  border-left: 4px solid var(--sage);
}

.data-attribution h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.data-attribution h3 a {
  color: var(--forest);
  text-decoration: none;
}

.data-attribution h3 a:hover {
  color: var(--sage-dark);
}

.data-attribution .author {
  font-size: 1.1rem;
  color: var(--charcoal);
  margin-bottom: 4px;
}

.data-attribution .book {
  color: #666;
  margin-bottom: 15px;
}

.data-attribution .book a {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.data-attribution .book a:hover {
  color: var(--sage-dark);
}

.data-attribution .description {
  color: #555;
  line-height: 1.6;
  margin-bottom: 1em;
}

.data-attribution .description:last-child {
  margin-bottom: 0;
}

.credits-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}

.credits-table th {
  text-align: left;
  padding: 12px 15px;
  background: var(--cream);
  color: var(--forest);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.credits-table th:first-child {
  border-radius: 8px 0 0 8px;
}

.credits-table th:last-child {
  border-radius: 0 8px 8px 0;
}

.credits-table td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--sand);
  vertical-align: top;
  line-height: 2;
}

.credits-table tr:last-child td {
  border-bottom: none;
}

.credits-table tr:hover td {
  background: rgba(139, 157, 119, 0.05);
}

.credits-table a {
  color: var(--sage-dark);
  text-decoration: none;
  margin-left: 0.2em;
}

.credits-table td a:only-child {
  margin-left: 0;
}

.credits-table a:hover {
  color: var(--forest);
  text-decoration: underline;
}

.plant-folder {
  font-weight: 500;
  color: var(--forest);
}

.license-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.4;
}

.license-badge.cc-by {
  background: rgba(139, 157, 119, 0.2);
  color: var(--sage-dark);
}

.license-badge.cc-by-sa {
  background: rgba(184, 149, 106, 0.2);
  color: #8a6d3b;
}

.license-badge.cc0 {
  background: rgba(45, 59, 45, 0.15);
  color: var(--forest);
}

.license-badge.freepik {
  background: rgba(196, 120, 90, 0.2);
  color: #9a5a3c;
}

.license-badge.unsplash {
  background: rgba(44, 44, 44, 0.1);
  color: var(--charcoal);
}

.back-link {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 25px;
  background: var(--sage);
  color: white;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.back-link:hover {
  background: var(--forest);
  transform: translateY(-2px);
}

/* License summary card */
.license-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.license-card {
  background: var(--cream);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
}

.license-card h4 {
  font-size: 0.9rem;
  color: var(--forest);
  margin-bottom: 10px;
}

.license-card .attr-required {
  font-size: 0.85rem;
  color: #666;
}

.license-card .attr-required.yes {
  color: var(--terracotta);
}

.license-card .attr-required.no {
  color: var(--sage-dark);
}

@media (max-width: 768px) {
  .credits-section {
    padding: 25px 15px;
  }

  .credits-table {
    font-size: 0.8rem;
  }

  .credits-table th,
  .credits-table td {
    padding: 10px 8px;
  }
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  transition: opacity 0.2s;
  line-height: 1;
  padding: 10px;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-btn.prev {
  left: 20px;
}

.lightbox-btn.next {
  right: 20px;
}

.lightbox-btn svg {
  width: 28px;
  height: 28px;
  pointer-events: none;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.lightbox-counter {
  position: absolute;
  bottom: 60px;
  color: white;
  font-size: 0.9rem;
  opacity: 0.7;
}

.lightbox-caption {
  position: absolute;
  bottom: 30px;
  color: white;
  font-size: 1.1rem;
  font-family: "Cormorant Garamond", serif;
}

/* Make carousel images clickable */
.carousel-images img {
  cursor: zoom-in;
}

/* ===== Light Requirement Icons (info section) ===== */
.light-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  padding: 6px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.light-icon svg {
  width: 100%;
  height: 100%;
}

.light-icon.low svg {
  color: var(--sage);
}

.light-icon.medium svg {
  color: #958778;
  transform: scale(1.15);
}

.light-icon.high svg {
  color: #e8b86d;
  transform: scale(1.15);
}

.light-icon.off svg {
  color: #4a4a4a;
}

@media (max-width: 768px) {
  .lightbox-btn {
    width: 40px;
    height: 40px;
  }

  .lightbox-btn svg {
    width: 22px;
    height: 22px;
  }

  .lightbox-btn.prev {
    left: 10px;
  }

  .lightbox-btn.next {
    right: 10px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
    font-size: 2rem;
  }
}

/* No results message */
.no-results {
  display: none;
  text-align: center;
  padding: 60px 20px;
  color: var(--charcoal);
}

.no-results::before {
  content: "";
  display: block;
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  background-color: var(--sand);
  -webkit-mask-image: url('assets/illustrations/botanical-02.svg');
  mask-image: url('assets/illustrations/botanical-02.svg');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  opacity: 0.6;
}

.no-results p {
  font-size: 1.1rem;
  font-style: italic;
  opacity: 0.7;
}
