/*
Theme Name: Ray-B Archviz & Tech
Theme URI: https://rayb-archviz.com/
Author: Antigravity AI
Description: A premium, dark-themed WordPress theme for modern Architectural Visualization agencies.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: rayb-archviz-tech
*/

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Plus+Jakarta+Sans:wght@300;400;500;700&display=swap');

/* --- CSS Variables & Custom System (Minimalist Sober Light Theme) --- */
:root {
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Colors: Sobria, minimalista y ultra-moderna con acento Cyan */
  --bg-dark: #ffffff; /* Todo blanco */
  --bg-card: #fbfaf7; /* Lino muy suave para alternar de fondo */
  --bg-card-hover: #f5f3ef;
  
  --text-main: #1a1a1a; /* Carbón oscuro sobrio */
  --text-muted: #737373; /* Gris neutro */
  
  --color-cyan: #c06c3f; /* Terracota Cálida y premium */
  --color-violet: #c06c3f;
  --color-accent: #c06c3f;
  
  --color-sage-rgb: 192, 108, 63;
  --color-champagne-rgb: 192, 108, 63;

  --gradient-tech: linear-gradient(135deg, #c06c3f 0%, #a0532b 100%);
  --gradient-glow: linear-gradient(135deg, rgba(192, 108, 63, 0.04) 0%, rgba(192, 108, 63, 0.01) 100%);
  --gradient-dark: linear-gradient(180deg, #ffffff 0%, #fbfaf7 100%);

  /* Glassmorphism (Sober mode) */
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(0, 0, 0, 0.05);
  --glass-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.03);

  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Base & Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

/* --- Layout Containers --- */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.section {
  padding: 100px 0;
  position: relative;
}

/* --- Header / Navigation --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent; /* 100% transparente al inicio */
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  box-shadow: none;
  transition: padding 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
              background-color 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
              backdrop-filter 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 10px 0; /* Espaciado cómodo arriba */
}

.site-header.scrolled {
  padding: 6px 0; /* Padding sutil para dar margen al logo */
  background: rgba(255, 255, 255, 0.4); /* Frosted light glass */
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
}

.header-container {
  display: flex;
  justify-content: center; /* Centrar el logo en medio */
  align-items: center;
  height: 78px; /* Altura que le da margen al logo de 68px al inicio */
  transition: height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header.scrolled .header-container {
  height: 46px; /* Altura que le da margen al logo de 36px al escrolear */
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo img {
  height: 68px; /* Logo aún más grande arriba */
  width: auto;
  display: block;
  object-fit: contain;
  transition: height 0.5s cubic-bezier(0.16, 1, 0.3, 1); /* Cambio de tamaño suave */
}

.site-header.scrolled .logo img {
  height: 36px; /* Logo normal al escrolear */
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-menu a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  opacity: 0.8;
  position: relative;
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
  opacity: 1;
  color: var(--color-cyan);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-tech);
  transition: var(--transition-smooth);
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}
/* --- Hero Section (Minimalist White Ray-B Title) --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 0; /* Centrado exacto */
  overflow: hidden;
  background-color: #ffffff; /* Completamente blanco */
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title-animated {
  font-size: 9.5rem; /* Título Ray-B espectacular y gigante */
  font-weight: 800;
  text-transform: none; /* Mantener la capitalización Ray-B */
  line-height: 0.95;
  margin-bottom: 28px; /* Separar visualización arquitectónica de Ray-B */
  color: var(--text-main);
  letter-spacing: -0.04em;
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  filter: blur(10px);
  animation: slideUpReveal 2.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 45px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUpReveal 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.4s;
}

.hero .cta-group {
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUpReveal 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.8s;
}


@keyframes slideUpReveal {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.cta-group {
  display: flex;
  gap: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: #1a1a1a;
  color: #ffffff;
  border: 1px solid #1a1a1a;
  box-shadow: none;
}

.btn-primary:hover {
  background: var(--color-cyan);
  border-color: var(--color-cyan);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(var(--color-sage-rgb), 0.25);
}

.btn-secondary {
  background: transparent;
  color: var(--text-main);
  border: 1px solid rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.btn-secondary:hover {
  background: #1a1a1a;
  color: #ffffff;
  border-color: #1a1a1a;
  transform: translateY(-2px);
}

/* --- Section Heading --- */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}

.section-header .subtitle {
  color: var(--color-cyan);
  font-size: 0.85rem;
  font-weight: 800; /* Peso aumentado para mejorar legibilidad */
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 10px;
  display: block;
}

.section-header h2 {
  font-size: 3.2rem; /* Increased size to stand out more as sections */
  font-weight: 800;  /* Boldest font weight for structural presence */
  letter-spacing: -0.02em; /* Sleek tight tracking */
  margin-bottom: 15px;
  color: var(--text-main);
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* --- Before/After Slider Section --- */
.comparison-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 500px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  user-select: none;
}

.tour-wrapper {
  position: relative;
  width: 100%;
  max-width: 1000px;
  padding-bottom: 50%; /* Relación de aspecto 2:1 para evitar bordes negros arriba/abajo */
  height: 0;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.tour-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.image-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.before-image {
  z-index: 1;
}

.after-image {
  z-index: 2;
  width: 50%;
}

.after-image img {
  width: 900px;
  max-width: none;
  height: 100%;
}

.slider-label {
  position: absolute;
  bottom: 20px;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 3;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.label-before {
  left: 20px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
}

.label-after {
  right: 20px;
  background: rgba(251, 250, 247, 0.8);
  border: 1px solid var(--color-cyan);
  color: var(--color-cyan);
}

.comparison-slider-handle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  background: var(--gradient-tech);
  z-index: 10;
  cursor: ew-resize;
  transform: translateX(-50%);
  box-shadow: 0 0 8px rgba(var(--color-sage-rgb), 0.4);
}

.slider-handle-button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  background: var(--bg-dark);
  border: 2px solid var(--color-cyan);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--color-cyan);
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(44, 40, 37, 0.15), 0 0 10px rgba(var(--color-sage-rgb), 0.2);
  transition: transform 0.2s ease;
}

.comparison-slider-handle:hover .slider-handle-button {
  transform: translate(-50%, -50%) scale(1.08);
}

/* --- Services Grid --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-glow);
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: 0;
  pointer-events: none;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--color-sage-rgb), 0.15);
  box-shadow: var(--glass-shadow);
}

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

.service-card-content {
  position: relative;
  z-index: 1;
}

.service-icon {
  width: 60px;
  height: 60px;
  background: rgba(var(--color-sage-rgb), 0.05);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-cyan);
  font-size: 1.8rem;
  margin-bottom: 25px;
  border: 1px solid rgba(var(--color-sage-rgb), 0.1);
}

.service-card h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- Portfolio Showcase --- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.portfolio-item {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  cursor: pointer;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(0deg, rgba(43, 40, 37, 0.8) 0%, rgba(43, 40, 37, 0.1) 70%, transparent 100%);
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  transition: var(--transition-smooth);
}

.portfolio-overlay h3, .portfolio-overlay span {
  color: #fff; /* White text over dark overlay */
}

.portfolio-item:hover img {
  transform: scale(1.06);
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-info h3 {
  font-size: 1.3rem;
  margin-bottom: 5px;
}

.portfolio-info span {
  color: var(--color-cyan);
  font-size: 0.85rem;
  font-weight: 800; /* Peso aumentado */
  text-transform: uppercase;
}

/* --- Contact & CTA --- */
.contact-section {
  background: radial-gradient(ellipse at bottom, rgba(var(--color-champagne-rgb), 0.08) 0%, var(--bg-dark) 70%);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.contact-info h2 {
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.contact-info p {
  color: var(--text-muted);
  margin-bottom: 30px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 12px; /* Reduced from 20px for closer layout */
}

.info-item h4 {
  margin: 0 0 2px 0; /* Tighten heading margin */
}

.info-item p {
  margin: 0; /* Remove default block margins under paragraphs */
}

.info-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(var(--color-sage-rgb), 0.03);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-cyan);
  font-size: 1.2rem;
}

.contact-form-container {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--glass-shadow);
}

.form-group {
  margin-bottom: 25px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  background: rgba(43, 40, 37, 0.015);
  border: 1px solid rgba(53, 78, 61, 0.1);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text-main);
  font-family: var(--font-body);
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-cyan);
  background: rgba(255,255,255,0.8);
  box-shadow: 0 0 10px rgba(var(--color-sage-rgb), 0.05);
}

/* --- Footer Integrado (Minimalista y compacto dentro de Metodología) --- */
.integrated-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 15px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background-color: rgba(12, 13, 16, 0.95);
  z-index: 10;
}

.footer-container-integrated {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: #94a3b8;
  letter-spacing: 0.05em;
}

.footer-container-integrated .footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-container-integrated .footer-brand {
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.1em;
}

.footer-container-integrated .footer-separator {
  color: rgba(255, 255, 255, 0.15);
}

.footer-container-integrated .footer-ruc {
  opacity: 0.8;
}

.footer-container-integrated .footer-rights {
  opacity: 0.6;
}

@media (max-width: 768px) {
  .footer-container-integrated {
    flex-direction: column;
    gap: 8px;
    text-align: center;
    padding: 0 20px;
  }
}

/* --- Responsive Adjustments --- */
@media (max-width: 991px) {
  .hero h1 {
    font-size: 3rem;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
  .section-header h2 {
    font-size: 2rem !important;
  }
  
  /* Force small header menu & logo size on mobile home/all states */
  .site-header {
    padding: 6px 0 !important;
    background: rgba(255, 255, 255, 0.4) !important; /* Frosted glass */
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04) !important;
  }
  .header-container {
    height: 46px !important;
  }
  .logo img {
    height: 36px !important;
  }

  /* Inline labels next to circular arrow buttons on mobile */
  .project-slide-footer-nav {
    justify-content: center !important;
    gap: 30px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .project-nav-wrapper-custom {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer;
  }
  .prev-wrapper {
    flex-direction: row-reverse !important; /* Button on left, Label on right */
  }
  .next-wrapper {
    flex-direction: row-reverse !important; /* Label on left, Button on right */
  }
  .static-nav-label {
    display: inline-block !important;
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    color: var(--text-main) !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    transition: color 0.3s ease !important;
    line-height: 1 !important;
    margin: 0 !important;
  }
  .project-nav-wrapper-custom:hover .static-nav-label {
    opacity: 1 !important;
    color: var(--color-cyan) !important;
  }

  .comparison-container {
    height: 320px;
  }
  .tour-wrapper {
    display: none !important;
  }
  .tour-tab-btn, .tour-tab-btn.active {
    background: #1a1a1a !important;
    border: 1px solid #1a1a1a !important;
    color: #ffffff !important;
    box-shadow: none !important;
  }
  .tour-tab-btn:hover, .tour-tab-btn.active:hover {
    background: var(--color-cyan) !important;
    border-color: var(--color-cyan) !important;
    color: #1a1a1a !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 243, 255, 0.25) !important;
  }
  .footer-container {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  
  /* Mobile Gallery Drawer Overrides */
  .gallery-tabs {
    display: none !important;
  }
  .drawer-logo {
    position: absolute !important;
    left: auto !important;
    right: 20px !important;
    transform: translateY(-50%) !important;
    top: 50% !important;
  }
  
  /* Mobile Services Video Lightbox Controls Overlay */
  .lightbox-video-wrapper video {
    border-radius: 12px !important;
    max-height: 80vh !important;
  }
  .custom-video-controls {
    position: absolute !important;
    bottom: 12px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: calc(100% - 24px) !important;
    margin-top: 0 !important;
    background: rgba(12, 13, 16, 0.75) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    padding: 8px 12px !important;
    gap: 8px !important;
    pointer-events: auto !important;
    z-index: 9999 !important;
  }
}

@media (max-width: 480px) {
  .comparison-container {
    height: 220px;
  }
}

/* --- Masonry Grid (Original Format) --- */
.portfolio-grid-masonry {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
}
.portfolio-item-masonry {
  height: clamp(320px, 38vh, 450px);
  flex-grow: var(--aspect-ratio, 1.5);
  flex-basis: calc(var(--aspect-ratio, 1.5) * clamp(320px, 38vh, 450px));
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  position: relative;
  cursor: pointer;
  background: var(--bg-card);
  box-shadow: 0 4px 15px rgba(44, 40, 37, 0.03);
}
.portfolio-item-masonry img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.portfolio-item-masonry:hover img {
  transform: scale(1.05);
}
.portfolio-grid-spacer {
  flex-grow: 9999;
  flex-basis: 300px;
  height: 0;
  order: 99999; /* Ensure spacer is always rendered last regardless of JS shuffle */
}
@media (max-width: 991px) {
  .portfolio-item-masonry {
    height: clamp(240px, 30vh, 320px);
    flex-basis: calc(var(--aspect-ratio, 1.5) * clamp(240px, 30vh, 320px));
  }
}
@media (max-width: 576px) {
  .portfolio-grid-masonry {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
  .portfolio-item-masonry {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    aspect-ratio: var(--aspect-ratio, 1.5);
    flex-grow: 0;
    flex-basis: auto;
  }
  .portfolio-grid-spacer {
    display: none !important;
  }
}

/* --- Portfolio Sliding Carousel --- */
.portfolio-slider-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  perspective: 1800px;
  transition: height 1.2s cubic-bezier(0.76, 0, 0.24, 1);
  padding-top: 10px; /* Added to prevent header navigation buttons from clipping on hover scale */
}
.portfolio-slides-wrapper {
  display: flex;
  align-items: flex-start;
  width: 200%;
  transition: transform 1.2s cubic-bezier(0.76, 0, 0.24, 1);
  transform-style: preserve-3d;
}
.portfolio-slide {
  width: 50%;
  flex-shrink: 0;
  box-sizing: border-box;
  transition: transform 1.2s cubic-bezier(0.76, 0, 0.24, 1), opacity 1.2s ease, filter 1.2s ease, visibility 1.2s;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}
.portfolio-slide.inactive {
  opacity: 0;
  filter: blur(8px);
  transform: scale(0.9) rotateY(-8deg);
  pointer-events: none;
  visibility: hidden;
}
.portfolio-slide.active {
  opacity: 1;
  filter: blur(0);
  transform: scale(1) rotateY(0deg);
  pointer-events: auto;
  visibility: visible;
}

/* --- Expandable Gallery --- */
.expandable-gallery {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
}
.expandable-gallery.expanded {
  max-height: 5000px;
  opacity: 1;
  margin-top: 25px;
}

/* --- Modern Animated Header --- */
.site-header {
  border-bottom: 1px solid rgba(53, 78, 61, 0.04);
}
.site-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-cyan), var(--color-violet), transparent);
  background-size: 200% 100%;
  animation: borderGlow 6s linear infinite;
  opacity: 0.3;
}
@keyframes borderGlow {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}
.scroll-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 5px; /* Más gruesita como solicitó el usuario */
  background: var(--gradient-tech);
  width: 0%;
  z-index: 1001;
  transition: width 0.1s ease, opacity 0.4s ease, visibility 0.4s ease;
  box-shadow: 0 0 6px rgba(var(--color-sage-rgb), 0.3);
  opacity: 0;
  visibility: hidden;
}

.site-header.scrolled .scroll-progress {
  opacity: 1;
  visibility: visible;
}
.nav-menu li {
  animation: slideInMenu 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(-10px);
}
.nav-menu li:nth-child(1) { animation-delay: 0.1s; }
.nav-menu li:nth-child(2) { animation-delay: 0.18s; }
.nav-menu li:nth-child(3) { animation-delay: 0.26s; }
.nav-menu li:nth-child(4) { animation-delay: 0.34s; }
.nav-menu li:nth-child(5) { animation-delay: 0.42s; }
@keyframes slideInMenu {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Dynamic Glowing Background Blobs --- */
.glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.05; /* Softened light blobs */
  z-index: 1;
  pointer-events: none;
  animation: floatBlob 22s infinite alternate ease-in-out;
}
.glow-blob-1 {
  top: 15%;
  left: 5%;
  width: 350px;
  height: 350px;
  background: var(--color-cyan);
}
.glow-blob-2 {
  bottom: 25%;
  right: 10%;
  width: 450px;
  height: 450px;
  background: var(--color-violet);
  animation-duration: 28s;
  animation-delay: -6s;
}
@keyframes floatBlob {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(40px, -50px) scale(1.1);
  }
  100% {
    transform: translate(-20px, 25px) scale(0.95);
  }
}

/* --- Gallery Tabs --- */
.gallery-tabs {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
}
.gallery-tab-btn {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 12px 28px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 10px rgba(44,40,37,0.03);
}
.gallery-tab-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(var(--color-sage-rgb), 0.15);
  transform: translateY(-1px);
}
.gallery-tab-btn.active {
  background: transparent;
  color: var(--color-cyan);
  border: 1px solid var(--color-cyan);
  font-weight: 800; /* Peso aumentado para mejor legibilidad */
  box-shadow: 0 4px 10px rgba(var(--color-sage-rgb), 0.15);
}
.gallery-tab-content {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.gallery-tab-content.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- Symmetrical Project Layout --- */
.project-intro {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 30px;
  margin-bottom: 20px; /* Reduced from 50px to shift things higher */
}
.project-left-column {
  flex: 44; /* Dynamic flex width proportion */
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.project-desc {
  width: 100%;
  height: 410px; /* Reduced from 450px to prevent viewport overflow clipping */
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 35px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  box-shadow: var(--glass-shadow);
}
.project-desc h2 {
  font-size: 1.6rem; /* Reduced size to be more subtle */
  margin-bottom: 12px;
  color: var(--text-main);
  font-weight: 600; /* Lighter weight (Semi Bold) to pull less visual attention */
}
.project-desc p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
}
.project-video {
  flex: 67; /* Dynamic flex width proportion */
  min-width: 0;
  height: 410px; /* Reduced from 450px to prevent viewport overflow clipping */
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(44, 40, 37, 0.08);
  box-sizing: border-box;
}
@media (max-width: 1024px) {
  .project-intro {
    flex-direction: column;
    align-items: center;
  }
  .project-left-column, .project-desc, .project-video {
    flex: none; /* Reset flex values on mobile */
    width: 100%;
    max-width: 500px;
    height: auto;
    aspect-ratio: auto;
  }
  .project-left-column {
    order: 2;
  }
  .project-video {
    order: 1;
    aspect-ratio: 3/2; /* Formato horizontal en pantallas medianas/móviles */
  }
  .project-desc {
    padding: 30px;
    gap: 20px;
  }
}

/* --- Site Preloader (Text Loop Screen) --- */
/* Bloquear scroll durante el preloader */
body:not(.preloader-done) {
  overflow: hidden !important;
  height: 100vh !important;
  touch-action: none !important;
}
html:has(body:not(.preloader-done)) {
  overflow: hidden !important;
  height: 100vh !important;
}

.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000000; /* Pantalla negra */
  display: flex;
  flex-direction: column; /* Stack circle and percentage vertically */
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Unified Circular Preloader Styles */
.preloader-ring-wrapper {
  position: relative;
  width: 240px;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotate(-90deg); /* Start progress from the top */
}

.progress-ring__circle {
  stroke-dasharray: 679;
  stroke-dashoffset: 679;
  transition: stroke-dashoffset 0.16s linear;
}

.preloader-logo-container {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.desktop-preloader-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.mobile-preloader-logo {
  display: none;
  position: absolute;
  width: 60px;
  height: 60px;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.mobile-preloader-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
}

.preloader-percentage {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.05em;
  opacity: 0.9;
  margin-top: 20px;
  text-align: center;
}

/* Responsive preloader overrides */
@media (max-width: 768px) {
  .preloader-ring-wrapper {
    width: 140px;
    height: 140px;
  }
  .desktop-preloader-logo {
    display: none !important;
  }
  .mobile-preloader-logo {
    display: flex !important;
  }
}

.preloader-title-word {
  font-size: 2.2rem; /* Compact size to fit inside the 240px ring */
  font-weight: 800;
  text-transform: none;
  line-height: 1;
  color: #ffffff;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Preloader Kinetic Logo Typography Animations */
.preloader-ray,
.preloader-dash,
.preloader-b {
  display: inline-block;
  opacity: 0;
}

/* "Ray" appears at 0.8s */
.preloader-ray {
  transform: translateX(80px);
  filter: blur(5px);
  animation: preloaderRayReveal 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.8s;
}

/* Hyphen "-" flies in from the right at 1.4s */
.preloader-dash {
  transform: translateX(120px) scaleX(3);
  filter: blur(8px);
  animation: preloaderDashIn 0.35s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  animation-delay: 1.4s;
}

.preloader-b-wrapper {
  position: relative;
  display: inline-block;
}

/* "B" flies in from the right at 1.9s */
.preloader-b {
  transform: translateX(250px) scaleX(2);
  filter: blur(10px);
  animation: preloaderBInHardStop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
  animation-delay: 1.9s;
}

/* Motion trail clones for the "B" */
.preloader-b-trail {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  color: var(--color-cyan);
  pointer-events: none;
  font-family: inherit;
  font-weight: inherit;
  font-size: inherit;
}

.preloader-b-trail.trail-1 {
  animation: preloaderBTrail 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
  animation-delay: 1.87s;
}

.preloader-b-trail.trail-2 {
  animation: preloaderBTrail 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
  animation-delay: 1.84s;
}

.preloader-b-trail.trail-3 {
  animation: preloaderBTrail 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
  animation-delay: 1.81s;
}

@keyframes preloaderRayReveal {
  0% {
    opacity: 0;
    transform: translateX(80px);
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0px);
  }
}

@keyframes preloaderDashIn {
  0% {
    opacity: 0;
    transform: translateX(120px) scaleX(3);
    filter: blur(8px);
  }
  75% {
    opacity: 0.8;
    transform: translateX(-5px) scaleX(1.3);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scaleX(1);
    filter: blur(0px);
  }
}

@keyframes preloaderBInHardStop {
  0% {
    opacity: 0;
    transform: translateX(250px) scaleX(2);
    filter: blur(10px);
  }
  65% {
    opacity: 1;
    transform: translateX(-18px) scaleX(0.8);
    filter: blur(2px);
  }
  85% {
    transform: translateX(4px) scaleX(1.05);
    filter: blur(0px);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scaleX(1);
    filter: blur(0px);
  }
}

@keyframes preloaderBTrail {
  0% {
    opacity: 0;
    transform: translateX(250px) scaleX(2);
    filter: blur(10px);
  }
  20% {
    opacity: 0.4;
    color: rgba(255, 255, 255, 0.2);
  }
  50% {
    opacity: 0.15;
    color: var(--color-cyan);
  }
  75% {
    opacity: 0.05;
    transform: translateX(-10px) scaleX(0.95);
    filter: blur(4px);
  }
  100% {
    opacity: 0;
    transform: translateX(0) scaleX(1);
    filter: blur(0px);
  }
}

@media (max-width: 991px) {
  .preloader-title-word {
    font-size: 3rem; /* Replica la responsividad del hero h1 */
  }
}

@media (max-width: 768px) {
  .preloader-title-word {
    font-size: 2.5rem; /* Replica la responsividad del hero h1 */
  }
}

/* --- Fullscreen Video style (forces original uncropped ratio in fullscreen) --- */
video:fullscreen {
  object-fit: contain !important;
  background-color: #000000;
}
video:-webkit-full-screen {
  object-fit: contain !important;
  background-color: #000000;
}
video:-moz-full-screen {
  object-fit: contain !important;
  background-color: #000000;
}
video:-ms-fullscreen {
  object-fit: contain !important;
  background-color: #000000;
}

/* --- Fullscreen Overlay Menu --- */
.fullscreen-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(255, 255, 255, 0.98); /* White overlay matching clear minimalist design */
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.menu-close-btn {
  position: absolute;
  top: 30px;
  right: 40px;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 3.5rem;
  font-weight: 300;
  cursor: pointer;
  line-height: 1;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
}

.menu-close-btn:hover {
  transform: rotate(90deg);
  color: var(--color-cyan);
}

.fullscreen-menu-content {
  text-align: center;
  max-width: 600px;
  width: 90%;
}

.fullscreen-nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fullscreen-nav-menu li {
  margin: 20px 0;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fullscreen-menu.active .fullscreen-nav-menu li {
  opacity: 1;
  transform: translateY(0);
}

.fullscreen-menu.active .fullscreen-nav-menu li:nth-child(1) { transition-delay: 0.1s; }
.fullscreen-menu.active .fullscreen-nav-menu li:nth-child(2) { transition-delay: 0.18s; }
.fullscreen-menu.active .fullscreen-nav-menu li:nth-child(3) { transition-delay: 0.26s; }
.fullscreen-menu.active .fullscreen-nav-menu li:nth-child(4) { transition-delay: 0.34s; }
.fullscreen-menu.active .fullscreen-nav-menu li:nth-child(5) { transition-delay: 0.42s; }
.fullscreen-menu.active .fullscreen-nav-menu li:nth-child(6) { transition-delay: 0.5s; }

.fullscreen-nav-menu a {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  text-decoration: none;
  position: relative;
  display: inline-block;
  transition: color 0.3s ease, transform 0.3s ease;
}

.fullscreen-nav-menu a:hover {
  color: var(--color-cyan);
  transform: scale(1.05);
}

.fullscreen-nav-menu li.client-portal-item {
  margin-top: 35px;
}
.fullscreen-nav-menu a.btn-client-portal {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-cyan);
  background: transparent;
  border: 2px solid var(--color-cyan);
  padding: 12px 36px;
  border-radius: 30px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(192, 108, 63, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.fullscreen-nav-menu a.btn-client-portal:hover {
  background: var(--color-cyan);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(192, 108, 63, 0.4);
}
.fullscreen-nav-menu a.btn-client-portal i {
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .fullscreen-nav-menu a {
    font-size: 1.6rem;
  }
  .fullscreen-nav-menu a.btn-client-portal {
    font-size: 0.85rem;
    padding: 10px 28px;
  }
  .fullscreen-nav-menu li.client-portal-item {
    margin-top: 25px;
  }
  .menu-close-btn {
    top: 20px;
    right: 25px;
    font-size: 2.8rem;
  }
}

/* --- Virtual Tour Placeholder --- */
.tour-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e1c19 0%, #2b2825 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
}

.tour-placeholder-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('images/tour-bg.jpg') center/cover no-repeat;
  opacity: 0.45;
  filter: blur(25px);
  transform: scale(1.15); /* pre-scale para evitar los bordes blancos del blur */
  transition: var(--transition-smooth);
}

.tour-placeholder:hover .tour-placeholder-overlay {
  opacity: 0.55;
  transform: scale(1.25);
}

.tour-placeholder-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #ffffff;
  padding: 30px;
  max-width: 500px;
}

.tour-play-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2.2rem;
  color: #ffffff;
  transition: var(--transition-smooth);
}

.tour-placeholder:hover .tour-play-icon {
  background: var(--color-cyan);
  border-color: var(--color-cyan);
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(192, 108, 63, 0.4);
}

.tour-placeholder-content h3 {
  font-size: 1.8rem;
  color: #ffffff;
  margin-bottom: 8px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tour-placeholder-content p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  margin-bottom: 25px;
}

.tour-placeholder-content .btn {
  pointer-events: none;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 10px 24px;
}


/* ==========================================
   CLIENTS SECTION — Premium Marquee (Light Minimalist)
   ========================================== */

.clients-section {
  padding: 100px 0 110px;
  overflow: hidden;
  background: var(--bg-dark); /* White / #ffffff */
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
}

.clients-section .section-header {
  margin-bottom: 50px;
}

.clients-marquee-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-top: 10px;
  /* Fade edges left and right */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.clients-marquee-track {
  display: flex;
  align-items: center;
  gap: 0;
  width: max-content;
  animation: marqueeScroll 36s linear infinite;
  will-change: transform;
}

.clients-marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.client-logo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 60px;
  flex-shrink: 0;
  border-right: 1px solid rgba(0, 0, 0, 0.05);
  cursor: default;
  min-width: 240px;
  text-align: center;
}

.client-logo-img {
  height: 48px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  filter: grayscale(100%) opacity(35%);
  transition: filter 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.client-logo-item:hover .client-logo-img {
  filter: grayscale(0%) opacity(100%);
  transform: translateY(-4px);
}

/* Specific logos: Invert white logos so they are dark charcoal on a light background */
.client-logo-img--invert {
  filter: invert(1) grayscale(100%) opacity(35%);
}

.client-logo-item:hover .client-logo-img--invert {
  filter: invert(1) grayscale(100%) opacity(90%);
}

/* Specific logos: Scale up Lateral logo since it has high internal padding, and multiply JPG background */
.client-logo-img--lateral {
  transform: scale(1.6);
  mix-blend-mode: multiply;
  filter: grayscale(100%) opacity(40%);
}

.client-logo-item:hover .client-logo-img--lateral {
  filter: grayscale(0%) opacity(100%);
  transform: translateY(-4px) scale(1.6);
}

.client-logo-name {
  margin-top: 10px;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.client-logo-item:hover .client-logo-name {
  opacity: 0.75;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .client-logo-item {
    padding: 16px 40px;
    min-width: 180px;
  }
  .client-logo-img {
    height: 38px;
    max-width: 120px;
  }
  .client-logo-name {
    font-size: 0.6rem;
    margin-top: 6px;
  }
}

/* --- Premium Lightbox Gallery --- */
.lightbox-dialog {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 100vw;
  max-height: 100vh;
  width: 100%;
  height: 100%;
  overflow: hidden;
  outline: none;
}

.lightbox-dialog::backdrop {
  background: rgba(15, 14, 13, 0.45); /* Elegant translucent dark glass tint */
  backdrop-filter: blur(20px) saturate(160%); /* Deep blur and color saturation for frosted glass texture */
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  transition: backdrop-filter 0.5s ease, background-color 0.5s ease;
}

.lightbox-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 40px;
}

.lightbox-image-wrapper {
  max-width: 85%;
  max-height: 85%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.lightbox-video-wrapper {
  max-width: 85%;
  max-height: 80vh;
  width: 100%;
  display: flex;
  flex-direction: column; /* Stack video and controls vertically */
  justify-content: center;
  align-items: center;
  position: relative;
}

.lightbox-video-wrapper video {
  width: 100%;
  max-height: 72vh; /* Reduced from 80vh to reserve height for controls below */
  outline: none;
  border-radius: 12px 12px 0 0; /* Rounded top corners only since controls are below */
  background: #000;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.4);
}

/* Custom premium controls overlay sitting under the video */
.custom-video-controls {
  position: relative; /* Normal flow below the video */
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px; /* Gap between video and controls */
  background: rgba(12, 13, 16, 0.85); /* Slightly darker for contrast */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 0 12px 12px; /* Rounded bottom corners to merge with video container */
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
  opacity: 1; /* Always visible beneath the video */
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.control-btn {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.control-btn:hover {
  color: #a855f7; /* Nice modern accent purple */
  transform: scale(1.1);
}

.control-time {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.8rem;
  font-family: monospace;
  min-width: 42px;
  text-align: center;
}

.control-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.2);
  height: 4px;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  transition: background 0.3s ease;
}

.control-slider::-webkit-slider-runnable-track {
  background: transparent;
  height: 4px;
}

.control-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  margin-top: -4px;
  transition: transform 0.1s ease;
}

.control-slider::-webkit-slider-thumb:hover {
  transform: scale(1.3);
  background: #a855f7;
}

#lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.lightbox-dialog[open] #lightbox-img {
  transform: scale(1);
  opacity: 1;
}

/* Lightbox Controls */
.lightbox-close-btn {
  position: absolute;
  top: 30px;
  right: 30px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 3.5rem;
  font-weight: 200;
  cursor: pointer;
  z-index: 10;
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.2s ease;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.lightbox-close-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Suppress browser focus outlines in Lightbox */
.lightbox-dialog:focus,
.lightbox-dialog:focus-visible,
.lightbox-dialog:active,
.lightbox-close-btn:focus,
.lightbox-close-btn:focus-visible,
.lightbox-close-btn:active,
.lightbox-nav-btn:focus,
.lightbox-nav-btn:focus-visible,
.lightbox-nav-btn:active {
  outline: none !important;
  box-shadow: none !important;
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 3.5rem;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9;
  opacity: 0.6;
  transition: opacity 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
  padding-bottom: 7px; /* Chevron offset adjustment */
  user-select: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.lightbox-nav-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-50%) scale(1.05);
}

.lightbox-nav-btn.prev-btn {
  left: -80px;
}

.lightbox-nav-btn.next-btn {
  right: -80px;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .lightbox-content {
    padding: 20px;
  }
  .lightbox-image-wrapper {
    max-width: 95%;
    max-height: 75%;
  }
  .lightbox-nav-btn {
    width: 50px;
    height: 50px;
    font-size: 2.2rem;
    padding-bottom: 5px;
  }
  .lightbox-nav-btn.prev-btn {
    left: 10px;
  }
  .lightbox-nav-btn.next-btn {
    right: 10px;
  }
  .lightbox-close-btn {
    top: 15px;
    right: 15px;
    font-size: 2.5rem;
  }
}

/* --- Methodology Timeline Section (Contrasting Premium Dark Block) --- */
.methodology-section {
  background-color: #0c0d10; /* Deep dark block for visual contrast */
  color: #e2e8f0;
  padding: 100px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.methodology-section h2 {
  color: #ffffff;
}

.methodology-section p {
  color: #94a3b8;
}

/* Pre-requisite Box (Punto 0) */
.methodology-prereq {
  background: rgba(255, 255, 255, 0.02); /* Glassmorphic dark card */
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 30px;
  margin: 0 auto 60px auto;
  max-width: 768px;
  text-align: center;
  position: relative;
  z-index: 2;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
}

.methodology-prereq:hover {
  border-color: rgba(59, 130, 246, 0.4); /* Blue glow on point 0 */
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(59, 130, 246, 0.12);
}

.prereq-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border-radius: 50%;
  margin: 0 auto 12px auto;
}

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

.methodology-prereq h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 5px;
  font-family: var(--font-heading);
}

.methodology-prereq p {
  color: #94a3b8;
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0;
}

.methodology-prereq .highlight {
  color: #f8fafc;
  font-weight: 500;
}

/* Timeline Main Wrapper */
.timeline-wrapper {
  position: relative;
  width: 100%;
  padding-top: 40px;
}

/* Desktop Horizontal Timeline Line */
.timeline-line-horizontal {
  position: absolute;
  top: 3.5rem; /* Reduced from 5rem for more compact layout */
  left: 12.5%;
  right: 12.5%;
  height: 24px; /* Tall enough to prevent vertical clipping of chevrons */
  transform: translateY(-50%);
  z-index: 1;
  overflow: hidden;
}

.timeline-line-horizontal::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 2px;
  background: linear-gradient(to right, #3b82f6 0%, #a855f7 33%, #10b981 66%, #f59e0b 100%);
  opacity: 0.3;
}

/* --- Animated Chevrons moving horizontally with Trail (Full Timeline Loop) --- */
.timeline-arrow-with-trail {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
}

.arrow-trail {
  width: 60px;
  height: 2px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.25) 100%);
  margin-right: -1px;
}

.timeline-arrow-with-trail i {
  color: #fff;
  font-size: 1.1rem;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 15px rgba(255, 255, 255, 0.4);
}

.arrow-trail-1 {
  animation: slideFullHorizontal 9s linear infinite;
  animation-delay: 0s;
}

.arrow-trail-2 {
  animation: slideFullHorizontal 9s linear infinite;
  animation-delay: -3s; /* Started 3s in the past (Phase 2 at t=0) */
}

.arrow-trail-3 {
  animation: slideFullHorizontal 9s linear infinite;
  animation-delay: -6s; /* Started 6s in the past (Phase 3 at t=0) */
}

@keyframes slideFullHorizontal {
  0% { left: 0%; opacity: 0; }
  3% { opacity: 1; }
  97% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* Mobile Vertical Timeline Line */
.timeline-line-vertical {
  position: absolute;
  left: 2.25rem;
  top: 40px;
  bottom: 24px;
  width: 24px; /* Wide enough to prevent horizontal clipping of chevrons */
  transform: translateX(-50%);
  z-index: 1;
  overflow: hidden;
}

.timeline-line-vertical::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: linear-gradient(to bottom, #3b82f6 0%, #a855f7 33%, #10b981 66%, #f59e0b 100%);
  opacity: 0.3;
}

/* --- Animated Chevrons moving vertically with Trail (Full Timeline Loop) --- */
.timeline-arrow-with-trail-vert {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
}

.arrow-trail-vert {
  width: 2px;
  height: 60px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.25) 100%);
  margin-bottom: -1px;
}

.timeline-arrow-with-trail-vert i {
  color: #fff;
  font-size: 1.1rem;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 15px rgba(255, 255, 255, 0.4);
}

.arrow-trail-vert-1 {
  animation: slideFullVertical 9s linear infinite;
  animation-delay: 0s;
}

.arrow-trail-vert-2 {
  animation: slideFullVertical 9s linear infinite;
  animation-delay: -3s; /* Started 3s in the past (Phase 2 at t=0) */
}

.arrow-trail-vert-3 {
  animation: slideFullVertical 9s linear infinite;
  animation-delay: -6s; /* Started 6s in the past (Phase 3 at t=0) */
}

@keyframes slideFullVertical {
  0% { top: 0%; opacity: 0; }
  3% { opacity: 1; }
  97% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* Timeline Grid (4 phases side-by-side on desktop) */
.timeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  width: 100%;
  position: relative;
  z-index: 10;
}

/* Column positioning */
.timeline-col {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Badges styling */
.timeline-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid #0c0d10;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  background: #0c0d10;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  font-family: var(--font-heading);
}

.phase-1 .timeline-badge {
  border-color: #3b82f6;
  color: #3b82f6;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.phase-2 .timeline-badge {
  border-color: #a855f7;
  color: #a855f7;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

.phase-3 .timeline-badge {
  border-color: #10b981;
  color: #10b981;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.phase-4 .timeline-badge {
  border-color: #f59e0b;
  color: #f59e0b;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.timeline-badge-desktop {
  position: absolute;
  top: 16px; /* Reduced from 40px for more compact vertical layout */
  left: 50%;
  transform: translateX(-50%);
}

.timeline-badge-mobile {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}

/* Cards styling */
.timeline-card {
  background: rgba(255, 255, 255, 0.02); /* Glassmorphic card */
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 16px 20px; /* Reduced from 25px */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  z-index: 20;
  text-align: center;
}

@media (min-width: 992px) {
  .timeline-card {
    margin-top: 64px; /* Push card below desktop badges (reduced from 96px) */
  }
}

/* Hover highlights for cards & badges */
.timeline-col.phase-1:hover .timeline-card {
  border-color: #3b82f6 !important;
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.12);
  transform: translateY(-4px);
}

.timeline-col.phase-2:hover:not(:has(.timeline-warning-badge:hover)) .timeline-card {
  border-color: #a855f7 !important;
  box-shadow: 0 8px 30px rgba(168, 85, 247, 0.12);
  transform: translateY(-4px);
}

.timeline-col.phase-3:hover:not(:has(.timeline-warning-badge:hover)) .timeline-card {
  border-color: #10b981 !important;
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.12);
  transform: translateY(-4px);
}

.timeline-col.phase-4:hover:not(:has(.timeline-warning-badge:hover)) .timeline-card {
  border-color: #f59e0b !important;
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.12);
  transform: translateY(-4px);
}

.timeline-col.phase-1:hover .timeline-badge-desktop {
  transform: translateX(-50%) scale(1.1);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}
.timeline-col.phase-2:hover:not(:has(.timeline-warning-badge:hover)) .timeline-badge-desktop {
  transform: translateX(-50%) scale(1.1);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
}
.timeline-col.phase-3:hover:not(:has(.timeline-warning-badge:hover)) .timeline-badge-desktop {
  transform: translateX(-50%) scale(1.1);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}
.timeline-col.phase-4:hover:not(:has(.timeline-warning-badge:hover)) .timeline-badge-desktop {
  transform: translateX(-50%) scale(1.1);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

.timeline-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 0;
  margin-bottom: 8px;
  font-family: var(--font-heading);
}

.timeline-card p {
  color: #94a3b8;
  font-size: 0.8rem;
  line-height: 1.5;
  margin: 0;
  font-family: var(--font-body);
}

/* Phase tags */
.phase-tag {
  display: block;
  font-family: monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.phase-1 .phase-tag { color: #3b82f6; }
.phase-2 .phase-tag { color: #a855f7; }
.phase-3 .phase-tag { color: #10b981; }
.phase-4 .phase-tag { color: #f59e0b; }

/* Desktop Floating Warning Badges */
.timeline-warning-desktop {
  position: absolute;
  top: -28px;
  left: -50%;
  right: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  pointer-events: none;
}

.timeline-warning-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #14151a; /* slightly lighter than background */
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  color: #a1a1aa; /* Lighter zinc-400 for high readability */
  font-family: var(--font-body);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  pointer-events: auto;
  cursor: help;
  transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
  white-space: nowrap;
}

.timeline-warning-badge:hover {
  color: #f59e0b; /* Amber warning text on hover */
  border-color: rgba(245, 158, 11, 0.4);
  background-color: #1e1b15;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

.warning-icon {
  width: 12px;
  height: 12px;
  display: block;
}

/* Mobile Warning position */
.timeline-warning-mobile {
  position: absolute;
  top: -24px;
  left: 2.25rem;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}
.timeline-warning-mobile .warning-icon {
  transform: rotate(90deg);
}


/* Policies Box */
.methodology-policies {
  margin-top: 15px; /* Reduced from 30px */
  background: #0c0d10; /* Solid dark background to match section contrast */
  border: 1px solid rgba(255, 255, 255, 0.15); /* Static semi-bright white border */
  border-radius: 16px;
  padding: 12px 16px; /* Reduced from 16px */
  z-index: 2;
  position: relative;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.policies-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px; /* Reduced from 12px */
}

.policies-icon {
  color: #71717a;
}

.policies-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.policies-header h4 {
  font-size: 0.9rem; /* Slightly smaller h4 font size */
  font-weight: 700;
  color: #e4e4e7;
  margin: 0;
  font-family: var(--font-heading);
}

.policies-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px; /* Reduced from 16px */
}

.policy-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 10px 14px; /* Reduced padding */
  border-radius: 12px;
  font-size: 0.82rem; /* Shrunk text size */
  line-height: 1.35;
  color: #a1a1aa;
}

.policy-box strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 4px;
  color: #e4e4e7;
}

.policy-box p {
  margin: 0;
  color: #a1a1aa;
  font-size: 0.82rem;
  line-height: 1.35;
}

.policy-box--accent {
  border-left: 3px solid rgba(255, 255, 255, 0.2);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

/* Highlight "Política de Avance Progresivo" when warning badges are hovered */
section#metodologia:has(.timeline-warning-badge:hover) .policy-box--accent {
  background: rgba(245, 158, 11, 0.06) !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
  border-left: 3px solid #f59e0b !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 0 15px rgba(245, 158, 11, 0.15);
  transform: translateY(-2px);
}

.policy-box strong {
  display: block;
  color: #f4f4f5;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-family: var(--font-heading);
}

.policy-box p {
  color: #a1a1aa;
  font-size: 0.8rem;
  line-height: 1.5;
  margin: 0;
  font-family: var(--font-body);
}

.policy-box .highlight-accent {
  color: #ffffff;
  font-weight: 600;
}

/* Visibility triggers */
@media (min-width: 992px) {
  .timeline-line-vertical,
  .timeline-chevrons-vertical,
  .timeline-badge-mobile,
  .timeline-warning-mobile {
    display: none !important;
  }
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .timeline-line-horizontal,
  .timeline-chevrons-horizontal,
  .timeline-badge-desktop,
  .timeline-warning-desktop {
    display: none !important;
  }
  
  .timeline-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  
  .timeline-col {
    padding-left: 64px; /* Space for mobile badges */
  }
  
  .timeline-card {
    text-align: left !important;
  }
  
  .policies-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  /* Mobile hover alignment overrides */
  .timeline-col.phase-1:hover .timeline-badge-mobile,
  .timeline-col.phase-2:hover:not(:has(.timeline-warning-badge:hover)) .timeline-badge-mobile,
  .timeline-col.phase-3:hover:not(:has(.timeline-warning-badge:hover)) .timeline-badge-mobile,
  .timeline-col.phase-4:hover:not(:has(.timeline-warning-badge:hover)) .timeline-badge-mobile {
    transform: translateY(-50%) scale(1.1); /* Prevent horizontal shifting on mobile hover */
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  }
}

/* Tour Tabs Switcher Styling (Unified with Gallery Tabs style) */
.tour-tabs-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 35px;
}

.tour-tabs {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.tour-tab-btn {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: var(--text-main);
  padding: 14px 28px;
  border-radius: 8px; /* Matches project buttons */
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem; /* Matches project buttons */
  cursor: pointer;
  transition: var(--transition-smooth);
  outline: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tour-tab-btn i {
  font-size: 1rem;
}

.tour-tab-btn:hover {
  background: #1a1a1a;
  border-color: #1a1a1a;
  transform: translateY(-2px);
  color: #ffffff;
}

.tour-tab-btn.active {
  background: #1a1a1a !important;
  color: #ffffff !important;
  border: 1px solid #1a1a1a !important;
  font-weight: 600;
  box-shadow: none;
}

.tour-tab-btn.active:hover {
  background: var(--color-cyan) !important;
  border-color: var(--color-cyan) !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(var(--color-sage-rgb), 0.25);
}

/* Responsive adjustment for tabs */
@media (max-width: 576px) {
  .tour-tabs {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  .tour-tab-btn {
    width: 100%;
    justify-content: center;
  }
}

/* 360 SVG Rotating Arrow Icon in Tour Placeholder */
.icon-360-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
}

.icon-360-svg {
  width: 100%;
  height: 100%;
  color: #ffffff;
  animation: rotateIcon360 8s linear infinite;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
}

.icon-360-text {
  position: absolute;
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-heading);
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

@keyframes rotateIcon360 {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Floating WhatsApp Button Styling (Apple Liquid Glass - Dark) */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: rgba(15, 17, 21, 0.75) !important; /* Liquid glass charcoal */
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: rgba(255, 255, 255, 0.6) !important; /* Semi-transparent white icon for subtle glass look */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  box-shadow: 
    0 8px 32px 0 rgba(0, 0, 0, 0.3), 
    inset 0 1px 0 rgba(255, 255, 255, 0.25) !important; /* Top light rim */
  z-index: 9999;
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1) translateY(-2px);
  background-color: #25d366 !important; /* Turn official WhatsApp green on hover */
  border-color: #25d366 !important;
  color: #ffffff !important; /* Pure white icon on hover */
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6) !important;
}

.whatsapp-float i {
  display: block;
}

/* Responsive adjustment for floating button */
@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 1.8rem;
  }
}

/* Footer social buttons */
.footer-social {
  margin: 15px 0 20px;
  display: flex;
  justify-content: center;
}

.instagram-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 22px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  font-family: var(--font-heading);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  background: rgba(255, 255, 255, 0.02);
  letter-spacing: 0.02em;
}

.instagram-btn:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.instagram-btn i {
  font-size: 1rem;
}

/* Tour Fullscreen Floating Button (Apple Liquid Glass style) */
.tour-fullscreen-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(15, 17, 21, 0.75) !important; /* Liquid glass charcoal */
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: rgba(255, 255, 255, 0.8) !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.3), 
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important; /* Top light rim */
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  outline: none;
}

.tour-fullscreen-btn:hover {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: #ffffff !important;
  color: #0c0d10 !important;
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
}

.tour-fullscreen-btn i {
  font-size: 1.1rem;
}

/* Fullscreen expansion overrides for the tour container */
.tour-wrapper:fullscreen {
  width: 100% !important;
  max-width: 100% !important;
  height: 100vh !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  background: #000000 !important;
}

.tour-wrapper:-webkit-full-screen {
  width: 100% !important;
  max-width: 100% !important;
  height: 100vh !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  background: #000000 !important;
}

.tour-wrapper:-moz-full-screen {
  width: 100% !important;
  max-width: 100% !important;
  height: 100vh !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  background: #000000 !important;
}

.tour-wrapper:-ms-fullscreen {
  width: 100% !important;
  max-width: 100% !important;
  height: 100vh !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  background: #000000 !important;
}

/* Project slide header styling */
.project-slide-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  margin-bottom: 25px;
}

.project-slide-number {
  color: var(--color-cyan);
  font-size: 1.2rem;   /* Increased by 2 points (approx 0.15rem) */
  font-weight: 800;     
  text-transform: uppercase;
  letter-spacing: 0.15em; 
  display: block;
  font-family: var(--font-heading);
  transform: translateY(-4px); /* Shifted slightly higher */
}


.project-header-nav-btn {
  background: #1a1a1a !important;
  border: 1px solid #1a1a1a !important;
  color: #ffffff !important;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  outline: none;
  position: relative;
}

.project-header-nav-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 50%;
  background: rgba(26, 26, 26, 0.96); /* Restored original black background */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12); /* Restored border */
  color: #ffffff; /* White text */
  padding: 5px 12px; /* Restored padding */
  border-radius: 5px;
  font-size: 0.7rem;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Restored shadow */
  z-index: 100;
}

/* Static navigation labels (always visible next to the arrows, highly transparent) */
.static-nav-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(26, 26, 26, 0.35); /* More transparent dark text */
  font-size: 0.72rem;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  z-index: 50; /* Below tooltip ::after which has z-index 100 */
  transition: opacity 0.25s cubic-bezier(0.25, 0.8, 0.25, 1); /* Fade out smoothly on hover */
}

.prev-label {
  right: 100%;
  margin-right: 12px;
}

.next-label {
  left: 100%;
  margin-left: 12px;
}

/* Prev button tooltip: displays on the LEFT side */
.prev-project-btn::after {
  right: 100%;
  left: auto;
  margin-right: 12px;
  transform: translateY(-50%) translateX(-8px);
}
.prev-project-btn:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Next button tooltip: displays on the RIGHT side */
.next-project-btn::after {
  left: 100%;
  margin-left: 12px;
  transform: translateY(-50%) translateX(8px);
}
.next-project-btn:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.project-header-nav-btn:hover {
  background: #1a1a1a !important;
  color: #ffffff !important;
  border-color: #1a1a1a !important;
  transform: scale(1.08);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.project-header-nav-btn i {
  font-size: 1rem;
  display: inline-block;
}

@keyframes nudgeButtonRight {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 6px 0;
  }
}

@keyframes nudgeButtonLeft {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: -6px 0;
  }
}

.next-wrapper {
  animation: nudgeButtonRight 1.5s ease-in-out infinite;
}

.prev-wrapper {
  animation: nudgeButtonLeft 1.5s ease-in-out infinite;
}

.next-wrapper:hover,
.prev-wrapper:hover {
  animation: none !important;
}

.project-nav-wrapper-custom:hover .static-nav-label {
  opacity: 0 !important;
}

.project-header-nav-spacer {
  width: 44px;
  height: 44px;
  display: block;
}

@media (max-width: 768px) {
  .project-slide-header {
    margin-bottom: 15px;
    gap: 15px;
  }
  .project-header-nav-btn::after {
    display: none !important;
  }
}

/* --- Clients Grid System --- */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 25px;
  max-width: 1100px;
  width: 100%;
  margin: 40px auto 0;
}

.client-card {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 120px;
  box-sizing: border-box;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: var(--glass-shadow);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.client-card:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(var(--color-cyan-rgb), 0.3);
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 10px 25px rgba(var(--color-cyan-rgb), 0.08);
}

.client-card img {
  max-height: 40px;
  max-width: 100%;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.65;
  transition: all 0.35s ease;
}

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

/* Invert filter helper inside cards */
.client-card img.client-logo-img--invert {
  filter: invert(1) grayscale(100%);
}

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

.client-card span {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 12px;
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: absolute;
  bottom: 12px;
}

.client-card:hover span {
  opacity: 1;
  transform: translateY(0);
  color: var(--color-cyan);
}

.client-card:hover img {
  transform: translateY(-8px);
}

@media (max-width: 992px) {
  .clients-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 25px;
  }
}

@media (max-width: 576px) {
  .clients-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .client-card {
    height: 100px;
    padding: 15px 10px;
  }
  .client-card img {
    max-height: 32px;
  }
  .client-card span {
    font-size: 0.65rem;
    bottom: 8px;
  }
  .client-card:hover img {
    transform: translateY(-6px);
  }
}

/* --- Project Gallery Drawer (Overlay) --- */
.project-gallery-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-dark); /* Luxury dark mode contrast */
  z-index: 2500; /* Above header navbar */
  transform: translateY(100%);
  transition: transform 0.6s cubic-bezier(0.85, 0, 0.15, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.project-gallery-drawer.open {
  transform: translateY(0);
}

.project-gallery-drawer .drawer-header {
  position: absolute; /* Positioned absolutely so body content scrolls behind it */
  top: 0;
  left: 0;
  width: 100%;
  padding: 12px 0; /* Reduced padding for sleek, lower height */
  background: rgba(255, 255, 255, 0.65); /* Frosted semi-translucent glass */
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
  z-index: 100; /* Stays on top of scrolling gallery items */
}

.project-gallery-drawer .drawer-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-cyan), var(--color-violet), transparent);
  background-size: 200% 100%;
  animation: borderGlow 6s linear infinite;
  opacity: 0.3;
}

.drawer-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.project-gallery-drawer .drawer-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 85px 0 100px; /* Top padding adjusted to clear the header */
  -webkit-overflow-scrolling: touch;
}

/* Light mode overrides inside the drawer */
.project-gallery-drawer h3 {
  color: var(--color-cyan) !important;
  border-bottom-color: var(--glass-border) !important;
}

.project-gallery-drawer .gallery-tab-btn {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--text-main);
  padding: 8px 18px;
  font-size: 0.85rem;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.project-gallery-drawer .gallery-tab-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-main);
}

.project-gallery-drawer .gallery-tab-btn.active {
  background: transparent !important;
  color: var(--color-cyan) !important;
  border: 1px solid var(--color-cyan) !important;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(var(--color-sage-rgb), 0.15);
}

.project-gallery-drawer .close-gallery-btn {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #1a1a1a;
  border-radius: 50px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-gallery-drawer .close-gallery-btn:hover {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.6);
  color: #000000;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.project-gallery-drawer .close-gallery-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Drawer Logo centering */
.drawer-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  display: flex;
  align-items: center;
  z-index: 10;
}

.drawer-logo img {
  height: 36px;
  width: auto;
  display: block;
}

/* --- Full-Page Scroll Snapping System --- */
@media (min-width: 992px) and (min-height: 650px) {
  html:has(body.home) {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    height: 100%;
  }

  body.home {
    height: 100%;
    margin: 0;
    padding: 0;
  }

  #hero {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 !important;
    position: relative;
  }

  #portfolio {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 100px 0 60px !important; /* Clears site header at top, provides room for navigation footer at bottom */
    position: relative;
  }

  #virtual-tour,
  #servicios {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 110px 0 50px !important; /* Header height offset to prevent overlapping section titles */
    position: relative;
  }

  #clientes {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 70px 0 110px !important; /* Shifted top/bottom padding to raise elements visually */
    position: relative;
  }

  #metodologia {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 110px 0 70px !important; /* Larger bottom padding to prevent methodology items overlapping integrated footer */
    position: relative;
  }

  #metodologia .section-header {
    margin-bottom: 25px !important; /* Shrunk spacing above timeline to save space */
  }
}

/* --- New Services Grid Style (Predominantly White & Glassmorphic) --- */
.services-section {
  background-color: var(--bg-card); /* Light background to match rest of the site */
  color: var(--text-main);
  padding: 100px 0;
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.services-section h2 {
  color: var(--text-main);
}

.services-section p {
  color: var(--text-muted);
}

.services-grid-new {
  display: flex;
  gap: 16px;
  width: 100%;
  height: 640px; /* Increased height to account for cards (480px) + description box (140px) below */
  margin-top: 40px;
  align-items: flex-start;
}

.service-column-new {
  position: relative;
  flex: 1;
  min-width: 0; /* Necessary to prevent text layout breaks when column shrinks */
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: flex 0.7s cubic-bezier(0.25, 1, 0.3, 1);
}

.service-card-new {
  position: relative;
  width: 100%;
  height: 480px; /* Fixed height for the visual card box */
  background: #ffffff;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.service-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-color: #ffffff; /* White background base for video transitions */
  transform: scale(1.0);
  transition: transform 0.7s cubic-bezier(0.25, 1, 0.3, 1);
  z-index: 1;
}

.service-static-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 1;
  transform: scale(1.0);
  transition: transform 0.7s cubic-bezier(0.25, 1, 0.3, 1), opacity 0.6s ease;
  z-index: 1;
}

/* Local background video element styling */
.service-local-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Natively scales to cover card area without distortion */
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
  z-index: 2;
}

.service-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.65); /* Lowered white mask opacity (to 65%) to show renders more in reposo */
  transition: background-color 0.6s cubic-bezier(0.25, 1, 0.3, 1);
  z-index: 2;
}

.service-card-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Numbers and icons at the top, name of the service at the bottom */
  align-items: center;
  gap: 20px; /* Spacing between header and body when transition happens */
  flex-grow: 1;
  transition: justify-content 0.5s ease, gap 0.5s ease;
}

.service-card-header {
  display: flex;
  flex-direction: column; /* Centrado vertical y horizontal */
  align-items: center;
  gap: 8px;
  margin-bottom: 0; /* Removido para usar gap del contenedor */
  max-height: 120px; /* Cota para colapsar suavemente en hover */
  opacity: 1;
  overflow: visible;
  transition: opacity 0.5s cubic-bezier(0.25, 1, 0.3, 1), 
              max-height 0.5s cubic-bezier(0.25, 1, 0.3, 1), 
              margin-bottom 0.5s ease;
}

.service-number {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: rgba(26, 26, 26, 0.35);
  transition: color 0.5s ease;
}

.service-icon {
  font-size: 2.2rem;
  color: var(--color-cyan); /* Warm accent earth tone */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  text-align: center;
  transition: color 0.5s ease, transform 0.5s cubic-bezier(0.25, 1, 0.3, 1);
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  margin-bottom: 0 !important;
}

.service-card-body {
  display: flex;
  flex-direction: column;
  align-items: center; /* Centrado horizontal del título en reposo */
  gap: 8px;
  width: 100%;
}

.service-title {
  font-family: var(--font-heading);
  font-size: 1.1rem; /* Balanced size for better legibility */
  font-weight: 600; /* Semi-bold to reduce heavy weight but preserve presence */
  color: var(--text-main);
  margin: 0;
  line-height: 1.35;
  white-space: nowrap; /* Prevent ugly wrapping of headings when not hovered */
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center; /* Centered in normal state */
  opacity: 0.85; /* Increased opacity for clear readability */
  transition: color 0.5s ease, font-size 0.5s cubic-bezier(0.25, 1, 0.3, 1), opacity 0.4s ease, transform 0.4s ease;
}

.service-desc {
  font-size: 1.05rem; /* Aumentado tamaño para mayor notoriedad */
  font-weight: 500; /* Mayor peso/presencia visual sin competir con el título */
  line-height: 1.6;
  color: var(--text-muted); /* Dark gray text by default */
  margin: 0;
  opacity: 0;
  max-height: 0; /* Colapsado para no ocupar espacio y desalinear las tarjetas */
  overflow: hidden;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.25, 1, 0.3, 1), 
              transform 0.5s cubic-bezier(0.25, 1, 0.3, 1),
              max-height 0.5s cubic-bezier(0.25, 1, 0.3, 1),
              margin-top 0.5s ease,
              color 0.5s ease;
}

.service-hover-desc-box {
  position: absolute;
  top: 500px; /* Sits 20px below the 480px card height */
  left: 0;
  width: 100%;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.6s cubic-bezier(0.25, 1, 0.3, 1), transform 0.6s cubic-bezier(0.25, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  z-index: 5;
}

.service-hover-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  line-height: 1.35;
}

.service-hover-desc {
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* Accordion hover expanding the COLUMN wrapper */
.services-grid-new:hover .service-column-new:hover {
  flex: 5.5; /* Takes over the section width */
}

/* Hover effects inside the hovered service card box */
.services-grid-new:hover .service-column-new:hover .service-card-new {
  border-color: transparent;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.services-grid-new:hover .service-column-new:hover .service-card-bg[style],
.services-grid-new:hover .service-column-new:hover .service-static-bg {
  transform: scale(1.06); /* Scale up background image on hover */
}

.services-grid-new:hover .service-column-new:hover .service-card-overlay {
  background-color: transparent; /* No black overlay on hover */
  opacity: 0; /* Fully transparent to show original tones */
}

.services-grid-new:hover .service-column-new:hover .service-local-video {
  opacity: 1 !important;
  transition: none !important; /* Show video instantly on hover */
}

.services-grid-new .service-column-new.first-service-video:hover .service-static-bg,
.services-grid-new .service-column-new.second-service-video:hover .service-static-bg,
.services-grid-new .service-column-new.third-service-video:hover .service-static-bg,
.services-grid-new .service-column-new.fifth-service-video:hover .service-static-bg {
  opacity: 0 !important;
  transition: none !important; /* Hide static background image instantly on hover */
}

.services-grid-new:hover .service-column-new:hover .service-card-content {
  justify-content: flex-end; /* Align elements to the bottom inside the card */
  gap: 0;
}

/* Colapsar y ocultar cabecera (número e icono) en hover */
.services-grid-new:hover .service-column-new:hover .service-card-header {
  opacity: 0;
  max-height: 0;
  margin-bottom: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Hide the main title inside the card when hovered (it will show in the hover desc box below) */
.services-grid-new:hover .service-column-new:hover .service-title {
  opacity: 0;
  transform: translateY(10px);
}

/* Reveal the description box below the card on hover */
.services-grid-new:hover .service-column-new:hover .service-hover-desc-box {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Accordion hover shrinking other columns */
.services-grid-new:hover .service-column-new:not(:hover) {
  flex: 0.5; /* Squeezes to a slim vertical divider line */
}

.services-grid-new:hover .service-column-new:not(:hover) .service-card-new {
  opacity: 0.8;
  background: rgba(255, 255, 255, 0.95);
}

.services-grid-new:hover .service-column-new:not(:hover) .service-title {
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
}

.services-grid-new:hover .service-column-new:not(:hover) .service-icon {
  color: rgba(26, 26, 26, 0.3);
  transform: scale(0.85);
}

.services-grid-new:hover .service-column-new:not(:hover) .service-number {
  color: rgba(26, 26, 26, 0.08);
}

/* Mobile responsive stack layout (Fallback when horizontal accordion is cramped) */
@media (max-width: 991px) {
  .services-grid-new {
    flex-direction: column;
    height: auto;
    gap: 30px; /* Gap between columns/cards */
  }
  
  .service-column-new {
    flex: none !important;
    width: 100% !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .service-card-new {
    width: 100%;
    height: 280px; /* Shorter card height for mobile viewports */
    padding: 24px;
    background: #ffffff;
  }
  
  .service-card-bg {
    opacity: 0.30 !important; /* Slightly increased visibility of render images on mobile (to 30%) */
    transform: scale(1) !important;
  }
  
  .service-card-overlay {
    opacity: 0.45 !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.98) 100%) !important;
  }
  
  .service-card-content {
    justify-content: center !important;
    align-items: center !important;
    gap: 15px !important;
  }
  
  .service-card-header {
    opacity: 1 !important;
    max-height: none !important;
    overflow: visible !important;
    margin-bottom: 0 !important;
  }
  
  .service-title {
    opacity: 1 !important;
    transform: none !important;
    color: var(--text-main) !important;
    white-space: normal !important;
    overflow: visible !important;
    font-size: 1.25rem !important;
    text-align: center !important;
  }
  
  .service-icon {
    color: var(--color-cyan) !important;
    transform: scale(1) !important;
  }
  
  .service-number {
    color: rgba(26, 26, 26, 0.35) !important;
  }
  
  /* Show only description text below the card on mobile */
  .service-hover-desc-box {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    padding: 0 10px;
    gap: 0;
  }
  
  .service-hover-title {
    display: none !important; /* Hide title below the card on mobile since it is shown inside the card */
  }
  
  .service-hover-desc {
    color: var(--text-muted) !important;
    font-size: 1rem !important;
    text-align: center !important;
  }
  
  /* Prevent focus/hover accordion overrides on mobile */
  .services-grid-new:hover .service-column-new:not(:hover) {
    flex: none !important;
  }
  
  .services-grid-new:hover .service-column-new:not(:hover) .service-card-new {
    opacity: 1 !important;
    background: #ffffff !important;
  }
}

/* --- Cookie Consent Banner --- */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: calc(100% - 48px);
  max-width: 420px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(26, 26, 26, 0.08);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
  z-index: 99999;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(20px);
  visibility: hidden;
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s;
}

.cookie-banner.show {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.cookie-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cookie-text h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.cookie-text p {
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0;
  color: var(--text-muted);
}

.cookie-buttons {
  display: flex;
  gap: 12px;
}

.btn-cookie-accept {
  flex: 1;
  background: #1a1a1a !important;
  color: #ffffff !important;
  border: 1px solid #1a1a1a !important;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-cookie-accept:hover {
  background: var(--color-cyan) !important;
  border-color: var(--color-cyan) !important;
  color: #ffffff !important;
}

.btn-cookie-reject {
  background: transparent !important;
  color: var(--text-muted) !important;
  border: 1px solid rgba(26, 26, 26, 0.15) !important;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-cookie-reject:hover {
  background: rgba(26, 26, 26, 0.05) !important;
  color: var(--text-main) !important;
  border-color: rgba(26, 26, 26, 0.3) !important;
}

/* --- Footer Libro de Reclamaciones Link --- */
.footer-reclamaciones-link {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.footer-reclamaciones-link:hover {
  color: var(--color-cyan);
}

.footer-reclamaciones-link i {
  font-size: 0.8rem;
  color: var(--color-cyan);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 576px) {
  .cookie-banner {
    bottom: 16px;
    left: 16px;
    right: 16px;
    width: calc(100% - 32px);
  }
}

/* --- Libro de Reclamaciones Responsive Layouts --- */
.reclamaciones-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .reclamaciones-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .glass-reclamaciones-card {
    padding: 24px !important;
    border-radius: 12px !important;
  }
  .reclamaciones-page-wrapper {
    margin: 90px auto 40px !important;
  }
}

/* Trigger deployment with new secrets */

