   VER EDIFICIO
══════════════════════════════════════════════════════════════════════ */

/* Página contenedora ─────────────────────────────────────────────── */
#page-edificio {
  background: var(--h-dark);
  overflow: hidden;
}

/* Video full-frame (intro y transición) ─────────────────────────── */
.eb-video-full {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Intro ─────────────────────────────────────────────────────────── */
.eb-intro {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: var(--h-dark);
  transition: opacity .45s ease;
}

.eb-intro.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Visor ─────────────────────────────────────────────────────────── */
.eb-viewer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .3s ease;
}

.eb-viewer.visible {
  opacity: 1;
}

/* Slides ─────────────────────────────────────────────────────────── */
.eb-slides {
  position: absolute;
  inset: 0;
}

.eb-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .3s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.eb-slide.active {
  opacity: 1;
}

/* Capa de transición ────────────────────────────────────────────── */
.eb-transition {
  position: absolute;
  inset: 0;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.eb-transition.playing {
  opacity: 1;
  pointer-events: all;
}

/* Polígonos SVG ─────────────────────────────────────────────────── */
.eb-poly-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 6;
  cursor: pointer;
}

.eb-poly {
  fill: url(#ebPolyGrad);
  stroke: url(#ebPolyStrokeGrad);
  stroke-width: 4;
  opacity: 0;
  transition: fill .25s ease, stroke .25s ease, opacity .25s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Estado activo por JS (card visible) */
.eb-poly.active {
  fill: url(#ebPolyGradHover);
  stroke: url(#ebPolyStrokeGradHover);
  stroke-width: 4;
  opacity: 1;
}

/* Presión táctil momentánea */
.eb-poly:active {
  fill: rgba(59, 130, 246, .15);
  stroke: rgba(59, 130, 246, .8);
  stroke-width: 4;
  opacity: 1;
}

@media (hover: hover) {
  .eb-poly:hover {
    fill: url(#ebPolyGradHover);
    stroke: url(#ebPolyStrokeGradHover);
    stroke-width: 4;
    opacity: 1;
  }
}

/* Hexagon indicator */
.eb-hex-group {
  opacity: 1;
  pointer-events: none;
}

.eb-hex-shape {
  fill: rgba(140, 140, 140, 0);
  stroke: none;
  transition: fill .25s ease;
}

.eb-hex-ring {
  fill: none;
  stroke: rgba(255, 255, 255, .85);
  stroke-width: 5;
}

.eb-hex-dot {
  fill: var(--accent);
}

.eb-poly-layer.eb-hex-active .eb-hex-shape {
  fill: rgba(60, 60, 60, .58);
}

.eb-poly-layer.eb-no-pulse .eb-poly,
.eb-poly-layer.eb-no-pulse .eb-hex-group {
  display: none;
}

/* Botones de navegación ─────────────────────────────────────────── */
.eb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(10, 10, 10, .45);
  color: rgba(255, 255, 255, .8);
  -webkit-tap-highlight-color: transparent;
  transition: background .15s ease, color .15s ease;
}

.eb-nav:active {
  background: rgba(10, 10, 10, .7);
  color: #fff;
}

@media (hover: hover) {
  .eb-nav:hover {
    background: rgba(10, 10, 10, .65);
    color: #fff;
  }
}

.eb-nav-prev {
  left: 14px;
}

.eb-nav-next {
  right: 14px;
}

/* Contador (dots) ───────────────────────────────────────────────── */
.eb-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 7;
  display: flex;
  gap: 6px;
}

.eb-counter-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .3);
  transition: background .2s ease, transform .2s ease;
}

.eb-counter-dot.active {
  background: rgba(255, 255, 255, .85);
  transform: scale(1.25);
}

/* Card flotante ─────────────────────────────────────────────────── */
@keyframes ebCardSpring {
  0%   { opacity: 0; transform: scale(0.82) translateY(-6px); }
  60%  { opacity: 1; transform: scale(1.03) translateY(2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.eb-card {
  position: absolute;
  z-index: 8;
  width: min(230px, 78vw);
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.08);
  transform-origin: top center;
  animation: ebCardSpring .38s cubic-bezier(0.34,1.56,0.64,1) both;
}

.eb-card[hidden] {
  display: none;
}

.eb-card-accent {
  height: 3px;
  background: var(--accent-ink-1, #6B5F52);
}

.eb-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.eb-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.eb-card-label {
  font-size: .82rem;
  font-weight: 500;
  color: #111;
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eb-card-sub {
  font-size: .7rem;
  color: #999;
  letter-spacing: .01em;
  white-space: nowrap;
  flex-shrink: 0;
}

.eb-card-btn {
  display: block;
  width: 100%;
  padding: 9px 0;
  border-radius: 99px;
  background: var(--accent-ink-1, #6B5F52);
  color: #F5F1EB;
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .04em;
  text-align: center;
  transition: background .15s ease;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}

.eb-card-btn:active {
  background: var(--accent-btn, #2E2B27);
}

@media (hover: hover) {
  .eb-card-btn:hover {
    background: var(--accent-btn, #2E2B27);
  }
}

/* Vignette inferior ─────────────────────────────────────────────── */
#page-edificio::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, 0) 40%);
  z-index: 3;
  pointer-events: none;
}

/* Responsive ────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .eb-nav {
    width: 36px;
    height: 36px;
  }

  .eb-nav-prev {
    left: 10px;
  }

  .eb-nav-next {
    right: 10px;
  }
}

