/* ARTS + NEWS PAGES: horizontally scrollable project/article cards */

.carousel-section {
  padding: 2rem 0;
}

.carousel-section > h1 {
  /* Looks like the original h2 heading while retaining the page's h1 landmark. */
  margin: 1.5rem 0 1rem;
  color: rgb(255, 186, 13);
  font-family: "Elegance", Georgia, serif;
  font-size: 1.5em;
  line-height: 1.2;
  text-align: center;
  letter-spacing: 0.15em;
  text-shadow: 5px 2px 4px rgba(0, 0, 0, 0.5);
  -webkit-text-stroke: 0.01px rgb(106, 97, 97);
}

.carousel-container {
  width: 100%;
  padding: 1rem 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.carousel-container::-webkit-scrollbar {
  display: none;
}

.carousel-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  margin: 0 auto;
  padding: 0 1rem;
}

.carousel-item {
  position: relative;
  flex: 0 0 auto;
  width: 300px;
  overflow: hidden;
  background: var(--color-white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.carousel-item:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 186, 13, 0.5), 0 4px 15px rgba(0, 0, 0, 0.3);
}

.carousel-item > img {
  display: block;
  width: 100%;
  height: 250px;
  object-fit: contain;
}

.carousel-caption {
  padding: 1rem;
  padding-bottom: 3rem;
  text-align: center;
}

.carousel-caption h2 {
  /* Original card title style (the original markup used h3). */
  margin: 0 0 0.5rem;
  color: rgb(255, 186, 13);
  font-family: "Elegance", Georgia, serif;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0.15em;
  text-shadow: 5px 2px 4px rgba(0, 0, 0, 0.5);
  -webkit-text-stroke: 0.01px rgb(106, 97, 97);
}

.carousel-description {
  margin: 0;
  color: var(--color-rust);
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  letter-spacing: 0.15em;
  text-shadow: 5px 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-actions {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* If a card has only one action (Watch/My Certificate), keep it at bottom-right. */
.carousel-actions .carousel-button:only-child {
  margin-left: auto;
}

.carousel-button {
  display: inline-block;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgb(255, 186, 13);
  font-family: "Elegance", Georgia, serif;
  font-size: 16px;
  line-height: 1.2;
  text-align: left;
  letter-spacing: 0.15em;
  text-decoration: none;
  text-shadow: 5px 2px 4px rgba(0, 0, 0, 0.5);
  -webkit-text-stroke: 0.5px rgb(106, 97, 97);
  overflow-wrap: anywhere;
  transition: all 0.3s ease;
}

.carousel-button:hover {
  color: rgb(255, 186, 13);
  text-shadow:
    0 0 50px #ffd500,
    0 0 20px #ffb700,
    0 0 10px #ddff00,
    0 0 40px #ffff00;
}

.carousel-button[aria-label] {
  cursor: pointer;
}

@media (max-width: 768px) {
  .carousel-track {
    margin: 0;
  }

  .carousel-item {
    width: 250px;
  }

  .carousel-item > img {
    height: 200px;
  }

  .carousel-actions {
    right: 1rem;
    left: 1rem;
  }
}
