/* ==========================================================================
   SUELOSINJUNTAS - SUELOS
   Premium, Cinematic, Architectural
   ========================================================================== */

:root {
  --bg-color: #0c0c0c;
  --bg-carbon: #121212;
  --bg-graphite: #1a1a1a;
  --text-main: #f4f4f4;
  --text-secondary: #8c8c8c;
  --text-dark: #333333;
  --accent: #d1d1d1;
  --font-main: 'Manrope', sans-serif;
  
  --transition-slow: 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-medium: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-main);
  overflow-x: hidden;
  scrollbar-width: none;
}
html::-webkit-scrollbar {
  display: none;
}

body {
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Texture overlay for luxury feel */
.bg-texture {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  opacity: 0.04;
  background-image: 
    linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 80px 40px;
  background-position: center;
}

/* Utilities */
.d-block { display: block; }
.text-accent { color: var(--text-secondary); }
.text-center { text-align: center; }
.huge-text {
  font-size: clamp(2.5rem, 6vw, 6rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -1px;
}
.section-header {
  margin-bottom: 4rem;
  padding: 0 5vw;
}
.section-title {
  font-size: 0.8rem;
  letter-spacing: 4px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* Back Nav */
.back-nav {
  position: fixed;
  top: 2rem;
  left: 2rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
  mix-blend-mode: difference;
}
.back-nav:hover { opacity: 1; }

/* 1. HERO SECTION */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 5vw;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1 !important;
  transform: scale(1.02);
  filter: brightness(0.88);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.6) 100%),
              linear-gradient(to top, rgba(10,10,10,0.85) 0%, transparent 50%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 1200px;
}

.hero-brand {
  font-size: 0.9rem;
  letter-spacing: 6px;
  margin-bottom: 2rem;
  opacity: 0.7;
}

.hero-title {
  font-size: clamp(3rem, 9vw, 8rem);
  font-weight: 300;
  line-height: 1;
  margin-bottom: 1rem;
}

.hero-title-small {
  font-size: clamp(1.1rem, 2.5vw, 2.2rem);
  font-weight: 300;
  letter-spacing: 4px;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.line-mask {
  display: block;
  overflow: hidden;
  padding-bottom: 10px;
}

.reveal-up {
  display: inline-block;
  transform: translateY(110%);
}

.hero-subtitle {
  font-size: 1.2rem;
  letter-spacing: 4px;
  font-weight: 500;
  margin-bottom: 1rem;
  opacity: 0;
}

.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 5vw;
  font-size: 0.7rem;
  letter-spacing: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  opacity: 0;
}

.scroll-arrow {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(5px); }
  60% { transform: translateY(3px); }
}

/* 2. TRANSICIÓN SUPERFICIE */
.superficie-section {
  height: 100vh;
  position: relative;
  background-color: var(--bg-color);
  overflow: hidden;
}

.superficie-sticky {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.superficie-word {
  font-size: clamp(4rem, 12vw, 15rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -4px;
  color: rgba(255,255,255,0.03);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
}

.superficie-phrases {
  position: relative;
  z-index: 2;
  text-align: center;
}

.phrase-line {
  font-size: clamp(1.5rem, 4vw, 4rem);
  font-weight: 300;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(20px);
}



/* 4. TRES ESPECIALIDADES */
.specialties-wrapper {
  position: relative;
  background-color: var(--bg-carbon);
  padding: 10vh 0;
}

.specialty-scene {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 5vh 5vw;
}

.specialty-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 5vh;
  z-index: 2;
}

.specialty-num {
  font-size: 0.85rem;
  letter-spacing: 4px;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.specialty-name {
  font-size: clamp(3rem, 6vw, 6rem);
  font-weight: 300;
  text-transform: uppercase;
  margin-bottom: 1rem;
  line-height: 1;
}

.specialty-desc {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 600px;
}

.specialty-image {
  width: 100%;
  max-width: 1200px;
  height: 60vh;
  position: relative;
  overflow: hidden;
}

.specialty-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.specialty-scene:hover .specialty-image img {
  transform: scale(1.05);
}

/* 5. IMAGÍNALO CONFIGURADOR */
.imaginalo-section {
  height: 100vh;
  position: relative;
  background-color: var(--bg-color);
  display: flex;
  overflow: hidden;
}

.room-container {
  flex: 1;
  position: relative;
  height: 100%;
}

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

#base-room-image {
  /* Dull and grey filter for the boring tiles */
  filter: grayscale(60%) brightness(0.6) sepia(10%);
  transition: filter 0.8s ease;
}

.base-room-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg); /* Torcido */
  z-index: 2;
  font-size: clamp(3rem, 6vw, 6rem);
  font-weight: 300;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.8);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
  white-space: nowrap; /* En el mismo párrafo siempre */
}

.base-room-text span {
  position: relative;
  display: inline-block;
  padding: 10px 20px;
}

/* La X gigante tachando el texto usando SVG */
.base-room-text span::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L100,100 M100,0 L0,100' stroke='rgba(255,255,255,0.7)' stroke-width='3'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  opacity: 0.8;
}

.base-room-text.hidden {
  opacity: 0;
  transform: translate(-50%, -60%) rotate(-8deg);
}

.sin-juntas-badge {
  position: absolute;
  top: 32px;
  left: 50%;
  transform: translate(-50%, -10px);
  z-index: 5;
  display: inline-block;
  padding: 8px 20px;
  background: rgba(12, 12, 12, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-color);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.sin-juntas-badge.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.configurator-bg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  z-index: 2;
  pointer-events: none;
}

.material-selector {
  width: 400px;
  height: 100%;
  background-color: var(--bg-graphite);
  border-left: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
  z-index: 3;
}

.selector-title {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 2rem;
  letter-spacing: 2px;
}

.material-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1rem;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.05);
  transition: all var(--transition-fast);
  background: transparent;
  margin-bottom: 1rem;
}

.material-option:hover {
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.2);
}

.material-option.active {
  border-color: var(--text-main);
  background: rgba(255,255,255,0.05);
}

.material-thumb {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
}
.material-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.material-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.material-name {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-main);
  font-family: var(--font-main);
}

.material-type {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* RESPONSIVE: ADAPTACIÓN MÓVIL COMPLETA PARA IMAGÍNALO */
@media (max-width: 900px) {
  .imaginalo-section {
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    flex-direction: column;
    overflow: visible;
  }

  /* 1. Arriba: Imagen cambiante de la habitación */
  .room-container {
    width: 100%;
    height: 48vh;
    min-height: 270px;
    max-height: 420px;
    flex: none;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .room-image,
  .configurator-bg-layer {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .base-room-text {
    font-size: clamp(1.3rem, 5.5vw, 2.2rem);
    letter-spacing: 1.5px;
    white-space: nowrap;
    padding: 6px 12px;
    max-width: 90%;
    text-align: center;
  }

  .base-room-text span {
    padding: 6px 14px;
  }

  .sin-juntas-badge {
    top: 16px;
    padding: 6px 14px;
    font-size: 0.65rem;
    letter-spacing: 2px;
  }

  /* 2. Abajo: Selector de materiales interactivo */
  .material-selector {
    width: 100%;
    height: auto;
    flex: 1;
    border-left: none;
    padding: 24px 20px 36px 20px;
    background-color: var(--bg-graphite);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .selector-title {
    font-size: 1.25rem;
    margin-bottom: 1.2rem;
    letter-spacing: 2px;
    text-align: center;
  }

  .material-option {
    padding: 0.85rem 1.1rem;
    margin-bottom: 0.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    gap: 1rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  }

  .material-option:active {
    transform: scale(0.98);
  }

  .material-option.active {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  }

  .material-thumb {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
  }

  .material-name {
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.5px;
  }

  .material-type {
    font-size: 0.7rem;
    letter-spacing: 1px;
    margin-top: 2px;
  }
}

@media (max-width: 480px) {
  .room-container {
    height: 44vh;
    min-height: 240px;
  }

  .material-selector {
    padding: 18px 16px 28px 16px;
  }

  .selector-title {
    font-size: 1.15rem;
    margin-bottom: 0.9rem;
  }

  .material-option {
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.55rem;
  }

  .material-thumb {
    width: 44px;
    height: 44px;
  }

  .material-name {
    font-size: 0.86rem;
  }

  .material-type {
    font-size: 0.65rem;
  }
}

/* 6. NO ES EL MISMO ESPACIO / TRANSFORMACIÓN REAL */
.editorial-section {
  height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #060606;
}

.editorial-ambient-bg {
  position: absolute;
  inset: -10%;
  width: 120%;
  height: 120%;
  background-size: cover;
  background-position: center;
  filter: blur(32px) brightness(0.22) saturate(1.15);
  transform: translateZ(0) scale(1.08);
  will-change: opacity;
  z-index: 1;
  pointer-events: none;
}

@media (max-width: 768px) {
  .editorial-ambient-bg {
    filter: blur(18px) brightness(0.22);
  }
}

.editorial-dark-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(12,12,12,0.3) 0%, rgba(6,6,6,0.85) 100%);
  z-index: 2;
  pointer-events: none;
}

.editorial-layout {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.2rem;
  width: 100%;
  max-width: 1100px;
  padding: 2rem;
}

.editorial-card-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.editorial-card {
  width: min(480px, 88vw);
  height: min(62vh, 600px);
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.14);
  background-color: #111111;
}

.editorial-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.editorial-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.editorial-captions {
  position: relative;
  width: 100%;
  min-height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.editorial-text {
  position: absolute;
  width: 100%;
  text-align: center;
  font-size: clamp(1.4rem, 3.2vw, 3rem);
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: -0.5px;
  max-width: 900px;
}

/* 7. HUELLAS / FOOTSTEPS TRANSITION */
.footsteps-section {
  height: 100vh;
  position: relative;
  background-color: #000000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footsteps-container {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footprints-track {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.footprint-wrap {
  position: absolute;
  width: 42px;
  height: 84px;
  color: #ffffff;
  filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.45));
  opacity: 0;
  transform: scale(0.85);
}

.footprint-wrap.step-1 {
  left: 36%;
  top: 64%;
  transform: rotate(-10deg) scale(0.9);
}

.footprint-wrap.step-2 {
  left: 55%;
  top: 47%;
  transform: rotate(6deg) scale(0.9);
}

.footprint-wrap.step-3 {
  left: 40%;
  top: 30%;
  transform: rotate(-6deg) scale(0.9);
}

.footprint-svg {
  width: 100%;
  height: 100%;
}

.footprint-svg.right-foot {
  transform: scaleX(-1);
}

.footsteps-title-wrap {
  text-align: center;
  z-index: 2;
  opacity: 0;
  transform: translateY(20px);
}

.footsteps-title {
  font-size: clamp(3.5rem, 9vw, 8.5rem);
  font-weight: 300;
  letter-spacing: -2px;
  line-height: 1;
  color: #ffffff;
  margin-bottom: 0.8rem;
}

.footsteps-sub {
  font-size: 0.78rem;
  letter-spacing: 5px;
  color: var(--text-secondary);
  text-transform: uppercase;
}


/* 8. PROYECTOS / SLIDER INTERACTIVO */
.gallery-slider-section {
  padding: 14vh 5vw 10vh;
  background-color: var(--bg-carbon);
  position: relative;
  overflow: hidden;
}

.slider-header {
  text-align: center;
  margin-bottom: 6vh;
}

.slider-tag {
  letter-spacing: 5px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.6rem;
}

.slider-main-title {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  font-weight: 300;
  line-height: 1.1;
}

.slider-main-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.slider-nav-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-color);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  z-index: 5;
}

.slider-nav-btn:hover {
  background: var(--text-color);
  color: var(--bg-color);
  transform: scale(1.08);
  border-color: var(--text-color);
}

.slider-viewport {
  flex: 1;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.slider-active-image-wrap {
  width: 100%;
  height: min(65vh, 600px);
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.12);
  background-color: #0c0c0c;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-active-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
  image-rendering: -webkit-optimize-contrast;
}

.slider-active-image-wrap:hover img {
  transform: scale(1.03);
}

.slider-zoom-hint {
  position: absolute;
  bottom: 20px;
  right: 20px;
  padding: 8px 18px;
  background: rgba(12, 12, 12, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 2px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.slider-active-image-wrap:hover .slider-zoom-hint {
  opacity: 1;
  transform: translateY(0);
}

.slider-caption-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1.2rem 0.5rem 0;
}

.slider-counter {
  font-size: 0.85rem;
  letter-spacing: 3px;
  color: var(--text-secondary);
}

.slider-caption-title {
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* BOTÓN CIRCULAR INFERIOR */
.slider-controls-bottom {
  display: flex;
  justify-content: center;
  margin-top: 3.5rem;
  margin-bottom: 12vh;
}

.btn-circular-gallery {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 12px 28px 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  color: var(--text-color);
  font-family: inherit;
  font-size: 0.78rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.35s ease;
}

.btn-circular-gallery:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.circle-icon {
  width: 38px;
  height: 38px;
  background: #ffffff;
  border-radius: 50%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  padding: 10px;
  transition: transform 0.3s ease;
}

.btn-circular-gallery:hover .circle-icon {
  transform: rotate(90deg);
}

.grid-dot {
  background-color: #0c0c0c;
  border-radius: 1px;
}

/* DOS VÍDEOS DE YOUTUBE DIRECTOS */
.videos-container {
  max-width: 1300px;
  margin: 0 auto;
  padding-top: 4vh;
}

.videos-header {
  text-align: center;
  margin-bottom: 5vh;
}

.video-main-title {
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  font-weight: 300;
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 2.5rem;
}

.video-card {
  background: var(--bg-graphite);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.video-responsive-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  background: #000;
}

.video-facade-wrap {
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.video-poster {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
  filter: brightness(0.85);
}

.video-facade-wrap:hover .video-poster {
  transform: scale(1.04);
  filter: brightness(0.95);
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  background: rgba(12, 12, 12, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.4rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}

.video-play-btn .play-icon {
  margin-left: 4px;
}

.video-facade-wrap:hover .video-play-btn {
  background: #ffffff;
  color: #0c0c0c;
  transform: translate(-50%, -50%) scale(1.12);
  border-color: #ffffff;
  box-shadow: 0 15px 40px rgba(255, 255, 255, 0.35);
}

.video-iframe-holder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  display: none;
}

.video-facade-wrap.playing .video-iframe-holder {
  display: block;
}

.video-facade-wrap.playing .video-poster,
.video-facade-wrap.playing .video-play-btn {
  display: none;
}

.video-info {
  padding: 1.8rem;
}

.video-card-title {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  color: var(--text-color);
}

.video-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* MODAL DE GRID COMPLETO */
.gallery-grid-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.gallery-grid-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.modal-window {
  position: relative;
  width: min(1100px, 92vw);
  max-height: 86vh;
  background: var(--bg-graphite);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 100px rgba(0,0,0,0.9);
  z-index: 2;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-grid-modal.open .modal-window {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-count {
  font-size: 0.75rem;
  letter-spacing: 3px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.modal-close-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 6px 16px;
  border-radius: 100px;
  font-family: inherit;
  font-size: 0.75rem;
  letter-spacing: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.modal-close-btn:hover {
  background: #fff;
  color: #000;
}

.modal-grid-content {
  padding: 2rem;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
}

.modal-thumb {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.modal-thumb:hover img {
  transform: scale(1.08);
}

.modal-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 10px;
  text-align: center;
}

.modal-thumb:hover .modal-thumb-overlay {
  opacity: 1;
}

.modal-thumb-overlay span {
  font-size: 0.7rem;
  letter-spacing: 2px;
  font-weight: 600;
  color: #fff;
}

/* LIGHTBOX FULLSCREEN */
.fullscreen-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.fullscreen-lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.lightbox-close-btn {
  position: absolute;
  top: 25px;
  right: 25px;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.lightbox-close-btn:hover {
  background: #fff;
  color: #000;
  transform: scale(1.05);
}

.lightbox-content {
  position: relative;
  z-index: 2;
  width: min(1000px, 92vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  width: 100%;
  max-width: min(920px, 90vw);
  height: auto;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.15);
  background-color: #111;
  image-rendering: -webkit-optimize-contrast;
}

.lightbox-caption {
  margin-top: 18px;
  font-size: 0.95rem;
  letter-spacing: 3px;
  color: var(--text-color);
  text-transform: uppercase;
  font-weight: 400;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.lightbox-arrow:hover {
  background: #fff;
  color: #000;
}

.lb-prev { left: 25px; }
.lb-next { right: 25px; }

/* RESPONSIVE: ADAPTACIÓN MÓVIL PARA SLIDER, GALERÍA COMPLETA (MODAL) Y LIGHTBOX */
@media (max-width: 768px) {
  /* Slider interactivo principal en móvil */
  .gallery-slider-section {
    padding: 8vh 4vw 6vh;
  }

  .slider-main-container {
    gap: 0.7rem;
  }

  .slider-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .slider-active-image-wrap {
    height: min(48vh, 380px);
    border-radius: 12px;
  }

  .slider-caption-wrap {
    padding: 0.9rem 0.2rem 0;
  }

  .slider-caption-title {
    font-size: 0.88rem;
    letter-spacing: 1.5px;
  }

  .slider-counter {
    font-size: 0.78rem;
  }

  .slider-controls-bottom {
    margin-top: 2rem;
    margin-bottom: 6vh;
  }

  .btn-circular-gallery {
    padding: 10px 22px 10px 12px;
    font-size: 0.72rem;
    letter-spacing: 2px;
  }

  .circle-icon {
    width: 32px;
    height: 32px;
    padding: 8px;
  }

  /* MODAL DE GALERÍA COMPLETA (VER TODAS LAS FOTOS) EN MÓVIL */
  .gallery-grid-modal {
    padding: 12px;
  }

  .modal-window {
    width: 100%;
    max-height: 90vh;
    max-height: 90svh;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95);
  }

  .modal-header {
    padding: 1rem 1.2rem;
  }

  .modal-count {
    font-size: 0.68rem;
    letter-spacing: 2px;
  }

  .modal-close-btn {
    padding: 6px 14px;
    font-size: 0.7rem;
    gap: 6px;
    -webkit-tap-highlight-color: transparent;
  }

  .modal-grid-content {
    padding: 12px;
    gap: 10px;
    grid-template-columns: repeat(2, 1fr);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .modal-thumb {
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
  }

  /* Gradiente inferior permanente en móvil con el número y acción */
  .modal-thumb-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    align-items: flex-end;
    justify-content: flex-start;
    padding: 8px 10px;
    pointer-events: none;
  }

  .modal-thumb-overlay span {
    font-size: 0.62rem;
    letter-spacing: 1.2px;
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  }

  /* LIGHTBOX FULLSCREEN EN MÓVIL */
  .fullscreen-lightbox {
    padding: 10px;
  }

  .lightbox-content {
    width: 100%;
    max-height: 85vh;
  }

  .lightbox-content img {
    max-width: 96vw;
    max-height: 65vh;
    border-radius: 8px;
  }

  .lightbox-caption {
    font-size: 0.8rem;
    letter-spacing: 2px;
    margin-top: 14px;
    text-align: center;
  }

  .lightbox-close-btn {
    top: 15px;
    right: 15px;
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
    background: rgba(20, 20, 20, 0.85);
  }

  .lightbox-arrow {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
    background: rgba(20, 20, 20, 0.75);
  }

  .lb-prev { left: 10px; }
  .lb-next { right: 10px; }
}

@media (max-width: 420px) {
  .modal-grid-content {
    padding: 10px;
    gap: 8px;
  }

  .modal-thumb-overlay span {
    font-size: 0.58rem;
    letter-spacing: 1px;
  }

  .modal-header {
    padding: 0.85rem 1rem;
  }

  .modal-close-btn {
    padding: 5px 10px;
    font-size: 0.65rem;
  }
}

/* BOTONES */
.btn-solid {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--text-main);
  color: var(--bg-color);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 2px;
  font-weight: 600;
  border-radius: 2px;
  transition: transform 0.3s ease, background 0.3s ease;
}
.btn-solid:hover {
  transform: translateY(-2px);
  background: #fff;
}
.btn-outline {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: transparent;
  color: var(--text-main);
  border: 1px solid rgba(255,255,255,0.2);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 2px;
  font-weight: 600;
  border-radius: 2px;
  transition: all 0.3s ease;
}
.btn-outline:hover {
  border-color: var(--text-main);
  background: rgba(255,255,255,0.05);
}

/* ==========================================================================
   ANIMACIÓN ÉPICA FINAL (ANTES DE CONTACTO)
   ========================================================================== */
.epic-finale {
  position: relative;
  width: 100%;
  height: 100vh;
  background-color: #000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.epic-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* 1. Grid of tiles (Las losas) */
.epic-tiles-grid {
  position: absolute;
  width: 110vw; /* Ligeramente más grande para que las esquinas cubran bien */
  height: 110vh;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 15px; /* Juntas grandes iniciales */
  z-index: 2;
}

.epic-tile {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.4);
  width: 100%;
  height: 100%;
  transition: border-color 0.3s;
}

/* 2. The explosion flash */
.epic-flash {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 250vw;
  height: 250vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,255,255,0.8) 20%, rgba(255,255,255,0) 70%);
  opacity: 0;
  z-index: 3;
  pointer-events: none;
}

/* 3. The seamless floor (Pigmented resin) */
.epic-seamless-floor {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0;
  transform: scale(1.3);
}

.epic-seamless-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.85) contrast(1.2) grayscale(1);
}

/* 4. Text */
.epic-text-wrap {
  position: absolute;
  z-index: 4;
  text-align: center;
  width: 90%;
  pointer-events: none;
}

.epic-text {
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-weight: 200;
  letter-spacing: 2px;
  line-height: 1.1;
  opacity: 0;
  transform: translateY(40px);
  text-shadow: 0 10px 40px rgba(0,0,0,0.8);
}


:root {
  --bg-color: #0a0a0a !important;
  --bg-carbon: #121212 !important;
  --bg-graphite: #1a1a1a !important;
  --text-main: #f4f4f4 !important;
  --text-secondary: #8c8c8c !important;
  --text-dark: #333333 !important;
  --accent: #b3b3b3 !important;
}
body {
  background-color: var(--bg-color) !important;
  color: var(--text-main) !important;
}

/* UNIFIED BACK NAV */
.back-nav {
  position: fixed !important;
  top: 2rem !important;
  left: 2rem !important;
  z-index: 100 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  color: var(--text-main) !important;
  text-decoration: none !important;
  font-size: 0.8rem !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  opacity: 0.7 !important;
  transition: opacity 0.3s ease, transform 0.3s ease !important;
  mix-blend-mode: difference !important;
}
.back-nav:hover {
  opacity: 1 !important;
  transform: translateX(-5px) !important;
}
