/* =========================================================
   0. RESET / VARIABLES
========================================================= */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  line-height: 1.6;
}

/* =========================================================
   1. NAVBAR / HEADER
========================================================= */
/* =========================================================
           1. VARIABLES & COLORES (TEMA CLARO/OSCURO)
        ========================================================= */
:root {
  --bg-body: #dadada;
  --header-bg: rgba(255, 255, 255, 0.55);
  --header-border: rgba(255, 255, 255, 0.5);
  --text-color: #252525;
  --logo-color: #252525;
  --link-hover: #4a9346;
  --btn-bg: rgba(0, 0, 0, 0.05);
  --btn-icon: #252525;
  --btn-hover: rgba(0, 0, 0, 0.1);
  --menu-bg: rgba(255, 255, 255, 0.75);
  --header-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
}

/* Modo Oscuro */
body.dark-mode {
  --bg-body: #252525;
  --header-bg: rgb(37, 37, 37, 0.6);
  --header-border: rgba(255, 255, 255, 0.1);
  --text-color: #ffffff;
  --logo-color: #ffffff;
  --link-hover: #4a9346;
  --btn-bg: rgba(255, 255, 255, 0.1);
  --btn-icon: #ffffff;
  --btn-hover: rgba(255, 255, 255, 0.2);
  --menu-bg: rgba(37, 37, 37, 0.75);
  --header-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

/* =========================================================
   15. DARK MODE
========================================================= */
body.dark-mode {
  background: var(--bg-body);
}

body.dark-mode .logo {
  color: var(--logo-color);
}

body.dark-mode .nav-links a {
  color: var(--logo-color);
}

body.dark-mode .nav-links a:hover {
  color: var(--link-hover);
  border-color: var(--link-hover);
}

body.dark-mode .card,
body.dark-mode .amenidad {
  background: #1c1c1c;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

body.dark-mode .badge {
  background: #398135;
  color: var(--logo-color);
}

body.dark-mode .hero-text h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode span,
body.dark-mode p,
body.dark-mode h1 span,
body.dark-mode label,
body.dark-mode .contact-detail {
  color: var(--text-color);
}

body {
  margin: 0;
  padding: 0;
  background-color: transparent !important;
  /* Vanta.js es el fondo principal */
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
  padding-top: 70px;
}

body.is-libro {
  background-color: #f3f4f6 !important;
  /* Fondo libro de reclamaciones */
}

/* =========================================================
   VANTA.JS BACKGROUND
========================================================= */
#vanta-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -10;
  pointer-events: none;
  /* Que no bloquee clics */
}

/* =========================================================
         2. HEADER (CORREGIDO Z-INDEX)
      ========================================================= */
/* --- HEADER PRINCIPAL --- */
header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);

  width: 100%;
  border-radius: 0;

  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;

  /* Solo borde abajo al inicio */
  border-bottom: 1px solid var(--header-border);
  border-top: none;
  border-left: none;
  border-right: none;

  /* Propiedades animables */
  will-change: width, top, border-radius;
  transition: top 0.5s cubic-bezier(0.25, 1, 0.5, 1),
    width 0.5s cubic-bezier(0.25, 1, 0.5, 1),
    border-radius 0.5s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.3s ease,
    box-shadow 0.3s ease;
}

/* --- ESTADO FLOTANTE (SCROLLED) --- */
header.scrolled {
  top: 10px;
  width: 85%;
  /* Más angosto al bajar */
  max-width: 1067px;
  border-radius: 50px;
  border: 1px solid var(--header-border);
  box-shadow: var(--header-shadow);
}

/* Ajuste móvil para estado flotante */
@media (max-width: 800px) {
  header.scrolled {
    width: 95%;
    top: 10px;
    border-radius: 20px;
  }
}

/* --- CONTENEDOR NAV INTERNO --- */
.nav {
  width: 100%;
  /* Centrado inicial: */
  max-width: 1000px;
  margin: 0 auto;
  padding: 0.4rem 0rem;
  /* Padding generoso */

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;

  transition: padding 0.5s cubic-bezier(0.25, 1, 0.5, 1), max-width 0.5s ease;
}

/* Nav al hacer scroll */
header.scrolled .nav {
  padding: 0.2rem 0rem;
}

/* --- LOGO --- */
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--logo-color);
  font-weight: 850;
  font-size: 2.2rem;
}

.logo img {
  height: 48px;
  width: auto;
  transition: height 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Reducción Logo (20%) */
header.scrolled .logo img {
  height: 40px;
}

/* Toggle Logo Light/Dark */
.logo-img-light {
  display: inline-block;
}

.logo-img-dark {
  display: none;
}

body.dark-mode .logo-img-light {
  display: none;
}

body.dark-mode .logo-img-dark {
  display: inline-block;
}

/* --- ENLACES --- */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  /* Separación amplia inicial */
  transition: gap 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Enlaces se juntan al bajar */
header.scrolled .nav-links {
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 500;
  position: relative;
  transition: color 0.3s, font-size 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Enlaces se reducen al bajar (20%) */
header.scrolled .nav-links a {
  font-size: 1rem;
}

/* Underline animado */
.nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--link-hover);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--link-hover);
}

/* --- BOTONES --- */
.theme-toggle-btn {
  background-color: var(--btn-bg);
  color: var(--btn-icon);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
  transform: scale(1.05);
  background-color: var(--btn-hover);
}

.rotate-icon {
  transform: rotate(360deg);
  transition: transform 0.6s ease;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  padding: 0;
  margin-left: 0.5rem;
}

.bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-color);
  position: absolute;
  left: 0;
  transition: 0.3s;
}

.bar:nth-child(1) {
  top: 2px;
}

.bar:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.bar:nth-child(3) {
  bottom: 2px;
}

.hamburger.active .bar:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

/* --- MENÚ MÓVIL --- */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 98;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  backdrop-filter: blur(4px);
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 50%;
  height: 100vh;
  background-color: var(--menu-bg);
  z-index: 99;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  padding: 6rem 2rem;
  display: flex;
  flex-direction: column;
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.mobile-menu a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 1.3rem;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 1200px) {
  .nav {
    padding: 0.4rem 1.5rem;
    max-width: 100%;
  }

  header.scrolled .nav {
    padding: 0.1rem 1.5rem;
    max-width: 100%;
  }
}

@media (max-width: 800px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: block;
  }
}

/* =========================================================
   3. HERO (se mantiene tu estructura original)
========================================================= */
.hero-text h1 {
  font-size: 3.7rem;
  color: #34667d;
  text-align: center;
  margin-bottom: 3rem;
  margin-top: -4rem;
  line-height: 0.925;
}

@media (max-width: 800px) {
  .hero-text h1 {
    font-size: 3.5rem;

    text-align: center;
    margin-top: -1rem;
  }

  .hero-text h1 span {
    font-size: 2.5rem;
  }
}

.hero-text h1 span {
  color: #000000;
  font-size: 2.8rem;
}

.hero-text p {
  margin: 0.7rem 0;
  font-weight: 500;
  color: #000000;
}

.hero-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.badge {
  background: var(--link-hover);
  color: var(--logo-color);
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-size: 0.7rem;
}

.hero-cta {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.btn-primary {
  background: #214251;
  color: #fff;
  padding: 0.7rem 1.3rem;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  font-weight: 500;
}

.btn-primary:hover {
  background: #3d5c6b;
}

.btn-outline {
  background: #fff;
  border: 1px solid #ccc;
  padding: 0.7rem 1.3rem;
  border-radius: 100px;
  cursor: pointer;
  font-weight: 500;
}

.btn-outline:hover {
  background: #d3d0d0;
}

/* =========================================================
   4. HERO NUEVO: FULLSCREEN + SLIDER A LA IZQUIERDA
========================================================= */
.hero {
  height: 90vh;
  display: grid;
  grid-template-columns: 70% 30%;
  padding: 0;
  margin: 0 auto;
  max-width: 1600px;
  align-items: center;
}

.hero-gallery.full-left {
  width: 100%;
  height: 100%;
  border-radius: 0 2rem 2rem 0;
  overflow: hidden;
  position: relative;
  /* FUNDAMENTAL para que position:absolute del badge funcione aquí dentro */
}

.right-content {
  padding: 4rem;
  padding-right: 0.7rem;
  padding-left: 6rem;
  min-width: 0;
  /* Previene que el carrusel (max-content) ensanche la pantalla en móviles */
}

@media (min-width: 768px) {
  .right-content {
    padding-left: 3rem;
  }
}

/* =========================================================
   5. SLIDER SWIPER HERO
========================================================= */
.hero-img-swiper {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Para evitar márgenes indeseados en imágenes */
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

/* Modificamos `.hero-label` para que esté encima de la imagen dentro de la slide */
.hero-label {
  position: absolute;
  bottom: 30px;
  left: 30px;
  background: rgba(0, 0, 0, 0.45);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  z-index: 10;
  user-select: none;
  -webkit-user-select: none;
}

/* Badge sutil de precio (Base: Móvil) */
.hero-price-badge {
  position: absolute;
  top: 30px;
  right: 0;
  /* Al ras con el borde derecho de la imagen */
  z-index: 10;
  background: #e5e7eb;
  /* Gris claro en Light Mode */
  color: #111827;
  padding: 0.8rem 1.6rem;
  border-radius: 20px 0 0 20px;
  /* Viñeta redondeada a la izquierda, plana a la derecha */
  font-weight: 800;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: -4px 4px 15px rgba(0, 0, 0, 0.15);
  /* Sombra hacia la izquierda */
}

/* Badge el doble de grande en PC/Tablets grandes */
@media (min-width: 800px) {
  .hero-price-badge {
    font-size: 2.2rem;
    padding: 1.4rem 2.8rem;
    border-radius: 40px 0 0 40px;
    top: 40px;
  }
}

body.dark-mode .hero-price-badge {
  background: #374151;
  /* Gris oscuro en Dark Mode */
  color: #ffffff;
  box-shadow: -4px 4px 15px rgba(0, 0, 0, 0.5);
}

/* Forzar color de los controles por defecto de swiper */
.style-nav-hero {
  color: rgba(255, 255, 255, 0.7) !important;
  transform: scale(0.7);
}

.style-nav-hero:hover {
  color: rgba(255, 255, 255, 1) !important;
}

/* Ajustar los puntitos de paginación del hero */
.style-pag-hero .swiper-pagination-bullet {
  background: #fff;
  opacity: 0.5;
}

.style-pag-hero .swiper-pagination-bullet-active {
  background: #fff;
  opacity: 1;
}

/* =========================================================
   5.1 MARQUEE INFINITO (LOGOS HERO RESPONSIVE)
========================================================= */
.partners-marquee {
  margin-top: 5rem;
  width: 100%;
  overflow: hidden;
  position: relative;
  /* Máscara de gradiente en los bordes para desvanecimiento */
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.marquee-content {
  --gap: 3rem;
  display: flex;
  width: max-content;
  gap: var(--gap);
  animation: scrollMarquee 15s linear infinite;
}

@keyframes scrollMarquee {
  0% {
    transform: translateX(0);
  }

  100% {
    /* Desplaza exactamente la mitad del contenido más la mitad de un gap */
    transform: translateX(calc(-50% - (var(--gap) / 2)));
  }
}

.partner-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Centrado interno queda mejor en móvil */
  gap: 0.5rem;
}

.partner-item span {
  font-size: 0.85rem;
  color: var(--text-color);
  opacity: 0.8;
  font-weight: 500;
}

.partner-item img {
  height: 40px;
  object-fit: contain;
}

body.dark-mode .partner-item img {
  filter: brightness(0.9);
}

/* --- RESPONSIVE MOBILE MARQUEE --- */
@media (max-width: 768px) {
  .partners-marquee {
    margin-top: 3rem;
    /* Menos espacio hacia arriba en celular */
    /* La máscara se ajusta para aprovechar más el ancho de pantalla en celular */
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  }

  .marquee-content {
    --gap: 1.5rem;
    /* Gap mucho más pequeño */
  }

  .partner-item span {
    font-size: 0.75rem;
    /* Letra un poco menor */
  }

  .partner-item img {
    height: 28px;
    /* Logos un poco más chicos para no ocupar tanto espacio vertical */
  }
}

/* =========================================================
   6. SECCIONES GENERALES
========================================================= */
section {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 1rem;
}

section h2 {
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

.section-subtitle {
  color: #6b7280;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* =========================================================
   6.1. SCROLL REVEAL ANIMATIONS
========================================================= */
/* Clase base padre */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

/* Estado Final */
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Animación en cascada (Stagger) para tarjetas hijas */
.reveal .stagger-1 {
  transition-delay: 0.1s;
}

.reveal .stagger-2 {
  transition-delay: 0.2s;
}

.reveal .stagger-3 {
  transition-delay: 0.3s;
}

.reveal .stagger-4 {
  transition-delay: 0.4s;
}

.reveal .stagger-5 {
  transition-delay: 0.5s;
}

.reveal .stagger-6 {
  transition-delay: 0.6s;
}

.reveal .stagger-7 {
  transition-delay: 0.7s;
}

.reveal .stagger-8 {
  transition-delay: 0.8s;
}

/* Para elementos hijos que también se animan */
.reveal-child {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}

/* Cuando el padre es visible, anima a los hijos */
.reveal.visible .reveal-child {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   7. GRIDS (Proyecto / Ubicación / Contacto)
========================================================= */
.proyecto-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
}

.ubicacion-layout {
  display: grid;
  gap: 2rem;
}

.card {
  background: #fff;
  padding: 1.2rem;
  border-radius: 0.7rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.card h3 {
  margin-bottom: 0.3rem;
  margin-top: 1.5rem;
}

.card ul {
  padding-left: 1rem;
}

/* =========================================================
   8. AMENIDADES
========================================================= */
/* --- CUADRÍCULA DE TARJETAS --- */
.amenities-grid {
  display: grid;
  /* Mantenemos el tamaño compacto */
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  justify-content: center;
}

/* --- TARJETA INDIVIDUAL (CAMBIOS AQUÍ) --- */
.amenity-card {
  /* Fondo transparente y sin sombras para el look "invisible" */
  background-color: transparent;
  box-shadow: none;
  border-radius: 0;

  padding: 15px;
  /* Menos padding ya que no hay bordes */
  transition: transform 0.3s ease;
  /* Solo animamos el movimiento */

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

/* Efecto hover sutil: Solo movimiento hacia arriba */
.amenity-card:hover {
  transform: translateY(-5px);
  /* Sin sombra al pasar el mouse */
}

/* --- ICONO --- */
.amenity-icon {
  font-size: 2.5rem;
  color: #3e7e3b;
  margin-bottom: 15px;
  transition: color 0.3s ease, transform 0.3s ease;
}

.amenity-card:hover .amenity-icon {
  color: #59af54;
  transform: scale(1.1);
}

/* --- TÍTULO DE LA TARJETA --- */
.amenity-title {
  font-size: 1rem;
  font-weight: 600;
  color: #555;
  margin: 0;
  line-height: 1.3;
}

/* Opcional: Cambiar color de texto al pasar el mouse */
.amenity-card:hover .amenity-title {
  color: #56a552;
  transition: color 0.3s ease;
}

/* --- CUADRÍCULA SIMÉTRICA (CAMBIOS CLAVE AQUÍ) --- */
.amenities-grid {
  display: grid;
  gap: 30px;
  /* Espacio uniforme */

  /* POR DEFECTO (Móviles): 2 Columnas */
  grid-template-columns: repeat(2, 1fr);
}

/* MEDIA QUERY (Tablets y Escritorio): Forzar 4 Columnas */
@media (min-width: 768px) {
  .amenities-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* =========================================
   NUEVO: RECORRIDO VIRTUAL (EFECTO CORTINA - CLIP PATH)
   ========================================= */
/* CAMBIO: Renombrado a rv-* */
.rv-section {
  /* Sección alta para el recorrido de scroll */
  height: 300vh;
  position: relative;
  max-width: 100%;
  padding: 0px;
}

.rv-sticky-wrapper {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  /* Que se vea Vanta por detrás */
}

.rv-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Asegura que el zoom no se salga del contenedor */
  overflow: hidden;
  border-radius: 30px;
}

.rv-img-container {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
  clip-path: inset(15% 35% 15% 35%);
  will-change: clip-path, transform;
  transform: translate3d(0, 0, 0);
  /* Fix parpadeo WebGL */
  backface-visibility: hidden;
}

/* Video de fondo para el recorrido virtual */
.rv-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Origen del zoom en el centro */
  transform-origin: center center;
  will-change: transform;
  /* Escala inicial normal */
  transform: scale(1);
}

.rv-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Origen del zoom en el centro */
  transform-origin: center center;
  will-change: transform;
  /* Escala inicial normal */
  transform: scale(1);
}

/* Texto superpuesto */
.rv-text {
  position: absolute;
  z-index: 20;
  text-align: center;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.rv-text p,
.rv-text svg {
  color: white !important;
}

.rv-text h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #ffffff;
  /* Texto blanco para resaltar sobre el video */
  background: transparent;
  /* Fondo transparente para compenetrarse con el video */
  padding: 0.5rem 0;
  /* Quitamos el padding horizontal grande que formaba la caja */
  border-radius: 0;
  display: inline-block;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 0, 0, 0.6);
  /* Sombras fuertes para legibilidad sobre videos claros/oscuros */
  transition: color 0.3s;
}

/*body.dark-mode .text-muted,
body.dark-mode .rv-scroll-icon {
  color: #000000;
}*/
.rv-scroll-icon {
  margin-top: 1rem;
  color: var(--primary-color);
}

/* =========================================================
   8. PLANTAS-FLORR
========================================================= */
/* --- UTILIDADES DE COLOR --- */
.main-card {
  background-color: white;
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 3rem;
  /* Desktop Padding por defecto */
}

/* Título de Sección */
.section-title {
  font-family: "Montserrat", sans-serif;
  font-size: 2.25rem;
  /* Desktop Size por defecto */
  text-align: center;
  color: var(--link-hover);
  font-weight: 500;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  text-transform: uppercase;
  font-weight: 999;
}

/* --- PERSONALIZACIÓN DE SWIPER --- */
.swiper {
  width: 100%;
  height: 100%;
  padding-bottom: 2rem !important;
}

.swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Flechas personalizadas (Adaptando .nav-btn) */
.custom-prev,
.custom-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  background-color: rgb(156, 156, 156);
  /* Color antiguo */
  width: 3rem;
  height: 3rem;
  padding: 0.5rem;
  border-radius: 9999px;
  color: var(--logo-color);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-prev:hover,
.custom-next:hover {
  background-color: rgba(201, 201, 201, 0.8);
  /* Hover antiguo */
  color: var(--logo-color);
}

.custom-prev {
  left: 0;
  transform: translate(-1rem, -50%);
}

.custom-next {
  right: 0;
  transform: translate(1rem, -50%);
}

/* Puntos de paginación (Adaptando .dot) */
.swiper-pagination-bullet {
  width: 0.75rem;
  height: 0.75rem;
  background: rgb(214, 214, 214);
  border: 1px solid #838385;
  opacity: 1;
  transition: all 0.3s;
}

.swiper-pagination-bullet-active {
  background: #214251;
  border-color: #214251;
  transform: scale(1.25);
}

/* --- ESTILOS DEL CONTENIDO (Desktop First) --- */

.slide-title {
  font-family: "Montserrat", sans-serif;
  font-size: 1.5rem;
  text-align: center;
  color: #214251;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-bottom: -1rem;
  text-transform: uppercase;
}

.slide-content-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  /* Desktop Layout por defecto */
  gap: 4rem;
  width: 100%;
}

.slide-image-col {
  width: 28%;
  /* Ancho Desktop antiguo */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 1rem;
}

.slide-image-col2 {
  width: 40%;
  /* Ancho Desktop antiguo */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 1rem;
}

.slide-image {
  width: 100%;
  max-width: 28rem;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;

  pointer-events: none;
  -webkit-user-drag: none;
}

.slide-details-col {
  width: 41.666667%;
  /* Ancho Desktop antiguo */
  text-align: left;
}

.slide-details-col>div {
  margin-bottom: 1.5rem;
}

.unit-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #214251;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.separator {
  height: 2px;
  background-color: #4a9346;
  /* Color separador antiguo */
  width: 100%;
  margin: 1rem 0;
}

/* Utilidades de texto */
.text-gray-500 {
  color: #214251;
}

.text-gray-600 {
  color: #214251;
}

.unit-desc {
  font-size: 0.875rem;
  font-weight: 700;
  color: #214251;
  line-height: 1.625;
  text-transform: uppercase;
  padding-right: 1rem;
}

.btn-cotizar {
  background-color: #214251;
  color: white;
  padding: 0.75rem 2rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s;
  border-radius: 10px;
}

.btn-cotizar:hover {
  background-color: #356277;
}

/* --- MEDIA QUERIES (Móvil) --- */
@media (max-width: 768px) {
  .main-card {
    padding: 2rem;
  }

  .section-title {
    font-size: 1.875rem;
  }

  /* Ajuste de flechas en móvil */
  .custom-prev,
  .custom-next {
    top: 40%;
  }

  .slide-title {
    font-size: 1.25rem;
    margin-bottom: 0rem;
  }

  .slide-content-wrapper {
    flex-direction: column;
    gap: 2rem;
  }

  .slide-image-col {
    width: 70%;
    height: auto;
    padding: 1rem;
  }

  .slide-image-col2 {
    width: 95%;
    height: auto;
    padding: 2rem;
  }

  .slide-details-col {
    width: 100%;
  }

  .unit-title {
    font-size: 1.125rem;
  }

  .slide-details-col>div {
    margin-bottom: 0rem;
  }
}

/* =========================================================
   9. GALERÍA (secciones interiores)
========================================================= */
/* --- GALERÍA: GRID RESPONSIVE --- */
.galeria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

/* Tamaño uniforme de cards */
.flip-card {
  width: 100%;
  height: 180px;
  perspective: 1000px;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  /* iOS / Android */
  touch-action: manipulation;
}

/* Contenedor rotatorio */
.flip-card-inner {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
  position: relative;
}

/* PC: hover */
@media (hover: hover) and (pointer: fine) {
  .flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
  }
}

/* Móvil: clic (clase .flipped desde JS) */
.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

/* Lados */
.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  border-radius: 15px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Cara trasera rotada */
.flip-card-back {
  transform: rotateY(180deg);
}

/* ---- FRONT: imagen + overlay integrados en background ---- */

/* Texto dentro del frente */
.flip-card-front {
  display: flex;
  justify-content: center;
  align-items: center;
  /* texto abajo */
  padding: 15px;
}

.front-label {
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  text-align: center;
  width: 100%;
}

/* Card 1 */
.front-1 {
  background-image: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.75),
      rgba(0, 0, 0, 0.75)),
    url("img/fachada.jpg");
  background-size: cover;
  background-position: center;
}

.back-1 {
  background-image: url("img/fachada.jpg");
  background-size: cover;
  background-position: center;
}

/* Card 2 */
.front-2 {
  background-image: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.75),
      rgba(0, 0, 0, 0.75)),
    url("img/resepcion.jpg");
  background-size: cover;
  background-position: center;
}

.back-2 {
  background-image: url("img/resepcion.jpg");
  background-size: cover;
  background-position: center;
}

/* Card 3 */
.front-3 {
  background-image: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.75),
      rgba(0, 0, 0, 0.75)),
    url("img/img3.jpg");
  background-size: cover;
  background-position: center;
}

.back-3 {
  background-image: url("img/img3b.jpg");
  background-size: cover;
  background-position: center;
}

/* Card 4 */
.front-4 {
  background-image: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.75),
      rgba(0, 0, 0, 0.75)),
    url("img/cocina.jpg");
  background-size: cover;
  background-position: center;
}

.back-4 {
  background-image: url("img/cocina.jpg");
  background-size: cover;
  background-position: center;
}

/* Card 5 */
.front-5 {
  background-image: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.75),
      rgba(0, 0, 0, 0.75)),
    url("img/img5.jpg");
  background-size: cover;
  background-position: center;
}

.back-5 {
  background-image: url("img/img5b.jpg");
  background-size: cover;
  background-position: center;
}

/* Card 6 */
.front-6 {
  background-image: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.75),
      rgba(0, 0, 0, 0.75)),
    url("img/img6.jpg");
  background-size: cover;
  background-position: center;
}

.back-6 {
  background-image: url("img/img6b.jpg");
  background-size: cover;
  background-position: center;
}

/* Ocultar últimas 2 cards en móviles */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}

/* =========================================================
   9.1 GALERÍA MODAL (Lightbox)
========================================================= */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-out, visibility 0.2s ease-out;
}

.gallery-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.gallery-lightbox-overlay {
  position: absolute;
  inset: 0;
  /* Fondo completamente oscuro para compensar no usar blur */
  background-color: rgba(0, 0, 0, 0.98);
  /* ELIMINADO: backdrop-filter: blur(8px) -> Ahoga el procesador sin Aceleración de Hardware (GPU) */
}

.gallery-lightbox-content {
  position: relative;
  width: 90%;
  max-width: 1000px;
  height: 60vh;
  /* Ocupa centro medio de la pantalla */
  max-height: 800px;
  z-index: 2;
  /* Escala muy leve para un pop-up casi instantáneo */
  transform: scale(0.95);
  /* Transición ultra rápida y simple */
  transition: transform 0.2s ease-out;
  will-change: transform;
  /* Optimización de hardware */
}

.gallery-lightbox.active .gallery-lightbox-content {
  transform: scale(1);
}

.gallery-close {
  position: absolute;
  top: 25px;
  right: 25px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  font-size: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 3;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.lightbox-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Para que no se corte, mantiene proporción */
  user-select: none;
  /* (Sin transición CSS propia) Dejar que Swiper maneje el transform 100% nativo */
  transform-origin: center;
}

/* Modo Tablet/PC ajustamos un poco altura */
@media (min-width: 768px) {
  .gallery-lightbox-content {
    height: 75vh;
  }
}

/* =========================================================
   10. UBICACIÓN
========================================================= */
.ubicacion-mapa iframe {
  width: 100%;
  height: 400px;
  border: 0;
  border-radius: 0.7rem;
}

/* =========================================================
   11. FORMULARIOS (Cotizador)
========================================================= */
.contact-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  box-sizing: border-box;
}

.cotizador-container {
  display: flex;
  flex-direction: column;
  background-color: #ffffffd9;
  /* Fondo claro actual */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 20px;
  /* Mobile padding */
}

@media (min-width: 992px) {
  .cotizador-container {
    flex-direction: row;
    padding: 0;
    /* Reset desktop */
  }
}

/* Columna de Formulario */
.cotizador-form-col {
  display: contents;
  /* Trick para reordenar en móvil */
}

.cotizador-title {
  font-size: 28px;
  font-weight: 800;
  text-transform: uppercase;
  color: #214251;
  margin-top: 0;
  margin-bottom: 12px;
  order: 1;
}

.cotizador-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 30px;
  line-height: 1.6;
  order: 2;
}

.cotizador-form {
  order: 4;
}

.cotizador-form .form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.cotizador-form .form-row>.form-group {
  flex: 1;
}

.cotizador-form .form-group {
  margin-bottom: 15px;
}

.cotizador-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  outline: none;
  background-color: #ffffff;
  color: #111827;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.cotizador-input:focus {
  border-color: #059669;
}

.custom-select-arrow {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%234a9346%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 12px;
}

.cotizador-checkbox-container {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: #6b7280;
  cursor: pointer;
  position: relative;
}

.cotizador-form .checkbox-container a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  margin: 0 4px;
}

.cotizador-submit-btn {
  background-color: var(--link-hover);
  /* Verde original de plantas */
  color: white;
  border: none;
  padding: 14px 40px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 15px;
  transition: background-color 0.2s;
}

.cotizador-submit-btn:hover {
  background-color: #398135;
  /* Hover verde un poco más oscuro */
}

/* Columna de Previsualización */
.cotizador-preview-col {
  order: 3;
  padding: 0;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.cotizador-filters {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.cotizador-filter-btn {
  background: transparent;
  color: var(--text-color);
  border: 1px solid #d1d5db;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.cotizador-filter-btn.active {
  background: #ffffff;
  border-color: #ffffff;
  color: #111827;
}

.cotizador-preview-card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 30px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.cotizador-view {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cotizador-view.hidden {
  display: none;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.preview-title-box h3 {
  font-size: 24px;
  color: #254655;
  font-weight: 800;
  margin: 5px 0;
}

.bloque-badge {
  color: #254655;
  font-weight: 600;
  font-size: 14px;
}

.nivel-badge {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.preview-features {
  display: flex;
  gap: 15px;
  color: #9ca3af;
  font-size: 13px;
}

.preview-brand-logo {
  height: 35px;
  object-fit: contain;
}

.preview-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: center;
  align-items: center;
  position: relative;
}

.preview-image-wrapper {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-image-wrapper img {
  max-width: 100%;
  max-height: 250px;
  object-fit: contain;
}

.preview-area {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.preview-area .area-label {
  color: #9ca3af;
  font-size: 13px;
}

.preview-area .area-value {
  color: #1f2937;
  font-size: 24px;
  font-weight: 800;
}

.preview-footer-logo {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

/* --- Dark Mode para el Cotizador --- */
body.dark-mode .cotizador-container {
  background-color: #1c1c1cdb;
  /* Color oscuro profundo */
}

body.dark-mode .cotizador-title,
body.dark-mode .cotizador-form .checkbox-container a,
body.dark-mode .cotizador-filter-btn {
  color: #ffffff;
}

body.dark-mode .cotizador-subtitle,
body.dark-mode .cotizador-form .checkbox-container {
  color: #9ca3af;
}

body.dark-mode .cotizador-input {
  background-color: #2d2d2d;
  border-color: #4b5563;
  color: #ffffff;
}

body.dark-mode .cotizador-input:focus {
  border-color: #059669;
}

body.dark-mode .cotizador-filter-btn {
  border-color: #4b5563;
}

body.dark-mode .cotizador-filter-btn.active {
  background: #2d2d2d;
  border-color: #2d2d2d;
  color: #ffffff;
}

body.dark-mode .cotizador-preview-card {
  background-color: #1c1c1c;
  /* Tarjeta oscura */
}

body.dark-mode .preview-title-box h3,
body.dark-mode .preview-area .area-value {
  color: #ffffff;
}

/* Ajustes Responsivos */
@media (max-width: 768px) {
  .cotizador-form .form-row {
    flex-direction: column;
    gap: 0;
  }

  .preview-area {
    position: static;
    transform: none;
    align-items: center;
    margin-top: 20px;
  }
}

/* Reset Desktop display: contents trick */
@media (min-width: 992px) {
  .cotizador-form-col {
    display: block;
    flex: 1;
    padding: 40px;
    order: 1;
  }

  .cotizador-preview-col {
    flex: 1;
    padding: 40px;
    margin-bottom: 0;
    order: 2;
  }
}

/* =========================================================
   14. HERO CONTACT MODAL (Popup de Agendar Visita)
========================================================= */
.hero-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.hero-modal.active {
  opacity: 1;
  visibility: visible;
}

.hero-modal-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
}

.hero-modal-content {
  position: relative;
  background: #f3f4f6;
  /* Color gris claro similar a la imagen original */
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 12px;
  padding: 40px;
  z-index: 2;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s ease-out;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.hero-modal.active .hero-modal-content {
  transform: scale(1) translateY(0);
}

.hero-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  color: #6b7280;
  border: none;
  font-size: 1.5rem;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--text-color);
}

/* Campos de Formulario Hero */
.hero-form .form-group {
  margin-bottom: 20px;
}

.hero-form .form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.hero-form .required {
  color: #ef4444;
  /* Asterisco Rojo */
  margin-left: 2px;
}

.hero-form .form-input,
.hero-form .form-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 15px;
  background: #ffffff;
  color: #111827;
  transition: border-color 0.2s;
}

.hero-form .form-input:focus,
.hero-form .form-select:focus {
  outline: none;
  border-color: #059669;
  /* Verde Inmooo Focus */
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

/* Grupo de Teléfono (Select + Input) */
.phone-input-group {
  display: flex;
  gap: 12px;
}

.phone-select {
  flex: 1;
  /* Ocupa 1 parte */
}

.phone-number {
  flex: 2;
  /* Ocupa 2 partes */
}

/* Estilización Checkboxes Custom Hero */
.form-checkbox-group {
  margin-bottom: 16px;
}

.checkbox-container {
  display: flex;
  align-items: flex-start;
  position: relative;
  cursor: pointer;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.5;
  user-select: none;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: relative;
  top: 2px;
  left: 0;
  min-width: 18px;
  height: 18px;
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  margin-right: 12px;
  transition: all 0.2s;
}

.checkbox-container:hover input~.checkmark {
  border-color: #9ca3af;
}

.checkbox-container input:checked~.checkmark {
  background-color: #059669;
  border-color: #059669;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-container input:checked~.checkmark:after {
  display: block;
}

.policy-link {
  color: #cca300;
  /* Color mostaza como en tu link */
  text-decoration: underline;
}

/* Modificaciones para Modo Oscuro en Modal Hero */
body.dark-mode .hero-modal-content {
  background: #1c1c1c;
  /* Gris oscuro para integrarse al modo */
}

body.dark-mode .hero-form .form-label,
body.dark-mode .hero-form .checkbox-text {
  color: #e5e7eb;
}

body.dark-mode .hero-form .form-input,
body.dark-mode .hero-form .form-select,
body.dark-mode .checkmark {
  background: #2d2d2d;
  border-color: #4b5563;
  color: #f3f4f6;
}

body.dark-mode .hero-modal-close {
  color: #9ca3af;
}

body.dark-mode .hero-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

body.dark-mode .hero-form .form-input:focus,
body.dark-mode .hero-form .form-select:focus {
  border-color: var(--link-hover);
}

/* --- Estilos Generales Formularios (Botones, etc.) --- */
.submit-btn {
  width: 100%;
  background-color: #059669;
  /* emerald-600 */
  color: white;
  font-weight: 700;
  padding: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: transform 0.1s, background-color 0.2s;
  box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.2);
}

.submit-btn:hover {
  background-color: #047857;
  /* emerald-700 */
  transform: translateY(-2px);
}

.legal-text {
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
  /* gray-400 */
  margin-top: 16px;
}

.success-message {
  text-align: center;
  padding: 40px 20px;
  animation: fadeIn 0.5s ease-out;
}

.success-icon {
  width: 64px;
  height: 64px;
  background-color: #d1fae5;
  /* emerald-100 */
  color: #059669;
  /* emerald-600 */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
}

/* Spinner de carga */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 3px solid #ffffff;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

/* Animaciones */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   12. FOOTER
========================================================= */
.footer {
  background: #000;
  color: #fff;
  padding: 40px 5vw;
  font-family: Arial, sans-serif;
  font-size: 14px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  /* para que sea responsive */
  gap: 40px;
}

.footer-col {
  flex: 1 1 220px;
  /* mínimo 220px, luego se adapta */
}

.footer-title {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
  position: relative;
}

/* Línea debajo de cada título (como en el ejemplo) */
.footer-title::after {
  content: "";
  display: block;
  width: 120px;
  height: 1px;
  background: #444;
  margin-top: 6px;
}

.footer p {
  margin: 4px 0;
}

.footer a {
  display: block;
  /*culpable de que el link ocupe todo el bloque*/
  width: fit-content;
  /* soluciona lo de arriba sin romper el equilibrio*/
  color: #fff;
  text-decoration: none;
  margin: 4px 0;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: #cccccc;
}

/* Redes sociales */
.footer-social .social-icons {
  margin-top: 15px;
  display: flex;
  gap: 12px;
}

.footer-social .social-icons a {
  font-size: 20px;
  display: inline-flex;
}

/* Responsive para pantallas pequeñas */
@media (max-width: 768px) {
  .footer {
    text-align: left;
  }

  .footer-inner {
    flex-direction: column;
    /* todas las columnas una debajo de otra */
    gap: 50px;
    /* espacio uniforme entre secciones */
  }

  .footer-col {
    flex: 0 !important;
  }
}

/* =========================================================
   13. REVEAL ANIMATIONS
========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   14. ANCLAS (scroll-margin)
========================================================= */
#proyecto,
#amenidades,
#galeria,
#ubicacion,
#contacto {
  scroll-margin-top: 90px;
}

/* =========================================================
   16. RESPONSIVE
========================================================= */
@media (max-width: 1300px) {
  .hero {
    grid-template-columns: 60% 40%;
  }
}

@media (max-width: 900px) {

  .proyecto-grid,
  .ubicacion-layout,
  .contacto-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
    height: auto;
  }

  .hero-gallery.full-left {
    height: 300px;
    border-radius: 1rem;
  }

  .right-content {
    padding: 1.8rem;
  }
}

/* CONTENEDOR DEL VISOR 3D */
.viewer-wrapper {
  max-width: 1100px;
  /* Ajusta el ancho máximo a tu gusto */
  margin: 0 auto;
  /* Centra horizontalmente */
  padding: 20px 0;
  /* Espacio arriba/abajo */
}

.viewer-wrapper iframe,
.ubicacion-mapa iframe {
  width: 100%;
  height: 600px;
  border: none;
  border-radius: 12px;
  box-shadow: none !important;
  /* Eliminar sombras que causan ghosting/blanco */
  background-color: transparent;
  transform: translate3d(0, 0, 0);
}

body.dark-mode .viewer-wrapper iframe {
  box-shadow: none !important;
}

/* Celulares grandes */
@media (max-width: 600px) {
  .viewer-wrapper {
    max-width: 100%;
    padding: 10px 0;
  }

  .viewer-wrapper iframe {
    height: 360px;
    /* Ajusta aquí */
    border-radius: 10px;
  }
}

/* ==========================================================
   VISOR 3D — BOTONES DE FULLSCREEN
   Todo lo relacionado al viewer Enscape y sus botones
   ========================================================== */

/* --- WRAPPER DEL VISOR ---
   Este div contiene el iframe y los botones del visor.
   Debe ser relative para permitir colocar botones encima. */
.viewer-wrapper {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 0;
}

.logo-sobretour {
  position: absolute;
  z-index: 999;
  width: 92px;
  height: 50px;
  background-color: rgb(255, 255, 255);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  overflow: visible;
}

.logosobretour-img {
  width: 43px;
  height: 43px;
}

.lgs-enter {
  top: 20px;
  left: 1px;
}

.lgs-exit {
  top: 6px;
  left: 1px;
  display: none;
}

/* --- BOTONES BASE ---
     Estilos generales para ambos botones (entrar y salir).
     Se colocan con absolute dentro del wrapper. */
.fs-btn {
  position: absolute;
  z-index: 999;
  /* Muy encima del visor */
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  /* Centrar icono vertical */
  justify-content: center;
  /* Centrar icono horizontal */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  /* Sombra elegante */
  overflow: visible;
}

/* --- ICONO DENTRO DE LOS BOTONES --- */
.fs-btn img {
  width: 43px;
  height: 43px;
}

/* --- BOTÓN PARA ENTRAR AL FULLSCREEN ---
     Ubicado en la parte inferior derecha.
     Este botón tapa el botón VR del visor */
.fs-enter {
  bottom: 40px;
  right: 23px;
}

/* --- BOTÓN PARA SALIR DEL FULLSCREEN ---
     Aparece solo cuando se activa modo fullscreen.
     Lo colocamos arriba a la derecha. */
.fs-exit {
  bottom: 20px;
  right: 23px;
  display: none;
  /* Oculto por defecto */
}

/* ==========================================================
     COMPORTAMIENTO DURANTE EL FULLSCREEN
     ========================================================== */

/* Cuando el wrapper #viewer3d entra a fullscreen,
     se aplican estas reglas que ocultan el botón de entrar
     y muestran el botón de salir */
.viewer-wrapper.is-fullscreen .fs-enter,
.viewer-wrapper.is-fullscreen .lgs-enter {
  display: none;
}

.viewer-wrapper.is-fullscreen .fs-exit,
.viewer-wrapper.is-fullscreen .lgs-exit {
  display: flex;
}

/* --- FULLSCREEN (GENERAL) ---
     Estas reglas garantizan que cuando #viewer3d está en fullscreen
     ocupe toda la pantalla sin bordes o límites */
#viewer3d:fullscreen,
#viewer3d:-webkit-full-screen {
  width: 100%;
  height: 100%;
  max-width: none;
  /* Elimina límites de ancho */
  padding: 0;
  /* Elimina espacios internos */
}

/* --- IFRAME EN FULLSCREEN ---
     Cuando el contenedor está fullscreen,
     el iframe se expande al 100% del wrapper */
#viewer3d:fullscreen iframe {
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0 !important;
}

#viewer3d:-webkit-full-screen iframe {
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0 !important;
}

#viewer3d:-moz-full-screen iframe {
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0 !important;
}

#viewer3d:-ms-fullscreen iframe {
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0 !important;
}

/* --- Área invisble más grande para detectar el hover --- */
.fs-btn::before {
  content: "";
  position: absolute;
  top: -9px;
  /* aumenta para expandir el aura */
  left: -8px;
  width: 66px;
  /* 36px + 15px + 15px */
  height: 66px;
  border-radius: 12px;
  background: transparent;
  pointer-events: auto;
  /* Detectar el hover */
}

/* Cuando el mouse entra a esa área invisible */
.fs-btn:hover {
  /*transform: scale(1.08);*/
  box-shadow: 0 0 14px rgba(0, 136, 255, 0.8);
}

/* --- WHATSAPP WIDGET --- */

/* Contenedor del Widget */
.whatsapp-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
}

/* Botón Flotante (Trigger) */
.whatsapp-float {
  background-color: #25d366;
  color: white;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.3s ease, background-color 0.3s;
  border: none;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background-color: #20ba56;
}

/* Caja de Chat (Oculta por defecto) */
.whatsapp-chat-box {
  width: 320px;
  background-color: white;
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: none;
  /* Oculto inicialmente */
  flex-direction: column;
  animation: slideUp 0.3s ease-out;
  transform-origin: bottom right;
}

/* Animación de entrada */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.whatsapp-chat-box.active {
  display: flex;
}

/* Header del Chat */
.chat-header {
  background-color: #25d366;
  /* Verde WhatsApp */
  color: white;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-title {
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.close-chat {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.close-chat:hover {
  opacity: 1;
}

/* Cuerpo del Chat */
.chat-body {
  padding: 1.5rem;
  background-color: #f9f9f9;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-bubble {
  background-color: white;
  padding: 1rem;
  border-radius: 0 1rem 1rem 1rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.5;
  position: relative;
}

/* Triángulo del globo de texto */
.chat-bubble::before {
  content: "";
  position: absolute;
  top: 0;
  left: -10px;
  width: 0;
  height: 0;
  border-top: 10px solid white;
  border-left: 10px solid transparent;
}

/* Botón Enviar dentro del Chat */
.chat-btn-send {
  background-color: #25d366;
  color: white;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.3s;
  align-self: flex-end;
  /* Alinear a la derecha */
  font-size: 0.9rem;
}

.chat-btn-send:hover {
  background-color: #128c7e;
}

body.dark-mode .chat-bubble p {
  color: #000000;
}

body.dark-mode .whatsapp-float {
  background-color: #3e7e3b;
}

body.dark-mode .whatsapp-float:hover {
  background-color: #63aa5f;
}

@media (max-width: 768px) {

  /* Ajuste del widget en móvil */
  .whatsapp-widget {
    bottom: 1.5rem;
    right: 1.5rem;
  }

  .whatsapp-float {
    width: 3.5rem;
    height: 3.5rem;
  }

  .whatsapp-chat-box {
    width: 300px;
  }
}