/* ==========================================================================
   Partial Truths carousel — an auto-rotating viewer for the "Partial Truths"
   card series. Built to sit inside pages using assets/style-reference.css:
   it reuses that file's custom properties (--navy, --red, --band, --rule,
   --ink, --muted, --bg-soft) instead of defining its own palette, so it
   inherits whichever theme the page already uses. Loaded only on the page(s)
   that include the carousel — not merged into style-reference.css itself,
   so this addition stays easy to review or remove on its own.
   ========================================================================== */

.pt-carousel {
  background: var(--bg-soft, #F7F9FB);
  border: 1px solid var(--rule, #D6DDE4);
  border-top: 3px solid var(--navy, #2E2A6B);
  padding: 24px 22px 26px;
  margin: 20px 0;
}

.pt-viewport {
  max-width: 420px;
  margin: 0 auto;
  position: relative;
}

.pt-slide { display: none; }
.pt-slide.is-active { display: block; animation: pt-fade .35s ease; }

@keyframes pt-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .pt-slide.is-active { animation: none; }
}

.pt-slide img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule, #D6DDE4);
  border-radius: 3px;
  background: #fff;
  cursor: zoom-in;
}
.pt-slide img:focus-visible {
  outline: 3px solid var(--navy, #2E2A6B);
  outline-offset: 2px;
}

.pt-cap {
  text-align: center;
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--muted, #56616E);
  margin: 10px 0 0;
}
.pt-cap b { color: var(--ink, #14181C); }

.pt-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.pt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  background: #fff;
  color: var(--navy, #2E2A6B);
  border: 2px solid var(--navy, #2E2A6B);
  border-radius: 3px;
  font-family: "Oswald", "Arial Narrow", Impact, sans-serif;
  font-size: 14.5px;
  text-transform: uppercase;
  letter-spacing: .02em;
  cursor: pointer;
}
.pt-btn:hover { background: var(--navy, #2E2A6B); color: #fff; }
.pt-btn:focus-visible { outline: 3px solid var(--red, #A32B34); outline-offset: 2px; }

.pt-status {
  font-size: 14px;
  color: var(--muted, #56616E);
  min-width: 92px;
  text-align: center;
}

.pt-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  list-style: none;
}
.pt-dots button {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  border: 1px solid var(--rule, #D6DDE4);
  background: #fff;
  font-size: 12px;
  color: var(--muted, #56616E);
  cursor: pointer;
  padding: 0;
}
.pt-dots button[aria-selected="true"] {
  background: var(--navy, #2E2A6B);
  border-color: var(--navy, #2E2A6B);
  color: #fff;
}
.pt-dots button:focus-visible { outline: 2px solid var(--red, #A32B34); outline-offset: 2px; }

/* ---------- lightbox (click a card to view it larger) ---------- */

.pt-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 28, .88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
  z-index: 1000;
}
.pt-lightbox[hidden] { display: none; }

.pt-lightbox-inner {
  position: relative;
  max-width: 94vw;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pt-lightbox img {
  max-width: min(92vw, 780px);
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: 4px;
  background: #fff;
  display: block;
}

.pt-lightbox-cap {
  color: #fff;
  font-size: 14.5px;
  margin-top: 12px;
  text-align: center;
  max-width: 60ch;
}

.pt-lightbox-close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink, #14181C);
  border: 0;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.pt-lightbox-close:hover { background: var(--red, #A32B34); color: #fff; }
.pt-lightbox-close:focus-visible { outline: 3px solid var(--red, #A32B34); outline-offset: 2px; }

@media (max-width: 500px) {
  .pt-carousel { padding: 18px 14px 20px; }
  .pt-lightbox-close { top: -14px; right: 4px; }
}
