/* ---------- Lightbox (video + PDF) ---------- */
.modal {
  width: min(1000px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; border: 0;
  border-radius: 22px; background: transparent; overflow: visible; color: var(--text);
}
.modal::backdrop { background: rgba(16, 17, 48, 0.74); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal-box {
  display: flex; flex-direction: column; max-height: calc(100dvh - 32px);
  border-radius: 22px; overflow: hidden; background: var(--navy-900); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6);
}
.modal-head { display: flex; align-items: center; gap: 0.8rem; padding: 0.8rem 0.9rem 0.8rem 1.1rem; flex: none; }
.modal-ic {
  width: 36px; height: 36px; flex: none; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: var(--orange); color: #fff;
}
.modal-ic .i { width: 1.15rem; height: 1.15rem; }
.modal-ic .fill { fill: currentColor; stroke: none; }
.modal-head h2 {
  flex: 1; min-width: 0; color: #fff; font-size: 1rem; font-weight: 600; letter-spacing: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.modal-actions { display: flex; align-items: center; gap: 0.5rem; flex: none; }
.modal-btn {
  display: inline-flex; align-items: center; gap: 0.45rem; height: 40px; padding: 0 0.95rem; border-radius: var(--radius-btn);
  font-size: 0.9rem; font-weight: 600; color: #fff; white-space: nowrap;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16);
  transition: background 0.2s ease, border-color 0.2s ease, translate 0.2s ease;
}
.modal-btn .i { width: 1.05rem; height: 1.05rem; }
.modal-btn:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.3); translate: 0 -1px; }
.modal-btn.primary { background: var(--orange); border-color: var(--orange); }
.modal-btn.primary:hover { background: var(--orange-600); border-color: var(--orange-600); }
.modal-close {
  width: 40px; height: 40px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: rgba(255, 255, 255, 0.08); color: #fff; border: 1px solid rgba(255, 255, 255, 0.16);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.modal-close:hover { background: var(--orange); border-color: var(--orange); }
.modal-close .i { width: 1.1rem; height: 1.1rem; }

@media (prefers-reduced-motion: no-preference) {
  .modal[open] { animation: modal-in 0.38s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .modal[open]::backdrop { animation: modal-fade 0.3s ease; }
}
@keyframes modal-in { from { opacity: 0; translate: 0 18px; scale: 0.97; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 760px) {
  .modal-head h2 { font-size: 0.92rem; }
  /* the header keeps just the close button; the PDF card below carries the actions */
  .modal-actions .modal-btn { display: none; }
}
