/* Modern Media Carousel — intentionally scoped to avoid conflicts with themes. */
.mmc-carousel,
.mmc-carousel * { box-sizing: border-box; }

.mmc-carousel {
  --mmc-radius: 18px;
  --mmc-control-bg: rgba(12, 17, 26, .66);
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 1.5rem 0;
  overflow: hidden;
  background: #161a20;
  border-radius: var(--mmc-radius);
  box-shadow: 0 10px 32px rgba(10, 15, 22, .10);
  isolation: isolate;
}

.mmc-carousel:focus { outline: none; }
.mmc-carousel:focus-visible { outline: 3px solid #4285ff; outline-offset: 4px; }

.mmc-carousel .mmc-viewport {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  background: #14171c;
}

.mmc-carousel .mmc-track {
  display: flex;
  width: 100%;
  height: 100%;
  transform: translate3d(0, 0, 0);
  transition: transform 400ms cubic-bezier(.24, .76, .2, 1);
  will-change: transform;
}

.mmc-carousel .mmc-slide {
  position: relative;
  display: flex;
  flex: 0 0 100%;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  background: #14171c;
}

.mmc-carousel .mmc-image,
.mmc-carousel .mmc-slide img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  object-position: center center;
  box-shadow: none;
}

.mmc-carousel .mmc-counter {
  position: absolute;
  top: clamp(10px, 2.1vw, 20px);
  right: clamp(10px, 2.1vw, 20px);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 57px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: var(--mmc-control-bg);
  color: #fff;
  font: 600 13px/1.1 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  pointer-events: none;
}

.mmc-carousel .mmc-counter-divider { margin: 0 3px; color: rgba(255,255,255,.64); }

.mmc-carousel .mmc-arrow {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  z-index: 2;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(38px, 5vw, 46px);
  height: clamp(38px, 5vw, 46px);
  padding: 0;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  outline: none;
  background: var(--mmc-control-bg);
  color: #fff;
  box-shadow: 0 5px 16px rgba(0,0,0,.15);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  line-height: 1;
}

.mmc-carousel .mmc-arrow svg { display: block; width: 22px; height: 22px; stroke: currentColor; flex: none; }
.mmc-carousel .mmc-arrow-prev { left: clamp(10px, 2.1vw, 20px); }
.mmc-carousel .mmc-arrow-next { right: clamp(10px, 2.1vw, 20px); }
.mmc-carousel .mmc-arrow:hover { background: rgba(12,17,26,.93); border-color: rgba(255,255,255,.55); }
.mmc-carousel .mmc-arrow:focus-visible { outline: 3px solid #87b2ff; outline-offset: 3px; }
.mmc-carousel .mmc-arrow:active { background: #252e3c; }

@media (max-width: 480px) {
  .mmc-carousel { --mmc-radius: 12px; }
  .mmc-carousel .mmc-counter { min-height: 30px; padding: 6px 10px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .mmc-carousel .mmc-track,
  .mmc-carousel .mmc-arrow { transition: none; }
}
