/* ==========================================================================
   Simulation 3D DNA Helix — no wrappers, just images
   ========================================================================== */

.spiral-gallery {
  position: relative;
  width: 100%;
  min-height: 80vh;
  margin: 0;
  overflow: visible;
  perspective: 1000px;
  perspective-origin: 50% 50%;
  transform-style: preserve-3d;
  padding: 1em 0;
}

/* ── Central axis glow ── */
.helix-axis {
  position: absolute;
  top: 50%; left: 50%;
  width: 1px; height: 55vh;
  margin-left: -0.5px; margin-top: -27.5vh;
  background: linear-gradient(to bottom,
    transparent 0%, rgba(255,99,99,0.10) 10%,
    rgba(255,99,99,0.28) 50%,
    rgba(168,85,247,0.10) 90%, transparent 100%);
  pointer-events: none; z-index: 0;
}

/* ── Item wrapper — positioned on helix ── */
.spiral-item-wrapper {
  position: absolute;
  left: 50%; top: 50%;
  width: 0; height: 0;
  transform-style: preserve-3d;
}

/* ── Item card — just image + label, no background panel ── */
.spiral-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: filter 0.3s ease;
  will-change: transform;
}

.spiral-item:hover {
  z-index: 500 !important;
  filter: brightness(1.3) drop-shadow(0 0 16px rgba(255,99,99,0.4));
}

/* ── Image — bare, no container, no bg ── */
.spiral-item__img {
  display: block;
  max-width: 240px;
  max-height: 170px;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 8px;
  transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.spiral-item:hover .spiral-item__img {
  box-shadow: 0 18px 60px rgba(255,99,99,0.3);
  transform: scale(1.15);
}

/* ── Label ── */
.spiral-item__label {
  font-family: 'Inter',sans-serif;
  font-size: 0.65em; font-weight: 500;
  color: rgba(255,255,255,0.55);
  text-align: center; max-width: 300px;
  line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color 0.3s ease;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.spiral-item:hover .spiral-item__label { color: #FFFFFF; }

/* ── Hint ── */
.spiral-hint {
  text-align: center; padding: 0.6em 0 0;
  font-family: 'Inter',sans-serif; font-size: 0.78em;
  color: rgba(255,255,255,0.22); letter-spacing: 0.04em;
  animation: hintPulse 4s ease-in-out infinite;
  position: relative; z-index: 5;
}
@keyframes hintPulse { 0%,100%{opacity:0.2} 50%{opacity:0.55} }

/* ── Section labels ── */
.spiral-section-label {
  position: absolute; z-index: 2;
  font-family: 'Inter Tight','Inter',sans-serif;
  font-size: 0.68em; font-weight: 600;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: rgba(255,255,255,0.18); pointer-events: none;
}

/* ── Modal ── */
.spiral-modal-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(5,5,8,0.88);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  display: flex; align-items: center; justify-content: center;
  animation: overlayIn 0.3s ease; cursor: pointer;
}
@keyframes overlayIn { from{opacity:0} to{opacity:1} }
.spiral-modal {
  position: relative; max-width: min(900px,92vw); max-height: 90vh;
  background: rgba(22,22,28,0.95);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  overflow: hidden; cursor: default;
  animation: modalIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalIn { from{opacity:0;transform:scale(0.85) translateY(20px)} to{opacity:1;transform:scale(1) translateY(0)} }
.spiral-modal__image { width:100%; max-height:65vh; object-fit:contain; display:block; background:rgba(0,0,0,0.3); }
.spiral-modal__info { padding:1.25em 1.75em; display:flex; align-items:center; justify-content:space-between; gap:1em; flex-wrap:wrap; }
.spiral-modal__title { font-family:'Inter Tight','Inter',sans-serif; font-size:1.1em; font-weight:600; color:#FFF; letter-spacing:-0.01em; flex:1; }
.spiral-modal__actions { display:flex; gap:0.5em; flex-shrink:0; }
.spiral-modal__btn { display:inline-flex; align-items:center; gap:0.4em; padding:0.5em 1.1em; font-size:0.82em; font-weight:600; text-decoration:none; border-radius:8px; transition:all 0.2s ease; cursor:pointer; }
.spiral-modal__btn--pdf { background:rgba(255,99,99,0.12); color:#FF8585; border:1px solid rgba(255,99,99,0.2); }
.spiral-modal__btn--pdf:hover { background:rgba(255,99,99,0.2); color:#FFABAB; }
.spiral-modal__btn--close { background:rgba(255,255,255,0.05); color:rgba(255,255,255,0.6); border:1px solid rgba(255,255,255,0.08); }
.spiral-modal__btn--close:hover { background:rgba(255,255,255,0.1); color:#FFF; }
.spiral-modal__close {
  position:absolute; top:12px; right:12px; width:36px; height:36px;
  border-radius:50%; background:rgba(0,0,0,0.5);
  border:1px solid rgba(255,255,255,0.1); color:rgba(255,255,255,0.7);
  font-size:1.2em; display:flex; align-items:center; justify-content:center;
  cursor:pointer; z-index:2; transition:all 0.2s ease;
  backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
}
.spiral-modal__close:hover { background:rgba(255,99,99,0.3); color:#FFF; }

/* ── Responsive — 3D on all screens ── */
@media (max-width:768px) {
  .spiral-gallery { min-height:55vh; perspective:800px; perspective-origin:50% 50%; padding:0.5em 0; }
  .spiral-item__img { max-width:150px; max-height:105px; }
  .spiral-item__label { font-size:0.5em; max-width:150px; }
}
@media (max-width:480px) {
  .spiral-gallery { min-height:70vh; perspective:600px; perspective-origin:50% 50%; padding:2.5em 0; }
  .spiral-item__img { max-width:110px; max-height:75px; }
  .spiral-item__label { font-size:0.45em; max-width:110px; }
  .helix-axis { height:40vh; margin-top:-20vh; }
  .spiral-hint { font-size:0.65em; }
}
