/* ==========================================================================
   ESTILOS DE LÍNEA DE TIEMPO (TIMELINE) - ADAPTADO A ESCALARCHAT MINIMALISTA
   ========================================================================== */

.timeline {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 0;
}

/* Línea Central */
.timeline-line {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  background: var(--eco-border);
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-progress {
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  background: var(--eco-emerald);
  transform: translateX(-50%);
  height: 0;
  border-radius: 2px;
  transition: height 0.2s ease-out;
  z-index: 2;
}

/* Círculos de referencia en la línea */
.timeline-circle {
  position: absolute;
  left: 50%;
  width: 14px;
  height: 14px;
  background: #ffffff;
  border: 3px solid var(--eco-forest);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  transition: all 0.3s ease;
}
.timeline-circle.active {
  background: var(--eco-emerald) !important;
  border-color: var(--eco-emerald) !important;
  box-shadow: 0 0 10px rgba(30, 178, 109, 0.6) !important;
}
#circle1 { top: 7%; }
#circle2 { top: 21%; }
#circle3 { top: 35%; }
#circle4 { top: 49%; }
#circle5 { top: 63%; }
#circle6 { top: 77%; }
#circle7 { top: 91%; }

/* Items */
.timeline-item {
  position: relative;
  width: 50%;
  padding: 30px 40px;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Alternancia */
.timeline-item.left {
  left: 0;
  text-align: right;
}

.timeline-item.right {
  left: 50%;
  text-align: left;
}

/* Cajas de texto */
.timeline-box {
  background: #ffffff;
  border: 1px solid var(--eco-border);
  border-radius: 1.25rem;
  padding: 25px 30px;
  box-shadow: var(--shadow-sm);
  max-width: 420px;
  display: inline-block;
  transition: all 0.3s ease;
}
.timeline-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(21, 82, 52, 0.15);
}

.timeline-title {
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  color: var(--eco-forest) !important;
  margin: 8px 0 !important;
  letter-spacing: -0.02em !important;
}

.timeline-subtitle {
  color: var(--eco-emerald);
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timeline-box p {
  color: var(--eco-gray) !important;
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
  margin-bottom: 0 !important;
}

.timeline-img {
  width: 100%;
  max-width: 350px;
  border-radius: 0.75rem;
  margin-top: 15px;
  border: 1px solid var(--eco-border);
  background: #fbfbf9;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
}

.timeline-box:hover .timeline-img {
  border-color: rgba(21, 82, 52, 0.15);
  background: #ffffff;
}

.timeline-img img,
.timeline-img svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Animación de aparición */
.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Desktop spacing logic */
@media (min-width: 769px) {
  .timeline-item.left {
    left: 0;
    text-align: right;
    padding-right: 8%;
  }

  .timeline-item.right {
    left: 50%;
    text-align: left;
    padding-left: 8%;
  }

  .timeline-box {
    display: inline-block;
    text-align: inherit;
    max-width: 400px;
  }
}

/* Versión móvil */
@media (max-width: 768px) {
  .timeline-line,
  .timeline-progress {
    left: 10%;
  }

  .timeline-circle {
    left: 10% !important;
  }

  .timeline-item {
    width: 100%;
    text-align: left;
    padding: 20px 15px;
  }

  .timeline-item.left,
  .timeline-item.right {
    left: 0;
    text-align: left;
    padding-left: 20%;
  }

  .timeline-box {
    max-width: 95%;
  }

  .timeline-img img {
    display: block;
    margin: 15px auto 0;
    max-width: 100%;
  }
}


/* ==========================================================================
   ESTILOS DEL CARRUSEL 3D - ADAPTADO A LA LÍNEA EDITORIAL CLARA
   ========================================================================== */

.carousel-container {
  width: 100%;
  max-width: 1400px;
  height: 600px;
  perspective: 1200px;
  position: relative;
  padding-top: 20px;
  touch-action: pan-y;
  overflow: hidden;
}

.carousel {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  cursor: grab;
  touch-action: pan-y;
}

.carousel:active {
  cursor: grabbing;
}

.eco-carousel-item {
  position: absolute;
  width: 380px;
  height: 500px;
  left: 50%;
  top: 50%;
  transform-style: preserve-3d;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  transform-origin: center center;
}

.carousel.dragging .eco-carousel-item {
  transition: none !important;
}

.eco-carousel-item .card {
  width: 100%;
  height: 100%;
  background: var(--gradient-card) !important;
  border: 1px solid var(--eco-border) !important;
  border-radius: 1.5rem !important;
  padding: 30px !important;
  overflow: hidden;
  box-shadow: var(--shadow-md) !important;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}
.eco-carousel-item:hover .card {
  border-color: rgba(21, 82, 52, 0.18) !important;
  box-shadow: var(--shadow-lg) !important;
}

.card-number {
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 64px;
  font-weight: 900;
  color: rgba(21, 82, 52, 0.05);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  pointer-events: none;
}

.card-image {
  width: 100%;
  height: 200px;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--eco-border);
  background: var(--eco-mint);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.eco-carousel-item:hover .card-image img {
  transform: scale(1.06);
}

.card-title {
  font-size: 1.3rem !important;
  font-weight: 800 !important;
  color: var(--eco-forest) !important;
  margin-bottom: 8px !important;
  letter-spacing: -0.02em !important;
}

.card-description {
  color: var(--eco-gray) !important;
  line-height: 1.6;
  font-size: 0.92rem !important;
  height: 4.6rem; 
  overflow: hidden;
  margin-bottom: 15px;
}

.card-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tech-badge {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 999px;
  background: var(--eco-mint);
  border: 1px solid rgba(21, 82, 52, 0.08);
  color: var(--eco-forest);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.card-cta {
  margin-top: 15px;
  padding: 10px 22px;
  border-radius: 50rem;
  border: none;
  cursor: pointer;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--eco-forest);
  color: #ffffff;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  box-shadow: 0 4px 12px rgba(21, 82, 52, 0.1);
}
.card-cta:hover {
  background: var(--eco-emerald);
  box-shadow: 0 6px 18px rgba(30, 178, 109, 0.2);
}

/* Controls y Botones */
.carousel-controls {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  z-index: 100;
}

.carousel-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid var(--eco-border);
  color: var(--eco-forest);
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.carousel-btn:hover {
  transform: scale(1.05);
  background: var(--eco-mint);
  border-color: rgba(21, 82, 52, 0.15);
}

/* Indicators */
.eco-carousel-indicators {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 100;
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--eco-sage);
  cursor: pointer;
  transition: all 0.25s;
}

.indicator.active {
  background: var(--eco-forest);
  transform: scale(1.25);
  box-shadow: 0 0 10px rgba(21, 82, 52, 0.2);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .carousel-container {
    height: 530px;
  }
  .eco-carousel-item {
    width: 320px;
    height: 430px;
  }
  .card-image {
    height: 160px;
  }
}

@media (max-width: 520px) {
  .carousel-container {
    height: 480px;
  }
  .eco-carousel-item {
    width: 270px;
    height: 380px;
    padding: 0;
  }
  .eco-carousel-item .card {
    padding: 20px !important;
  }
  .card-image {
    height: 140px;
    margin-bottom: 12px;
  }
  .card-number {
    font-size: 40px;
    top: 10px;
    right: 15px;
  }
}

/* ==========================================================================
   VISIBILIDAD DEL LOGOTIPO EN CABECERA Y PIE DE PÁGINA
   ========================================================================== */

/* Cabecera (Original, sin filtros, sobre negro total con bordes de cristal) */
.header .logo img {
  max-height: 85px !important;
  margin-top: -12px !important;
  margin-bottom: -12px !important;
  width: auto;
  object-fit: contain;
  filter: none !important;
  transition: all 0.3s ease;
}

.header .logo img:hover {
  transform: scale(1.03);
}

/* Pie de página (Con contorno para contrastar en fondo blanco cálido) */
.footer-minimal .footer-logo img {
  filter: drop-shadow(0.5px 0.5px 0px rgba(0, 0, 0, 0.5)) 
          drop-shadow(-0.5px -0.5px 0px rgba(0, 0, 0, 0.5)) 
          drop-shadow(0.5px -0.5px 0px rgba(0, 0, 0, 0.5)) 
          drop-shadow(-0.5px 0.5px 0px rgba(0, 0, 0, 0.5));
  transition: all 0.3s ease;
}

/* ==========================================================================
   GRAIN / NOISE BACKGROUNDS (ESTILO PREMIUM ECOSYSTEMSAS.COM)
   ========================================================================== */

.grainy-white {
  position: relative;
  background: linear-gradient(180deg, #fbfbf9 0%, #eef6f2 50%, #fbfbf9 100%) !important;
}

.grainy-black {
  position: relative;
  background-image: url('../../texturas/dark-mosaic.png') !important;
  background-repeat: repeat;
  background-color: #0b0f0c !important; /* Rich natural black/forest background */
}

/* Ajustes de contraste para la sección oscura del carrusel */
.grainy-black h2, 
.grainy-black .section-header h2 {
  color: #ffffff !important;
}

.grainy-black p, 
.grainy-black .section-header p {
  color: rgba(255, 255, 255, 0.7) !important;
}

.grainy-black .eco-badge {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

/* ==========================================================================
   LOGO DE TEXTO ANIMADO EN PIE DE PÁGINA (FOOTER)
   ========================================================================= */

.footer-logo-text {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
  font-size: 2.2rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.04em !important;
  background: var(--gradient-hero) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  display: inline-block !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  animation: footerLogoPulse 3s ease-in-out infinite alternate !important;
}

.footer-logo-text:hover {
  transform: scale(1.05) !important;
}

@keyframes footerLogoPulse {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 2px 4px rgba(21, 82, 52, 0.08));
  }
  100% {
    transform: scale(1.04);
    filter: drop-shadow(0 4px 15px rgba(30, 178, 109, 0.25));
  }
}


