/* DinoPedia - Custom Styles (Tailwind CDN + enhancements) */
:root {
  --forest: #0f2c23;
  --forest-light: #1a3f33;
  --sage: #3a5c4e;
  --sage-light: #5c7a6b;
  --terracotta: #b85c38;
  --terracotta-light: #d17a55;
  --sand: #e8d9c2;
  --cream: #f8f4eb;
  --ink: #1f1f1f;
  --ink-light: #3f3f3f;
  --white: #ffffff;
  --card-bg: #faf7f0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background-color: var(--cream);
}

/* Headings - elegant yet modern */
h1, h2, h3, .font-display {
  font-family: Georgia, 'Playfair Display', 'Times New Roman', serif;
  font-weight: 600;
  line-height: 1.1;
}

/* Navigation */
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}
.nav-link:hover {
  color: var(--terracotta);
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--terracotta);
}

/* Hero sections */
.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15, 44, 35, 0.35), rgba(15, 44, 35, 0.65));
}

/* Dinosaur Cards */
.dino-card {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
              border-color 0.2s ease;
  background-color: var(--card-bg);
  border: 1px solid #e5d9c7;
}
.dino-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  border-color: var(--terracotta);
}
.dino-card img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.dino-card:hover img {
  transform: scale(1.06);
}

/* Filter chips */
.filter-chip {
  transition: all 0.2s ease;
  border: 1px solid #d4c9b3;
}
.filter-chip.active, .filter-chip:hover {
  background-color: var(--terracotta);
  color: white;
  border-color: var(--terracotta);
  transform: translateY(-1px);
}

/* Detail page styles */
.fact-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5d9c7;
}
.fact-table tr:last-child td {
  border-bottom: none;
}

.detail-hero {
  background-size: cover;
  background-position: center 30%;
}

.section-title {
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 60%;
  height: 3px;
  background: linear-gradient(to right, var(--terracotta), transparent);
}

/* Video player */
.video-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.2);
}
.video-container video {
  width: 100%;
  display: block;
}

/* Gallery lightbox */
.gallery-img {
  cursor: zoom-in;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-img:hover {
  transform: scale(1.015);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.15);
}

/* Lightbox */
#lightbox {
  transition: opacity 0.2s ease;
}
#lightbox img {
  max-height: 85vh;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.5);
}

/* Timeline */
.timeline-item {
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 1.25rem;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #d4c9b3;
}
.timeline-item:last-child::before {
  display: none;
}
.timeline-dot {
  width: 14px;
  height: 14px;
  background: var(--terracotta);
  border: 3px solid var(--cream);
  z-index: 1;
}

/* Search input */
.search-input {
  transition: all 0.2s ease;
}
.search-input:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(184, 92, 56, 0.15);
}

/* Footer */
footer {
  background-color: var(--forest);
  color: #c5b9a3;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .hero {
    background-attachment: scroll;
  }
  .dino-card:hover {
    transform: translateY(-4px);
  }
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
  .dino-card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* ========================================
   VIDEO PLAYER WITH CUSTOM PLAY OVERLAY
   Makes it obvious that the poster is a video
   ======================================== */

.video-wrapper {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.2);
}

.video-wrapper video {
  width: 100%;
  display: block;
  cursor: pointer;
}

/* Custom prominent play button overlay */
.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.25) 0%,
    rgba(0, 0, 0, 0.45) 50%,
    rgba(0, 0, 0, 0.65) 100%
  );
  transition: background 0.2s ease;
  cursor: pointer;
  z-index: 10;
}

.video-play-overlay:hover {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.55) 50%,
    rgba(0, 0, 0, 0.75) 100%
  );
}

/* The actual circular play button */
.video-play-button {
  width: 78px;
  height: 78px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(255,255,255,0.3) inset;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
              background 0.2s ease;
}

.video-play-overlay:hover .video-play-button {
  transform: scale(1.08);
  background: white;
}

.video-play-button svg {
  width: 32px;
  height: 32px;
  margin-left: 5px; /* optical centering for triangle */
  fill: #0f2c23; /* forest green to match brand */
}

/* Optional small label */
.video-play-label {
  margin-top: 14px;
  font-size: 13px;
  letter-spacing: 1.5px;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

/* Utility */
.prose-custom p {
  max-width: 70ch;
  line-height: 1.75;
}
.badge {
  font-size: 0.75rem;
  letter-spacing: 0.025em;
}