/* ============================================================
   campus.css — Campus Landing Page Styles
   Extends styles.css · Dark theme · Mobile-first
   Only NEW sections not already covered by styles.css
   ============================================================ */

/* ----------------------------------------------------------
   1. CAMPUS HERO — Single image instead of carousel
   ---------------------------------------------------------- */
.campus-hero .hero-image-wrap {
  position: relative;
}

.campus-hero .hero-image-wrap .campus-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(0, 200, 83, 0.12);
}

/* Future: drone video background */
.campus-hero .hero-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}


/* ----------------------------------------------------------
   2. ESPACIO PLACEHOLDER — For cards without images yet
   ---------------------------------------------------------- */
.espacio-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #111827;
  text-align: center;
  padding: 24px;
  z-index: 1;
}

.espacio-placeholder span {
  font-family: 'Sora', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.espacio-placeholder small {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.2);
}

/* Inline viewer tabs inside card body */
.viewer-tabs-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

/* HOVER-TO-PLAY VIDEO OVERLAY */
.espacio-media-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

.espacio-media-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, opacity 0.4s ease;
}

.espacio-media-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.espacio-media-wrap.playing img {
  opacity: 0;
}

.espacio-media-wrap.playing video {
  opacity: 1;
}

.espacio-card:hover .espacio-media-wrap img {
  transform: scale(1.05);
}

/* Campus-specific: card body with subtitle */
.campus-espacios .espacio-card-body .espacio-subtitle {
  display: block;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}


/* ----------------------------------------------------------
   3. 360° VIEWER
   ---------------------------------------------------------- */
.viewer-360 {
  padding: 80px 0;
  background-color: #0a0f1a;
}

.viewer-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 36px;
  padding: 0 5%;
}

/* Tabs — pills style */
.viewer-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto 28px;
  padding: 0 5%;
}

.viewer-tab {
  padding: 10px 22px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: 'Sora', sans-serif;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.viewer-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.viewer-tab.active {
  background: #00c853;
  color: #fff;
  border-color: #00c853;
  font-weight: 600;
}

/* Canvas */
.viewer-canvas {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  aspect-ratio: 21 / 9;
  background: #111827;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 1340px) {
  .viewer-canvas {
    margin: 0 5%;
  }
}

.viewer-canvas iframe,
.viewer-canvas canvas {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Placeholder */
.viewer-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 24px;
}

.viewer-placeholder svg {
  opacity: 0.4;
  color: #00c853;
}

.viewer-placeholder h3 {
  font-family: 'Sora', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
}

.viewer-placeholder p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.35);
}

.viewer-placeholder small {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.25);
}

@media (min-width: 1024px) {
  .viewer-360 {
    padding: 100px 0;
  }
}


/* ----------------------------------------------------------
   4. RECORRIDO / VIDEO
   ---------------------------------------------------------- */
.campus-recorrido {
  padding: 80px 0;
  background-color: #0a0f1a;
}

.recorrido-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 40px;
  padding: 0 5%;
}

.recorrido-video-wrap {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  aspect-ratio: 21 / 9;
  background: #111827;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 1340px) {
  .recorrido-video-wrap {
    margin: 0 5%;
  }
}

.recorrido-video-wrap img,
.recorrido-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder with pulsing play */
.recorrido-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(
    135deg,
    rgba(10, 15, 26, 0.6) 0%,
    rgba(10, 15, 26, 0.3) 100%
  );
  z-index: 1;
}

.recorrido-placeholder svg {
  color: #00c853;
  filter: drop-shadow(0 0 20px rgba(0, 200, 83, 0.4));
  animation: pulsePlay 2s ease-in-out infinite;
  transition: transform 0.3s ease;
}

.recorrido-video-wrap:hover .recorrido-placeholder svg {
  transform: scale(1.1);
}

.recorrido-placeholder p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Sora', sans-serif;
  font-weight: 500;
}

@keyframes pulsePlay {
  0%, 100% {
    filter: drop-shadow(0 0 20px rgba(0, 200, 83, 0.4));
  }
  50% {
    filter: drop-shadow(0 0 40px rgba(0, 200, 83, 0.15));
  }
}

@media (min-width: 1024px) {
  .campus-recorrido {
    padding: 100px 0;
  }
}


/* ----------------------------------------------------------
   5. CAMPUS UBICACIÓN — Single location with map
   ---------------------------------------------------------- */
.campus-ubicacion {
  padding: 80px 0;
  background-color: #0a0f1a;
}

.campus-ubicacion .ubicacion-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
  padding: 0 5%;
}

.campus-ubicacion-layout {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 1280px;
  margin: 0 auto;
  background: #111827;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 1340px) {
  .campus-ubicacion-layout {
    margin: 0 5%;
  }
}

/* Map */
.campus-map {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.campus-map iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  filter: grayscale(0.3) brightness(0.85);
  transition: filter 0.3s ease;
}

.campus-map iframe:hover {
  filter: grayscale(0) brightness(1);
}

/* Info */
.campus-info {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.campus-info h3 {
  font-family: 'Sora', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.campus-address {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.6;
}

.campus-address svg {
  flex-shrink: 0;
  color: #00c853;
  margin-top: 2px;
}

.campus-info-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.campus-info-actions .btn-ubi {
  padding: 12px 24px;
  font-size: 0.9rem;
}

/* Desktop: side-by-side */
@media (min-width: 768px) {
  .campus-ubicacion-layout {
    flex-direction: row;
  }

  .campus-map {
    flex: 0 0 55%;
    aspect-ratio: auto;
    min-height: 360px;
  }

  .campus-info {
    flex: 1;
    justify-content: center;
    padding: 32px;
  }
}

@media (min-width: 1024px) {
  .campus-ubicacion {
    padding: 100px 0;
  }

  .campus-map {
    flex: 0 0 60%;
    min-height: 420px;
  }

  .campus-info {
    padding: 40px;
  }
}


/* ----------------------------------------------------------
   UTILITY: Fade-in on scroll (JS-driven)
   ---------------------------------------------------------- */
.campus-fade-in {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.campus-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
