/*
  Advans Brokers - Layout & Components
  Tokens: heredados de master.css (fuente única de verdad)
  Theming: via .web-brokers en master.css
*/

/* ── Alias locales (mapean a tokens de master.css) ──────────── */
/* No se redefinen colores aquí — solo alias para compatibilidad */
.web-brokers {
  --primary:       var(--color-primary);
  --primary-dark:  var(--color-primary);
  --accent-yellow: var(--color-accent);
  --text-main:     var(--color-gray-900);
  --text-muted:    var(--color-gray-500);
  --bg-white:      var(--color-white);
  --transition:    all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

body {
  font-family: var(--font-body);
  color: var(--color-gray-900);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
}

/* Header Brokers Style */
header {
  width: 100%;
  background: white;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9000;
  border-bottom: 1px solid #eee;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo svg {
  height: 26px;
  width: auto;
  fill: var(--color-primary, #0b1c2e);
}

.header-actions {
  display: flex;
  gap: 15px;
}

.btn-area {
  background: #c5d4e3;
  color: var(--primary-dark);
  padding: 5px 16px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
}

.btn-area:hover {
  background: #b0c4d8;
}

/* Etiqueta corta de Clientes/Partners: oculta en escritorio, visible en móvil */
.header-actions .btn-area .btn-area-label-short {
  display: none;
}

.header-bottom {
  border-top: 1px solid #f5f5f5;
  padding: 15px 0;
}

.nav-links {
  display: flex;
  gap: 40px;
}

.nav-links a {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--color-primary);
  letter-spacing: 0.12em;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}

/* WCAG AA: color alone no es suficiente; se usa subrayado lima + texto navy (17:1) */
.nav-links a:hover {
  color: var(--color-primary);
  border-bottom-color: var(--color-accent);
}

.nav-links a.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-accent);
  font-weight: 700;
}

/* Hero Slider */
.slider-container {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
}

.slider-wrapper {
  display: flex;
  width: 300%; /* For 3 slides */
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

.slide {
  width: 33.333%;
  height: 100%;
  position: relative;
}

.slide img, .slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  padding: 0 10%;
}

.glass-box {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  padding: 60px;
  border-radius: 20px;
  max-width: 600px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.glass-box h2 {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 3rem;
  font-weight: 300;
  margin-bottom: 20px;
  color: var(--primary-dark);
}

.glass-box p {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* Dots */
.slider-dots {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  background: rgba(255,255,255,0.3);
  padding: 10px 20px;
  border-radius: 50px;
  backdrop-filter: blur(5px);
  z-index: 5;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: white;
  opacity: 0.5;
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  opacity: 1;
  width: 30px;
  border-radius: 10px;
}

/* Page Structure Reveal */
.page-content-wrapper {
  position: relative;
  background-color: var(--bg-white);
  z-index: 2;
  margin-bottom: var(--footer-h, 340px); /* JS lo ajusta al tamaño real */
  box-shadow: 0 20px 50px rgba(0,0,0,0.1);
  min-height: 100vh;
}

/* Footer Reveal Brokers - New Style */
footer {
  font-family: var(--font-heading);
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #f8f9fa;
  color: var(--primary-dark);
  z-index: 1;
  padding: 48px 0 32px;    /* auto-height: se adapta al contenido */
  overflow: hidden;
}

.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 20px;
}

.footer-logo {
  font-size: 2rem;
  margin-bottom: 20px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 16px;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  font-size: 0.8rem;
  opacity: 0.6;
}

/* ── SCROLL BANNER ───────────────────────────────── */
.scroll-banner {
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--primary-dark);
  color: white;
  overflow: hidden;
  text-align: center;
}

#scroll-banner-text {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
  margin: 0;
}

/* Overlap fix for Brokers */
.web-brokers .slider-container {
  margin-top: 0 !important;
  padding-top: 140px;
  height: 740px !important;
}

.web-brokers .page-content-wrapper {
  padding-top: 0 !important;
}

.web-brokers .page-content-wrapper:not(:has(.slider-container)):not(:has(.cms-slider-section)) {
  padding-top: 140px !important;
}

/* ── PILARES GRID ────────────────────────────────── */
.pilares-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: 40px;
}

.pilar-card {
  text-align: center;
  padding: 40px;
  background: #f8f9fa;
  border-radius: 24px;
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.03);
}

.pilar-card:hover {
  transform: translateY(-10px);
  background: white;
  box-shadow: 0 20px 40px rgba(0,0,0,0.05);
  border-color: var(--primary);
}

.pilar-icon {
  width: 70px;
  height: 70px;
  background: #c5d4e3;
  color: var(--primary-dark);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 30px;
  transition: background .25s, color .25s;
}

.pilar-icon svg, .pilar-icon i {
  width: 32px;
  height: 32px;
}

.pilar-card h4 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--primary-dark);
}

.pilar-card p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── ENTORNO GRID ────────────────────────────────── */
.entorno-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 80px;
  align-items: center;
}

.entorno-image img {
  border-radius: 30px;
  box-shadow: var(--premium-shadow);
  width: 100%;
}

/* ── CTA SECTION ─────────────────────────────────── */
/* Padding y fondo los gestiona cms-blocks.css */
.cta-brokers {
  position: relative;
  z-index: 5;
}

/* Responsive Brokers Tweaks */
@media (max-width: 768px) {
  .header-top {
    flex-direction: row !important;
    justify-content: space-between !important;
  }
  
  /* Mantener visibles los botones Clientes/Partners en móvil con etiqueta corta */
  .header-actions {
    display: flex !important;
    gap: 6px;
  }
  .header-actions .btn-area {
    padding: 6px 10px;
    gap: 4px;
  }
  .header-actions .btn-area .btn-area-label {
    display: none;
  }
  .header-actions .btn-area .btn-area-label-short {
    display: inline;
    font-size: 0.78rem;
    font-weight: 600;
  }
  
  .glass-box {
    padding: 30px !important;
  }

  .glass-box h2 {
    font-size: 2rem;
  }
  
  .slider-container {
    height: 500px !important;
    padding-top: 100px !important;
  }

  .scroll-banner {
    height: 200px;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .footer-main p { margin: 0 auto; }

  .footer-social { justify-content: center; }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  /* Botones sueltos en bloques CTA: centrar en móvil */
  .cta-brokers .cms-cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  /* Botón de tipo "button" solitario: centrar en móvil */
  .cms-button-wrap--left {
    text-align: center;
  }
}

/* ── FOOTER SOCIAL ICONS ─────────────────────────── */
.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(0, 45, 87, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary-light, #002D57);
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-icon:hover {
  background: var(--color-primary-light, #002D57);
  color: white;
  transform: translateY(-3px);
  border-color: var(--color-primary-light, #002D57);
}

.social-icon i, .social-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  display: block;
}
