/* JJ Blog Layout — 3 featured cards + carousel of titles */

.jjbl {
  --jj-grad: linear-gradient(144deg, rgba(0, 189, 255, 1) 0%, rgba(198, 0, 186, 1) 100%);
  --jj-cyan: #00bdff;
  --jj-magenta: #c600ba;
  --jj-dark: #111111;
  --jj-paper: #ececec;
  --jj-ink: #141414;
  font-family: "DM Sans", sans-serif;
  background: transparent;
  overflow: visible;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  /* Aire respecto a las barras fijas izq/der del tema Merge */
  padding-left: 24px;
  padding-right: 24px;
}

.jjbl *,
.jjbl *::before,
.jjbl *::after {
  box-sizing: border-box;
}

.jjbl a {
  text-decoration: none;
}

/* ----- 3 recientes ----- */
.jjbl-featured {
  background: transparent;
  overflow: visible;
  width: 100%;
  padding: 24px 0 90px;
}

.jjbl-featured__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  box-sizing: border-box;
}

.jjbl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  overflow: visible;
  background: transparent;
}

.jjbl-card__media {
  display: block;
  position: relative;
  width: 100%;
  height: auto;
  overflow: hidden;
  border-radius: 22px;
  background: #171717;
}

.jjbl-card__media img {
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  transform: none;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.jjbl-card:hover .jjbl-card__media img {
  transform: scale(1.03);
}

.jjbl-card__glass {
  position: relative;
  z-index: 2;
  width: calc(100% - 28px);
  max-width: 100%;
  margin: -28px 14px 0;
  padding: 16px 18px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--jj-ink);
}

.jjbl-card__title,
.jjbl-card__excerpt,
.jjbl-card__meta {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.jjbl-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #666;
}

.jjbl-card__dot {
  width: 4px;
  height: 4px;
  flex: 0 0 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}

.jjbl-card__cat {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 40px;
  background: #fff;
  color: var(--jj-ink);
  border: 1px solid #ddd;
}

.jjbl-card__title {
  margin: 0 0 8px;
  font-family: Satoshi, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.jjbl-card__title a {
  color: var(--jj-ink);
}

.jjbl-card__title a:hover {
  background-image: var(--jj-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.jjbl-card__excerpt {
  margin: 0 40px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #555;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.jjbl-card__go {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--jj-ink);
  font-size: 18px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.jjbl-card:hover .jjbl-card__go {
  background-image: var(--jj-grad);
  color: #fff;
  transform: translate(2px, -2px);
}

/* ----- Lista + personaje ----- */
.jjbl-more {
  background: transparent;
  color: #fff;
  padding: 48px 24px 0;
  overflow: hidden;
}

.jjbl-more__inner {
  max-width: 1220px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
  min-height: 0;
}

.jjbl-more__list-wrap {
  padding: 32px 0 56px;
}

.jjbl-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  flex-direction: column;
  gap: 22px;
  min-height: 220px;
}

.jjbl-bullets.is-active {
  display: flex;
}

.jjbl-bullets a {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  color: #fff;
  font-family: Satoshi, sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  transition: color 0.25s ease;
}

.jjbl-bullets a:hover {
  background-image: var(--jj-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.jjbl-bullets__mark {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  margin-top: 12px;
  border-radius: 50%;
  background: #fff;
}

.jjbl-bullets a:hover .jjbl-bullets__mark {
  background-image: var(--jj-grad);
}

.jjbl-dots {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 40px;
}

.jjbl-dots__btn {
  width: 14px;
  height: 14px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #3a3a3a;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease;
}

.jjbl-dots__btn.is-active {
  width: 18px;
  height: 18px;
  background-image: var(--jj-grad);
  transform: scale(1.05);
}

.jjbl-more__character {
  position: relative;
  align-self: end;
  justify-self: end;
  width: 100%;
  max-width: 360px;
  pointer-events: none;
}

.jjbl-more__character-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.45));
}

.jjbl-more__character-note {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 4px 10px;
  border-radius: 40px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #bbb;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 1024px) {
  .jjbl {
    padding-left: 16px;
    padding-right: 16px;
  }

  .jjbl-featured__grid {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

  .jjbl-card__media {
    height: auto;
  }

  .jjbl-card__glass {
    margin-top: -24px;
  }

  .jjbl-more__inner {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .jjbl-bullets a {
    font-size: 22px;
  }

  .jjbl-more__character {
    max-width: 280px;
    margin: 0 auto;
  }
}

.elementor-widget-shortcode,
.elementor-widget-shortcode .elementor-widget-container,
.elementor-shortcode {
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  overflow: visible !important;
}

/* Home #Articles: mismas cards que relacionados, sin aire extra del blog */
.vlt-section[data-anchor="Articles"] .jjbl.jjbl--articles {
  padding-left: 0;
  padding-right: 0;
}

.vlt-section[data-anchor="Articles"] .jjbl--articles .jjbl-featured {
  padding: 8px 0 0;
}

.vlt-section[data-anchor="Articles"] .jjbl--articles .jjbl-featured__grid {
  max-width: none;
  gap: 28px;
}

/* Primera card a full; 2.ª y 3.ª un poco atenuadas */
.vlt-section[data-anchor="Articles"] .jjbl--articles .jjbl-card:nth-child(n + 2) {
  opacity: 0.6;
  transition: opacity 0.25s ease;
}

.vlt-section[data-anchor="Articles"] .jjbl--articles .jjbl-card:nth-child(n + 2):hover {
  opacity: 1;
}

@media (max-width: 1024px) {
  .vlt-section[data-anchor="Articles"] .jjbl--articles .jjbl-featured__grid {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ----- Relacionados: carrusel horizontal ----- */
.jjbl--related .jjbl-featured--carousel {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px 0 72px;
  max-width: 1220px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.jjbl--related .jjbl-carousel__nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  order: 2;
  margin: 20px 0 0;
}

.jjbl--related .jjbl-carousel__btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.jjbl--related .jjbl-carousel__btn:hover:not(:disabled) {
  background-image: var(--jj-grad);
  border-color: transparent;
  transform: translateY(-1px);
}

.jjbl--related .jjbl-carousel__btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.jjbl--related .jjbl-carousel__track {
  display: flex;
  grid-template-columns: none;
  gap: 24px;
  max-width: 100%;
  margin: 0;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  padding: 8px 4px 16px;
  scrollbar-width: none;
}

.jjbl--related .jjbl-carousel__track::-webkit-scrollbar {
  display: none;
}

/* Escritorio: 3 slides visibles */
.jjbl--related .jjbl-carousel__track .jjbl-card {
  flex: 0 0 calc((100% - 48px) / 3);
  scroll-snap-align: start;
  max-width: none;
}

@media (max-width: 1024px) {
  .jjbl--related .jjbl-carousel__track {
    gap: 0;
    padding: 8px 0 16px;
  }

  .jjbl--related .jjbl-carousel__track .jjbl-card {
    flex-basis: 100%;
  }
}

@media (max-width: 720px) {
  .jjbl--related .jjbl-carousel__nav {
    margin-top: 16px;
  }

  .jjbl--related .jjbl-carousel__track .jjbl-card {
    flex-basis: 100%;
  }
}
