/* Accent colour — Pantone 7495 C */
:root {
  --accent: #8D9D3A;
  --accent-dark: #717e2e;
  --accent-light: #a8b84e;
  --bs-link-color: #8D9D3A;
  --bs-link-hover-color: #717e2e;
}

[data-bs-theme="dark"] {
  --bs-link-color: #a8b84e;
  --bs-link-hover-color: #c0ce6e;
}

/* Accent button */
.btn-accent {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-accent:hover,
.btn-accent:focus {
  background-color: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.btn-outline-accent {
  border-color: var(--accent);
  color: var(--accent);
  background-color: transparent;
}
.btn-outline-accent:hover,
.btn-outline-accent:focus {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Accent nav link — Podpořte nás */
.nav-link-accent {
  color: var(--accent) !important;
  font-weight: 600;
}
.nav-link-accent:hover,
.nav-link-accent:focus,
.nav-link-accent.active {
  color: var(--accent-dark) !important;
}

/* Smooth scrolling + offset for sticky nav */
html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 70px;
}

/* Sticky footer — main fills remaining viewport height */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body > main {
  flex: 1;
}

/* Section label (replaces h2 — minimalist caps style) */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6c757d;
  margin-bottom: 2rem;
}

/* Navbar logo — switch between dark and light variant */
.navbar-logo {
  display: none;
  height: 40px;
}

[data-bs-theme="light"] .navbar-logo-light,
[data-bs-theme="dark"] .navbar-logo-dark {
  display: inline-block;
}

/* Theme toggle button */
#theme-toggle {
  font-size: 1rem;
  opacity: 0.6;
  transition: opacity 0.15s;
  text-decoration: none;
}

#theme-toggle:hover {
  opacity: 1;
}

/* Hero — full-width s overlay */
.hero-section {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-color: #1e1e2e;
  background-size: cover;
  background-position: center;
}

.hero-videos {
  position: absolute;
  inset: 0;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-video--active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-logo {
  max-height: 220px;
  max-width: 100%;
  width: auto;
}

/* Teasers */
.teaser-card {
  border: 1px solid #e9ecef;
}

.teaser-project-logo {
  max-height: 50px;
  max-width: 110px;
  width: auto;
  object-fit: contain;
}

/* Contacts — map */
.map-wrapper {
  position: relative;
  aspect-ratio: 16 / 6;
  border: 1px solid #e9ecef;
  overflow: hidden;
}

@media (max-width: 575px) {
  .map-wrapper {
    aspect-ratio: 4 / 3;
  }
}

.map-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.map-overlay-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: pointer;
}

/* Project logo (homepage teaser) */
.project-logo {
  max-height: 80px;
  max-width: 180px;
  width: auto;
  object-fit: contain;
}

.project-subtitle {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6c757d;
  margin-bottom: 0.75rem;
}

/* Project grid — photo tiles with overlay */
.project-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
}

@media (max-width: 991px) {
  .project-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 575px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: block;
  background-color: #2a2a35;
  text-decoration: none;
}

.project-tile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.project-tile:hover .project-tile-img {
  transform: scale(1.05);
}

.project-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0) 55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.9rem;
}

.project-tile-name {
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.25;
  margin-bottom: 0.15rem;
}

.project-tile-year {
  color: rgba(255,255,255,0.65);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-tile-logo-area {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 0.85rem 1rem;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, transparent 100%);
  z-index: 1;
}
.project-tile-logo {
  max-width: 160px;
  max-height: 42px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.35));
}

.project-detail-logo {
  max-width: 220px;
  max-height: 56px;
}

.projects-section-heading {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  margin-bottom: 0.75rem;
}

.project-tile--completed .project-tile-img {
  filter: saturate(0.4);
}

.project-tile--completed:hover .project-tile-img {
  filter: saturate(0.7);
}

/* Project detail — hero image */
.project-detail-hero {
  position: relative;
  aspect-ratio: 16 / 6;
  overflow: hidden;
  border-radius: 2px;
}

.project-detail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-detail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
}

.project-detail-title {
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.project-detail-year {
  color: rgba(255,255,255,0.7);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Project detail body — heading spacing */
#project-info h2,
#project-info h3 {
  margin-top: 2.5rem;
}

#project-info h2:first-child,
#project-info h3:first-child {
  margin-top: 0;
}

/* File download links — matches .doc-link style from o-spolku */
a[href$=".pdf"] {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid #dee2e6;
}

a[href$=".pdf"]:hover {
  border-bottom-color: #495057;
  color: inherit;
}

a[href$=".pdf"]::before {
  font-family: "bootstrap-icons";
  content: "\f63e";
  margin-right: 0.35em;
  display: inline-block;
  text-decoration: none;
  border-bottom: none;
}

/* Partners section — always light background */
.partners-section {
  background: #f8f9fa;
  /* clips the .row negative gutter margin so partner-row borders don't
     bleed past this box onto the page background behind it */
  overflow: hidden;
}

.partners-section .partner-logo,
.partners-section .partner-logo-general,
.partners-section .partner-row-logo {
  mix-blend-mode: multiply;
}

/* Partners — page */
.partners-group-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6c757d;
  margin-bottom: 1.5rem;
}

.partner-row {
  padding: 2rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.partner-row:last-child {
  border-bottom: none;
}

.partner-row-logo {
  max-height: 120px;
  max-width: 240px;
  object-fit: contain;
}

.partner-link {
  font-size: 0.85rem;
  color: #6c757d;
  text-decoration: none;
  border-bottom: 1px solid #dee2e6;
  word-break: break-all;
}

.partner-link:hover {
  color: #212529;
  border-bottom-color: #495057;
}

/* Partners — footer logos (kept for footer.html) */
.partner-logo-general {
  max-height: 160px;
  max-width: 600px;
  width: auto;
  object-fit: contain;
}

.partner-logo {
  max-height: 120px;
  max-width: 320px;
  width: auto;
  object-fit: contain;
}

.partner-logo--nasavrky {
  max-height: 240px;
  max-width: 640px;
}

/* Partners — foreign country badge */
.partner-foreign-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6c757d;
  border: 1px solid #dee2e6;
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
}

.donors-list {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 2;
  column-gap: 2rem;
}

@media (max-width: 575px) {
  .donors-list { columns: 1; }
}

.donors-item {
  padding: 0.25rem 0;
  font-size: 0.95rem;
}

.donors-note {
  color: #6c757d;
  font-size: 0.85rem;
}

.supporters-cta {
  font-size: 0.9rem;
  color: #6c757d;
}

/* Longterm / honorary supporters */
.longterm-avatar {
  width: 160px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  display: block;
  margin: 0 auto;
}

.longterm-avatar-placeholder {
  width: 160px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background-color: var(--bs-gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  color: var(--bs-gray-500);
  font-size: 4.5rem;
}

[data-bs-theme="dark"] .longterm-avatar-placeholder {
  background-color: var(--bs-gray-700);
  color: var(--bs-gray-400);
}

.longterm-bio {
  color: var(--bs-body-color);
}

.longterm-bio p {
  margin-bottom: 0.75rem;
}

.longterm-bio p:last-child {
  margin-bottom: 0;
}

/* Social icon links */
.social-icon-link {
  font-size: 1.75rem;
  color: #6c757d;
  text-decoration: none;
  border-bottom: none;
  line-height: 1;
  padding: 0.4rem;
  margin: 0.25rem 0;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s;
}

.social-icon-link,
.contact-list .social-icon-link,
.contact-list .social-icon-link:hover {
  border-bottom: none;
}

.social-icon-link:hover {
  color: #212529;
}

[data-bs-theme="dark"] .social-icon-link {
  color: rgba(222, 226, 230, 0.55);
}

[data-bs-theme="dark"] .social-icon-link:hover {
  color: #fff;
}

/* Contacts */
.contact-list dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6c757d;
  margin-top: 1.25rem;
  margin-bottom: 0.1rem;
}

.contact-list dd {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.contact-list a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid #dee2e6;
}

.contact-list a:hover {
  border-bottom-color: #495057;
}

.contact-zemekeltu-box {
  border-left: 3px solid #6c757d;
  padding: 0.85rem 1rem;
  background: rgba(0,0,0,0.03);
  border-radius: 0 4px 4px 0;
  font-size: 0.9rem;
}

.contact-zemekeltu-box-title {
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.contact-zemekeltu-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid #dee2e6;
  font-size: 0.85rem;
}

.contact-zemekeltu-link:hover {
  border-bottom-color: #495057;
}

[data-bs-theme="dark"] .contact-zemekeltu-box {
  background: rgba(255,255,255,0.04);
  border-left-color: #6c757d;
}

/* Chairman card */
.chairman-card {
  border: 1px solid #e9ecef;
  border-radius: 4px;
  padding: 1rem 1.25rem;
}

[data-bs-theme="dark"] .chairman-card {
  border-color: rgba(222, 226, 230, 0.12);
}

.chairman-avatar {
  width: 88px;
  height: 88px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
  font-size: 2.5rem;
}

/* Documents */
.doc-intro {
  color: #6c757d;
  font-size: 0.95rem;
}

.doc-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid #dee2e6;
}

.doc-link:hover {
  border-bottom-color: #495057;
  color: inherit;
}

.doc-list li {
  margin-bottom: 0.5rem;
}

.doc-year {
  font-size: 0.85rem;
  color: #6c757d;
}

/* Project detail */
.project-logo-detail {
  max-height: 120px;
  max-width: 300px;
  width: auto;
  object-fit: contain;
}

/* Podpořte nás — QR kód */
.col-lg-8 img[src*="qr-"] {
  max-width: 180px;
  display: block;
  margin-top: 1rem;
}

/* O spolku — subsection labels (Poslání / Mise / Vize) */
.about-subsection-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6c757d;
  margin-top: 2rem;
  margin-bottom: 0.35rem;
}

/* O spolku — sub-navigation */
.about-subnav {
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 1.25rem;
}

.subnav-link {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6c757d;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.subnav-link:hover {
  color: #212529;
  border-bottom-color: #212529;
}

.subnav-link--active {
  color: #212529;
  border-bottom-color: #212529;
}

button.subnav-link {
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  padding: 0 0 2px;
  cursor: pointer;
}

/* Gloria Celtis laureate */
.gloria-laureate-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.about-section {
  padding-top: 3rem;
  margin-top: 0;
}

/* Timeline — horizontal scrollable */
.timeline-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timeline-arrow {
  flex-shrink: 0;
  background: none;
  border: 1px solid currentColor;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.15s;
  color: inherit;
}

.timeline-arrow:hover {
  opacity: 1;
}

.timeline-h-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  padding-bottom: 0.75rem;
  scrollbar-width: none;
}

.timeline-h-wrapper::-webkit-scrollbar {
  display: none;
}

.timeline-h {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  position: relative;
  min-width: max-content;
  padding: 0 1rem;
}

.timeline-h::before {
  content: '';
  position: absolute;
  top: 2.6rem;
  left: 1rem;
  right: 1rem;
  height: 1px;
  background: #dee2e6;
}

.timeline-h-item {
  position: relative;
  min-width: 180px;
  max-width: 220px;
  padding-right: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.timeline-h-year {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6c757d;
  height: 1.4rem;
  display: flex;
  align-items: center;
}

.timeline-h-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6c757d;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #dee2e6;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.timeline-h-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.timeline-h-link {
  color: inherit;
  text-decoration: none;
}

.timeline-h-link::after {
  content: ' ›';
  opacity: 0;
  transition: opacity 0.15s;
}

.timeline-h-link:hover::after {
  opacity: 1;
}

.timeline-h-desc {
  font-size: 0.82rem;
  color: #6c757d;
  margin-bottom: 0;
  line-height: 1.4;
}

/* Footer with partner logos */
.footer-partners {
  font-size: 0.8rem;
  border-top: 1px solid #e9ecef;
}

.footer-logos {
  background: #f8f9fa;
}

.footer-logo-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0;
}

.footer-logo-group + .footer-logo-group {
  margin-top: 0.25rem;
}

.footer-logo-group-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #adb5bd;
  margin-bottom: 0.5rem;
  text-align: center;
}

.footer-logo-group-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem 3rem;
}

.footer-logo-general {
  min-height: 100px;
  max-height: 110px;
  max-width: 260px;
  width: auto;
  object-fit: contain;
  opacity: 0.85;
  mix-blend-mode: multiply;
  transition: opacity 0.2s;
}

.footer-logo-main {
  min-height: 70px;
  max-height: 80px;
  max-width: 200px;
  width: auto;
  object-fit: contain;
  opacity: 0.8;
  mix-blend-mode: multiply;
  transition: opacity 0.2s;
}

.footer-logo {
  min-height: 50px;
  max-height: 55px;
  max-width: 160px;
  width: auto;
  object-fit: contain;
  opacity: 0.7;
  mix-blend-mode: multiply;
  transition: opacity 0.2s;
}

.footer-logo:hover,
.footer-logo-main:hover,
.footer-logo-general:hover {
  opacity: 1;
}

.footer-logo--nasavrky {
  min-height: auto;
  max-height: 80px;
}

.footer-logo--burza-filantropie {
  max-height: 90px;
}

/* Related projects grid (inside project detail) */
.project-grid--related {
  grid-template-columns: repeat(3, 1fr);
  max-width: 720px;
}
@media (max-width: 575px) {
  .project-grid--related {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Homepage featured project grid */
.home-project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

@media (max-width: 575px) {
  .home-project-grid { grid-template-columns: 1fr; }
}

.home-project-grid .project-tile {
  aspect-ratio: 16 / 7;
}

.home-project-grid .project-tile-name {
  font-size: 1.1rem;
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
}

@media (max-width: 991px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 575px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border: none;
  background: #1e1e2e;
  cursor: pointer;
  display: block;
}

.gallery-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.gallery-item:hover .gallery-thumb {
  transform: scale(1.05);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  cursor: pointer;
}

.lightbox-figure {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(90vw, 1100px);
  margin: 0;
}

/* Slide animation wrapper */
.lightbox-img-clip {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes lb-slide-right {
  from { transform: translateX(70px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes lb-slide-left {
  from { transform: translateX(-70px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}
.lightbox-img-clip--next { animation: lb-slide-right 0.22s ease; }
.lightbox-img-clip--prev { animation: lb-slide-left  0.22s ease; }

.lightbox-img {
  max-width: 100%;
  max-height: 68vh;
  object-fit: contain;
  display: block;
  transform-origin: center center;
  transition: transform 0.1s ease;
  will-change: transform;
}

.lightbox-caption {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  margin-top: 0.85rem;
  text-align: center;
  line-height: 1.4;
}

.lightbox-author {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 0.2rem;
}

.lightbox-author-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.lightbox-author-link:hover {
  color: rgba(255, 255, 255, 0.75);
}

.lightbox-counter {
  display: block;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 0.1rem;
  letter-spacing: 0.05em;
}

/* Filmstrip */
.lightbox-strip {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  gap: 3px;
  padding: 18px 12px 10px;
  overflow-x: auto;
  scrollbar-width: none;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}
.lightbox-strip::-webkit-scrollbar { display: none; }
.lightbox-strip[hidden] { display: none; }

.lightbox-strip-btn {
  flex: 0 0 auto;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 2px;
  background: none;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.15s, border-color 0.15s;
}
.lightbox-strip-btn--active,
.lightbox-strip-btn:hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.85);
}
.lightbox-strip-thumb {
  display: block;
  width: 64px;
  height: 42px;
  object-fit: cover;
}

.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  z-index: 2;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  font-size: 2.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: color 0.15s;
}

.lightbox-close:hover { color: #fff; }

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 3.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 1rem;
  transition: color 0.15s;
  user-select: none;
}

.lightbox-prev { left: 0; }
.lightbox-next { right: 0; }

.lightbox-prev:hover,
.lightbox-next:hover { color: #fff; }

/* Dark mode */
[data-bs-theme="dark"] {
  .section-label,
  .about-subsection-label,
  .projects-section-heading,
  .project-subtitle,
  .partners-group-label,
  .subnav-link,
  .contact-list dt,
  .timeline-h-year,
  .timeline-h-desc,
  .doc-year,
  .doc-intro {
    color: rgba(222, 226, 230, 0.65);
  }

  .contact-list a,
  .partner-link,
  .doc-link {
    border-bottom-color: rgba(222, 226, 230, 0.18);
  }

  .contact-list a:hover,
  .partner-link:hover,
  .doc-link:hover {
    color: #fff;
    border-bottom-color: rgba(222, 226, 230, 0.5);
  }

  .subnav-link:hover,
  .subnav-link--active {
    color: #fff;
    border-bottom-color: rgba(222, 226, 230, 0.5);
  }

  .about-subnav {
    border-bottom-color: rgba(222, 226, 230, 0.12);
  }

  .partner-row {
    border-bottom-color: rgba(222, 226, 230, 0.1);
  }

  .teaser-card {
    border-color: rgba(222, 226, 230, 0.12);
  }

  .map-wrapper {
    border-color: rgba(222, 226, 230, 0.12);
  }

  .partner-foreign-badge {
    color: rgba(222, 226, 230, 0.65);
    border-color: rgba(222, 226, 230, 0.2);
  }

  .timeline-h::before {
    background: rgba(222, 226, 230, 0.18);
  }

  .timeline-h-dot {
    background: rgba(222, 226, 230, 0.55);
    border-color: var(--bs-body-bg);
    box-shadow: 0 0 0 1px rgba(222, 226, 230, 0.25);
  }

  .footer-logos {
    background: #f8f9fa;
  }

  /* Partners section content is always light — restore dark text (the subnav above it now follows the global theme) */
  .partners-section .partners-group-label,
  .partners-section strong {
    color: #212529;
  }

  .partners-section .text-muted {
    color: #6c757d !important;
  }

  .partners-section .partner-link {
    color: #6c757d;
    border-bottom-color: #dee2e6;
  }

  .partners-section .partner-link:hover {
    color: #212529;
    border-bottom-color: #495057;
  }

  .partners-section .partner-row {
    border-bottom-color: #f0f0f0;
  }
}

.project-map-img-link {
  display: block;
  position: relative;
  text-decoration: none;
}
.project-map-img {
  width: 100%;
  display: block;
  border-radius: 4px;
  transition: opacity 0.2s;
}
.project-map-img-link:hover .project-map-img {
  opacity: 0.88;
}
.project-logo {
  max-width: 240px;
  height: auto;
}
.project-logo--light { display: block; }
.project-logo--dark  { display: none; }
[data-bs-theme="dark"] .project-logo--light { display: none; }
[data-bs-theme="dark"] .project-logo--dark  { display: block; }

.project-map-badge {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  pointer-events: none;
}

/* Cookie consent banner */
.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1050;
}
.cookie-consent-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1rem 0;
}
.cookie-consent-text {
  font-size: 0.85rem;
  max-width: 60ch;
}
.cookie-consent-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}