:root {
  --primary: #606c38;
  --primary-dark: #283618;
  --accent: #bc6c25;
  --earth: #dda15e;
  --bg: #fefae0;
  --surface: #ffffff;
  --text: #1a1f0e;
  --text-muted: #5c6344;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(40, 54, 24, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: var(--primary-dark); text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.site-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white; padding: 16px 0; position: sticky; top: 0; z-index: 100;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { font-size: 1.5rem; font-weight: 700; color: white; text-decoration: none; }
.nav-links { display: flex; gap: 24px; list-style: none; }
.nav-links a { color: rgba(255,255,255,0.9); }
.search-box input { padding: 8px 16px; border: none; border-radius: 24px; width: 220px; }

.hero {
  background: linear-gradient(135deg, #1a1f0e 0%, var(--primary) 50%, var(--accent) 100%);
  color: white; padding: 80px 0; text-align: center;
}
.hero h1 { font-size: 3rem; margin-bottom: 16px; font-weight: 800; }
.hero p { font-size: 1.25rem; opacity: 0.9; max-width: 600px; margin: 0 auto; }
.hero-stats { display: flex; justify-content: center; gap: 48px; margin-top: 40px; }
.hero-stat strong { display: block; font-size: 2rem; }

.section { padding: 64px 0; }
.section-title { font-size: 2rem; margin-bottom: 8px; }
.section-subtitle { color: var(--text-muted); margin-bottom: 32px; }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.2s; }
.card:hover { transform: translateY(-4px); }
.filter-card { width: 100%; border: 0; color: inherit; cursor: pointer; font: inherit; text-align: left; }
.filter-card.is-active { outline: 3px solid var(--accent); transform: translateY(-4px); }
.empty-state { grid-column: 1 / -1; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; text-align: center; color: var(--text-muted); }
.card-image { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 20px; }
.scientific { font-style: italic; color: var(--text-muted); font-size: 0.85rem; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; margin-top: 8px; margin-right: 4px; }
.badge-period { background: #e9edc9; color: var(--primary-dark); }
.badge-diet-carn { background: #ffe0e0; color: #c1121f; }
.badge-diet-herb { background: #d8f3dc; color: #2d6a4f; }

.detail-hero { position: relative; height: 420px; overflow: hidden; }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8)); color: white; padding: 48px 24px 32px;
}
.detail-content { padding: 48px 0; }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
.info-box { background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 24px; }
.info-box h2 { font-size: 1.3rem; margin-bottom: 16px; color: var(--primary-dark); }
.facts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.fact-item { padding: 12px; background: var(--bg); border-radius: 8px; }
.fact-item label { font-size: 0.75rem; text-transform: uppercase; color: var(--text-muted); }
.fact-item p { font-weight: 600; margin-top: 4px; }
.timeline { border-left: 3px solid var(--accent); padding-left: 20px; margin: 16px 0; }
.timeline-item { margin-bottom: 16px; }
.timeline-item strong { color: var(--primary-dark); }
.fun-facts li { margin-bottom: 12px; }
.faq-item { border-bottom: 1px solid #e9edc9; padding: 16px 0; }
.extinction-box {
  background: linear-gradient(135deg, #283618, #606c38);
  color: white; border-radius: var(--radius); padding: 24px;
}
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery img { width: 100%; height: 140px; object-fit: cover; border-radius: 8px; }

.site-footer { background: var(--primary-dark); color: rgba(255,255,255,0.8); padding: 48px 0 24px; margin-top: 64px; }
.footer-bottom { text-align: center; font-size: 0.85rem; }

@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .detail-grid, .facts-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}


/* AdSense legal and contact pages */
.legal-hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
  padding: 56px 0;
}
.legal-hero h1 { font-size: 2.5rem; margin-bottom: 8px; }
.legal-hero p { max-width: 760px; opacity: 0.92; font-size: 1.05rem; }
.legal-page { padding: 48px 0; }
.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 32px;
  align-items: start;
}
.legal-content .info-box h2 { margin-top: 8px; }
.legal-content .info-box h3 { margin: 20px 0 8px; color: var(--primary-dark); }
.legal-content .info-box p,
.legal-content .info-box li { margin-bottom: 10px; color: var(--text); }
.legal-content ul { padding-left: 20px; margin: 10px 0 18px; }
.legal-meta {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  position: sticky;
  top: 92px;
}
.legal-meta a { display: block; margin: 8px 0; font-weight: 600; }
.contact-form label {
  display: block;
  font-weight: 600;
  margin: 14px 0 6px;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d8e2ea;
  border-radius: 8px;
  font: inherit;
  background: white;
}
.contact-form textarea { min-height: 150px; resize: vertical; }
.contact-form button,
.contact-actions button {
  margin-top: 16px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  font-weight: 700;
  cursor: pointer;
}
.contact-form button:hover,
.contact-actions button:hover { opacity: 0.9; }
.form-note {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-muted);
}
.footer-legal {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 20px 0;
}
.footer-legal a { color: rgba(255,255,255,0.85); font-weight: 600; }
@media (max-width: 860px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-meta { position: static; }
}

/* Dinosaurs homepage redesign */
body {
  background:
    linear-gradient(180deg, #16170f 0%, #283618 360px, #f3ecd9 361px, #fefae0 100%);
}
.site-header { background: #15170e; border-bottom: 1px solid rgba(221, 161, 94, .32); }
.museum-hero {
  background:
    linear-gradient(100deg, rgba(18, 19, 13, .98) 0%, rgba(18, 19, 13, .78) 48%, rgba(18, 19, 13, .25) 100%),
    url('../images/thumbs/iguanodon.jpg') center/cover;
  text-align: left;
  padding: 110px 0;
}
.museum-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: center; }
.museum-hero h1 { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(3rem, 7vw, 6rem); line-height: .92; letter-spacing: -.05em; max-width: 800px; }
.museum-hero p { margin: 24px 0 0; max-width: 630px; }
.eyebrow { display: inline-block; margin-bottom: 18px; color: #dda15e; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; font-size: .76rem; }
.fossil-ticket {
  background: #fefae0;
  color: #1a1f0e;
  border: 2px solid #dda15e;
  border-radius: 0;
  padding: 28px;
  box-shadow: 14px 14px 0 rgba(221,161,94,.28);
}
.fossil-ticket span { color: #bc6c25; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 900; }
.fossil-ticket h2 { font-family: Georgia, serif; font-size: 2.3rem; margin: 12px 0; }
.exhibit-section { padding: 34px 0; }
.exhibit-grid { display: grid; grid-template-columns: repeat(3, 1fr) 1.4fr; gap: 16px; margin-top: -72px; position: relative; z-index: 2; }
.exhibit-stat, .exhibit-note {
  background: #fefae0;
  border: 1px solid rgba(188,108,37,.28);
  padding: 22px;
  box-shadow: 0 18px 44px rgba(20,20,12,.18);
}
.exhibit-stat strong { display: block; font-size: 2.25rem; color: #283618; }
.exhibit-note strong { display: block; color: #bc6c25; margin-bottom: 8px; }
#dinosaurs .cards-grid { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
#dinosaurs .card { background: #fcf7e8; border: 1px solid rgba(40,54,24,.16); border-radius: 8px; box-shadow: 0 18px 50px rgba(40,54,24,.14); }
#dinosaurs .card-image { height: 230px; filter: saturate(.96) contrast(1.03); }
#dinosaurs .card-body h3 { font-family: Georgia, serif; font-size: 1.45rem; }
.period-section { background: #1b1f12; color: #fefae0; }
.period-section .section-subtitle { color: rgba(254,250,224,.75); }
.timeline-rail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; position: relative; }
.timeline-rail::before { content: ""; position: absolute; left: 0; right: 0; top: 28px; height: 2px; background: rgba(221,161,94,.35); }
.timeline-node {
  position: relative;
  background: #283618;
  color: #fefae0;
  border: 1px solid rgba(221,161,94,.45);
  border-radius: 8px;
  padding: 24px;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.timeline-node strong, .timeline-node span { display: block; }
.timeline-node strong { color: #dda15e; margin-bottom: 8px; }
.timeline-node.is-active { outline: 3px solid #dda15e; }
@media (max-width: 860px) {
  .museum-hero-grid, .exhibit-grid, .timeline-rail { grid-template-columns: 1fr; }
  .exhibit-grid { margin-top: 0; }
  .timeline-rail::before { display: none; }
}

