/* === CIRCULAR GALLERY SECTION === */

.section-circular-gallery {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: clamp(72px, 10vh, 120px);
  padding-bottom: clamp(40px, 6vh, 72px);
  overflow: hidden;
  background:
    radial-gradient(ellipse 65% 55% at 50% 62%,
      rgba(200, 169, 126, 0.18) 0%,
      rgba(160, 120, 70, 0.08) 45%,
      rgba(10, 10, 10, 0) 100%),
    radial-gradient(ellipse 90% 70% at 50% 62%,
      rgba(28, 58, 58, 0.35) 0%,
      rgba(10, 10, 10, 0) 100%),
    var(--bg);
}

/* Header */
.cg-header {
  position: relative;
  text-align: center;
  z-index: 30;
  margin-bottom: clamp(32px, 6vh, 56px);
  flex-shrink: 0;
}
.cg-header .label { margin-bottom: 12px; }
.cg-header .section-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 0;
}

/* 3D scene */
.cg-scene {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 2000px;
  min-height: 0;
}

/* The rotating ring */
.cg-ring {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

/* Each card slot in 3D space */
.cg-item {
  position: absolute;
  width: 300px;
  height: 400px;
  left: 50%;
  top: 50%;
  margin-left: -150px;
  margin-top: -200px;
  pointer-events: none;
}
.cg-item.is-front {
  pointer-events: auto;
  z-index: 10;
}

/* The visual card (anchor) */
.cg-card {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(245, 240, 235, 0.08);
  background: rgba(22, 22, 22, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-decoration: none;
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s, border-color 0.45s;
  cursor: pointer;
}
.cg-item.is-front .cg-card {
  transform: scale(1.11);
  box-shadow: 0 50px 120px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(200, 169, 126, 0.25);
  border-color: rgba(200, 169, 126, 0.3);
}
.cg-item.is-front .cg-card:hover {
  transform: scale(1.14);
  box-shadow: 0 60px 140px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(200, 169, 126, 0.4);
}
.cg-card:hover {
  transform: scale(1.04);
  box-shadow: 0 36px 80px rgba(0, 0, 0, 0.75);
  border-color: rgba(200, 169, 126, 0.2);
}

/* Photo area */
.cg-card-photo {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
}
.cg-card-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease-out);
}
.cg-card:hover .cg-card-photo img {
  transform: scale(1.04);
}

/* Text panel below photo */
.cg-card-body {
  flex-shrink: 0;
  padding: 16px 18px 18px;
  background: rgba(12, 12, 12, 0.97);
  border-top: 1px solid rgba(200, 169, 126, 0.15);
  color: var(--text);
}
.cg-card-body h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 4px;
}
.cg-card-body span {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.85;
}
.cg-card-cta {
  margin-top: 8px;
  font-size: 0.66rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s, transform 0.25s;
}
.cg-card:hover .cg-card-cta {
  opacity: 1;
  transform: translateY(0);
}

/* Navigation arrows */
.cg-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(245, 240, 235, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  background: rgba(10, 10, 10, 0.4);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  cursor: pointer;
}
.cg-arrow:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(200, 169, 126, 0.08);
}
.cg-arrow--prev { left: clamp(16px, 4vw, 60px); }
.cg-arrow--next { right: clamp(16px, 4vw, 60px); }

/* Responsive */
@media (max-width: 768px) {
  .cg-item {
    width: 230px;
    height: 310px;
    margin-left: -115px;
    margin-top: -155px;
  }
  .cg-card-body h3 { font-size: 1rem; }
  .cg-arrow { width: 40px; height: 40px; }
  .cg-arrow--prev { left: 12px; }
  .cg-arrow--next { right: 12px; }
}
