/* Homepage "Latest Updates" carousel
   ---------------------------------- */

.home-latest-updates {
  background-color: #f4f5f7;
  padding: 3rem 0 3.5rem;
}

.home-latest-updates__header {
  text-align: center;
  margin-bottom: 2rem;
}

.home-latest-updates__title {
  font-family: "Lora", serif;
  font-size: 2rem;
  font-weight: 700;
  color: #221e1f;
  margin: 0 0 0.25rem;
}

.home-latest-updates__carousel {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
}

.home-latest-updates__track-outer {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  scrollbar-width: none; /* Firefox */
}

.home-latest-updates__track-outer::-webkit-scrollbar {
  display: none; /* WebKit */
}

.home-latest-updates__track {
  display: flex;
  gap: 1.25rem;
  padding: 0.25rem 0.25rem 0.5rem;
}

.home-latest-updates__slide {
  scroll-snap-align: start;
  flex: 0 0 80%;
  display: flex;
}

@media (min-width: 640px) {
  .home-latest-updates__slide {
    flex-basis: 50%;
  }
}

@media (min-width: 1024px) {
  .home-latest-updates__slide {
    flex-basis: 32%;
  }
}

.home-latest-updates__nav {
  align-self: center;
  border: none;
  background: #ffffff;
  color: #770d29;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  max-width: 40px;
  max-height: 40px;
  border-radius: 9999px;
  padding: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease, opacity 0.2s ease;
}

.home-latest-updates__nav:hover {
  background-color: #770d29;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.home-latest-updates__nav:disabled,
.home-latest-updates__nav[aria-disabled="true"] {
  opacity: 0.4;
  cursor: default;
  box-shadow: none;
  transform: none;
}

.home-latest-updates__nav-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.home-latest-updates__meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
  gap: 0.75rem;
}

.home-latest-updates__meta-row .post-date {
  white-space: nowrap;
}

/* Slightly tighten card padding inside carousel context */
.home-latest-updates .post-details {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

/* Make cards equal height within the carousel */
.home-latest-updates .post-excerpt {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.home-latest-updates .post-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.home-latest-updates .post-details {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.home-latest-updates .post-excerpt-text {
  flex: 1 1 auto;
}

/* Slightly smaller headlines and tighter spacing in this section only */
.home-latest-updates .post-title {
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

@media (max-width: 767px) {
  .home-latest-updates {
    padding-top: 2.25rem;
    padding-bottom: 2.75rem;
  }

  .home-latest-updates__title {
    font-size: 1.6rem;
  }

  .home-latest-updates__track {
    gap: 0.75rem;
    padding: 0.25rem 0.75rem 0.75rem;
  }

  .home-latest-updates__slide {
    flex-basis: 100%;
    max-width: 100%;
  }

  .home-latest-updates__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    max-width: 32px;
    max-height: 32px;
  }

  .home-latest-updates__nav--prev {
    left: 0.25rem;
  }

  .home-latest-updates__nav--next {
    right: 0.25rem;
  }
}

