/* ============================================================
   WORDPRESS REBUILD TARGET
   This stylesheet will be isolated as the Showcase card / grid /
   slideshow / lightbox styles for a Custom Post Type + ACF Gallery
   field loop (post type: showcase_entry).
   Enqueue only on the Showcase template (page-showcase.php).
   ============================================================ */

.showcase-hero {
  position: relative;
  background: var(--primary);
  color: var(--hero-foreground);
  padding-top: 9rem;
  padding-bottom: 4rem;
}
@media (min-width: 1024px) {
  .showcase-hero {
    padding-top: 11rem;
    padding-bottom: 6rem;
  }
}
.showcase-hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3rem, 9vw, 6rem);
  line-height: 1.05;
}
.showcase-hero p {
  margin-top: 1.5rem;
  max-width: 34rem;
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.8;
  color: color-mix(in oklab, var(--hero-foreground) 80%, transparent);
}

.showcase-grid {
  display: grid;
  gap: 4rem 2rem;
}
@media (min-width: 640px) {
  .showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .showcase-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.showcase-card__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 0;
  padding: 0;
  margin: 0;
  background: var(--secondary);
  cursor: pointer;
}
.showcase-card__media img {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
  opacity: 0;
  transition:
    opacity 1600ms ease-in-out,
    transform 1600ms ease-in-out;
}
.showcase-card__media img.is-active {
  opacity: 1;
}
.showcase-card__media:hover img {
  transform: scale(1.04);
}
.showcase-card__count {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: color-mix(in oklab, var(--primary) 70%, transparent);
  padding: 0.25rem 0.6rem;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--hero-foreground);
}
.showcase-card__eyebrow {
  margin-top: 1.5rem;
  color: var(--brass);
}
.showcase-card__title {
  margin-top: 0.75rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.75rem;
  line-height: 1.3;
}
@media (min-width: 640px) {
  .showcase-card__title {
    font-size: 1.9rem;
  }
}
.showcase-card__address {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.showcase-card__caption {
  margin-top: 0.75rem;
  white-space: pre-line;
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--muted-foreground);
}
.showcase-card__date {
  margin-top: 0.75rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  background: color-mix(in oklab, var(--primary) 95%, transparent);
  backdrop-filter: blur(4px);
  color: var(--hero-foreground);
  animation: lightbox-fade 300ms ease both;
}
.lightbox.is-open {
  display: flex;
}
@keyframes lightbox-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
}
@media (min-width: 640px) {
  .lightbox__bar {
    padding: 1.25rem 2rem;
  }
}
.lightbox__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
}
.lightbox__close {
  border: 1px solid color-mix(in oklab, var(--hero-foreground) 30%, transparent);
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0.4rem 0.8rem;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  transition: background 200ms ease;
}
.lightbox__close:hover {
  background: color-mix(in oklab, var(--hero-foreground) 10%, transparent);
}

.lightbox__stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem 1rem;
}
@media (min-width: 640px) {
  .lightbox__stage {
    padding: 0 4rem 1rem;
  }
}
.lightbox__stage img {
  position: absolute;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 700ms ease-in-out;
}
.lightbox__stage img.is-active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 1.5rem 0.75rem;
  font-size: 2rem;
  font-weight: 300;
  color: color-mix(in oklab, var(--hero-foreground) 70%, transparent);
  transition: color 200ms ease;
}
.lightbox__nav:hover {
  color: var(--hero-foreground);
}
.lightbox__nav--prev {
  left: 0;
}
.lightbox__nav--next {
  right: 0;
}

.lightbox__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding-bottom: 2rem;
}
.lightbox__dot {
  height: 6px;
  width: 6px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: color-mix(in oklab, var(--hero-foreground) 40%, transparent);
  transition: all 500ms ease;
}
.lightbox__dot:hover {
  background: color-mix(in oklab, var(--hero-foreground) 70%, transparent);
}
.lightbox__dot.is-active {
  width: 2rem;
  background: var(--brass);
}

.is-single .lightbox__nav,
.is-single .lightbox__dots {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .showcase-card__media img,
  .lightbox__stage img {
    transition: none;
  }
}
.showcase-empty {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--muted-foreground);
}

/* EC-BTN-104 + EC-NAV-121: Re-assert hero / CTA text-white on buttons & links.
   Uses class~= (word match) not class*= (substring) to avoid matching hover:text-white etc. */
button[class~='text-white/90'],
a[class~='text-white/90'] {
  color: rgba(255, 255, 255, 0.9);
}
button[class~='text-white/80'],
a[class~='text-white/80'] {
  color: rgba(255, 255, 255, 0.8);
}
button[class~='text-white/70'],
a[class~='text-white/70'] {
  color: rgba(255, 255, 255, 0.7);
}
button[class~='text-white/60'],
a[class~='text-white/60'] {
  color: rgba(255, 255, 255, 0.6);
}
button[class~='text-white/50'],
a[class~='text-white/50'] {
  color: rgba(255, 255, 255, 0.5);
}
button[class~='text-white/40'],
a[class~='text-white/40'] {
  color: rgba(255, 255, 255, 0.4);
}
button[class~='text-white'],
a[class~='text-white'] {
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}

/* EC-ANIM-008b / EC-ANIM-009: carousel-only override — scroll-reveal elements animate via IO in functions.php */
.scroll-fade-up:has([aria-roledescription='carousel']),
.scroll-fade-up:has([data-wpconvert-blog-filter-bar]),
.scroll-fade-left:has([aria-roledescription='carousel']),
.scroll-fade-right:has([aria-roledescription='carousel']),
.scroll-scale-in:has([aria-roledescription='carousel']) {
  opacity: 1 !important;
  transform: none !important;
}
