:root{
  /* Paleta Trade Signal */
  --brand-green:#74992E;
  --brand-lime:#85AF34;
  --brand-blue:#19AAD9;
  --brand-deep:#24442B;

  --bg:#FFFFFF;
  --bg-alt:#F6F9FC;
  --ink:#1F2937;      /* texto principal */
  --muted:#5F6B7A;    /* texto secundario */
  --border:#E5EAF1;
}

html{ scroll-behavior:smooth; }
body{
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

/* NAV */
.navbar{
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(8px);
  transition: all .25s ease;
  border-bottom: 1px solid var(--border);
}
.navbar.scrolled{
  padding-top:.35rem !important;
  padding-bottom:.35rem !important;
  box-shadow: 0 8px 24px rgba(16,24,40,.08);
}
.navbar .nav-link{
  color: var(--ink); opacity:.8; font-weight:600;
}
.navbar .nav-link.active, .navbar .nav-link:hover{ color: var(--brand-deep); opacity:1; }
.brand-logo{ height: 55px; }
.brand-text{ font-weight:800; color: var(--brand-deep); }

/* HERO */
.hero .carousel-item{ min-height: 100vh; display:flex; align-items:center; }
.hero .carousel-caption{ bottom: 18%; }
.caption-panel{
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(6px);
  color: var(--ink);
  text-shadow: none;
  border: 1px solid var(--border);
  border-radius: 16px;
}
.caption-panel .btn-primary{ box-shadow: 0 8px 20px rgba(116,153,46,.25); }

/* Placeholders para que ubiques imágenes */
.img-placeholder{
  background: linear-gradient(135deg, #ECF5FF, #F7FAEF);
  border: 2px dashed var(--border);
  display:flex; align-items:center; justify-content:center;
  text-align:center; color: var(--muted);
  font-weight:600; letter-spacing:.2px; padding:1rem;
  border-radius: 14px;
}

/* SECTIONS */
.section{ padding: 90px 0; background: var(--bg); }
.section-sm{ padding: 60px 0; }
.bg-light{ background: var(--bg-alt) !important; }

/* Tarjetas */
.card{
  background: #fff; color: var(--ink);
  border:1px solid var(--border);
  box-shadow: 0 10px 30px rgba(28,41,61,.06);
  border-radius: 16px;
}
.card .stretched-link{ color: var(--brand-deep); }

/* CTA banners */
.cta-banner{
  background: linear-gradient(135deg, var(--brand-green), var(--brand-blue));
  color:#fff;
}
.cta-banner-contrast{
  background: linear-gradient(135deg, #0B1220, var(--brand-blue));
  color:#fff;
}

/* Botones */
.btn-primary{
  background: var(--brand-green);
  border-color: var(--brand-green);
}
.btn-primary:hover{
  background: var(--brand-deep);
  border-color: var(--brand-deep);
}
.btn-outline-primary{
  color: var(--brand-deep);
  border-color: var(--brand-green);
}
.btn-outline-primary:hover{
  background: var(--brand-green);
  color:#fff;
}

/* Counters */
.counter{
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight:800;
  color: var(--brand-blue);
}

/* Footer */
.footer{
  background: #fff;
  border-top:1px solid var(--border);
  color: var(--muted);
}

/* Back to top */
.back-to-top{
  position: fixed; bottom: 24px; right: 24px;
  width: 56px; height: 56px; border-radius: 50%;
  display: none; align-items:center; justify-content:center;
  box-shadow: 0 12px 30px rgba(15,23,42,.15);
  z-index: 1000;
  background: linear-gradient(135deg, var(--brand-lime), var(--brand-blue));
  border: none;
}

/* Helpers */
.ratio{ border-radius: 14px; overflow:hidden; }
h1,h2,h3,h4,h5{ color:#0B1220; }
p{ color: var(--muted); }

@media (max-width: 991.98px){
  .hero .carousel-caption{ bottom: 12%; }
}

/* Progreso de scroll */
.progress-top{
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--brand-lime), var(--brand-blue));
  z-index: 1100;
}

/* Toasts */
.toast{
  border:1px solid var(--border);
  box-shadow: 0 12px 30px rgba(15,23,42,.15);
  border-radius: 12px;
}

@media (prefers-reduced-motion: reduce){
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
#consentBanner p{ font-size:.9rem; }
@media (max-width: 576px){
  #consentBanner{ width: 95%; left: 50%; transform: translateX(-50%); }
}

#testimonios .card p { color: var(--muted); }
#faq .accordion-button { font-weight: 600; }

/* Hero visible a pantalla completa y la imagen cubre */
.hero .carousel, .hero .carousel-inner, .hero .carousel-item { min-height: 100vh; }
.hero .carousel-item > img { height: 100vh; object-fit: cover; object-position: center; }

/* Oculta el carrusel hasta que quede normalizado para evitar ver el slide equivocado */
.hero #heroCarousel { visibility: hidden; }
.hero #heroCarousel.ready { visibility: visible; }


/* --- Hard reset para el carrusel del HERO --- */
#inicio #heroCarousel { visibility: hidden; }         /* se mostrará cuando JS ponga .ready */
#inicio #heroCarousel.ready { visibility: visible; }

#inicio .carousel-inner {
  position: relative !important;
  display: block !important;       /* evita que algún reset lo ponga en flex/grid */
  overflow: hidden !important;
}

#inicio .carousel-item {
  position: relative !important;
  display: none !important;        /* por defecto TODOS ocultos */
  opacity: 0 !important;
  z-index: 0 !important;
  transition: transform .6s ease;  /* transiciones normales de Bootstrap */
}

/* Solo visibles los estados de Bootstrap */
#inicio .carousel-item.active,
#inicio .carousel-item-next,
#inicio .carousel-item-prev {
  display: block !important;
  opacity: 1 !important;
  z-index: 1 !important;
}

/* Tamaño y encuadre consistentes */
#inicio .carousel,
#inicio .carousel-inner,
#inicio .carousel-item { min-height: 100vh; }
#inicio .carousel-item > img {
  height: 100vh; object-fit: cover; object-position: center;
}

/* Si por accidente se aplicó AOS al hero, neutralízalo aquí */
#inicio [data-aos] { opacity: 1 !important; transform: none !important; }
