/* Prismatic Art masterclass — hero slideshow + gallery (matches painting-class patterns) */

.hero.hero--slideshow {
  min-height: 12rem;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: inherit;
}

.hero-slideshow__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
  filter: saturate(1.05) contrast(1.02);
}

.hero-slideshow__frame.is-active {
  opacity: 0.42;
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 1.15rem 0.95rem 1rem;
}

.hero.hero--slideshow::before {
  z-index: 1;
  pointer-events: none;
}

/* Between-hero reel slideshow */
#prismatic-reel {
  margin-top: 14px;
}

.prismatic-reel {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(185, 154, 94, 0.14);
  background:
    radial-gradient(circle at 20% 20%, rgba(216, 192, 139, 0.16), transparent 40%),
    radial-gradient(circle at 80% 30%, rgba(79, 167, 160, 0.14), transparent 42%),
    radial-gradient(circle at 70% 80%, rgba(216, 167, 177, 0.10), transparent 44%),
    rgba(0, 0, 0, 0.04);
  box-shadow: var(--shadow);
  /* IG-like square frame to avoid aspect-ratio jump/cropping ambiguity */
  width: 100%;
  max-width: 100%;
  margin: 0;
  aspect-ratio: 1 / 1;
}

.prismatic-reel::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--reel-bg);
  background-size: cover;
  background-position: center;
  filter: blur(18px) saturate(1.05);
  transform: scale(1.08);
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
}

.prismatic-reel::before {
  z-index: 2;
}

.prismatic-reel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(0,0,0,0.10));
  pointer-events: none;
  z-index: 2;
}

.prismatic-reel__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center center !important;
  display: block;
  opacity: 0;
  transform: scale(1);
  transition: opacity 520ms ease-in-out;
  will-change: transform, opacity;
  z-index: 1;
}

.prismatic-reel__frame.is-kenburns {
  transform-origin: center center;
}

.prismatic-reel__frame.is-active {
  opacity: 1;
}

@keyframes prismaticKenBurns {
  0% { transform: scale(1) translate3d(0, 0, 0); }
  100% { transform: scale(1.08) translate3d(-1.0%, -1.0%, 0); }
}

.prismatic-reel__frame.is-kenburns {
  animation: prismaticKenBurns 2s linear both;
}

@media (prefers-reduced-motion: reduce) {
  .prismatic-reel__frame.is-kenburns {
    animation: none !important;
  }
}

.gallery-panel[id] {
  scroll-margin-top: 1rem;
}

.gallery-panel {
  background: var(--paper-strong);
  border-radius: 16px;
  padding: 20px;
  margin-top: 24px;
  margin-bottom: 8px;
  border: 1px solid rgba(31, 42, 45, 0.06);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.gallery-panel-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--turquoise-deep);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.gallery-panel-title::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  animation: panelTitleSheen 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes panelTitleSheen {
  0% {
    left: -60%;
    opacity: 0.3;
  }
  50% {
    opacity: 0.7;
  }
  100% {
    left: 120%;
    opacity: 0.3;
  }
}

#prismatic-works-gallery .gallery-grid,
.gallery-panel .gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px;
}

@media (max-width: 400px) {
  #prismatic-works-gallery .gallery-grid,
  .gallery-panel .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px;
  }
}

@media (min-width: 640px) {
  #prismatic-works-gallery .gallery-grid,
  .gallery-panel .gallery-grid {
    gap: 12px;
  }
}

.gallery-item-thumb {
  position: relative;
  display: block;
}

.gallery-item-thumb img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  pointer-events: none;
  border-radius: 10px 10px 0 0;
}

.gallery-item {
  position: relative;
  border-radius: 10px;
  background: #eee;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.gallery-item:hover {
  outline: 2px solid var(--turquoise);
  outline-offset: 2px;
}

.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(247, 245, 240, 0.5);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: pointer;
}

.lightbox-overlay.is-open {
  display: flex;
}

.lightbox-content-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  padding: 12px;
}

.lightbox-header {
  width: min(960px, 100%);
  max-width: 100%;
  margin: 0 auto 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 25px rgba(10, 20, 30, 0.1);
  color: var(--ink);
  text-align: center;
}

.lightbox-brandline {
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 0.95rem;
  line-height: 1.2;
}

.lightbox-brandline .brand-2 {
  font-weight: 800;
  opacity: 0.92;
  margin-left: 10px;
  letter-spacing: 0.02em;
}

.lightbox-title {
  margin-top: 6px;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.25;
}

.lightbox-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10001;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  border: 3px solid var(--ink);
  color: var(--ink);
  font-size: 2.75rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s, color 0.2s;
}

.lightbox-close-btn:hover,
.lightbox-close-btn:focus {
  background: var(--ink);
  color: #fff;
  outline: none;
}

.lightbox-overlay img {
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

html.mal-lightbox-open {
  overflow: hidden;
}
