/* === ZOOPEDIA PAGE === */

.page-container {
  max-width: 1600px;
  margin: 0 auto;
}

.zoopedia-header {
  text-align: center;
  padding: 64px 20px 56px;
  background: #fff;
  color: #111;
  border-bottom: 1px solid #ebebeb;
}

.zoopedia-header h1 {
  margin: 0 0 16px 0;
  font-size: 72px;
  font-weight: 900;
  letter-spacing: -2px;
  color: #111;
  line-height: 1.1;
}

.zoopedia-header > p {
  margin: 0 0 40px 0;
  font-size: 16px;
  color: #555;
  line-height: 1.6;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.zoopedia-header p.zoopedia-header-count {
  margin: 0 0 16px 0;
  font-size: 15px;
  font-weight: 600;
  color: #888;
}

/* Hero search bar */

.zoo-hero-search {
  max-width: 480px;
  margin: 0 auto 20px;
}

/* Dropdowns inside header */

.zoopedia-header .zoo-dropdowns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0 auto 24px;
  max-width: 900px;
}

.zoo-hero-search-label {
  font-size: 15px;
  font-weight: 700;
  color: #1a2e44;
  margin: 0 0 10px 4px;
  text-align: left;
}

.zoo-hero-search-wrap {
  display: flex;
  align-items: center;
  background: #f2f4f6;
  border-radius: 50px;
  padding: 6px 6px 6px 22px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

#zoo-search {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  outline: none;
  color: #333;
  padding: 6px 0;
}

#zoo-search::placeholder {
  color: #aaa;
}

.zoo-hero-search-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #000000;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.zoo-hero-search-btn:hover {
  background: #000000;
}

/* === IUCN ROW (inside header) === */

.zoo-iucn-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* === CONTROLS BAR (removed) === */

.zoopedia-controls {
  display: none;
}

.zoo-dropdowns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  flex: 1;
}

.zoo-dropdowns select {
  padding: 9px 30px 9px 14px;
  border: 1.5px solid #e8e8e8;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 500;
  color: #444;
  background-color: #f7f7f7;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.zoo-dropdowns select:focus,
.zoo-dropdowns select:hover {
  border-color: #bbb;
  background-color: #fff;
}

#clear-filters {
  padding: 9px 16px;
  border: 1.5px solid #e8e8e8;
  border-radius: 24px;
  background: #f7f7f7;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: #888;
  transition: all 0.15s;
  white-space: nowrap;
}

#clear-filters:hover {
  background: #fff0f0;
  border-color: #f44336;
  color: #f44336;
}

/* === CUSTOM DROPDOWNS === */

.zoo-cselect {
  position: relative;
}

.zoo-cselect-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border: 1.5px solid #e8e8e8;
  border-radius: 24px;
  background: #f7f7f7;
  font-size: 13px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}

.zoo-cselect-btn:hover,
.zoo-cselect.open .zoo-cselect-btn {
  border-color: #bbb;
  background: #fff;
}

.zoo-cselect-btn.has-value {
  border-color: #1a2e44;
  color: #1a2e44;
  background: #eef2f7;
}

.zoo-cselect-btn svg {
  transition: transform 0.15s;
  flex-shrink: 0;
}

.zoo-cselect.open .zoo-cselect-btn svg {
  transform: rotate(180deg);
}

.zoo-cselect-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 180px;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1.5px solid #e8e8e8;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.10);
  z-index: 200;
  padding: 6px;
}

.zoo-cselect.open .zoo-cselect-panel {
  display: block;
}

.zoo-cselect-item {
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13px;
  color: #444;
  cursor: pointer;
  transition: background 0.1s;
}

.zoo-cselect-item:hover {
  background: #f4f4f4;
}

.zoo-cselect-item.active {
  background: #eef2f7;
  color: #1a2e44;
  font-weight: 600;
}


.zoo-iucn-label {
  font-size: 11px;
  font-weight: 600;
  color: #bbb;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.zoo-iucn-scale {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
}

/* === IUCN CHIPS (scale) === */

.iucn-chip {
  padding: 6px 14px;
  border-radius: 24px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.15s;
  line-height: 1.3;
}

.iucn-chip.all {
  background: #f0f0f0;
  border-color: #e0e0e0;
  color: #888;
}
.iucn-chip.all.active {
  background: #222;
  border-color: #222;
  color: #fff;
}

.iucn-chip[data-iucn="LC"]  { background: #e8f5e9; border-color: #a5d6a7; color: #2e7d32; }
.iucn-chip[data-iucn="NT"]  { background: #f1f8e9; border-color: #c5e1a5; color: #558b2f; }
.iucn-chip[data-iucn="VU"]  { background: #fff8e1; border-color: #ffe082; color: #f57f17; }
.iucn-chip[data-iucn="EN"]  { background: #fff3e0; border-color: #ffcc80; color: #e65100; }
.iucn-chip[data-iucn="CR"]  { background: #ffebee; border-color: #ef9a9a; color: #c62828; }
.iucn-chip[data-iucn="EW"]  { background: #f3e5f5; border-color: #ce93d8; color: #6a1b9a; }
.iucn-chip[data-iucn="EX"]  { background: #f5f5f5; border-color: #bdbdbd; color: #212121; }
.iucn-chip[data-iucn="DD"]  { background: #eceff1; border-color: #b0bec5; color: #546e7a; }

.iucn-chip[data-iucn="LC"].active  { background: #2e7d32; border-color: #2e7d32; color: #fff; }
.iucn-chip[data-iucn="NT"].active  { background: #558b2f; border-color: #558b2f; color: #fff; }
.iucn-chip[data-iucn="VU"].active  { background: #f57f17; border-color: #f57f17; color: #fff; }
.iucn-chip[data-iucn="EN"].active  { background: #e65100; border-color: #e65100; color: #fff; }
.iucn-chip[data-iucn="CR"].active  { background: #c62828; border-color: #c62828; color: #fff; }
.iucn-chip[data-iucn="EW"].active  { background: #6a1b9a; border-color: #6a1b9a; color: #fff; }
.iucn-chip[data-iucn="EX"].active  { background: #212121; border-color: #212121; color: #fff; }
.iucn-chip[data-iucn="DD"].active  { background: #546e7a; border-color: #546e7a; color: #fff; }

/* === RESULTS COUNT === */

.zoo-results-count {
  padding: 10px 24px;
  font-size: 13px;
  color: #999;
}

/* === GRID === */

.zoopedia-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  padding: 0 24px 60px;
}

/* === CARD === */

.zoopedia-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  cursor: pointer;
  aspect-ratio: 3 / 4;
  cursor: pointer;
  background: #222;
}

.zoopedia-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  display: block;
  transform: translateZ(0);
  transition: transform 0.35s ease;
}

.zoopedia-card:hover img {
  transform: scale(1.05);
}

.animal-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 36px 12px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.2) 65%, transparent 100%);
}

.animal-name {
  margin: 0 0 3px 0;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* The name is a real <a> so crawlers can follow it — render it as plain text. */
.animal-name a {
  color: inherit;
  text-decoration: none;
}

.animal-scientific {
  margin: 0;
  font-size: 11px;
  color: rgba(255,255,255,0.80);
  font-style: italic;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.animal-zoo-count {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 11px;
  letter-spacing: 0.03em;
  color: #111;
  text-decoration: none;
  background: #fff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-radius: 999px;
  padding: 5px 13px;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: transform 0.2s, box-shadow 0.2s;
}

.animal-zoo-count:hover {
  transform: translateX(-50%) translateY(-3px) scale(1.06);
  box-shadow: 0 8px 24px rgba(0,0,0,0.28);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.iucn-badge {
  display: none;
}

/* === LOAD MORE === */

.zoo-load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 40px 0 70px;
}

#zoo-load-more {
  padding: 14px 48px;
  border: none;
  border-radius: 50px;
  background: #1a2e44;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 18px rgba(26,46,68,0.22);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

#zoo-load-more:hover {
  background: #243d58;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26,46,68,0.30);
}

#zoo-load-more:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(26,46,68,0.20);
}

.zoo-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px;
  color: #aaa;
  font-size: 16px;
}

/* === NO RESULTS === */

.no-results {
  text-align: center;
  padding: 60px;
  color: #999;
  font-size: 18px;
  grid-column: 1 / -1;
}

/* === RESPONSIVE === */

@media (max-width: 1100px) {
  .zoopedia-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 800px) {
  .zoopedia-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}

@media (max-width: 600px) {
  .zoopedia-header {
    padding: 32px 20px 24px;
  }

  .zoopedia-header h1 {
    font-size: 34px;
  }

  .zoopedia-controls {
    padding: 12px 12px 8px;
  }

  .zoopedia-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0 12px 40px;
  }

  .animal-name {
    font-size: 11px;
  }

  .animal-scientific {
    display: none;
  }

  .zoo-results-count {
    padding: 8px 12px;
  }
}
