:root {
  --mcd5-reader-ui: rgba(14, 14, 16, 0.82);
  --mcd5-reader-ui-strong: rgba(14, 14, 16, 0.94);
  --mcd5-reader-text: #ffffff;
  --mcd5-reader-control-size: 40px;
  --mcd5-reader-control-radius: 10px;
  --mcd5-reader-control-gap: 2px;
  --mcd5-reader-divider: rgba(255, 255, 255, 0.14);
}

.mcd5-carousel,
.mcd5-carousel * {
  box-sizing: border-box;
}

.mcd5-carousel {
  width: 100%;
  max-width: var(--mcd5-max-width, 1200px);
  margin-inline: auto;
  padding: 0 var(--mcd5-pad-desktop, 24px);
  position: relative;
  isolation: isolate;
  --mcd5-current-gap: var(--mcd5-gap-desktop, 22px);
  --mcd5-current-cards: var(--mcd5-cards-desktop, 4);
}

.mcd5-viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  outline: none;
  padding: 8px 0 20px;
  outline: none;
}

.mcd5-viewport::-webkit-scrollbar {
  display: none;
}

.mcd5-track {
  display: flex;
  gap: var(--mcd5-current-gap);
  align-items: stretch;
  justify-content: flex-start;
  min-width: 100%;
}

.mcd5-carousel.center-when-fits:not(.is-overflowing) .mcd5-track {
  justify-content: center;
}

.mcd5-slide {
  flex: 0 0 calc((100% - (var(--mcd5-current-gap) * (var(--mcd5-current-cards) - 1))) / var(--mcd5-current-cards));
  min-width: 0;
  scroll-snap-align: start;
}

.mcd5-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: var(--mcd5-aspect-ratio, 3/4);
  border-radius: var(--mcd5-radius, 10px);
  overflow: hidden;
  background: #f3f3f3;
  text-decoration: none !important;
  transform: translateZ(0);
  box-shadow: none !important;
  filter: none !important;
  transition: transform 220ms cubic-bezier(.2,.8,.2,1);
}

.mcd5-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: none !important;
  opacity: 0 !important;
  display: none !important;
}

.mcd5-cover {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border: 0;
  transform: none !important;
  filter: none !important;
  transition: transform 220ms cubic-bezier(.2,.8,.2,1);
}

.mcd5-cover-placeholder {
  display: grid;
  place-items: center;
  padding: 20px;
  color: #222;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  background: linear-gradient(135deg, #f0f0f0, #ffffff);
}

.mcd5-card:hover,
.mcd5-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: none !important;
  filter: none !important;
}

.mcd5-card:hover .mcd5-cover,
.mcd5-card:focus-visible .mcd5-cover {
  transform: none !important;
  filter: none !important;
}

.mcd5-card:hover::after,
.mcd5-card:focus-visible::after {
  opacity: 0 !important;
}

.mcd5-card:focus-visible,
.mcd5-viewport:focus-visible,
.mcd5-arrow:focus-visible,
.mcd5-reader-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.mcd5-read-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .62);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  letter-spacing: .02em;
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.mcd5-read-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .8;
}

.mcd5-card:hover .mcd5-read-badge,
.mcd5-card:focus-visible .mcd5-read-badge {
  opacity: 1;
  transform: translateY(0);
}

.mcd5-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.92);
  color: #111;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(0,0,0,.18);
  transform: translateY(-50%);
  transition: opacity 180ms ease, transform 180ms ease, background 180ms ease;
}

.mcd5-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.04);
}

.mcd5-arrow[disabled] {
  opacity: 0;
  pointer-events: none;
}

.mcd5-arrow svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mcd5-arrow-prev { left: 0; }
.mcd5-arrow-next { right: 0; }

.mcd5-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  min-height: 10px;
  padding-top: 2px;
}

.mcd5-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: 0;
  background: rgba(0,0,0,.22);
  padding: 0;
  cursor: pointer;
  transition: width 220ms ease, background 220ms ease;
}

.mcd5-dot.is-active {
  width: 22px;
  background: rgba(0,0,0,.84);
}

.mcd5-carousel::before,
.mcd5-carousel::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 34px;
  width: 42px;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}

.mcd5-carousel::before {
  left: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.95), rgba(255,255,255,0));
}

.mcd5-carousel::after {
  right: 0;
  background: linear-gradient(270deg, rgba(255,255,255,.95), rgba(255,255,255,0));
}

.mcd5-carousel.can-scroll-left::before,
.mcd5-carousel.can-scroll-right::after {
  opacity: 1;
}

.mcd5-animation-elegant .mcd5-slide {
  opacity: 0;
  transform: translateY(14px);
  animation: mcd5SlideIn 520ms cubic-bezier(.2,.8,.2,1) forwards;
}

.mcd5-animation-soft .mcd5-slide {
  opacity: 0;
  animation: mcd5FadeIn 420ms ease forwards;
}

.mcd5-animation-minimal .mcd5-slide {
  opacity: 0;
  animation: mcd5FadeIn 260ms ease forwards;
}

.mcd5-slide:nth-child(1) { animation-delay: 30ms; }
.mcd5-slide:nth-child(2) { animation-delay: 70ms; }
.mcd5-slide:nth-child(3) { animation-delay: 110ms; }
.mcd5-slide:nth-child(4) { animation-delay: 150ms; }
.mcd5-slide:nth-child(5) { animation-delay: 190ms; }
.mcd5-slide:nth-child(6) { animation-delay: 230ms; }

@keyframes mcd5SlideIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes mcd5FadeIn {
  to { opacity: 1; }
}

@media (max-width: 980px) {
  .mcd5-carousel {
    --mcd5-current-gap: var(--mcd5-gap-tablet, 18px);
    --mcd5-current-cards: var(--mcd5-cards-tablet, 3);
  }
}

@media (max-width: 767px) {
  .mcd5-carousel {
    --mcd5-current-gap: var(--mcd5-gap-mobile, 14px);
    --mcd5-current-cards: var(--mcd5-cards-mobile, 1.35);
    padding-left: var(--mcd5-pad-mobile, 16px);
    padding-right: var(--mcd5-pad-mobile, 16px);
  }
  .mcd5-carousel.hide-arrows-mobile .mcd5-arrow { display: none; }
  .mcd5-card:hover { transform: none; }
  .mcd5-read-badge { opacity: 1; transform: translateY(0); }
}

@media (max-width: 430px) {
  .mcd5-carousel {
    --mcd5-current-gap: var(--mcd5-gap-small, 12px);
    --mcd5-current-cards: var(--mcd5-cards-small, 1.08);
  }
}



/* Visual limpo das capas: sem brilho, sem sombra, sem filtro e sem overlay. */
.mcd5-card,
.mcd5-card:hover,
.mcd5-card:focus-visible,
.mcd5-cover,
.mcd5-card:hover .mcd5-cover,
.mcd5-card:focus-visible .mcd5-cover {
  box-shadow: none !important;
  filter: none !important;
}

.mcd5-card::after {
  display: none !important;
  content: none !important;
}

/* ============================
   Fullscreen PDF Reader Modal
   ============================ */
.mcd5-reader-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(7, 7, 10, .96);
  color: var(--mcd5-reader-text);
}

.mcd5-reader-modal.is-open {
  display: grid;
  grid-template-rows: auto 1fr auto;
}

body.mcd5-reader-open {
  overflow: hidden !important;
}

.mcd5-reader-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: max(10px, env(safe-area-inset-top)) 14px 8px 18px;
  background: linear-gradient(180deg, rgba(0,0,0,.72), rgba(0,0,0,0));
  position: relative;
  z-index: 2;
}

.mcd5-reader-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
}

.mcd5-reader-stage {
  position: relative;
  overflow: auto;
  display: grid;
  place-items: start center;
  padding: 18px 14px 98px;
  overscroll-behavior: contain;
  touch-action: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}

.mcd5-reader-stage.is-panning {
  cursor: grabbing;
  user-select: none;
}

.mcd5-reader-canvas-wrap {
  min-height: 60vh;
  display: grid;
  place-items: center;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.mcd5-reader-canvas-wrap.is-pinching {
  transition: none;
  will-change: transform;
}

.mcd5-reader-canvas {
  display: block;
  max-width: none;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
  border-radius: 2px;
}

.mcd5-reader-loading,
.mcd5-reader-error {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--mcd5-reader-ui);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
  padding: 12px 14px;
  border-radius: 12px;
  backdrop-filter: blur(12px);
  text-align: center;
}

.mcd5-reader-error a { color: #fff; text-decoration: underline; }

.mcd5-reader-controls {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 3;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0;
  max-width: calc(100vw - 16px);
  overflow-x: auto;
  scrollbar-width: none;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: var(--mcd5-reader-ui);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 16px 48px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.mcd5-reader-control-group {
  display: inline-flex;
  align-items: center;
  gap: var(--mcd5-reader-control-gap);
}

.mcd5-reader-control-divider {
  flex: 0 0 1px;
  align-self: center;
  width: 1px;
  height: 24px;
  margin: 0 6px;
  background: var(--mcd5-reader-divider);
}

.mcd5-reader-button {
  appearance: none;
  border: 0;
  width: var(--mcd5-reader-control-size);
  height: var(--mcd5-reader-control-size);
  border-radius: var(--mcd5-reader-control-radius);
  display: inline-grid;
  place-items: center;
  flex: 0 0 var(--mcd5-reader-control-size);
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: background 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.mcd5-reader-button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.mcd5-reader-button:active {
  background: rgba(255, 255, 255, 0.22);
}

.mcd5-reader-button[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.mcd5-reader-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.mcd5-reader-close {
  flex: 0 0 var(--mcd5-reader-control-size);
  background: rgba(255, 255, 255, 0.1);
}

.mcd5-reader-page-info,
.mcd5-reader-zoom-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--mcd5-reader-control-size);
  padding: 0 4px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  color: rgba(255, 255, 255, 0.94);
  white-space: nowrap;
  user-select: none;
}

.mcd5-reader-page-info {
  min-width: 4.75rem;
}

.mcd5-reader-zoom-info {
  min-width: 3.5rem;
}

.mcd5-reader-fallback-frame {
  width: min(100%, 1100px);
  height: 78vh;
  border: 0;
  background: #fff;
  border-radius: 8px;
}

@media (max-width: 767px) {
  .mcd5-reader-topbar { min-height: 52px; padding-left: 12px; }
  .mcd5-reader-title { font-size: 13px; }
  .mcd5-reader-stage { padding: 10px 8px 92px; cursor: default; }
  .mcd5-reader-controls {
    padding: 5px 6px;
    border-radius: 20px;
    max-width: calc(100vw - 12px);
  }
  .mcd5-reader-control-divider {
    margin: 0 4px;
    height: 20px;
  }
  :root {
    --mcd5-reader-control-size: 36px;
    --mcd5-reader-control-radius: 9px;
  }
  .mcd5-reader-page-info {
    min-width: 4.1rem;
    font-size: 12px;
  }
  .mcd5-reader-zoom-info {
    min-width: 3rem;
    font-size: 12px;
  }
  .mcd5-reader-button svg {
    width: 16px;
    height: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mcd5-viewport { scroll-behavior: auto; }
  .mcd5-card,
  .mcd5-cover,
  .mcd5-arrow,
  .mcd5-dot,
  .mcd5-slide,
  .mcd5-reader-button {
    transition: none !important;
    animation: none !important;
  }
  .mcd5-reader-stage,
  .mcd5-reader-canvas-wrap {
    transition: none !important;
  }
  .mcd5-animation-elegant .mcd5-slide,
  .mcd5-animation-soft .mcd5-slide,
  .mcd5-animation-minimal .mcd5-slide {
    opacity: 1;
    transform: none;
  }
}
