/* Presentación cinematográfica del proyecto · Estilo High Garden / Huertos del Carmen */
/* v20261103b — eliminar barra blanca, marcadores sin cuadro, diseño fiel a la referencia */

/* Ocultar elementos del visor mientras la presentación está activa */
body.hero-visible .tour-topbar,
body.hero-visible .viewer-tools,
body.hero-visible .tour-bottom,
body.hero-visible .tour-notice,
body.hero-visible #explorer {
  visibility: hidden !important;
  pointer-events: none !important;
}

.hero-presentation {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100;
  overflow: hidden;
  background: #061410;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
}

.hero-presentation[hidden] {
  display: none !important;
}

.hero-presentation.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Vista del mapa satelital de fondo */
.hero-map-viewport {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  z-index: 1;
  pointer-events: none;
  animation: earthZoomOut 32s cubic-bezier(0.2, 0.9, 0.3, 1) infinite alternate;
  will-change: transform;
}

/* En modo presentación (fondo satelital), OCULTAR todos los puntos, etiquetas, radares y controles de Leaflet */
.hero-presentation:not(.interactive-map) .hero-map-viewport .leaflet-marker-pane,
.hero-presentation:not(.interactive-map) .hero-map-viewport .leaflet-overlay-pane,
.hero-presentation:not(.interactive-map) .hero-map-viewport .leaflet-shadow-pane,
.hero-presentation:not(.interactive-map) .hero-map-viewport .leaflet-control-zoom,
.hero-presentation:not(.interactive-map) .hero-map-viewport .leaflet-control-container,
.hero-presentation:not(.interactive-map) .hero-map-viewport .tour-map-marker,
.hero-presentation:not(.interactive-map) .hero-map-viewport .marker-radar,
.hero-presentation:not(.interactive-map) .hero-map-viewport .marker-label {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#heroMap .leaflet-top.leaflet-right,
#heroMap .leaflet-control-zoom {
  display: none !important;
}

/* Cuando el usuario entra en modo mapa interactivo */
.hero-presentation.interactive-map .hero-map-viewport {
  inset: 0;
  width: 100%;
  height: 100%;
  animation: none;
  pointer-events: auto;
}

/* Animación de la tierra alejándose (Ken Burns zoom-out continuo) */
@keyframes earthZoomOut {
  0% {
    transform: scale(1.28) translate(0, 0);
  }
  50% {
    transform: scale(1.12) translate(-0.8%, -0.5%);
  }
  100% {
    transform: scale(1.0) translate(-1.2%, -1%);
  }
}

/* Viñeta cinematográfica semitransparente sobre el satélite */
.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(16, 42, 30, 0.38) 0%, rgba(9, 24, 17, 0.78) 75%, rgba(6, 18, 12, 0.92) 100%);
  transition: opacity 0.4s ease;
}

.hero-presentation.interactive-map .hero-vignette {
  opacity: 0.15;
}

/* Barra superior — solo botón de cierre sutil flotante en la esquina */
.hero-top {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  padding: 24px 32px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  pointer-events: none;
  box-sizing: border-box;
}

/* Ocultar por si acaso queda algún logo residual */
.hero-top-logo {
  display: none !important;
}

.hero-close-btn {
  position: relative;
  right: auto;
  top: auto;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 50%;
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.hero-close-btn:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  transform: scale(1.06);
}

/* Contenido central — centrado absoluto exacto en pantalla (tanto en ancho como en alto) */
.hero-center {
  margin: auto;
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 860px;
  padding: 0 24px;
  box-sizing: border-box;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.hero-presentation.interactive-map .hero-center {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.95);
}

.hero-eyebrow {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(225, 240, 230, 0.9);
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(42px, 6.2vw, 76px);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.1;
  color: #ffffff;
  margin: 0 0 22px;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.85);
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* Divisor ornamental */
.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  max-width: 180px;
  margin-bottom: 26px;
  color: rgba(255, 255, 255, 0.7);
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}

.divider-icon {
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.4));
}

/* Contenedor de botones gemelos (Ver mapa | Iniciar Tour 360) */
.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.hero-btn {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  padding: 13px 30px;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  min-height: 46px;
  box-sizing: border-box;
}

/* Botón 1: Verde esmeralda sólido */
.hero-btn-primary {
  background: #16864d;
  color: #ffffff;
  border: 1px solid #22c55e;
}

.hero-btn-primary:hover,
.hero-btn-primary:focus-visible {
  background: #1bb065;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(27, 176, 101, 0.45);
}

/* Botón 2: Cristal glassmorphism con borde blanco */
.hero-btn-glass {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hero-btn-glass:hover,
.hero-btn-glass:focus-visible {
  background: rgba(255, 255, 255, 0.24);
  border-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

/* Enlace secundario "CONOCER EL PROYECTO" */
.hero-sublink {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(235, 245, 238, 0.85);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 14px;
  margin-top: 4px;
  transition: color 0.2s, letter-spacing 0.2s;
}

.hero-sublink:hover,
.hero-sublink:focus-visible {
  color: #ffffff;
  letter-spacing: 0.24em;
  text-decoration: underline;
}

/* Barra flotante cuando se está en modo mapa interactivo */
.hero-map-toolbar {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(14, 38, 28, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
  padding: 6px 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hero-presentation.interactive-map .hero-map-toolbar {
  opacity: 1;
  pointer-events: auto;
}

.hero-map-toolbar button {
  font-family: Inter, -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 550;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  padding: 7px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, border-color 0.2s;
}

.hero-map-toolbar button:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: #ffffff;
}

.hero-map-toolbar button.btn-tour-callout {
  background: #16864d;
  border-color: #22c55e;
}

.hero-map-toolbar button.btn-tour-callout:hover {
  background: #1bb065;
}

/* Pie inferior — pegado al fondo */
.hero-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 24px;
  font-family: Inter, -apple-system, sans-serif;
  text-align: center;
}

.hero-footer-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.hero-footer-brand {
  font-size: 9px;
  font-weight: 550;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(220, 235, 226, 0.75);
}

.hero-footer-esc {
  font-size: 8px;
  font-weight: 550;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(220, 235, 226, 0.55);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 8px;
}

.hero-footer-esc:hover {
  color: #ffffff;
}

/* Atribución oficial de Esri | OpenStreetMap en la esquina */
.hero-map-viewport .leaflet-control-attribution {
  font-size: 8px !important;
  background: rgba(10, 28, 20, 0.75) !important;
  color: #d2e4d7 !important;
  padding: 3px 8px !important;
  border-radius: 4px 0 0 0 !important;
}

.hero-map-viewport .leaflet-control-attribution a {
  color: #86efac !important;
  text-decoration: none;
}

/* Botón de acceso a la presentación desde el recorrido activo */
.btn-back-hero {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  font-size: 11px !important;
  padding: 7px 14px !important;
  border-radius: 8px !important;
  cursor: pointer;
}

/* Adaptación responsive */
@media (max-width: 768px) {
  .hero-top {
    padding: 16px 20px;
  }
  .hero-close-btn {
    right: 20px;
    top: 16px;
    width: 36px;
    height: 36px;
  }
  .hero-center {
    padding: 12px 18px;
  }
  .hero-title {
    font-size: clamp(32px, 9vw, 48px);
    margin: 4px 0 12px;
  }
  .hero-eyebrow {
    font-size: 9.5px;
    letter-spacing: 0.22em;
  }
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
    gap: 10px;
  }
  .hero-btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 12.5px;
  }
  .hero-map-toolbar {
    top: 14px;
    width: calc(100% - 32px);
    justify-content: center;
    padding: 6px 10px;
    flex-wrap: wrap;
  }
  .hero-map-toolbar button {
    font-size: 9.5px;
    padding: 5px 10px;
  }
  .hero-footer-brand {
    font-size: 7.5px;
    letter-spacing: 0.16em;
  }
}

@media (max-width: 360px) {
  .hero-title {
    font-size: 28px;
  }
  .hero-btn {
    font-size: 11.5px;
    padding: 10px 16px;
    min-height: 42px;
  }
}

