/* ============================================================
   FUNDED PROJECTS — solo stili non coperti da app.css
   Usa .list-funded-projects come scope, come fa .list-company
   ============================================================ */

/* img-cover dentro screen-small ha bisogno di width/height */
.fundedProjects .screen-small img.img-cover {
    width: 100%;
    height: 100%;
}

/* ---- Card wrapper ---- */
.list-funded-projects .post-highlighted {

    padding-bottom: 20px;

}
.list-funded-projects .post-highlighted .post-highlighted-text--wrapper {
    width: 100%;
    margin: 0;
    padding: 30px 0;
    background: transparent;
    display: flex;
    flex-direction: column;
}

/* ---- Riga header: short name a sinistra, logo a destra ---- */
.fp-header-row {
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}
.fp-header-row .header-section {
    margin-bottom: 0;
    flex: 1;
}

/* ---- Logo progetto — nella stessa riga dello short name ---- */
.fp-project-logo {
    flex-shrink: 0;
    width: 190px;
    text-align: right;
}
.fp-project-logo img {
    max-width: 100%;
    max-height: 90px;
    object-fit: contain;
}

/* ---- Nome lungo sotto il titolo ---- */
.fp-long-name {
    font-size: 20px;
    line-height: 30px;
    color: #222222;
    margin: 10px 0 10px;

}

/* ---- Beneficiario ---- */
.fp-beneficiary {
    font-size: 16px;
    margin: 0 0 10px;
    color: #474647;
}
.fp-beneficiary strong {
    font-family: "Inter Bold";
}

/* ---- Durata — verde uppercase ---- */
.fp-duration {
    font-size: 16px;
    text-transform: uppercase;
    margin: 0 0 10px;
}

/* ---- Riga link + tags ---- */
.fp-bar {
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 8px;
    row-gap: 6px;
}
.fp-links {
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
}
.fp-links > span {
    font-size: 14px;

}

/* Icone link circolari */
.fp-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #bbbbbb;
    color: #474647;
    text-decoration: none;
    flex-shrink: 0;
    transition: border-color 0.2s, color 0.2s;
}
.fp-icon-link:hover {
    border-color: #069782;
    color: #069782;
}
.fp-icon-link--text {
    width: auto;
    padding: 0 10px;
    border-radius: 14px;
    font-size: 12px;
}
.order-results{
	margin-right:20px;
}

/* Tags ambito a destra */
.fp-tags {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.fp-tag {
    font-family: "Inter Bold";
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #474647;
}

/* ---- Descrizione collassabile ---- */
.fp-description-wrap {
    font-size: 18px;
    line-height: 28px;
    color: #474647;
    margin: 0 0 24px;
}

.fp-description.is-open {
    max-height: 4000px;
}
.fp-description p { margin: 0 0 10px; }

/* Partners — hidden until open */
.fp-partners {
    margin-top: 16px;
}
.fp-partners ul {
    list-style: disc;
    margin: 6px 0 0 20px;
    padding: 0;
}
.fp-partners ul li { margin-bottom: 4px; }
.fp-partners ul li a { color: #069782; text-decoration: none; }
.fp-partners ul li a:hover { text-decoration: underline; }

/* Bottone more/less — centrato con linea, come nel mockup */
.fp-toggle-row {
    text-align: center;
        display: flex;
        justify-content: center;
    margin-top: 14px;
	margin-bottom: 14px;
    padding-top: 0;
    position: relative;
}
.fp-toggle {
    position: relative;

        display: flex;
    background: #ffffff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #474647;
    padding: 0 14px;
    font-family: "Inter Medium", sans-serif;
}
.fp-toggle:hover { color: #069782; }
.fp-toggle .fp-less { display: none; }
.fp-toggle .fp-more { display: inline; }
.fp-toggle[aria-expanded="true"] .fp-more { display: none; }
.fp-toggle[aria-expanded="true"] .fp-less  { display: inline; }

/* ---- Finanziatori ---- */
.fp-funders {
    margin-top: 20px;
    padding-top: 16px;
}
/* ----
.fp-thanks {
    font-size: 13px;
    color: #474647;
    line-height: 1.6;
    margin-bottom: 16px;
} ---- */
.fp-thanks {
	margin-bottom: 30px;
}
.fp-funder-logos {
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.fp-funder-logos img {
    max-height: 150px;
	min-height: 150px;
    max-width: calc(100% / 4);
	object-fit: contain;
}

/* ---- Logo progetto ---- */
.fp-project-logo {
    flex-shrink: 0;
    width: 190px;
    padding-top: 20px;
    text-align: right;
}
.fp-project-logo img {
    max-width: 100%;
    max-height: 90px;
    object-fit: contain;
}

/* ---- Filtri: label "Filter by" visibile (non hidden) ---- */
.fundedProjects .search-content-type .content-type > span {
    display: inline-block;
    font-size: 14px;
    font-family: "Inter Bold";
    text-transform: uppercase;
    margin-right: 20px;
    color: #474647;
    white-space: nowrap;
}
.fp-toggle[aria-expanded="true"] .fp-chevron {
    transform: rotate(180deg);
}
/* Dropdown Show projects: il label "Show projects:" a sinistra del select */
.fundedProjects .search-content-type .order-results > span {
    font-size: 14px;
    font-family: "Inter Bold";
    text-transform: uppercase;
    color: #474647;
    margin-right: 8px;
    white-space: nowrap;
}

/* ---- Stato vuoto ---- */
.fp-empty {
    padding: 60px 0;
    text-align: center;
    color: #888;
    font-size: 18px;
}
.list-funded-projects .post-highlighted {

    padding-bottom: 20px;
    position: relative;
}

.list-funded-projects .post-highlighted::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    width: 50%;
    height: 2px;
    background-color: #069782;
    display: none;
}

.list-funded-projects .post-highlighted:has(.fp-toggle[aria-expanded="true"])::after {
    display: block;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media screen and (max-width: 991px) {
	#page-funded-projects .search-content-type .search-content-type--wrapper .content-type > span::after{
	        margin-left: 10px;
	}
	#page-funded-projects .search-content-type .search-content-type--wrapper .order-results{
		display:flex;
	}

    .list-funded-projects .post-highlighted:has(.fp-project-logo) .post-highlighted-text--wrapper {
        width: 100%;
    }
    .list-funded-projects .post-highlighted .post-highlighted--wrapper {
        flex-direction: column;
    }
    .fp-project-logo {
        width: 100%;
        text-align: left;
        padding-top: 0;
        margin-bottom: 16px;
    }
    .fp-project-logo img {
        max-height: 70px;
    }
}

@media screen and (max-width: 767px) {
    .list-funded-projects .post-highlighted {
        padding-top: 28px;
    }
    .fp-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .fp-tags {
        justify-content: flex-start;
    }
    .fp-description-wrap {
        font-size: 16px;
        line-height: 24px;
    }

    .fp-funder-logos img {
        max-height: 100px;
        max-width: 150px;
    }
	.fp-header-row{
		flex-direction: column;
		
	}
	.fp-project-logo{
		width: 50%;
		margin-top: 40px;
	}
	
}
