:root {
  color-scheme: light;
  --bg: #fcfbf8;
  --bg-soft: #f3f1ec;
  --text: #1f2a30;
  --text-muted: #4d5b65;
  --line: #bfb7aa;
  --primary: #1f4e5f;
  --primary-hover: #193f4d;
  --radius: 12px;
  --radius-sm: 10px;
  --shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  --container: 1080px;
  --focus-ring: #486581;
  --header-logo-h: clamp(2.35rem, 3.5vw, 2.75rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

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

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

a:hover,
a:focus-visible {
  text-decoration: underline;
}

p {
  margin: 0 0 1rem;
}

h1,
h2,
h3 {
  margin: 0 0 0.75rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.section {
  padding: 5.5rem 0;
}

main section,
main article[id] {
  scroll-margin-top: 92px;
}

#top {
  scroll-margin-top: 0;
}

.section-alt {
  background: var(--bg-soft);
}

.section-head {
  max-width: none;
  margin-bottom: 2.2rem;
}

.section-head h2 {
  margin-bottom: 0.65rem;
  font-size: clamp(1.7rem, 2.2vw, 2.15rem);
  line-height: 1.2;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  max-width: none;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.7rem 1rem;
  border-radius: 0 0 6px 0;
  z-index: 1001;
}

.skip-link:focus {
  left: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-nav a[aria-current="page"] {
  color: var(--primary);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(2px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.header-inner {
  position: relative;
  min-height: 76px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 1.25rem;
}

.header-right {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 1.3rem;
  flex: 0 0 auto;
  min-width: 0;
}

/* Single horizontal strip: DE/ES then hamburger (Chrome Android flex quirks) */
.header-controls {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  width: max-content;
  max-width: 100%;
}

@media (min-width: 921px) {
  .header-right {
    gap: 1.65rem;
  }
}

@media (min-width: 1200px) {
  .header-right {
    gap: 1.95rem;
  }
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
  min-width: min-content;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.3rem 0.4rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}

.lang-flag {
  flex-shrink: 0;
  display: block;
  width: 18px;
  height: 12px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(31, 42, 48, 0.12);
}

.lang-label {
  line-height: 1.2;
}

.lang-btn:hover,
.lang-btn:focus-visible {
  color: var(--primary);
}

.lang-btn.is-active {
  color: var(--primary);
}

.lang-btn.is-active .lang-label {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lang-switch-sep {
  color: var(--text-muted);
  font-size: 0.82rem;
  user-select: none;
  opacity: 0.65;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  line-height: 0;
  border-radius: 10px;
}

.logo:hover,
.logo:focus-visible {
  text-decoration: none;
}

.logo:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.logo-image {
  display: block;
  width: auto;
  height: var(--header-logo-h);
  max-width: min(100%, 11.5rem);
  object-fit: contain;
  object-position: left center;
}

.site-nav {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
}

/* Row: scrollable main links + "Mehr" (dropdown must sit outside overflow-x) */
.site-nav-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.1rem;
  min-width: 0;
  flex: 1 1 auto;
  width: 100%;
}

.site-nav-links {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  min-width: 0;
  /* Hug content width so the block sits on the right; shrink + scroll when needed */
  flex: 0 1 auto;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.site-nav-links > li {
  flex-shrink: 0;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.3rem 0.15rem;
}

/* One line per primary link (Spanish labels are longer) */
.site-nav-links > li > a {
  white-space: nowrap;
}

.nav-more {
  position: relative;
  flex-shrink: 0;
}

.nav-more-toggle {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  font-family: inherit;
  padding: 0.3rem 0.15rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}

/* Spanish: tighter primary strip + gap before "Más" */
html[lang="es"] .site-nav-links {
  gap: 0.65rem;
}

html[lang="es"] .site-nav-inner {
  gap: 0.65rem;
}

html[lang="es"] .site-nav-links > li > a,
html[lang="es"] .nav-more-toggle {
  font-size: 0.88rem;
  padding-inline: 0.12rem;
}

@media (min-width: 1100px) {
  html[lang="es"] .site-nav-links {
    gap: 0.85rem;
  }

  html[lang="es"] .site-nav-inner {
    gap: 0.85rem;
  }

  html[lang="es"] .site-nav-links > li > a,
  html[lang="es"] .nav-more-toggle {
    font-size: 0.92rem;
  }
}

.site-nav a:hover,
.site-nav a:focus-visible,
.nav-more-toggle:hover,
.nav-more-toggle:focus-visible {
  color: var(--primary);
  text-decoration: none;
}

.nav-submenu {
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 12.5rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
  display: none;
  z-index: 1001;
}

.nav-submenu li + li {
  margin-top: 0.2rem;
}

.nav-submenu a {
  display: block;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
}

.nav-submenu a:hover,
.nav-submenu a:focus-visible {
  background: #f8fafc;
}

.nav-more.open .nav-submenu {
  display: block;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  width: 44px;
  height: 42px;
  padding: 0.55rem;
  cursor: pointer;
  touch-action: manipulation;
  font-family: inherit;
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
  overflow: visible;
}

.nav-toggle-icon {
  display: block;
  flex-shrink: 0;
  margin: 0 auto;
}

.hero {
  padding-top: 6.25rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 2.25rem;
  align-items: center;
}

.eyebrow {
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.075em;
}

.hero h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.1rem, 3.5vw, 3.2rem);
  line-height: 1.12;
  max-width: 18ch;
}

.hero-text {
  margin-bottom: 1.9rem;
  color: var(--text-muted);
  max-width: 60ch;
  font-size: 1.05rem;
}

.hero-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: #fff;
  box-shadow: var(--shadow);
}

.hero-card h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
}

.hero-card ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  align-items: stretch;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  height: 100%;
  min-height: 210px;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.55rem;
  font-size: 1.08rem;
}

.card p {
  margin-bottom: 0;
  color: var(--text-muted);
}

.past-projects {
  margin-top: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 0.2rem 1rem 1rem;
}

.past-projects summary {
  cursor: pointer;
  font-weight: 700;
  padding: 0.85rem 0.15rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  list-style: none;
}

.past-projects summary::-webkit-details-marker {
  display: none;
}

.past-projects summary::after {
  content: none;
}

.past-projects summary::before {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.75;
  flex: 0 0 auto;
  transition: transform 0.15s ease;
}

.past-projects[open] > summary::after {
  content: none;
}

.past-projects[open] > summary::before {
  transform: rotate(225deg);
}

.past-projects summary:hover {
  text-decoration: none;
}

.past-projects summary:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 6px;
}

.past-projects-title {
  font-weight: 700;
  margin: 0;
  padding: 0.8rem 0;
}

.past-projects-intro {
  margin: 0.2rem 0 1rem;
  color: var(--text-muted);
}

.past-projects-toggle-all {
  margin-bottom: 0.8rem;
}

.past-projects-list {
  display: grid;
  gap: 0.8rem;
}

.past-project-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  background: var(--bg-soft);
}

.past-country {
  padding: 0;
  overflow: hidden;
}

.past-country > summary {
  cursor: pointer;
  padding: 0.9rem 1rem;
  background: transparent;
  font-weight: inherit;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  list-style: none;
}

.past-country > summary::-webkit-details-marker {
  display: none;
}

.past-country > summary::before {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.75;
  flex: 0 0 auto;
  transition: transform 0.15s ease;
}

.past-country[open] > summary::before {
  transform: rotate(225deg);
}

.past-country > summary:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: -2px;
}

.past-country-title {
  margin: 0;
  display: inline-block;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.past-country > .past-project-body {
  padding: 0.9rem 1rem;
}

.nested-country-list {
  margin-top: 1rem;
  margin-left: 0.15rem;
  padding: 0.85rem;
  border: 1px solid #e7e3db;
  border-radius: var(--radius-sm);
  background: #f8f6f1;
}

.nested-country-list .past-country > summary {
  background: transparent;
}

.nested-country-list .past-country-title {
  font-size: 0.98rem;
}

.past-project-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.past-project-item p {
  margin: 0;
  color: var(--text-muted);
}

.past-project-item ul {
  margin: 0;
  padding-left: 1.1rem;
}

.past-project-item li + li {
  margin-top: 0.75rem;
}

.past-project-item h4 {
  margin: 0 0 0.2rem;
  font-size: 0.98rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.past-project-item li p {
  margin: 0;
}

.project-facts {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.25rem;
}

.project-facts li {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.project-facts strong {
  color: var(--text);
}

.past-project-item li p.donation-note {
  margin-top: 0.6rem;
}

.donation-progress {
  margin-top: 0.75rem;
}

.donation-progress-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
}

.donation-progress-title,
.donation-progress-value,
.donation-progress-meta {
  margin: 0;
}

.donation-progress-value {
  color: var(--text-muted);
}

.donation-progress-value strong {
  color: var(--text);
}

.donation-progress-percent {
  color: var(--text-muted);
  font-weight: 600;
  margin-left: 0.35rem;
  white-space: nowrap;
}

.donation-progress-bar {
  margin-top: 0.5rem;
  height: 10px;
  border-radius: 999px;
  background: rgba(31, 42, 48, 0.12);
  overflow: hidden;
}

.donation-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  min-width: 6px;
}

.donation-progress-meta {
  margin-top: 0.45rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.gallery-note {
  margin: 1.15rem 0 0.45rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.past-project-item ul + .gallery-note {
  margin-top: 1.55rem;
}

.project-gallery {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.project-gallery-sm {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.45rem;
}

.gallery-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  padding: 0;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 10;
}

.project-gallery-sm .gallery-item img {
  aspect-ratio: 1 / 1;
}

.gallery-item:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(13, 23, 33, 0.88);
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px))
    max(1rem, env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
}

.lightbox[hidden] {
  display: none;
}

.lightbox-image {
  width: min(100%, 1080px);
  max-height: 86vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #fff;
}

.lightbox-close {
  position: absolute;
  top: max(0.85rem, env(safe-area-inset-top, 0px));
  right: max(0.85rem, env(safe-area-inset-right, 0px));
  width: 40px;
  height: 40px;
  border: 1px solid #d9dfe5;
  border-radius: 999px;
  background: #fff;
  color: #1f2a30;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem 2.25rem;
  align-items: start;
}

.about-principles {
  margin-top: 1.25rem;
}

.list {
  margin: 0;
  padding-left: 1.1rem;
}

.highlight-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
}

.highlight-box h3 {
  margin-top: 0;
}

.donation-side {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.donation-side .highlight-box p:last-of-type {
  margin-bottom: 0;
}

.donation-side .highlight-box .btn {
  margin-top: 0.75rem;
}

/* Spendenkonto: Text links, Kopieren-Buttons rechts bündig untereinander */
.donation-account-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: start;
}

.donation-account-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem;
  min-width: 0;
}

.donation-account-line .copy-btn {
  margin-left: 0;
  margin-top: 0;
  justify-self: end;
}

.donation-account-line--payee > .donation-payee-label {
  grid-column: 1 / -1;
}

.donation-payee-value {
  min-width: 0;
  overflow-wrap: break-word;
}

.account-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.copy-btn {
  margin-left: 0.45rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.3;
  cursor: pointer;
}

.copy-btn:hover,
.copy-btn:focus-visible {
  background: #f8fafc;
  border-color: #bcccdc;
}

.events-list {
  display: grid;
  gap: 1.15rem;
}

.event-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem;
  box-shadow: var(--shadow);
}

.event-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.event-item h3 {
  margin: 0;
}

.event-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cddae4;
  border-radius: 999px;
  background: #eef5f8;
  color: #22485a;
  padding: 0.2rem 0.55rem;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.event-meta-chips {
  margin: 0.6rem 0 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.event-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.2;
  padding: 0.2rem 0.55rem;
}

.event-copy {
  margin: 0;
}

.event-meta {
  margin: 0 0 0.55rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.events-list + .event-meta {
  margin-top: 1rem;
}

.event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.6rem;
  margin-top: 0.75rem;
}

.event-action-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.92rem;
  width: fit-content;
  max-width: 100%;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
}

.event-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--text-muted);
  line-height: 1;
}

.event-action-icon img {
  display: block;
  width: 14px;
  height: 14px;
}

.event-action-link:hover,
.event-action-link:focus-visible {
  border-color: #bcccdc;
  background: #f8fafc;
  text-decoration: none;
}

.contact-box {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem;
  background: #fff;
}

.contact-box h2 {
  margin-top: 0;
}

.contact-details p {
  margin: 0 0 0.55rem;
}

.legal-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem;
  background: #fff;
}

.legal-content {
  display: grid;
  gap: 1.25rem;
}

.legal-content article + article {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.legal-content h3 {
  margin-top: 0;
}

.legal-content h4 {
  margin: 0.7rem 0 0.35rem;
  font-size: 0.98rem;
}

.legal-content p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.65;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.35rem 0;
  background: #fff;
}

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

.footer-inner p {
  margin: 0;
  color: var(--text-muted);
}

.btn {
  display: inline-block;
  border-radius: var(--radius-sm);
  padding: 0.72rem 1.15rem;
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease,
    box-shadow 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  text-decoration: none;
}

.btn:focus-visible,
.nav-toggle:focus-visible,
.site-nav a:focus-visible,
.nav-more-toggle:focus-visible,
.lang-btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: var(--primary);
  border-color: var(--line);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: #bcccdc;
  background: #f8fafc;
}

@media (max-width: 920px) {
  .hero-grid,
  .cards,
  .two-col,
  .contact-box {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 5rem;
  }

  .card {
    min-height: 0;
  }

  .section {
    padding: 4.25rem 0;
  }

  .hero-content {
    max-width: 62ch;
  }
}

body.mobile-nav-open,
body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 1.4rem, var(--container));
  }

  .header-inner {
    min-height: 70px;
  }

  /* Logo left, language + menu as one block on the right */
  .header-right {
    margin-left: auto;
    gap: 0.85rem;
  }

  .header-controls {
    gap: 0.55rem;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  /* Fixed to viewport: absolute inside .container was ~80% width on Chrome Android */
  .site-nav {
    flex: none;
    position: fixed;
    left: 0;
    right: 0;
    top: var(--mobile-nav-offset, 72px);
    max-height: calc(100vh - var(--mobile-nav-offset, 72px));
    max-height: calc(100svh - var(--mobile-nav-offset, 72px));
    width: 100%;
    max-width: none;
    margin: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    z-index: 999;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-sizing: border-box;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: none;
  }

  .site-nav[aria-hidden="false"] {
    display: block;
  }

  .site-nav.open {
    display: block;
  }

  .site-nav-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .site-nav-links {
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    overflow-x: visible;
    flex: none;
    width: 100%;
  }

  .site-nav-links > li,
  .nav-more {
    border-top: 1px solid #e8e4dc;
    border-top: 1px solid color-mix(in srgb, var(--line) 35%, var(--bg) 65%);
  }

  /* Top-level row: same alignment as primary links (buttons default to centered text in UA styles) */
  .site-nav-links > li > a,
  .nav-more-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 1rem;
    width: 100%;
    text-align: center;
  }

  .nav-more {
    position: static;
  }

  .nav-submenu {
    position: static;
    display: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0 0 0.3rem 0;
    min-width: 0;
  }

  .nav-more.open .nav-submenu {
    display: block;
  }

  .nav-submenu a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.7rem 1rem 0.7rem 1.8rem;
    border-radius: 0;
    text-align: start;
  }

  .hero {
    padding-top: 4rem;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 8vw, 2.25rem);
  }

  .hero-text {
    font-size: 1rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .section-head {
    margin-bottom: 1.6rem;
  }

  .past-projects {
    margin-top: 1rem;
    padding: 0.2rem 0.8rem 0.85rem;
  }

  .past-projects summary,
  .past-projects-title {
    padding: 0.75rem 0.15rem;
  }

  .past-project-item {
    padding: 0.8rem;
  }

  .past-project-item h4 {
    font-size: 0.95rem;
  }

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

  .project-gallery-sm {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-value {
    font-size: 0.92rem;
  }

  .copy-btn {
    margin-top: 0.45rem;
    margin-left: 0;
    display: inline-flex;
    align-items: center;
  }

  .donation-account-line .copy-btn {
    margin-top: 0;
  }

  .event-top {
    flex-direction: column;
    gap: 0.45rem;
  }

  .contact-box {
    padding: 1.25rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 3rem 0;
  }

  .past-project-item {
    padding: 0.7rem;
  }

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

  .event-item {
    padding: 1rem;
  }

  .event-meta-chips {
    margin-top: 0.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
