/* EVV Faith — Resource Card Carousel
 * Clean, separate file. Not mixed into evv-style.css.
 * Version: 1.0.0
 */

.evv-carousel {
  --evv-navy: #0f172a;
  --evv-gold: #BFA046;
  --evv-cream: #FAF8F3;
  --evv-text: #0F172A;
  --evv-muted: #64748b;

  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 18px;
  box-sizing: border-box;
  font-family: "Source Serif 4", Georgia, serif;
}

.evv-carousel-header {
  margin-bottom: 22px;
}

.evv-carousel-kicker {
  margin: 0 0 8px;
  color: var(--evv-gold);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.evv-carousel-header h2 {
  margin: 0;
  color: var(--evv-navy);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.evv-carousel-viewport {
  overflow: hidden;
  margin: 0 -6px;
}

.evv-carousel-track {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 6px 6px 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--evv-gold) transparent;
}

.evv-carousel-track::-webkit-scrollbar {
  height: 8px;
}

.evv-carousel-track::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 999px;
}

.evv-carousel-track::-webkit-scrollbar-thumb {
  background: var(--evv-gold);
  border-radius: 999px;
}

/* No JS fallback: cards wrap */
.evv-carousel-viewport.no-js .evv-carousel-track {
  flex-wrap: wrap;
  overflow-x: visible;
  scroll-snap-type: none;
}

.evv-carousel-card {
  flex: 0 0 min(340px, 82vw);
  scroll-snap-align: start;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.11);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}

.evv-carousel-card:hover {
  transform: translateY(-4px);
  border-color: var(--evv-gold);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.1);
}

.evv-carousel-image-link {
  display: block;
  text-decoration: none;
}

.evv-carousel-image {
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  background: var(--evv-navy);
}

.evv-carousel-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.evv-carousel-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.evv-carousel-type-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--evv-navy);
  color: var(--evv-gold);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.evv-carousel-card h3 {
  margin: 0 0 10px;
  color: var(--evv-navy);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.25rem;
  line-height: 1.1;
}

.evv-carousel-card h3 a {
  color: inherit;
  text-decoration: none;
}

.evv-carousel-summary {
  margin: 0 0 14px;
  color: var(--evv-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  flex: 1;
}

.evv-carousel-resources {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}

.evv-carousel-resource-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.evv-carousel-read-more {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--evv-navy);
  color: var(--evv-gold);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--evv-navy);
  transition: all 0.2s ease;
}

.evv-carousel-read-more:hover {
  background: var(--evv-gold);
  color: var(--evv-navy);
  border-color: var(--evv-gold);
}

/* Controls */
.evv-carousel-controls {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.evv-carousel-prev,
.evv-carousel-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--evv-gold);
  border-radius: 999px;
  background: var(--evv-navy);
  color: #d4b35b;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.evv-carousel-prev:hover,
.evv-carousel-next:hover,
.evv-carousel-prev:focus-visible,
.evv-carousel-next:focus-visible {
  background: var(--evv-gold);
  color: var(--evv-navy);
  outline: 3px solid rgba(191, 160, 70, 0.45);
  outline-offset: 2px;
}

.evv-carousel-prev:disabled,
.evv-carousel-next:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Focus visible for cards */
.evv-carousel-card a:focus-visible,
.evv-carousel-prev:focus-visible,
.evv-carousel-next:focus-visible {
  outline: 3px solid rgba(191, 160, 70, 0.55);
  outline-offset: 3px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .evv-carousel-track {
    scroll-behavior: auto;
  }
  .evv-carousel-card,
  .evv-carousel-card:hover,
  .evv-carousel-image img,
  .evv-carousel-card:hover .evv-carousel-image img,
  .evv-carousel-read-more,
  .evv-carousel-prev,
  .evv-carousel-next {
    transition: none;
    transform: none;
  }
}

/* Print */
@media print {
  .evv-carousel-controls {
    display: none;
  }
  .evv-carousel-track {
    flex-wrap: wrap;
    overflow: visible;
    scroll-snap-type: none;
  }
  .evv-carousel-card {
    flex: 0 0 100%;
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .evv-carousel {
    padding: 28px 10px;
  }
  .evv-carousel-controls {
    justify-content: stretch;
  }
  .evv-carousel-prev,
  .evv-carousel-next {
    flex: 1;
  }
  .evv-carousel-card {
    flex: 0 0 min(300px, 86vw);
  }
}
