/* ============================================================
   Digytekno — Timeline Widget  |  v1.0.0
   Paleta: Digytekno Color Kit
   ============================================================ */

/* ---- CSS custom properties (valores por defecto) ---- */
.dt-timeline {
  --dt-line-color: #C8D8EF;
  --dt-dot-size: 44px;
}

/* ---- Reset base ---- */
.dt-timeline *,
.dt-timeline *::before,
.dt-timeline *::after {
  box-sizing: border-box;
}

/* ============================================================
   TRACK Y LÍNEA CONECTORA
   ============================================================ */

.dt-timeline__track {
  position: relative;
  width: 100%;
}

.dt-timeline__line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--dt-dot-size) / 2);   /* centro del dot por defecto */
  width: 2px;
  background-color: var(--dt-line-color);
  z-index: 0;
  border-radius: 2px;
  overflow: hidden;
  transform: translateX(-50%);
}

.dt-timeline__line-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background-color: #2C4A7E;
  transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Estilos de línea vía data-attribute ---- */
.dt-timeline[data-line-style="dashed"] .dt-timeline__line {
  background-color: transparent;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--dt-line-color) 0px, var(--dt-line-color) 8px,
    transparent 8px, transparent 16px
  );
}

.dt-timeline[data-line-style="dotted"] .dt-timeline__line {
  background-color: transparent;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--dt-line-color) 0px, var(--dt-line-color) 4px,
    transparent 4px, transparent 10px
  );
}

.dt-timeline[data-line-style="double"] .dt-timeline__line {
  background-color: transparent;
  background-image: repeating-linear-gradient(
    to right,
    var(--dt-line-color) 0px, var(--dt-line-color) 1px,
    transparent 1px, transparent 3px,
    var(--dt-line-color) 3px, var(--dt-line-color) 4px
  );
  background-size: 4px 100%;
}

/* Mantener el selector del control de color apuntando a la custom property */
/* El selector en PHP: '{{WRAPPER}} .dt-timeline__line' => '--dt-line-color: {{VALUE}};' */
/* (esto permite que dashed/dotted hereden el color) */

/* ============================================================
   ITEMS
   ============================================================ */

.dt-timeline__items {
  position: relative;
  z-index: 1;
}

.dt-timeline__item {
  display: flex;
  align-items: flex-start;
  position: relative;
}

.dt-timeline__item + .dt-timeline__item {
  margin-top: 40px;
}

/* ============================================================
   PUNTO / ÍCONO
   ============================================================ */

.dt-timeline__dot-wrapper {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  width: var(--dt-dot-size);
  height: var(--dt-dot-size);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dt-timeline__dot {
  width: var(--dt-dot-size);
  height: var(--dt-dot-size);
  border-radius: 50%;
  background-color: #2C4A7E;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  flex-shrink: 0;
}

.dt-timeline__item:hover .dt-timeline__dot {
  background-color: #1E3460;
  transform: scale(1.1);
}

.dt-timeline__dot i {
  color: #ffffff;
  font-size: 18px;
  line-height: 1;
}

.dt-timeline__dot svg {
  width: 18px;
  height: 18px;
  fill: #ffffff;
}

/* ============================================================
   TARJETA DE CONTENIDO
   ============================================================ */

.dt-timeline__content {
  flex: 1;
  margin-left: 24px;
  min-width: 0; /* evita overflow en flex */
}

.dt-timeline__card-link {
  text-decoration: none;
  display: block;
  color: inherit;
}

.dt-timeline__card-link:hover,
.dt-timeline__card-link:focus {
  text-decoration: none;
  outline: none;
}

.dt-timeline__card {
  background-color: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 24px 28px;
  position: relative;
  transition:
    background-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease,
    border-color 0.25s ease;
  box-shadow: 0 4px 20px rgba(44, 74, 126, 0.10);
}

.dt-timeline__item:hover .dt-timeline__card {
  background-color: #EBF1F9;
  border-color: #C8D8EF;
  box-shadow: 0 8px 32px rgba(44, 74, 126, 0.15);
  transform: translateY(-2px);
}

/* ---- Flecha decorativa ---- */
/* Oculta por defecto; se activa con la clase has-arrow */
.dt-timeline__card::before {
  content: '';
  position: absolute;
  top: 14px;
  left: -10px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 10px solid #ffffff;
  border-left: 0;
  display: none;
  filter: drop-shadow(-2px 0 1px rgba(44, 74, 126, 0.06));
}

/* Activar flecha según layout */
.dt-timeline--has-arrow.dt-timeline--vertical-left .dt-timeline__card::before,
.dt-timeline--has-arrow.dt-timeline--vertical-center .dt-timeline__item:nth-child(odd) .dt-timeline__card::before {
  display: block;
}

/* Flecha hacia la derecha (para layout right y center-even) */
.dt-timeline--has-arrow.dt-timeline--vertical-right .dt-timeline__card::before,
.dt-timeline--has-arrow.dt-timeline--vertical-center .dt-timeline__item:nth-child(even) .dt-timeline__card::before {
  display: block;
  left: auto;
  right: -10px;
  border-right: 0;
  border-left: 10px solid #ffffff;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  filter: drop-shadow(2px 0 1px rgba(44, 74, 126, 0.06));
}

/* ============================================================
   FECHA / ETIQUETA
   ============================================================ */

.dt-timeline__date {
  display: inline-block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #456FAD;
  background-color: #EBF1F9;
  border-radius: 20px;
  padding: 4px 10px;
  margin-bottom: 8px;
  line-height: 1.4;
}

.dt-timeline__date--below {
  margin-bottom: 0;
  margin-top: 8px;
  display: block;
}

/* Fecha flotando sobre el dot (opción "En el punto central") */
.dt-timeline__date--in-dot {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 0;
  white-space: nowrap;
  z-index: 3;
}

/* ============================================================
   IMAGEN EN TARJETA
   ============================================================ */

.dt-timeline__image {
  width: 100%;
  overflow: hidden;
  line-height: 0; /* elimina espacio debajo de img */
}

.dt-timeline__image--top {
  margin-bottom: 16px;
  /* Imagen sangra hasta los bordes de la tarjeta */
  margin-top: calc(-1 * var(--card-pt, 24px));
  margin-left: calc(-1 * var(--card-pl, 28px));
  margin-right: calc(-1 * var(--card-pr, 28px));
  border-radius: var(--card-radius-tl, 12px) var(--card-radius-tr, 12px) 0 0;
}

.dt-timeline__image--bottom {
  margin-top: 16px;
  margin-bottom: calc(-1 * var(--card-pb, 24px));
  margin-left: calc(-1 * var(--card-pl, 28px));
  margin-right: calc(-1 * var(--card-pr, 28px));
  border-radius: 0 0 var(--card-radius-bl, 12px) var(--card-radius-br, 12px);
}

.dt-timeline__image img {
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  transition: transform 0.35s ease;
}

/* Imágenes sangradas al borde: heredan el radio de la tarjeta */
.dt-timeline__image--top img {
  border-radius: var(--card-radius-tl, 12px) var(--card-radius-tr, 12px) 0 0;
}

.dt-timeline__image--bottom img {
  border-radius: 0 0 var(--card-radius-bl, 12px) var(--card-radius-br, 12px);
}

.dt-timeline__item:hover .dt-timeline__image img {
  transform: scale(1.03);
}

/* ============================================================
   IMAGEN EN EL PUNTO (as-dot)
   ============================================================ */

.dt-timeline__dot--image {
  padding: 0;
  overflow: hidden;
  background-color: transparent;
  border: 2px solid #C8D8EF;
}

.dt-timeline__dot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.dt-timeline__item:hover .dt-timeline__dot--image {
  border-color: #2C4A7E;
  transform: scale(1.1);
}

/* ============================================================
   TÍTULO
   ============================================================ */

.dt-timeline__title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #1A1F2E;
  margin: 0 0 8px 0;
  line-height: 1.3;
  transition: color 0.2s ease;
}

.dt-timeline__item:hover .dt-timeline__title,
.dt-timeline__card-link:hover .dt-timeline__title {
  color: #2C4A7E;
}

/* ============================================================
   DESCRIPCIÓN
   ============================================================ */

.dt-timeline__description {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #6B7280;
  margin: 0;
  line-height: 1.65;
}

/* ============================================================
   VARIANTE: VERTICAL — TARJETAS A LA IZQUIERDA (right)
   ============================================================ */

.dt-timeline--vertical-right .dt-timeline__line {
  left: auto;
  right: calc(var(--dt-dot-size) / 2);
  transform: translateX(50%);
}

.dt-timeline--vertical-right .dt-timeline__item {
  flex-direction: row-reverse;
}

.dt-timeline--vertical-right .dt-timeline__content {
  margin-left: 0;
  margin-right: 24px;
  text-align: right;
}

.dt-timeline--vertical-right .dt-timeline__date {
  float: right;
  clear: both;
}

.dt-timeline--vertical-right .dt-timeline__date--below {
  display: block;
}

/* ============================================================
   VARIANTE: VERTICAL — ALTERNADO (center) — CSS Grid
   ============================================================ */

.dt-timeline--vertical-center .dt-timeline__line {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.dt-timeline--vertical-center .dt-timeline__item {
  display: grid;
  grid-template-columns: 1fr var(--dt-dot-size) 1fr;
  column-gap: 24px;
  align-items: start;
  justify-items: stretch;
}

/* Dot siempre en la columna central */
.dt-timeline--vertical-center .dt-timeline__dot-wrapper {
  grid-column: 2;
  grid-row: 1;
  position: static;
  justify-self: center;
}

/* Ítems impares: contenido en columna derecha */
.dt-timeline--vertical-center .dt-timeline__item:nth-child(odd) .dt-timeline__content {
  grid-column: 3;
  grid-row: 1;
  margin-left: 0;
  text-align: left;
}

/* Ítems pares: contenido en columna izquierda */
.dt-timeline--vertical-center .dt-timeline__item:nth-child(even) .dt-timeline__content {
  grid-column: 1;
  grid-row: 1;
  margin-left: 0;
  text-align: right;
}

.dt-timeline--vertical-center .dt-timeline__item:nth-child(even) .dt-timeline__date {
  float: right;
  clear: both;
}

.dt-timeline--vertical-center .dt-timeline__item:nth-child(even) .dt-timeline__date--below {
  display: block;
}

/* ============================================================
   VARIANTE: HORIZONTAL
   ============================================================ */

.dt-timeline--horizontal .dt-timeline__track {
  overflow-x: auto;
  padding-bottom: 12px;
  /* Scrollbar styling (webkit) */
  scrollbar-width: thin;
  scrollbar-color: #C8D8EF transparent;
}

.dt-timeline--horizontal .dt-timeline__track::-webkit-scrollbar {
  height: 4px;
}

.dt-timeline--horizontal .dt-timeline__track::-webkit-scrollbar-track {
  background: transparent;
}

.dt-timeline--horizontal .dt-timeline__track::-webkit-scrollbar-thumb {
  background-color: #C8D8EF;
  border-radius: 4px;
}

.dt-timeline--horizontal .dt-timeline__line {
  top: calc(var(--dt-dot-size) / 2);
  left: 0;
  right: 0;
  width: 100%;
  height: 2px;
  bottom: auto;
  transform: translateY(-50%);
}

.dt-timeline--horizontal .dt-timeline__line-progress {
  height: 100%;
  width: 0%;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.dt-timeline--horizontal .dt-timeline__items {
  display: flex;
  align-items: flex-start;
  min-width: max-content;
}

.dt-timeline--horizontal .dt-timeline__item {
  flex-direction: column;
  align-items: center;
  min-width: 200px;
  max-width: 260px;
}

.dt-timeline--horizontal .dt-timeline__item + .dt-timeline__item {
  margin-top: 0;
  margin-left: 40px;
}

.dt-timeline--horizontal .dt-timeline__content {
  margin-left: 0;
  margin-top: 16px;
  width: 100%;
}

.dt-timeline--horizontal .dt-timeline__card {
  text-align: center;
}

/* Sin flecha en horizontal */
.dt-timeline--horizontal .dt-timeline__card::before {
  display: none !important;
}

.dt-timeline--horizontal .dt-timeline__date {
  display: block;
  text-align: center;
  float: none;
}

/* ============================================================
   HORIZONTAL — MODO MULTILÍNEA (WRAP / GRID)
   ============================================================ */

/* Contenedor: grid en lugar de flex sin wrap */
.dt-timeline--horizontal.dt-timeline--wrap .dt-timeline__track {
  overflow-x: visible;
  padding-bottom: 0;
}

.dt-timeline--horizontal.dt-timeline--wrap .dt-timeline__items {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* sobrescrito por Elementor via selector */
  row-gap: 56px;
  column-gap: 0;           /* el conector ocupa el espacio entre columnas */
  min-width: unset;
  position: relative;
}

/* Ocultar la línea global (se reemplaza por conectores por ítem) */
.dt-timeline--horizontal.dt-timeline--wrap .dt-timeline__line {
  display: none;
}

/* Los ítems en wrap son columnas (igual que horizontal normal) */
.dt-timeline--horizontal.dt-timeline--wrap .dt-timeline__item {
  flex-direction: column;
  align-items: center;
  min-width: unset;
  max-width: unset;
  position: relative;
}

.dt-timeline--horizontal.dt-timeline--wrap .dt-timeline__item + .dt-timeline__item {
  margin-left: 0;
  margin-top: 0;
}

/* ---- Línea conectora horizontal por ítem ---- */
/*
  Estrategia:
  - Cada ítem pinta una línea horizontal a nivel del dot (via ::before)
  - Va del borde izquierdo al borde derecho del ítem (ancho total = 100%)
  - El dot se superpone sobre la línea con z-index mayor
  - JS añade .dt-row-start al primer ítem de cada fila (línea comienza en 50%)
  - JS añade .dt-row-end   al último ítem de cada fila (línea termina en 50%)
  - El último ítem general también recibe .dt-row-end
*/

.dt-timeline--horizontal.dt-timeline--wrap .dt-timeline__item::before {
  content: '';
  position: absolute;
  top: calc(var(--dt-dot-size) / 2 + 26px); /* +26px = altura de la fecha "above-dot" aprox */
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--dt-line-color, #C8D8EF);
  z-index: 0;
}

/* Primer ítem de cada fila: línea empieza en el centro del dot */
.dt-timeline--horizontal.dt-timeline--wrap .dt-timeline__item.dt-row-start::before {
  left: 50%;
  width: 50%;
}

/* Último ítem de cada fila: línea termina en el centro del dot */
.dt-timeline--horizontal.dt-timeline--wrap .dt-timeline__item.dt-row-end::before {
  width: 50%;
}

/* El dot y el wrapper deben estar sobre la línea */
.dt-timeline--horizontal.dt-timeline--wrap .dt-timeline__dot-wrapper {
  position: relative;
  z-index: 2;
}

/* Fecha sobre el dot en modo wrap */
.dt-timeline--horizontal.dt-timeline--wrap .dt-timeline__date--above-dot {
  position: relative;
  z-index: 2;
}

/* Contenido bajo el dot */
.dt-timeline--horizontal.dt-timeline--wrap .dt-timeline__content {
  position: relative;
  z-index: 2;
  margin-top: 16px;
  width: 100%;
  padding: 0 12px; /* margen interno para no pegar con el borde */
}

.dt-timeline--horizontal.dt-timeline--wrap .dt-timeline__card {
  text-align: center;
}

/* Sin flechas en modo wrap */
.dt-timeline--horizontal.dt-timeline--wrap .dt-timeline__nav {
  display: none !important;
}

/* Responsivo: respetar columnas del control Elementor en tablet/mobile */
@media (max-width: 1024px) {
  .dt-timeline--horizontal.dt-timeline--wrap .dt-timeline__items {
    /* Elementor inyecta grid-template-columns via selector inline para tablet */
  }
}

/* ============================================================
   ANIMACIONES AL SCROLL
   ============================================================ */

.dt-timeline--animated .dt-timeline__item {
  opacity: 0;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.dt-timeline--animated[data-anim-type="fade-up"] .dt-timeline__item {
  transform: translateY(30px);
}

.dt-timeline--animated[data-anim-type="fade-in"] .dt-timeline__item {
  transform: none;
}

.dt-timeline--animated[data-anim-type="slide-in"] .dt-timeline__item {
  transform: translateX(-40px);
}

/* Slide desde la derecha para layouts que usan el lado derecho */
.dt-timeline--vertical-right.dt-timeline--animated[data-anim-type="slide-in"] .dt-timeline__item,
.dt-timeline--vertical-center.dt-timeline--animated[data-anim-type="slide-in"] .dt-timeline__item:nth-child(even) .dt-timeline__content {
  transform: translateX(40px);
}

.dt-timeline--animated[data-anim-type="zoom-in"] .dt-timeline__item {
  transform: scale(0.85);
}

/* Visible */
.dt-timeline--animated .dt-timeline__item.dt-is-visible {
  opacity: 1;
  transform: none !important;
}

/* La línea de progreso para vertical empieza en 0% de altura */
.dt-timeline--animated:not(.dt-timeline--horizontal) .dt-timeline__line-progress {
  height: 0%;
}

/* ============================================================
   EDITOR ELEMENTOR — mostrar todo sin animaciones
   ============================================================ */

.elementor-editor-active .dt-timeline--animated .dt-timeline__item {
  opacity: 1 !important;
  transform: none !important;
}

.elementor-editor-active .dt-timeline__line-progress {
  height: 100% !important;
  width: 100% !important;
}

/* ============================================================
   ETIQUETAS / TAGS
   ============================================================ */

.dt-timeline__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.dt-timeline__tag {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #456FAD;
  background-color: #EBF1F9;
  border-radius: 4px;
  padding: 3px 8px;
  line-height: 1.4;
  white-space: nowrap;
}

/* ============================================================
   DESCRIPCIÓN ENRIQUECIDA (WYSIWYG)
   ============================================================ */

.dt-timeline__description {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #6B7280;
  margin: 0;
  line-height: 1.65;
}

/* Elementos hijos del editor WYSIWYG */
.dt-timeline__description p {
  margin: 0 0 0.75em 0;
}
.dt-timeline__description p:last-child {
  margin-bottom: 0;
}

.dt-timeline__description ul,
.dt-timeline__description ol {
  margin: 0 0 0.75em 1.2em;
  padding: 0;
}
.dt-timeline__description ul { list-style: disc; }
.dt-timeline__description ol { list-style: decimal; }

.dt-timeline__description li {
  margin-bottom: 0.3em;
  line-height: 1.55;
}

.dt-timeline__description strong, .dt-timeline__description b { font-weight: 700; color: #1A1F2E; }
.dt-timeline__description em, .dt-timeline__description i { font-style: italic; }
.dt-timeline__description a { color: #2C4A7E; text-decoration: underline; }
.dt-timeline__description a:hover { color: #1E3460; }

.dt-timeline__description h2,
.dt-timeline__description h3,
.dt-timeline__description h4,
.dt-timeline__description h5,
.dt-timeline__description h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  color: #1A1F2E;
  margin: 0.8em 0 0.4em;
  line-height: 1.3;
}
.dt-timeline__description h2 { font-size: 1.25em; }
.dt-timeline__description h3 { font-size: 1.1em; }
.dt-timeline__description h4 { font-size: 1em; }

.dt-timeline__description blockquote {
  border-left: 3px solid #C8D8EF;
  padding-left: 1em;
  margin: 0.75em 0;
  color: #9CA3AF;
  font-style: italic;
}

.dt-timeline__description code {
  font-family: 'Courier New', monospace;
  font-size: 0.88em;
  background: #F5F7FA;
  border: 1px solid #E5E7EB;
  border-radius: 3px;
  padding: 1px 5px;
  color: #1A1F2E;
}

/* ============================================================
   BOTÓN
   ============================================================ */

.dt-timeline__btn-wrap {
  margin-top: 16px;
}

.dt-timeline__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  padding: 9px 20px;
  border-radius: 6px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.18s ease;
}
.dt-timeline__btn:hover { transform: translateY(-1px); }
.dt-timeline__btn:active { transform: translateY(0); }

/* Primario */
.dt-timeline__btn--primary {
  background-color: #2C4A7E;
  color: #ffffff;
  border-color: #2C4A7E;
}
.dt-timeline__btn--primary:hover {
  background-color: #1E3460;
  border-color: #1E3460;
  color: #ffffff;
}

/* Secundario */
.dt-timeline__btn--secondary {
  background-color: #EBF1F9;
  color: #2C4A7E;
  border-color: #EBF1F9;
}
.dt-timeline__btn--secondary:hover {
  background-color: #C8D8EF;
  border-color: #C8D8EF;
  color: #1E3460;
}

/* Outline */
.dt-timeline__btn--outline {
  background-color: transparent;
  color: #2C4A7E;
  border-color: #2C4A7E;
}
.dt-timeline__btn--outline:hover {
  background-color: #2C4A7E;
  color: #ffffff;
}

/* Ghost (texto + flecha) */
.dt-timeline__btn--ghost {
  background-color: transparent;
  color: #2C4A7E;
  border-color: transparent;
  padding-left: 0;
  padding-right: 0;
}
.dt-timeline__btn--ghost:hover {
  color: #1E3460;
  transform: none;
}
.dt-timeline__btn--ghost:hover svg { transform: translateX(3px); }
.dt-timeline__btn--ghost svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

/* ============================================================
   ALINEACIÓN DE CONTENIDO DE TARJETA
   Elementor escribe text-align en .dt-timeline__card vía selector.
   Los elementos flex necesitan sus propios ajustes.
   ============================================================ */

/* Tags y lista heredan la alineación del card vía data-align generado por JS */
.dt-timeline[data-card-align="center"] .dt-timeline__tags       { justify-content: center; }
.dt-timeline[data-card-align="right"]  .dt-timeline__tags       { justify-content: flex-end; }
.dt-timeline[data-card-align="justify"] .dt-timeline__tags      { justify-content: space-between; }

.dt-timeline[data-card-align="center"] .dt-timeline__list-item  { justify-content: center; }
.dt-timeline[data-card-align="right"]  .dt-timeline__list-item  { justify-content: flex-end; }

.dt-timeline[data-card-align="center"] .dt-timeline__btn-wrap   { text-align: center; }
.dt-timeline[data-card-align="right"]  .dt-timeline__btn-wrap   { text-align: right; }

/* ============================================================
   SCROLL — vertical y horizontal
   ============================================================ */

/* Scroll vertical: contenedor de altura fija con overflow */
.dt-timeline--vscroll {
  overflow-y: auto;
  overflow-x: hidden;
  /* scrollbar discreta en navegadores compatibles */
  scrollbar-width: thin;
  scrollbar-color: #C8D8EF transparent;
}

.dt-timeline--vscroll::-webkit-scrollbar {
  width: 4px;
}

.dt-timeline--vscroll::-webkit-scrollbar-track {
  background: transparent;
}

.dt-timeline--vscroll::-webkit-scrollbar-thumb {
  background: #C8D8EF;
  border-radius: 4px;
}

/* Scroll horizontal desactivado: oculta el desbordamiento del track */
.dt-timeline--horizontal.dt-timeline--no-hscroll .dt-timeline__track {
  overflow-x: hidden;
}

.dt-timeline--horizontal.dt-timeline--no-hscroll .dt-timeline__items {
  flex-wrap: wrap; /* los ítems se ajustan en vez de desbordar */
}

/* Contenido personalizado */
.dt-timeline__custom {
  margin-top: 16px;
}

/* ============================================================
   BLOQUES DE CONTENIDO: encabezados y listas (sintaxis ## / -)
   ============================================================ */

.dt-timeline__blocks {
  /* contenedor de todos los bloques del ítem */
}

/* Encabezado de bloque */
.dt-timeline__extra-heading {
  margin: 14px 0 8px;
  line-height: 1.3;
}

/* Si es el primer elemento del bloque, sin margen superior */
.dt-timeline__blocks > .dt-timeline__extra-heading:first-child,
.dt-timeline__description + .dt-timeline__blocks > .dt-timeline__extra-heading:first-child {
  margin-top: 0;
}

/* Texto plano dentro de bloques */
.dt-timeline__block-text {
  margin: 0 0 8px;
  line-height: 1.6;
}

/* ---- Alineación por modificador ---- */

/* left (default) */
.dt-timeline__blocks--left .dt-timeline__extra-heading,
.dt-timeline__blocks--left .dt-timeline__block-text { text-align: left; }
.dt-timeline__blocks--left .dt-timeline__list       { align-items: flex-start; }
.dt-timeline__blocks--left .dt-timeline__list-item  { justify-content: flex-start; }

/* center */
.dt-timeline__blocks--center .dt-timeline__extra-heading,
.dt-timeline__blocks--center .dt-timeline__block-text { text-align: center; }
.dt-timeline__blocks--center .dt-timeline__list       { align-items: center; }
.dt-timeline__blocks--center .dt-timeline__list-item  { justify-content: center; }

/* right */
.dt-timeline__blocks--right .dt-timeline__extra-heading,
.dt-timeline__blocks--right .dt-timeline__block-text { text-align: right; }
.dt-timeline__blocks--right .dt-timeline__list       { align-items: flex-end; }
.dt-timeline__blocks--right .dt-timeline__list-item  { justify-content: flex-end; }

/* justify */
.dt-timeline__blocks--justify .dt-timeline__extra-heading,
.dt-timeline__blocks--justify .dt-timeline__block-text { text-align: justify; }
.dt-timeline__blocks--justify .dt-timeline__list       { align-items: flex-start; }
.dt-timeline__blocks--justify .dt-timeline__list-item  { justify-content: flex-start; }

/* ============================================================
   LISTA CON ICONOS (≈ Icon List widget)
   ============================================================ */
.dt-timeline__list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dt-timeline__list-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}

.dt-timeline__list-icon {
  flex-shrink: 0;
  margin-top: .2em;
  color: #456FAD;
  font-size: 14px;
  width: 14px;
}

.dt-timeline__list-icon svg {
  fill: currentColor;
  width: 1em;
  height: 1em;
}

.dt-timeline__list-item span {
  flex: 1;
}

/* ============================================================
   VIDEO EMBED (≈ Video widget)
   ============================================================ */
.dt-timeline__video {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 6px;
  margin-bottom: 14px;
}

.dt-timeline__video::before {
  content: '';
  display: block;
  padding-top: 56.25%; /* 16:9 */
}

.dt-timeline__video[data-ratio="4:3"]::before { padding-top: 75%; }
.dt-timeline__video[data-ratio="1:1"]::before  { padding-top: 100%; }

.dt-timeline__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ============================================================
   FLECHAS DE NAVEGACIÓN HORIZONTAL
   ============================================================ */

.dt-timeline__nav {
  display: none; /* visible solo en horizontal */
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 16px;
}

.dt-timeline--has-nav .dt-timeline__nav {
  display: flex;
}

.dt-timeline__nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #FFFFFF;
  border: 1px solid #E5E7EB;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 12px rgba(44, 74, 126, 0.12);
  flex-shrink: 0;
}

.dt-timeline__nav-btn:hover {
  background-color: #2C4A7E;
  border-color: #2C4A7E;
}

.dt-timeline__nav-btn:hover svg {
  stroke: #ffffff;
  color: #ffffff;
}

.dt-timeline__nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.dt-timeline__nav-btn svg {
  width: 16px;
  height: 16px;
  stroke: #2C4A7E;
  transition: stroke 0.2s ease;
  display: block;
}

/* ============================================================
   FECHA EN POSICIONES EXCLUSIVAS DE HORIZONTAL
   ============================================================ */

/* Sobre el dot (default horizontal) */
.dt-timeline__date--above-dot {
  display: block;
  text-align: center;
  margin-bottom: 6px;
  float: none;
}

/* Bajo la tarjeta */
.dt-timeline__date--below-card {
  display: block;
  text-align: center;
  margin-top: 8px;
  margin-bottom: 0;
}

/* ============================================================
   SNAP SCROLL HORIZONTAL
   ============================================================ */

.dt-timeline--snap .dt-timeline__track {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.dt-timeline--snap .dt-timeline__item {
  scroll-snap-align: start;
}

/* ============================================================
   ACCESIBILIDAD
   ============================================================ */

.dt-timeline__dot:focus-visible {
  outline: 3px solid #6EA3D7;
  outline-offset: 3px;
}

.dt-timeline__card-link:focus-visible .dt-timeline__card {
  outline: 3px solid #6EA3D7;
  outline-offset: 2px;
  border-color: #6EA3D7;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet: center pasa a linear */
@media (max-width: 1024px) {
  .dt-timeline--vertical-center .dt-timeline__item {
    display: flex;
    flex-direction: row;
  }

  .dt-timeline--vertical-center .dt-timeline__line {
    left: calc(var(--dt-dot-size) / 2);
    transform: translateX(-50%);
  }

  .dt-timeline--vertical-center .dt-timeline__dot-wrapper {
    order: 0;
  }

  .dt-timeline--vertical-center .dt-timeline__item:nth-child(odd) .dt-timeline__content,
  .dt-timeline--vertical-center .dt-timeline__item:nth-child(even) .dt-timeline__content {
    grid-column: unset;
    grid-row: unset;
    order: 1;
    margin-left: 24px;
    text-align: left;
  }

  .dt-timeline--vertical-center .dt-timeline__item:nth-child(even) .dt-timeline__date {
    float: none;
    clear: none;
  }

  /* Flechas apuntan a la izquierda en modo tablet */
  .dt-timeline--has-arrow.dt-timeline--vertical-center .dt-timeline__item:nth-child(even) .dt-timeline__card::before {
    left: -10px;
    right: auto;
    border-right: 10px solid #ffffff;
    border-left: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    filter: drop-shadow(-2px 0 1px rgba(44, 74, 126, 0.06));
  }
}

/* Mobile: right pasa a left */
@media (max-width: 768px) {
  .dt-timeline--vertical-right .dt-timeline__item {
    flex-direction: row;
  }

  .dt-timeline--vertical-right .dt-timeline__line {
    left: calc(var(--dt-dot-size) / 2);
    right: auto;
    transform: translateX(-50%);
  }

  .dt-timeline--vertical-right .dt-timeline__content {
    margin-right: 0;
    margin-left: 24px;
    text-align: left;
  }

  .dt-timeline--vertical-right .dt-timeline__date {
    float: none;
    clear: none;
  }

  /* Flecha apunta a la izquierda */
  .dt-timeline--has-arrow.dt-timeline--vertical-right .dt-timeline__card::before {
    left: -10px;
    right: auto;
    border-right: 10px solid #ffffff;
    border-left: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    filter: drop-shadow(-2px 0 1px rgba(44, 74, 126, 0.06));
  }

  /* Horizontal SCROLL colapsa a vertical (no aplica al modo wrap) */
  .dt-timeline--horizontal:not(.dt-timeline--wrap) .dt-timeline__items {
    flex-direction: column;
    min-width: unset;
  }

  .dt-timeline--horizontal:not(.dt-timeline--wrap) .dt-timeline__item {
    flex-direction: row;
    align-items: flex-start;
    min-width: unset;
    max-width: unset;
  }

  .dt-timeline--horizontal:not(.dt-timeline--wrap) .dt-timeline__item + .dt-timeline__item {
    margin-left: 0;
    margin-top: 32px;
  }

  .dt-timeline--horizontal:not(.dt-timeline--wrap) .dt-timeline__line {
    top: 0;
    bottom: 0;
    left: calc(var(--dt-dot-size) / 2);
    right: auto;
    width: 2px;
    height: auto;
    transform: translateX(-50%);
  }

  .dt-timeline--horizontal:not(.dt-timeline--wrap) .dt-timeline__line-progress {
    height: 0%;
    width: 100%;
    transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .dt-timeline--horizontal:not(.dt-timeline--wrap) .dt-timeline__content {
    margin-top: 0;
    margin-left: 24px;
    text-align: left;
    width: auto;
  }

  .dt-timeline--horizontal:not(.dt-timeline--wrap) .dt-timeline__card {
    text-align: left;
  }

  .dt-timeline--horizontal:not(.dt-timeline--wrap) .dt-timeline__date {
    display: inline-block;
    text-align: left;
  }

  /* Wrap: pasar a 1 columna en mobile si no lo hizo Elementor */
  .dt-timeline--horizontal.dt-timeline--wrap .dt-timeline__items {
    grid-template-columns: 1fr !important;
  }

  .dt-timeline--horizontal.dt-timeline--wrap .dt-timeline__item::before {
    display: none; /* sin línea horizontal al colapsar a 1 col */
  }

  /* En mobile con wrap: pasar a layout vertical */
  .dt-timeline--horizontal.dt-timeline--wrap .dt-timeline__item {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
  }

  .dt-timeline--horizontal.dt-timeline--wrap .dt-timeline__content {
    margin-top: 0;
    margin-left: 24px;
    padding: 0;
    text-align: left;
  }

  .dt-timeline--horizontal.dt-timeline--wrap .dt-timeline__card {
    text-align: left;
  }

  .dt-timeline--horizontal.dt-timeline--wrap .dt-timeline__date--above-dot {
    position: absolute;
    left: calc(var(--dt-dot-size) / 2);
    top: -28px;
    transform: translateX(-50%);
  }
}

@media (max-width: 480px) {
  .dt-timeline__card {
    padding: 18px 20px;
  }

  .dt-timeline__title {
    font-size: 16px;
  }

  .dt-timeline__description {
    font-size: 14px;
  }
}

/* ============================================================
   LAYOUT: ERA-CARD  (formato Dig&tekno línea de tiempo)
   Estructura por era:
     .dt-era
       .dt-era__header      → banda de color con año · etiqueta + subtítulo
       .dt-era__body
         .dt-era__title     → título narrativo en negrita
         .dt-era__description
         .dt-era__stats     → 3 columnas de dato + etiqueta
         .dt-era__blocks-label
         .dt-era__blocks-grid → grid 2 columnas de .dt-era__block
   ============================================================ */

.dt-timeline--era-card {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

/* ---- Era container ---- */
.dt-era {
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(44, 74, 126, 0.09);
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
  cursor: default;
}

.dt-era:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(44, 74, 126, 0.18);
  border-color: #C8D8EF;
}

/* ---- Header: banda de color ---- */
.dt-era__header {
  background-color: #2C4A7E;
  padding: 18px 28px 16px;
  transition: background-color 0.28s ease, filter 0.28s ease;
}

.dt-era:hover .dt-era__header {
  filter: brightness(1.12);
}

.dt-era__header-period {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px 0;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.dt-era__header-era {
  font-weight: 600;
  letter-spacing: 0.03em;
}

.dt-era__header-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-style: italic;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
  line-height: 1.4;
}

/* ---- Body ---- */
.dt-era__body {
  background-color: #ffffff;
  padding: 32px 32px 36px;
  transition: background-color 0.28s ease;
}

/* ---- Título narrativo ---- */
.dt-era__title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #1A1F2E;
  margin: 0 0 12px 0;
  line-height: 1.3;
  transition: color 0.25s ease;
}

/* ---- Descripción ---- */
.dt-era__description {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #6B7280;
  margin: 0 0 24px 0;
  line-height: 1.65;
}
.dt-era__description p { margin: 0 0 0.6em; }
.dt-era__description p:last-child { margin-bottom: 0; }

/* ---- Stats: 3 columnas ---- */
.dt-era__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background-color: #F5F8FC;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 28px;
  transition: background-color 0.28s ease;
}

.dt-era__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  text-align: center;
  border-right: 1px solid #E5E7EB;
}

.dt-era__stat:last-child {
  border-right: none;
}

.dt-era__stat-value {
  display: block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #1A1F2E;
  line-height: 1.2;
  margin-bottom: 4px;
  transition: color 0.25s ease;
}

.dt-era__stat-label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: #6B7280;
  text-align: center;
  line-height: 1.4;
}

/* ---- Etiqueta "LOGROS Y SERVICIOS…" ---- */
.dt-era__blocks-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #456FAD;
  margin: 0 0 16px 0;
}

/* ---- Grid de bloques: 2 columnas ---- */
.dt-era__blocks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 28px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 20px 24px;
}

/* ---- Grid de bloques hover ---- */
.dt-era__blocks-grid {
  transition: background-color 0.28s ease;
}

/* ---- Bloque individual ---- */
.dt-era__block {
  border-left: 3px solid #2C4A7E;
  padding-left: 14px;
  transition: border-left-color 0.25s ease;
}

.dt-era__block-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #1A1F2E;
  margin: 0 0 8px 0;
  line-height: 1.3;
  transition: color 0.25s ease;
}

.dt-era__block-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.dt-era__block-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #6B7280;
  line-height: 1.5;
}

/* Punto decorativo como sustituto de ícono si no hay icono */
.dt-era__block-item > span::before {
  content: '·';
  margin-right: 4px;
  color: #456FAD;
  font-weight: 700;
}

/* Si hay icono de FontAwesome, ocultar el punto */
.dt-era__block-item .dt-timeline__list-icon ~ span::before {
  display: none;
}

.dt-era__block-item .dt-timeline__list-icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: #456FAD;
  font-size: 11px;
  width: 11px;
}

/* ============================================================
   RESPONSIVE — ERA-CARD
   ============================================================ */

@media (max-width: 768px) {
  .dt-era__body {
    padding: 24px 20px 28px;
  }

  .dt-era__blocks-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 16px 18px;
  }

  .dt-era__stats {
    grid-template-columns: 1fr;
  }

  .dt-era__stat {
    border-right: none;
    border-bottom: 1px solid #E5E7EB;
    padding: 14px 16px;
  }

  .dt-era__stat:last-child {
    border-bottom: none;
  }

  .dt-era__title {
    font-size: 17px;
  }
}

@media (max-width: 480px) {
  .dt-era__header {
    padding: 14px 20px 12px;
  }

  .dt-era__header-period {
    font-size: 15px;
  }
}
