/* ═══════════════════════════════════════════════════════════════
   MATERIALS PAGE — Interactive Collection Hero
   ═══════════════════════════════════════════════════════════════ */

.materials-hero.dynamic-hero-section {
  height: auto;
  min-height: 100vh;
  display: block;
  padding: 0;
}

.materials-hero .mh-bg-layer {
  opacity: 0.48 !important;
  filter: contrast(1.1) saturate(0.95);
  animation: mhKenBurns 20s ease-in-out infinite alternate;
}

@keyframes mhKenBurns {
  0%   { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.08) translate(-1%, -0.5%); }
}

.materials-hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
  opacity: 0.6;
}

.materials-hero-shine {
  position: absolute;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,0.14) 0%, transparent 68%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.materials-hero:hover .materials-hero-shine { opacity: 1; }

.materials-hero .mh-overlay {
  background:
    linear-gradient(105deg, rgba(5,5,4,0.88) 0%, rgba(5,5,4,0.45) 42%, rgba(5,5,4,0.72) 100%),
    radial-gradient(ellipse 60% 50% at 75% 45%, rgba(201,168,76,0.12) 0%, transparent 70%);
  z-index: 2;
}

.lang-ar .materials-hero .mh-overlay {
  background:
    linear-gradient(255deg, rgba(5,5,4,0.88) 0%, rgba(5,5,4,0.45) 42%, rgba(5,5,4,0.72) 100%),
    radial-gradient(ellipse 60% 50% at 25% 45%, rgba(201,168,76,0.12) 0%, transparent 70%);
}

.materials-hero .hero-sweep {
  z-index: 5;
  opacity: 0.55 !important;
}

.materials-hero-inner {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 40px;
  align-items: center;
  min-height: 100vh;
  padding: calc(var(--nav-height) + 32px) 40px 64px;
}

.materials-hero-copy {
  text-align: left;
  padding-top: 0 !important;
  pointer-events: auto;
  max-width: 540px;
}

.lang-ar .materials-hero-copy {
  text-align: right;
}

.materials-hero .dynamic-hero-eyebrow {
  justify-content: flex-start;
}

.lang-ar .materials-hero .dynamic-hero-eyebrow {
  justify-content: flex-start;
}

.materials-hero-title {
  font-size: clamp(2.8rem, 5.5vw, 5rem) !important;
  text-align: left;
  margin-bottom: 16px !important;
}

.lang-ar .materials-hero-title {
  text-align: right;
  font-family: var(--font-ar);
}

.materials-hero-desc {
  font-size: clamp(0.9rem, 1.3vw, 1rem);
  line-height: 1.85;
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 24px;
  max-width: 460px;
}

.materials-hero .dynamic-hero-breadcrumb {
  justify-content: flex-start;
}

.lang-ar .materials-hero .dynamic-hero-breadcrumb {
  justify-content: flex-start;
}

/* ── Stage: 3D viewer (grid — not absolute) ── */
.materials-hero-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  perspective: 900px;
}

.materials-hero .materials-hero-viewer {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  right: auto !important;
  transform: none !important;
  width: min(440px, 100%) !important;
  max-width: 480px !important;
  z-index: 6;
  pointer-events: auto;
}

.materials-hero .materials-hero-slab {
  transform-style: preserve-3d;
  will-change: transform;
}

.materials-hero .materials-hero-swatches {
  animation: mhSwatchGlow 4s ease-in-out infinite;
}

@keyframes mhSwatchGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,168,76,0); }
  50%      { box-shadow: 0 0 24px 0 rgba(201,168,76,0.12); }
}

.materials-hero .floating-element.shape-1 {
  width: 220px; height: 220px;
  top: 12%; left: 8%;
  opacity: 0.16;
}

.materials-hero .floating-element.shape-2 {
  width: 320px; height: 320px;
  bottom: 5%; right: 6%;
  opacity: 0.1;
}

.materials-hero .floating-element.shape-3 {
  width: 140px; height: 140px;
  top: 22%; right: 18%;
  opacity: 0.14;
}

.mh-reveal { visibility: hidden; }

/* ── Tablet ── */
@media (max-width: 1024px) {
  .materials-hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-bottom: 48px;
    text-align: center;
  }

  .materials-hero-copy,
  .lang-ar .materials-hero-copy {
    text-align: center;
    margin: 0 auto;
  }

  .materials-hero .dynamic-hero-eyebrow,
  .lang-ar .materials-hero .dynamic-hero-eyebrow,
  .materials-hero .dynamic-hero-breadcrumb,
  .lang-ar .materials-hero .dynamic-hero-breadcrumb {
    justify-content: center;
  }

  .materials-hero-title,
  .lang-ar .materials-hero-title {
    text-align: center;
  }

  .materials-hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .materials-hero-stage {
    min-height: 360px;
  }
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .materials-hero.dynamic-hero-section {
    min-height: auto;
  }

  .materials-hero-inner {
    min-height: auto;
    padding: calc(var(--nav-height) + 20px) 20px 48px;
    gap: 28px;
  }

  .materials-hero .materials-hero-viewer {
    width: min(340px, 92vw) !important;
  }

  .materials-hero .floating-element.shape-2 {
    width: 200px;
    height: 200px;
    right: -8%;
  }

  .materials-hero .floating-element.shape-1 {
    width: 120px;
    height: 120px;
    left: -6%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .materials-hero .mh-bg-layer,
  .materials-hero .materials-hero-swatches {
    animation: none !important;
  }
}
