/* nilgiri-marten-explorer style.css */
:root {
  --bg-dark: #0c1210;
  --bg-card: rgba(20, 30, 26, 0.75);
  --text-main: #f6f9f7;
  --text-muted: #a9bdb3;
  --accent-amber: #e0a527;
  --accent-green: #4ade80;
  --accent-vulnerable: #f59e0b;
  --border-glow: rgba(224, 165, 39, 0.25);
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.6;
  scroll-behavior: smooth;
}

header.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(12, 18, 16, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.back-link {
  color: var(--accent-amber);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.back-link:hover {
  text-decoration: underline;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, #e0a527, #4ade80);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-badge {
  background: rgba(224, 165, 39, 0.15);
  border: 1px solid var(--border-glow);
  color: var(--accent-amber);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

main.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.hero-section {
  text-align: center;
  margin-bottom: 1.5rem;
}

.hero-section h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 1.25rem;
  font-size: 1.1rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.fact-badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glow);
  border-radius: 9999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.fact-badge.status-vu {
  border-color: var(--accent-vulnerable);
  color: var(--accent-vulnerable);
}

.criteria-info-box {
  background: rgba(20, 28, 24, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid var(--accent-amber);
  border-radius: 0.5rem;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.section-quicklinks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.section-quicklinks a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.35rem 0.7rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.section-quicklinks a:hover,
.section-quicklinks a:focus-visible {
  color: var(--accent-amber);
  border-color: var(--border-glow);
  background: rgba(224, 165, 39, 0.1);
}

.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 1rem;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  scroll-margin-top: 90px;
}

.content-card h2 {
  margin-top: 0;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--accent-amber);
}

.content-card p {
  color: #e3ece6;
  margin-bottom: 0;
  line-height: 1.7;
}

.detail-list {
  margin: 0;
  padding-left: 1.25rem;
  color: #e3ece6;
}

.detail-list li {
  margin-bottom: 0.6rem;
  line-height: 1.6;
}

.detail-list li:last-child {
  margin-bottom: 0;
}

.taxonomy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.taxonomy-table th,
.taxonomy-table td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.taxonomy-table th {
  color: var(--text-muted);
  font-weight: 600;
  width: 40%;
}

.distribution-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: center;
}

@media (max-width: 700px) {
  .distribution-grid {
    grid-template-columns: 1fr;
  }
}

.map-svg-container {
  background: #050b08;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

svg.india-map-svg {
  width: 100%;
  height: auto;
  display: block;
}

.map-region-path {
  fill: #182420;
  stroke: #3a4d43;
  stroke-width: 1.5;
}

.map-highlight-region {
  fill: #e0a52755;
  stroke: #e0a527;
  stroke-width: 2;
  filter: drop-shadow(0 0 8px rgba(224, 165, 39, 0.6));
}

.distribution-states {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.status-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
}

.status-pill {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.85rem;
}

.status-pill.status-vu {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-vulnerable);
  border: 1px solid var(--accent-vulnerable);
}

.protected-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 600px) {
  .protected-grid {
    grid-template-columns: 1fr;
  }
}

.protected-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
}

.marten-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.gallery-img {
  border-radius: 0.75rem;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  cursor: default;
}

.reference-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.reference-list li {
  margin-bottom: 0.6rem;
}

.reference-list a {
  color: var(--accent-amber);
}

.fade-in-section {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 600px) {
  header.app-header {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
  }

  .page-title {
    font-size: 1.05rem;
  }

  main.container {
    padding: 1.5rem 1rem 3rem;
  }

  .hero-section h1 {
    font-size: 1.9rem;
  }
}