/* VARIABLES DE COLOR */
:root {
  --primary: #0c056d;     /* Azul oscuro */
  --secondary: #00CFC8;   /* Gradiente turquesa-azul */
  --accent: #03fff6;      /* Turquesa claro */
  --accent-dark: #009c97; /* Verde azulado */
  --light: #ffffff;       /* Blanco */
  --light-gray: #e6e6e6;  /* Gris claro */
}

/* General */
body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: 'Arial', sans-serif;
  background-color: var(--light);
  color: var(--primary);
}

/* Viewer-specific background overrides */
body.location-viewer-active,
html.location-viewer-active {
  background-color: #000 !important;
}

body.floor-viewer-active,
html.floor-viewer-active {
  background-color: #000 !important;
}

/* Solo aplicar overflow: hidden a la página del visor de proyectos */
.project-viewer-page {
  overflow: hidden;
}

/* Pantalla de introducción */
.intro {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 20;
}

.intro-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.intro-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 10;
}

.intro-logo {
  max-width: 50%;
  height: auto;
  margin-bottom: 20px;
  filter: drop-shadow(0px 4px 6px rgba(255, 255, 255, 0.7));
}

.intro-button {
  padding: 15px 40px;
  font-size: 20px;
  background-color: white;
  color: black;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

.intro-button:hover {
  background-color: #f0f0f0;
  box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.2);
}

.intro-button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
  box-shadow: none;
}

/* Carrusel interactivo */
.container, #main-content {
  position: fixed;
  width: 100%;
  height: 100%;
  display: none; /* Inicialmente oculto, se cambia a flex con JavaScript */
  align-items: center;
  justify-content: center;
  top: 0;
  left: 0;
  z-index: 10;
}

.media {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  top: 0;
  left: 0;
}

.media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media.active {
  opacity: 1;
  z-index: 5;
}

/* Botones de navegación */
.nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: #2c3e50;
  color: white;
  border: none;
  padding: 15px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.nav-button:hover {
  background-color: #34495e;
  box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.3);
}

.nav-prev {
  left: 20px;
}

.nav-next {
  right: 20px;
}

.nav-button svg {
  width: 18px;
  height: 18px;
  fill: white;
}

/* Botón de regreso */
.back-button {
  top: 30px;
  left: 30px;
  position: fixed;
  z-index: 100;
}

/* Popup de orientación */
.orientation-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.popup-content {
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  max-width: 80%;
}

.rotate-icon {
  font-size: 40px;
  margin-bottom: 15px;
  animation: rotate 2s infinite;
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  50% { transform: rotate(90deg); }
  100% { transform: rotate(0deg); }
}

#understand-btn {
  background-color: #2c3e50;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  margin-top: 15px;
  cursor: pointer;
  font-size: 16px;
}

#understand-btn:hover {
  background-color: #34495e;
}

/* Ver Plantas, Ver Ubicación, Ver Renders y Recorridos 360° Buttons - Updated 2025-06-17 */
.ver-plantas-btn, .ver-ubicacion-btn, .renders-btn, .recorridos-360-btn {
  position: fixed;
  background-color: white;
  color: #2c3e50;
  border: none;
  padding: 12px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 100;
  height: 44px;
  min-width: 140px;
  max-width: 160px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

/* Button positioning - Industry Standard: Mobile First Approach */
.ver-ubicacion-btn {
  top: 20px;
  right: 320px; /* Optimized spacing for consistent button layout */
}

.ver-plantas-btn {
  top: 20px;
  right: 170px; /* Uniform spacing between buttons */
}

.renders-btn {
  top: 20px;
  right: 20px; /* Right margin for visual balance */
}

.recorridos-360-btn {
  top: 20px;
  right: 470px; /* Sufficient space to prevent overlap */
  background-color: white;
  color: #2c3e50;
}

.ver-plantas-btn:hover, .ver-ubicacion-btn:hover, .renders-btn:hover, .recorridos-360-btn:hover {
  background-color: #f5f5f5;
}

/* Location Viewer, Floor Viewer y Render Viewer - Enhanced */
.location-viewer, .floor-viewer, .render-viewer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000; /* Fondo negro simple, sin gradiente azul */
  z-index: 90;
  transition: opacity 0.3s ease;
  overflow: hidden;
}

.location-viewer.active, .floor-viewer.active, .render-viewer.active {
  display: flex;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Floor Viewer y Render Viewer - Desktop Layout: Solo sidebar izquierdo */
.floor-viewer-layout, .render-viewer-layout {
  display: flex;
  width: 100%;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  background: #000;
}

/* Desktop: Solo mostrar sidebar izquierdo */
@media (min-width: 769px) {
  .floor-viewer-layout, .location-viewer-layout, .render-viewer-layout {
    display: flex;
  }

  .floor-sidebar, .location-sidebar {
    display: flex !important;
    width: 100px;
  }

  .mobile-floor-nav, .mobile-location-nav {
    display: none !important;
  }
}

/* Sidebar styling - Compartido entre Floor, Location y Render */
.floor-sidebar, .location-sidebar, .render-sidebar {
  width: 100px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  gap: 10px;
  position: relative;
  z-index: 100;
}

/* Close button styling - Compartido entre Floor, Location y Render */
.close-floor-viewer, .close-location-viewer, .close-render-viewer {
  position: fixed;
  top: 30px;
  left: 30px;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transition: all 0.2s ease;
  width: 50px;
  height: 50px;
  z-index: 10001;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.close-floor-viewer:hover, .close-location-viewer:hover, .close-render-viewer:hover {
  background-color: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

/* Navigation button containers */
.floor-nav-numbers, .location-nav-buttons, .render-nav-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

/* Navigation buttons - Compartido entre Floor, Location y Render */
.floor-nav-btn, .location-nav-btn, .render-nav-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 60px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  text-align: center;
  line-height: 1.2;
}

.floor-nav-btn:hover, .location-nav-btn:hover, .render-nav-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateX(5px);
}

.floor-nav-btn.active, .location-nav-btn.active, .render-nav-btn.active {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Main content area - Compartido entre Floor, Location y Render */
.floor-main-content, .location-main-content, .render-main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Header styling - Compartido entre Floor, Location y Render */
.floor-header, .location-header, .render-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 150;
  padding: 20px 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(to bottom, rgba(0,0,0,0.4), transparent);
  pointer-events: none;
}

.floor-header > *, .location-header > *, .render-header > * {
  pointer-events: auto;
}

.floor-title, .location-title, .render-title {
  color: white;
  font-size: 28px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  margin: 0;
}

/* Container styling - Compartido entre Floor, Location y Render */
.floor-container, .location-container, .render-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.floor-image-container, .location-image-container, .render-image-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  max-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  background: #000;
}

/* Imágenes dentro de los contenedores - Con zoom y pan */
.floor-image-container img, .location-image-container img, .render-image-container img {
  max-width: 100%;
  max-height: 100vh;
  width: auto;
  height: 100vh;
  object-fit: contain;
  cursor: grab;
  transition: transform 0.2s ease;
  transform-origin: center center;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  display: block;
}

.floor-image-container img:active, .location-image-container img:active, .render-image-container img:active {
  cursor: grabbing;
}

/* Controles de zoom flotantes */
.zoom-controls {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
}

.zoom-btn {
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.zoom-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

.zoom-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Enlace a Google Maps */
.maps-link {
  position: fixed;
  bottom: 30px;
  left: 30px;
  background: #4285f4;
  color: white;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.maps-link:hover {
  background: #3367d6;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(66, 133, 244, 0.4);
}

@media (max-width: 1024px) {
  .floor-container {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
  }

  .floor-image-container {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
  }
}

#floor-image {
  max-width: 100%;
  max-height: 100vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
  cursor: grab;
}

#floor-image:active {
  cursor: grabbing;
}

#floor-image.max-zoom {
  cursor: zoom-out;
}

#floor-image.min-zoom {
  cursor: zoom-in;
}



/* Estilos movidos a la sección de "Indicadores de carga" para evitar duplicación */

.floor-nav {
  display: flex;
  flex-direction: row;
  gap: 10px;
  background-color: white;
  padding: 15px;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  width: fit-content;
  flex-wrap: wrap;
  justify-content: center;
}

.floor-btn {
  background-color: white;
  color: #2c3e50;
  border: 2px solid #2c3e50;
  padding: 8px 16px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.floor-btn:hover {
  background-color: #2c3e50;
  color: white;
  transform: translateY(-3px);
}

.floor-btn.active {
  background-color: #2c3e50;
  color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}



@media (max-width: 768px) {
  /* Mobile fullscreen floor viewer */
  .floor-viewer {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #000 !important;
  }

  .floor-viewer-layout {
    width: 100vw !important;
    height: 100vh !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .floor-sidebar {
    display: none !important;
  }

  .floor-main-content {
    width: 100vw !important;
    height: 100vh !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .floor-header {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 200 !important;
    padding: 10px 15px !important;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent) !important;
  }

  .floor-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .floor-image-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    background: #000 !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
    /* Hide scrollbars but maintain functionality */
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  .floor-image-container::-webkit-scrollbar {
    display: none !important;
  }

  #floor-image {
    height: 100vh !important;
    width: auto !important;
    min-width: 100vw !important;
    max-width: none !important;
    max-height: 100vh !important;
    object-fit: cover !important;
    object-position: center center !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    flex-shrink: 0 !important;
  }

  .close-floor-viewer {
    position: fixed !important;
    top: 1rem !important;
    right: 1rem !important;
    background: rgba(0, 0, 0, 0.8) !important;
    color: white !important;
    border: none !important;
    padding: 12px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    z-index: 9999 !important;
    width: 48px !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.2s ease !important;
  }

  .close-floor-viewer:hover {
    background: rgba(0, 0, 0, 0.9) !important;
    transform: scale(1.1) !important;
  }

  .close-floor-viewer i {
    font-size: 18px !important;
  }



  .floor-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9997 !important;
    padding: 20px 80px 20px 80px !important;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), rgba(0,0,0,0.4), transparent) !important;
    pointer-events: none !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .floor-title {
    color: white !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8) !important;
    margin: 0 !important;
    padding: 8px 16px !important;
    background: rgba(0, 0, 0, 0.5) !important;
    border-radius: 12px !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    pointer-events: auto !important;
    text-align: center !important;
  }



  /* Hide sidebar navigation on mobile, show mobile navigation instead */
  .floor-sidebar, .location-sidebar {
    display: none !important;
  }

  .floor-nav-btn, .location-nav-btn {
    display: none !important;
  }

  /* 
   * Mobile navigation rules moved to mobile-components.css
   * Using modern design token system with safe area support
   * REMOVED: Duplicate and conflicting rules
   */

  /* Ocultar controles de zoom en móvil para evitar interferencias */
  .zoom-controls {
    display: none !important;
  }

  /* Ocultar enlace de Google Maps flotante en móvil (usar solo header) */
  .maps-link {
    display: none !important;
  }

  /* Botón de cierre para móvil */
  .close-floor-viewer, .close-location-viewer {
    top: 20px !important;
    right: 20px !important;
    width: 44px !important;
    height: 44px !important;
  }

  /* Location viewer móvil - EXACTAMENTE igual al visor de plantas */
  .location-viewer {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #000 !important;
  }

  .location-viewer-layout {
    width: 100vw !important;
    height: 100vh !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .location-sidebar {
    display: none !important;
  }

  .location-main-content {
    width: 100vw !important;
    height: 100vh !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .location-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9997 !important;
    padding: 20px 80px 20px 80px !important;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), rgba(0,0,0,0.4), transparent) !important;
    pointer-events: none !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .location-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .location-image-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    background: #000 !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
    /* Hide scrollbars but maintain functionality */
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    touch-action: none !important;
  }

  .location-image-container::-webkit-scrollbar {
    display: none !important;
  }

  #location-image {
    height: 100vh !important;
    width: auto !important;
    min-width: 100vw !important;
    max-width: none !important;
    max-height: 100vh !important;
    object-fit: cover !important;
    object-position: center center !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    flex-shrink: 0 !important;
    border-radius: 0 !important;
    touch-action: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: transparent !important;
    cursor: grab !important;
  }

  #location-image:active {
    cursor: grabbing !important;
  }

  .close-location-viewer {
    position: fixed !important;
    top: 1rem !important;
    left: 1rem !important;
    background: rgba(0, 0, 0, 0.8) !important;
    color: white !important;
    border: none !important;
    padding: 12px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    z-index: 9999 !important;
    width: 48px !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.2s ease !important;
  }

  .close-location-viewer:hover {
    background: rgba(0, 0, 0, 0.9) !important;
    transform: scale(1.1) !important;
  }

  .location-title {
    color: white !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8) !important;
    margin: 0 !important;
    padding: 8px 16px !important;
    background: rgba(0, 0, 0, 0.5) !important;
    border-radius: 12px !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    pointer-events: auto !important;
    text-align: center !important;
  }

  .maps-link-header {
    font-size: 12px !important;
    padding: 6px 12px !important;
  }

  /* 
   * REMOVED: Mobile location navigation rules moved to mobile-components.css
   * Eliminates position: absolute vs fixed conflict that caused visibility issues on mobile
   */
}

/* Location Viewer - Estructura idéntica a Floor Viewer */
.location-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000; /* Fondo negro simple, igual que floor viewer */
  z-index: 10000;
  display: none;
  overflow: hidden;
}

.location-viewer.active {
  display: flex;
}

.location-viewer-layout {
  display: flex;
  width: 100%;
  height: 100%;
  background: #000; /* Fondo negro consistente */
}

.location-main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: #000; /* Sin gradientes, fondo negro sólido */
}

.location-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 150;
  padding: 20px 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(to bottom, rgba(0,0,0,0.4), transparent);
  pointer-events: none;
}

.location-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  background: #000; /* Fondo negro sin transparencias */
}

.location-image-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  max-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  background: #000; /* Fondo negro sólido */
}

.location-title {
  color: white;
  font-size: 28px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  margin: 0;
}

#location-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: grab;
  transition: transform 0.2s ease;
  transform-origin: center center;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  border-radius: 0; /* Sin bordes redondeados */
  box-shadow: none; /* Sin sombras que creen franjas */
}

#location-image:active {
  cursor: grabbing;
}

.maps-link-header {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.maps-link-header:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Navigation sidebar para location */
.location-sidebar {
  width: 150px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  gap: 10px;
  position: relative;
  z-index: 100;
}

.location-nav-numbers {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  justify-content: center;
}

.location-nav-btn {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 12px 8px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  min-width: 120px;
  width: 120px;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.location-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.location-nav-btn.active {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.location-image-container {
  position: relative;
  width: 100%;
  height: 100vh;
  max-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  background: #000;
}

#location-image {
  max-width: 100%;
  max-height: 100vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
  cursor: grab;
  transform-origin: center center;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  padding: 0;
}

.location-image-description {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 15px;
  border-radius: 10px;
  max-width: 350px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  z-index: 5;
}

.location-image-description h3 {
  margin-top: 0;
  color: #2c3e50;
  font-size: 18px;
}

.location-image-description p {
  color: #7f8c8d;
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.4;
}

.location-nav {
  display: flex;
  flex-direction: row;
  gap: 10px;
  background-color: rgba(0, 0, 0, 0.75);
  padding: 15px;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  width: fit-content;
  flex-wrap: wrap;
  justify-content: center;
}

.location-btn {
  background-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 8px 16px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.location-btn:hover {
  background-color: #2c3e50;
  color: white;
  transform: translateY(-3px);
}

.location-btn.active {
  background-color: #2c3e50;
  color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.google-maps-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background-color: rgba(0, 0, 0, 0.75);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  z-index: 5;
  transition: all 0.2s ease;
}

.google-maps-btn:hover {
  background-color: #f5f5f5;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.google-maps-btn svg {
  width: 16px;
  height: 16px;
  fill: #2c3e50;
}

@media (max-width: 1024px) {
  .location-container {
    width: 95%;
    height: 80vh;
  }

  .location-image-container {
    width: 100%;
    height: calc(80vh - 120px);
  }
}

@media (max-width: 768px) {
  .location-container {
    width: 100%;
    height: 75vh;
  }

  .location-image-container {
    padding: 15px;
    height: calc(75vh - 130px);
  }

  .location-title {
    font-size: 18px;
    padding: 8px 16px;
  }

  .location-image-description {
    max-width: 250px;
    padding: 10px;
    bottom: 15px;
    left: 15px;
  }

  .location-image-description h3 {
    font-size: 16px;
    margin-bottom: 5px;
  }

  .location-image-description p {
    font-size: 12px;
  }

  .google-maps-btn {
    font-size: 12px;
    padding: 8px 16px;
    right: 15px;
    bottom: 15px;
  }

  /* FORCE EXACT BUTTON UNIFORMITY - NUCLEAR OPTION */
  button#tours-360-btn,
  button.recorridos-360-btn,
  #tours-360-btn.recorridos-360-btn,
  .ver-plantas-btn,
  .ver-ubicacion-btn,
  .recorridos-360-btn,
  #tours-360-btn,
  button[class*="recorridos"],
  .hierarchical-dropdown-trigger {
    position: fixed !important;
    width: 130px !important;
    height: 40px !important;
    min-width: 130px !important;
    max-width: 130px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    border-radius: 20px !important;
    border: 0px solid transparent !important;
    outline: 0px solid transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 100 !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
    background: rgba(255, 255, 255, 0.95) !important;
    color: #2c3e50 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    text-decoration: none !important;
    cursor: pointer !important;
    line-height: 1 !important;
  }

  .ver-plantas-btn {
    top: 20px !important;
    right: 20px !important;
  }

  .ver-ubicacion-btn {
    top: 72px !important;
    right: 20px !important;
  }

  .recorridos-360-btn,
  #tours-360-btn,
  button.recorridos-360-btn {
    top: 124px !important;
    right: 20px !important;
  }

  /* Remove all focus states and borders */
  .ver-plantas-btn:focus,
  .ver-ubicacion-btn:focus,
  .recorridos-360-btn:focus,
  #tours-360-btn:focus,
  button.recorridos-360-btn:focus,
  .ver-plantas-btn:focus-visible,
  .ver-ubicacion-btn:focus-visible,
  .recorridos-360-btn:focus-visible,
  #tours-360-btn:focus-visible,
  button.recorridos-360-btn:focus-visible {
    border: none !important;
    outline: none !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
  }

  /* Touch feedback - IDENTICAL for all buttons */
  .ver-plantas-btn:active,
  .ver-ubicacion-btn:active,
  .recorridos-360-btn:active,
  #tours-360-btn:active,
  button.recorridos-360-btn:active {
    transform: scale(0.96) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16) !important;
    background: rgba(245, 245, 245, 0.95) !important;
    border: none !important;
    outline: none !important;
  }


}

/* Indicadores de carga */
.loading-indicator, 
.video-loading, 
.floor-loading-indicator,
.location-loading-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: opacity 0.3s ease;
  border-radius: 15px;
  color: white;
}

.loading-indicator {
  position: fixed;
}

.loading-indicator span,
.floor-loading-indicator span {
  margin-bottom: 20px;
  font-size: 18px;
  color: #2c3e50;
  font-weight: bold;
  text-align: center;
}

.location-loading-indicator span {
  margin-bottom: 20px;
  font-size: 18px;
  color: white;
  font-weight: bold;
  text-align: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

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

/* Animaciones de transición para medios */
.media.fade-in {
  animation: fadeInMedia 0.5s ease forwards;
}

.media.fade-out {
  animation: fadeOutMedia 0.5s ease forwards;
}

@keyframes fadeInMedia {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOutMedia {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Play video button */
.play-video-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 255, 255, 0.7);
  color: #2c3e50;
  border: none;
  padding: 15px 30px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 18px;
  z-index: 11;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
}

.play-video-btn:hover {
  background-color: white;
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

/* Estilo para botones deshabilitados */
.nav-button.disabled {
  background-color: #7f8c8d;
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

.nav-button.disabled:hover {
  background-color: #7f8c8d;
  transform: none;
}

/* Botón de pantalla completa */
.fullscreen-button {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.fullscreen-button:hover {
  background-color: rgba(0, 0, 0, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

.fullscreen-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
}

.fullscreen-button i {
  font-size: 16px;
  color: white;
}

/* Ajustes específicos para cada sección */
#intro-fullscreen-btn {
  top: 20px;
  right: 70px; /* Evita solaparse con botón de regresar */
}

#carousel-fullscreen-btn {
  bottom: 30px !important;
  left: 30px !important;
  top: auto !important;
  right: auto !important;
  width: 40px !important;
  height: 40px !important;
  position: fixed !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 5px !important;
  background-color: rgba(0, 0, 0, 0.4) !important;
  max-width: 40px !important;
  min-width: 40px !important;
  max-height: 40px !important;
  min-height: 40px !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  backdrop-filter: blur(3px) !important;
  -webkit-backdrop-filter: blur(3px) !important;
  cursor: pointer !important;
  z-index: 101 !important;
}

#location-fullscreen-btn {
  top: 15px;
  right: 15px;
}

#floor-fullscreen-btn {
  top: 15px;
  right: 15px;
}

/* Estilos para pantalla completa en modo móvil */
@media (max-width: 768px) {
  .fullscreen-button {
    width: 36px;
    height: 36px;
  }

  .fullscreen-button i {
    font-size: 14px;
  }

  #intro-fullscreen-btn {
    top: 15px;
    right: 55px;
  }

  #carousel-fullscreen-btn {
    bottom: 30px !important;
    left: 30px !important;
    top: auto !important;
    right: auto !important;
    width: 36px !important;
    height: 36px !important;
    position: fixed !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 5px !important;
    background-color: rgba(0, 0, 0, 0.4) !important;
    max-width: 36px !important;
    min-width: 36px !important;
    max-height: 36px !important;
    min-height: 36px !important;
    z-index: 101 !important;
  }
}

/* Projects List Page */
.projects-header {
  background: linear-gradient(rgba(44, 62, 80, 0.8), rgba(44, 62, 80, 0.8)), url('/static/projects/aviano/logo-aviano.png');
  background-size: cover;
  background-position: center;
  color: white;
  padding: 80px 0;
  text-align: center;
}

.projects-container {
  padding: 50px 0;
  background-color: #f5f5f5;
  min-height: calc(100vh - 250px);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.project-card {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  /* Eliminada la transición para respuesta inmediata */
}

/* Estilo eliminado */

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.project-image {
  height: 200px;
  overflow: hidden;
  position: relative;
  background: transparent; /* Removemos el color base */
}

.project-image img.project-logo {
  width: auto;
  height: auto;
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* Eliminada la transición para respuesta inmediata */
}

/* Estilo específico para cada proyecto */
.project-image.siena {
  background: linear-gradient(45deg, #4a4e8c, #5b5fa4);
}

.project-image.aviano {
  background: linear-gradient(45deg, #4a4e8c, #5b5fa4);
}

.project-image.siena img.project-logo {
  max-width: 85%;
  max-height: 85%;
  filter: drop-shadow(0 3px 6px rgba(255, 255, 255, 0.2));
  object-fit: contain;
  transform: translate(-50%, -50%);
}

.project-image.aviano img.project-logo {
  max-width: 75%;
  max-height: 75%;
}

.project-image img:not(.project-logo) {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card:hover .project-image img:not(.project-logo) {
  transform: scale(1.1);
}

.project-card:hover .project-image img.project-logo {
  transform: translate(-50%, -50%) scale(1.05);
}

/* Ajuste para el logo de Siena al hacer hover */
.project-card:hover .project-image.siena img.project-logo {
  transform: translate(-50%, -50%) scale(1.05);
}

.project-info {
  padding: 20px;
}

.project-info h2 {
  margin-top: 0;
  color: #2c3e50;
  font-size: 24px;
}

.project-info p {
  color: #7f8c8d;
  margin-bottom: 20px;
  line-height: 1.6;
}

.project-btn {
  display: inline-block;
  background-color: #2c3e50;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  /* Eliminada la transición para respuesta inmediata */
}

.project-btn:hover {
  background-color: #34495e;
}

.no-projects {
  grid-column: 1 / -1;
  text-align: center;
  padding: 50px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.no-projects i {
  font-size: 48px;
  color: #bdc3c7;
  margin-bottom: 20px;
}

.no-projects p {
  color: #7f8c8d;
  font-size: 18px;
}

.main-footer {
  background-color: #2c3e50;
  color: white;
  text-align: center;
  padding: 20px 0;
}

/* Responsive adjustments for projects list */
@media (max-width: 768px) {
  .projects-header {
    padding: 50px 0;
  }

  .projects-header h1 {
    font-size: 28px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    max-width: 450px;
    margin: 0 auto;
  }
}
/* Botón para regresar al inicio */
.back-to-home-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 30px;
  padding: 8px 15px;
  font-size: 14px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.back-to-home-btn i {
  font-size: 10px;
}

.back-to-home-btn:hover {
  background-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .back-to-home-btn {
    top: 10px;
    left: 10px;
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* Home Page - Estilos de la página principal */
html, body {
  font-family: 'Arial', sans-serif;
  background-color: var(--light);
  margin: 0;
  padding: 0;
  color: var(--primary);
  height: auto;
  overflow-y: auto;
  width: 100%;
}

.hero-section {
  background: url('static/brand/background.png') center/cover no-repeat;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  position: relative;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(12, 5, 109, 0.85), rgba(12, 5, 109, 0.7));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.logo-container {
  margin-bottom: 0;
}

.logo-container img {
  max-width: 450px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 15px rgba(3, 255, 246, 0.3));
  margin-bottom: 0;
  object-fit: contain;
}

.welcome-title {
  font-size: 2.5rem;
  color: var(--light);
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.welcome-subtitle {
  font-size: 1.2rem;
  color: var(--light);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.projects-section {
  padding: 1.5rem 2rem;
  background-color: var(--light-gray);
}

.section-title {
  text-align: center;
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  position: relative;
}

.section-title:after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(to right, var(--secondary), var(--accent));
  margin: 1rem auto 0;
  border-radius: 2px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.project-card {
  background: var(--light);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  /* Eliminada la transición para respuesta inmediata */
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.project-image {
  height: 200px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-position: center;
  background-size: cover;
}

.project-image.aviano {
  background: url('static/brand/background.png') center/cover;
}

.project-image.siena {
  background: url('static/brand/background.png') center/cover;
}

.project-image.siena .project-overlay {
  opacity: 0.5;
}

.project-image > img:not(.project-logo) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Eliminada la transición para respuesta inmediata */
}

.project-card:hover .project-image > img:not(.project-logo) {
  transform: scale(1.1);
}

/* Anular cualquier transformación para el logo cuando se hace hover en la tarjeta */
.project-card:hover .project-logo {
  transform: translate(-50%, -50%) !important; /* Mantiene la posición centrada - usando !important */
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(12, 5, 109, 0.4), rgba(12, 5, 109, 0.7));
}

.project-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) !important; /* Forzar esta transformación */
  max-width: 180px;
  max-height: 70%;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
  /* Evita que se mueva al hacer hover sobre la tarjeta */
  transition: none !important;
  z-index: 10; /* Asegurar que esté encima del overlay */
}

.project-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 0.6rem;
}

.project-description {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.project-link {
  background-color: var(--primary);
  color: var(--light);
  text-decoration: none;
  padding: 0.7rem 1.5rem;
  border-radius: 30px;
  font-weight: bold;
  text-align: center;
  /* Eliminada la transición para respuesta inmediata */
  display: inline-block;
  margin-top: auto;
  border: 2px solid var(--primary);
  font-size: 0.9rem;
}

.project-link.secondary {
  background-color: var(--secondary);
  border-color: var(--secondary);
}

.project-link:hover {
  background-color: transparent;
  color: var(--primary);
}

.project-status {
  background-color: var(--accent-dark);
  color: var(--light);
  font-size: 0.8rem;
  padding: 0.4rem 0.9rem;
  border-radius: 30px;
  display: inline-block;
  margin-bottom: 1rem;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.project-status.coming-soon {
  background-color: var(--secondary);
}

.footer {
  background-color: var(--primary);
  color: var(--light);
  padding: 1.5rem 2rem;
  text-align: center;
}

.footer-logo {
  max-width: 150px;
  margin-bottom: 1rem;
}

.footer-text {
  font-size: 0.9rem;
  opacity: 0.8;
  max-width: 600px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

.footer-copyright {
  font-size: 0.85rem;
  opacity: 0.7;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

/* Ajustes responsivos para la página principal */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
    height: auto;
  }

  .welcome-title {
    font-size: 2rem;
  }

  .welcome-subtitle {
    font-size: 1rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .logo-container img {
    max-width: 280px;
    margin-bottom: 0;
  }

  .hero-section {
    min-height: 120px;
    padding: 1rem;
  }

  .project-card {
    margin-bottom: 2rem;
  }
}
/* Botón para regresar al inicio */
.back-to-home-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 30px;
  padding: 8px 15px;
  font-size: 14px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.back-to-home-btn i {
  font-size: 10px;
}

.back-to-home-btn:hover {
  background-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .back-to-home-btn {
    top: 10px;
    left: 10px;
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* ===== RECORRIDOS 360° STYLES ===== */
.tours-360-container {
  text-align: center;
  margin: 30px 0;
}

.tours-360-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.tours-360-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.tours-360-button i {
  margin-right: 10px;
  font-size: 20px;
}

/* Modal 360° */
.modal-360 {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-360-content {
  position: relative;
  background-color: #fff;
  margin: 2% auto;
  padding: 0;
  border-radius: 15px;
  width: 95%;
  max-width: 1200px;
  height: 90vh;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-360-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 40px;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: white;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-360-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
  opacity: 1;
}

.modal-360-header h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 2;
  color: #ffffff;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}

.close-360-modal {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 3;
}

.close-360-modal:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  color: white;
  transform: scale(1.05);
}

.modal-360-body {
  height: calc(90vh - 80px);
  overflow-y: auto;
  padding: 64px 48px;
  background: #ffffff;
}

/* Galería de tipos de unidades */
.unit-types-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

.unit-type-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 20px;
  padding: 35px 25px;
  text-align: center;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.8);
  position: relative;
  overflow: hidden;
}

.unit-type-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #00CFC8 100%);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.unit-type-card:hover::before {
  transform: scaleX(1);
}

.unit-type-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 20px 40px rgba(102, 126, 234, 0.15),
    0 8px 16px rgba(0, 0, 0, 0.1);
  border-color: rgba(102, 126, 234, 0.2);
}

.unit-type-image {
  width: 90px;
  height: 90px;
  margin: 0 auto 25px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 70%, #00CFC8 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 32px;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
  position: relative;
}

.unit-type-image::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, #667eea, #764ba2, #00CFC8);
  border-radius: 50%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.unit-type-card:hover .unit-type-image::after {
  opacity: 1;
}

.unit-type-card:hover .unit-type-image {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.unit-type-card h3 {
  margin: 0 0 12px 0;
  font-size: 26px;
  font-weight: 700;
  color: #2c3e50;
  background: linear-gradient(135deg, #2c3e50 0%, #667eea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.unit-type-card p {
  margin: 0 0 30px 0;
  color: #64748b;
  line-height: 1.7;
  font-size: 15px;
  font-weight: 400;
}

.view-examples-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-examples-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.view-examples-btn:hover::before {
  left: 100%;
}

.view-examples-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Minimalist 360° Tour Dropdown */
.tour-dropdown-container {
  position: relative;
  display: inline-block;
}

.tour-dropdown-trigger {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 200px;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tour-dropdown-trigger:hover {
  background: #f8fafc;
  border-color: #cbd5e0;
  color: #1e293b;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.tour-dropdown-trigger i.fa-chevron-down {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.tour-dropdown-trigger.active i.fa-chevron-down {
  transform: rotate(180deg);
}

.tour-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  margin-top: 4px;
  max-height: 400px;
  overflow-y: auto;
}

.tour-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tour-dropdown-section {
  border-bottom: 1px solid #f1f5f9;
}

.tour-dropdown-section:last-child {
  border-bottom: none;
}

.tour-section-header {
  padding: 12px 16px 8px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
  font-family: 'Inter', sans-serif;
}

.tour-dropdown-item {
  padding: 12px 16px;
  color: #475569;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tour-dropdown-item:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.tour-dropdown-item i {
  font-size: 14px;
  color: #94a3b8;
  transition: color 0.15s ease;
}

.tour-dropdown-item:hover i {
  color: #64748b;
}

.tour-item-description {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 400;
  margin-top: 2px;
}

/* Visor 360° */
.viewer-360-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000;
  z-index: 10;
}

.viewer-360-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 11;
}

.viewer-360-header h3 {
  margin: 0;
  color: white;
  font-size: 18px;
}

.back-btn, .close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.back-btn:hover, .close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.back-btn i, .close-btn i {
  margin-right: 5px;
}

.viewer-360 {
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
}

/* Responsive design */
@media (max-width: 768px) {
  /* Force button containers to not inherit problematic height */
  .container, #main-content {
    height: 100vh !important;
  }

  /* Ensure buttons have explicit dimensions */
  button {
    height: auto !important;
    width: auto !important;
    max-height: none !important;
    flex: none !important;
  }

  .floor-selector {
    font-size: 14px;
    gap: 10px;
  }

  /* Responsive para recorridos 360° */
  .modal-360-content {
    width: 98%;
    height: 95vh;
    margin: 1% auto;
    border-radius: 10px;
  }

  .modal-360-header {
    padding: 24px 20px;
  }

  /* Responsive para botones de proyecto en móvil */
  .ver-plantas-btn, .ver-ubicacion-btn, .renders-btn, .recorridos-360-btn {
    position: fixed !important;
    right: 15px !important;
    font-size: 13px !important;
    padding: 10px 16px !important;
    height: 40px !important;
    min-width: 130px !important;
    max-width: 150px !important;
    border-radius: 20px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
  }

  /* Orden correcto en móvil: Ver Ubicación, Ver Plantas, Ver Renders */
  .ver-ubicacion-btn {
    top: 20px !important;
  }

  .ver-plantas-btn {
    top: 75px !important;
  }

  .renders-btn {
    top: 130px !important;
  }

  .recorridos-360-btn {
    top: 185px !important;
  }

  /* Visor de renders específico para móvil */
  .render-image-container {
    height: 100vh !important;
    padding: 60px 0 80px 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  .render-image-container img {
    min-width: 100% !important;
    height: calc(100vh - 140px) !important;
    max-height: calc(100vh - 140px) !important;
    width: auto !important;
    object-fit: cover !important;
    object-position: center !important;
    cursor: grab !important;
    touch-action: pan-x !important;
  }

  .render-image-container img:active {
    cursor: grabbing !important;
  }

  /* Navegación horizontal compacta en renders móvil */
  .render-viewer .render-nav {
    bottom: 20px !important;
    left: 20px !important;
    right: 20px !important;
    top: auto !important;
    width: auto !important;
    max-width: none !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    background: rgba(0,0,0,0.8) !important;
    padding: 12px !important;
    border-radius: 10px !important;
  }

  .render-viewer .render-nav-btn {
    font-size: 11px !important;
    padding: 8px 10px !important;
    min-width: auto !important;
    flex: 1 !important;
    height: 35px !important;
    border-radius: 6px !important;
  }

  .modal-360-header h2 {
    font-size: 22px;
  }

  .close-360-modal {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .modal-360-body {
    padding: 32px 20px;
    background: #fafafa;
  }

  .unit-types-gallery {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 10px 0;
  }

  .unit-type-card {
    padding: 30px 20px;
  }

  .unit-type-image {
    width: 75px;
    height: 75px;
    font-size: 28px;
  }

  .unit-type-card h3 {
    font-size: 22px;
  }

  .view-examples-btn {
    padding: 12px 24px;
    font-size: 14px;
  }

  /* Luxury header mobile */
  .luxury-header {
    padding: 32px 24px;
  }

  .project-logo {
    font-size: 32px;
    letter-spacing: 2px;
  }

  .project-tagline {
    font-size: 16px;
  }

  /* Units gallery mobile */
  .units-gallery {
    padding: 48px 16px;
  }

  .units-container {
    gap: 48px;
    padding: 0 16px;
  }

  .unit-card {
    border-radius: 16px;
  }

  .unit-card-header {
    padding: 32px 32px 24px;
  }

  .unit-card-header h4 {
    font-size: 28px;
  }

  .unit-card-body {
    padding: 24px 32px 32px;
  }

  .unit-views {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .view-360-btn {
    padding: 24px 20px;
    min-height: 120px;
  }

  .view-360-btn i {
    font-size: 24px;
  }

  .view-360-btn span {
    font-size: 15px;
  }

  .view-360-btn .view-description {
    font-size: 11px;
  }

  .back-to-types {
    padding: 0 16px;
  }

  /* Minimalist dropdown mobile */
  .tour-dropdown-trigger {
    min-width: 180px;
    padding: 12px 16px;
    font-size: 14px;
  }

  .tour-dropdown-menu {
    max-height: 300px;
  }

  .tour-dropdown-item {
    padding: 10px 12px;
    font-size: 13px;
  }

  .tour-item-description {
    font-size: 11px;
  }

  .tours-360-button {
    font-size: 16px;
    padding: 12px 25px;
  }

  .viewer-360-header {
    height: 50px;
    padding: 0 15px;
  }

  .viewer-360-header h3 {
    font-size: 16px;
  }

  .viewer-360 {
    top: 50px;
  }

  /* Hierarchical tours mobile fixes */
  .recorridos-360-btn,
  button.recorridos-360-btn,
  #tours-360-btn {
    padding: 8px 12px !important;
    font-size: 12px !important;
    min-width: 120px !important;
    max-width: 160px !important;
    height: auto !important;
    width: auto !important;
  }

  /* Override any inline styles for hierarchical dropdown */
  .hierarchical-dropdown {
    min-width: 200px !important;
    max-width: 280px !important;
    font-size: 13px !important;
  }

  .hierarchical-dropdown .dropdown-item {
    padding: 8px 12px !important;
    font-size: 13px !important;
  }

  .hierarchical-dropdown .section-header {
    padding: 8px 12px !important;
    font-size: 12px !important;
  }

  /* Force the 360 button to maintain proper size regardless of container */
  [id*="360"], [class*="360"], [class*="recorridos"] {
    height: 36px !important;
    width: 160px !important;
    max-height: 36px !important;
    max-width: 160px !important;
    min-height: 36px !important;
    overflow: hidden !important;
  }
}

/* Premium tablet responsiveness */
@media (max-width: 1024px) and (min-width: 769px) {
  .ver-plantas-btn,
  .ver-ubicacion-btn,
  .recorridos-360-btn,
  #tours-360-btn,
  button.recorridos-360-btn {
    width: 160px !important;
    height: 48px !important;
    font-size: 14px !important;
    border-radius: 24px !important;
  }

  .ver-plantas-btn {
    top: 24px !important;
    right: 24px !important;
  }

  .ver-ubicacion-btn {
    top: 84px !important;
    right: 24px !important;
  }

  .recorridos-360-btn,
  #tours-360-btn,
  button.recorridos-360-btn {
    top: 144px !important;
    right: 24px !important;
  }

  .hierarchical-dropdown {
    min-width: 260px !important;
    max-width: 280px !important;
    max-height: 300px !important;
  }

  /* Compact dropdown items for mobile */
  .hierarchical-dropdown > div {
    padding: 12px 14px !important;
  }
}

/* Mobile Floor Plan Viewer Full-Screen Optimization */
@media (max-width: 768px) {
  body.floor-viewer-active, html.floor-viewer-active {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    height: 100vh !important;
    width: 100vw !important;
    position: fixed !important;
  }

  body.floor-viewer-active * {
    box-sizing: border-box !important;
  }
}