/* CB Timeline Widget v3 — scroll interno aislado */
.cb2-wrap *, .cb2-wrap *::before, .cb2-wrap *::after { box-sizing: border-box; }

/* ── Reset contenedor Elementor (evita espacio blanco entre secciones) ── */
.elementor-widget-cb_timeline_v2 > .elementor-widget-container {
  padding: 0 !important;
  margin: 0 !important;
  line-height: 0;
  font-size: 0;
}

/* ── Contenedor principal ── */
.cb2-wrap {
  position: relative;
  width: 100%;
  height: 80vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 767px) {
  .cb2-wrap { height: 80svh; }
}

/* Overlay */
.cb2-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0,0,0,0.55);
  z-index: 0;
  pointer-events: none;
}

/* ── Fila interna ── */
.cb2-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 36px 48px;
  height: 100%;
}

/* ── Alineación horizontal del bloque de contenido ── */
.cb2-align-left   .cb2-inner { margin-left: 0;   margin-right: auto; }
.cb2-align-center .cb2-inner { margin-left: auto; margin-right: auto; }
.cb2-align-right  .cb2-inner { margin-left: auto; margin-right: 0;    }

/* ── Columna línea ── */
.cb2-line-col {
  position: relative;
  flex-shrink: 0;
  width: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  align-self: stretch;
}

.cb2-track {
  position: absolute;
  top: 0;
  height: 85%;
  left: 50%;
  transform: translateX(-50%);
  width: 1.5px;
  background-color: rgba(255,255,255,0.70);
}

.cb2-dot {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.22);
  z-index: 2;
  transition: top 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.cb2-arrow {
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  color: rgba(255,255,255,0.7);
  z-index: 2;
  line-height: 0;
  animation: cb2-bounce 1.6s ease-in-out infinite;
}

@keyframes cb2-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(4px); }
}

/* ── Columna contenido ── */
.cb2-content {
  flex: 1;
  padding-left: 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cb2-header { margin-bottom: 32px; flex-shrink: 0; }

.cb2-title {
  font-family: 'Georgia', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.0;
  margin: 0 0 10px;
}

.cb2-subtitle {
  font-family: 'Arial', sans-serif;
  font-size: 0.92rem;
  color: rgba(255,255,255,0.6);
  font-style: italic;
  letter-spacing: 0.01em;
  margin: 0;
}

/* ── Items ── */
.cb2-items {
  position: relative;
  flex: 1;
  min-height: 120px;
  max-height: 340px;
}

.cb2-item {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition-property: opacity, transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 420ms;
}

.cb2-item.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cb2-item.is-leaving {
  opacity: 0;
  transform: translateY(-14px);
}

.cb2-item-inner {
  display: flex;
  flex-direction: column;
  gap: 13px;
  max-width: 460px;
}

.cb2-item-title {
  font-family: 'Arial', sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
}

.cb2-item-body {
  font-family: 'Arial', sans-serif;
  font-size: 0.88rem;
  line-height: 1.82;
  color: rgba(255,255,255,0.70);
  margin: 0;
}

.cb2-item-next {
  margin-top: 28px;
  font-family: 'Arial', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
}

/* ── Pips ── */
.cb2-pips {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 2;
}

.cb2-pip {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transition: background 0.3s;
  cursor: pointer;
}

.cb2-pip.is-on { background: #fff; }

/* ── Texto inferior fijo (dentro del flujo de .cb2-content) ── */
.cb2-footer-text {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 24px;
  color: rgba(255,255,255,0.50);
  font-family: 'Arial', sans-serif;
  font-size: 0.82rem;
  line-height: 1.6;
}

/* Alineación del footer-text según alineación de contenido */
.cb2-align-left   .cb2-footer-text { text-align: left; }
.cb2-align-center .cb2-footer-text { text-align: center; }
.cb2-align-right  .cb2-footer-text { text-align: right; }

/* Reset de elementos HTML dentro del footer text */
.cb2-footer-text p { margin: 0 0 0.4em; line-height: inherit; font-size: inherit; color: inherit; }
.cb2-footer-text p:last-child { margin-bottom: 0; }
.cb2-footer-text br { display: block; content: ""; margin: 0; }

/* ── Editor Elementor ── */
.elementor-editor-active .cb2-wrap         { height: auto !important; min-height: 320px; overflow: visible; }
.elementor-editor-active .cb2-inner        { height: auto !important; }
.elementor-editor-active .cb2-items        { position: relative !important; min-height: auto; max-height: none; }
.elementor-editor-active .cb2-item         { position: relative !important; opacity: 1 !important; transform: none !important; margin-bottom: 20px; transition: none !important; }
.elementor-editor-active .cb2-pips         { position: relative; bottom: auto; left: auto; transform: none; margin-top: 16px; justify-content: center; }
.elementor-editor-active .cb2-arrow        { animation: none; }
.elementor-editor-active .cb2-footer-text  { margin-top: 20px; padding-top: 16px; }
.elementor-editor-active .elementor-widget-cb_timeline_v2 > .elementor-widget-container {
  padding: inherit !important; margin: inherit !important;
  line-height: inherit; font-size: inherit;
}

/* ── Responsive ── */
@media (max-width: 767px) {
  .cb2-inner       { padding: 40px 24px; }
  .cb2-line-col    { width: 16px; }
  .cb2-content     { padding-left: 28px; }
  .cb2-header      { margin-bottom: 20px; }
  .cb2-footer-text { padding-top: 16px; }
}
@media (max-width: 480px) {
  .cb2-inner       { padding: 32px 16px; }
  .cb2-content     { padding-left: 20px; }
  .cb2-footer-text { padding-top: 12px; }
}

/* ── Alineación vertical de la columna de línea ── */
.cb2-line-center .cb2-line-col { align-self: center;     height: 70%; }
.cb2-line-top    .cb2-line-col { align-self: flex-start; height: 70%; justify-content: flex-start; }
.cb2-line-bottom .cb2-line-col { align-self: flex-end;   height: 70%; justify-content: flex-end; }
.cb2-line-stretch .cb2-line-col { align-self: stretch; }
