/* ===== CLASES DE ANIMACIÓN PARA INTERSECTION OBSERVER ===== */
.aparecer,
.aparecer-izquierda,
.aparecer-derecha {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.aparecer-izquierda {
  transform: translateX(-50px) translateY(20px);
}

.aparecer-derecha {
  transform: translateX(50px) translateY(20px);
}

.aparecer.visible,
.aparecer-izquierda.visible,
.aparecer-derecha.visible {
  opacity: 1;
  transform: translateX(0) translateY(0);
}

/* ===== HERO SOBRE NOSOTROS ===== */
.sobre-nosotros-hero {
  padding: 100px 20px 60px;
  text-align: center;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(212, 175, 55, 0.09) 0%, transparent 60%),
    linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 60%, var(--accent-blue) 100%);
  color: var(--text-white);
  background-size: cover;
  background-position: center;
}

.sobre-nosotros-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 7vw, 3.3rem);
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--text-white) 0%, var(--accent-gold) 50%, var(--accent-green) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sobre-nosotros-hero p {
  font-size: 1.28em;
  color: var(--text-muted);
  max-width: 800px;
  margin: auto;
}

/* ===== BLOQUES DE VALORES ===== */
.bloques-valores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  padding: 60px 20px;
  background: var(--secondary-bg);
  color: var(--text-light);
  text-align: center;
}

.bloques-valores .bloque {
  max-width: 320px;
  background: rgba(36, 52, 71, 0.95);
  border-radius: var(--border-radius-lg);
  padding: 34px 22px;
  box-shadow: var(--shadow-lg);
  border: 1.5px solid var(--border-color);
  transition: 
    transform var(--transition-smooth),
    box-shadow var(--transition-smooth),
    border-color var(--transition-smooth);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.bloques-valores .bloque:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent-gold);
}

.bloques-valores .bloque::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-green));
  transition: width var(--transition-smooth);
}

.bloques-valores .bloque:hover::after {
  width: 100%;
}

.bloques-valores i {
  font-size: 2.25em;
  color: var(--accent-green);
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-green));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 15px;
  display: inline-block;
}

/* ===== SECCIÓN FILOSOFÍA ===== */
.filosofia {
  padding: 60px 20px;
  background: var(--tertiary-bg);
  text-align: center;
  color: var(--primary-bg);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  margin-top: 40px;
  border: 1.5px solid var(--border-color);
}

.filosofia h2 {
  font-family: var(--font-display);
  font-size: 2.35em;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-green));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}

.filosofia p {
  max-width: 800px;
  margin: 0 auto 38px;
  font-size: 1.18em;
  line-height: 1.6em;
  color: var(--text-light);
}

/* ===== CARRUSEL INFINITO MEJORADO ===== */
.carrusel {
  position: relative;
  overflow: hidden;
  margin-bottom: 40px;
  border-radius: var(--border-radius-lg);
  background: linear-gradient(45deg, 
    rgba(212, 175, 55, 0.08) 0%, 
    rgba(0, 212, 170, 0.08) 50%, 
    rgba(74, 144, 226, 0.08) 100%);
  padding: 25px 0;
  box-shadow: 
    inset 0 0 50px rgba(0, 0, 0, 0.3),
    0 8px 32px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(212, 175, 55, 0.2);
  height: 250px;
  display: flex;
  align-items: center;
}

/* Efecto shimmer */
.carrusel::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(212, 175, 55, 0.15), 
    transparent);
  animation: shimmer 4s infinite ease-in-out;
  z-index: 1;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Gradiente lateral */
.carrusel::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, 
    rgba(26, 35, 50, 0.95) 0%, 
    transparent 8%, 
    transparent 92%, 
    rgba(26, 35, 50, 0.95) 100%);
  pointer-events: none;
  z-index: 3;
}

.carrusel-track {
  display: flex;
  gap: 25px;
  padding: 15px 0;
  position: relative;
  z-index: 2;
  width: max-content;
  animation: scroll-infinito 30s linear infinite;
}

.carrusel.reverse .carrusel-track {
  animation: scroll-infinito-reverse 35s linear infinite;
}

.carrusel:hover .carrusel-track {
  animation-play-state: paused;
}

@keyframes scroll-infinito {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

@keyframes scroll-infinito-reverse {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(0); }
}

.carrusel img {
  height: 200px;
  width: auto;
  min-width: 280px;
  max-width: 320px;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(212, 175, 55, 0.3);
  border: 2px solid transparent;
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  flex-shrink: 0;
}

.carrusel img:hover {
  transform: translateY(-15px) scale(1.12) rotateX(5deg) rotateY(-3deg);
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(212, 175, 55, 0.4),
    0 0 0 3px rgba(212, 175, 55, 0.6);
  filter: brightness(1.1) contrast(1.05) saturate(1.2);
  z-index: 10;
}

/* ===== GALERÍA CREATIVA ===== */
.galeria-creativa {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-auto-rows: 230px;
  gap: 20px;
  max-width: 1200px;
  margin: 60px auto 0;
  padding: 0 20px;
}

.imagen {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  transition: transform 0.4s var(--transition-smooth);
  border: 1.5px solid var(--border-color);
}

.imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--transition-smooth);
}

.imagen:hover img {
  transform: scale(1.10) rotateX(3deg) rotateY(3deg);
}

.imagen.tall {
  grid-row: span 2;
}

.imagen.wide {
  grid-column: span 2;
}

/* ===== VALORES CORPORATIVOS ===== */
.valores {
  padding: 60px 20px;
  background: var(--tertiary-bg);
  color: var(--text-light);
  text-align: center;
  border-radius: var(--border-radius-lg);
  margin-top: 42px;
  box-shadow: var(--shadow-md);
  border: 1.5px solid var(--border-color);
}

.valores h2 {
  font-size: 2.15em;
  font-family: var(--font-display);
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-green));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}

.valores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 26px;
  margin-top: 30px;
}

.valor {
  background: var(--secondary-bg);
  padding: 22px;
  border-radius: var(--border-radius-md);
  font-weight: bold;
  font-size: 1.08em;
  box-shadow: var(--shadow-sm);
  border: 1.3px solid var(--border-color);
  transition: transform 0.28s var(--transition-smooth), 
              box-shadow var(--transition-smooth), 
              border-color var(--transition-smooth);
  color: var(--text-light);
  position: relative;
  overflow: hidden;
}

.valor:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-gold);
}

.valor::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-green));
  transition: width var(--transition-smooth);
}

.valor:hover::after {
  width: 100%;
}

.valor i {
  color: var(--accent-green);
  margin-right: 10px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===== LLAMADO FINAL ===== */
.llamado-final {
  padding: 60px 20px;
  background: var(--secondary-bg);
  color: var(--text-light);
  text-align: center;
  border-radius: var(--border-radius-lg);
  margin-top: 42px;
  box-shadow: var(--shadow-md);
  border: 1.5px solid var(--border-color);
}

.llamado-final h2 {
  font-size: 2.27em;
  font-family: var(--font-display);
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-green));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.llamado-final p {
  font-size: 1.15em;
  margin-top: 15px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-muted);
}

.btn-final {
  display: inline-block;
  margin-top: 27px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-green));
  color: var(--text-white);
  padding: 14px 32px;
  border-radius: var(--border-radius-md);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.13em;
  box-shadow: var(--shadow-md);
  transition: background var(--transition-smooth), 
              transform var(--transition-fast), 
              box-shadow var(--transition-fast);
  font-family: var(--font-display);
  border: none;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.btn-final:hover {
  background: linear-gradient(90deg, var(--accent-green), var(--accent-gold));
  transform: translateY(-3px) scale(1.04);
  box-shadow: var(--shadow-lg);
}

.btn-final::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-green));
  transition: width var(--transition-smooth);
}

.btn-final:hover::after {
  width: 100%;
}

/* ===== SECCIÓN RESEÑAS ===== */
#seccion-reseñas {
  padding: 60px 20px;
  background: var(--tertiary-bg);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  border: 1.5px solid var(--border-color);
  margin: 40px auto;
  max-width: 850px;
  color: var(--text-light);
  text-align: center;
}

#seccion-reseñas h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.5rem);
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-green));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 25px;
  font-weight: 800;
}

#formResena {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 40px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--border-radius-md);
  border: 1.3px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

#formResena input,
#formResena textarea {
  padding: 12px;
  font-size: 1rem;
  border-radius: var(--border-radius-sm);
  border: 1.3px solid var(--border-color);
  background: var(--primary-bg);
  color: var(--text-light);
  font-family: var(--font-body);
  resize: vertical;
  transition: border-color 0.3s ease;
}

#formResena input:focus,
#formResena textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
}

#formResena button {
  align-self: center;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-green));
  color: var(--text-white);
  font-family: var(--font-display);
  font-weight: 700;
  padding: 12px 28px;
  font-size: 1.05em;
  border-radius: var(--border-radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

#formResena button:hover {
  background: linear-gradient(90deg, var(--accent-green), var(--accent-gold));
  transform: translateY(-2px) scale(1.03);
  box-shadow: var(--shadow-lg);
}

#formResena button::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-green));
  transition: width var(--transition-smooth);
}

#formResena button:hover::after {
  width: 100%;
}

#listaResenas {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.resena {
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid var(--accent-gold);
  padding: 18px 20px;
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-smooth), 
              box-shadow var(--transition-smooth);
}

.resena:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-left-color: var(--accent-green);
}

.resena p {
  margin: 5px 0;
  color: var(--text-light);
  font-size: 1em;
}

.resena strong {
  color: var(--accent-gold);
}

.resena small {
  font-size: 0.9em;
  color: var(--text-muted);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .sobre-nosotros-hero {
    padding: 80px 20px 50px;
  }
  
  .bloques-valores {
    gap: 30px;
    padding: 50px 20px;
  }
  
  .bloques-valores .bloque {
    max-width: 100%;
    padding: 30px 20px;
  }
  
  .carrusel {
    height: 200px;
    padding: 20px 0;
    margin-bottom: 30px;
  }
  
  .carrusel img {
    height: 160px;
    min-width: 220px;
    max-width: 260px;
  }
  
  .carrusel img:hover {
    transform: translateY(-10px) scale(1.08) rotateX(3deg);
  }
  
  .carrusel-track {
    gap: 18px;
  }
  
  .galeria-creativa {
    grid-auto-rows: 160px;
    gap: 15px;
    margin-top: 40px;
  }
  
  .imagen.tall,
  .imagen.wide {
    grid-row: span 1;
    grid-column: span 1;
  }
  
  .valores-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .filosofia,
  .valores,
  .llamado-final {
    padding: 40px 20px;
    margin-top: 30px;
  }
  
  .aparecer-izquierda {
    transform: translateX(-30px) translateY(20px);
  }
  
  .aparecer-derecha {
    transform: translateX(30px) translateY(20px);
  }
}

@media (max-width: 480px) {
  .carrusel {
    height: 170px;
    padding: 15px 0;
    margin-bottom: 25px;
  }
  
  .carrusel img {
    height: 140px;
    min-width: 180px;
    max-width: 220px;
  }
  
  .carrusel-track {
    gap: 15px;
  }
  
  .galeria-creativa {
    grid-template-columns: 1fr;
    grid-auto-rows: 200px;
  }
  
  #formResena {
    padding: 15px;
  }
  
  .bloques-valores {
    gap: 20px;
    padding: 40px 15px;
  }
}

/* ===== ANIMACIONES ADICIONALES PARA JS ===== */
@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(20px);
  }
  to { 
    opacity: 1; 
    transform: translateY(0);
  }
}

.fade-in-animation {
  animation: fadeIn 0.8s ease-out;
}

/* Mejora de rendimiento */
.carrusel,
.carrusel-track,
.carrusel img {
  will-change: transform;
}

/* Optimización para Hostinger */
* {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Prefetch y preload optimizations para mejor rendimiento */
.carrusel img {
  loading: lazy;
  decoding: async;
}