/**
 * Homepage Latest News & Articles — scroll carousel + overlay cards.
 */

.vc-home-latest-section {
  background: linear-gradient(180deg, #f8fafc 0%, #fff 40%, #f0f9ff 100%);
}

.vc-latest-carousel {
  position: relative;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 0 2.75rem;
  --vc-slide-w: min(90vw, 320px);
  isolation: isolate;
}

.vc-latest-carousel__viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-radius: 1rem;
}

.vc-latest-carousel__viewport::-webkit-scrollbar {
  display: none;
}

.vc-latest-carousel__track {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 1rem;
  width: max-content;
}

.vc-latest-carousel__slide {
  flex: 0 0 var(--vc-slide-w);
  width: var(--vc-slide-w);
  min-width: var(--vc-slide-w);
  max-width: var(--vc-slide-w);
  flex-shrink: 0;
  box-sizing: border-box;
  scroll-snap-align: start;
}

.vc-latest-carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  pointer-events: auto;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.96);
  color: #0369a1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.vc-latest-carousel__nav svg {
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}

.vc-latest-carousel__nav:hover {
  background: #fff;
  box-shadow: 0 6px 20px rgba(3, 105, 161, 0.25);
  transform: translateY(-50%) scale(1.05);
}

.vc-latest-carousel__nav--prev {
  left: 0.25rem;
}

.vc-latest-carousel__nav--next {
  right: 0.25rem;
}

.vc-latest-carousel__nav.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* —— Overlay cards (unchanged layout) —— */
.vc-latest-card {
  position: relative;
  display: block;
  width: 100%;
  height: 22rem;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.12);
  background: #1e293b;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.vc-latest-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(3, 105, 161, 0.2);
}

.vc-latest-card__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vc-latest-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.08) 0%,
    rgba(15, 23, 42, 0.35) 45%,
    rgba(15, 23, 42, 0.88) 100%
  );
  pointer-events: none;
}

.vc-latest-card__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  color: #fff;
  z-index: 1;
}

.vc-latest-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.vc-latest-card__badge {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
}

.vc-latest-card__date {
  font-size: 0.6875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

.vc-latest-card__title {
  font-family: "Playfair Display", serif;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.375rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.vc-latest-card__desc {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 639px) {
  .vc-latest-carousel {
    padding: 0 ;
  }

  .vc-latest-card {
    height: 18rem;
  }

  .vc-latest-card__desc {
    display: none;
  }

  .vc-latest-card__title {
    font-size: 1rem;
  }
}

@media (min-width: 768px) {
  .vc-latest-card {
    height: 24rem;
  }
}

@media (min-width: 1024px) {
  .vc-latest-card {
    height: 26rem;
  }
}

@media (min-width: 1280px) {
  .vc-latest-card {
    height: 28rem;
  }
}

@media (min-width: 640px) {
  .vc-latest-carousel__nav--prev {
    left: -0.25rem;
  }

  .vc-latest-carousel__nav--next {
    right: -0.25rem;
  }
}
