/*
 * Theme Name:     Momentum
 * Description:    Divi Child Theme
 * Author:         r3npi2
 * Template:       Divi
 * Version:        1.0.0
 */

/* green sostenible: #239ea3 */
/* orange eco: #d46740  */
.d-flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

.center-both {
  display: flex;
  flex-direction: column; /* columna -> eix principal vertical */
  justify-content: center; /* centra VERTICAL */
  align-items: center !important; /* centra HORITZONTAL */
  text-align: center !important; /* opcional, centra text */
}

.custom-check-container {
  display: flex;
  align-items: flex-start;
  margin-bottom: 40px;
}

.custom-check-container img {
  width: 30px;
  height: auto;
  margin-right: 20px;
}

.custom-check-container h3 {
  font-weight: bold;
  font-size: 22px;
  margin: 0 0 10px 0;
}

.custom-check-container p {
  font-size: 16px;
  color: #555;
  margin: 0;
}

.custom-list {
  list-style: none !important; /* Força la desactivació del bullet */
  padding: 0; /* Elimina l'espai addicional de l'padding */
  margin: 0;
  line-height: 0; /* Redueix l'interlineat */
}

.custom-list li {
  position: relative;
  padding-left: 30px; /* Augmenta l'espai per alinear millor la icona */
  margin-bottom: 10px; /* Afegeix espai entre els elements de la llista */
}

.custom-list li::before {
  content: "✔";
  position: absolute;
  left: -16px; /* Col·loca la icona a l'esquerra de la caixa */
  top: -2px; /* Ajusta la posició vertical per a l'alineació de la línia de base */
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #dfede7;
  color: #2b634b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
}

.custom-list p {
  margin-top: 15px; /* Afegeix més espai entre els paràgrafs */
}

.accordion-custom .et_pb_toggle_title:before {
  content: "";
  display: inline-block;
  width: 40px;
  height: 40px;
  background-size: contain;
  background-repeat: no-repeat;
  vertical-align: middle;
  margin-right: 12px;
  position: relative;
  top: 20px;
}

.tabs-custom {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 1.5rem;
}

.tabs-custom .et_pb_tabs_controls {
  flex-basis: 20%;
  background: transparent !important;
  display: block;
}

.tabs-custom .et_pb_all_tabs {
  flex-basis: 75%;
}

.tabs-custom .et_pb_tabs_controls li {
  width: 100%;
  margin-bottom: 10px;
  border-radius: 10px;
}

.tabs-custom .et_pb_all_tabs .et_pb_tab {
  padding: 0 !important;
}

.tabs-custom .et_pb_tabs_controls li.et_pb_tab_active a {
  color: white !important;
}

.tabs-custom .et_pb_tabs_controls::after {
  content: none !important;
}

.tabs-custom .et_pb_tabs_controls li a {
  padding: 15px 30px !important;
}

.tabs-custom .et_pb_all_tabs .et_pb_tab .et_pb_tab_content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  min-height: 500px;
}

.tabs-custom .et_pb_all_tabs .et_pb_tab .et_pb_tab_content p {
  flex-basis: 25%;
  text-align: center;
}

.tabs-custom .et_pb_all_tabs .et_pb_tab .et_pb_tab_content img {
  border-radius: 20px;
}

.tabs-custom .tab-body-custom {
  flex-basis: 70%;
}

.tabs-custom .tab-body-custom a {
  background: white;
  border-radius: 35px;
  padding: 12px 24px;
  text-align: center;
  display: block;
  width: fit-content;
}

.tabs-custom .tab-body-custom p {
  text-align: left !important;
}

.disable-lightbox .et_pb_gallery_items a {
  pointer-events: none;
}

.disable-lightbox .et_overlay {
  display: none !important;
}

.el-read-more-link a,
.et_pb_button_module_wrapper .et_pb_button.btn-custom:hover,
.et_pb_button_module_wrapper .et_pb_button.btn-custom {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
  border-radius: 20px !important;
  font-size: 15px !important;
}

.et_pb_button_module_wrapper .et_pb_button.btn-custom:hover {
  width: calc(25% - 15px) !important;
  flex: 0 0 calc(25% - 15px) !important;
}

/* Llistat de projectes: contenidor */
.projectes-home .el-dbe-blog-extra.block_extended {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 24px !important; /* separació uniforme */
  justify-content: space-between !important;
  padding: 0 !important; /* evita padding extra del mòdul */
}

/* Targetes (articles) */
.projectes-home .el-dbe-blog-extra.block_extended > article {
  box-sizing: border-box;
  margin: 0 !important;
  padding: 0;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  flex: 0 0 calc((100% - (3 * 24px)) / 4) !important; /* 4 columnes per defecte (escriptori) */
  border-radius: 10px;
  position: relative;
  transition: background-color 0.3s ease, transform 0.2s ease-in-out;
}

/* Colores por posición - TU CSS ORIGINAL */
.projecte:nth-child(4n + 1),
.projectes-home article:nth-of-type(1) {
  background-color: #dfede7 !important;
  margin-top: 0;
}

.projecte:nth-child(4n + 2),
.projectes-home article:nth-of-type(2) {
  background-color: #ffedd7 !important;
  margin-top: 0;
}

.projecte:nth-child(4n + 3),
.projectes-home article:nth-of-type(3) {
  background-color: #bde5fe !important;
  margin-top: 0;
}

.projecte:nth-child(4n),
.projectes-home article:nth-child(4n) {
  background-color: #fddace !important;
  margin-top: 0;
}

/* Enllaç “Llegir més” */
.projectes-home article .el-read-more-link {
  position: absolute;
  bottom: 20px;
}

.projectes-home article .post-categories a {
  margin-right: 7px !important;
  text-decoration: underline !important;
  padding: 0 !important;
  font-size: 12px !important;
  border: none !important;
}

.projectes-home article .post-content {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 30px !important;
}

.projectes-home article:hover {
  transform: scaleX(1.05) scaleY(1.05) !important;
}


.et_pb_section.et_pb_section_0_tb_footer.et_pb_with_background.et_section_regular {
  display: flex;
  align-items: center;
}
/* Galeria (base) */
/* == Galeria logos: horitzontal amb 2/4/6 columnes == */
.custom-gallery .et_pb_gallery_items {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: space-between; /* reparteix l'espai horitzontal */
  width: 100%;

}

/* Neteja regles de Divi que forcen amplades/floats */
.custom-gallery .et_pb_gallery_item {
  float: none !important;
  margin: 0 !important;
  width: auto !important;
  max-width: none !important;
  box-sizing: border-box;

}

/* Columnes per trencament: 2 / 4 / 6 */
.custom-gallery .et_pb_gallery_item {
  flex: 0 1 calc(50% - 12px); /* mòbil: 2 columnes */
	
}


/* Footer */
.et_pb_section_0_tb_footer.et_pb_section {
  background-color: #000000 !important;
  display: flex;
}

/* Bloc mm-xarxa */
.mm-xarxa .et_pb_team_member_description {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: end;
}

.mm-xarxa .et_pb_module_header {
  order: 1;
  flex-basis: 70%;
  padding: 0;
}

.mm-xarxa .et_pb_member_position {
  order: 2;
  flex-basis: 70%;
  color: #000 !important;
  margin-top: -10px;
}

.mm-xarxa .et_pb_member_social_links {
  order: 0;
  flex-basis: 50px;
  padding: 0;
  margin-top: 0 !important;
}

.mm-xarxa .et_pb_member_social_links a {
  background: white;
  width: 35px;
  height: 35px;
  border-radius: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

/* Flex per igualar l'alçada de totes les columnes */
.et_pb_row_5col {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

/* Cada columna també és flex per fer créixer la targeta */
.et_pb_row_5col > .et_pb_column {
  display: flex;
  flex-direction: column;
}

/* Targeta: s’estira i reparteix espai */
.b3_team {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  height: 100%;
  border: none !important;
  border-radius: 15px !important;
  overflow: hidden;
  width: 100%;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 20px 150px rgba(0, 0, 0, 0.2);
}

/* Contenidor de la imatge: bloqueja l'alçada per a totes les targetes */
.b3_team .et_pb_team_member_image {
  width: 100%;
  height: 230px; /* alçada uniforme */
  overflow: hidden; /* retalla sobrants del zoom */
}

/* Imatge */
.b3_team .et_pb_team_member_image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover; /* omple i retalla */
  object-position: center;
  transform: scale(1.03);
  transform-origin: bottom;
  transition: transform 0.5s ease; /* només animem el transform */
  will-change: transform; /* millora rendiment del hover */
}

/* Hover: treu el zoom suaument */
.b3_team:hover .et_pb_team_member_image img {
  transform: scale(1);
  transition: transform 0.5s cubic-bezier(0.17, 0.69, 0.47, 0.995);
}

/* Només la IMG dins de les 2 últimes columnes — valors corregits */
.et_pb_row_5col > .et_pb_column:nth-last-child(-n + 2) .et_pb_team_member_image img {
  object-position: 0px -30px; /* abans: 0-30px (invàlid) */
  transform-origin: top;
}

/* Contingut centrat verticalment dins la part blanca */
.b3_team .et_pb_team_member_description {
  padding: 30px;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* alterna amb 'center' si ho prefereixes centrat */
  align-items: center;
}

/* "Més informació" amb separació */
.b3_team .et_pb_team_member_description p a {
  margin-top: 10px;
  display: inline-block;
}

/* Estil del càrrec */
.b3_team .et_pb_member_position {
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 600;
}

/* Ratlleta decorativa sota el càrrec */
.b3_team .et_pb_member_position:after {
  content: " ";
  display: block;
  width: 80px;
  margin: 40px auto 0;
  border: 1px solid;
}

/* Xarxes socials: ocultes per defecte */
.b3_team .et_pb_member_social_links a {
  opacity: 0;
  margin-top: 20px;
  transition: all 0.4s ease-in-out;
}

/* Apareixen en hover */
.b3_team:hover .et_pb_member_social_links a {
  opacity: 1;
  transform: translate(0px, -15px);
  transition: all 0.4s ease-in-out;
}

/* Només aquesta fila (row_9) i mòduls mm-xarxa */
.et_pb_row_9 .mm-xarxa .et_pb_module_header {
  line-height: 1.15; /* compacta la línia */
  margin: 0 0 6px 0; /* espai inferior controlat */
  position: relative;
  top: 8px; /* nudge (negatiu per baixar) */
  /* Alternativa al top: transform: translateY(2px); */
}

/* Ajust general del càrrec */
.et_pb_member_position {
  line-height: 1.4em !important;
}

.avatar-custom {
  text-align: center;
}

.avatar-custom .et_pb_image_wrap {
  width: 150px;
  height: 150px;
  margin: 0 auto;
  overflow: hidden;
  display: block;
  border-radius: 50%;
}

.avatar-custom .et_pb_image_wrap img {
  display: block;
  width: auto !important; /* evita width:100% inline de Divi */
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: 50% 50%; /* per defecte, centre */
}

.avatar-custom.op-top-left .et_pb_image_wrap img {
  object-position: 0% 0%;
}

.avatar-custom.my-0 .et_pb_image_wrap img {
  margin-top: 0px;
}

.avatar-custom.mx-0 .et_pb_image_wrap img {
  margin-left: 0px;
}

/* Fa que el contenidor del popup sigui referència per a l'absolute */
.popup {
  position: relative;
}

/* Botó tancar: més a l'esquerra i més avall */
.da-close.evr-close {
  position: absolute !important;
  top: 36px !important; /* més avall (augmenta si cal) */
  right: 40px !important; /* més a l'esquerra (augmenta si cal) */
  width: 80px;
  height: 80px;
  line-height: 30px;
  z-index: 1000;
}

/* ===== MÒBIL (≤ 767.98px) ===== */
@media screen and (max-width: 767.98px) {
  /* Columnes basades en variables (si s'usen) */
  .col-sm-3 {
    flex-basis: var(--col-3);
  }
  .col-sm-4 {
    flex-basis: var(--col-4);
  }
  .col-sm-6 {
    flex-basis: var(--col-6);
  }
  .col-sm-9 {
    flex-basis: var(--col-9);
  }
  .col-sm-12 {
    flex-basis: var(--col-12);
  }

  /* Projectes: 1 per fila a mòbil */
  .projectes-home .el-dbe-blog-extra.block_extended {
    gap: 16px !important; /* separació entre targetes */
  }

  .projectes-home .el-dbe-blog-extra.block_extended > article {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .projectes-home article:hover {
    transform: none !important;
  }

  .custom-gallery .et_pb_gallery_item {
    flex: 1;
    align-content: center;
    padding: 20px;
  }
}

/* ===== MD (≥ 768px) ===== */
@media screen and (min-width: 768px) {
  /* Columnes (si s'usen) */
  .col-md-3 {
    flex-basis: var(--col-3);
  }
  .col-md-4 {
    flex-basis: var(--col-4);
  }
  .col-md-6 {
    flex-basis: var(--col-6);
  }
  .col-md-9 {
    flex-basis: var(--col-9);
  }
  .col-md-12 {
    flex-basis: var(--col-12);
  }

  .et_pb_column .et_pb_team_member_image {
    margin: 0 !important;
    max-width: 371px;
    object-fit: contain;
    overflow: hidden;
  }

  .custom-gallery .et_pb_gallery_item {
    flex: 1;
    align-content: center;
    padding: 20px;
  }

  .projectes-home .el-dbe-blog-extra.block_extended > article {
    flex: 0 0 calc((100% - (3 * 24px)) / 2) !important;
  }

  /* layout de 2 columnes per article (si aplica) */
  .projectes-home article {
    width: 49% !important;
    margin-right: 2% !important;
  }

  .projectes-home article:nth-child(2n) {
    margin-right: 0 !important;
  }

  /* Amplada de text en sliders */
  .et_pb_slide_description .et_pb_slide_title,
  .et_pb_slide_description .et_pb_slide_content {
    display: block;
    width: 150% !important;
    box-sizing: border-box;
  }

  /* Ajust d'object-position corregit per a md */
  .et_pb_row_5col > .et_pb_column:nth-last-child(-n + 2) .et_pb_team_member_image img {
    object-position: 0px -15px;
    transform-origin: top;
  }

  /* 
  .et_pb_gallery_items.et_post_gallery .et_pb_gallery_item {
    flex: 0 0 25%;
    max-width: 100%;
  }  
  */

  /* Imatge de la targeta (variant md) */
  .b3_team .et_pb_team_member_image {
    width: 100%;
    height: 230px;
    overflow: hidden;
    max-width: none !important;
  }
}

/* ===== XL (≥ 1200px) ===== */
@media screen and (min-width: 1200px) {
  /* Columnes (si s'usen) */
  .col-lg-3 {
    flex-basis: var(--col-3);
  }
  .col-lg-4 {
    flex-basis: var(--col-4);
  }
  .col-lg-6 {
    flex-basis: var(--col-6);
  }
  .col-lg-9 {
    flex-basis: var(--col-9);
  }
  .col-lg-12 {
    flex-basis: var(--col-12);
  }

  /* Galeria: ~6 columnes */
  .et_pb_gallery_items.et_post_gallery .et_pb_gallery_item {
    flex: 1;
    padding: 20px;
    align-content: center;
  }

  .projectes-home .el-dbe-blog-extra.block_extended > article {
    flex: 0 0 calc((100% - (3 * 24px)) / 4) !important;
  }
}

/* ===== XXL (≥ 1400px) ===== */
@media screen and (min-width: 1400px) {
  /* Reserva per a futurs ajustos d'ultra escriptori */
}
