:root {
  --primary: #2d6a4f;
  --primary-dark: #1b4332;
  --accent: #52b788;
  --sky: #74c69d;
  --bg: #f0fdf4;
  --surface: #ffffff;
  --text: #1a2e1a;
  --text-muted: #5a6b5a;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(45, 106, 79, 0.12);
}

* { 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); 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;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.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); font-weight: 500; }
.search-box input { padding: 8px 16px; border: none; border-radius: 24px; width: 220px; }

.hero {
  background: linear-gradient(135deg, #1b4332 0%, var(--sky) 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 32px; }
.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; }
.card-body h3 { font-size: 1.2rem; }
.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; font-weight: 600; margin-top: 8px; margin-right: 4px; }
.badge-category { background: #d8f3dc; color: var(--primary-dark); }
.badge-conservation { background: #e8f5e9; color: #2e7d32; }

.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.75));
  color: white; padding: 48px 24px 32px;
}
.detail-hero h1 { font-size: 2.5rem; }
.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; }
.fun-facts li { margin-bottom: 12px; }
.faq-item { border-bottom: 1px solid #e8eef3; padding: 16px 0; }
.audio-player {
  background: var(--bg); border-radius: var(--radius); padding: 20px;
  display: flex; align-items: center; gap: 16px;
}
.audio-btn {
  width: 48px; height: 48px; border-radius: 50%; background: var(--primary);
  color: white; border: none; font-size: 1.2rem; cursor: pointer;
}
.map-placeholder {
  background: linear-gradient(135deg, #d8f3dc, #95d5b2);
  border-radius: var(--radius); height: 240px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary-dark); font-weight: 600;
}
.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; padding-top: 24px; font-size: 0.85rem; }

@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .detail-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; }
}

/* Bird homepage redesign */
body {
  background:
    radial-gradient(circle at top left, rgba(173, 216, 230, 0.35), transparent 34rem),
    linear-gradient(180deg, #f6fbff 0%, #edf6f2 50%, #f8fbf3 100%);
}
.site-header { background: rgba(12, 28, 43, 0.92); backdrop-filter: blur(14px); }
.bird-hero {
  background:
    linear-gradient(120deg, rgba(8, 22, 38, 0.92), rgba(24, 66, 73, 0.75)),
    url('../images/thumbs/albatross.jpg') center/cover;
  text-align: left;
  padding: 110px 0;
}
.bird-hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) 380px; gap: 56px; align-items: center; }
.bird-hero h1 { max-width: 760px; font-size: clamp(2.6rem, 6vw, 5.4rem); line-height: 0.95; letter-spacing: -0.06em; }
.bird-hero p { margin: 24px 0 0; max-width: 640px; }
.eyebrow { display: inline-block; margin-bottom: 18px; color: #b7e4c7; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.78rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }
.primary-action, .secondary-action { padding: 12px 18px; border-radius: 999px; font-weight: 800; }
.primary-action { background: #f7d06b; color: #10222f; }
.secondary-action { border: 1px solid rgba(255,255,255,0.45); color: white; }
.sighting-card {
  background: rgba(255,255,255,0.9);
  color: #10222f;
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 24px 70px rgba(3, 18, 28, 0.28);
}
.sighting-label { color: #2d6a4f; font-weight: 900; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; }
.sighting-card h2 { font-size: 2rem; margin: 10px 0; }
.sighting-meter { height: 9px; background: #dce9e3; border-radius: 999px; overflow: hidden; margin: 18px 0; }
.sighting-meter span { display: block; height: 100%; background: linear-gradient(90deg, #52b788, #f7d06b); border-radius: inherit; }
.bird-dashboard { padding: 34px 0; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 18px; margin-top: -74px; position: relative; z-index: 2; }
.dashboard-card {
  background: #ffffff;
  border: 1px solid rgba(45, 106, 79, 0.12);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 18px 44px rgba(17, 44, 39, 0.1);
}
.dashboard-card strong { display: block; font-size: 2rem; color: #0f3443; }
.dashboard-card span { color: var(--text-muted); }
.note-card strong { font-size: 1.1rem; margin-bottom: 6px; }
.bird-categories { background: #ffffff; border-top: 1px solid #e3eee8; border-bottom: 1px solid #e3eee8; }
#birds .cards-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
#birds .card { display: grid; grid-template-columns: 128px 1fr; min-height: 190px; border-radius: 24px; box-shadow: 0 14px 36px rgba(31, 73, 70, 0.11); }
#birds .card-image { height: 100%; min-height: 190px; }
#birds .card-body { padding: 18px; }
#categories .filter-card { border: 1px solid #e2ece7; border-radius: 20px; box-shadow: none; }
@media (max-width: 820px) {
  .bird-hero-grid, .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid { margin-top: 0; }
  #birds .card { grid-template-columns: 1fr; }
}

