/* ============================================================
   DigiSylva - Shared Stylesheet
   University of Maine · School of Forest Resources
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

/* ── CSS Variables ── */
:root {
  --green-dark:   #1b4332;
  --green-mid:    #2d6a4f;
  --green-bright: #52b788;
  --green-light:  #95d5b2;
  --green-pale:   #d8f3dc;
  --green-bg:     #f0faf3;
  --gold:         #c9a84c;
  --gold-light:   #f4e2aa;
  --brown:        #6b3f1f;
  --text-dark:    #1c2b1e;
  --text-mid:     #3a5241;
  --text-light:   #6b8c72;
  --white:        #ffffff;
  --card-bg:      #ffffff;
  --border:       #d1e8d6;
  --shadow-sm:    0 2px 8px rgba(27,67,50,0.08);
  --shadow-md:    0 4px 20px rgba(27,67,50,0.12);
  --shadow-lg:    0 8px 32px rgba(27,67,50,0.16);
  --radius-sm:    6px;
  --radius-md:    12px;
  --radius-lg:    20px;
  --nav-h:        64px;
  --transition:   0.25s ease;
}

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

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

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background: var(--green-bg);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--green-mid); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green-bright); }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { font-family: 'Playfair Display', serif; line-height: 1.25; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; font-family: 'Inter', sans-serif; font-weight: 600; }

p { color: var(--text-mid); }

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--green-dark);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  gap: 0;
  flex-wrap: nowrap;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 2rem;
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--green-bright);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.nav-brand-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  flex: 1;
  flex-wrap: nowrap;        /* never fold onto a second line */
  min-width: 0;
  overflow-x: auto;         /* if it truly cannot fit, scroll instead of wrapping */
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  display: block;
  padding: 0.45rem 0.85rem;
  color: rgba(255,255,255,0.82);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255,255,255,0.12);
  color: #ffffff;
}

.nav-links a.active {
  background: var(--green-bright);
  color: var(--green-dark);
  font-weight: 600;
}

/* ── DigiSylva Styled Logo Wordmark ── */
.digisylva-logo {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  font-size: 1.3rem;
}
/* "Digi" = digital blue · "Sylva" = forest greens */
.d-digi { color: #6cb5ff; }
.d-s    { color: #52b788; }
.d-y    { color: #5cbf90; }
.d-l    { color: #6ac79b; }
.d-v    { color: #7ed0a8; }
.d-a    { color: #95d5b2; }

/* Hero-scale logo (larger, lighter tints for dark background) */
.hero-logo { display: block; }
.hero-logo .d-digi { color: #8ec5ff; }
.hero-logo .d-s    { color: #95d5b2; }
.hero-logo .d-y    { color: #a5dcbf; }
.hero-logo .d-l    { color: #b0e0c8; }
.hero-logo .d-v    { color: #bde8d3; }
.hero-logo .d-a    { color: var(--green-light); }

/* Logo images: emblem mark in navbar/footer, full logo on hero */
.brand-mark { height: 40px; width: auto; display: block; }
.hero-logo-img { height: 200px; width: auto; display: block; margin: 0 auto 1rem; }

/* Nav Search Button */
.nav-search-btn {
  margin-left: auto;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all var(--transition);
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.nav-search-btn:hover {
  background: rgba(255,255,255,0.22);
  color: white;
}

/* ── Page Wrapper ── */
.page-wrapper {
  padding-top: var(--nav-h);
  min-height: 100vh;
}

/* ── Hero Section ── */
.hero {
  background: linear-gradient(rgba(18,42,26,0.62), rgba(9,26,16,0.80)), url("../assets/Acadia.jpg") center / cover no-repeat;
  color: white;
  padding: 5rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='rgba(82,183,136,0.08)' d='M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,165.3C1248,171,1344,149,1392,138.7L1440,128L1440,320L0,320Z'/%3E%3C/svg%3E") bottom no-repeat;
  background-size: cover;
}

.hero-content { position: relative; max-width: 800px; margin: 0 auto; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(149,213,178,0.15);
  border: 1px solid rgba(149,213,178,0.3);
  border-radius: 100px;
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--green-light);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: white;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero h1 span { color: var(--green-light); }

.hero p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.78);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background: var(--green-bright);
  color: var(--green-dark);
}
.btn-primary:hover {
  background: var(--green-light);
  color: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(82,183,136,0.35);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.4);
  color: white;
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
  color: white;
}

.btn-sm { padding: 0.45rem 1rem; font-size: 0.8rem; }
.btn-dark {
  background: var(--green-dark);
  color: white;
  border-color: var(--green-dark);
}
.btn-dark:hover { background: var(--green-mid); color: white; }

/* ── Stats Bar ── */
.stats-bar {
  background: white;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  box-shadow: var(--shadow-sm);
}

.stat-item {
  padding: 1.25rem 2.5rem;
  text-align: center;
  border-right: 1px solid var(--border);
  flex: 1;
  min-width: 150px;
}
.stat-item:last-child { border-right: none; }

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--green-mid);
  font-family: 'Playfair Display', serif;
  display: block;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-light);
  font-weight: 500;
  letter-spacing: 0.06em;
  margin-top: 0.15rem;
}

/* ── Section Containers ── */
.section {
  padding: 4rem 2rem;
  max-width: 1300px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 { color: var(--green-dark); margin-bottom: 0.75rem; }
.section-header p { max-width: 600px; margin: 0 auto; font-size: 1rem; }

.section-tag {
  display: inline-block;
  background: var(--green-pale);
  color: var(--green-mid);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 0.75rem;
}

/* ── Cards ── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

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

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--green-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

/* ── Grid Layouts ── */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; }

/* ── State Cards ── */
.state-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.state-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.state-card-header {
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  color: white;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.state-flag { font-size: 1.8rem; }

.state-card-header h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: white;
  margin: 0;
}

.state-coverage {
  font-size: 0.8rem;
  color: var(--green-light);
  margin-top: 0.2rem;
}

.state-card-body {
  padding: 1.25rem 1.5rem;
}

.state-card-body p {
  font-size: 0.875rem;
  color: var(--text-mid);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.state-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.tag {
  background: var(--green-pale);
  color: var(--green-mid);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
}

/* ── Page Header (inner pages) ── */
.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #1a222d;
  border-bottom: 1px solid #32424f;
  color: #e8eef4;
}

.page-header-inner,
.page-header > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
  max-width: none;
  margin: 0;
  flex-wrap: wrap;
}

.page-header h1 {
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: #e8eef4;
  margin: 0;
  white-space: nowrap;
}

.page-header p {
  color: #9db0c0;
  font-size: 12px;
  margin: 0;
  white-space: nowrap;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 1rem;
}

.breadcrumb a { color: var(--green-light); }
.breadcrumb span { color: rgba(255,255,255,0.4); }

/* ── Map Page ── */
#map-container {
  height: calc(100vh - var(--nav-h) - 200px);
  min-height: 480px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.map-controls {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.map-controls h4 { color: var(--green-dark); margin-bottom: 1rem; font-size: 0.9rem; letter-spacing: 0.05em; }

.control-group { margin-bottom: 1.25rem; }
.control-group:last-child { margin-bottom: 0; }
.control-group label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-light); margin-bottom: 0.5rem; letter-spacing: 0.05em; }

.btn-group { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.btn-toggle {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--text-mid);
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Inter', sans-serif;
}

.btn-toggle:hover { border-color: var(--green-bright); color: var(--green-mid); }
.btn-toggle.active { background: var(--green-mid); color: white; border-color: var(--green-mid); }

.opacity-slider { width: 100%; accent-color: var(--green-mid); }

.stats-panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.stats-panel h4 { color: var(--green-dark); margin-bottom: 1rem; font-size: 0.9rem; letter-spacing: 0.05em; }

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.stat-row:last-child { border-bottom: none; }
.stat-row .label { color: var(--text-light); }
.stat-row .value { font-weight: 600; color: var(--green-dark); }

.legend-bar {
  height: 12px;
  border-radius: 6px;
  margin: 0.5rem 0;
}

.legend-labels { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--text-light); }

/* ── Chart Containers ── */
.chart-wrap {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

/* ── Team Cards ── */
.team-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  text-align: center;
}

.team-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }

.team-avatar {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
}

.team-info { padding: 1.75rem 1.5rem 1.5rem; }
.team-info h3 { font-size: 1.25rem; color: var(--green-dark); margin-bottom: 0.25rem; }
.team-title { font-size: 0.85rem; color: var(--green-bright); font-weight: 600; margin-bottom: 0.25rem; }
.team-dept { font-size: 0.8rem; color: var(--text-light); margin-bottom: 1rem; }
.team-bio { font-size: 0.875rem; color: var(--text-mid); line-height: 1.65; margin-bottom: 1.25rem; text-align: left; }

.team-links { display: flex; justify-content: center; gap: 0.5rem; }
.team-link {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--green-pale);
  color: var(--green-mid);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  transition: all var(--transition);
  text-decoration: none;
}
.team-link:hover { background: var(--green-mid); color: white; }

/* ── Publications ── */
.pub-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 1.25rem;
  transition: all var(--transition);
  margin-bottom: 1rem;
}

.pub-card:hover { box-shadow: var(--shadow-md); border-left: 3px solid var(--green-bright); }

.pub-year-badge {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  background: var(--green-pale);
  color: var(--green-mid);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
}

.pub-content h4 { color: var(--green-dark); margin-bottom: 0.35rem; font-size: 0.975rem; line-height: 1.4; }
.pub-authors { font-size: 0.82rem; color: var(--text-light); margin-bottom: 0.3rem; }
.pub-journal { font-size: 0.82rem; color: var(--green-mid); font-style: italic; font-weight: 500; }
.pub-tags { display: flex; gap: 0.4rem; margin-top: 0.6rem; flex-wrap: wrap; }

/* ── AI Advisor ── */
.chat-wrap {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  height: 580px;
}

.chat-header {
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  color: white;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-avatar {
  width: 40px; height: 40px;
  background: var(--green-bright);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}

.chat-header-info h4 { font-family: 'Inter', sans-serif; font-size: 0.95rem; color: white; margin: 0; }
.chat-status { font-size: 0.75rem; color: var(--green-light); display: flex; align-items: center; gap: 0.3rem; }
.status-dot { width: 7px; height: 7px; background: #4ade80; border-radius: 50%; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #f8fdf9;
}

.msg { display: flex; gap: 0.75rem; max-width: 85%; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }

.msg-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
}

.msg.bot .msg-avatar { background: var(--green-pale); color: var(--green-mid); }
.msg.user .msg-avatar { background: var(--green-mid); color: white; }

.msg-bubble {
  padding: 0.75rem 1rem;
  border-radius: 16px;
  font-size: 0.875rem;
  line-height: 1.6;
}

.msg.bot .msg-bubble { background: white; color: var(--text-dark); border: 1px solid var(--border); border-top-left-radius: 4px; box-shadow: var(--shadow-sm); }
.msg.user .msg-bubble { background: var(--green-mid); color: white; border-top-right-radius: 4px; }

.chat-suggestions { padding: 0.75rem 1.25rem; display: flex; gap: 0.5rem; flex-wrap: wrap; background: white; border-top: 1px solid var(--border); }
.suggestion-chip {
  padding: 0.35rem 0.85rem;
  background: var(--green-pale);
  color: var(--green-mid);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all var(--transition);
  font-family: 'Inter', sans-serif;
}
.suggestion-chip:hover { background: var(--green-mid); color: white; border-color: var(--green-mid); }

.chat-input-row {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: white;
  border-top: 1px solid var(--border);
}

.chat-input {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color var(--transition);
  background: var(--green-bg);
}
.chat-input:focus { border-color: var(--green-bright); }

.chat-send {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--green-mid);
  color: white;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: all var(--transition);
  flex-shrink: 0;
}
.chat-send:hover { background: var(--green-dark); transform: scale(1.05); }

/* ── News ── */
.news-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.news-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.news-card-img {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.news-card-body { padding: 1.25rem; }
.news-date { font-size: 0.75rem; color: var(--text-light); font-weight: 500; letter-spacing: 0.06em; margin-bottom: 0.5rem; }
.news-card-body h4 { color: var(--green-dark); font-size: 1rem; line-height: 1.4; margin-bottom: 0.5rem; }
.news-card-body p { font-size: 0.85rem; color: var(--text-mid); line-height: 1.6; margin-bottom: 1rem; }
.news-read-more { font-size: 0.82rem; font-weight: 600; color: var(--green-mid); }

/* ── Footer ── */
footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.72);
  padding: 0;
  margin-top: 0;
  flex-shrink: 0;
}

.footer-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-brand p { font-size: 0.875rem; line-height: 1.7; margin-top: 0.75rem; color: rgba(255,255,255,0.6); }
.footer-title { font-size: 0.8rem; font-weight: 700; color: white; letter-spacing: 0.08em; margin-bottom: 1rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { font-size: 0.875rem; color: rgba(255,255,255,0.6); transition: color var(--transition); }
.footer-links a:hover { color: var(--green-light); }

.footer-bottom {
  border-top: none;
  padding: 0.9rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.8rem;
  text-align: center;
}

/* ── Utilities ── */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.gap-1 { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

.year-filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--green-pale);
  color: var(--green-mid);
  border-radius: 100px;
  padding: 0.3rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  margin: 0.2rem;
}

/* Prediction page */
.prediction-controls {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-mid); margin-bottom: 0.4rem; }
.form-select, .form-input {
  width: 100%;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background: white;
  outline: none;
  transition: border-color var(--transition);
}
.form-select:focus, .form-input:focus { border-color: var(--green-bright); }

/* Download toolbar */
.map-toolbar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

/* ── Global Search Overlay ── */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,20,12,0.65);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 90px;
  backdrop-filter: blur(4px);
}
.search-modal {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 620px;
  margin: 0 1rem;
  box-shadow: 0 24px 64px rgba(0,0,0,0.35);
  overflow: hidden;
}
.search-header {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.search-header input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.05rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background: transparent;
}
.search-results {
  max-height: 400px;
  overflow-y: auto;
}
.search-result-item {
  padding: 0.85rem 1.25rem;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  display: block;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--green-pale); }
.search-result-title { font-weight: 600; color: var(--green-dark); font-size: 0.9rem; }
.search-result-snippet { font-size: 0.8rem; color: var(--text-mid); margin-top: 0.2rem; line-height: 1.5; }
.search-result-url { font-size: 0.7rem; color: var(--green-bright); margin-top: 0.2rem; font-weight: 500; }
.search-no-results { padding: 2.5rem; text-align: center; color: var(--text-light); font-size: 0.875rem; }
.search-footer {
  padding: 0.6rem 1.25rem;
  font-size: 0.72rem;
  color: var(--text-light);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 1.5rem;
  background: var(--green-bg);
}
.search-footer kbd {
  background: var(--border);
  border-radius: 3px;
  padding: 0.1rem 0.3rem;
  font-family: monospace;
  font-size: 0.7rem;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--green-bg); }
::-webkit-scrollbar-thumb { background: var(--green-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--green-bright); }


/* ── Keep the top navigation on ONE line on small laptops ── */
@media (max-width: 1280px) {
  .navbar { padding: 0 1rem; }
  .nav-brand { margin-right: 1rem; }
  .nav-links { gap: 0.1rem; }
  .nav-links a { padding: 0.4rem 0.55rem; font-size: 0.8rem; }
  .nav-search-btn { padding: 0.3rem 0.6rem; font-size: 0.75rem; }
}
@media (max-width: 1040px) {
  .nav-links a { padding: 0.35rem 0.45rem; font-size: 0.75rem; }
  .brand-mark { height: 32px; }
  .digisylva-logo { font-size: 1.1rem; }
}
