/* =========================================================
   TARGETES IMATGE TEXT BLOCK
   ========================================================= */

.c-targetes-imatge-text {
  margin-top: var(--mar-t, 0);
  margin-bottom: var(--mar-b, 0);
  padding-top: var(--pad-t, 80px);
  padding-bottom: var(--pad-b, 80px);
  overflow: hidden;
}

.c-targetes-imatge-text--bg-always,
.c-targetes-imatge-text--bg-desktop {
  background: var(--bg-block, transparent);
}

.c-targetes-imatge-text__max-width {
  max-width: var(--max-w, 1920px);
  margin: 0 auto;
}

.c-targetes-imatge-text--placeholder {
  padding: 60px 20px;
  text-align: center;
  background: #f0f0f0;
  border: 2px dashed #ccc;
  border-radius: 8px;
  color: #666;
}

.c-targetes-imatge-text__list {
  row-gap: 40px;
}

.c-targetes-imatge-text__card {
  background-color: var(--bg-card, #f5f7fa); 
  height: 100%;
  overflow: hidden; 
}

/* SHAPES */
.c-targetes-imatge-text__card.shape-a { border-radius: var(--shape-a, 150px 20px 20px 20px); }
.c-targetes-imatge-text__card.shape-b { border-radius: var(--shape-b, 20px 150px 20px 20px); }
.c-targetes-imatge-text__card.shape-c { border-radius: var(--shape-c, 20px 20px 20px 20px); }

.c-targetes-imatge-text__image {
  width: 100%;
  height: var(--img-h, auto);
  aspect-ratio: var(--img-ratio, 437/251); 
}

.c-targetes-imatge-text__image--placeholder {
  background-color: #EDECF0;
}

.c-targetes-imatge-text__image img {
  width: 100%;
  height: 100%;
  object-fit: var(--img-fit-desk, cover);
  display: block;
  pointer-events: none; 
  border-radius: var(--br-img, 20px);
}

.c-targetes-imatge-text__content {
  padding: var(--pad-card, 32px 32px 40px 32px); 
}

.c-targetes-imatge-text__text {
  margin: 0;
  font-size: var(--fs-text, 26px);
  font-weight: var(--fw-text, 700);
  line-height: 1.2;
  color: var(--c-text, #1e1348);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .c-targetes-imatge-text__card {
    grid-column: span 6; 
  }
}

@media (max-width: 768px) {
  .c-targetes-imatge-text {
    margin-top: var(--mar-t-mob, 0);
    margin-bottom: var(--mar-b-mob, 0);
    padding-top: var(--pad-t-mob, 60px);
    padding-bottom: var(--pad-b-mob, 60px);
  }

  .c-targetes-imatge-text--bg-desktop {
    background: transparent;
  }
  .c-targetes-imatge-text--bg-mobile {
    background: var(--bg-block, transparent);
  }

  .c-targetes-imatge-text__list {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory; 
    -webkit-overflow-scrolling: touch;
    gap: var(--grid-margin) !important;
    padding: 0 16px 20px 16px;
    grid-template-columns: none; 
    scrollbar-width: none; 
    -ms-overflow-style: none;
  }

  .c-targetes-imatge-text__image {
    height: var(--img-h-mob, auto);
    aspect-ratio: var(--img-ratio-mob, 3/2); 
  }

  .c-targetes-imatge-text__image img {
    object-fit: var(--img-fit-mob, cover);
  }
  
  .c-targetes-imatge-text__list::after {
    content: "";
    flex: 0 0 1px;
    width: 1px;
    height: 1px;
  }

  .c-targetes-imatge-text__list::-webkit-scrollbar {
    display: none; 
  }

  .c-targetes-imatge-text__list.is-dragging {
    scroll-snap-type: none; 
    cursor: grabbing;
  }

  .c-targetes-imatge-text__card {
    flex: 0 0 85% !important; 
    max-width: 85% !important;
    scroll-snap-align: center;
    cursor: grab;
  }

  .c-targetes-imatge-text__list.is-dragging .c-targetes-imatge-text__card {
    cursor: grabbing;
  }

  /* SHAPES MOBIL */
  .c-targetes-imatge-text__card.shape-a { border-radius: var(--shape-a-mob, 100px 20px 20px 20px); }
  .c-targetes-imatge-text__card.shape-b { border-radius: var(--shape-b-mob, 20px 100px 20px 20px); }
  .c-targetes-imatge-text__card.shape-c { border-radius: var(--shape-c-mob, 20px 20px 20px 20px); }

  .c-targetes-imatge-text__content {
    padding: var(--pad-card-mob, 24px 24px 32px 24px);
  }

  .c-targetes-imatge-text__text {
    font-size: var(--fs-text-mob, 20px);
  }
}