/* ==========================================================================
   BLOCK: HERO TEXT
   ========================================================================== */

.c-hero-text {
  position: relative;
  z-index: 1;
  background: var(--bg-out);
  margin: var(--mar-out-d);
  padding: var(--pad-out-d);
  width: 100%;
}

.c-hero-text--bg-always,
.c-hero-text--bg-desktop {
  background: var(--bg-out);
}

.c-hero-text__max-width {
  max-width: var(--max-w, 1440px);
  margin: 0 auto;
}

.c-hero-text__wrap {
  display: flex;
  flex-direction: column;
  justify-content: var(--al-v-d, center);
}

.c-hero-text__wrap[class*="col-start-auto"] {
  margin-left: auto;
  margin-right: auto;
}

/* --------------------------------------------------------------------------
   CONTINGUT
   -------------------------------------------------------------------------- */
.c-hero-text__content {
  display: flex;
  flex-direction: column;
  text-align: var(--al-h-txt-d, center);
  align-items: var(--ai-d, center);
  width: 100%;
}

.c-hero-text__tag {
  display: inline-block;
  background-color: var(--c-tag-bg);
  color: var(--c-tag-txt);
  padding: var(--pad-tag);
  font-family: var(--ff-tag);
  font-size: var(--fs-tag-d);
  font-weight: var(--fw-tag);
  line-height: var(--lh-tag-d);
  margin-top: var(--mt-tag-d);
  margin-bottom: var(--mb-tag-d);
  text-align: center;
}

.c-hero-text__titol {
  font-family: var(--ff-tit-d);
  font-size: var(--fs-tit-d);
  font-weight: var(--fw-tit);
  line-height: var(--lh-tit-d);
  color: var(--c-tit);
  margin-top: var(--mt-tit-d);
  margin-bottom: var(--mb-tit-d);
}

.c-hero-text__desc {
  font-family: var(--ff-desc);
  font-size: var(--fs-desc-d);
  font-weight: var(--fw-desc);
  line-height: var(--lh-desc-d);
  color: var(--c-desc);
  margin-top: var(--mt-desc-d);
  margin-bottom: var(--mb-desc-d);
}

.c-hero-text__desc p { margin: 0; }
.c-hero-text__desc p:not(:last-child) { margin-bottom: 1em; }

/* --------------------------------------------------------------------------
   BOTONS I COMPORTAMENTS (DESKTOP)
   -------------------------------------------------------------------------- */
.c-hero-text__buttons {
  display: flex;
  gap: var(--gap-btn-d);
  justify-content: var(--jc-d, center);
  width: 100%;
}

.c-hero-text__buttons--disp-d-split {
  flex-wrap: nowrap;
}
.c-hero-text__buttons--disp-d-split .c-hero-text__btn {
  flex: 1 1 0%;
  width: 100% !important;
}

.c-hero-text__buttons--disp-d-inline {
  flex-wrap: wrap;
}
.c-hero-text__buttons--disp-d-inline .c-hero-text__btn {
  flex: 0 0 auto;
}

.c-hero-text__buttons--disp-d-stacked {
  flex-direction: column;
}
.c-hero-text__buttons--disp-d-stacked .c-hero-text__btn {
  width: 100% !important;
}

/* Botons Individuals */
.c-hero-text__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: var(--pad-btn-d);
  font-family: var(--ff-btn);
  font-size: var(--fs-btn-d);
  font-weight: var(--fw-btn);
  line-height: var(--lh-btn-d);
  transition: all 0.3s ease;
  text-align: center;
}

.c-hero-text__btn--primary {
  width: var(--w-b1-d, auto);
  background-color: var(--c-b1-bg);
  color: var(--c-b1-txt);
  border: 2px solid var(--c-b1-bg);
}

.c-hero-text__btn--primary:hover {
  background-color: var(--c-b1-bgh);
  color: var(--c-b1-txth);
  border-color: var(--c-b1-bgh);
}

.c-hero-text__btn--secondary {
  width: var(--w-b2-d, auto);
  background-color: transparent;
  color: var(--c-b2-txt);
  border: 1px solid var(--c-b2-bord);
}

.c-hero-text__btn--secondary:hover {
  color: var(--c-b2-txth);
  border-color: var(--c-b2-bordh);
}


/* ==========================================================================
   RESPONSIVE GRID SCALING (4 Breakpoints)
   ========================================================================== */

/* 1. DESKTOP XL (Pantalles Ultra Panoràmiques) > 1440px */
@media (min-width: 1441px) {
  .grid-container > .c-hero-text__wrap {
    grid-column-start: var(--col-start-xl, auto) !important;
    grid-column-end: span var(--col-span-xl, 12) !important;
  }
}

/* 2. DESKTOP BASE (1025px - 1440px)

/* 3. TABLET (769px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
  .grid-container > .c-hero-text__wrap {
    grid-column-start: var(--col-start-t, auto) !important;
    grid-column-end: span var(--col-span-t, 12) !important;
  }
}


/* ==========================================================================
   4. RESPONSIVE - MÒBIL (Fins a 768px)
   ========================================================================== */
@media (max-width: 768px) {
  
  .c-hero-text {
    margin: var(--mar-out-m);
    padding: var(--pad-out-m);
  }

  .grid-container > .c-hero-text__wrap {
    grid-column-start: var(--col-start-m, auto) !important;
  }

  .c-hero-text--bg-desktop { background: transparent; }
  .c-hero-text--bg-mobile { background: var(--bg-out); }

  .c-hero-text__wrap {
    justify-content: var(--al-v-m, center);
  }

  .c-hero-text__content {
    text-align: var(--al-h-txt-m, center);
    align-items: var(--ai-m, center);
  }

  .c-hero-text__tag {
    font-size: var(--fs-tag-m);
    line-height: var(--lh-tag-m);
    margin-top: var(--mt-tag-m);
    margin-bottom: var(--mb-tag-m);
  }

  .c-hero-text__titol {
    font-family: var(--ff-tit-m);
    font-size: var(--fs-tit-m);
    line-height: var(--lh-tit-m);
    margin-top: var(--mt-tit-m);
    margin-bottom: var(--mb-tit-m);
  }

  .c-hero-text__desc {
    font-size: var(--fs-desc-m);
    line-height: var(--lh-desc-m);
    margin-top: var(--mt-desc-m);
    margin-bottom: var(--mb-desc-m);
  }

  /* COMPORTAMENTS BOTONS (MÒBIL) */
  .c-hero-text__buttons {
    gap: var(--gap-btn-m);
    justify-content: var(--jc-m, center);
  }

  .c-hero-text__buttons--disp-m-split {
    flex-direction: row;
    flex-wrap: nowrap;
  }
  .c-hero-text__buttons--disp-m-split .c-hero-text__btn {
    flex: 1 1 0%;
    width: 100% !important;
  }

  .c-hero-text__buttons--disp-m-inline {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .c-hero-text__buttons--disp-m-inline .c-hero-text__btn {
    flex: 0 0 auto;
  }

  .c-hero-text__buttons--disp-m-stacked {
    flex-direction: column;
  }
  .c-hero-text__buttons--disp-m-stacked .c-hero-text__btn {
    width: 100% !important;
  }

  .c-hero-text__btn {
    padding: var(--pad-btn-m);
    font-size: var(--fs-btn-m);
    line-height: var(--lh-btn-m);
  }

  .c-hero-text__btn--primary {
    width: var(--w-b1-m, auto);
  }

  .c-hero-text__btn--secondary {
    width: var(--w-b2-m, auto);
  }

}