@font-face {
  font-family: "OpenDyslexic";
  src: url("fonts/OpenDyslexic-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "OpenDyslexic";
  src: url("fonts/OpenDyslexic-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "OpenDyslexic";
  src: url("fonts/OpenDyslexic-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
}

@font-face {
  font-family: "OpenDyslexic";
  src: url("fonts/OpenDyslexic-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
}

:root {
  --tc-green: #14532d;
  --tc-green-dark: #0b3b1f;
  --tc-cream: #f7f5ef;
  --tc-sage: #e8efe8;
  --tc-border: #d7dfd7;
  --tc-gold: #b68b2d;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--tc-cream);
  color: #1f2937;
  line-height: 1.65;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 2000;
  background: #000;
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.navbar,
.footer {
  background: var(--tc-green-dark);
}

.navbar .nav-link,
.navbar-brand,
.footer,
.footer a {
  color: #fff !important;
}

/* Footer specific styles */
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.footer-logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Base logo */
.footer-logo {
  height: 65px;
  width: auto;
}

/* Adjustments for balance */
.hub-logo {
  height: 65px;
}

.sense-logo {
  height: 55px;
}

/* Optional: improve contrast for non-white logos */
.hub-logo,
.sense-logo {
  background: #ffffff;
  padding: 4px;
  border-radius: 6px;
}

/* Mobile layout */
@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .footer-logo-wrapper {
    justify-content: flex-start;
  }
}

.hero {
  position: relative;
  background:
    linear-gradient(
      rgba(11, 59, 31, 0.55),
      rgba(11, 59, 31, 0.75)
    ),
    url("images/Witness-trees-header.jpg") no-repeat center/cover;

  color: #fff;
  padding: 5rem 0;
}

.section-title {
  color: var(--tc-green-dark);
  font-weight: 700;
}

.soft-card {
  background: #fff;
  border: 1px solid var(--tc-border);
  border-radius: 1rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.06);
  height: 100%;
}

.icon-badge {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--tc-sage);
  color: var(--tc-green-dark);
  font-size: 1.3rem;
  font-weight: 700;
}

.highlight {
  background: var(--tc-sage);
  border-left: 0.4rem solid var(--tc-green);
  border-radius: 0.75rem;
}

.tree-card img,
.gallery-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.tree-card img {
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}

.gallery-card {
  background: #fff;
  border: 1px solid var(--tc-border);
  border-radius: 1rem;
  overflow: hidden;
  height: 100%;
  box-shadow: 0 0.4rem 0.8rem rgba(0, 0, 0, 0.05);
}

.gallery-trigger {
  border: 0;
  padding: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: zoom-in;
}

.gallery-trigger img {
  transition: transform 0.2s ease-in-out;
}

.gallery-trigger:hover img,
.gallery-trigger:focus img {
  transform: scale(1.02);
}

.btn-success {
  background-color: var(--tc-green);
  border-color: var(--tc-green);
}

.btn-success:hover,
.btn-success:focus {
  background-color: #0f4525;
  border-color: #0f4525;
}

.btn-outline-success {
  color: var(--tc-green-dark);
  border-color: var(--tc-green-dark);
}

.btn-outline-success:hover,
.btn-outline-success:focus {
  background: var(--tc-green-dark);
  border-color: var(--tc-green-dark);
  color: #fff;
}

.notice {
  font-size: 0.95rem;
}

.focus-ring:focus,
a:focus,
button:focus,
.form-control:focus,
.form-select:focus {
  outline: 3px solid #111827;
  outline-offset: 2px;
  box-shadow: none !important;
}

.species-name {
  font-size: 0.95rem;
  color: #374151;
}

.modal-content {
  border-radius: 1rem;
  overflow: hidden;
}

.modal-image-wrap {
  background: #111827;
}

.modal-image-wrap img {
  max-height: 75vh;
  width: auto;
  max-width: 100%;
}

.summary-chip {
  background: var(--tc-sage);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  display: inline-block;
  margin: 0.25rem 0.35rem 0 0;
  font-size: 0.95rem;
}

.access-icon {
  font-size: 1.5rem;
  margin-right: 0.5rem;
}

.tree-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.tree-filter-label {
  font-weight: 600;
  color: var(--tc-green-dark);
}

.tree-card.is-hidden {
  display: none;
}

/* Accessibility toolbar */

.accessibility-toolbar {
  background: #ffffff;
  border-bottom: 1px solid var(--tc-border);
}

.toolbar-label {
  font-weight: 600;
  color: var(--tc-green-dark);
  margin-right: 0.25rem;
}

/* Dyslexic font mode */

.dyslexic-font,
.dyslexic-font * {
  font-family: "OpenDyslexic", Arial, Verdana, Tahoma, sans-serif !important;
  letter-spacing: 0.04em;
  word-spacing: 0.08em;
  line-height: 1.8;
}

/* High contrast mode */

body.high-contrast {
  background: #000 !important;
  color: #fff !important;
}

body.high-contrast .soft-card,
body.high-contrast .gallery-card,
body.high-contrast .accordion-item,
body.high-contrast .modal-content,
body.high-contrast .accessibility-toolbar,
body.high-contrast .alert,
body.high-contrast .highlight {
  background: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
  box-shadow: none !important;
}

body.high-contrast .section-title,
body.high-contrast .species-name,
body.high-contrast .toolbar-label,
body.high-contrast .form-text,
body.high-contrast .text-muted,
body.high-contrast p,
body.high-contrast li,
body.high-contrast label,
body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast h4,
body.high-contrast h5,
body.high-contrast h6,
body.high-contrast strong,
body.high-contrast em,
body.high-contrast blockquote {
  color: #fff !important;
}

body.high-contrast .btn-outline-success,
body.high-contrast .btn-success,
body.high-contrast .navbar,
body.high-contrast .footer {
  background: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
}

body.high-contrast a,
body.high-contrast .nav-link,
body.high-contrast .navbar-brand {
  color: #ffff66 !important;
}

body.high-contrast .hero {
  background: #000 !important;
  color: #fff !important;
}

body.high-contrast .form-control,
body.high-contrast .form-select,
body.high-contrast textarea,
body.high-contrast input {
  background: #000 !important;
  color: #fff !important;
  border: 2px solid #fff !important;
}
body.high-contrast select {
  background: #000 !important;
  color: #fff !important;
  border: 2px solid #fff !important;
}

body.high-contrast .accordion-button {
  background: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
}

body.high-contrast .skip-link {
  background: #fff !important;
  color: #000 !important;
}

body.high-contrast .map-legend {
  background: #000 !important;
  border: 1px solid #fff !important;
  color: #fff !important;
}

body.high-contrast .legend-row.legend-note {
  background: #000 !important;
  border: 1px solid #fff !important;
  color: #fff !important;
}

body.high-contrast .tree-filter-label{
  background: #000 !important;
  border: 1px solid #fff !important;
  color: #fff !important;
}

/* Smaller screen tweaks */

@media (max-width: 576px) {
  .hero {
    padding: 3.5rem 0;
  }

  .accessibility-toolbar .d-flex {
    align-items: stretch !important;
  }

  .accessibility-toolbar .btn,
  .accessibility-toolbar a.btn {
    width: 100%;
  }
}

#treeMap {
  width: 100%;
  min-height: 450px;
}
.tree-marker {
  background-color: #14532d;
  color: #fff;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.tree-marker span {
  line-height: 1;
}

/* Map legend */

.map-legend{
background:#f8f9fa;
border-top:1px solid #ddd;
border-bottom:1px solid #ddd;
}

.legend-items{
display:flex;
flex-direction:column;
gap:0.5rem;
}

.legend-row{
display:flex;
align-items:center;
gap:0.6rem;
font-size:0.95rem;
}

.legend-label{
font-weight:500;
}

.legend-note {
  flex-basis: 100%;
  width: 100%;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* match tree marker style */

.tree-marker.small{
width:24px;
height:24px;
display:inline-flex;
align-items:center;
justify-content:center;
border-radius:50%;
background:#2f7d32;
color:#fff;
font-size:0.75rem;
font-weight:600;
}
/* Better high contrast coverage across the whole page */
body.high-contrast,
body.high-contrast section,
body.high-contrast .bg-white {
  background: #000 !important;
  color: #fff !important;
}

body.high-contrast .section-title,
body.high-contrast p,
body.high-contrast li,
body.high-contrast label,
body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast h4,
body.high-contrast h5,
body.high-contrast h6,
body.high-contrast strong,
body.high-contrast em,
body.high-contrast blockquote,
body.high-contrast .species-name,
body.high-contrast .toolbar-label,
body.high-contrast .form-text,
body.high-contrast .text-muted,
body.high-contrast .legend-text,
body.high-contrast .map-intro,
body.high-contrast .summary-chip {
  color: #fff !important;
}

body.high-contrast .soft-card,
body.high-contrast .gallery-card,
body.high-contrast .accordion-item,
body.high-contrast .modal-content,
body.high-contrast .accessibility-toolbar,
body.high-contrast .alert,
body.high-contrast .highlight,
body.high-contrast .map-legend,
body.high-contrast .summary-chip {
  background: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
  box-shadow: none !important;
}

body.high-contrast .summary-chip {
  border: 1px solid #fff !important;
}

body.high-contrast .btn-outline-success,
body.high-contrast .btn-success,
body.high-contrast .navbar,
body.high-contrast .footer,
body.high-contrast .back-to-top-button {
  background: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
}

body.high-contrast a,
body.high-contrast .nav-link,
body.high-contrast .navbar-brand {
  color: #ffff66 !important;
}

body.high-contrast .hero {
  background: #000 !important;
  color: #fff !important;
}

body.high-contrast .form-control,
body.high-contrast .form-select,
body.high-contrast textarea,
body.high-contrast input,
body.high-contrast select {
  background: #000 !important;
  color: #fff !important;
  border: 2px solid #fff !important;
}

body.high-contrast .accordion-button {
  background: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
}

body.high-contrast .skip-link {
  background: #fff !important;
  color: #000 !important;
}

.high-contrast .leaflet-popup-content {
  display: inline-block;
  padding: 0.4rem 0.6rem;
  background: #000;
  color: #fff;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
}

.high-contrast span[aria-hidden="true"] {
  color: #000;
  font-weight: 700;
}

/* Floating back to top button */
.back-to-top-button {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1050;
  display: none;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.18);
}

.back-to-top-button.is-visible {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 576px) {
  .back-to-top-button {
    right: 0.75rem;
    bottom: 0.75rem;
  }
}



.tree-map-panel {
  height: 560px;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--tc-border);
}

.tree-info-panel {
  min-height: 280px;
}

.tree-info-panel img {
  width: 100%;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
}

.tree-info-meta {
  font-size: 0.95rem;
}

@media (max-width: 991.98px) {
  .tree-map-panel {
    height: 440px;
  }
}



.navbar-logo {
  height: 36px;
  width: auto;
  display: block;
}

@media (min-width: 768px) {
  .navbar-logo {
    height: 42px;
  }
}

.footer {
  border-top: 1px solid rgba(255,255,255,0.2);
  background: #0f3d2e;
  color: white;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-text {
  max-width: 600px;
}

.footer-tagline {
  opacity: 0.85;
  font-style: italic;
}

.footer-logo-wrapper {
  text-align: right;
}

.footer-logo {
  max-height: 70px;
  width: auto;
  opacity: 0.95;
}

.footer-logo:hover {
  opacity: 1;
}

@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-logo-wrapper {
    text-align: center;
  }
}

/* Accessible Leaflet popup styling */

.leaflet-popup-content-wrapper {
  background: #ffffff;
  color: #111;
  border-radius: 12px;
  border: 2px solid #14532d;
}

.leaflet-popup-content {
  font-size: 1rem;
  line-height: 1.5;
}

.leaflet-popup-tip {
  background: #ffffff;
}

/* popup link */
.leaflet-popup-content a {
  color: #14532d;
  font-weight: 600;
  text-decoration: underline;
}

/* improve close button visibility */
.leaflet-popup-close-button {
  color: #14532d !important;
  font-size: 20px !important;
}

.section-divider {
  margin: 2rem 0;
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

#about ul li {
  margin-bottom: 0.35rem;
}



/* Map improvements */
.map-popup {
  font-size: 0.9rem;
}

.map-popup img {
  max-height: 120px;
  object-fit: cover;
}

.map-link {
  display: inline-block;
  margin-top: 0.4rem;
  font-weight: 600;
  text-decoration: underline;
}

.high-contrast .map-link {
  color: #000 !important;
  font-weight: 700;
}

/* Marker styling */
.tree-marker-number {
  width: 32px;
  height: 32px;
  background: #0b3b1f;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border: 2px solid #fff;
  font-size: 0.85rem;
}

.high-contrast .tree-marker-number {
  background: #000;
  color: #fff;
  border: 2px solid #fff;
}


.tree-highlight {
  outline: 3px solid #0b3b1f;
  outline-offset: 4px;
  transition: outline 0.3s ease;
}

.high-contrast .tree-highlight {
  outline: 3px solid #fff;
}

.marker-highlight {
  transform: scale(1.3);
  transition: transform 0.3s ease;
  z-index: 1000;
}

.gentle-idea {
  max-width: 700px;
}

.gentle-idea ul {
  padding-left: 1.2rem;
}

.gentle-idea li {
  margin-bottom: 0.4rem;
}

