/* ==========================================================================
   Fotostep.site - Panorámicas 360º & Vídeo Esférico (panoramas360.css)
   De los primeros artilugios y Egg360 al vídeo esférico 8K
   ========================================================================== */

:root {
  --360-cyan: #00e5ff;
  --360-cyan-glow: rgba(0, 229, 255, 0.4);
  --360-purple: #a855f7;
  --360-gold: #f59e0b;
  --360-bg-dark: #050d18;
  --360-card-bg: rgba(10, 24, 44, 0.75);
  --360-border: rgba(0, 229, 255, 0.25);
}

/* 360 Hero Section with slider001.jpg Background */
.hero-360 {
  position: relative;
  padding: calc(var(--header-height) + 4rem) 0 6rem;
  background-image: 
    linear-gradient(180deg, rgba(3, 8, 17, 0.82) 0%, rgba(5, 15, 29, 0.92) 100%),
    url('../../proyecto/360/slider001.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--360-border);
  overflow: hidden;
}

.hero-360-content {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}

.hero-360-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(0, 229, 255, 0.15);
  color: var(--360-cyan);
  border: 1px solid var(--360-cyan);
  box-shadow: 0 0 25px var(--360-cyan-glow);
  margin-bottom: 1.5rem;
}

.hero-360-title {
  font-size: clamp(2.5rem, 5.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero-360-subtitle {
  font-size: 1.25rem;
  color: #38bdf8;
  font-weight: 600;
  margin-bottom: 2rem;
}

.hero-360-manifesto {
  font-size: 1.1rem;
  line-height: 1.85;
  color: #cbd5e1;
  background: rgba(6, 17, 33, 0.8);
  backdrop-filter: blur(14px);
  border: 1px solid var(--360-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  text-align: left;
  box-shadow: var(--shadow-lg);
}

.hero-360-manifesto p {
  color: #94a3b8;
  margin-bottom: 1.25rem;
}

.hero-360-manifesto p:last-child {
  margin-bottom: 0;
}

/* Interactive 360 Equirectangular Viewer Container */
.viewer-360-section {
  padding: 5.5rem 0;
  background: #030812;
  position: relative;
}

.viewer-360-card {
  background: var(--360-card-bg);
  border: 1px solid var(--360-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg), 0 0 50px rgba(0, 229, 255, 0.15);
  position: relative;
  overflow: hidden;
}

.viewer-360-stage {
  position: relative;
  width: 100%;
  height: 580px;
  background: #040913;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0, 229, 255, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
  cursor: grab;
}

.viewer-360-stage:active {
  cursor: grabbing;
}

/* Three.js canvas fills the stage */
.viewer-360-stage canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100% !important;
  height: 100% !important;
}

/* ── Street View Controls ─────────────────── */
.pv-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.6rem;
  background: rgba(4, 13, 24, 0.88);
  backdrop-filter: blur(12px);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0, 229, 255, 0.4);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.18);
  z-index: 20;
}

.pv-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.pv-btn:hover {
  background: var(--360-cyan);
  color: #040d18;
  border-color: var(--360-cyan);
  box-shadow: 0 0 14px var(--360-cyan-glow);
}

.pv-btn.active {
  background: var(--360-cyan);
  color: #040d18;
  border-color: var(--360-cyan);
}

/* ── Loading Ring ─────────────────────────── */
.pv-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: rgba(4, 9, 19, 0.92);
  backdrop-filter: blur(8px);
  z-index: 30;
  color: var(--360-cyan);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  transition: opacity 0.4s;
}

.pv-loading[style*="none"] { display: none !important; }

.pv-loading-ring {
  width: 52px;
  height: 52px;
  border: 3px solid rgba(0, 229, 255, 0.2);
  border-top-color: var(--360-cyan);
  border-radius: 50%;
  animation: pvSpin 0.9s linear infinite;
}

@keyframes pvSpin {
  to { transform: rotate(360deg); }
}

/* Photo Switcher Thumbnails Bar */
.viewer-360-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.thumb-360-item {
  background: rgba(5, 14, 26, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.thumb-360-item:hover {
  border-color: var(--360-cyan);
  transform: translateY(-3px);
}

.thumb-360-item.active {
  border-color: var(--360-cyan);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
  background: rgba(0, 229, 255, 0.1);
}

.thumb-360-img {
  width: 70px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
}

.thumb-360-info h4 {
  font-size: 0.9rem;
  color: #ffffff;
  margin-bottom: 0.2rem;
}

.thumb-360-info p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Museum of 360 Cameras and Gizmos */
.museum-360-section {
  padding: 5.5rem 0;
  background: linear-gradient(180deg, #030812 0%, #061324 100%);
  border-top: 1px solid var(--360-border);
}

.museum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3.5rem;
}

.museum-card {
  background: var(--360-card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
}

.museum-card:hover {
  border-color: var(--360-cyan);
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), 0 0 25px rgba(0, 229, 255, 0.15);
}

.museum-img-wrapper {
  width: 100%;
  height: 220px;
  background: #02060d;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 1rem;
}

.museum-img-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform var(--transition-normal);
}

.museum-card:hover .museum-img-wrapper img {
  transform: scale(1.06);
}

.museum-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.museum-era-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--360-gold);
  margin-bottom: 0.5rem;
}

.museum-title {
  font-size: 1.25rem;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.museum-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 360 YouTube Video Showcase Section */
.video360-section {
  padding: 5.5rem 0;
  background: #020710;
  border-top: 1px solid var(--360-border);
}

.video360-card {
  background: var(--360-card-bg);
  border: 1px solid var(--360-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg), 0 0 45px rgba(0, 229, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ── YouTube 360 Stage ─────────────────────── */
.video360-stage-wrapper {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0, 229, 255, 0.35);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.85), 0 0 30px rgba(0, 229, 255, 0.1);
}

.video360-embed-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 480px;
  background: #000000;
}

.video360-embed-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Badge 360 */
.video360-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(4, 13, 24, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--360-cyan);
  color: var(--360-cyan);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.4);
  animation: pvSpin360Badge 6s linear infinite;
  pointer-events: none;
}

@keyframes pvSpin360Badge {
  0%, 100% { box-shadow: 0 0 12px rgba(0, 229, 255, 0.3); }
  50% { box-shadow: 0 0 22px rgba(0, 229, 255, 0.7); }
}

/* Drag Hint Overlay */
.video360-hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(4, 13, 24, 0.95) 0%, transparent 100%);
  pointer-events: none;
  z-index: 5;
  transition: opacity 0.4s;
}

.video360-hint-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.video360-hint-icon {
  color: var(--360-cyan);
  flex-shrink: 0;
  animation: pvHintPulse 2s infinite;
}

@keyframes pvHintPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.9); }
}

.video360-hint-text {
  color: rgba(255,255,255,0.9);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

/* ── Info Panel ────────────────────────────── */
.video360-info-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.video360-info-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.video360-era-tag {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--360-gold);
}

.video360-info-header h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.video360-info-panel > p {
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.75;
}

.video360-info-panel > p strong {
  color: var(--360-cyan);
}

/* Controls Guide Grid */
.video360-controls-guide {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.video360-guide-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  transition: border-color 0.2s, background 0.2s;
}

.video360-guide-item:hover {
  background: rgba(0, 229, 255, 0.07);
  border-color: rgba(0, 229, 255, 0.3);
}

.video360-guide-item svg {
  color: var(--360-cyan);
  flex-shrink: 0;
  margin-top: 2px;
}

.video360-guide-item > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.video360-guide-item strong {
  font-size: 0.82rem;
  color: #ffffff;
  font-weight: 700;
}

.video360-guide-item span {
  font-size: 0.75rem;
  color: #64748b;
}

/* ── Responsive ────────────────────────────── */
@media (max-width: 1024px) {
  .viewer-360-thumbs {
    grid-template-columns: 1fr;
  }
  .viewer-360-stage {
    height: 420px;
  }
  .video360-embed-wrapper {
    min-height: 340px;
  }
  .video360-controls-guide {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .video360-controls-guide {
    grid-template-columns: repeat(2, 1fr);
  }
  .video360-badge {
    font-size: 0.62rem;
  }
}

