/**
 * Theme Name: TemaHelp
 * Template: Divi
 * Theme URI: proves.cecot.org
 * Author: Cecot
 */

/* =========================================================
   WPML
   Personalització del selector d’idioma de WPML
========================================================= */

/* El desplegable d’idioma ocupa tot l’ample disponible */
.wpml-ls-legacy-dropdown {
    width: 100%;
}

/* Eliminem el padding per defecte de la llista */
.wpml-ls-legacy-dropdown ul {
    padding: 0;
}

/* En hover i focus, traiem fons i vora, i fixem el color del text */
.wpml-ls-legacy-dropdown .wpml-ls-current-language:hover>a,
.wpml-ls-legacy-dropdown a:focus,
.wpml-ls-legacy-dropdown a:hover {
    background: none;
    border: 0;
    color: #000;
}

/* Estil del text dins del selector d’idioma */
.wpml-ls-legacy-dropdown a span {
    color: #191919;
    font-size: 15px;
}

/* Eliminem la vora del submenú del selector */
.wpml-ls-sub-menu {
    border: 0;
}

/* =========================================================
   FI WPML
========================================================= */


/* =========================================================
   MENU
========================================================= */

.menu-item:hover, .menu-item [aria-current="page"] {
	text-decoration: underline;
}

@media (max-width:986px) {

    /* Eliminem padding del menú mòbil */
    .menu-mobil-general .et_mobile_menu {
        padding: 0 !important;
    }

    /* Traiem padding i vores dels ítems */
    .menu-mobil-general .menu-item {
        padding: 0;
        border: 0 !important;
        border-bottom: 0 !important;
    }

    /* Item destacat en vermell */
    #menu-item-8576 a {
        background: #e02b20 !important;
        color: white !important;
        text-align: center;
        border-right: 4px solid white;
        border-left: 4px solid white;
    }

    /* Item destacat en negre */
    #menu-item-8577 a {
        background: #333333 !important;
        color: white !important;
        text-align: center;
        border-right: 4px solid white;
        border-left: 4px solid white;
        border-bottom: 4px solid white;
    }

    /* Fons gris per alguns ítems */
    #menu-item-8575,
    #menu-item-8574,
    #menu-item-8573 {
        background: #f5f5f5 !important;
    }

    .et_mobile_menu {
        padding: 0 !important;
    }

    /* Altres ítems amb fons gris */
    .menu-item-8746,
    .menu-item-8745 {
        background: #f5f5f5;
    }

    /* Traiem línia inferior d’aquests enllaços */
    .menu-item-8746 a,
    .menu-item-8745 a {
        border-bottom: 0 !important;
    }

    /* Pàgina activa destacada en vermell */
    .et_pb_menu_page_id-8694 {
        background-color: #e02b20;
    }

    .et_pb_menu_0_tb_header.et_pb_menu .et_mobile_menu .menu-item.et_pb_menu_page_id-8694 a {
        color: #f5f5f5 !important;
    }

    /* Pàgina activa destacada en negre */
    .et_pb_menu_page_id-8747 {
        background: black;
        color: white !important;
    }

    .et_pb_menu_0_tb_header.et_pb_menu .et_mobile_menu .et_pb_menu_page_id-8747 a {
        color: white !important;
    }

    /* 	.et_pb_post_content {
	word-break: break-all !important;
} */
}

@media (min-width:986px) {

    /* En desktop, amaguem alguns ítems específics */
    .et_pb_menu_page_id-8746,
    .et_pb_menu_page_id-8627,
    .menu-item-8744,
    .menu-item-8747 {
        display: none !important;
    }

    /* Submenú en columna i sense padding/vores */
    .et_pb_menu_page_id-4932 .sub-menu {
        display: flex !important;
        flex-direction: column;
        padding: 0 !important;
        min-width: 235px !important;
        border: 0 !important;
    }

    /* Amplada més gran per a un submenú concret */
    .et_pb_menu_page_id-8683 .sub-menu {
        min-width: 330px !important;
    }

    /* Padding intern dels enllaços dels submenús */
    .et_pb_menu_page_id-8683 .menu-item a,
    .et_pb_menu_page_id-4932 .menu-item a {
        padding: 9px 20px !important;
    }

    /* Eliminem padding dels lis i submenús */
    .et_pb_menu_page_id-4932 .sub-menu li,
    .et_pb_menu_page_id-8683 .sub-menu,
    .et_pb_menu_page_id-8683 .sub-menu li {
        padding: 0 !important;
    }
}

/* =========================================================
   FI MENU
========================================================= */



/* =========================================================
   FORMACIONS
   Targetes de properes formacions
========================================================= */

/* Filtres formació */

.fila-filtres-formacions {
	display: flex;
    flex-direction: row;
	gap: 20px 40px;
    flex-wrap: wrap;
	
	    margin-bottom: 30px;

}

#filtres-categoria-formacions {
	    display: flex;
    flex-direction: row;
    align-content: center;
    align-items: center;
    gap: 15px;
	
	    flex-wrap: wrap;
}

.buscador-formacions {
	    display: flex;
    gap: 0;
    flex-direction: row;
}

.grup-filtres {
	display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.buscador-formacions input {
	    border: 1px solid #e3322a;
    border-radius: 50px 0px 0 50px;
    padding: 8px 20px;
}

.buscador-formacions button {
	    background: #e3322a;
    border: 1px solid #e3322a;
    border-radius: 0 50px 50px 0;
    border-left: none;
    padding: 0 12px 0px 9px;
}

.buscador-formacions button svg {
	    fill: white;
}



.buscador-formacions button:hover, .buscador-formacions button:focus, .buscador-formacions button:focus-visible, .buscador-formacions button:focus-within {
    background: #a31c16 !important;
    /* fill: white; */
}

.boto-categoria-formacions, #filtre-data-formacions, #filtre-hora-formacions  {
    font-size: 17px;
    background: none;
    border: 1px solid;
    border-radius: 50px;
    padding: 6px 16px;
}

.boto-categoria-formacions.actiu {
    border: 1px solid #e63832;
    background: #e63832;
    color: white;
}

.boto-categoria-formacions:hover {
    background: #f5f5f5;
    cursor: pointer;
}

.boto-categoria-formacions.actiu:hover {
    background: #e63832;
}

.titol-filtres-botons {
    margin-bottom: 8px;
}

#boto-netejar-filtres-formacions {
	    font-size: 16px;
    background: none;
    border: none;
    border-radius: 50px;
    padding: 0;
    text-decoration: underline;
    color: #515151;
	cursor: pointer
}


/* fi Filtres formació */

#bloc-formacions-properes {
    width: 100%;
}

/* Missatge de càrrega */
#formacions-loader {
    font-size: 16px;
    color: #333;
    margin-bottom: 20px;
}

/* Grid de targetes de 3 columnes */
#llista-formacions-properes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

/* Targeta de formació */
.card-formacio {
    display: flex;
    flex-direction: column;
    min-height: 230px;
    background: #ffffff;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Capçalera de la targeta: data i hora */
.card-formacio__cap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px 12px;
    font-size: 15px;
    color: #1f1f1f;
    border-bottom: 1px solid #efefef;
}

/* Blocs de data i hora */
.card-formacio__data,
.card-formacio__hora {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1.2;
}

/* Icones de data/hora */
.card-formacio__icona {
    flex: 0 0 auto;
    display: block;
}

/* Cos de la targeta */
.card-formacio__cos {
    flex: 1;
    padding: 18px 16px 20px;
}

/* Títol de la formació */
.card-formacio__titol {
    margin: 0 0 12px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;
    color: #111;
}

/* Text informatiu */
.card-formacio__info {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: #2d2d2d;
}

/* Peu de targeta amb CTA */
.card-formacio__peu {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 16px;
    background: #f7eaea;
}

/* Botó principal */
.card-formacio__boto {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    min-height: 42px;
    padding: 10px 16px;
    background: #e63323;
    border: 1px solid #e63323;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

/* Hover i focus del botó */
.card-formacio__boto:hover,
.card-formacio__boto:focus {
    background: #c92b1d;
    border-color: #c92b1d;
    color: #fff;
    text-decoration: none;
}

/* Petit efecte de clic */
.card-formacio__boto:active {
    transform: translateY(1px);
}

/* Si hi ha un paràgraf dins del contenidor, ocupa totes les columnes */
#llista-formacions-properes>p {
    margin: 0;
    grid-column: 1 / -1;
}

/* Tablet: 2 columnes */
@media (max-width: 980px) {
    #llista-formacions-properes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mòbil: 1 columna */
@media (max-width: 767px) {
    #llista-formacions-properes {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .card-formacio {
        min-height: auto;
    }

    .card-formacio__cap {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-formacio__peu {
        justify-content: stretch;
    }

    .card-formacio__boto {
        width: 100%;
    }
}

/* =========================================================
   CARDS MITJANS / HELPEMPRESA ALS MITJANS
========================================================= */

/* Grid inicial de 3 columnes */
.cards-mitjans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Tablet: 2 columnes */
@media (max-width: 990px) {
    .cards-mitjans {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* Mòbil: 1 columna */
@media (max-width: 755px) {
    .cards-mitjans {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 30px;
    }
}

/* Enllaç targeta complet amb vora i padding */
.cards-mitjans__link {
    border: 1px solid #6f6f6f;
    display: block;
    padding: 20px;
    border-radius: 8px;
}

/* Subratllat en hover del títol i del nom del mitjà */
.cards-mitjans__link h3:hover,
.cards-mitjans__link .cards-mitjans__mitja:hover {
    text-decoration: underline;
}


/* UNDERLINE BUTTONS */

.et_pb_section .et_pb_button {
	text-decoration: none;
}