/* Glass card for dark theme */
.glass-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

/* Fade-in animation for glass cards */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeIn {
  animation: fadeIn 1s ease forwards;
  opacity: 0;
}

/* Achtergrond pseudo-element */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: grayscale(100%) blur(4px) brightness(0.4);
  z-index: -1;
  opacity: 0.9;
  transition: background-image 0.8s ease-in-out;
}

/* Boekkaft kaarten */
.boekkaft-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 1rem;
  overflow: hidden;
  padding: 1rem;
  box-shadow: 0 8px 30px rgba(255,255,255,0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.boekkaft-card img {
  display: block;
  max-width: 100%;
  max-height: 550px;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease, opacity 0.25s ease;
  border-radius: 0.5rem;
}

.boekkaft-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(255,255,255,0.08);
}

/* Lightbox overlay */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

#lightbox:not(.hidden) {
  display: flex;
}

#lightbox img {
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255,255,255,0.15);
  transition: transform 0.3s ease;
  /* Strictly limit vertical space to 70% of viewport and horizontally to 90% */
  max-height: 70vh !important;
  max-width: 90vw !important;
  width: auto;
  height: auto;
}

#lightbox .overlay-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255,255,255,0.06);
  border: none;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
}
#lightbox .overlay-close:hover { background: rgba(255,255,255,0.1); color: #4dabf7; }
#lightbox .overlay-close:focus { outline: 2px solid #4dabf7; outline-offset: 2px; }

/* Visuals for progressive image loading */
.boekkaft-card img.lazy,
.boekkaft-card img:not(.high-loaded) {
  filter: blur(8px);
  opacity: 0.95;
  transition: filter 400ms ease-out, opacity 300ms ease-out;
}

/* Fade effect bij openen/sluiten */
#lightbox {
  transition: opacity 0.3s ease;
}

/* ==========================
   Merged from biografie.css
   ========================== */
/* Algemene resets en basis */
.biografie-merged * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.biografie-merged {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: #f0f0f0;
  background-color: #121212;
  position: relative;
  min-height: 100vh;
}

/* Achtergrond-overlay door background.js */
.biografie-merged::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: grayscale(100%) blur(3%);
  opacity: 0.25;
  transition: background-image 0.5s ease, opacity 0.5s ease;
}

/* Links */
.biografie-merged a {
  color: #4dabf7;
  text-decoration: none;
}
.biografie-merged a:hover {
  text-decoration: underline;
}

/* Wrapper */
.biografie-merged .wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

/* Hero sectie */
.biografie-merged .hero {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #333;
}

.biografie-merged .hero .title h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 2.5rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.biografie-merged .hero .subtitle {
  font-weight: 300;
  font-size: 1rem;
  color: #cccccc;
  margin-bottom: 1rem;
}

.biografie-merged .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.biografie-merged .pill {
  display: inline-block;
  background-color: #1f1f1f;
  color: #f0f0f0;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.875rem;
  border: 1px solid #333;
}

/* Quote */
.biografie-merged blockquote.quote {
  border-left: 4px solid #4dabf7;
  padding-left: 1rem;
  color: #e0e0e0;
  font-style: italic;
  background-color: rgba(31, 31, 31, 0.9);
  border-radius: 6px;
}

.biografie-merged blockquote.quote p + p {
  margin-top: 1rem;
}

/* Grid secties */
.biografie-merged .grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.biografie-merged .grid.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Kaarten */
.biografie-merged .card {
  background-color: rgba(31, 31, 31, 0.95);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

/* Kaarttitels */
.biografie-merged .card h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #ffffff;
}

/* Timeline */
.biografie-merged .timeline {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.biografie-merged .tl-item {
  position: relative;
  padding-left: 1.5rem;
  color: #e0e0e0;
}

.biografie-merged .tl-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 0.5rem;
  height: 0.5rem;
  background-color: #4dabf7;
  border-radius: 50%;
}

/* Lijsten */
.biografie-merged .list {
  list-style: none;
  padding-left: 0;
}

.biografie-merged .list li {
  margin-bottom: 0.75rem;
  color: #e0e0e0;
}

.biografie-merged .muted {
  color: #999;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Footer */
.biografie-merged footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #333;
  text-align: center;
  font-size: 0.875rem;
  color: #aaa;
}

.biografie-merged footer .btn {
  display: inline-block;
  margin-left: 0.5rem;
  background-color: #4dabf7;
  color: #121212;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  font-size: 0.875rem;
  transition: background-color 0.3s ease;
}

.biografie-merged footer .btn:hover {
  background-color: #1e7dd8;
}

/* Responsiveness */
@media (max-width: 600px) {
  .biografie-merged .hero {
    gap: 1.5rem;
  }
  .biografie-merged .hero .title h1 {
    font-size: 2rem;
  }
  .biografie-merged .card h2 {
    font-size: 1.25rem;
  }
}

.biografie-merged .collapsible {
  overflow: hidden;
  transition: max-height 0.45s ease;
}

.biografie-merged .collapsible.collapsed {
  max-height: 340px; /* ± hoogte van 'Enkele jaartallen' */
}

.biografie-merged .collapsible.expanded {
  max-height: 3000px; /* groot genoeg voor volledige lijst */
}

/* Fade subtiel naar beneden */
.biografie-merged .collapsible.collapsed::after {
  content: "";
  display: block;
  height: 80px;
  margin-top: -80px;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0),
    rgba(0,0,0,0.95)
  );
  pointer-events: none;
}

.biografie-merged .toggle-btn {
  margin-top: 14px;
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  color: #9fd9ff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
}

.biografie-merged .toggle-btn:hover {
  border-color: #9fd9ff;
}
