/* ============================================================
   DRUPAL BLOG VISUAL LISTICLE — Babylonia
   Drupal-safe version: numbering is generated on the header itself.
   No empty <span> is required, because Drupal/CKEditor may remove it.
   ============================================================ */

.babylonia-visual-listicle{
  --bvl-deep:#1A3A5C;
  --bvl-mid:#4A7CB5;
  --bvl-gold:#d4a544;
  --bvl-text:#2a2a2a;
  --bvl-muted:#667085;
  --bvl-border:#d9e4f0;
  --bvl-soft:#f5f8fc;
  --bvl-white:#ffffff;

  max-width:920px;
  margin:2.5rem auto;
  color:var(--bvl-text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  line-height:1.7;
}

.babylonia-visual-listicle,
.babylonia-visual-listicle *{
  box-sizing:border-box;
}

.babylonia-visual-listicle__items{
  display:grid;
  gap:2rem;
  counter-reset:bvl-item;
}

.babylonia-visual-listicle__item{
  counter-increment:bvl-item;
  position:relative;
  padding:1.8rem;
  background:var(--bvl-white);
  border:1px solid var(--bvl-border);
  border-radius:18px;
  box-shadow:0 8px 24px rgba(26,58,92,.06);
}

.babylonia-visual-listicle__header{
  display:grid;
  grid-template-columns:66px minmax(0,1fr);
  gap:1rem;
  align-items:center;
  margin-bottom:1.2rem;
}

/* Drupal-safe number: generated without an empty HTML element */
.babylonia-visual-listicle__header::before{
  content:counter(bvl-item, decimal-leading-zero);
  display:flex;
  align-items:center;
  justify-content:center;
  width:66px;
  height:66px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--bvl-deep),var(--bvl-mid));
  color:#fff;
  font-size:1.55rem;
  font-weight:800;
  line-height:1;
  box-shadow:0 7px 18px rgba(26,58,92,.18);
}

.babylonia-visual-listicle__title{
  min-width:0;
  margin:0 !important;
  color:var(--bvl-deep);
  font-size:clamp(1.35rem,2.7vw,1.9rem);
  line-height:1.25;
  letter-spacing:-.015em;
}

/* Drupal Media may be inserted directly; no extra wrapper required */
.babylonia-visual-listicle__item > img,
.babylonia-visual-listicle__item > figure,
.babylonia-visual-listicle__item > .media,
.babylonia-visual-listicle__item > div[data-entity-type="media"]{
  display:block;
  max-width:100%;
  margin:0 0 1.25rem;
}

.babylonia-visual-listicle__item img{
  display:block;
  max-width:100%;
  height:auto;
  border-radius:14px;
}

.babylonia-visual-listicle__item figure{
  max-width:100%;
  margin-left:0;
  margin-right:0;
}

.babylonia-visual-listicle__item figcaption{
  padding:.55rem .15rem 0;
  color:var(--bvl-muted);
  font-size:.9rem;
  line-height:1.45;
}

.babylonia-visual-listicle__content{
  max-width:780px;
}

.babylonia-visual-listicle__content p{
  margin:0 0 1rem;
}

.babylonia-visual-listicle__content p:last-child{
  margin-bottom:0;
}

.babylonia-visual-listicle__content ul,
.babylonia-visual-listicle__content ol{
  margin:.8rem 0 1rem;
  padding-left:1.25rem;
}

.babylonia-visual-listicle__content a{
  color:var(--bvl-mid);
  text-decoration:underline;
  text-underline-offset:2px;
}

.babylonia-visual-listicle__content a:hover{
  color:var(--bvl-deep);
}

.babylonia-visual-listicle__item--highlight{
  border-color:#ecd9a8;
  background:#fffdf7;
}

.babylonia-visual-listicle__item--highlight .babylonia-visual-listicle__header::before{
  background:linear-gradient(135deg,#b58a30,var(--bvl-gold));
}

@media(max-width:640px){
  .babylonia-visual-listicle{
    margin:2rem auto;
  }

  .babylonia-visual-listicle__items{
    gap:1.35rem;
  }

  .babylonia-visual-listicle__item{
    padding:1.2rem;
    border-radius:14px;
  }

  .babylonia-visual-listicle__header{
    grid-template-columns:50px minmax(0,1fr);
    gap:.8rem;
  }

  .babylonia-visual-listicle__header::before{
    width:50px;
    height:50px;
    font-size:1.15rem;
  }

  .babylonia-visual-listicle__item img{
    border-radius:10px;
  }
}
.babylonia-visual-listicle__header{
  display:grid !important;
  grid-template-columns:66px minmax(0,1fr) !important;
  gap:1rem !important;
  align-items:center !important;
}

.babylonia-visual-listicle__number{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:66px !important;
  height:66px !important;
  border-radius:50% !important;
  background:linear-gradient(135deg,#1A3A5C,#4A7CB5) !important;
  color:#fff !important;
  font-size:1.55rem !important;
  font-weight:800 !important;
  line-height:1 !important;
  grid-column:1 !important;
}

.babylonia-visual-listicle__number::before{
  content:counter(bvl-item, decimal-leading-zero) !important;
}

.babylonia-visual-listicle__title{
  grid-column:2 !important;
  min-width:0 !important;
  width:auto !important;
  margin:0 !important;
  color:#1A3A5C !important;
  line-height:1.25 !important;
}