/* =========================================================
   B Trade Capital — styles.css (Paso 2)
   - Paleta oscura + acentos (azul eléctrico / dorado)
   - Mobile-First, animaciones suaves, enfoque premium
   - Navbar shrink (clase .scrolled la aplicaremos en Paso 3 JS)
   - Parallax-lite en banners, Hero estilizado, formularios pro
   ========================================================= */

/* -------------------- Variables de tema -------------------- */
:root {
  --bg-900: #0b0f14;      /* fondo principal */
  --bg-800: #11161d;      /* superficie oscura */
  --bg-700: #151b23;
  --text-100: #e9eef5;    /* texto primario */
  --text-200: #c8d0da;    /* texto secundario */
  --muted-400: #8a94a1;   /* texto atenuado */
  --primary: #2aa1ff;     /* azul eléctrico */
  --primary-700: #1782d0;
  --gold: #f3c969;        /* dorado */
  --danger: #ff5a72;
  --success: #27d17f;

  --radius-xl: 1.25rem;
  --radius-lg: .9rem;
  --radius-md: .6rem;

  --shadow-soft: 0 10px 25px rgba(0,0,0,.25);
  --shadow-focus: 0 0 0 .25rem rgba(42,161,255,.25);

  --section-pad-y: 4.5rem;
  --container-max: 1140px;
}

/* -------------------- Reset/Globals -------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  background: var(--bg-900);
  color: var(--text-100);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ajuste visual para secciones claras */
.bg-light { background-color: var(--bg-800) !important; color: var(--text-100); }

/* Links */
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-700); }

/* Containers */
.container { max-width: var(--container-max); }

/* Headings */
h1,h2,h3,h4,h5,h6 { color: var(--text-100); letter-spacing: .2px; }
.lead { color: var(--text-200); }

/* Borde/ Tarjetas utilitario */
.border { border: 1px solid rgba(255,255,255,.08) !important; }

/* Suavizar transiciones en elementos comunes */
.btn, .form-control, .form-select, .navbar, .card, .border, .toast {
  transition: all .25s ease;
}

/* -------------------- Navbar Sticky + Shrink -------------------- */
.navbar {
  padding: .9rem 0;
  background: linear-gradient(180deg, rgba(11,15,20,.8), rgba(11,15,20,.3));
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.navbar .navbar-brand { letter-spacing: .5px; }
.navbar .nav-link { color: var(--text-200) !important; margin-inline: .25rem; }
.navbar .nav-link:hover,
.navbar .nav-link.active { color: #fff !important; }

.navbar.scrolled {
  padding: .5rem 0;
  background: rgba(11,15,20,.95);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}

/* Dropdown de idioma */
.dropdown-menu {
  background: var(--bg-800);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-md);
}
.dropdown-item { color: var(--text-200); }
.dropdown-item:hover { background: var(--bg-700); color: #fff; }

/* -------------------- Hero / Carousel -------------------- */
#inicio .carousel,
#inicio .carousel-inner,
#inicio .carousel-item { height: min(90vh, 820px); }

#inicio .carousel-item > img {
  object-fit: cover;
  height: 100%;
  filter: brightness(.75) saturate(1.05);
}

#inicio .carousel-item::after {
  content:"";
  position:absolute; inset:0;
  background: radial-gradient(1200px 500px at 50% 80%, rgba(42,161,255,.25), transparent 60%),
              linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,.45));
}

#inicio .carousel-caption {
  bottom: 12%;
  text-shadow: 0 8px 24px rgba(0,0,0,.55);
}
#inicio .carousel-caption .btn {
  padding:.8rem 1.5rem; border-radius: 999px;
}

/* Indicadores */
.carousel-indicators [data-bs-target] {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,.45);
}
.carousel-indicators .active { background: var(--primary); }

/* Controles */
.carousel-control-prev-icon, .carousel-control-next-icon {
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.6));
}

/* -------------------- Banners (Parallax-lite) -------------------- */
section.parallax {
  position: relative;
  background-size: cover; background-position: center;
  background-attachment: fixed; /* fallback */
  isolation: isolate;
}
section.parallax::before {
  content:"";
  position:absolute; inset:0; z-index:0;
  background: linear-gradient(180deg, rgba(11,15,20,.25), rgba(11,15,20,.6));
}
section.parallax > .container { position: relative; z-index: 1; }

/* Estilos visuales de banners ya presentes */
section.py-5.text-center .btn { border-radius: 999px; }

/* -------------------- Tarjetas / Cajas -------------------- */
.p-4.rounded-3.h-100.border {
  border-radius: var(--radius-lg) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.02));
}
.p-4.rounded-3.h-100.border:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

/* -------------------- Botones -------------------- */
.btn-primary {
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary-700);
  --bs-btn-hover-border-color: var(--primary-700);
  --bs-btn-active-bg: var(--primary-700);
  --bs-btn-color: #04121e;
  color:#04121e;
  font-weight: 700;
}
.btn-outline-light {
  --bs-btn-color: #fff;
  --bs-btn-border-color: rgba(255,255,255,.6);
  --bs-btn-hover-bg: #fff;
  --bs-btn-hover-color: #000;
}
.btn-gradient {
  background: linear-gradient(90deg, var(--primary), var(--gold));
  border: none; color:#04121e; font-weight: 800;
}

/* -------------------- Secciones -------------------- */
section { padding-block: var(--section-pad-y); }
section .section-subtitle { color: var(--muted-400); }

/* -------------------- Formularios -------------------- */
.form-label { color: var(--text-200); font-weight: 600; }
.form-control, .form-select {
  background: var(--bg-700);
  border: 1px solid rgba(255,255,255,.08);
  color: #fff;
  border-radius: .75rem;
}
.form-control::placeholder { color: #8fa0b2; }
.form-control:focus, .form-select:focus {
  background: var(--bg-700);
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
  color: #fff;
}
input[type="checkbox"].form-check-input {
  border-radius: .35rem;
  border-color: rgba(255,255,255,.25);
}
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }

/* Intl-Tel-Input (overrides básicos, se cargará en Paso 3 JS) */
.iti { width: 100%; }
.iti__country-list {
  background: var(--bg-800);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: .5rem;
}
.iti__country-name, .iti__dial-code { color: var(--text-100); }

/* -------------------- Modales (Legales y Exit-Intent) -------------------- */
.modal-content {
  background: linear-gradient(180deg, var(--bg-800), var(--bg-900));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}
.modal-header { border-bottom: 1px solid rgba(255,255,255,.08); }
.modal-body { color: var(--text-200); }

/* -------------------- Toast de Cookies -------------------- */
#cookieToast.toast {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  opacity: .98;
}
#cookieToast .btn { border-radius: 999px; }

/* -------------------- Footer -------------------- */
footer { background: radial-gradient(800px 300px at 20% 0%, rgba(42,161,255,.12), transparent), var(--bg-900); }
footer .link-light { opacity: .85; }
footer .link-light:hover { opacity: 1; color:#fff; }
footer hr { border-color: rgba(255,255,255,.15) !important; }

/* -------------------- Utilidades y animaciones -------------------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@keyframes floaty {
  from { transform: translateY(0); }
  to   { transform: translateY(-6px); }
}
.floaty { animation: floaty 2.6s ease-in-out infinite alternate; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* -------------------- Ajustes responsivos -------------------- */
@media (min-width: 576px) {
  #inicio .carousel-caption { bottom: 14%; }
}
@media (min-width: 992px) {
  .navbar .nav-link { padding-inline: .6rem; }
  #inicio .carousel-caption { bottom: 16%; }
}
@media (min-width: 1200px) {
  #inicio .carousel,
  #inicio .carousel-inner,
  #inicio .carousel-item { height: 88vh; }
}

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* --- Brand logo responsive --- */
.navbar .navbar-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: 0;
  margin-right: 1rem;
}

.brand-logo {
  display: block;
  height: clamp(28px, 5.5vw, 50px); /* móvil → desktop */
  width: auto;
  transition: height .25s ease, transform .25s ease;
  image-rendering: -webkit-optimize-contrast;
}

/* Al encogerse la navbar (scroll) reducimos un poco el logo */
.navbar.scrolled .brand-logo {
  height: clamp(22px, 4.5vw, 40px);
}

.navbar .navbar-brand:hover .brand-logo { transform: translateY(-1px); }


/* En assets/css/styles.css */
.hero .carousel-item { height: clamp(380px, 100vh, 900px); }
.hero .carousel-item picture,
.hero .carousel-item img { height: 100%; object-fit: cover; }




/* El contenedor del slide debe ser relativo para apilar capas */
.hero .carousel-item {
  position: relative;
  height: clamp(420px, 100vh, 860px); /* alto tipo hero */
  overflow: hidden;
}

/* Imagen a tamaño completo, detrás */
.hero .carousel-item picture,
.hero .carousel-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;          /* recorte elegante */
  z-index: 0;                 /* fondo */
}

/* Capa oscura para contraste de textos */
.hero .hero-overlay {
  position: absolute;
  inset: 0;
  /* Gradiente superior suave + foco en parte baja donde suele ir el copy */
  background:
    linear-gradient(to bottom, rgba(0,0,0,.35) 0%, rgba(0,0,0,.25) 35%, rgba(0,0,0,.55) 100%);
  z-index: 1;                 /* sobre imagen, bajo textos */
  pointer-events: none;       /* no bloquea clics en botones */
}

/* Asegurar que el caption esté siempre arriba */
.hero .carousel-caption {
  z-index: 2;
}

/* Centrado vertical con transform */
.hero .carousel-caption.center-vert {
  top: 50%;
  bottom: auto;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}


/* Posiciones útiles del caption (elige una) */
.hero .carousel-caption.text-center {
  left: 50%;
  transform: translateX(-50%);
  right: auto;
  bottom: 12%;
}
.hero .carousel-caption.text-start {
  left: 7%;
  right: auto;
  bottom: 12%;
}
.hero .carousel-caption.text-end {
  right: 7%;
  left: auto;
  bottom: 12%;
}

/* Tipografías del hero (ajusta a tu estilo) */
.hero-title {
  font-size: clamp(1.6rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0,0,0,.35);
  
}
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: #e9eef5;
  text-shadow: 0 1px 12px rgba(0,0,0,.3);
  
}

/* Botón un poco más grande en hero */
.hero .btn-lg {
  padding: .85rem 1.4rem;
  border-radius: .75rem;
}


/* Controles e indicadores por encima de la overlay */
.hero .carousel-control-prev,
.hero .carousel-control-next,
.hero .carousel-indicators {
  z-index: 3;
}



/* Centrado vertical con transform */
.hero .carousel-caption.center-vert {
  top: 50%;
  bottom: auto;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
@media (max-width: 576px) {
  .hero .hero-overlay {
    background: linear-gradient(to bottom, rgba(0,0,0,.5) 0%, rgba(0,0,0,.4) 35%, rgba(0,0,0,.7) 100%);
  }
}
