/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: url('assets/cursor.svg'), auto;
}

body {
  margin: 0;
  font-family: 'Albert Sans', sans-serif;
  background: #000; /* Fondo negro liso */
  color: white;
  overflow-x: hidden;
  cursor: url('assets/cursor.svg'), auto;
  position: relative;
}

/* Keep pointer cursor for interactive elements */
a,
button,
input,
textarea,
select,
[role="button"],
.service-card,
.client-card,
.about-card,
.popup-close {
  cursor: url('assets/cursor.svg'), pointer;
}

body.preloader-active {
  overflow: hidden;
}

/* ============================================
   INTERACTIVE BACKGROUND
   ============================================ */
#interactive-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none; /* Container doesn't block clicks, pero el canvas sí */
  overflow: hidden;
  background: #000; /* Fondo negro liso */
  opacity: 1;
  visibility: visible;
}

#background-canvas {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: auto !important; /* Permitir eventos directamente en el canvas */
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 2 !important; /* Por encima del fondo, pero el contenido debe tener pointer-events: auto */
  /* Asegurar que sea visible */
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  /* Optimización de renderizado */
  will-change: contents;
  image-rendering: optimizeSpeed;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-optimize-contrast;
  /* Ensure canvas is visible and ready */
  opacity: 1 !important;
  visibility: visible !important;
  background: transparent !important;
  /* Filtro rosado más visible - Compatible Safari */
  filter: hue-rotate(320deg) saturate(2) brightness(1.3) contrast(1.2) !important;
  -webkit-filter: hue-rotate(320deg) saturate(2) brightness(1.3) contrast(1.2) !important;
  /* Sin mix-blend-mode para que se vea mejor */
  /* mix-blend-mode: screen; */
  -webkit-transform: translateZ(0); /* Aceleración hardware para Safari */
  transform: translateZ(0);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
header {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  padding: 1.2rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  width: 100%;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #FFFFFF;
  letter-spacing: 0;
  line-height: 1.1;
  z-index: 101;
  position: relative;
  text-align: center;
}

nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  font-size: 1.3rem;
  font-family: 'Albert Sans', sans-serif;
}

nav a:hover {
  color: #BF56FF;
}

/* Hamburger Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 102;
  position: relative;
}

/* Menu Overlay */
.menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.menu-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: white;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.phone-link {
  color: white !important;
  font-size: 1.3rem;
  font-family: 'Albert Sans', sans-serif;
}

.whatsapp-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.2);
  transition: background 0.3s ease;
}

.whatsapp-link:hover {
  background: rgba(37, 211, 102, 0.4);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  position: relative;
  z-index: 5;
  padding: 2rem;
}

.hero-title-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  position: relative;
  z-index: 10;
  visibility: visible;
  opacity: 1;
}
.hero-title-top {
  font-family: 'Poppins', sans-serif;
  font-size: 8rem;
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1;
  position: relative;
  z-index: 10;
  display: block !important;
  width: 100%;
  text-align: center;
  text-transform: uppercase;
  color: transparent !important;
  background: linear-gradient(to bottom, #0047FF 0%, #7F23FF 50%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
  text-shadow: none !important;
  filter: none !important;
}

.hero-title-bottom {
  font-family: 'Poppins', sans-serif;
  font-size: 8rem;
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1;
  position: relative;
  z-index: 10;
  display: block !important;
  width: 100%;
  text-align: center;
  text-transform: uppercase;
  color: transparent !important;
  background: linear-gradient(to bottom, #7F23FF 0%, #BF56FF 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
  text-shadow: none !important;
  filter: none !important;
}


.hero-title-top {
  margin-bottom: -38px;
}

.hero-title-bottom {
  margin-top: 0;
}


/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  z-index: 10;
  opacity: 0.9;
}

.scroll-text {
  font-family: 'Albert Sans', sans-serif;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  white-space: nowrap;
  font-weight: 300;
}

.scroll-text strong {
  font-family: 'Poppins', sans-serif;
  color: #BF56FF;
  font-weight: 600;
}

.scroll-arrow {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  animation: scrollBounce 2s ease-in-out infinite;
  line-height: 1;
}

@keyframes scrollBounce {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(12px);
    opacity: 0.5;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.services-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 4rem;
  position: relative;
  z-index: 2;
}

.services-section:last-of-type {
  margin-bottom: 4rem;
}

.services-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  max-width: 1600px;
  width: 100%;
}

/* ============================================
   SERVICE CARDS
   ============================================ */
.service-card {
  perspective: 1000px;
  height: 750px;
  cursor: pointer;
  width: 100%;
  position: relative;
  transform-style: preserve-3d;
  transform-origin: center center;
  contain: layout style paint;
  will-change: transform;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  transform-origin: center center;
  will-change: transform;
  backface-visibility: hidden;
}

/* Efecto de giro activado */
.service-card:hover .card-inner {
  transform: rotateY(180deg) translateZ(0);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.3s ease;
  transform-origin: center center;
}

/* Panel más oscuro para todos los cards - fondo opaco */
.card-front {
  background: rgb(15, 15, 20);
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.service-card:hover .card-front {
  box-shadow: 0 12px 48px rgba(191, 86, 255, 0.4);
}

/* Optimización: desactivar hover en móvil para mejor rendimiento */
@media (hover: none) and (pointer: coarse) {
  .service-card:hover .card-inner {
    transform: none;
  }
  
  /* El flip se maneja con JavaScript en mobile, no con :active */
  .service-card:active .card-inner {
    transform: none;
  }
}

.card-back {
  transform: rotateY(180deg) translateZ(0);
  justify-content: flex-start;
  align-items: flex-start;
  text-align: center;
  padding: 0;
  overflow: hidden;
}

.card-back-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  pointer-events: none; /* Permitir clicks solo en elementos específicos */
}

/* Asegurar que la flecha siempre tenga pointer-events y esté por encima */
.card-back-content .card-arrow {
  pointer-events: auto !important;
  z-index: 10001 !important;
  position: absolute !important;
  /* Asegurar que esté en el contexto correcto para recibir clicks */
  transform: translateZ(1px);
  isolation: isolate;
}

.card-back-content h3 {
  position: absolute;
  top: 2rem;
  left: 2rem;
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  z-index: 10;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  margin: 0;
}

.card-back-content p {
  position: absolute;
  top: 5rem;
  left: 2rem;
  font-size: 1.1rem;
  opacity: 0.9;
  z-index: 10;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  margin: 0;
}

.card-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  opacity: 1;
  transform: translateZ(0);
  will-change: transform;
  -webkit-transform: translateZ(0);
}

.card-video img,
.card-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  transform: translateZ(0);
  will-change: transform;
  -webkit-transform: translateZ(0);
}

/* Card Loader */
.card-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 15, 20, 0.8);
  border-radius: 20px;
  z-index: 15;
  backdrop-filter: blur(10px);
}

.card-loader .loader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(191, 86, 255, 0.3);
  border-top-color: #BF56FF;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 2.2rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
  font-weight: 300;
  line-height: 1.3;
}

/* Título en dos líneas para cards que lo necesiten */
.service-card[data-service="interactivo"] .card-title {
  text-align: left;
  margin-bottom: 3rem;
  font-weight: 300;
}

.service-card[data-service="interactivo"] .card-title > div {
  display: block;
  line-height: 1.4;
}

/* Títulos para otros cards */
.service-card .card-title {
  text-align: left;
  margin-bottom: 3rem;
  font-weight: 300;
}

/* Contenedor flex column para V, INTERACTIVO y 3 */
.card-center-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  flex: 1;
  margin-top: 110px;
}

.card-v,
.card-number {
  font-family: 'Poppins', sans-serif;
  font-size: 12rem;
  font-weight: bold;
  line-height: 1;
  text-align: center;
  margin: 0 auto;
}

/* Tamaño ajustado para todos los cards - más pequeños */
.service-card .card-v,
.service-card .card-number {
  font-size: 7rem;
  line-height: 0.9;
}

/* Ajuste del espaciado para V, nombre y número - más juntos */
.service-card .card-v {
  margin: 0;
}

.service-card .card-number {
  margin: 0;
}

.card-name {
  font-family: 'Poppins', sans-serif;
  font-size: 3rem;
  font-weight: bold;
  text-align: center;
  margin: 0 auto;
  letter-spacing: 2px;
  transform: none !important;
}

/* Descripción para todos los cards */
.card-description {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  text-align: left;
  font-weight: 300;
  margin-top: auto;
  padding-top: 3rem;
}

.card-arrow {
  position: absolute !important;
  bottom: 1.5rem;
  right: 1.5rem;
  font-size: 1.8rem;
  color: white;
  background: rgba(191, 86, 255, 0.9);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10001 !important;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(191, 86, 255, 0.6), 0 0 0 0 rgba(191, 86, 255, 0.4);
  backdrop-filter: blur(10px);
  /* TODO el círculo debe ser clickeable */
  pointer-events: auto !important;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  touch-action: manipulation;
  /* Asegurar que todo el área sea clickeable */
  overflow: visible;
}

/* La flecha solo debe ser visible cuando el card está volteado (en el back) */
.card-front .card-arrow {
  display: none !important;
}

/* El texto dentro NO debe bloquear los clicks - los clicks van al círculo */
.card-arrow * {
  pointer-events: none !important;
  user-select: none;
  /* El texto no debe bloquear los clicks del círculo */
}

.card-arrow:hover {
  background: rgba(191, 86, 255, 1);
  transform: scale(1.15) translateX(3px);
  box-shadow: 0 6px 30px rgba(191, 86, 255, 0.8), 0 0 0 4px rgba(191, 86, 255, 0.2);
}

.card-arrow:active {
  transform: scale(1.05) translateX(2px);
  background: rgba(191, 86, 255, 0.95);
}

/* Card Color Themes */
.service-card[data-service="interactivo"] .card-v,
.service-card[data-service="interactivo"] .card-number {
  color: #BF56FF;
  text-shadow: 0 0 20px rgba(191, 86, 255, 0.5);
}

.service-card[data-service="visual"] .card-v,
.service-card[data-service="visual"] .card-number {
  color: #0047FF;
}

.service-card[data-service="soluciones"] .card-v,
.service-card[data-service="soluciones"] .card-number {
  color: #FFD700;
}

.service-card[data-service="control"] .card-v,
.service-card[data-service="control"] .card-number {
  color: #FF4444;
}

.service-card[data-service="personajes"] .card-v,
.service-card[data-service="personajes"] .card-number {
  color: #00FF88;
}

.service-card[data-service="momentos"] .card-v,
.service-card[data-service="momentos"] .card-number {
  color: #00D9FF;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 4rem;
  position: relative;
  z-index: 2;
}

.about-content {
  max-width: 1300px;
  width: 100%;
  text-align: center;
}

.about-title {
  font-family: 'Poppins', sans-serif;
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 4rem;
  line-height: 1.4;
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  transition: none;
  opacity: 0;
  transform: translateY(0);
}

.about-video {
  width: 100%;
  max-width: 1200px;
  height: auto;
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.4s ease;
  margin-top: 2rem;
  margin-bottom: 8rem;
}

.about-video.visible {
  opacity: 1;
}

.about-card {
  perspective: 1000px;
  height: 600px;
  cursor: pointer;
  border-radius: 20px;
  overflow: hidden;
}

.about-card-content {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(191, 86, 255, 0.2), rgba(0, 71, 255, 0.2));
  border-radius: 20px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-card:hover .about-card-content {
  transform: scale(1.02);
  box-shadow: 0 20px 60px rgba(191, 86, 255, 0.4);
}

.about-card-overlay {
  text-align: center;
  z-index: 2;
}

.about-card-overlay h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.about-card-overlay p {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* ============================================
   CLIENTS SECTION
   ============================================ */
.clients-section {
  min-height: 100vh;
  padding: 8rem 2rem 4rem;
  position: relative;
  z-index: 5;
}

.clients-swiper {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.clients-grid {
  display: flex;
  gap: 1.5rem;
}

.clients-swiper .swiper-slide {
  width: auto;
  height: auto;
}

/* Clients Grid Container (dentro de about-section) */
.clients-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 1400px;
  margin: 4rem auto 0;
  padding: 0 1rem;
}

.client-card {
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(20, 20, 30, 0.8);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(191, 86, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  opacity: 0;
  transform: translateX(-100px);
}

.client-card:nth-child(even) {
  transform: translateX(100px);
}

.client-card.animate-in {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.client-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(191, 86, 255, 0.1), rgba(0, 71, 255, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.client-card:hover {
  transform: translateY(-5px) scale(1.05);
  border-color: rgba(191, 86, 255, 0.6);
  box-shadow: 0 10px 30px rgba(191, 86, 255, 0.3);
}

.client-card:hover::before {
  opacity: 1;
}

.client-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 30, 0.9);
  z-index: 2;
  transition: opacity 0.3s ease;
}

.client-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.client-card .loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(191, 86, 255, 0.3);
  border-top-color: #BF56FF;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.client-logo-img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  filter: grayscale(100%) brightness(1.2) contrast(1.1);
  transition: filter 0.3s ease;
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.client-logo-img.loaded {
  opacity: 1;
}

.client-card:hover .client-logo-img {
  filter: grayscale(0%) brightness(1) contrast(1);
}

.client-logo {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
  position: relative;
  z-index: 1;
  word-wrap: break-word;
}

/* Swiper Styles for Clients */
.clients-swiper .swiper-pagination {
  position: relative;
  margin-top: 2rem;
}

.clients-swiper .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.5);
  opacity: 1;
  width: 12px;
  height: 12px;
  transition: all 0.3s ease;
}

.clients-swiper .swiper-pagination-bullet-active {
  background: #BF56FF;
  width: 24px;
  border-radius: 6px;
}

.clients-swiper .swiper-button-next,
.clients-swiper .swiper-button-prev {
  color: #BF56FF;
  width: 44px;
  height: 44px;
  background: rgba(191, 86, 255, 0.1);
  border-radius: 50%;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.clients-swiper .swiper-button-next:hover,
.clients-swiper .swiper-button-prev:hover {
  background: rgba(191, 86, 255, 0.3);
  transform: scale(1.1);
}

.clients-swiper .swiper-button-next::after,
.clients-swiper .swiper-button-prev::after {
  font-size: 18px;
  font-weight: bold;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-section {
  min-height: 100vh;
  padding: 8rem 2rem 4rem;
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-content {
  max-width: 1200px;
  width: 100%;
  text-align: center;
}

.contact-title {
  font-family: 'Poppins', sans-serif;
  font-size: 4rem;
  font-weight: 900;
  color: #FFFFFF;
  text-transform: uppercase;
  margin-bottom: 4rem;
  line-height: 1.2;
  text-align: left;
}

.contact-title br {
  display: block;
}

.contact-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
  text-align: left;
}

.contact-column {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-field label {
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 400;
}

.contact-input {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  color: #FFFFFF;
  padding: 1rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  background: rgba(20, 20, 30, 0.4);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.contact-input:hover {
  border-color: rgba(191, 86, 255, 0.5);
  background: rgba(20, 20, 30, 0.6);
}

.social-icons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.social-icon {
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-icon:hover {
  border-color: rgba(191, 86, 255, 0.8);
  background: rgba(191, 86, 255, 0.2);
  transform: scale(1.1);
}

.contact-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-footer p {
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

/* ============================================
   NUESTROS TRABAJOS SECTION
   ============================================ */
.trabajos-section {
  min-height: 100vh;
  padding: 8rem 2rem 4rem;
  position: relative;
  z-index: 5;
}

.trabajos-section .section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 3rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 4rem;
  background: white; /* 
  linear-gradient(to right, #BF56FF, #0047FF); */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 4px;
}

.trabajos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.trabajo-item {
  position: relative;
  aspect-ratio: 2/3;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  /* Optimización: compositing para animaciones */
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  background: rgba(20, 20, 30, 0.6);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(191, 86, 255, 0.2);
  cursor: pointer;
}

.trabajo-item:hover {
  transform: scale(1.15);
  z-index: 10;
  border-color: rgba(191, 86, 255, 0.8);
  box-shadow: 0 20px 60px rgba(191, 86, 255, 0.4);
}

.trabajo-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
  /* Optimización: compositing */
  will-change: transform;
  transform: translateZ(0);
}

.trabajo-item:hover .trabajo-media {
  transform: scale(1.05);
}

/* ============================================
   POPUP MODAL
   ============================================ */
.popup-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.popup-modal.active {
  display: flex;
}

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

.popup-content {
  background: rgba(20, 20, 30, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 3rem;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid rgba(191, 86, 255, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.popup-close:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

.popup-body h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, #BF56FF, #0047FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.popup-body #popup-description {
  font-size: 1.1rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
}

.popup-body #popup-description ul {
  margin: 1rem 0;
  padding-left: 2rem;
}

.popup-body #popup-description li {
  margin: 0.5rem 0;
}

.popup-body #popup-description h3 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  color: #BF56FF;
}

/* Popup Gallery Styles */
.popup-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(191, 86, 255, 0.3);
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(20, 20, 30, 0.5);
  transition: all 0.3s ease;
  border: 1px solid rgba(191, 86, 255, 0.2);
}

.gallery-item:hover {
  transform: scale(1.05);
  border-color: rgba(191, 86, 255, 0.6);
  box-shadow: 0 10px 30px rgba(191, 86, 255, 0.3);
  z-index: 5;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* Lightbox Modal Styles */
.lightbox-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
}

.lightbox-content img,
.lightbox-content video {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(191, 86, 255, 0.9);
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  z-index: 2001;
}

.lightbox-close:hover {
  background: rgba(191, 86, 255, 1);
  transform: rotate(90deg) scale(1.1);
}

/* Make popup wider for galleries */
.popup-modal.active .popup-content:has(.popup-gallery) {
  max-width: 900px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
  header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    gap: 0;
  }

  .logo {
    font-size: 0.85rem;
  }

  .menu-toggle {
    display: flex;
  }

  .menu-overlay {
    display: block;
  }

  nav.main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: rgba(15, 15, 20, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    transition: right 0.3s ease;
    z-index: 101;
    border-left: 1px solid rgba(191, 86, 255, 0.3);
    overflow-y: auto;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
  }

  nav.main-nav.active {
    right: 0;
  }

  nav.main-nav a {
    font-size: 1.1rem;
    width: 100%;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: block;
  }

  nav.main-nav a:last-of-type {
    border-bottom: none;
  }

  nav.main-nav .phone-link {
    font-size: 1rem;
    margin-top: 1rem;
  }

  nav.main-nav .whatsapp-link {
    width: 44px;
    height: 44px;
    margin-top: 0.5rem;
    border: none;
  }

  .hero {
    padding: 1rem;
  }

  .hero-title-top,
  .hero-title-bottom {
    font-size: 3.5rem;
    letter-spacing: 1px;
    line-height: 1;
  }
  
  .hero-title-top {
    margin-bottom: 0;
  }

  .hero-title-bottom {
    margin-top: 0;
  }

  .scroll-indicator {
    bottom: 2rem;
  }

  .scroll-text {
    font-size: 0.7rem;
  }

  .services-section {
    padding: 6rem 1rem 3rem;
    margin-bottom: 4rem;
  }

  .services-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .service-card {
    height: 600px;
  }

  .card-title {
    font-size: 1.6rem;
    margin-bottom: 2rem;
  }

  .card-center-group {
    margin-top: 60px;
    gap: 0.1rem;
  }

  .card-v,
  .card-number {
    font-size: 5rem;
  }

  .card-name {
    font-size: 2rem;
    letter-spacing: 1px;
  }

  .card-description {
    font-size: 0.85rem;
    padding-top: 2rem;
  }

  .about-section {
    padding: 6rem 1rem 3rem;
    min-height: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
  }

  .about-content {
    max-width: 100%;
    width: 100%;
  }

  .about-title {
    font-size: 1.3rem;
    line-height: 1.3;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
    padding: 0 0.5rem;
    word-wrap: break-word;
    opacity: 1 !important;
    transform: translateY(0) !important;
  }

  .about-video {
    margin-bottom: 3rem;
    border-radius: 8px;
    width: 100%;
    max-width: 100%;
    padding: 0 0.5rem;
    opacity: 1 !important;
    height: auto;
    min-height: 200px;
  }

  .clients-grid-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding: 0 0.5rem;
    margin-top: 2rem;
  }

  .client-card {
    padding: 0.75rem;
    min-height: 80px;
  }

  .client-logo-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
  }

  .trabajos-section {
    padding: 6rem 1rem 3rem;
    min-height: auto;
  }

  .trabajos-section .section-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    letter-spacing: 2px;
  }

  .trabajos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .trabajo-item:hover {
    transform: scale(1.05);
  }

  .contact-section {
    padding: 6rem 1rem 3rem;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .contact-content {
    max-width: 100%;
    width: 100%;
    padding: 0 0.5rem;
  }

  .contact-title {
    font-size: 1.8rem;
    margin-bottom: 2.5rem;
    line-height: 1.2;
    text-align: center;
    padding: 0;
  }

  .contact-info-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    text-align: left;
  }

  .contact-column {
    gap: 1.5rem;
    width: 100%;
  }

  .contact-field {
    width: 100%;
  }

  .contact-field label {
    font-size: 0.85rem;
  }

  .contact-input {
    font-size: 0.95rem;
    padding: 0.85rem 1.2rem;
    width: 100%;
  }

  .social-icons {
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .social-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }

  .social-icon svg {
    width: 20px;
    height: 20px;
  }

  .contact-footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    text-align: center;
  }

  .contact-footer p {
    font-size: 0.8rem;
  }

  .popup-gallery {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
  }

  .popup-modal.active .popup-content:has(.popup-gallery) {
    max-width: 95%;
    padding: 2rem 1.5rem;
  }
}

/* ============================================
   EXTRA SMALL DEVICES (phones, 480px and down)
   ============================================ */
@media (max-width: 480px) {
  header {
    padding: 0.8rem 1rem;
  }

  .logo {
    font-size: 0.75rem;
  }

  .hero-title-top,
  .hero-title-bottom {
    font-size: 2.5rem;
    letter-spacing: 0.5px;
  }

  .about-title {
    font-size: 1.1rem;
    padding: 0;
    opacity: 1 !important;
    transform: translateY(0) !important;
  }

  .about-video {
    min-height: 180px;
    opacity: 1 !important;
  }

  .clients-grid-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding: 0;
  }

  .client-card {
    padding: 0.5rem;
    min-height: 70px;
  }

  .client-logo-img {
    max-width: 95%;
    max-height: 95%;
  }

  .contact-title {
    font-size: 1.5rem;
  }

  .contact-input {
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
  }

  .social-icon {
    width: 40px;
    height: 40px;
  }

  .social-icon svg {
    width: 18px;
    height: 18px;
  }

  nav.main-nav {
    width: 90%;
    padding: 4rem 1.5rem 2rem;
  }

  nav.main-nav a {
    font-size: 1rem;
  }

  .popup-content {
    padding: 2rem 1.5rem;
    max-width: 95%;
  }

  .popup-body h2 {
    font-size: 2rem;
  }

  .clients-swiper .swiper-button-next,
  .clients-swiper .swiper-button-prev {
    width: 36px;
    height: 36px;
  }

  .clients-swiper .swiper-button-next::after,
  .clients-swiper .swiper-button-prev::after {
    font-size: 14px;
  }
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
  background: rgba(191, 86, 255, 0.5);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(191, 86, 255, 0.7);
}

/* ============================================
   PRELOADER
   ============================================ */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0a0a0a;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease, visibility 0.25s ease, background 0.25s ease;
}

.preloader.fading-out {
  animation: preloaderFadeOut 0.8s ease-out forwards;
}

.preloader.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  background: transparent !important;
  background-color: transparent !important;
  z-index: -1 !important; /* Detrás de todo */
  display: none !important; /* Ocultar completamente */
}

@keyframes preloaderFadeOut {
  0% {
    opacity: 1;
    visibility: visible;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

/* Top Left Text */
.preloader-top-left {
  position: absolute;
  top: 2rem;
  left: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.preloader-text-small {
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: uppercase;
  display: block;
  text-align: left;
}

/* Center V and 3 */
.preloader-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
}

.v3-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  width: auto;
  max-width: 100%;
  padding: 0 1rem;
  box-sizing: border-box;
}

/* V Text - Top (gradiente rosado abajo hacia arriba - como referencia) */
.v-text {
  font-family: 'Poppins', sans-serif;
  font-size: 8rem;
  font-weight: 900;
  background: linear-gradient(to top, #BF56FF 0%, #7F23FF 50%, #0047FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  letter-spacing: 0;
  line-height: 1;
  user-select: none;
  /* Visible por defecto para ajustes manuales */
  opacity: 1;
  transform: translateY(0) scale(1);
  transform-origin: center center;
  text-align: center;
  width: 100%;
  position: relative;
  margin-bottom: -10px;
  z-index: 5;
  text-shadow: none;
  filter: none;
}

/* 3 Text - Bottom (gradiente rosado abajo hacia arriba - como referencia) */
.three-text {
  font-family: 'Poppins', sans-serif;
  font-size: 8rem;
  font-weight: 900;
  background: linear-gradient(to top, #7F23FF 0%, #0047FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  letter-spacing: 0;
  line-height: 1;
  user-select: none;
  /* Visible por defecto para ajustes manuales */
  opacity: 1;
  transform: translateY(0) scale(1);
  transform-origin: center center;
  text-align: center;
  width: 100%;
  position: relative;
  margin-top: -10px;
  z-index: 5;
  text-shadow: none;
  filter: none;
}

/* Virtual 360 Text Container - Oculto por defecto, aparece cuando V y 3 se abren */
.virtual360-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  opacity: 0;
  user-select: none;
  z-index: 10;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  white-space: nowrap;
  max-width: 95vw;
  overflow: visible;
  padding: 0;
  border-radius: 0;
}

/* Letras fantasma a los lados (como sombra encima - referencia HYBRID XPERIENCE) */
.ghost-text-left,
.ghost-text-right {
  position: absolute;
  font-family: 'Poppins', sans-serif;
  font-size: 5rem;
  font-weight: 900;
  color: rgba(0, 0, 0, 0.5);
  letter-spacing: 0;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  opacity: 1 !important;
  transition: opacity 0.3s ease-in;
}

.virtual360-text.complete .ghost-text-left,
.virtual360-text.complete .ghost-text-right {
  opacity: 1 !important;
}

.ghost-text-left {
  left: -220px;
  top: 50%;
  transform: translateY(-50%) translateX(-25px);
  text-align: left;
}

.ghost-text-right {
  right: -220px;
  top: 50%;
  transform: translateY(-50%) translateX(25px);
  text-align: right;
}

/* VIRTUAL Text - Arriba (blanco, pegado a 360) con opacidad a los lados */
.virtual-text {
  font-family: 'Poppins', sans-serif;
  font-size: 4rem;
  font-weight: 900;
  color: #FFFFFF !important;
  letter-spacing: 0;
  text-transform: uppercase;
  line-height: 1;
  text-align: center;
  position: relative;
  z-index: 2;
  margin-bottom: -10px;
  text-shadow: none;
  filter: none;
  /* Efecto de opacidad a los lados */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,1) 70%, rgba(0,0,0,1) 70%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,1) 70%, rgba(0,0,0,1) 70%, transparent 100%);
}

/* 360 Text - Abajo (blanco, pegado a VIRTUAL) con opacidad a los lados */
.three-sixty-text {
  font-family: 'Poppins', sans-serif;
  font-size: 4rem;
  font-weight: 900;
  color: #FFFFFF !important;
  letter-spacing: 0;
  text-transform: uppercase;
  line-height: 1;
  text-align: center;
  position: relative;
  z-index: 2;
  margin-top: 0px;
  text-shadow: none;
  filter: none;
  /* Efecto de opacidad a los lados */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,1) 70%, rgba(0,0,0,1) 70%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,1) 70%, rgba(0,0,0,1) 70%, transparent 100%);
}

/* V and 3 opening animation when complete - sin fade out para ajustes manuales */
.v-text.complete {
  animation: vOpenUp 0.8s ease-out forwards;
}

.three-text.complete {
  animation: threeOpenDown 0.8s ease-out forwards;
}

.virtual360-text.complete {
  animation: virtual360Reveal 0.5s ease-out forwards, virtual360FadeOut 1.5s ease-in 1.5s forwards;
}

/* Initial appearance animations */
@keyframes vAppear {
  0% {
    opacity: 0;
    transform: translateY(-50px) scale(0.5);
  }
  60% {
    transform: translateY(10px) scale(1.1);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes threeAppear {
  0% {
    opacity: 0;
    transform: translateY(50px) scale(0.5);
  }
  60% {
    transform: translateY(-10px) scale(1.1);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Sin animaciones de cambio de color - gradiente fijo en el contenedor */

/* Opening animations when reaching 100% - separación más rápida y directa */
@keyframes vOpenUp {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-50px) scale(1);
    opacity: 1;
  }
}

@keyframes threeOpenDown {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(50px) scale(1);
    opacity: 1;
  }
}

/* Fade out animations for V and 3 (after staying visible) */
@keyframes vFadeOut {
  0% {
    opacity: 1;
    transform: translateY(-50px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-50px) scale(1);
  }
}

@keyframes threeFadeOut {
  0% {
    opacity: 1;
    transform: translateY(50px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(50px) scale(1);
  }
}

/* Virtual 360 reveal animation when V and 3 open - más rápido y directo */
@keyframes virtual360Reveal {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Virtual 360 fade out animation - lento */
@keyframes virtual360FadeOut {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
}


/* Effect for other elements */
.preloader-bottom-left.complete,
.preloader-bottom-right.complete {
  animation: fadeOut 0.8s ease-out forwards;
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.8);
  }
}

/* Bottom Left Loading Text */
.preloader-bottom-left {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
}

.preloader-loading-text {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  font-weight: 300;
}

/* Bottom Right Percentage */
.preloader-bottom-right {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
}

.preloader-percentage {
  font-family: 'Poppins', sans-serif;
  font-size: 3rem;
  font-weight: bold;
  color: #FFFFFF;
  letter-spacing: 2px;
}

/* Responsive */
@media (max-width: 768px) {
  .preloader {
    padding: 1rem;
  }

  .preloader-top-left {
    top: 1rem;
    left: 1rem;
  }

  .preloader-text-small {
    font-size: 0.85rem;
    line-height: 1.2;
  }

  .preloader-center {
    width: 100%;
    max-width: 100%;
    padding: 0 1rem;
  }

  .v3-container {
    gap: 0.2rem;
    max-width: 100%;
  }

  .v-text {
    font-size: 4rem;
    letter-spacing: 0.05em;
    margin-bottom: 10px !important;
  }

  .three-text {
    font-size: 4rem;
    letter-spacing: 0.05em;
    margin-top: 10px !important;
  }

  .virtual360-text {
    padding: 5px 20px;
  }

  .virtual-text,
  .three-sixty-text {
    font-size: 3rem;
    letter-spacing: 0;
    color: #FFFFFF !important;
    text-shadow: none;
    filter: none;
    /* Efecto de opacidad a los lados */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,1) 70%, rgba(0,0,0,1) 70%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,1) 70%, rgba(0,0,0,1) 70%, transparent 100%);
  }

  .preloader-bottom-left,
  .preloader-bottom-right {
    bottom: 1rem;
  }

  .preloader-bottom-left {
    left: 1rem;
  }

  .preloader-bottom-right {
    right: 1rem;
  }

  .preloader-loading-text {
    font-size: 0.8rem;
  }

  .preloader-percentage {
    font-size: 1.8rem;
    letter-spacing: 1px;
  }

  /* Ajustar animaciones para móvil - separación vertical más pequeña */
  @keyframes vOpenUp {
    0% {
      transform: translateY(0) scale(1);
      opacity: 1;
    }
    100% {
      transform: translateY(-40px) scale(1);
      opacity: 1;
    }
  }

  @keyframes threeOpenDown {
    0% {
      transform: translateY(0) scale(1);
      opacity: 1;
    }
    100% {
      transform: translateY(40px) scale(1);
      opacity: 1;
    }
  }

  @keyframes vFadeOut {
    0% {
      opacity: 1;
      transform: translateY(-40px) scale(1);
    }
    100% {
      opacity: 0;
      transform: translateY(-40px) scale(1);
    }
  }

  @keyframes threeFadeOut {
    0% {
      opacity: 1;
      transform: translateY(40px) scale(1);
    }
    100% {
      opacity: 0;
      transform: translateY(40px) scale(1);
    }
  }

  @keyframes vAppear {
    0% {
      opacity: 0;
      transform: translateY(-30px) scale(0.5);
    }
    60% {
      transform: translateY(5px) scale(1.05);
    }
    100% {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  @keyframes threeAppear {
    0% {
      opacity: 0;
      transform: translateY(30px) scale(0.5);
    }
    60% {
      transform: translateY(-5px) scale(1.05);
    }
    100% {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .preloader-top-left {
    top: 0.75rem;
    left: 0.75rem;
  }

  .preloader-text-small {
    font-size: 0.75rem;
  }

  .v-text {
    font-size: 3rem;
    margin-bottom: 8px !important;
  }

  .three-text {
    font-size: 3rem;
    margin-top: 8px !important;
  }

  .virtual360-text {
    padding: 5px 15px;
  }

  .virtual-text,
  .three-sixty-text {
    font-size: 2.5rem;
    letter-spacing: 0;
    color: #FFFFFF !important;
    text-shadow: none;
    filter: none;
    /* Efecto de opacidad a los lados */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,1) 70%, rgba(0,0,0,1) 70%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,1) 70%, rgba(0,0,0,1) 70%, transparent 100%);
  }

  .preloader-bottom-left,
  .preloader-bottom-right {
    bottom: 0.75rem;
  }

  .preloader-bottom-left {
    left: 0.75rem;
  }

  .preloader-bottom-right {
    right: 0.75rem;
  }

  .preloader-loading-text {
    font-size: 0.7rem;
  }

  .preloader-percentage {
    font-size: 1.5rem;
  }

  @keyframes vOpenUp {
    0% {
      transform: translateY(0) scale(1);
      opacity: 1;
    }
    100% {
      transform: translateY(-40px) scale(1);
      opacity: 1;
    }
  }

  @keyframes threeOpenDown {
    0% {
      transform: translateY(0) scale(1);
      opacity: 1;
    }
    100% {
      transform: translateY(40px) scale(1);
      opacity: 1;
    }
  }

  @keyframes vFadeOut {
    0% {
      opacity: 1;
      transform: translateY(-40px) scale(1);
    }
    100% {
      opacity: 0;
      transform: translateY(-40px) scale(1);
    }
  }

  @keyframes threeFadeOut {
    0% {
      opacity: 1;
      transform: translateY(40px) scale(1);
    }
    100% {
      opacity: 0;
      transform: translateY(40px) scale(1);
    }
  }
}

/* ============================================
   TEXT ANIMATIONS
   ============================================ */
.letter {
  display: inline-block;
  transform-origin: center bottom;
  will-change: transform, opacity;
}

.word {
  display: inline-block;
  overflow: hidden;
}

/* Smooth scroll animations - EXCLUDE hero h1 titles */
.about-title,
.about-card-overlay h3 {
  will-change: transform, opacity;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Hero titles should never be affected by scroll animations */
.hero h1 {
  will-change: auto;
}

/* Card animations on scroll */
.card,
.about-card {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.card.in-view,
.about-card.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animation for cards */
.card:nth-child(1) { transition-delay: 0.1s; }
.card:nth-child(2) { transition-delay: 0.2s; }
.card:nth-child(3) { transition-delay: 0.3s; }
.card:nth-child(4) { transition-delay: 0.4s; }
.card:nth-child(5) { transition-delay: 0.5s; }
.card:nth-child(6) { transition-delay: 0.6s; }