/* ILA Berlin Timeline – Fullscreen Scroll-Snap Experience
   CI: #008FD3 (ILA Blue), no border-radius, angular aesthetic
   Fonts: inherited from Drupal theme (AbsaraSans + Sora) */

/* ===== LAYOUT: .ila-tl-wrap IS the scroll container ===== */
.ila-tl-wrap {
  background: #0a0a1a;
  width: 100vw !important;
  height: 100vh !important;
  overflow-y: auto !important;
  scroll-snap-type: y mandatory !important;
  scroll-behavior: smooth !important;
  -webkit-overflow-scrolling: touch !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 9999 !important;
}



/* ===== SINGLE SLIDE ===== */
.ila-tl-slide {
  height: 100vh;
  width: 100vw;
  scroll-snap-align: start;
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

/* Background image */
.ila-tl-slide__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.ila-tl-slide__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Dark gradient overlay – bottom-heavy for text readability */
.ila-tl-slide__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 26, 0.15) 0%,
    rgba(10, 10, 26, 0.4) 50%,
    rgba(10, 10, 26, 0.85) 100%
  );
}

/* ===== CONTENT BLOCK ===== */
.ila-tl-slide__content {
  position: relative;
  z-index: 3;
  padding: 0 5vw 8vh 5vw;
  max-width: 700px;
  color: #fff;
}

.ila-tl-slide__year {
  display: block;
  color: #008FD3;
  line-height: 1;
  margin-bottom: 12px;
  opacity: 0.95;
  /* Font sizes via clamp – no font-size override needed outside this scope */
}

.ila-tl-slide__title {
  color: #fff;
  margin: 0 0 16px 0;
  line-height: 1.2;
}

.ila-tl-slide__text {
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.6;
  margin: 0;
}

/* ===== INTRO SLIDE (special) ===== */
.ila-tl-slide--intro .ila-tl-slide__content {
  max-width: 800px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-bottom: 15vh;
}

.ila-tl-slide--intro .ila-tl-intro-label {
  color: #008FD3;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 16px;
}

.ila-tl-slide--intro .ila-tl-intro-title {
  color: #fff;
  margin: 0 0 20px 0;
  line-height: 1.1;
}

.ila-tl-slide--intro .ila-tl-intro-sub {
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
  max-width: 600px;
}

.ila-tl-intro-scroll {
  margin-top: 32px;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ila-tl-intro-scroll__arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid rgba(255, 255, 255, 0.5);
  border-bottom: 2px solid rgba(255, 255, 255, 0.5);
  transform: rotate(45deg);
  animation: ila-tl-bounce 2s infinite;
}

@keyframes ila-tl-bounce {
  0%, 20%, 50%, 80%, 100% { transform: rotate(45deg) translateY(0); }
  40% { transform: rotate(45deg) translateY(6px); }
  60% { transform: rotate(45deg) translateY(3px); }
}

/* ===== CLOSE BUTTON (prominent pill) ===== */
.ila-tl-close {
  position: fixed;
  top: 16px;
  right: 60px;
  z-index: 110;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px 8px 14px;
  background: rgba(10, 10, 26, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: background 0.3s, border-color 0.3s, opacity 0.4s;
}

.ila-tl-close:hover {
  background: rgba(0, 143, 211, 0.9);
  border-color: rgba(0, 143, 211, 0.5);
  color: #fff;
}

.ila-tl-close__icon {
  display: inline-block;
  line-height: 1;
}

.ila-tl-close__label {
  line-height: 1;
}

/* Dim close button on intro slide (less distracting) */
.ila-tl-close.ila-tl-close--dim {
  opacity: 0.5;
}
.ila-tl-close.ila-tl-close--dim:hover {
  opacity: 1;
}

/* ===== EPOCH NAVIGATION (top bar) ===== */
.ila-tl-epochs {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  gap: 0;
  background: rgba(10, 10, 26, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
}

.ila-tl-epochs.ila-tl-epochs--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ila-tl-epoch-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  padding: 14px 20px;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: color 0.3s;
}

.ila-tl-epoch-btn:hover {
  color: #fff;
}

.ila-tl-epoch-btn.ila-tl-epoch-btn--active {
  color: #008FD3;
}

.ila-tl-epoch-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20px;
  right: 20px;
  height: 2px;
  background: #008FD3;
  transform: scaleX(0);
  transition: transform 0.3s;
}

.ila-tl-epoch-btn.ila-tl-epoch-btn--active::after {
  transform: scaleX(1);
}

/* ===== DOT NAVIGATION (right side) ===== */
.ila-tl-dots {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.ila-tl-dots.ila-tl-dots--visible {
  opacity: 1;
  pointer-events: auto;
}

.ila-tl-dot {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s, transform 0.3s;
  position: relative;
}

.ila-tl-dot:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: scale(1.3);
}

.ila-tl-dot.ila-tl-dot--active {
  background: #008FD3;
  transform: scale(1.3);
}

/* Dot tooltip */
.ila-tl-dot__tip {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(10, 10, 26, 0.9);
  color: #fff;
  padding: 4px 10px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.ila-tl-dot:hover .ila-tl-dot__tip {
  opacity: 1;
}

/* Epoch separator in dots */
.ila-tl-dot--epoch-start {
  margin-top: 12px;
}

/* ===== PROGRESS BAR ===== */
.ila-tl-progress {
  position: fixed;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #008FD3;
  z-index: 100;
  transition: width 0.3s;
  width: 0%;
}

/* ===== "MEHR ERFAHREN" LINK ON SLIDES ===== */
.ila-tl-slide__more {
  display: inline-block;
  margin-top: 16px;
  color: #008FD3;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 143, 211, 0.4);
  padding-bottom: 2px;
  transition: border-color 0.3s, color 0.3s;
  cursor: pointer;
}

.ila-tl-slide__more:hover {
  color: #fff;
  border-color: #fff;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .ila-tl-slide__content {
    padding: 0 6vw 14vh 6vw;
    max-width: 100%;
  }

  .ila-tl-epochs {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }

  .ila-tl-epoch-btn {
    padding: 12px 14px;
  }

  .ila-tl-dots {
    right: 10px;
    gap: 6px;
  }

  .ila-tl-dot {
    width: 8px;
    height: 8px;
  }

  .ila-tl-dot__tip {
    display: none;
  }

  /* Move close button to bottom-right on mobile */
  .ila-tl-close {
    top: auto !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 120 !important;
  }
}

/* ===== SLIDE TRANSITIONS ===== */
.ila-tl-slide__content {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.ila-tl-slide.ila-tl-slide--active .ila-tl-slide__content {
  opacity: 1;
  transform: translateY(0);
}

/* Subtle parallax on background */
.ila-tl-slide__bg img {
  transition: transform 0.8s ease;
  transform: scale(1.05);
}

.ila-tl-slide.ila-tl-slide--active .ila-tl-slide__bg img {
  transform: scale(1);
}


/* ===================================================================
   ON-PAGE VERTICAL TIMELINE (.ila-op)
   Below the fullscreen overlay button – always visible on the page.
   Text left, photos right. Timeline line on the left.
   =================================================================== */

.ila-op {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 20px 80px;
  position: relative;
}

/* Header */
.ila-op__header {
  text-align: center;
  margin-bottom: 60px;
}

.ila-op__title {
  color: #1a1a2e;
  margin: 0 0 12px 0;
  line-height: 1.2;
}

.ila-op__subtitle {
  color: #666;
  margin: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

/* Epoch block */
.ila-op__epoch {
  position: relative;
  margin-bottom: 20px;
}

/* Vertical line (left side) */
.ila-op__epoch::before {
  content: '';
  position: absolute;
  left: 30px;
  top: 80px;
  bottom: 0;
  width: 2px;
  background: #e0e0e0;
}

/* Epoch header */
.ila-op__epoch-head {
  text-align: center;
  padding: 30px 0 40px;
  position: relative;
  z-index: 2;
}

.ila-op__epoch-range {
  display: inline-block;
  background: #008FD3;
  color: #fff;
  padding: 6px 18px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.ila-op__epoch-label {
  color: #1a1a2e;
  margin: 8px 0 0 0;
}

/* Single entry */
.ila-op__entry {
  position: relative;
  padding-left: 70px;
  margin-bottom: 50px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.ila-op__entry.ila-op__entry--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Year marker on the left line */
.ila-op__marker {
  position: absolute;
  left: 30px;
  top: 0;
  transform: translateX(-50%);
  z-index: 3;
  background: #fff;
  padding: 4px 0;
}

.ila-op__year {
  display: inline-block;
  background: #1a1a2e;
  color: #008FD3;
  padding: 6px 14px;
  letter-spacing: 0.05em;
}

/* Content card */
.ila-op__content {
  display: block;
  background: #fff;
  border: 1px solid #e8e8e8;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: box-shadow 0.3s;
  overflow: hidden; /* contain floats */
}

.ila-op__content:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* No media: text spans full width, no grid needed */
.ila-op__entry--no-media .ila-op__content {
  display: block;
}

/* Photos float right, text wraps around */
.ila-op__photo-float {
  float: right;
  width: 45%;
  max-width: 400px;
  margin: 0 0 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ila-op__photo-float img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* Text column */
.ila-op__text {
  min-width: 0;
}

.ila-op__card-title {
  color: #1a1a2e;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.ila-op__card-meta {
  color: #008FD3;
  margin-bottom: 6px;
}

.ila-op__card-stats {
  color: #888;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.ila-op__card-text {
  color: #444;
  line-height: 1.65;
  margin: 0;
}




/* ===== ON-PAGE MOBILE ===== */
@media (max-width: 768px) {
  .ila-op__epoch::before {
    left: 20px;
  }

  .ila-op__entry {
    padding-left: 50px;
  }

  .ila-op__marker {
    left: 20px;
  }

  .ila-op__year {
    padding: 4px 8px;
  }

  .ila-op__content {
    padding: 20px;
  }

  /* Stack photos on mobile instead of float */
  .ila-op__photo-float {
    float: none;
    width: 100%;
    max-width: none;
    margin: 0 0 16px 0;
  }
}
