/* Preserved coverflow interaction; cards now link to their own tool pages. */
.free-tools-carousel {
  --carousel-card-width: min(100%, 620px);
  --carousel-card-height: 360px;
  --carousel-duration: 1100ms;
  position: relative;
  width: min(calc(100vw - 32px), 1440px);
  min-width: 0;
  margin-left: 50%;
  overflow: hidden;
  padding: 12px 0 4px;
  transform: translateX(-50%);
  perspective: 1400px;
  touch-action: pan-y;
}

.free-tools-carousel [data-carousel-stage] {
  position: relative;
  display: block;
  width: 100%;
  height: var(--carousel-card-height);
  overflow: visible;
  transform-style: preserve-3d;
}

.free-tools-carousel .free-tool-card {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--carousel-card-width);
  height: 100%;
  margin: 0;
  transform: translate3d(calc(-50% + var(--carousel-x, 0px)), 0, var(--carousel-depth, 0px)) rotateY(var(--carousel-rotation, 0deg)) scale(var(--carousel-scale, 1));
  transform-origin: center center;
  isolation: isolate;
  backface-visibility: hidden;
  transition: transform var(--carousel-duration) cubic-bezier(.2,.75,.2,1), filter var(--carousel-duration) ease, opacity var(--carousel-duration) ease, box-shadow .2s ease;
  will-change: transform;
}

.free-tools-carousel .free-tool-card[data-carousel-position="center"] { z-index: 4; filter: saturate(1); opacity: 1; }
.free-tools-carousel .free-tool-card[data-carousel-position="left"],
.free-tools-carousel .free-tool-card[data-carousel-position="right"] { z-index: 2; filter: saturate(.76) brightness(.92); opacity: .84; }
.free-tools-carousel .free-tool-card[data-carousel-position="hidden"] { z-index: 0; filter: saturate(.55) brightness(.86); opacity: 0; pointer-events: none; }

.free-tools-carousel .free-tool-card::after {
  position: absolute;
  z-index: 8;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(112deg, transparent 12%, color-mix(in srgb, var(--tool-card-bg) 48%, #f6f1e8) 49%, transparent 86%);
  content: '';
  opacity: 0;
  pointer-events: none;
  transform: translateX(-115%);
  mix-blend-mode: soft-light;
}

.free-tools-carousel.is-sweeping .free-tool-card[data-carousel-position="center"]::after { animation: tool-color-sweep 1100ms ease-in-out both; }

.free-tools-carousel .free-tool-card__summary {
  display: flex;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(22px, 4vw, 38px);
  color: var(--tool-card-text);
  text-decoration: none;
}

.free-tools-carousel .free-tool-card__summary h3 { max-width: 18ch; font-size: clamp(2rem, 4vw, 3.2rem); }
.free-tools-carousel .free-tool-card__summary p { max-width: 44ch; }
.free-tools-carousel .free-tool-card__action { margin-top: auto; }
.free-tools-carousel [data-carousel-card]:not([data-carousel-position="center"]) .free-tool-card__summary { cursor: pointer; }
.free-tools-carousel [data-carousel-card]:not([data-carousel-position="center"]) .free-tool-card__summary:focus-visible { outline-offset: -7px; }

.free-tools-carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 5vw, 42px);
  margin: 24px auto 0;
  color: #1e252b;
  font-family: Inter, sans-serif;
}

.free-tools-carousel__status {
  min-width: 5.5ch;
  margin: 0;
  color: #4a5156;
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .12em;
  text-align: center;
}

.free-tools-carousel__nav {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid rgba(30,37,43,.25);
  border-radius: 999px;
  background: transparent;
  color: #1e252b;
  cursor: pointer;
  font: 600 .9rem/1 Inter, sans-serif;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.free-tools-carousel__nav:hover { border-color: #173f63; background: #173f63; color: #fff; }
.free-tools-carousel__nav:active { transform: translateY(1px); }
.free-tools-carousel__nav:focus-visible { outline: 3px solid #2e7fa3; outline-offset: 3px; }
.free-tools-carousel__nav:disabled { cursor: not-allowed; opacity: .55; }
.free-tools-carousel.is-dragging, .free-tools-carousel.is-dragging * { cursor: grabbing !important; user-select: none; }

@keyframes tool-color-sweep {
  0% { opacity: 0; transform: translateX(-115%); }
  18% { opacity: .46; }
  72% { opacity: .25; }
  100% { opacity: 0; transform: translateX(115%); }
}

@media (max-width: 760px) {
  .free-tools-carousel { --carousel-card-height: 360px; --carousel-card-width: min(66vw, 540px); }
  .free-tools-carousel__controls { margin-top: 20px; }
}

@media (max-width: 520px) {
  .free-tools-carousel { --carousel-card-height: 420px; --carousel-card-width: min(66vw, 420px); }
  .free-tools-carousel .free-tool-card__summary { padding: 22px; }
  .free-tools-carousel .free-tool-card__summary h3 { font-size: clamp(1.8rem, 8vw, 2.1rem); }
  .free-tools-carousel__controls { gap: 14px; }
  .free-tools-carousel__nav { min-height: 42px; gap: 7px; padding: 8px 10px; font-size: .82rem; }
}

@media (prefers-reduced-motion: reduce) {
  .free-tools-carousel .free-tool-card,
  .free-tools-carousel__nav { transition: none !important; }
  .free-tools-carousel .free-tool-card::after { animation: none !important; }
}
