/* ═════════════════════════════════════════════
   OlivEU Diptychs – Programme Materials CSS
   Full-width, elegant, one brochure per row
   ═════════════════════════════════════════════ */

/* ── Container ── */
.oliveu-diptychs-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px 100px;
  background: transparent;
}

/* ── Row: one brochure per row ── */
.oliveu-diptych-row {
  margin-bottom: 0;
}

/* ── Divider between rows ── */
.oliveu-diptych-divider {
  height: 1px;
  background: rgba(122, 211, 0, 0.18);
  margin: 64px 0;
}

/* ── Top bar: flags + lang left, download right ── */
.oliveu-diptych-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(122, 211, 0, 0.12);
}

.oliveu-diptych-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.oliveu-diptych-flag {
  font-size: 1.7rem;
  line-height: 1;
}

.oliveu-diptych-langs {
  font-family: 'Quicksand', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--oliv-green-dark, #437400);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ── Download button (pill) ── */
.oliveu-diptych-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 28px;
  border: 2px solid var(--oliv-green-dark, #437400);
  border-radius: 30px;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.25s ease;
  background: transparent;
  color: var(--oliv-green-dark, #437400);
  text-decoration: none;
}

.oliveu-diptych-download-btn:hover {
  background: var(--oliv-green-dark, #437400);
  color: var(--oliv-white, #fff);
}

.oliveu-diptych-download-btn svg {
  fill: currentColor;
  flex-shrink: 0;
}

/* ── Bar right: fullscreen + download ── */
.oliveu-diptych-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── Fullscreen button ── */
.oliveu-diptych-fullscreen-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--oliv-green-dark, #437400);
  background: transparent;
  color: var(--oliv-green-dark, #437400);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  padding: 0;
  outline: none;
  flex-shrink: 0;
}

.oliveu-diptych-fullscreen-btn:hover {
  background: var(--oliv-green-dark, #437400);
  color: var(--oliv-white, #fff);
}

.oliveu-diptych-fullscreen-btn svg {
  fill: currentColor;
}

/* ── Clickable page images ── */
.oliveu-diptych-pages img {
  cursor: pointer;
}

/* ── Rendered PDF pages: side by side, big ── */
.oliveu-diptych-pages {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
}

.oliveu-diptych-pages img {
  display: block;
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow:
    0 6px 32px rgba(20, 14, 7, 0.1),
    0 1.5px 6px rgba(20, 14, 7, 0.05);
  background: #fff;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.oliveu-diptych-pages img:hover {
  box-shadow:
    0 10px 48px rgba(20, 14, 7, 0.14),
    0 2px 8px rgba(20, 14, 7, 0.07);
  transform: translateY(-2px);
}

/* ── Loading spinner ── */
.oliveu-diptych-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 100px 20px;
  width: 100%;
}

.oliveu-diptych-loading .spinner {
  width: 36px;
  height: 36px;
  border: 2.5px solid var(--oliv-beige, #DDCEBB);
  border-top-color: var(--oliv-green-dark, #437400);
  border-radius: 50%;
  animation: oliveu-diptych-spin 0.7s linear infinite;
}

.oliveu-diptych-loading .loading-text {
  color: var(--oliv-olive, #6A7B54);
  font-family: 'Quicksand', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.3px;
}

@keyframes oliveu-diptych-spin {
  to { transform: rotate(360deg); }
}

/* ── Error ── */
.oliveu-diptych-error {
  text-align: center;
  padding: 60px 20px;
  width: 100%;
}

.oliveu-diptych-error .error-msg {
  font-family: 'Quicksand', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--oliv-olive, #6A7B54);
}


/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */

@media (max-width: 900px) {
  .oliveu-diptych-pages {
    flex-direction: column;
    gap: 16px;
  }

  .oliveu-diptych-pages img {
    flex: none;
    width: 100%;
  }

  .oliveu-diptych-divider {
    margin: 48px 0;
  }

  .oliveu-diptych-flag {
    font-size: 1.4rem;
  }

  .oliveu-diptych-langs {
    font-size: 0.82rem;
  }
}

@media (max-width: 640px) {
  .oliveu-diptychs-container {
    padding: 0 14px 60px;
  }

  .oliveu-diptych-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 14px;
  }

  .oliveu-diptych-download-btn {
    align-self: stretch;
    justify-content: center;
    padding: 12px 20px;
    font-size: 0.76rem;
  }

  .oliveu-diptych-flag {
    font-size: 1.2rem;
  }

  .oliveu-diptych-langs {
    font-size: 0.75rem;
  }

  .oliveu-diptych-pages {
    gap: 12px;
  }

  .oliveu-diptych-pages img {
    border-radius: 8px;
  }

  .oliveu-diptych-divider {
    margin: 32px 0;
  }
}


/* ═══════════════════════════════════════════════
   LIGHT THEME
   ═══════════════════════════════════════════════ */

.oliveu-diptychs-container[data-theme="light"] .oliveu-diptych-langs {
  color: var(--oliv-green-dark, #437400);
}

.oliveu-diptychs-container[data-theme="light"] .oliveu-diptych-download-btn {
  color: var(--oliv-green-dark, #437400);
  border-color: var(--oliv-green-dark, #437400);
}

.oliveu-diptychs-container[data-theme="light"] .oliveu-diptych-download-btn:hover {
  background: var(--oliv-green-dark, #437400);
  color: var(--oliv-white, #fff);
}

.oliveu-diptychs-container[data-theme="light"] .oliveu-diptych-bar {
  border-bottom-color: rgba(0, 0, 0, 0.07);
}

.oliveu-diptychs-container[data-theme="light"] .oliveu-diptych-divider {
  background: rgba(0, 0, 0, 0.08);
}

.oliveu-diptychs-container[data-theme="light"] .oliveu-diptych-loading .loading-text {
  color: #777;
}

.oliveu-diptychs-container[data-theme="light"] .oliveu-diptych-loading .spinner {
  border-color: #DDD;
  border-top-color: var(--oliv-green-dark, #437400);
}

.oliveu-diptychs-container[data-theme="light"] .oliveu-diptych-fullscreen-btn {
  border-color: var(--oliv-green-dark, #437400);
  color: var(--oliv-green-dark, #437400);
}

.oliveu-diptychs-container[data-theme="light"] .oliveu-diptych-fullscreen-btn:hover {
  background: var(--oliv-green-dark, #437400);
  color: var(--oliv-white, #fff);
}


/* ═══════════════════════════════════════════════
   FULLSCREEN LIGHTBOX
   ═══════════════════════════════════════════════ */

.oliveu-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.oliveu-lightbox.active {
  opacity: 1;
  visibility: visible;
}

/* ── Backdrop ── */
.oliveu-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ── Close button ── */
.oliveu-lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  padding: 0;
  outline: none;
}

.oliveu-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

.oliveu-lightbox-close svg {
  fill: currentColor;
}

/* ── Content area ── */
.oliveu-lightbox-content {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100vw;
  height: 100vh;
  padding: 60px 80px 50px;
  box-sizing: border-box;
}

/* ── Nav arrows ── */
.oliveu-lightbox-nav {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  padding: 0;
  outline: none;
  flex-shrink: 0;
}

.oliveu-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.08);
}

.oliveu-lightbox-nav:disabled {
  opacity: 0.2;
  cursor: default;
  transform: none;
}

.oliveu-lightbox-nav svg {
  fill: currentColor;
}

/* ── Book container (Swiper flip lives here) ── */
.oliveu-lightbox-book {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
}

#oliveu-flipbook {
  width: 100%;
  height: 100%;
  overflow: visible;
}

#oliveu-flipbook .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  overflow: hidden;
}

#oliveu-flipbook .swiper-slide img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 60px rgba(0, 0, 0, 0.5);
  cursor: zoom-in;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
}

#oliveu-flipbook .swiper-slide.zoomed img {
  cursor: zoom-out;
}

/* Soften the built-in flip shadow overlays */
#oliveu-flipbook .swiper-slide-shadow-left,
#oliveu-flipbook .swiper-slide-shadow-right {
  border-radius: 6px;
}

/* ── Footer / page info ── */
.oliveu-lightbox-footer {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  z-index: 5;
  text-align: center;
  pointer-events: none;
}

.oliveu-lightbox-page-info {
  font-family: 'Quicksand', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.4px;
}

/* ── Lightbox responsive ── */
@media (max-width: 640px) {
  .oliveu-lightbox-content {
    gap: 8px;
    padding: 50px 12px 40px;
  }

  .oliveu-lightbox-nav {
    width: 36px;
    height: 36px;
  }

  .oliveu-lightbox-nav svg {
    width: 20px;
    height: 20px;
  }

  .oliveu-lightbox-close {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
  }

  .oliveu-lightbox-close svg {
    width: 18px;
    height: 18px;
  }

  .oliveu-lightbox-footer {
    bottom: 10px;
  }
}

@media (max-width: 640px) {
  .oliveu-diptych-bar-right {
    gap: 8px;
  }

  .oliveu-diptych-fullscreen-btn {
    width: 38px;
    height: 38px;
  }

  .oliveu-diptych-fullscreen-btn svg {
    width: 14px;
    height: 14px;
  }
}
