/**
 * Featured ads stack carousel — feat-* classes (consumer dashboard only).
 */
.feat-promo-wrapper {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1s ease-out, transform 1s ease-out;
  font-family: 'Work Sans', sans-serif, system-ui;
}

.feat-promo-wrapper.start-animation {
  opacity: 1;
  transform: translateY(0);
}

.feat-main-title,
.feat-subtitle {
  font-family: 'Work Sans', sans-serif, system-ui;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-color, #1a1a1a);
  text-shadow: none;
}

.feat-main-title {
  font-size: clamp(1.4rem, 2.1vw, 1.95rem);
  font-weight: 700;
}

.feat-subtitle {
  margin: 0;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
}

.feat-promo-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

@media (min-width: 768px) {
  .feat-promo-header {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: baseline;
    justify-content: flex-start;
    gap: 0;
    width: 100%;
    margin-bottom: 0.75rem;
  }

  .feat-promo-header__gap {
    flex: 1 1 auto;
    min-width: clamp(300px, 32vw, 400px);
    max-width: 400px;
  }

  .feat-main-title,
  .feat-subtitle {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .feat-subtitle {
    text-align: right;
    margin-left: 0;
    padding-right: clamp(0.65rem, 1.75vw, 1.35rem);
  }
}

@media (max-width: 767.98px) {
  .feat-promo-wrapper {
    margin-top: 0.5rem !important;
  }

  .feat-promo-header {
    margin-bottom: 0.4rem;
    gap: 0.2rem;
  }

  .feat-subtitle {
    font-size: calc(clamp(1.05rem, 1.5vw, 1.25rem) - 3px);
  }
}

html[data-theme='dark'] .feat-main-title,
html[data-theme='dark'] .feat-subtitle {
  color: #f5f5f5;
}

html[data-theme='dark'] .feat-main-title {
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

#cardCarousel {
  height: 400px;
  margin-top: 0.5rem;
}

.feat-card-list {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feat-card-list.is-transitioning .feat-ad-card {
  pointer-events: none;
}

.feat-ad-card {
  position: absolute;
  width: 90%;
  max-width: 620px;
  max-height: 390px;
  height: 88%;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-decoration: none;
  color: #fff;
}

.feat-ad-card.active {
  transform: translateX(0) scale(1.04);
  opacity: 1;
  z-index: 100;
  max-width: 680px;
  max-height: 420px;
}

.feat-ad-card.next1 {
  transform: translateX(35%) scale(0.9);
  opacity: 0.9;
  z-index: 90;
}

.feat-ad-card.next2 {
  transform: translateX(65%) scale(0.8);
  opacity: 0.7;
  z-index: 80;
}

.feat-ad-card.prev1 {
  transform: translateX(-35%) scale(0.9);
  opacity: 0.9;
  z-index: 90;
}

.feat-ad-card.prev2 {
  transform: translateX(-65%) scale(0.8);
  opacity: 0.7;
  z-index: 80;
}

.feat-ad-card.hidden-right {
  transform: translateX(120%) scale(0.7);
  opacity: 0;
  z-index: 1;
}

.feat-ad-card.hidden-left {
  transform: translateX(-120%) scale(0.7);
  opacity: 0;
  z-index: 1;
}

.feat-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #334155;
}

.feat-card-bg.lazy-bg.loading {
  background-image: linear-gradient(
    90deg,
    rgba(200, 200, 200, 0.2) 0%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(200, 200, 200, 0.2) 100%
  );
  background-size: 200% 100%;
  animation: loadingShimmer 1.5s infinite linear;
}

@keyframes loadingShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.feat-text-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  padding: 80px 20px 24px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0) 100%
  );
}

.feat-card-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  color: #fff !important;
}

.feat-card-desc {
  margin: 0.5rem 0 1rem;
  font-size: 1rem;
  line-height: 1.4;
  max-width: 90%;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92) !important;
}

.feat-read-bttn {
  display: inline-block;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid rgba(203, 213, 225, 0.8);
}

.feat-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 110;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feat-carousel-arrow:hover {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.feat-carousel-arrow--prev {
  left: 10px;
}

.feat-carousel-arrow--next {
  right: 10px;
}

@media (max-width: 768px) {
  #cardCarousel {
    height: 360px;
  }

  .feat-ad-card {
    max-width: 600px;
  }
}

@media (max-width: 576px) {
  #cardCarousel {
    height: 320px;
  }

  .feat-ad-card {
    width: 90%;
    max-width: none;
  }

  .feat-card-title {
    font-size: 1.25rem;
  }

  .feat-carousel-arrow {
    width: 40px;
    height: 40px;
  }

  .feat-carousel-arrow--prev {
    left: 5px;
  }

  .feat-carousel-arrow--next {
    right: 5px;
  }
}

@media (max-width: 499.98px) {
  .feat-promo-wrapper,
  .feat-promo-wrapper.container-fluid {
    width: calc(100% - 30px);
    max-width: calc(100% - 30px);
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
  }

  .feat-promo-header {
    padding-left: 16px;
    padding-right: 16px;
  }

  .feat-subtitle {
    display: none;
  }

  #cardCarousel {
    width: 100%;
    box-sizing: border-box;
  }

  .feat-ad-card {
    width: calc(100% - 32px);
  }

  .feat-ad-card.active {
    width: calc(100% - 12px);
  }

  .feat-carousel-arrow--prev {
    left: 0;
  }

  .feat-carousel-arrow--next {
    right: 0;
  }
}
