.cosmedica-feature-slider {
  --cosmedica-dark: #213368;
  --cosmedica-blue: #4389e2;
  --cosmedica-light: #f1f7ff;
  --cosmedica-white: #ffffff;
  --cosmedica-border: rgba(33, 51, 104, 0.12);
  --cosmedica-muted: rgba(33, 51, 104, 0.62);

  width: 100%;
  font-family: "Poppins", sans-serif;
}

.cosmedica-feature-slider,
.cosmedica-feature-slider * {
  box-sizing: border-box;
}

.cosmedica-feature-slider .cosmedica-feature-slider__viewport {
  width: 100%;
  overflow: hidden;
}

.cosmedica-feature-slider .cosmedica-feature-slider__stage {
  position: relative;
  width: 100%;
  height: 410px;
}

.cosmedica-feature-slider .cosmedica-feature-card {
  position: absolute;
  top: 50%;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 26px;
  cursor: pointer;
  outline: none;
  transform: translateY(-50%);
  transition:
    left 0.72s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.72s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.72s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.72s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.5s ease,
    background-color 0.5s ease,
    border-color 0.5s ease,
    box-shadow 0.5s ease,
    opacity 0.5s ease,
    transform 0.35s ease;
}

.cosmedica-feature-slider .cosmedica-feature-card:hover {
  transform: translateY(calc(-50% - 7px));
}

.cosmedica-feature-slider .cosmedica-feature-card:focus-visible {
  outline: 2px solid var(--cosmedica-blue);
  outline-offset: 4px;
}

.cosmedica-feature-slider .cosmedica-feature-card[data-position="0"] {
  left: 0;
  z-index: 4;
  width: 43%;
  height: 390px;
  padding: 42px;
  color: var(--cosmedica-white);
  background: var(--cosmedica-dark);
  border-color: rgba(255, 255, 255, 0.08);
}

.cosmedica-feature-slider .cosmedica-feature-card[data-position="1"] {
  left: 45%;
  z-index: 3;
  width: 27%;
  height: 330px;
  padding: 32px;
  color: var(--cosmedica-white);
  background: var(--cosmedica-blue);
  box-shadow: 0 18px 42px rgba(67, 137, 226, 0.16);
}

.cosmedica-feature-slider .cosmedica-feature-card[data-position="2"] {
  left: 74%;
  z-index: 2;
  width: 17%;
  height: 275px;
  padding: 26px 22px;
  color: var(--cosmedica-dark);
  background: var(--cosmedica-light);
  border-color: rgba(33, 51, 104, 0.06);
}

.cosmedica-feature-slider .cosmedica-feature-card[data-position="3"] {
  left: 93%;
  z-index: 1;
  width: 10%;
  height: 225px;
  padding: 22px 15px;
  color: var(--cosmedica-dark);
  background: var(--cosmedica-white);
  border-color: var(--cosmedica-border);
  opacity: 0.86;
}

/* Any card beyond the 4 visible slots (position 4, 5, 6…) collapses into
   the same hidden/off-screen state as position 3 — without this, cards
   with no explicit position rule fell back to their default box and
   visually overlapped/bled through the visible stack. */
.cosmedica-feature-slider .cosmedica-feature-card:not([data-position="0"]):not([data-position="1"]):not([data-position="2"]):not([data-position="3"]) {
  left: 93%;
  z-index: 1;
  width: 10%;
  height: 225px;
  padding: 22px 15px;
  color: var(--cosmedica-dark);
  background: var(--cosmedica-white);
  border-color: var(--cosmedica-border);
  opacity: 0.86;
}

.cosmedica-feature-slider .cosmedica-feature-card__watermark {
  position: absolute;
  right: -10px;
  bottom: -50px;
  z-index: 0;
  color: currentColor;
  font-size: 180px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.08em;
  opacity: 0.045;
  pointer-events: none;
  user-select: none;
  transition:
    font-size 0.5s ease,
    opacity 0.5s ease;
}

.cosmedica-feature-slider .cosmedica-feature-card:not([data-position="0"]) .cosmedica-feature-card__watermark {
  font-size: 110px;
  opacity: 0.06;
}

.cosmedica-feature-slider .cosmedica-feature-card__top,
.cosmedica-feature-slider .cosmedica-feature-card__content {
  position: relative;
  z-index: 1;
}

.cosmedica-feature-slider .cosmedica-feature-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: auto;
}

.cosmedica-feature-slider .cosmedica-feature-card__number {
  color: currentColor;
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.12em;
  opacity: 0.75;
}

.cosmedica-feature-slider .cosmedica-feature-card[data-position="0"] .cosmedica-feature-card__number {
  color: var(--cosmedica-blue);
  font-size: 17px;
  opacity: 1;
}

.cosmedica-feature-slider .cosmedica-feature-card__label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 7px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: currentColor;
  font-size: 10px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.58;
  transform: scale(1);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    visibility 0.4s ease;
}

.cosmedica-feature-slider .cosmedica-feature-card[data-position="2"] .cosmedica-feature-card__label,
.cosmedica-feature-slider .cosmedica-feature-card[data-position="3"] .cosmedica-feature-card__label,
.cosmedica-feature-slider .cosmedica-feature-card:not([data-position="0"]):not([data-position="1"]):not([data-position="2"]):not([data-position="3"]) .cosmedica-feature-card__label {
  opacity: 0;
  transform: scale(0.7);
  visibility: hidden;
}

.cosmedica-feature-slider .cosmedica-feature-card__content {
  width: 100%;
}

.cosmedica-feature-slider .cosmedica-feature-card__title {
  margin: 0;
  color: inherit;
  font-family: "Poppins", sans-serif;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
  transform-origin: left center;
  transition:
    transform 0.5s ease,
    opacity 0.35s ease;
}

.cosmedica-feature-slider .cosmedica-feature-card[data-position="0"] .cosmedica-feature-card__title {
  max-width: 600px;
  transform: scale(1);
}

.cosmedica-feature-slider .cosmedica-feature-card[data-position="1"] .cosmedica-feature-card__title {
  transform: scale(0.72);
}

.cosmedica-feature-slider .cosmedica-feature-card[data-position="2"] .cosmedica-feature-card__title {
  transform: scale(0.55);
}

.cosmedica-feature-slider .cosmedica-feature-card[data-position="3"] .cosmedica-feature-card__title {
  transform: scale(0.4);
  opacity: 0;
}
.cosmedica-feature-slider .cosmedica-feature-card:not([data-position="0"]):not([data-position="1"]):not([data-position="2"]):not([data-position="3"]) .cosmedica-feature-card__title {
  transform: scale(0.4);
  opacity: 0;
}

.cosmedica-feature-slider .cosmedica-feature-card__text {
  max-width: 610px;
  margin: 20px 0 0;
  color: inherit;
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.32s ease,
    transform 0.42s ease;
}

.cosmedica-feature-slider .cosmedica-feature-card[data-position="0"] .cosmedica-feature-card__text {
  opacity: 0.86;
  transform: translateY(0);
  transition-delay: 0.22s;
}

.cosmedica-feature-slider .cosmedica-feature-card:not([data-position="0"]) .cosmedica-feature-card__text {
  display: none;
}

.cosmedica-feature-slider .cosmedica-feature-slider__footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  margin-top: 24px;
}

.cosmedica-feature-slider .cosmedica-feature-slider__progress {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--cosmedica-dark);
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
}

.cosmedica-feature-slider .cosmedica-feature-slider__current {
  min-width: 18px;
  color: var(--cosmedica-blue);
}

.cosmedica-feature-slider .cosmedica-feature-slider__total {
  min-width: 18px;
  color: var(--cosmedica-muted);
}

.cosmedica-feature-slider .cosmedica-feature-slider__progress-track {
  position: relative;
  width: min(190px, 18vw);
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(33, 51, 104, 0.1);
}

.cosmedica-feature-slider .cosmedica-feature-slider__progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--cosmedica-blue);
  transform-origin: left center;
}

.cosmedica-feature-slider .cosmedica-feature-slider__progress-bar.is-running {
  animation: cosmedicaFeatureProgress 8s linear forwards;
}

@keyframes cosmedicaFeatureProgress {
  from { width: 0; }
  to { width: 100%; }
}

.cosmedica-feature-slider .cosmedica-feature-slider__mobile-hint {
  display: none;
  color: var(--cosmedica-muted);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 500;
  text-align: center;
}

.cosmedica-feature-slider .cosmedica-feature-slider__navigation {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.cosmedica-feature-slider .cosmedica-feature-slider__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--cosmedica-border);
  border-radius: 50%;
  color: var(--cosmedica-dark);
  background: var(--cosmedica-white);
  box-shadow: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition:
    color 0.22s ease,
    background-color 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s ease;
}

.cosmedica-feature-slider .cosmedica-feature-slider__arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cosmedica-feature-slider .cosmedica-feature-slider__arrow:hover {
  color: var(--cosmedica-white);
  background: var(--cosmedica-blue);
  border-color: var(--cosmedica-blue);
  transform: translateY(-2px);
}

.cosmedica-feature-slider .cosmedica-feature-slider__arrow:focus {
  outline: none;
}

.cosmedica-feature-slider .cosmedica-feature-slider__arrow:focus-visible {
  outline: 2px solid var(--cosmedica-blue);
  outline-offset: 4px;
}

@media (max-width: 1100px) {
  .cosmedica-feature-slider .cosmedica-feature-slider__stage {
    height: 390px;
  }

  .cosmedica-feature-slider .cosmedica-feature-card[data-position="0"] {
    width: 49%;
    height: 370px;
    padding: 36px;
  }

  .cosmedica-feature-slider .cosmedica-feature-card[data-position="1"] {
    left: 51%;
    width: 28%;
    height: 310px;
    padding: 28px;
  }

  .cosmedica-feature-slider .cosmedica-feature-card[data-position="2"] {
    left: 81%;
    width: 16%;
    height: 255px;
  }

  .cosmedica-feature-slider .cosmedica-feature-card[data-position="3"] {
    left: 98%;
    width: 8%;
    height: 205px;
  }

  .cosmedica-feature-slider .cosmedica-feature-card:not([data-position="0"]):not([data-position="1"]):not([data-position="2"]):not([data-position="3"]) {
    left: 98%;
    width: 8%;
    height: 205px;
  }
}

@media (max-width: 767px) {
  .cosmedica-feature-slider .cosmedica-feature-slider__viewport {
    overflow: hidden;
  }

  .cosmedica-feature-slider .cosmedica-feature-slider__stage {
    height: var(--fs-mobile-stage-height, 410px);
  }

  .cosmedica-feature-slider .cosmedica-feature-card {
    top: 0;
    height: var(--fs-mobile-card-height, 382px) !important;
    border-radius: 23px;
    transform: none;
    transition:
      left 0.62s cubic-bezier(0.22, 1, 0.36, 1),
      width 0.62s cubic-bezier(0.22, 1, 0.36, 1),
      color 0.4s ease,
      background-color 0.4s ease,
      opacity 0.4s ease;
  }

  .cosmedica-feature-slider .cosmedica-feature-card:hover {
    transform: none;
  }

  .cosmedica-feature-slider .cosmedica-feature-card[data-position="0"] {
    left: 0;
    width: 84%;
    padding: 28px 23px;
  }

  .cosmedica-feature-slider .cosmedica-feature-card[data-position="1"] {
    left: 87%;
    width: 74%;
    padding: 27px 22px;
  }

  .cosmedica-feature-slider .cosmedica-feature-card[data-position="2"] {
    left: 164%;
    width: 74%;
    padding: 27px 22px;
  }

  .cosmedica-feature-slider .cosmedica-feature-card[data-position="3"] {
    left: 241%;
    width: 74%;
    padding: 27px 22px;
    opacity: 1;
  }

  .cosmedica-feature-slider .cosmedica-feature-card:not([data-position="0"]):not([data-position="1"]):not([data-position="2"]):not([data-position="3"]) {
    left: 318%;
    width: 74%;
    padding: 27px 22px;
    opacity: 1;
  }

  .cosmedica-feature-slider .cosmedica-feature-card[data-position="0"] .cosmedica-feature-card__title {
    transform: scale(1);
    line-height: 1.22;
  }

  .cosmedica-feature-slider .cosmedica-feature-card[data-position="1"] .cosmedica-feature-card__title,
  .cosmedica-feature-slider .cosmedica-feature-card[data-position="2"] .cosmedica-feature-card__title,
  .cosmedica-feature-slider .cosmedica-feature-card[data-position="3"] .cosmedica-feature-card__title,
  .cosmedica-feature-slider .cosmedica-feature-card:not([data-position="0"]):not([data-position="1"]):not([data-position="2"]):not([data-position="3"]) .cosmedica-feature-card__title {
    transform: scale(0.73);
    opacity: 1;
  }

  .cosmedica-feature-slider .cosmedica-feature-card[data-position="2"] .cosmedica-feature-card__label,
  .cosmedica-feature-slider .cosmedica-feature-card[data-position="3"] .cosmedica-feature-card__label,
  .cosmedica-feature-slider .cosmedica-feature-card:not([data-position="0"]):not([data-position="1"]):not([data-position="2"]):not([data-position="3"]) .cosmedica-feature-card__label {
    opacity: 0.58;
    transform: scale(1);
    visibility: visible;
  }

  .cosmedica-feature-slider .cosmedica-feature-card__text {
    font-size: 15px;
    line-height: 1.65;
  }

  .cosmedica-feature-slider .cosmedica-feature-card__watermark {
    font-size: 130px;
  }

  .cosmedica-feature-slider .cosmedica-feature-slider__footer {
    grid-template-columns: 1fr auto;
    gap: 16px;
    margin-top: 18px;
  }

  .cosmedica-feature-slider .cosmedica-feature-slider__mobile-hint {
    display: block;
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
  }

  .cosmedica-feature-slider .cosmedica-feature-slider__progress-track {
    width: min(130px, 31vw);
  }

  .cosmedica-feature-slider .cosmedica-feature-slider__arrow {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 420px) {
  .cosmedica-feature-slider .cosmedica-feature-slider__stage {
    height: 430px;
  }

  .cosmedica-feature-slider .cosmedica-feature-card {
    height: 402px !important;
  }

  .cosmedica-feature-slider .cosmedica-feature-card[data-position="0"] {
    width: 87%;
    padding: 25px 20px;
  }

  .cosmedica-feature-slider .cosmedica-feature-card[data-position="1"] {
    left: 90%;
  }

  .cosmedica-feature-slider .cosmedica-feature-card[data-position="0"] .cosmedica-feature-card__title {
    transform: scale(0.88);
  }

  .cosmedica-feature-slider .cosmedica-feature-card__text {
    font-size: 14px;
    line-height: 1.62;
  }

  .cosmedica-feature-slider .cosmedica-feature-card__label {
    min-height: 27px;
    padding: 6px 9px;
    font-size: 9px;
  }

  .cosmedica-feature-slider .cosmedica-feature-slider__arrow {
    width: 41px;
    height: 41px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cosmedica-feature-slider *,
  .cosmedica-feature-slider *::before,
  .cosmedica-feature-slider *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Per-element "hide on tablet/mobile" utility classes.
   Content stays in the HTML (SEO-safe) — only visually hidden. */
@media (max-width: 1024px) {
  .cosmedica-feature-slider .cosmedica-hide-tablet { display: none !important; }
}
@media (max-width: 767px) {
  .cosmedica-feature-slider .cosmedica-hide-mobile { display: none !important; }
}
