/* ============ ABOUT SECTION - CSS MODERNO ============ */
#about {
  padding: 100px 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  position: relative;
  overflow: hidden;
}

/* Efecto de fondo con patrón sutil */
#about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 10% 20%, rgba(16, 37, 66, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(77, 168, 218, 0.02) 0%, transparent 50%);
  pointer-events: none;
}

/* Texto de introducción */
.text-background {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 80px;
  position: relative;
  z-index: 1;
}

#about h2 {
  font-size: 3.2rem;
  color: #102542;
  margin-bottom: 25px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.5px;
  position: relative;
  display: inline-block;
}

#about h2::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: linear-gradient(90deg, #4da8da, #2a7bb6);
  border-radius: 2px;
}

#about p {
  font-size: 1.25rem;
  color: #495057;
  line-height: 1.7;
  max-width: 700px;
  margin: 40px auto 0;
  font-weight: 300;
  opacity: 0.9;
}

/* Carousel principal */
.carousel {
  max-width: 1200px;
  margin: 0 auto 100px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
}

/* Contenedor del track */
.carousel-track-container {
  flex: 1;
  overflow: hidden;
  border-radius: 25px;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

/* Track del carousel */
.carousel-track {
  display: flex;
  gap: 30px;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 30px;
  will-change: transform;
}

/* Cada slide */
.carousel-slide {
  flex: 0 0 calc(33.333% - 20px);
  min-width: 0;
}

/* Contenedor de imagen */
.image-box {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  height: 450px;
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.1),
    0 5px 15px rgba(0, 0, 0, 0.05);
}

.image-box:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 
    0 30px 60px rgba(0, 0, 0, 0.2),
    0 0 0 3px rgba(77, 168, 218, 0.1);
}

/* Imagen */
.image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-box:hover img {
  transform: scale(1.1);
}

/* Overlay con gradiente */
.image-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 60%,
    rgba(16, 37, 66, 0.8) 100%
  );
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.image-box:hover::before {
  opacity: 1;
}

/* Caption (texto de la imagen) */
.caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px;
  color: white;
  font-size: 1.3rem;
  font-weight: 600;
  z-index: 2;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  background: linear-gradient(transparent, rgba(16, 37, 66, 0.9));
}

.image-box:hover .caption {
  transform: translateY(0);
  opacity: 1;
}

/* Efecto de máquina de escribir para el texto */
.typewrite {
  border-right: 3px solid #4da8da;
  white-space: nowrap;
  overflow: hidden;
  font-family: 'Courier New', monospace;
  animation: blinkCursor 0.7s steps(44) infinite normal;
}

/* Botones del carousel */
.carousel-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: white;
  border: 2px solid #e9ecef;
  color: #102542;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  z-index: 10;
}

.carousel-button:hover {
  background: #102542;
  color: white;
  border-color: #102542;
  transform: scale(1.1);
  box-shadow: 0 15px 35px rgba(16, 37, 66, 0.2);
}

.carousel-button:active {
  transform: scale(0.95);
}

.carousel-button.prev {
  order: -1;
}

.carousel-button.next {
  order: 1;
}

/* Logos de partners */
.logos {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  padding: 50px 30px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 25px;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(16, 37, 66, 0.1);
}

/* Cada logo individual */
.logo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 20px;
  border-radius: 15px;
  min-width: 150px;
}

.logo-item:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 
    0 15px 30px rgba(16, 37, 66, 0.1),
    0 0 0 1px rgba(77, 168, 218, 0.1);
}

/* Imagen del logo */
.logo-item img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  filter: grayscale(0.3);
  opacity: 0.9;
  transition: all 0.4s ease;
  padding: 10px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.logo-item:hover img {
  filter: grayscale(0);
  opacity: 1;
  transform: scale(1.1);
}

/* Texto del logo */
.logo-caption {
  font-size: 1rem;
  color: #102542;
  font-weight: 600;
  text-align: center;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.logo-item:hover .logo-caption {
  opacity: 1;
  color: #4da8da;
}

/* Indicadores del carousel (opcional) */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
  position: absolute;
  bottom: -60px;
  left: 0;
  right: 0;
}

.carousel-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(16, 37, 66, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.carousel-indicator.active {
  background: #4da8da;
  transform: scale(1.3);
  border-color: rgba(77, 168, 218, 0.3);
}

.carousel-indicator:hover {
  background: #102542;
  transform: scale(1.2);
}

/* Animaciones */
@keyframes blinkCursor {
  0%, 100% { border-right-color: #4da8da; }
  50% { border-right-color: transparent; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[data-animate="fade-up"] {
  opacity: 0;
  transform: translateY(30px);
}

[data-animate="fade-up"].animated {
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Efecto de brillo en hover para imágenes */
.image-box::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.7s ease;
  z-index: 2;
}

.image-box:hover::after {
  left: 100%;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .carousel-slide {
    flex: 0 0 calc(50% - 15px);
  }
  
  .carousel {
    max-width: 900px;
  }
  
  .logos {
    gap: 40px;
    padding: 40px 20px;
  }
  
  .logo-item {
    min-width: 130px;
  }
}

@media (max-width: 768px) {
  #about {
    padding: 60px 15px;
  }
  
  #about h2 {
    font-size: 2.2rem;
  }
  
  #about p {
    font-size: 1.1rem;
  }
  
  .carousel {
    flex-direction: column;
    gap: 20px;
    margin-bottom: 60px;
  }
  
  .carousel-track-container {
    order: 2;
  }
  
  .carousel-button {
    order: 1;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  .carousel-button.prev,
  .carousel-button.next {
    position: relative;
    transform: none;
  }
  
  .carousel-slide {
    flex: 0 0 100%;
  }
  
  .image-box {
    height: 350px;
  }
  
  .logos {
    gap: 30px;
    padding: 30px 15px;
  }
  
  .logo-item {
    min-width: 110px;
    padding: 15px;
  }
  
  .logo-item img {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 480px) {
  #about h2 {
    font-size: 1.8rem;
  }
  
  #about p {
    font-size: 1rem;
  }
  
  .image-box {
    height: 280px;
  }
  
  .caption {
    padding: 20px;
    font-size: 1.1rem;
  }
  
  .logos {
    gap: 20px;
  }
  
  .logo-item {
    min-width: 90px;
  }
  
  .logo-item img {
    width: 70px;
    height: 70px;
  }
}

/* Ajustes para dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {
  .image-box:hover {
    transform: none;
  }
  
  .image-box::before,
  .image-box::after {
    display: none;
  }
  
  .caption {
    transform: translateY(0);
    opacity: 1;
    background: rgba(16, 37, 66, 0.8);
  }
  
  .carousel-button {
    width: 70px;
    height: 70px;
    background: #102542;
    color: white;
    border-color: #102542;
  }
}

/* Modo oscuro */
@media (prefers-color-scheme: dark) {
  #about {
    background: linear-gradient(180deg, #0a1a2f 0%, #1a1a2e 100%);
  }
  
  #about h2 {
    color: white;
  }
  
  #about p {
    color: rgba(255, 255, 255, 0.85);
  }
  
  .carousel-track-container {
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .carousel-button {
    background: #1a1a2e;
    border-color: rgba(77, 168, 218, 0.3);
    color: #4da8da;
  }
  
  .carousel-button:hover {
    background: #4da8da;
    color: white;
  }
  
  .logos {
    background: rgba(26, 26, 46, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .logo-item img {
    background: #1a1a2e;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  }
  
  .logo-caption {
    color: rgba(255, 255, 255, 0.85);
  }
}