/* =================================================================
   THAT BITES PROJECT — Main Stylesheet
   A professional ecology-themed design using Inter + Lora fonts.
   Fonts are loaded via Google Fonts CDN in each HTML <head>.
   ================================================================= */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Greens — palette derived from the logo olive-green (#507400) */
  --green-900: #131b00;   /* near-black olive — outer body bg */
  --green-800: #233100;   /* dark sidebar background */
  --green-700: #334600;   /* deep accents */
  --green-600: #435c00;   /* secondary headings & borders */
  --green-500: #507400;   /* logo brand green — main accent */
  --green-400: #6b9600;   /* hover / interactive states */
  --green-300: #8ab41c;   /* light accent */
  --green-200: #b5d15a;   /* pale green — text on dark bg */
  --green-100: #dceead;   /* very light tint */

  /* Gold accents */
  --gold-500: #b8860b;
  --gold-400: #d4a029;
  --gold-300: #e8c547;
  --gold-200: #f0dfa0;
  --gold-100: #faf3db;

  /* Warm neutrals */
  --cream-100: #fdfcfa;
  --cream-200: #faf8f4;
  --cream-300: #f2ede4;
  --cream-400: #e8e1d4;
  --cream-500: #d4cdbf;

  /* Text */
  --text-dark: #2a2d2e;
  --text-muted: #6b7280;
  --text-light: #ddd8cc;
  --text-on-dark: #e8e4dc;

  /* Functional aliases */
  --bg-sidebar: var(--green-800);
  --bg-main: var(--cream-200);
  --bg-card: #ffffff;
  --accent: var(--green-500);
  --accent-hover: var(--green-400);
  --accent-gold: var(--gold-500);
  --link: var(--green-500);
  --link-hover: var(--green-400);

  /* Layout */
  --sidebar-width: 250px;
  --right-sidebar-width: 270px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);

  /* Motion */
  --transition: 0.2s ease;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-dark);
  background-color: var(--green-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Lora", Georgia, "Times New Roman", serif;
  line-height: 1.3;
  color: var(--text-dark);
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--link-hover);
}

img {
  max-width: 100%;
  height: auto;
}

/* ---------- 3-Column Layout ---------- */
.layout-container {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr var(--right-sidebar-width);
  min-height: 100vh;
}

/* Adjust layout for pages without a right sidebar */
.layout-container:not(:has(.right-sidebar)) {
  grid-template-columns: var(--sidebar-width) 1fr;
}

/* ---------- Left Sidebar ---------- */
.left-sidebar {
  background: var(--green-500);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.25rem;
  color: var(--text-on-dark);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid rgba(19, 27, 0, 0.16);
}

.sidebar-title {
  font-family: "Lora", Georgia, serif;
  color: #fffdf7;
  font-size: 2rem;
  font-weight: 900;
  text-transform: none;
  letter-spacing: 0.2px;
  margin-bottom: 1.4rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.nav-links li {
  margin-bottom: 0.15rem;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  color: #fffdf7;
  text-decoration: none;
  font-size: 1.25rem;
  line-height: 1.35;
  font-weight: 600;
  border-radius: 6px;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  border-left-color: var(--green-300);
  padding-left: 0.9rem;
}

.nav-links a.active {
  background: rgba(255, 253, 247, 0.18);
  color: #ffffff;
  border-left-color: #fffdf7;
  font-weight: 700;
}

.nav-project-tagline {
  margin-top: auto;
  padding: 0.85rem 0 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  text-align: center;
}

.nav-project-logo {
  display: inline-block;
  width: auto;
  max-width: 400px;
  height: 120px;
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold-100), #fffdf7);
  box-shadow: inset 0 0 0 1px rgba(19, 27, 0, 0.12);
  object-fit: contain;
}

.nav-project-about {
  margin-bottom: 0;
  text-align: center;
}

.nav-project-about a {
  display: inline-block;
  padding: 0.28rem 0.85rem 0.55rem;
  color: rgba(255, 253, 247, 0.8);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.nav-project-about a:hover {
  background: transparent;
  color: rgba(255, 253, 247, 0.95);
  border-left-color: transparent;
  padding-left: 0.85rem;
}

.nav-project-about a.active {
  background: transparent;
  border-left-color: transparent;
  color: #fffdf7;
  font-weight: 600;
}

/* Collapsible nav folders (using <details>/<summary>) */

/* --- Top-level folder (e.g. "Ticks") — matches regular nav links --- */
.nav-folder {
  margin-top: 0;
  margin-bottom: 0;
}

.nav-folder summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  color: #fffdf7;
  font-size: 1.25rem;
  line-height: 1.35;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  border-radius: 6px;
  cursor: pointer;
  list-style: none;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

.nav-folder summary::-webkit-details-marker { display: none; }

.nav-folder summary::before {
  content: "▸";
  font-size: 0.7rem;
  width: 0.8rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.nav-folder[open] > summary::before {
  transform: rotate(90deg);
}

.nav-folder summary:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  border-left-color: var(--green-300);
  padding-left: 0.9rem;
}

/* Top-level folder list */
.nav-folder > ul {
  list-style: none;
  padding: 0;
  margin: 0.15rem 0 0.15rem 1rem;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-folder > ul > li {
  margin-bottom: 0;
}

/* Direct links inside folder (e.g. "Tick Ecology") */
.nav-folder > ul > li > a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  color: #f9f7ef;
  text-decoration: none;
  font-size: 0.98rem;
  line-height: 1.35;
  font-weight: 500;
  border-radius: 4px;
  transition: all var(--transition);
  border-left: 2px solid transparent;
}

.nav-folder > ul > li > a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border-left-color: var(--green-300);
}

.nav-folder > ul > li > a.active {
  background: rgba(255, 253, 247, 0.18);
  color: #ffffff;
  border-left-color: #fffdf7;
  font-weight: 700;
}

/* --- Nested sub-folders (e.g. "Species", "Diseases") --- */
.nav-folder .nav-subfolder {
  margin: 0.2rem 0;
}

.nav-folder .nav-subfolder summary {
  padding: 0.5rem 0.75rem;
  color: #f9f7ef;
  font-size: 0.97rem;
  line-height: 1.35;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  border-left: 2px solid transparent;
  border-radius: 4px;
  gap: 0.4rem;
}

.nav-folder .nav-subfolder summary::before {
  content: "▸";
  font-size: 0.6rem;
  width: 0.7rem;
}

.nav-folder .nav-subfolder[open] > summary::before {
  transform: rotate(90deg);
}

.nav-folder .nav-subfolder summary:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border-left-color: var(--green-300);
  padding-left: 0.65rem;
}

.nav-folder .nav-subfolder > ul {
  list-style: none;
  padding: 0;
  margin: 0.18rem 0 0.25rem 0.8rem;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-folder .nav-subfolder ul li {
  margin-bottom: 0.12rem;
}

.nav-folder .nav-subfolder ul a {
  display: block;
  padding: 0.48rem 0.68rem;
  color: #f9f7ef;
  text-decoration: none;
  font-size: 0.92rem;
  line-height: 1.4;
  font-weight: 500;
  border-radius: 4px;
  transition: all var(--transition);
  border-left: 2px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  white-space: normal;
  overflow-wrap: break-word;
}

.nav-folder .nav-subfolder ul a em {
  font-style: italic;
  font-weight: 600;
}

.nav-folder .nav-subfolder ul a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border-left-color: var(--green-300);
}

.nav-folder .nav-subfolder ul a.active {
  background: rgba(255, 253, 247, 0.18);
  color: #ffffff;
  border-left-color: #fffdf7;
  font-weight: 700;
}

.nav-links a[href$="citizen-science.html"] {
  white-space: nowrap;
}

/* ---------- Main Content ---------- */
.main-content {
  background-color: var(--bg-main);
  padding: 2.5rem 3rem;
  color: var(--text-dark);
  min-height: 100vh;
}

.main-content h1,
.main-content h2,
.main-content h3,
.main-content h4 {
  color: var(--green-600);
}

.main-content a {
  color: var(--green-500);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--green-200);
  text-underline-offset: 2px;
}

.main-content a:hover {
  color: var(--green-400);
  text-decoration-color: var(--green-400);
}

/* ---------- Page Titles (content pages) ---------- */
.page-title {
  font-family: "Lora", Georgia, serif;
  font-size: 2rem;
  color: var(--green-600);
  margin-bottom: 1.25rem;
  max-width: 800px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--green-200);
}

.page-content {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  line-height: 1.75;
  font-size: 1rem;
}

.page-content p {
  margin-bottom: 1rem;
}

.page-content ul,
.page-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.page-content li {
  margin-bottom: 0.4rem;
}

.faq-item {
  margin: 1.5rem 0;
}

.faq-item h3 {
  margin-bottom: 0.55rem;
}

.faq-item p {
  margin-bottom: 0;
}

.faq-quote {
  margin: 0.9rem 0 0;
  padding-left: 1rem;
  border-left: 2px solid var(--cream-400);
  color: var(--text-dark);
}

.faq-quote p {
  margin-bottom: 0.3rem;
  font-style: italic;
}

.faq-quote cite {
  display: block;
  color: var(--text-muted);
  font-style: normal;
  font-size: 0.92rem;
}

/* ---------- Hero / Home Page ---------- */
.hero-section {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
}

.home-logo {
  width: min(980px, 92vw);
  height: auto;
  margin: 0 auto 1.4rem;
  display: block;
  transform: translateX(4%);
  filter: drop-shadow(0 10px 24px rgba(13, 31, 23, 0.12));
}

.main-title {
  font-family: "Lora", Georgia, serif;
  font-size: 3.2rem;
  color: var(--green-600);
  margin-bottom: 0.6rem;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
}

.intro-text {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 0.75rem auto;
  line-height: 1.65;
  text-align: center;
  font-weight: 400;
}

.header-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---------- Search Box ---------- */
.search-box {
  background: var(--bg-card);
  border: 1px solid var(--cream-400);
  padding: 2rem 2.5rem;
  margin-top: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.5s ease-out;
}

.search-box h2 {
  font-family: "Lora", Georgia, serif;
  font-size: 1.4rem;
  color: var(--green-600);
  margin-bottom: 0.4rem;
  text-align: center;
}

.search-box > p {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

form {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

#postcode-input {
  flex: 1;
  max-width: 300px;
  padding: 0.7rem 1rem;
  background-color: var(--cream-100);
  color: var(--text-dark);
  border: 2px solid var(--cream-400);
  border-radius: 8px;
  font-size: 1rem;
  font-family: "Inter", sans-serif;
  text-align: center;
  transition: border-color var(--transition), box-shadow var(--transition);
}

#postcode-input:focus {
  outline: none;
  border-color: var(--green-400);
  box-shadow: 0 0 0 3px rgba(80, 116, 0, 0.15);
}

#postcode-input::placeholder {
  color: var(--cream-500);
}

#search-btn {
  padding: 0.7rem 1.6rem;
  background: linear-gradient(135deg, var(--green-500), var(--green-400));
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(80, 116, 0, 0.3);
}

#search-btn:hover {
  background: linear-gradient(135deg, var(--green-400), var(--green-300));
  box-shadow: 0 4px 16px rgba(80, 116, 0, 0.35);
  transform: translateY(-1px);
}

#search-btn:active {
  transform: translateY(0);
}

/* ---------- Results Area ---------- */
#results-area {
  margin-top: 2rem;
}

#results-area > p {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
}

/* ---------- Vector Type Tabs ---------- */
.tb-vector-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #eef4f1;
  border: 1px solid #d8e5df;
  border-radius: 999px;
  padding: 0.3rem;
}

.tb-vector-tab {
  border: 0;
  background: transparent;
  color: #4b5a58;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.tb-vector-tab:hover {
  background: #dde9e4;
  color: #1f403b;
}

.tb-vector-tab--active {
  background: #2d6a4f;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* ---------- Right Sidebar ---------- */
.right-sidebar {
  background: linear-gradient(180deg, var(--cream-300) 0%, var(--cream-200) 100%);
  padding: 2rem 1.5rem;
  color: var(--text-dark);
  border-left: 1px solid var(--cream-400);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.right-sidebar h2 {
  font-family: "Lora", Georgia, serif;
  font-size: 1.1rem;
  color: var(--green-600);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--green-200);
}

.right-sidebar p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.right-sidebar ul {
  padding-left: 0;
  margin-bottom: 1rem;
  list-style: none;
}

.right-sidebar li {
  font-size: 0.86rem;
  line-height: 1.5;
  margin-bottom: 0.6rem;
  color: var(--text-dark);
  position: relative;
  padding-left: 1.1rem;
}

.right-sidebar li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green-400);
}

.right-sidebar strong {
  color: var(--green-600);
}

.right-sidebar em {
  color: var(--green-500);
}

/* Vector list override (explicit class) */
.vector-list {
  list-style: none;
  padding-left: 0;
}

.vector-list li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.75rem;
}

.vector-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green-400);
}

/* ---------- Species / Education Page Components ---------- */
.spec-header {
  background: linear-gradient(135deg, var(--green-700), var(--green-600));
  color: #ffffff;
  padding: 1.5rem 2rem;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
}

.spec-header h1 {
  color: #ffffff;
  font-family: "Lora", Georgia, serif;
  margin-bottom: 0.25rem;
}

.spec-header .scientific-name {
  color: var(--green-200);
  font-size: 1rem;
}

.spec-section {
  background: var(--bg-card);
  padding: 1.25rem 1.5rem;
  border-radius: 8px;
  margin-top: 1rem;
  border: 1px solid var(--cream-400);
  box-shadow: var(--shadow-sm);
}

.spec-section h2 {
  font-size: 1.15rem;
  color: var(--green-600);
  margin-bottom: 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--cream-300);
}

.spec-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.spec-meta div {
  background: var(--cream-200);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.5rem;
  color: var(--green-500);
  font-weight: 500;
  text-decoration: none;
}

.back-link:hover {
  color: var(--green-400);
}

.meta-note {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- Scrollbar Styling ---------- */
.left-sidebar::-webkit-scrollbar,
.right-sidebar::-webkit-scrollbar {
  width: 4px;
}

.left-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

.right-sidebar::-webkit-scrollbar-thumb {
  background: var(--cream-500);
  border-radius: 4px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .layout-container {
    grid-template-columns: var(--sidebar-width) 1fr;
  }
  .right-sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .layout-container {
    grid-template-columns: 1fr;
  }

  .left-sidebar {
    position: relative;
    height: auto;
    padding: 1rem 1rem 0.75rem;
  }

  .sidebar-title {
    margin-bottom: 0.75rem;
  }

  .nav-links {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    flex: initial;
    gap: 0.25rem;
  }

  .nav-links li {
    margin-bottom: 0;
  }

  .nav-links a {
    padding: 0.55rem 0.8rem;
    font-size: 0.98rem;
    border-left: none;
    border-bottom: 2px solid transparent;
  }

  .nav-links a:hover {
    padding-left: 0.65rem;
    border-left: none;
    border-bottom-color: var(--green-300);
  }

  .nav-folder {
    width: 100%;
    margin: 0.25rem 0;
  }

  .nav-folder summary {
    padding: 0.55rem 0.8rem;
    font-size: 0.98rem;
  }

  .nav-folder > ul {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    margin: 0.25rem 0 0.25rem 0.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    padding-left: 0;
  }

  .nav-folder > ul > li > a {
    padding: 0.45rem 0.65rem;
    font-size: 0.9rem;
    border-left: none;
    border-bottom: 2px solid transparent;
  }

  .nav-folder > ul > li > a:hover {
    border-left: none;
    border-bottom-color: var(--green-300);
  }

  .nav-folder .nav-subfolder summary {
    padding: 0.42rem 0.65rem;
    font-size: 0.9rem;
  }

  .nav-folder .nav-subfolder > ul {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin: 0.15rem 0 0.15rem 0.4rem;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    padding-left: 0;
  }

  .nav-folder .nav-subfolder ul a {
    padding: 0.4rem 0.62rem;
    font-size: 0.87rem;
    line-height: 1.35;
    border-left: none;
    border-bottom: 2px solid transparent;
    background: rgba(255, 255, 255, 0.04);
    white-space: normal;
  }

  .nav-folder .nav-subfolder ul a:hover {
    border-left: none;
    border-bottom-color: var(--green-300);
  }

  .nav-project-tagline {
    margin-top: 0.55rem;
    width: 100%;
    padding: 0.6rem 0 0.28rem;
    border-top: 1px solid rgba(255, 255, 255, 0.24);
    text-align: center;
  }

  .nav-project-logo {
    max-width: 250px;
    height: 60px;
    padding: 0.18rem 0.4rem;
  }

  .nav-project-about {
    width: 100%;
    text-align: center;
  }

  .nav-project-about a {
    display: inline-block;
    padding: 0.34rem 0.15rem;
    font-size: 0.88rem;
    color: rgba(255, 253, 247, 0.84);
    border-bottom-color: transparent;
  }

  .nav-project-about a:hover {
    padding-left: 0.15rem;
    border-bottom-color: transparent;
  }

  .main-content {
    padding: 1.5rem 1.25rem;
  }

  .main-title {
    font-size: 2.2rem;
  }

  form {
    flex-direction: column;
  }

  #postcode-input {
    max-width: 100%;
    width: 100%;
  }

  .search-box {
    padding: 1.5rem;
  }
}

/* ---------- Tick Hub Page (ticks.html) ---------- */

/* Extra width for the hub — needs room for the card grid */
.tick-hub-content {
  max-width: 900px;
}

/* Section wrapper */
.tick-hub-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 2px solid var(--cream-300);
}

.tick-hub-section:first-of-type {
  margin-top: 1.5rem;
  padding-top: 0;
  border-top: none;
}

.tick-hub-section-title {
  font-family: "Lora", Georgia, serif;
  font-size: 1.45rem;
  color: var(--green-600);
  margin-bottom: 0.75rem;
}

.tick-hub-section-intro {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 0.97rem;
}

/* Feature card (links to tick-ecology.html) */
.tick-hub-feature-card {
  display: flex;
  align-items: stretch;
  background: var(--bg-card);
  border: 1px solid var(--cream-400);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  overflow: hidden;
}

.tick-hub-feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--green-300);
}

.tick-hub-feature-body {
  padding: 1.5rem 1.75rem;
}

.tick-hub-feature-body h3 {
  font-family: "Lora", Georgia, serif;
  font-size: 1.2rem;
  color: var(--green-600);
  margin-bottom: 0.5rem;
}

.tick-hub-feature-body p {
  color: var(--text-muted);
  font-size: 0.97rem;
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

/* Species card grid (2 columns) */
.tick-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.tick-hub-card {
  display: grid;
  grid-template-columns: 6px 1fr;
  background: var(--bg-card);
  border: 1px solid var(--cream-400);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.tick-hub-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--green-300);
}

/* Coloured left-edge accent strip */
.tick-hub-card-accent {
  width: 6px;
  min-height: 100%;
}

.tick-hub-card-body {
  padding: 1.1rem 1.25rem;
}

.tick-hub-card-body h3 {
  font-family: "Lora", Georgia, serif;
  font-size: 1rem;
  color: var(--green-600);
  margin-bottom: 0.2rem;
  font-style: italic;
}

.tick-hub-common-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 0.5rem !important;
}

.tick-hub-card-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Prevention cards (2 columns, lighter background) */
.tick-hub-prevention-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.tick-hub-prevention-card {
  display: block;
  background: linear-gradient(135deg, var(--green-100), #fafdf5);
  border: 1px solid var(--green-200);
  border-radius: 10px;
  padding: 1.35rem 1.5rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.tick-hub-prevention-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--green-400);
}

.tick-hub-prevention-card h3 {
  font-family: "Lora", Georgia, serif;
  font-size: 1.1rem;
  color: var(--green-700);
  margin-bottom: 0.5rem;
}

.tick-hub-prevention-card p {
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

/* Disease list */
.tick-hub-disease-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.tick-hub-disease-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1rem;
  align-items: baseline;
  background: var(--bg-card);
  border: 1px solid var(--cream-400);
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.tick-hub-disease-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: var(--green-300);
}

.tick-hub-disease-name {
  font-weight: 600;
  font-size: 0.97rem;
  color: var(--green-600);
}

.tick-hub-disease-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* "Read more" call-to-action text */
.tick-hub-read-more {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--green-500);
  text-decoration: none;
}

/* Responsive: stack grids on narrow screens */
@media (max-width: 700px) {
  .tick-hub-grid,
  .tick-hub-prevention-grid {
    grid-template-columns: 1fr;
  }

  .tick-hub-disease-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

/* ---------- Planetary Health Page ---------- */

/* Extra width for this content-heavy page */
.ph-content {
  max-width: 880px;
}

/* Blockquote (definition callout) */
.ph-blockquote {
  margin: 1.25rem 0 1.5rem;
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--green-400);
  background: var(--green-100);
  border-radius: 0 8px 8px 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--green-700);
  font-style: italic;
}

/* Media placeholders — dashed boxes to drop images/infographics into */
.ph-media-placeholder {
  margin: 1.5rem 0 2rem;
  border: 2px dashed var(--cream-400);
  border-radius: 10px;
  background: var(--cream-200);
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ph-media-inner {
  text-align: center;
  padding: 2rem 1.5rem;
}

.ph-media-inner img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.ph-media-inner img.ph-image--hero {
  max-width: min(700px, 40vw);
}

.ph-media-label {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Organisation card grid */
.ph-org-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.ph-org-card {
  background: var(--bg-card);
  border: 1px solid var(--cream-400);
  border-radius: 10px;
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.ph-org-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--green-300);
}

.ph-org-card h3 {
  font-family: "Lora", Georgia, serif;
  font-size: 1.02rem;
  color: var(--green-600);
  margin-bottom: 0.45rem;
}

.ph-org-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Further reading list */
.ph-reading-list {
  list-style: none;
  padding-left: 0;
}

.ph-reading-list li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.65rem;
  font-size: 0.95rem;
  line-height: 1.55;
}

.ph-reading-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-400);
}

/* Responsive: stack org grid on narrow screens */
@media (max-width: 700px) {
  .ph-org-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Citizen Science Page ---------- */

/* Hero banner at top of page */
.cs-hero-banner {
  background: linear-gradient(135deg, var(--green-700), var(--green-600));
  color: #ffffff;
  padding: 1.75rem 2rem;
  border-radius: 10px;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.cs-hero-banner .cs-hero-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.cs-hero-banner h3 {
  font-family: "Lora", Georgia, serif;
  font-size: 1.5rem;
  color: #ffffff;
  margin-bottom: 0.6rem;
}

.cs-hero-banner p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--green-100);
  max-width: 680px;
  margin: 0 auto;
}

/* Action card (e.g. the "Send a Tick" section) */
.cs-action-card {
  background: var(--bg-card);
  border: 1px solid var(--cream-400);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
}

.cs-action-card--primary {
  border-left: 5px solid var(--green-400);
}

.cs-action-card__header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.cs-action-card__icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.cs-action-card__header h3 {
  font-family: "Lora", Georgia, serif;
  font-size: 1.25rem;
  color: var(--green-600);
  margin: 0;
}

.cs-action-card h4 {
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--green-600);
  margin-top: 1rem;
  margin-bottom: 0.35rem;
}

.cs-action-card ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.cs-action-card ol li {
  margin-bottom: 0.5rem;
  line-height: 1.65;
}

.cs-address {
  display: block;
  background: var(--cream-200);
  padding: 0.6rem 0.9rem;
  border-radius: 6px;
  margin-top: 0.35rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-dark);
  border-left: 3px solid var(--green-300);
}

.cs-note {
  background: var(--gold-100);
  border-left: 4px solid var(--gold-400);
  padding: 0.75rem 1rem;
  border-radius: 0 6px 6px 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-dark);
}

/* Image containers with centered, sized images */
.image-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem auto;
  padding: 1.5rem;
  max-width: 650px;
  background: var(--bg-card);
  border: 1px solid var(--cream-400);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.image-container img {
  max-width: 100%;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--cream-400);
  display: block;
}

.image-container figcaption,
.image-container p {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
  font-style: italic;
}

.media-placeholder {
  width: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border-radius: 8px;
  border: 2px dashed var(--green-300);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(245, 241, 227, 0.92)),
    repeating-linear-gradient(
      135deg,
      rgba(113, 148, 74, 0.08) 0,
      rgba(113, 148, 74, 0.08) 12px,
      transparent 12px,
      transparent 24px
    );
  color: var(--green-700);
  text-align: center;
  font-style: italic;
  line-height: 1.7;
}

.media-placeholder strong {
  display: block;
  font-style: normal;
  font-family: "Lora", Georgia, serif;
  color: var(--green-800);
  margin-bottom: 0.35rem;
}

/* Responsive media cards for embedded videos */
.media-embed {
  margin: 2rem auto;
  max-width: 760px;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--cream-400);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.media-embed__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
  border: 1px solid var(--cream-400);
}

.media-embed__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.media-embed__frame-link {
  position: absolute;
  inset: 0;
  display: block;
}

.media-embed__frame-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-embed__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 74px;
  height: 52px;
  border-radius: 12px;
  background: rgba(12, 12, 12, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.media-embed__play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-35%, -50%);
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 18px solid #ffffff;
}

.media-embed__frame-link:hover .media-embed__play {
  background: rgba(204, 0, 0, 0.88);
}

.media-embed__caption {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}

/* CTA button */
.cs-btn {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.65rem 1.5rem;
  background: linear-gradient(135deg, var(--green-500), var(--green-400));
  color: #ffffff !important;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(80, 116, 0, 0.3);
  transition: all var(--transition);
}

.cs-btn:hover {
  background: linear-gradient(135deg, var(--green-400), var(--green-300));
  box-shadow: 0 4px 16px rgba(80, 116, 0, 0.35);
  transform: translateY(-1px);
  color: #ffffff !important;
}

/* Callout / pipeline box */
.cs-callout {
  background: var(--green-100);
  border: 1px solid var(--green-200);
  border-left: 5px solid var(--green-400);
  border-radius: 0 8px 8px 0;
  padding: 1.1rem 1.35rem;
  margin: 1.25rem 0;
}

.cs-callout h4 {
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--green-600);
  margin-bottom: 0.4rem;
}

.cs-callout p {
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.cs-callout p:last-child {
  margin-bottom: 0;
}

/* Project cards grid */
.cs-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.cs-project-card {
  background: var(--bg-card);
  border: 1px solid var(--cream-400);
  border-radius: 8px;
  padding: 1.25rem 1.25rem 1rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.cs-project-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.cs-project-card h4 {
  font-family: "Lora", Georgia, serif;
  font-size: 1.05rem;
  color: var(--green-600);
  margin-bottom: 0.5rem;
}

.cs-project-card p {
  font-size: 0.92rem;
  line-height: 1.6;
}

.cs-source {
  font-size: 0.82rem !important;
  color: var(--text-muted) !important;
  margin-top: 0.5rem;
}

/* News & Resources section */
.cs-news-title {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--cream-400);
}

.cs-news-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 1rem 0 1.75rem;
}

.cs-news-item {
  display: flex;
  gap: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--cream-400);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.cs-news-item:hover {
  box-shadow: var(--shadow-md);
}

.cs-news-tag {
  flex-shrink: 0;
  align-self: flex-start;
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.15rem;
}

.cs-news-tag--article {
  background: var(--green-100);
  color: var(--green-600);
}

.cs-news-tag--paper {
  background: #e8f0fe;
  color: #1a56db;
}

.cs-news-tag--video {
  background: #fce8e8;
  color: #c0392b;
}

.cs-news-tag--blog {
  background: var(--gold-100);
  color: var(--gold-500);
}

.cs-news-body h4 {
  font-family: "Lora", Georgia, serif;
  font-size: 1rem;
  margin-bottom: 0.2rem;
  line-height: 1.35;
}

.cs-news-body h4 a {
  color: var(--green-600);
  text-decoration: none;
}

.cs-news-body h4 a:hover {
  color: var(--green-400);
  text-decoration: underline;
}

.cs-news-meta {
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
  margin-bottom: 0.3rem !important;
}

.cs-news-body > p:last-child {
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 0;
}

/* Responsive adjustments for citizen science page */
@media (max-width: 768px) {
  .cs-hero-banner {
    padding: 1.25rem 1.25rem;
  }

  .cs-hero-banner h3 {
    font-size: 1.25rem;
  }

  .cs-project-grid {
    grid-template-columns: 1fr;
  }

  .cs-news-item {
    flex-direction: column;
    gap: 0.4rem;
  }

  .cs-action-card {
    padding: 1.25rem;
  }
}

/* ---------- Vector Maps Page (vm- prefix) ---------- */

/* The main map container */
.vm-map {
  width: 100%;
  height: 560px;
  border-radius: 10px;
  border: 2px solid var(--green-500);
  box-shadow: var(--shadow-md);
}

/* Status bar above the map */
.vm-status-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  margin-bottom: 0.75rem;
  background: var(--cream-200);
  border: 1px solid var(--cream-400);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.vm-status-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Species filter toggle bar below the map */
.vm-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
}

.vm-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--cream-400);
  border-radius: 20px;
  font-family: "Inter", sans-serif;
  font-size: 0.82rem;
  color: var(--text-dark);
  cursor: pointer;
  transition: all var(--transition);
  opacity: 0.5;
}

.vm-filter-btn--active {
  opacity: 1;
  box-shadow: var(--shadow-sm);
}

.vm-filter-btn:hover {
  border-color: var(--green-300);
}

.vm-filter-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.vm-filter-count {
  color: var(--text-muted);
  font-style: normal;
}

/* On-map legend */
.vm-map-legend {
  background: rgba(255, 255, 255, 0.95);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--cream-400);
  box-shadow: var(--shadow-sm);
  font-size: 0.85rem;
  line-height: 1.6;
}

.vm-map-legend strong {
  color: var(--green-600);
  font-size: 0.82rem;
}

/* Cluster icon sizes */
.vm-cluster {
  border-radius: 50%;
}

.vm-cluster--small { width: 30px; height: 30px; }
.vm-cluster--medium { width: 36px; height: 36px; }
.vm-cluster--large { width: 44px; height: 44px; }

/* Section title for links area */
.vm-section-title {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--cream-400);
}

/* Links grid */
.vm-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.vm-link-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--cream-400);
  border-radius: 8px;
  padding: 1.1rem 1.25rem 0.9rem;
  box-shadow: var(--shadow-sm);
  text-decoration: none !important;
  transition: box-shadow var(--transition), transform var(--transition);
}

.vm-link-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.vm-link-card h4 {
  font-family: "Lora", Georgia, serif;
  font-size: 1rem;
  color: var(--green-600);
  margin-bottom: 0.35rem;
}

.vm-link-card p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
}

.vm-link-source {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Sidebar legend override */
.vm-sidebar-legend {
  list-style: none;
  padding-left: 0;
}

.vm-sidebar-legend li {
  padding-left: 0;
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
}

.vm-sidebar-legend li::before {
  display: none;
}

/* Responsive */
@media (max-width: 768px) {
  .vm-map {
    height: 380px;
  }

  .vm-links-grid {
    grid-template-columns: 1fr;
  }

  .vm-filter-bar {
    gap: 0.35rem;
  }

  .vm-filter-btn {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
  }
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Species Distribution Map (education pages) ---------- */
.sp-map-wrapper {
  margin: 1.25rem 0 1.5rem;
}

.sp-map-wrapper h3 {
  font-family: "Lora", serif;
  font-size: 1.15rem;
  color: var(--green-700);
  margin-bottom: 0.5rem;
}

#species-map {
  width: 100%;
  height: 440px;
  border-radius: 10px;
  border: 2px solid var(--green-500);
  box-shadow: var(--shadow-md);
}

#species-map-status {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  font-style: italic;
}

.sp-map-cluster { border-radius: 50%; }
.sp-map-cluster--small  { width: 30px; height: 30px; }
.sp-map-cluster--medium { width: 36px; height: 36px; }
.sp-map-cluster--large  { width: 44px; height: 44px; }

@media (max-width: 768px) {
  #species-map {
    height: 320px;
  }
}

/* ---------- Epidemiology Card (Dashboard - Fingertips Integration) ---------- */
.epi-card {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  border: 1px solid var(--cream-400);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(250, 248, 244, 0.8));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.epi-card h4 {
  font-family: "Lora", Georgia, serif;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.epi-card a {
  color: inherit;
  font-weight: 500;
}

.epi-low {
  border-left: 4px solid #52b788;
}

.epi-medium {
  border-left: 4px solid #d4a029;
}

.epi-high {
  border-left: 4px solid #c0392b;
}
