.tdop-post-carousel {
  --tdop-carousel-gap: 20px;
  position: relative;
  width: 100%;
  margin-block: 28px;
  color: #fff;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

.tdop-carousel-viewport {
  width: 100%;
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
}

.tdop-carousel-viewport.is-dragging {
  cursor: grabbing;
}

.tdop-carousel-track {
  display: flex;
  align-items: stretch;
  gap: var(--tdop-carousel-gap);
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  will-change: transform;
}

.tdop-carousel-track.is-animated {
  transition: transform 560ms cubic-bezier(0.22, 0.7, 0.2, 1);
}

.tdop-carousel-slide {
  flex: 0 0 auto;
  width: clamp(250px, 24vw, 480px);
  min-width: 0;
  margin: 0;
}

.tdop-carousel-card {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 1.42 / 1;
  color: #fff !important;
  background: #071a2d;
  border-radius: 7px;
  box-shadow: none;
  text-decoration: none !important;
  isolation: isolate;
}

.tdop-carousel-media,
.tdop-carousel-shade {
  position: absolute;
  inset: 0;
}

.tdop-carousel-image {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  transition: transform 650ms cubic-bezier(0.22, 0.7, 0.2, 1);
}

.tdop-carousel-placeholder {
  object-fit: contain;
  padding: 12%;
  background: linear-gradient(145deg, #021d3b, #006b75);
}

.tdop-carousel-shade {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(4, 10, 15, 0.03) 18%, rgba(4, 10, 15, 0.3) 48%, rgba(4, 9, 14, 0.95) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.14), transparent 48%);
}

.tdop-carousel-card:hover .tdop-carousel-image,
.tdop-carousel-card:focus-visible .tdop-carousel-image {
  transform: scale(1.045);
}

.tdop-carousel-content {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  padding: 22px 24px 21px;
}

.tdop-carousel-category {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  margin-bottom: 11px;
  padding: 3px 8px;
  color: #fff;
  background: var(--tdop-card-accent, #006b75);
  border-radius: 3px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.035em;
  line-height: 1;
  text-transform: uppercase;
}

.tdop-carousel-content h3 {
  margin: 0;
  color: #fff;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: clamp(17px, 1.2vw, 21px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.22;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.34);
}

.tdop-carousel-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 10px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
}

.tdop-carousel-meta span,
.tdop-carousel-meta time {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.tdop-carousel-meta > * + *::before {
  width: 3px;
  height: 3px;
  margin-right: 9px;
  content: "";
  background: rgba(255, 255, 255, 0.64);
  border-radius: 50%;
}

.tdop-carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  color: #fff;
  background: rgba(7, 13, 18, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.23);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.tdop-carousel-prev {
  left: 10px;
}

.tdop-carousel-next {
  right: 10px;
}

.tdop-carousel-arrow:hover,
.tdop-carousel-arrow:focus-visible {
  color: #fff;
  background: #006b75;
  border-color: #fff;
  transform: translateY(-50%) scale(1.06);
}

.tdop-carousel-arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.tdop-post-carousel.is-static .tdop-carousel-arrow {
  display: none;
}

.tdop-post-carousel :focus-visible {
  outline: 3px solid #00aebe;
  outline-offset: 3px;
}

.tdop-post-carousel .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}

.tdop-carousel-empty {
  padding: 28px;
  color: #46525b;
  background: #f4f7f8;
  border-left: 5px solid #006b75;
  font: 600 15px/1.5 Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (max-width: 900px) {
  .tdop-post-carousel {
    --tdop-carousel-gap: 16px;
  }

  .tdop-carousel-content {
    padding: 19px;
  }

  .tdop-carousel-content h3 {
    font-size: 18px;
  }
}

@media (max-width: 620px) {
  .tdop-post-carousel {
    --tdop-carousel-gap: 12px;
    margin-block: 20px;
  }

  .tdop-carousel-card {
    aspect-ratio: 1.18 / 1;
    border-radius: 5px;
  }

  .tdop-carousel-content {
    padding: 18px;
  }

  .tdop-carousel-content h3 {
    font-size: 19px;
  }

  .tdop-carousel-arrow {
    width: 38px;
    height: 38px;
  }

  .tdop-carousel-prev {
    left: 8px;
  }

  .tdop-carousel-next {
    right: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tdop-carousel-track.is-animated,
  .tdop-carousel-image,
  .tdop-carousel-arrow {
    transition-duration: 0.01ms !important;
  }
}
