/* ===== ESTILOS PARA EL NUEVO LOGO SVG ===== */

/* Animaciones para el logo SVG mejoradas */
.caslu-logo {
  transition: all 0.3s ease;
  cursor: pointer;
}

.caslu-logo:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

/* Animación para el fondo del logo */
.logo-bg {
  transition: all 0.3s ease;
}

.caslu-logo:hover .logo-bg {
  filter: brightness(1.1);
}

/* Animación para el texto principal */
.logo-text-main {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.2s forwards;
  font-family: 'Arial', 'Helvetica', sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Animación para el texto secundario */
.logo-text-secondary {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.4s forwards;
  font-family: 'Arial', 'Helvetica', sans-serif;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Animación para la línea decorativa */
.logo-line {
  stroke-dasharray: 65;
  stroke-dashoffset: 65;
  animation: drawLine 1s ease-out 0.6s forwards;
  transition: all 0.3s ease;
}

/* Efectos hover mejorados */
.caslu-logo:hover .logo-text-main {
  filter: brightness(1.1);
}

.caslu-logo:hover .logo-text-secondary {
  filter: brightness(1.1);
}

.caslu-logo:hover .logo-line {
  stroke-width: 3;
  stroke-dasharray: 65;
}

/* Keyframes para animaciones */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

/* Efecto de pulsación al hacer clic */
.caslu-logo.pulse {
  animation: logoPulse 0.3s ease-in-out;
}

@keyframes logoPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

/* ===== ESTILOS ESPECÍFICOS PARA EL FOOTER ===== */

/* Logo del footer con fondo blanco */
.footer-logo .logo-bg {
  fill: white;
}

.footer-logo .logo-text-main,
.footer-logo .logo-text-secondary {
  fill: #29445A;
}

.footer-logo .logo-line {
  stroke: #29445A;
}

/* Efectos hover para el footer */
.footer-logo:hover .logo-bg {
  fill: #f8fafc;
}

.footer-logo:hover .logo-text-main,
.footer-logo:hover .logo-text-secondary {
  fill: #1a2d3d;
}

.footer-logo:hover .logo-line {
  stroke: #1a2d3d;
}

/* Responsive para móviles */
@media (max-width: 768px) {
  .caslu-logo {
    width: 150px;
    height: 40px;
  }
  
  .footer-logo {
    width: 130px;
    height: 35px;
  }
}

/* Asegurar que el texto sea nítido */
.logo-text-main,
.logo-text-secondary {
  text-rendering: geometricPrecision;
  shape-rendering: crispEdges;
}

/* Estilos CSS existentes */
:root {
  --caslu-primary: #29445A;
  --caslu-accent: #FFFFFF;
  --caslu-dark: #000000;
  --caslu-text: #0f1720;
  --caslu-bg: #ffffff;
}

/* Clip solo para el fondo del hero */
.hero-shape { clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%); }

/* Navigation styles */
.nav-item {
  transition: color 0.3s;
  position: relative;
}

.nav-item::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--casalu-accent);
  transition: width 0.3s ease;
}

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

.nav-item:hover {
  color: var(--casalu-accent) !important;
}


/* Ken Burns mejorado */
.kenburns {
  transform-origin: center center;
  animation: kenburns 20s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes kenburns {
  0% { transform: scale(1) translate(0,0); }
  100% { transform: scale(1.06) translate(-3%, -2%); }
}
@media (prefers-reduced-motion: reduce) {
  .kenburns { animation: none; transform: none; }
}

/* Reveal mejorado */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s, transform .6s cubic-bezier(.2,.9,.3,1); }
.reveal.revealed { opacity: 1; transform: translateY(0); }

/* Carrusel mejorado */
.cards-track { display:flex; transition: transform 600ms cubic-bezier(.2,.9,.2,1); touch-action: pan-y; user-select: none; }

/* Nuevos estilos para mejoras */
.floating-element {
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Pulse glow actualizado para blanco */
.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite alternate;
}
@keyframes pulse-glow {
  0% { box-shadow: 0 0 5px rgba(255, 255, 255, 0.4); }
  100% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.8); }
}

.gradient-bg {
  background: linear-gradient(135deg, #29445A 0%, #1a2d3d 100%);
}

.service-card {
  transition: all 0.3s ease;
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.counter {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--caslu-accent);
}

.counter-container {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.counter-container.visible {
  opacity: 1;
  transform: translateY(0);
}

.stat-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(248,250,252,0.9) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
}

.testimonial-card {
  transition: all 0.3s ease;
}
.testimonial-card:hover {
  transform: translateY(-5px);
}

.footer-wave {
  transform: scaleY(-1);
}

/* Botones con nuevo esquema */
.btn-casalu {
  background: var(--caslu-accent);
  color: var(--caslu-primary);
  border: 2px solid var(--caslu-accent);
}

.btn-casalu:hover {
  background: transparent;
  color: var(--caslu-accent);
}

.btn-outline-casalu {
  background: transparent;
  color: var(--caslu-accent);
  border: 2px solid var(--caslu-accent);
}

.btn-outline-casalu:hover {
  background: var(--caslu-accent);
  color: var(--caslu-primary);
}

/* ===== ANIMACIONES SIMPLIFICADAS PARA EL MODAL ===== */
#proposalModal {
  z-index: 9999;
  backdrop-filter: blur(0px);
  background-color: rgba(0, 0, 0, 0);
  transition: all 0.3s ease;
}

#proposalModal:not(.hidden) {
  display: flex !important;
  backdrop-filter: blur(8px);
  background-color: rgba(0, 0, 0, 0.5);
}

#modalContent {
  transform-origin: center center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.9) translateY(-20px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#proposalModal:not(.hidden) #modalContent {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Animaciones para las esferas */
#modalContent .absolute:nth-child(1) {
  animation: float 8s ease-in-out infinite, pulse 4s ease-in-out infinite;
}

#modalContent .absolute:nth-child(2) {
  animation: float 10s ease-in-out infinite reverse, pulse 5s ease-in-out infinite 1s;
}

#modalContent .absolute:nth-child(3) {
  animation: float 12s ease-in-out infinite, pulse 6s ease-in-out infinite 2s;
}

#modalContent .absolute:nth-child(4) {
  animation: float 9s ease-in-out infinite reverse, pulse 4.5s ease-in-out infinite 0.5s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  33% {
    transform: translateY(-5px) rotate(120deg);
  }
  66% {
    transform: translateY(3px) rotate(240deg);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

/* Efecto hover en el botón de enviar */
#proposalForm button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

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

#proposalForm button:hover::before {
  left: 100%;
}

#proposalForm button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(41, 68, 90, 0.3);
}

/* Asegurar que el contenido esté por encima de las esferas */
.relative.z-10 {
  position: relative;
  z-index: 10;
}

/* Estilos para inputs del formulario */
input:focus, textarea:focus, select:focus {
  box-shadow: 0 0 0 3px rgba(41, 68, 90, 0.1);
  outline: none;
  border-color: #29445A;
}

/* ===== ESTILOS PARA EL CARRUSEL MODERNO ===== */
.carousel-container {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  height: 100%;
}

.carousel-slide {
  min-width: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.carousel-slide.active {
  opacity: 1;
  position: relative;
}

.carousel-indicators {
  z-index: 10;
}

.carousel-indicator {
  transition: all 0.3s ease;
  cursor: pointer;
}

.carousel-indicator.active {
  background-color: white;
  transform: scale(1.2);
}

.carousel-indicator:hover {
  background-color: white;
  transform: scale(1.1);
}

/* Efecto de desvanecimiento entre slides */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.carousel-slide.active {
  animation: fadeIn 0.8s ease-in-out;
}

/* CARRUSEL DE CLIENTES MEJORADO - CON 8 LOGOS */
.clients-carousel-wrapper {
  overflow: hidden;
  position: relative;
  padding: 3rem 0;
}

.clients-carousel-track {
  display: flex;
  animation: scroll-clients 50s linear infinite; /* Aumentado de 40s a 50s para más logos */
  gap: 6rem; /* Reducido de 8rem a 6rem para acomodar más logos */
}

.clients-carousel-slide {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  min-width: 100%;
}

.client-logo {
  flex-shrink: 0;
  transition: all 0.4s ease;
  padding: 0 3rem; /* Reducido de 4rem a 3rem para más logos */
}

/* TAMAÑOS OPTIMIZADOS PARA 8 LOGOS */
.client-logo img {
  transition: all 0.3s ease;
  filter: grayscale(100%) brightness(0.8);
  transform: scale(1.2); /* Ajustado para 8 logos */
}

.client-logo:hover img {
  filter: grayscale(0%) brightness(1);
  transform: scale(1.4); /* Hover ajustado */
}

/* TAMAÑOS ESPECÍFICOS PARA CADA LOGO - AJUSTADOS PARA 8 LOGOS */
.client-logo:nth-child(1) img { 
  height: 7rem !important; /* Blue Diamond */
  min-height: 7rem;
}
.client-logo:nth-child(2) img { 
  height: 6.5rem !important; /* Constructora Hermida */
  min-height: 6.5rem;
}
.client-logo:nth-child(3) img { 
  height: 8rem !important; /* Cliente 3 */
  min-height: 8rem;
}
.client-logo:nth-child(4) img { 
  height: 7rem !important; /* Cliente 4 */
  min-height: 7rem;
}
.client-logo:nth-child(5) img { 
  height: 6.5rem !important; /* Cliente 5 */
  min-height: 6.5rem;
}
.client-logo:nth-child(6) img { 
  height: 7.5rem !important; /* Cliente 6 */
  min-height: 7.5rem;
}
.client-logo:nth-child(7) img { 
  height: 7rem !important; /* Cliente 7 */
  min-height: 7rem;
}
.client-logo:nth-child(8) img { 
  height: 6.8rem !important; /* Cliente 8 */
  min-height: 6.8rem;
}

/* Asegurar que las imágenes mantengan su relación de aspecto */
.client-logo img {
  width: auto !important;
  max-width: none !important;
  object-fit: contain !important;
}

/* Animación del carrusel infinito ajustada para 8 logos */
@keyframes scroll-clients {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-100% - 6rem)); /* Ajustado para el nuevo gap */
  }
}

/* Responsive para carrusel de clientes - CON 8 LOGOS */
@media (max-width: 1024px) {
  .clients-carousel-track {
    gap: 5rem;
    animation-duration: 45s;
  }
  
  .client-logo {
    padding: 0 2.5rem;
  }
  
  .client-logo img {
    transform: scale(1.1);
  }
  
  /* Ajustes de tamaño para tablet */
  .client-logo:nth-child(1) img { height: 6rem !important; }
  .client-logo:nth-child(2) img { height: 5.5rem !important; }
  .client-logo:nth-child(3) img { height: 7rem !important; }
  .client-logo:nth-child(4) img { height: 6rem !important; }
  .client-logo:nth-child(5) img { height: 5.5rem !important; }
  .client-logo:nth-child(6) img { height: 6.5rem !important; }
  .client-logo:nth-child(7) img { height: 6rem !important; }
  .client-logo:nth-child(8) img { height: 5.8rem !important; }
}

@media (max-width: 768px) {
  .clients-carousel-wrapper {
    padding: 4rem 0;
  }
  
  .clients-carousel-track {
    gap: 4rem;
    animation-duration: 40s;
  }
  
  .client-logo {
    padding: 0 2rem;
  }
  
  .client-logo img {
    transform: scale(1);
  }
  
  /* Ajustes de tamaño para móviles */
  .client-logo:nth-child(1) img { height: 5rem !important; }
  .client-logo:nth-child(2) img { height: 4.5rem !important; }
  .client-logo:nth-child(3) img { height: 6rem !important; }
  .client-logo:nth-child(4) img { height: 5rem !important; }
  .client-logo:nth-child(5) img { height: 4.5rem !important; }
  .client-logo:nth-child(6) img { height: 5.5rem !important; }
  .client-logo:nth-child(7) img { height: 5rem !important; }
  .client-logo:nth-child(8) img { height: 4.8rem !important; }
}

@media (max-width: 640px) {
  .clients-carousel-track {
    gap: 3rem;
    animation-duration: 35s;
  }
  
  .client-logo {
    padding: 0 1.5rem;
  }
  
  .client-logo img {
    transform: scale(0.9);
  }
  
  .clients-carousel-wrapper::before,
  .clients-carousel-wrapper::after {
    width: 20%;
  }
}

/* Ajuste para pantallas muy grandes */
@media (min-width: 1440px) {
  .client-logo:nth-child(1) img { height: 8rem !important; }
  .client-logo:nth-child(2) img { height: 7.5rem !important; }
  .client-logo:nth-child(3) img { height: 9rem !important; }
  .client-logo:nth-child(4) img { height: 8rem !important; }
  .client-logo:nth-child(5) img { height: 7.5rem !important; }
  .client-logo:nth-child(6) img { height: 8.5rem !important; }
  .client-logo:nth-child(7) img { height: 8rem !important; }
  .client-logo:nth-child(8) img { height: 7.8rem !important; }
  
  .clients-carousel-track {
    gap: 7rem;
  }
  
  .client-logo {
    padding: 0 3.5rem;
  }
  
  .client-logo img {
    transform: scale(1.3);
  }
}