/*
 Theme Name:     Divi Child
 Theme URI:      https://www.elegantthemes.com/gallery/divi/
 Description:    Child theme for the Divi theme
 Author:         aeiou.cat
 Author URI:     https://www.elegantthemes.com
 Template:       Divi
 Version:        1.0.0
*/


@import url('https://fonts.googleapis.com/css2?family=Gloock&family=Newsreader:ital,opsz,wght@0,6..72,200..800;1,6..72,200..800&display=swap');

:root {
    --vermell:      #76141b;
    --blau:         #20284e;
    --blau-clar:    #b7bcd2;
    --aqstic:       #a38a7b;
    --aqstic-clar:  #f2eae6;
    --negre:        #000;
    --blanc:        #fff;
}

html {
    scroll-behavior: smooth;
}

/* El Divi fa que se separin arreu, cosa que fa que els títols grans tinguin comportaments estranys */
.et_pb_text {
    word-wrap: normal !important;
}

body {
    max-width: 100vw;
    overflow-x: hidden;
}

h1,
h2,
.gloock h3, h3.gloock,
.gloock h4, h4.gloock,
.gloock h5, h5.gloock,
.gloock h6, h6.gloock,
.gloock p,  p.gloock,
.gloock li, li.gloock {
  font-family: "Gloock", serif;
  font-weight: 400;
  font-style: normal;
}

.capcalera-gran h1 {
    margin-bottom: 50px;
}
.capcalera-gran h1,
.capcalera-gran h2,
.capcalera-gran h3,
.capcalera-gran h4 {
    font-size: 160px;
}
@media only screen and (max-width: 981px) {
    .capcalera-gran h1,
    .capcalera-gran h2,
    .capcalera-gran h3,
    .capcalera-gran h4 {
        font-size: 90px;
    }
}
@media only screen and (max-width: 481px) {
    .capcalera-gran h1,
    .capcalera-gran h2,
    .capcalera-gran h3,
    .capcalera-gran h4 {
        font-size: 50px;
    }
}
.capcalera-mitjana h2,
.capcalera-mitjana h3,
.capcalera-mitjana h4 {
    font-size: 60px;
}
@media only screen and (max-width: 981px) {
    .capcalera-mitjana h2,
    .capcalera-mitjana h3,
    .capcalera-mitjana h4 {
        font-size: 50px;
    }
}
@media only screen and (max-width: 481px) {
    .capcalera-mitjana h2,
    .capcalera-mitjana h3,
    .capcalera-mitjana h4 {
        font-size: 32px;
    }
}
/* Secció que controla la durada del scroll */
.horizontal-scroll-section {
  position: relative;
  height: 300vh; /* ajusta segons necessitis */
  overflow: hidden;
}

/* Row sticky */
.horizontal-track {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;           /* fa que els mòduls estiguin en fila */
  align-items: center;
  overflow: hidden;
  white-space: nowrap;      /* evita que saltin a la següent línia */
  scroll-behavior: smooth; /* opcional: scroll suau */
}

/* Cada columna de Divi dins la row */
.horizontal-track .et_pb_column {
  display: flex;            /* força les columnes a horitzontal */
  flex-wrap: nowrap;        /* no permet que saltin de fila */
  align-items: center;
}

/* Cada mòdul dins la columna */
.horizontal-track .et_pb_module {
  flex: 0 0 auto;           /* ocupa l'ample del contingut */
  margin-right: 40px;       /* espai entre mòduls */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Títol més gran */
.horizontal-track .et_pb_module:first-child {
  flex: 0 0 40vw;
}

/* Imatges */
.horizontal-track img {
  width: 100%;
  max-width: 600px;
  height: auto;
  object-fit: cover;
  display: block;
}

.projects-container {
  display: flex;
  gap: 40px;
  padding: 40px;
}

.projects-list { flex: 1; }
.project-item { margin-bottom: 20px; cursor: pointer; font-size: 1.2rem; }
.project-item:hover { color: #ff6600; }
.project-image { flex: 2; position: sticky; top: 40px; }
.project-image img { width: 100%; max-height: 80vh; object-fit: cover; border-radius: 12px; transition: opacity 0.4s ease; }



/* Logo i menú de pàgina completa */
.et_header_style_left .logo_container {
    position: absolute;
    height: 100%;
    width: auto;
}
body.admin-bar.et_fixed_nav #main-header {
    /*z-index: 9999998;*/
}
span.mobile_menu_bar.et_pb_header_toggle.et_toggle_fullscreen_menu {
    opacity: 1;
    transition: opacity 0.3s ease;
    padding: .2em 5em !important;
}
.et_header_style_fullscreen .mobile_menu_bar.et_toggle_fullscreen_menu {
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}
.et_header_style_fullscreen .et_slide_in_menu_container.et_pb_fullscreen_menu_opened {
    opacity: .98;
}

body.et_pb_fullscreen_menu_active
span.mobile_menu_bar.et_pb_header_toggle.et_toggle_fullscreen_menu {
    opacity: 0;
}
.et_header_style_fullscreen .et_slide_in_menu_container span.mobile_menu_bar.et_toggle_fullscreen_menu {
    position: absolute;
    right: 55px;
    top: 30px;
}
body.admin-bar.et_header_style_fullscreen .et_slide_in_menu_container span.mobile_menu_bar.et_toggle_fullscreen_menu {
    top: 70px;
}

#et-top-navigation {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 30px;
}
@media (max-width: 980px) {
    .et_header_style_left .et-fixed-header #et-top-navigation,
    .et_header_style_left #et-top-navigation {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }
    .et_header_style_left #logo {
        padding: 0.8em 2em !important;
    }
    .et_header_style_fullscreen .container #et-top-navigation {
        padding: 22px 0 26px 0 !important;
        max-width: 40vw;
    }
    .bx-wpml-switcher a {
        padding: .8em .8em !important;
    }
    span.mobile_menu_bar.et_pb_header_toggle.et_toggle_fullscreen_menu {
        padding: .2em 3em !important;
    }

}
.bx-wpml-switcher {
    display: flex;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
}

.bx-wpml-switcher a {
    text-decoration: none;
    opacity: 0.6;
    transition: opacity .2s ease;
}

.bx-wpml-switcher a:hover {
    opacity: 1;
}

.bx-wpml-switcher .active {
    opacity: 1;
}
.et_header_style_fullscreen #et-top-navigation {
    padding: 26px 0 26px 0 !important;
}

div#et-top-navigation span.active {
    display: none;
}
.bx-wpml-switcher a {
    color: var(--blanc);
    font-size: 20px;
    opacity: 1;
    font-weight: 400;
    background: var(--gris);
    background: rgba(150, 150, 150, 0.2);
    border-radius: 100px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: .8em 1em;
}
body.et_pb_fullscreen_menu_active .bx-wpml-switcher {
    display: none;
}

.mobile_menu_bar:before {
    font-size: 64px;
    top: -4px;
    height: 0.8em;
}
/*.et_header_style_fullscreen .et_slide_in_menu_container span.mobile_menu_bar.et_toggle_fullscreen_menu*/
span.mobile_menu_bar.et_pb_header_toggle.et_toggle_fullscreen_menu {
    max-width: 100%;
    background: rgba(150, 150, 150, 0.2);
    border-radius: 100px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: .8em 1.6em;
}
.et_header_style_left #logo {
    max-width: 100%;
    background: rgba(150, 150, 150, 0.2);
    border-radius: 100px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: .8em 3em;
}
.et_header_style_fullscreen ul#mobile_menu_slide {
    text-align: left;
    position: absolute;
    bottom: 0;
    width: auto;
    display: block !important;
    height: auto;
    vertical-align: top;
    padding: 2em 6em;
}
@media only screen and (max-width: 980px) {
    .et_header_style_fullscreen ul#mobile_menu_slide {
        padding: 2em 3em;
    }
}
ul#mobile_menu_slide li  {
    display: inline-flex;
    /*position: fixed;*/
    font-size: 6px;
    bottom: 50px;
    margin-right: 15px;
    line-height: 1em;
}
li.mes-gran {
    position: fixed;   
    line-height: 1em;
    font-weight: bold;
}

.et_header_style_fullscreen .et_pb_fullscreen_nav_container .et_mobile_menu li.wpml-ls-item {
    border: 1px solid var(--blanc);
    padding-left: 1em !important;
    padding-right: 1em;
    border-radius: 50px;
    margin-right: 0 !important;
    margin-left: 0 !important;
    text-transform: uppercase;
}

/*.mobile_menu_slide > li.wpml-ls-item {   z-index: 5; }*/
li.mes-gran:nth-of-type(1) {    top: 200px; }
li.mes-gran:nth-of-type(2) {    top: 260px; }
li.mes-gran:nth-of-type(3) {    top: 320px; }
li.mes-gran:nth-of-type(4) {    top: 380px; }
li.mes-gran:nth-of-type(5) {    top: 440px; }
.et_header_style_fullscreen .et_slide_in_menu_container .et_mobile_menu li a {
    font-size: 18px;
}
.et_header_style_fullscreen .et_slide_in_menu_container .et_mobile_menu li.mes-gran a {
    font-size: 48px;
}
@media (max-width: 480px) {
    .et_header_style_fullscreen .et_slide_in_menu_container .et_mobile_menu li.mes-gran a {
        font-size: 26px;
    }
    li.mes-gran:nth-of-type(1) {    top: 170px; }
    li.mes-gran:nth-of-type(2) {    top: 210px; }
    li.mes-gran:nth-of-type(3) {    top: 250px; }
    li.mes-gran:nth-of-type(4) {    top: 290px; }
    li.mes-gran:nth-of-type(5) {    top: 330px; }
}

.et_header_style_fullscreen .et_slide_in_menu_container span.mobile_menu_bar.et_toggle_fullscreen_menu:before {
    color: var(--blanc);
    content: "tancar";
    font-family: Newsreader !important;
    font-style: italic;
    font-size: 2em;
}
html:lang(es-ES) .et_header_style_fullscreen .et_slide_in_menu_container span.mobile_menu_bar.et_toggle_fullscreen_menu:before {
    content: "cerrar";
}
html:lang(en-US) .et_header_style_fullscreen .et_slide_in_menu_container span.mobile_menu_bar.et_toggle_fullscreen_menu:before {
    content: "close";
}
.mobile_menu_bar:before {
  color: var(--blanc) !important;
}
.et_pb_fullscreen_menu_opened {
    z-index: 99999 !important;
}
.logo_container {
    height: 100px !important;
}
@media only screen and (max-width: 980px) {
    #main-header .container {
        width: 92%;
    }
}

@media only screen and (min-width: 981px) {
    .et_pb_svg_logo #logo {
        height: 60px !important;
    }
}
@media only screen and (min-width: 981px) {
    .et_pb_svg_logo #logo {
        height: 60px !important;
    }
}


/* ==============================
   MENU FULLSCREEN DIVI – CUSTOM
   ============================== */

/* Contenidor general */
.et_slide_in_menu_container {
    position: relative;
    overflow: hidden;
}

/* ==============================
   IMATGE MEITAT DRETA
   ============================== */
.menu-bg-image {
    position: absolute;
    top: 140px;
    bottom: 140px;
    right: 40px;
    width: 40%;
    z-index: 1;
    pointer-events: none;
}

.menu-bg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

/* El menú queda a l’esquerra */
.et_pb_fullscreen_nav_container {
    position: relative;
    z-index: 3;
    width: 50%;
}

/* ==============================
   MARQUEE "ENGINYERIA INDUSTRIAL"
   ============================== */
.menu-marquee {
    position: absolute;
    font-family: Gloock !important;
    bottom: 30px;
    left: 0;
    width: 100%;
    overflow: hidden;
    transform: translateY(-50%);
    z-index: 2;
    pointer-events: none;
}

.menu-marquee-inner {
    display: flex;
    align-items: center;
    white-space: nowrap;
    height: 180px;
    font-size: 150px;
    color: rgb(255,255,255);
    animation: marquee-left 15s linear infinite;
}
@media (max-width: 980px) {
    .menu-marquee-inner {
        font-size: 120px !important;
    }
}
@media (max-width: 480px) {
    .menu-marquee-inner {
        font-size: 80px !important;
    }
}

/* Animació marquee */
@keyframes marquee-left {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(-150%);
    }
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 980px) {
    .menu-bg-image {
        display: none;
    }

    .et_pb_fullscreen_nav_container {
        width: 100%;
    }

    .menu-marquee-inner {
        font-size: 120px;
    }
}

@media (max-width: 480px) {
        .et_header_style_left #logo {
        max-width: 100%;
        background: rgba(150, 150, 150, 0.2);
        border-radius: 100px;
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        padding: .8em 2em;
    }
    span.mobile_menu_bar.et_pb_header_toggle.et_toggle_fullscreen_menu {
        padding: .7em 3em !important;
    }
    .mobile_menu_bar:before {
        font-size: 32px;
        top: 1px;
        height: 1em;
    }
    ul#mobile_menu_slide li  {
        bottom: 30px;
    }
    .et_header_style_fullscreen ul#mobile_menu_slide {
        padding: 2em 2em;
    }
    .et_header_style_fullscreen .et_slide_in_menu_container span.mobile_menu_bar.et_toggle_fullscreen_menu:before {
        font-size: 1.5em;
        top: 15px;
        left: 20px;
    }
    header .container {
        width: 90% !important;
    }
}

#hover-section .et_pb_column img {
    opacity: 0;
    transition: opacity 0.3s ease;
}
#hover-section .et_pb_column:hover img {
    opacity: .9;
}
@media (max-width: 980px) {
    #hover-section .et_pb_gutters1.et_pb_row_5col>.et_pb_column.et_pb_column_1_5 {
        width: 24%;
    }
    #hover-section .et_pb_column.et_pb_column_1_5 {
        width: 30% !important;
    }
}
.text-variable,
.text-variable * {
    pointer-events: none;
}

/* amaguem el footer per defecte de wordpress perquè ja n'afegim un de propi amb el Divi  */
footer,
footer#main-footer,
#main-footer {
    display: none !important;
}

/* El títol de les avaries al mòdul de contacte */
.avaria h3 {
    font-family: 'Gloock';
    color: var(--vermell);
    font-size: 40px;
}

/* Peu de pàgina */
.franja-contacte {
    margin-top: -50px !important;
}

.columna-logo-peu div {
    height: 100%;
    position: relative;
}
.columna-logo-peu div span.et_pb_image_wrap {
    height: 100%;
    display: flex;
    align-items: flex-end;
}
.channel-icon {
    padding: 0 1em;
}
.channel-icon img {
    display: none !important;
}

/*
** Contact Form 7 basics
**
**/

/* Form width  and border */

.wpcf7 {
  text-align: left;
  width: 90%;
  padding: 20px 25px !important;
}

label {
    color: var(--negre)
}

/* Input Field widths */

.wpcf7-text,
.wpcf7-textarea {
  width: 100%;
  border: 1px solid var(--negre) !important;
  border-radius: 4px;
  color: var(--negre) !important;
  padding-left: 10px !important;
  min-height: 50px;
}

/* Input Field borders */

/* Input Field Text color */

.wpcf7-text:focus,
.wpcf7-textarea:focus {
  /*border-color: #8f8f8f;*/
}

/* Label Font */

.wpcf7-form p {
/*  font-size: 16px;
  font-family: "Roboto", sans-serif;
  color: #000;*/
}

/* Submit button Font */

.wpcf7-submit {
  min-width: 75%;
  font-size: 16px !important;
  color: var(--blanc);
  background: var(--vermell);
  padding: 20px;
  border: none;
  cursor: pointer;
}

/* Submit button Hover */

.wpcf7-submit:hover {
  opacity: .8;
}

/* Response messages - Error & Success */

.wpcf7-response-output {
  margin-bottom: 30px !important;
}

input.text,
input.title,
input[type=text],
input[type=email],
input[type=file],
select,
textarea {
    clear: both;
    margin: 0 0 1em 0 !important;
}
input[type=file] {
    margin-bottom: 2em !important;
}

.et_pb_section_1,
.et_pb_section_2 {
    overflow: visible !important;
}

#chaty-widget-0 .channel-icon-Phone .chaty-svg,
#chaty-widget-0 .channel-icon-Custom_Link .chaty-svg,
#chaty-widget-0 .channel-icon-Custom_Link_3 .chaty-svg,
#chaty-widget-0 .channel-icon-Link .chaty-svg,
#chaty-widget-0 .channel-icon-Contact_Us .chaty-svg,
#chaty-widget-0 .chaty-i-trigger .chaty-cta-button button {
    /*background-color: var(--vermell) !important;*/


    /*max-width: 100%;*/
    background-color: rgba(150, 150, 150, 0.2) !important;
    /*border-radius: 100px;*/
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    /*padding: .8em 1.6em;*/
}

/*#chaty-widget-0 .channel-icon-Phone .color-element,
#chaty-widget-0 .channel-icon-Link .color-element,
#chaty-widget-0 .channel-icon-Custom_Link .color-element,
#chaty-widget-0 .channel-icon-Custom_Link_3 .color-element,
#chaty-widget-0 .channel-icon-Contact_Us .color-element,*/
ellipse,
circle {
    /*fill: var(--vermell) !important;*/
    fill: none !important;
    /*color: var(--vermell) !important; */
}
.chaty-cta-button svg g circle,
.chaty-cta-close svg ellipse {
    fill: var(--vermell) !important;
}

.channel-icon-Custom_Link .chaty-svg svg,
.channel-icon-Custom_Link_3 .chaty-svg svg,
.channel-icon-Link .chaty-svg svg {
  display: none !important;
}

.channel-icon-Custom_Link .chaty-svg,
.channel-icon-Custom_Link_3 .chaty-svg,
#chaty-widget-0 .channel-icon-Link .chaty-svg {
  background: url('img/icona-email.svg') no-repeat center center;
  background-size: 35px 35px;
}

.llista-lineal-projectes {
    overflow: visible !important;
/*    position: static !important;
    z-index: 10;*/
}

.llista-lineal-projectes p {
    font-size: 1.2em;
    text-transform: uppercase;
}

.llista-lineal-projectes img {
    display: none;
    position: absolute;
    top: -220px;
    left: 130%;
    z-index: 9999;
    border-radius: 25px;
    width: 33vw !important;
    max-width: 500px;
}
.llista-lineal-projectes:nth-child(1)   img { top: -220px; }
.llista-lineal-projectes:nth-child(2)   img { top: -260px; }
.llista-lineal-projectes:nth-child(3)   img { top: -290px; }
.llista-lineal-projectes:nth-child(4)   img { top: -330px; }
.llista-lineal-projectes:nth-child(5)   img { top: -370px; }
.llista-lineal-projectes:nth-child(6)   img { top: -400px; }
.llista-lineal-projectes:nth-child(7)   img { top: -430px; }
.llista-lineal-projectes:nth-child(8)   img { top: -460px; }
.llista-lineal-projectes:nth-child(9)   img { top: -490px; }
.llista-lineal-projectes:nth-child(10)  img { top: -520px; }

.llista-lineal-projectes:hover img {
    display: block;
}
.llista-lineal-projectes .et_pb_column:nth-child(2) p {
    text-align: center;
}
.llista-lineal-projectes .et_pb_column:nth-child(3) p {
    text-align: right;
}
@media (min-width: 981px) {
    .franja-amb-el-llistat:hover .et_pb_column:nth-child(2) p,
    .franja-amb-el-llistat:hover .et_pb_column:nth-child(3) p {
        display: none;
    }
}
@media (max-width: 980px) {
/*    .franja-amb-el-llistat .et_pb_column:nth-child(2) p,
    .franja-amb-el-llistat .et_pb_column:nth-child(3) p {
        display: none;
    }*/
    .llista-lineal-projectes img {
        display: none;
    }
    .llista-lineal-projectes .et_pb_column {
        width: 50%;
        margin-bottom: 15px;
    }
} 


/* Outlet */
@media (min-width: 981px) {
    .et_pb_gutters3 .et_pb_column_4_4 .et_pb_grid_item, .et_pb_gutters3 .et_pb_column_4_4 .et_pb_shop_grid .woocommerce ul.products li.product, .et_pb_gutters3 .et_pb_column_4_4 .et_pb_widget, .et_pb_gutters3.et_pb_row .et_pb_column_4_4 .et_pb_grid_item, .et_pb_gutters3.et_pb_row .et_pb_column_4_4 .et_pb_shop_grid .woocommerce ul.products li.product, .et_pb_gutters3.et_pb_row .et_pb_column_4_4 .et_pb_widget {
        width: 23.5%;
        margin-right: 2%;
        margin-bottom: 2%;
    }
}

.woocommerce ul.products li.product a img,
.woocommerce-page ul.products li.product a img {
    filter: grayscale(1);
}
h2.woocommerce-loop-product__title {
    font-family: 'Palanquin', Helvetica, Arial, Lucida, sans-serif;
    font-weight: bold;
}
.woocommerce-product-details__short-description strong {
    font-family: 'Palanquin', Helvetica, Arial, Lucida, sans-serif;
}
/* Amagar sidebar */
.single-product #sidebar,
.woocommerce #sidebar {
    display: none !important;
}

/* Imatges de la botiga */
img.attachment-woocommerce_thumbnail {
    border-radius: 20px;
}
.et_pb_has_overlay:not(.et_pb_image):hover .et_overlay,
.et_portfolio_image:hover .et_overlay,
.et_shop_image:hover .et_overlay {
    border: none;
    border-radius: 20px;
    background: #bbb9 !important;
}
.woocommerce-product-gallery__image {
    border-radius: 20px;
}
.woocommerce div.product div.images .flex-control-thumbs li img,
.woocommerce div.product div.images .flex-control-thumbs li img:hover {
    border-radius: 20px;
}

/* Fer que el contingut ocupi tot l'ample */
.single-product #left-area,
.woocommerce #left-area {
    width: 100% !important;
}

/* Eliminar la línia/separador */
.single-product #left-area,
.woocommerce #left-area,
.single-product .container:before,
.woocommerce .container:before {
    border: none !important;
    box-shadow: none !important;
}

/* En alguns layouts de Divi la línia ve d’aquí */
.single-product #main-content .container:before,
.woocommerce-page #main-content .container:before {
    display: none !important;
}

@media (min-width: 981px) {
    /* 1️⃣ Evitar que la pàgina sencera tingui scroll horitzontal */
    html, body {
      overflow-x: hidden;
    }
    /* 2️⃣ La franja ocupa només l'ample visible */
    .franja-lateral-arrossegar {
      width: 100%;
      max-width: 100vw;
      overflow: hidden; /* important: confina el scroll dins la franja */
    }
    /* 3️⃣ El contenidor intern és el que scrolleja */
    .franja-lateral-arrossegar .et_pb_row {
      display: flex;
      flex-wrap: nowrap;
      width: 100%;
      max-width: 100%;
      overflow-x: auto;
      overflow-y: hidden;

      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    .franja-lateral-arrossegar .et_pb_row::-webkit-scrollbar {
      display: none;
    }
    /* 4️⃣ Cada targeta té amplada pròpia per forçar el scroll */
    .franja-lateral-arrossegar .et_pb_column {
      flex: 0 0 36vw;  /* o 33vw si vols veure’n 3 parcialment */
      max-width: 36vw;
    }
    .franja-lateral-arrossegar img {
        aspect-ratio: 4 / 3;
        object-fit: cover;
        /*filter: grayscale(1);*/
    }
    /* 5️⃣ Evitar que les imatges “es puguin agafar” */
    .franja-lateral-arrossegar span.et_pb_image_wrap,
    .franja-lateral-arrossegar img {
      -webkit-user-drag: none;
      user-drag: none;

      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      user-select: none;

      pointer-events: none; /* treu-ho si han de ser clicables */

    }
    .franja-lateral-arrossegar .et_pb_row {
      cursor: grab;
    }

    .franja-lateral-arrossegar .et_pb_row.is-dragging {
      cursor: grabbing;
    }
}

.imatge-seguint-cursor {
    position: relative; /* crea context de capes */
    z-index: 1;
}
.imatge-seguint-cursor img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
/*    width: 200px;
    border-radius: 20px;
    filter: grayscale(1);*/
}
.imatge-seguint-cursor .et_pb_image_wrap {
    overflow: hidden;
}

.imatge-seguint-cursor img {
    transition: transform 0.4s ease;
}

.imatge-seguint-cursor:hover img {
    transform: scale(1.1);
}
.mfp-figure, img.mfp-img {
    /*filter: grayscale(1);*/
}

.et_pb_gallery_fullwidth .et_pb_gallery_image img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
/*.imatge-seguint-cursor .et_pb_column {
    max-height: 350px !important;
}*/

.imatge-seguint-cursor * {
    /*position: relative;*/
    /*z-index: 3; /* el text i contingut per sobre */
}

.cursor-floating-image {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 2;                 /* darrere del text (segons configuració anterior) */
    will-change: transform;
    opacity: 0;
    transition: opacity 0.2s ease;

    /*width: 650px;*/
    border-radius: 20px;
    /*filter: grayscale(1);*/
    /*object-fit: contain;*/
}
.cursor-floating-image {
    max-width: 60vw;
    max-height: 45h;
}
.imatge-seguint-cursor img {
    max-height: 45h;
}
.imatge-seguint-cursor .et_pb_text,
.imatge-seguint-cursor h1,
.imatge-seguint-cursor h2,
.imatge-seguint-cursor h3,
.imatge-seguint-cursor p {
    position: relative;
    z-index: 5;
}

.serveis-a-inici .et_pb_column {
    border-radius: 20px;
    padding: 100px 40px;
}
.serveis-a-inici .et_pb_column img {
    /*margin-top: 180px;*/
    border-radius: 20px;
}
@media (min-width: 981px) {
    .serveis-a-inici .et_pb_column .et_pb_text,
    .serveis-a-inici .et_pb_column img {
        opacity: 0 !important;
    }
}

.serveis-a-inici .et_pb_column:hover .et_pb_text,
.serveis-a-inici .et_pb_column:hover img {
    opacity: 1 !important;
}
.serveis-a-inici .et_pb_column:hover {
    background-blend-mode: multiply;
    background-color: #0005;
}
@media (max-width: 980px) {
    .serveis-a-inici .et_pb_column {
        background-blend-mode: multiply;
        background-color: #0005;
    }
}
#installacions, #manteniment {
    width: 100%;
}

/* Canviar l'ordre de columnes en mòbil quan la row té la classe txt-img */
@media (max-width: 980px) {

    /* .txt-img primer TEXT i després IMATGE */
    .et_pb_row.txt-img {
        display: flex;
        flex-direction: column;
    }
    .et_pb_row.txt-img .et_pb_column:first-child {
        order: 2; /* passa a sota */
    }
    .et_pb_row.txt-img .et_pb_column:last-child {
        order: 1; /* puja a dalt */
    }
    .et_pb_row.txt-img img {
        margin-bottom: 3em;
        border-radius: 20px;
    }

    /* .img-txt primer IMATGE i després TEXT */
   .img-txt .et_pb_text_0 p,    .img-txt .et_pb_text_1 p,
   .img-txt .et_pb_text_2 p,    .img-txt .et_pb_text_3 p,
   .img-txt .et_pb_text_4 p,    .img-txt .et_pb_text_5 p,
   .img-txt .et_pb_text_6 p,    .img-txt .et_pb_text_7 p,
   .img-txt .et_pb_text_8 p,    .img-txt .et_pb_text_9 p,
   .img-txt .et_pb_text_10 p,  .img-txt .et_pb_text_11 p,
   .img-txt .et_pb_text_12 p,  .img-txt .et_pb_text_13 p,
   .img-txt .et_pb_text_14 p,  .img-txt .et_pb_text_15 p,
   .img-txt .et_pb_text_16 p,  .img-txt .et_pb_text_17 p,
   .img-txt .et_pb_text_0 h2,   .img-txt .et_pb_text_1 h2,
   .img-txt .et_pb_text_2 h2,   .img-txt .et_pb_text_3 h2,
   .img-txt .et_pb_text_4 h2,   .img-txt .et_pb_text_5 h2,
   .img-txt .et_pb_text_6 h2,   .img-txt .et_pb_text_7 h2,
   .img-txt .et_pb_text_8 h2,   .img-txt .et_pb_text_9 h2,
   .img-txt .et_pb_text_10 h2,  .img-txt .et_pb_text_11 h2,
   .img-txt .et_pb_text_12 h2,  .img-txt .et_pb_text_13 h2,
   .img-txt .et_pb_text_14 h2,  .img-txt .et_pb_text_15 h2,
   .img-txt .et_pb_text_16 h2,  .img-txt .et_pb_text_17 h2,
   .img-txt .et_pb_button_alignment_right {
        text-align: left !important;
    }
}

@media (max-width: 980px) {
    #enginyeria .et_pb_column,
    #installacions .et_pb_column,
    #manteniment .et_pb_column {
        width: 100% !important;
    }
    #enginyeria .et_pb_column h3,
    #installacions .et_pb_column h3,
    #manteniment .et_pb_column h3,
    #enginyeria .et_pb_column p,
    #installacions .et_pb_column p,
    #manteniment .et_pb_column p {
        text-align: left !important;
    }
}

.inici-projectes .et_pb_column {
    padding: 0 10px;
    z-index: unset !important;
}
.inici-projectes img  {
    border-radius: 10px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    /*filter: grayscale(1);*/
}
@media (max-width: 980px) {
    .inici-projectes img  {
        aspect-ratio: 5 / 3;
    }
}

.inici-projectes .et_pb_main_blurb_image {
    margin-top: 60px;
}
.inici-projectes .et_pb_blurb_container {

}
.inici-projectes .et_pb_blurb_container h4.et_pb_module_header {
    color: var(--blanc);
    font-family: "Gloock", serif;
    font-weight: 400;
    font-style: normal;
    font-size: 30px; 
    width: min-content;
    /*min-width: 300px;*/
    padding: 10px 20px 0 20px;
    border-radius: 10px 10px 0 0;
}
.inici-projectes .et_pb_blurb_container div.et_pb_blurb_description {
    color: var(--blanc);
    /*min-width: 350px;*/
    padding: 10px 20px;
    border-radius: 0 10px 10px 10px; 
}

@media (min-width: 981px) {
    .inici-projectes .et_pb_blurb_container h4.et_pb_module_header,
    .inici-projectes .et_pb_blurb_container div.et_pb_blurb_description {
        background: var(--negre);
        width: min-content;
        max-width: 450px;     
    }
    .inici-projectes .et_pb_blurb_container h4.et_pb_module_header {
        min-width: 300px;
    }
    .inici-projectes .et_pb_blurb_container div.et_pb_blurb_description {
        min-width: 350px;
    }
}

/* Galeria */
.et-pb-arrow-prev:before,
.et-pb-arrow-next:before {
    color: var(--blanc);
}
.et_pb_bg_layout_light .et-pb-controllers a {
    background-color: var(--blanc);
    opacity: .3;
}
.et_pb_bg_layout_light .et-pb-controllers a.et-pb-active-control {
    opacity: 1;
}

.catalegs .et_pb_main_blurb_image img {
    max-height: 420px;
    width: auto;
}

.formulari-denuncies .wpcf7 {
    padding: 0 !important;
}
.formulari-denuncies .wpcf7 input::placeholder {
    color: var(--negre);
}
.formulari-denuncies .wpcf7 h3,
.formulari-denuncies .wpcf7 .wpcf7-submit {
    margin-top: 2em;
}
