/* Featured Carousel Wrapper */
.featured-carousel-wrapper {
  position: relative;
  margin-bottom: 3rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #fcfcfc;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  overflow: hidden;
}

/* Dark mode compatibility */
@media (prefers-color-scheme: dark) {
  .featured-carousel-wrapper {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  }
}

.featured-carousel-header {
  margin-bottom: 1.25rem;
}

.featured-carousel-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #ff7b0f;
  display: inline-block;
  margin-bottom: 0.25rem;
}

.featured-carousel-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
  color: #111;
  line-height: 1.2;
}

@media (prefers-color-scheme: dark) {
  .featured-carousel-title {
    color: #f3f4f6;
  }
}

/* Carousel Container */
.featured-carousel {
  position: relative;
  height: 320px;
  overflow: hidden;
  border-radius: 8px;
}

/* Individual Slide */
.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide.active {
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
}

/* Link Wrap */
.carousel-card-link {
  text-decoration: none !important;
  color: inherit;
  display: block;
  width: 100%;
  height: 100%;
}

/* Card Layout */
.carousel-card {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  background-color: #111;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Card Background Image */
.carousel-card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-card-link:hover .carousel-card-image {
  transform: scale(1.04);
}

/* Gradient Overlay for Images */
.carousel-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.4) 40%,
    rgba(0, 0, 0, 0.85) 100%
  );
  z-index: 1;
}

/* Fallback Gradient if no image exists */
.carousel-card-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ff7b0f 0%, #a855f7 50%, #3b82f6 100%);
  opacity: 0.95;
  z-index: 1;
}

/* Content Area inside Card */
.carousel-card-content {
  position: relative;
  z-index: 2;
  padding: 1.75rem;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 100%;
  box-sizing: border-box;
}

/* Badge (Featured) */
.carousel-card-badge {
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Post Title */
.carousel-card-post-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  color: #ffffff;
  line-height: 1.25;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: color 0.2s ease;
}

.carousel-card-link:hover .carousel-card-post-title {
  color: rgba(255, 255, 255, 0.9);
}

/* Date */
.carousel-card-date {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0.75rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Summary Snippet */
.carousel-card-summary {
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0 0 1rem 0;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 400;
}

/* "Read Article" link inside card */
.carousel-card-more {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: transform 0.2s ease;
}

.carousel-card-link:hover .carousel-card-more {
  transform: translateX(4px);
}

/* Controls (Next/Prev Arrows) */
.carousel-control {
  position: absolute;
  top: calc(50% + 1.25rem);
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 0;
}

.carousel-control:hover {
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  transform: translateY(-50%) scale(1.05);
  color: #ffffff;
}

.carousel-control:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-control svg {
  width: 1.5rem;
  height: 1.5rem;
}

.carousel-control.prev {
  left: 2rem;
}

.carousel-control.next {
  right: 2rem;
}

/* Dot Indicators */
.carousel-dots-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.carousel-dots {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  background: rgba(0, 0, 0, 0.04);
  padding: 0.35rem 0.75rem;
  border-radius: 30px;
}

@media (prefers-color-scheme: dark) {
  .carousel-dots {
    background: rgba(255, 255, 255, 0.05);
  }
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  .carousel-dot {
    background: rgba(255, 255, 255, 0.3);
  }
}

.carousel-dot.active {
  background: #ff7b0f;
  width: 20px;
  border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 38rem) {
  .featured-carousel-wrapper {
    margin-bottom: 2rem;
    padding: 1rem;
  }
  
  .featured-carousel {
    height: 280px;
  }
  
  .carousel-card-content {
    padding: 1.25rem;
  }
  
  .carousel-card-post-title {
    font-size: 1.2rem;
  }
  
  .carousel-control {
    width: 2.2rem;
    height: 2.2rem;
  }
  
  .carousel-control.prev {
    left: 1rem;
  }
  
  .carousel-control.next {
    right: 1rem;
  }
}
