/* ============================================================
   GEMS PAGE — gems.css
   Trailer animation + info panel.
   Go button, Unlock button, paywall modal come from styles.css.
   ============================================================ */

/* ---- Typography ---- */
body.gems-page,
body.gems-page p,
body.gems-page span {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body.gems-page h1,
body.gems-page h2 {
  font-family: 'Playfair Display', serif;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 10px rgba(255, 215, 120, 0.3);
}

/* ---- Background (same hero image as index.html) ---- */
body.gems-page {
  min-height: 100vh;
  background:
    linear-gradient(rgba(0,0,0,0.52), rgba(0,0,0,0.68)),
    url("../assets/hero-rhodes.jpg") center / cover no-repeat fixed;
  color: #fff;
}

/* ---- Page title ---- */
.gems-page-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 22px 20px 10px;
}

.gems-page-title img {
  width: 1.6rem;
  height: 1.6rem;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(255,200,30,0.9));
  animation: unlockPulse 2s infinite;
}

.gems-page-title h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.2rem, 3.5vw, 1.8rem);
  font-weight: 700;
  color: #fff;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

/* ============================================================
   GOLDEN GLOW ANIMATIONS
   ============================================================ */

@keyframes goldPulse {
  0%   {
    box-shadow:
      0 0 10px rgba(255,215,0,0.4),
      0 0 25px rgba(255,180,0,0.3),
      0 10px 30px rgba(0,0,0,0.6),
      inset 0 0 20px rgba(255,215,120,0.25);
  }
  50%  {
    box-shadow:
      0 0 25px rgba(255,215,0,0.85),
      0 0 50px rgba(255,180,0,0.6),
      0 10px 30px rgba(0,0,0,0.6),
      inset 0 0 30px rgba(255,215,120,0.4);
  }
  100% {
    box-shadow:
      0 0 10px rgba(255,215,0,0.4),
      0 0 25px rgba(255,180,0,0.3),
      0 10px 30px rgba(0,0,0,0.6),
      inset 0 0 20px rgba(255,215,120,0.25);
  }
}

@keyframes infoPanelGlow {
  0%   {
    box-shadow:
      0 0 8px rgba(255,215,0,0.3),
      0 0 20px rgba(255,180,0,0.2),
      inset 0 0 15px rgba(255,215,120,0.15),
      0 8px 40px rgba(0,0,0,0.5);
  }
  50%  {
    box-shadow:
      0 0 18px rgba(255,215,0,0.55),
      0 0 40px rgba(255,180,0,0.35),
      inset 0 0 25px rgba(255,215,120,0.3),
      0 8px 40px rgba(0,0,0,0.5);
  }
  100% {
    box-shadow:
      0 0 8px rgba(255,215,0,0.3),
      0 0 20px rgba(255,180,0,0.2),
      inset 0 0 15px rgba(255,215,120,0.15),
      0 8px 40px rgba(0,0,0,0.5);
  }
}

/* ============================================================
   FILM-STRIP TRAILER
   ============================================================ */

.gems-trailer-wrapper {
  position: relative;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  height: 270px;
  overflow: hidden;
  border-radius: 18px;
  /* fade edges */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 16%, black 84%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0%, black 16%, black 84%, transparent 100%);
  /* touch-action allows swipe without interfering with page scroll */
  touch-action: pan-y;
  user-select: none;
}

#gems-track {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ---- Base card (non-active: dimmed and blurred) ---- */
.gems-card {
  position: absolute;
  top: 50%;
  width: 290px;
  height: 210px;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform  0.55s cubic-bezier(0.4,0,0.2,1),
    filter     0.55s ease,
    opacity    0.55s ease,
    left       0.55s cubic-bezier(0.4,0,0.2,1),
    box-shadow 0.55s ease,
    border     0.55s ease;
  transform: translateY(-50%) scale(0.78);
  filter: blur(3px) brightness(0.45);
  opacity: 0.5;
  border: 1.5px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 20px rgba(0,0,0,0.45);
}

.gems-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.4s ease;
}

.gems-card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.4rem 0.6rem;
  background: rgba(0,0,0,0.62);
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  transition: filter 0.4s ease, opacity 0.4s ease;
}

/* ---- Centre card — full golden glow + pulse ---- */
.gems-card.center {
  left: 50%;
  transform: translate(-50%, -50%) scale(1.1);
  filter: none;
  opacity: 1;
  border: 1.5px solid rgba(255, 215, 120, 0.6);
  animation: goldPulse 2.5s ease-in-out infinite;
  z-index: 10;
}

/* ---- Adjacent cards — slightly visible, no glow ---- */
.gems-card.near-left {
  left: calc(50% - 310px);
  transform: translateY(-50%) scale(0.86);
  filter: blur(2px) brightness(0.55);
  opacity: 0.5;
  z-index: 5;
}
.gems-card.near-right {
  left: calc(50% + 20px);
  transform: translateY(-50%) scale(0.86);
  filter: blur(2px) brightness(0.55);
  opacity: 0.5;
  z-index: 5;
}

/* ---- Far cards — heavily dimmed ---- */
.gems-card.far-left {
  left: calc(50% - 600px);
  transform: translateY(-50%) scale(0.7);
  filter: blur(5px) brightness(0.3);
  opacity: 0.4;
  z-index: 1;
}
.gems-card.far-right {
  left: calc(50% + 310px);
  transform: translateY(-50%) scale(0.7);
  filter: blur(5px) brightness(0.3);
  opacity: 0.4;
  z-index: 1;
}

/* ============================================================
   INFO PANEL — golden glow glass card
   ============================================================ */

#gem-info-panel {
  position: relative;
  max-width: 700px;
  margin: 1.4rem auto 2rem;

  /* Glass background */
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);

  /* Gold border */
  border: 1px solid rgba(255, 215, 120, 0.5);
  border-radius: 20px;
  padding: 16px 16px 60px;

  /* Animated golden glow */
  animation: infoPanelGlow 3s ease-in-out infinite;

  color: #fff;
  min-height: 180px;
  cursor: default;
}

/* Blurrable content wrapper */
#gem-info-content {
  transition: filter 0.3s ease;
}

#gem-info-panel.locked-panel #gem-info-content {
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
}

#gem-info-panel h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.1rem, 2.8vw, 1.5rem);
  margin: 0 0 0.5rem;
  color: #ffe98a;
  text-shadow: 0 2px 10px rgba(255, 215, 120, 0.4);
}

#gem-info-panel p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.9);
  margin: 0 0 0.6rem;
}

/* Address + distance row */
.gem-location-row {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255,215,0,0.07);
  border-radius: 10px;
  border: 1px solid rgba(255,215,0,0.18);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
}

.gem-location-row .address-icon { flex-shrink: 0; }

.gem-location-row .address-text {
  flex: 1;
  min-width: 0;
  font-size: 0.83rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.4;
}

.gem-location-row .distance-text {
  flex-shrink: 0;
  font-size: 0.82rem;
  color: #7dd3fc;
  font-weight: 600;
  white-space: nowrap;
}

/* ---- Go button ---- */
#gem-go-btn {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: #007aff;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 15px rgba(0,122,255,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  display: none;
}

#gem-go-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0,122,255,0.55);
}

/* ---- Unlock button ---- */
#gem-unlock-btn {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: linear-gradient(135deg, #caa75c, #e0c27a);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  animation: unlockPulse 2s infinite;
  transition: all 0.2s ease;
  display: none;
}

#gem-unlock-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .gems-trailer-wrapper { height: 200px; }
  .gems-card            { width: 200px; height: 150px; }
  .gems-card.near-left  { left: calc(50% - 220px); }
  .gems-card.near-right { left: calc(50% + 20px); }
  .gems-card.far-left   { left: calc(50% - 430px); }
  .gems-card.far-right  { left: calc(50% + 230px); }
}
