/* Malabar Civet Explorer Styles */

.hero-card {
  background: linear-gradient(135deg, rgba(25, 20, 30, 0.92), rgba(45, 30, 55, 0.88)),
              url('../../assets/travel_rivers.png') center/cover no-repeat;
  border-radius: 20px;
  padding: 40px;
  color: #ffffff;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-tag {
  display: inline-block;
  background: rgba(239, 83, 80, 0.25);
  color: #ffcdd2;
  border: 1px solid rgba(239, 83, 80, 0.4);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.hero-card h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.hero-card h2 span {
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 400;
  color: #ce93d8;
}

.hero-description {
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 850px;
  color: #e0e0e0;
  margin-bottom: 25px;
}

.quick-stats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stat-badge {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
}

.stat-badge.critical {
  background: rgba(183, 28, 28, 0.4);
  border-color: rgba(239, 83, 80, 0.5);
  color: #ffcdd2;
}

/* TOC Nav */
.toc-nav {
  background: var(--card-bg, #ffffff);
  border-radius: 14px;
  padding: 15px 20px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color, #e0e0e0);
}

.toc-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-nav a {
  text-decoration: none;
  color: var(--text-color, #333333);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.toc-nav a:hover {
  color: #6a1b9a;
}

/* Content Sections */
.content-section {
  background: var(--card-bg, #ffffff);
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
  border-bottom: 2px solid var(--border-color, #f0f0f0);
  padding-bottom: 12px;
}

.section-header .icon {
  font-size: 1.5rem;
  color: #6a1b9a;
}

.section-header h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.8rem;
  color: var(--heading-color, #4a148c);
  margin: 0;
}

/* Grids & Cards */
.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.info-card {
  background: var(--card-sub-bg, #fcf8ff);
  border-radius: 14px;
  padding: 22px;
  border: 1px solid var(--border-color, #e1bee7);
}

.highlight-card {
  background: linear-gradient(135deg, #f3e5f5, #e1bee7);
  border-color: #ce93d8;
}

.styled-list {
  list-style: none;
  padding: 0;
  margin: 15px 0 0 0;
}

.styled-list li {
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.styled-list li i {
  color: #6a1b9a;
  margin-top: 4px;
}

.taxo-table-wrapper { overflow-x: auto; }
.taxo-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.taxo-table th, .taxo-table td { padding: 12px 18px; text-align: left; border-bottom: 1px solid #e0e0e0; }
.taxo-table th { background: #e1bee7; color: #4a148c; font-weight: 600; }

.habitat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.habitat-box {
  background: #ffffff;
  border-radius: 12px;
  padding: 18px;
  border: 1px solid #e0e0e0;
  text-align: center;
}

.habitat-box i { font-size: 2rem; color: #6a1b9a; margin-bottom: 10px; }

.trait-card, .threat-card {
  background: var(--card-sub-bg, #fcf8ff);
  border-radius: 14px;
  padding: 20px;
  border: 1px solid var(--border-color, #e0e0e0);
  transition: transform 0.2s ease;
}

.trait-card:hover, .threat-card:hover { transform: translateY(-4px); }
.trait-card i { color: #6a1b9a; font-size: 1.8rem; margin-bottom: 12px; }
.threat-card i { color: #d32f2f; font-size: 1.8rem; margin-bottom: 12px; }

.diet-items { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.diet-badge { background: #e1bee7; color: #4a148c; border: 1px solid #ce93d8; padding: 8px 16px; border-radius: 20px; font-weight: 500; }

.conservation-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 25px;
  background: #fbe9e7; border: 1px solid #ffab91; border-radius: 16px; padding: 25px;
}

.status-indicator.critical-bg {
  background: linear-gradient(135deg, #b71c1c, #d32f2f);
  padding: 20px 30px; border-radius: 14px; text-align: center; color: #ffffff;
}

.status-title { display: block; font-size: 0.8rem; letter-spacing: 1px; }
.status-val { display: block; font-size: 1.3rem; font-weight: 700; margin-top: 4px; }

.facts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.fact-box { background: #f3e5f5; border-radius: 14px; padding: 22px; position: relative; border: 1px solid #ce93d8; }
.fact-num { font-size: 2.2rem; font-weight: 800; color: #ab47bc; position: absolute; top: 15px; right: 20px; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.gallery-item { position: relative; border-radius: 14px; overflow: hidden; cursor: pointer; aspect-ratio: 16/10; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-caption { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0, 0, 0, 0.85)); color: #ffffff; padding: 15px 15px 10px; font-size: 0.95rem; }

.lightbox-modal { display: none; position: fixed; z-index: 9999; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.9); align-items: center; justify-content: center; flex-direction: column; }
.lightbox-modal[aria-hidden="false"] { display: flex; }
.lightbox-modal img { max-width: 90%; max-height: 80vh; border-radius: 12px; }
.lightbox-close { position: absolute; top: 25px; right: 35px; color: #fff; font-size: 2.5rem; cursor: pointer; }
.lightbox-caption-text { color: #e0e0e0; margin-top: 15px; font-size: 1.1rem; }

.references-list { list-style: none; padding: 0; margin: 0; }
.references-list li { padding: 10px 0; border-bottom: 1px solid #e0e0e0; display: flex; align-items: center; gap: 10px; }
.references-list li i { color: #6a1b9a; }
