img.figure__img_logo {
    max-width: 160px;
}
main.main {
    margin-top: 160px;
    overflow: hidden;
}

/* Mega menu desktop layout */
.has-megamenu .megamenu-wrapper {
    padding: 2rem 0;
}

.has-megamenu .megamenu-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 2rem;
    align-items: stretch;
}

.has-megamenu .megamenu-info-column {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    border-right: 1px solid rgba(34, 53, 100, 0.2);
    padding-right: 2rem;
    display: flex;
}

.has-megamenu .megamenu-info-inner {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-end;
    text-align: right;
    width: 100%;
    gap: 0.75rem;
}

.has-megamenu .megamenu-info-label {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    color: #6c7ba4;
    font-weight: 600;
}

.has-megamenu .megamenu-info-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #223564;
    margin: 0;
}

.has-megamenu .megamenu-info-description {
    color: #223564;
    font-size: 0.95rem;
    margin: 0;
}

.has-megamenu .megamenu-info-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    color: #223564;
    text-decoration: none;
}

.has-megamenu .megamenu-info-link:hover {
    text-decoration: underline;
}

.has-megamenu .megamenu-columns {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-left: 1rem;
    text-align: left;
}

.has-megamenu .megamenu-column {
    flex: 0 0 calc(33.333% - 1rem);
}

.has-megamenu .megamenu-column-flat {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.megamenu-columns {
    padding-bottom: 20px;
}
.megamenu-flat-link {
    display: block;
    padding: 0.6rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #223564;
    text-decoration: none;
    border-bottom: 1px solid rgba(34, 53, 100, 0.08);
}

.megamenu-flat-link:last-child {
    border-bottom: none;
}

.megamenu-flat-link:hover {
    color: #1a2a4f;
}

.has-megamenu .megamenu-column-title {
    font-size: 1rem;
    font-weight: 700;
    white-space: normal !important;
    max-width: 90%;
}

@media (max-width: 1199.98px) {
    .has-megamenu .megamenu-column {
        flex: 0 0 calc(50% - 1rem);
    }
}

@media (max-width: 991.98px) {
    .has-megamenu .megamenu-row {
        flex-direction: column;
        gap: 1rem;
    }

    .has-megamenu .megamenu-info-column {
        border-right: 0;
        padding-right: 0;
        display: none;
    }

    .has-megamenu .megamenu-columns {
        padding-left: 0;
        gap: 1rem;
    }

    .has-megamenu .megamenu-column {
        flex: 0 0 100%;
    }
}

@media (min-width: 992px) {
    .has-megamenu.megamenu-no-submenu .megamenu-columns {
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 1rem;
    }

    .has-megamenu.megamenu-no-submenu .megamenu-column {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
        text-align: left !important;
    }
}
.megamenu-column-title a.megamenu-column-title.has-submenu {
    white-space: normal!important;
}
a.page-numbers{ color: #fff!important;}
.articleLoop .card-footer {
    background-color: #fff;
}
body.single-post section.welcome {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    justify-content: center;
    padding-top: 40px;
    flex-direction: column;
    background-size: contain!important;
}
.single-post h1.headline-1 {
    font-size: 3.5rem;
}
section.taxonomy-header {
    background-color: #223564;
}
.taxonomy-header .heroOverlay {
    height: 100%;
    width: 100%;
    opacity: 0.5;
    position: absolute;
    left: 0;
    z-index: 0;
}
section.taxonomy-header h1.headline-1{
    position: relative;
    z-index: 1;
}
section.taxonomy-header .row.no-gutters{
    min-height: 40vh;
}
.col-12.col-lg-6.min-h-40 {
    min-height: 40vh;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
}
.skewRight {
    clip-path: polygon(0 0, 99% 0, 89% 100%, 0% 100%);
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    align-content: center;
}
body.single-myd_progetti h1.headline-1 {
    font-size: 2.5rem;
    padding: 0 2rem;    
}
main.site-main.art-notizia {
    padding-top: 2rem;
}
ul.info {
    padding-left: 0;
    margin-top: 1rem;
}
.breadcrumbs a span {
    color: #223564 !important;
    font-weight: bold;
}
.info li.list-group-item {
    margin-bottom: 1rem;
}
.beneficiariEPaesi {
    font-size: 35px;
    font-weight: bold;
    text-align: right;
    margin-bottom: 2rem;
}
.beneficiariEPaesi i {
    font-size: 40px;
    margin-right: 10px;
}
.beneficiariEPaesi span.text-uppercase {
    display: block;
    width: 100%;
    clear: both;
    font-size: 25px;
    font-weight: normal;
}
.articleLoop .card-body {
    position: relative;
    background-color: rgb(47 64 106);
    width: 100%;
    overflow: hidden;
    text-align: center;
    text-transform: uppercase;
}
.articleLoop .card-header figure {
    height: 250px;
    margin-bottom: 2px;
}
.card .card-header,
.card .card-header figure {
    position: relative;
    overflow: hidden;
}
.card .card-header figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, filter 0.6s ease;
    transform-origin: center center;
}

.organigramma-wrapper,
.organigramma-wrapper .organigramma-title,
.organigramma-wrapper .accordion-button,
.organigramma-wrapper .accordion-body,
.organigramma-wrapper .organigramma-term-description,
.organigramma-wrapper .organigramma-term-description p,
.organigramma-wrapper .organigramma-term-description li,
.organigramma-wrapper .organigramma-term-list-item {
    color: #223564;
}
.organigramma-wrapper,
.organigramma-wrapper .organigramma-title,
.organigramma-wrapper .accordion-button,
.organigramma-wrapper .accordion-body,
.organigramma-wrapper .organigramma-term-description,
.organigramma-wrapper .organigramma-term-list-item {
    text-align: left;
}

.organigramma-wrapper .accordion-button {
    background-color: #fff;
    border: 1px solid rgba(34, 53, 100, 0.2);
    font-weight: 600;
    gap: 0.5rem;
}

.organigramma-wrapper .accordion-button::after {
    flex-shrink: 0;
    width: auto;
    height: auto;
    content: '+';
    font-size: 1.25rem;
    font-weight: 700;
    color: #223564;
    background-image: none;
    transition: transform 0.2s ease, color 0.2s ease;
}

.organigramma-wrapper .accordion-button:not(.collapsed) {
    background-color: #223564;
    color: #fff;
    box-shadow: none;
}

.organigramma-wrapper .accordion-button:not(.collapsed)::after {
    content: '−';
    color: #fff;
}

.timeline-slider {
    width: 100%;
    margin: 2rem auto 3rem auto;
    position: relative;
}

.timeline-track {
    position: relative;
    overflow: hidden;
}

.timeline-slide {
    display: none;
}

.timeline-slide.is-active {
    display: block;
}

.timeline-slide-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: stretch;
    gap: 0;
}

.timeline-slide-media {
    position: relative;
    min-height: 320px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #e9ecef;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.timeline-slide-card {
    position: relative;
    background: #dbd8d6;
    padding: 2.2rem 2rem;
    color: #223564;
    clip-path: polygon(2% 0, 100% 2%, 97% 100%, 0 98%);
    box-shadow: 0 6px 18px rgba(0,0,0,0.14);
    z-index: 2;
    margin-right: -5%;
}

.timeline-slide-title {
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1.1rem;
    color: #223564;
}

.timeline-slide-text {
    color: #223564;
    line-height: 1.7;
}

.timeline-controls-vertical {
    position: absolute;
    right: -3rem;
    top: 77%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    z-index: 3;
    background: #fff;
    padding: 0.6rem 0.75rem;
    clip-path: polygon(8% 0, 100% 5%, 92% 100%, 0 95%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.timeline-nav {
    border: 2px solid #223564;
    color: #223564;
    background: transparent;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: all 0.2s ease;
}

.timeline-nav:hover {
    background: #223564;
    color: #fff;
}

.timeline-progress {
    margin-top: 2rem;
}

.timeline-progress-line {
    position: relative;
    height: 6px;
    background: #c7d3d3;
    border-radius: 999px;
    overflow: visible;
}

.timeline-progress-active {
    position: absolute;
    top: 0;
    left: 0;
    height: 6px;
    background: #223564;
    border-radius: 999px;
    width: 0;
    transition: width 0.25s ease;
}

.timeline-progress-dot {
    position: absolute;
    top: 50%;
    left: 0;
    width: 18px;
    height: 18px;
    background: #223564;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 6px #fff;
    transition: left 0.25s ease;
}

.timeline-labels {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 1rem;
}

.timeline-label {
    flex: 1 1 100%;
    border: none;
    background: transparent;
    color: #c7d3d3;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.35rem 0.5rem;
    text-align: center;
    transition: color 0.2s ease;
}

.timeline-label.is-active {
    color: #223564;
    font-weight: 900;
}

@media (min-width: 576px) {
    .timeline-label { flex: 1 1 33.33%; }
}

@media (min-width: 992px) {
    .timeline-label { flex: 1 1 20%; }
}

@media (max-width: 992px) {
    .timeline-slide-inner {
        grid-template-columns: 1fr;
    }
    .timeline-slide-card {
        margin-right: 0;
        clip-path: none;
        margin-bottom: 1rem;
    }
    .timeline-controls-vertical {
        position: static;
        transform: none;
        justify-content: flex-end;
        margin-top: 1rem;
        clip-path: none;
    }
}
.organigramma-wrapper .accordion-button:focus {
    border-color: #223564;
    box-shadow: 0 0 0 0.25rem rgba(34, 53, 100, 0.2);
}

.organigramma-wrapper .accordion-item {
    border: none;
    margin: 0;
}
.organigramma-wrapper button.accordion-button {
    border-radius: 0 !important;
}
.organigramma-wrapper .accordion-body {
    background-color: #f7f8fb;
}
.card-type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #223564;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    z-index: 5;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.card:hover .card-header figure img {
    transform: scale(1.08);
}
.card:hover .date-badge {
    transform: translateY(-2px);
}
.articleLoop .card-header {
    background-color: #223564;
}
.articleLoop p.card-text {
    min-height: 60px;
    margin-bottom: 0;
    text-transform: lowercase;
    font-size: 1rem;
}
.articleLoop .card-title {
    color: #fff!important;
    font-size: 1rem;
}
.articleLoop .card-footer a {
    color: #223564;
    font-weight: bold;
}
.articleLoop .card-footer a:hover {
    text-decoration: underline;
}
.progetti .card {
    height: 430px;
    max-width: 490px;
    margin: auto;
    margin-bottom: 3rem;
    border: none;    
    position: relative;
    /* overflow: hidden; */
    background-color: #223564;
}
.progetti .card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--card-bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.8s ease;
    transform-origin: center center;
    z-index: 1;
}
.progetti .card > * {
    position: relative;
    z-index: 2;
}
.progetti .card:hover::before {
    transform: scale(1.08);
}
section.greyBg.section-shortcode.container-fluid.pb-5 {
    background-color: #d7d8db;
    padding-top: 20px;    
    padding-left: 0;
    padding-right: 0;
}
body.page-template-page-progetti .progetti .card, 
body.home .progetti .card {
    max-width: 100%;
}
.progetti h3.card-title {
    font-weight: bold;
    color: #fff;
    padding: 20px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
}
.progetti .card-footer {
    text-align: right;
    background: linear-gradient(to left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
}
.progetti .card-text {
    font-weight: bold;
    color: #223564;
    background: linear-gradient(to left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.4) 70%, transparent 100%);
    padding: 5px 10px;
    border-bottom-right-radius: 5px;
    border-top-right-radius: 5px;
}
.progetti .bi-chevron-right::before {
    content: "\f285";
    font-weight: bold !important;
    font-size: 18px;
}
.progetti button.btn.btn-primary.position-relative {
    padding: 15px !important;
    width: 50px;
    text-align: center;
    border-radius: 100px;
    background-color: #fff!important;
    color: #223564!important;
    border: 2px solid #223564!important;
    transition: all 0.3s ease;
}
.progetti .card:hover button.btn.btn-primary.position-relative {
    background-color: #223564!important;
    color: #fff!important;
    border: 2px solid #fff!important;
}
.btn.btn-primary {
    background-color: #223564!important;
    color: #fff!important;
    border-color: transparent!important;
}
section#risorse {
    background-color: #d7d8db !important;
}
section#risorse::before, section#risorse::after {
    background-color: #d7d8db !important;
}
#risorse h2, #risorse h4 {
    color: #223564 !important;
}
img.img-fluid.defaultLogo {
    max-height: 180px;
    object-position: center !important;
    margin: auto;
}
#footer a, #footer span.footer__link{
    color: #223564;
}
#footer a.social__icon {
    color: #223564;
    font-size: 38px;
    margin-right: 15px;
}
.bg-header-image {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    height: 200px;
}
ul.pagination {
    background-color: #223564!important;
    color: #fff;
}
span.page-numbers.current {
    width: 30px;
    display: inline-block;
    background-color: #fff;
    color: #223564;
    text-align: center;
    font-weight: bold;
    border-radius: 5px;
}
a.page-numbers {
    color: #fff !important;
    width: 30px;
    display: inline-block;
    text-align: center;
}
/* Hero Slider Styles */
.hero-slider {
    position: relative;
    height: 65vh;
    overflow: hidden;
    width: 100%;
}

.slider-container {
    position: relative;
    height: 100%;
    width: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3;
}

.slide-content {
    position: relative;
    z-index: 4;
    height: 100%;
    display: flex;
    align-items: center;
    padding-bottom: 100px;
}

.slide-title {
    color: #fff;
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    line-height: 1.2;
}

.slide-subtitle {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    max-width: 600px;
}

.slide-btn {
    display: inline-flex;
    align-items: center;
    background-color: #223564;
    color: #fff !important;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.1rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(34, 53, 100, 0.4);
}

.slide-btn:hover {
    background-color: #1a2a4f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 53, 100, 0.6);
    color: #fff !important;
}

.slide-btn i {
    margin-left: 10px;
    font-size: 1.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
}

/* Elemento grafico bianco con bordo obliquo */
.slider-bottom-element {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: #223564;
    z-index: 5;
    clip-path: polygon(0 85%, 100% 0, 100% 100%, 0% 100%);
}
.slider-bottom-element-inner {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 140px;
    background: #fff;
    z-index: 5;
    clip-path: polygon(0 90%, 100% 0, 100% 100%, 0% 100%);
}

.slider-controls {
    position: absolute;
    bottom: 60px;
    right: 50px;
    display: flex;
    align-items: center;
    gap: 30px;
    z-index: 9;
}

.slider-counter {
    font-size: 1.8rem;
    font-weight: bold;
    color: #223564;
}

.slider-counter .current-slide {
    color: #e74c3c;
}

.slider-navigation {
    display: flex;
    gap: 15px;
}

.slider-prev,
.slider-next {
    width: 50px;
    height: 50px;
    border: 2px solid #223564;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #223564;
}

.slider-prev:hover,
.slider-next:hover {
    background-color: #223564;
    color: #fff;
    transform: scale(1.1);
}

.slider-prev i,
.slider-next i {
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

header.page-header.header-post.mb-4 {
    background-color: #223564;
    color: #fff;
    padding-bottom: 2rem;
}
.breadcrumbs a span {
    color: #fff;
}
section.bluBg.pb-4.pt-4 {
    background-color: #223564;
}
.category section.bluBg.pt-5 {
    background-color: #223564 !important;
}
section.bluBg h1{
    color: #fff!important;
}
.page-template-page-bilanci header.page-header.header-post.mb-4,
.tax-progetti header.page-header.header-post.mb-4{
    padding-bottom: 0;
}
.card-footer {
    text-align: center;
}
.card-footer a.btn.btn-secondary {
    background-color: #223564;
}
.single .welcome{
    height: 60vh;  
}
.single .heroOverlay {
    height: 60vh;
    display: block;
    position: absolute;
    width: 100%;
    z-index: 1;
    margin-top: 0;
    top: 160px;
}
.single .welcome .container {
    z-index: 5;
    display: block;
    position: relative;
}
h1.headline-1 {
    color: #fff!important;
}
button.btn.bg-primary.text-white {
    background-color: #223564 !important;
    opacity: 1;
    transition: all .3s ease-in-out;
}
button.btn.bg-primary.text-white:hover{
    opacity: .6;
}
section.greyBg.section-shortcode.container-fluid::before {
    top: -45px;
    clip-path: polygon(-60% -100%, -100% 85%, 65% 95%);
    background-color: #d7d8db !important;
    content: '';
    position: relative;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    height: 30px;
    z-index: 15;
    display: block;
}
/* Responsive Design */
@media (max-width: 1200px) {
    .slide-title {
        font-size: 3rem;
    }
    
    .slide-subtitle {
        font-size: 1.2rem;
    }
}

@media (max-width: 992px) {
    .hero-slider {
        height: 90vh;
    }
    .slide-content {
        position: relative;
        z-index: 4;
        height: 100%;
        display: flex;
        align-items: center;
        padding-bottom: 0px;
        padding-top: 0px;
    }    
    .progetti .card-footer {
        bottom: -36px!important;   
        left: 20px;     
    }
    .slide-title {
        font-size: 2.5rem;
    }
    
    .slide-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .slider-controls {
        right: 30px;
        bottom: 20px;
    }
    .slider-bottom-element-inner{
        height: 78px;
    }
    .slider-bottom-element {
        height: 84px;
    }
    .slider-counter {
        font-size: 1.5rem;
    }
    
    .slider-prev,
    .slider-next {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 768px) {
    .single-post h1.headline-1 {
        font-size: 2rem;
    }
    .single .heroOverlay {
        top: 80px;
    }
    .col-12.col-lg-6.skewRight{
        min-height: 45vh;
        clip-path: polygon(0 0, 99% 0, 100% 91%, 0% 100%);
    }
    .beneficiariEPaesi {
        text-align: center;
        margin: auto;
        margin-bottom: 2rem;
    }
    .contesto {
        text-align: center;
        margin-bottom: 3rem;
    }
    .obiettivi .col-12.alert.alert-info.p-5.mb-5 {
        max-width: 90%;
        margin: auto;
    }
    .col-12.col-lg-6.min-h-40 {
        min-height: auto;
        display: flex;
        flex-wrap: wrap;
        align-content: center;
    }
    .hero-slider {
        height: 60vh;
    }
    main.main {
        margin-top: 80px;
    }
    .slide-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .slide-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .slide-btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .slider-bottom-element {
        height: 84px;
        background-color: #fff;
    }
    
    .slider-controls {
        right: 20px;
        bottom: 15px;
        gap: 20px;
    }
    
    .slider-counter {
        font-size: 1.3rem;
    }
    
    .slider-prev,
    .slider-next {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 576px) {
    .slide-title {
        font-size: 1.8rem;
    }
    
    .slide-subtitle {
        font-size: 0.9rem;
    }
    
    .slide-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}
.numbers-block-wrapper .block-item h3 {
    font-weight: bold;
    font-size: 4rem;
}
.block-item small {
    font-size: 1.5rem;
}
.numbers-block-wrapper .block-item{
    margin-bottom: 2rem;
}
section.bluBg.section-shortcode.container-fluid,
section.bluBg {
    background-color: #223564!important;
    position: relative;
}
h2 {
    text-transform: uppercase;
    font-weight: bold;
}
#risorse h2 {
    margin-bottom: 2rem;
}
section.bluBg.section-shortcode.container-fluid::before,
section.bluBg.section-shortcode.container-fluid::after,
section.bluBg::before,
section.bluBg::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 30px;
    background-color: #223564;
    z-index: 15;
}

section.bluBg.section-shortcode.container-fluid::before, section.bluBg::before {
    top: -85px;
    clip-path: polygon(0% 100%, 100% 0%, 100% 95%);
    height: 100px;
}
section.bluBg.img-loaded::before{
    display: none;
}
section.bluBg.img-loaded::after{
    bottom: -29px;
}
section.bluBg.pt-5.img-loaded {
    height: 260px;
    background-position: center;
}
section.bluBg.section-shortcode.container-fluid::after,
section.bluBg::after {
    bottom: -15px;
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}

section.bluBg.section-shortcode.container-fluid > *,
section.bluBg > * {
    position: relative;
    z-index: 2;
}
section.bluBg.section-shortcode.container-fluid h2, 
section.bluBg.section-shortcode.container-fluid h3, 
section.bluBg.section-shortcode.container-fluid h4, 
section.bluBg.section-shortcode.container-fluid h5, 
section.bluBg.section-shortcode.container-fluid p,
section.bluBg.section-shortcode.container-fluid p a,
section.bluBg.section-shortcode.container-fluid small,
section.bluBg.section-columns h2, 
section.bluBg.section-columns h3, 
section.bluBg.section-columns h4, 
section.bluBg.section-columns h5, 
section.bluBg.section-columns p,
section.bluBg.section-columns p a {
    color: #fff!important;
}
section.bluBg.section-shortcode.container-fluid .card-body {
    background-color: #fff;
}
.card-body button {
    background-color: #223564;
    color: #fff;
    border-color: transparent;
}
#footer{
    padding-top: 0;
    padding-bottom: 0;
    border-top: none;
}
#footer .row-main {
    padding-top: 2rem;
    padding-bottom: 2rem;
}
#footer .row-copy {
    padding-top: 2rem;
    padding-bottom: 2rem;
}
/* Stili per il grafico a ciambella delle risorse */
.risorse-chart-container {
    margin: 2rem 0;
    padding: 1rem;
    background-color: transparent;
    border-radius: 10px;
    /* box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); */
}
section#risorse::after {
    clip-path: polygon(-15% 100%, 60% 15%, 112% 99%);
    background-color: #fff !important;
    height: 80px;
    bottom: -3px;
}
.risorse-chart-container canvas {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}
li.btn-dona a {
    background-color: #223564 !important;
    padding: 10px !important;
    color: #fff !important;
    border-radius: 5px;
    border: 2px solid #223564;
}
li.btn-dona a:hover {
    background-color: #fff !important;
    color: #223564 !important;
}
.footer__link {
    font-weight: normal!important;
}
a.footer__link {
    font-weight: 700!important;
}
.chart-legend {
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0px;
    margin-bottom: 1rem;
    clip-path: polygon(9% 0, 100% 0%, 87% 100%, 0% 100%);
}

.chart-legend-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    pointer-events: none;
}

.legend-item:hover {
    background-color: rgba(34, 53, 100, 0.05);
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.legend-content {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.legend-label {
    font-weight: 600;
    color: #223564;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.legend-value {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}
header#header a.header__label {
    color: #fff !important;
}
.header__top_menu {
    width: 100%;
}
ul#top-menu {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    height: 30px;
}
#top-menu a {
    color: #fff !important;
}
button.btn.btn-dark.h-auto {
    background-color: #223564;
}
.search-results .bluBg h2 {
    color: #fff;
}
.search-results h3 {
    font-size: 20px;
    font-weight: bold;
}
.search-results h4.tx-14.cl-secondary {
    font-size: 16px;
}
.search-results .badge.btn-dark {
    background-color: transparent;
    border: 1px solid #223564;
    color: #223564;
}
.search-results .btn-dark {
    background: #223564;
    color: #ffffff;
}
.page-bilancio .entry-content .card {
    background-color: #223564;
    color: #fff;
}
.page-bilancio .entry-content .card .card-footer .card-text {    
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 20px !important;
    min-height: auto;
}
.page-bilancio .entry-content .card .card-footer {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    height: 70px;
}
/* Responsive design per il grafico */
@media (max-width: 768px) {
    .risorse-chart-container .row {
        flex-direction: column-reverse;
    }
    
    .risorse-chart-container .col-md-4,
    .risorse-chart-container .col-md-8 {
        width: 100%;
        max-width: 100%;
    }
    
    .chart-legend {
        margin-bottom: 1.5rem;
    }
    
    .chart-legend-items {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .legend-item {
        flex: 1;
        min-width: 150px;
        max-width: 200px;
    }
}

@media (max-width: 576px) {
    .risorse-chart-container {
        margin: 1rem 0;
        padding: 0.75rem;
    }
    
    .legend-item {
        min-width: 120px;
        max-width: 100%;
    }
    
    .legend-label {
        font-size: 0.9rem;
    }
    
    .legend-value {
        font-size: 0.8rem;
    }
}

.carousel-item p.card-text {
    display: none;
}
/* Badge data per le news di Sant'Egidio */
.date-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(34, 53, 100, 0.9);
    color: #fff;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    z-index: 10;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    min-width: 80px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.date-badge:hover {
    background-color: rgba(34, 53, 100, 1);
    transform: scale(1.05);
    transition: all 0.3s ease;
}
h3.text-center.text-uppercase.squareBackground {
    background-color: #d7d8db;
    display: inline-block;
    margin: auto;
    padding: 18px 20px;
    clip-path: polygon(-60% 50%, 98% 10%, 95% 178%);
    height: 60px;
    font-weight: bold;
}
h3.text-center.text-uppercase.squareBackground.testClass {
    display: block;
}
body.dev.home #footer .row-main {
    background-color: #fff !important;
}
/* Responsive per il badge */
@media (max-width: 768px) {
    .date-badge {
        font-size: 0.7rem;
        padding: 4px 8px;
        min-width: 70px;
    }
}

@media (max-width: 576px) {
    .date-badge {
        font-size: 0.65rem;
        padding: 3px 6px;
        min-width: 60px;
        top: 8px;
        right: 8px;
    }
}

/* Carousel per le news di Sant'Egidio */
.santegidio-carousel {
    position: relative;
    margin-bottom: 2rem;
    overflow: hidden;
    padding: 0 60px; /* Spazio per le frecce */
}

.santegidio-carousel .carousel-item {
    padding: 0 10px;
}

/* Ripristina lo stile originale delle card */
.santegidio-carousel .card {
    background-color: #fff;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.santegidio-carousel .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.santegidio-carousel .card-header {
    background-color: #223564;
    border: none;
    position: relative;
    padding: 0;
}

.santegidio-carousel .card-header figure {
    height: 250px;
    margin-bottom: 0;
    overflow: hidden;
}

.santegidio-carousel .card-header figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.santegidio-carousel .card-body {
    position: relative;
    background-color: rgb(34 53 100);
    width: 100%;
    overflow: hidden;
    padding: 10px 15px;
    text-align: center;
}

.santegidio-carousel .card-title {
    color: #fff !important;
    font-size: 1rem;
    margin-bottom: 0;
    line-height: 1.2;
    text-transform: uppercase;
}

.santegidio-carousel .card-footer {
    background-color: #fff;
    border: none;
    padding: 15px;
    text-align: center;
}

.santegidio-carousel .card-footer a {
    color: #223564;
    text-decoration: none;
    font-weight: 600;
}

.santegidio-carousel .card-footer a:hover {
    text-decoration: underline;
}

/* Stili per i controlli nativi di Slick.js */
.santegidio-carousel .slick-prev,
.santegidio-carousel .slick-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(34, 53, 100, 0.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 21;
}

.santegidio-carousel .slick-prev {
    left: 10px;
}

.santegidio-carousel .slick-next {
    right: 10px;
}

.santegidio-carousel .slick-prev:hover,
.santegidio-carousel .slick-next:hover {
    background-color: rgba(34, 53, 100, 1);
    transform: translateY(-50%) scale(1.1);
}

.list-group-item a span, .allegati a {
    color: #fff;
}
.category-news .articleLoop .card {
    border: none;
}
.category-news .articleLoop .card-body,
.category-news .articleLoop .card-footer {
    text-align: left !important;
}
.category-news .articleLoop .card-footer {
    padding-left: 0 !important;
}
section.bluBg.no-pseudo::after {
    bottom: -30px;
    transform: rotate(358deg);
    background-color: #ffffff;
    display: none;
}
section.bluBg.no-pseudo::before{
    display: none;
}
.no-pseudo .col-12.col-lg-4 {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
/* Rimuove completamente il testo di default di Slick.js */
.santegidio-carousel .slick-prev:before,
.santegidio-carousel .slick-next:before {
    content: '' !important;
    font-family: 'bootstrap-icons' !important;
    font-size: 1.5rem !important;
    line-height: 1 !important;
    color: #fff !important;
    opacity: 1 !important;
    text-indent: 0 !important;
    text-align: center !important;
}

/* Aggiunge le icone Bootstrap */
.santegidio-carousel .slick-prev:before {
    content: '\F284' !important; /* bi-chevron-left */
}

.santegidio-carousel .slick-next:before {
    content: '\F285' !important; /* bi-chevron-right */
}

/* Responsive per il carousel */
@media (max-width: 768px) {
    .santegidio-carousel {
        padding: 0 50px;
    }
    
    .santegidio-carousel .slick-prev,
    .santegidio-carousel .slick-next {
        width: 40px;
        height: 40px;
    }
    
    .santegidio-carousel .slick-prev {
        left: 0;
    }
    
    .santegidio-carousel .slick-next {
        right: 0;
    }
    
    .santegidio-carousel .slick-prev:before,
    .santegidio-carousel .slick-next:before {
        font-size: 1.2rem !important;
    }
}
.slick-slide .carousel-item {
    opacity: 0;
}
.slick-slide.slick-active .carousel-item {
    opacity: 1;
}
p.card-text {
    font-size: 16px;
}
@media (max-width: 576px) {
    .santegidio-carousel {
        padding: 0 45px;
    }
    
    .santegidio-carousel .slick-prev,
    .santegidio-carousel .slick-next {
        width: 35px;
        height: 35px;
    }
    
    .santegidio-carousel .slick-prev {
        left: 0;
    }
    
    .santegidio-carousel .slick-next {
        right: 0;
    }
    
    .santegidio-carousel .slick-prev:before,
    .santegidio-carousel .slick-next:before {
        font-size: 1rem !important;
    }
}

/* CSS specifico per Slick.js quando inizializzato */

.santegidio-carousel.slick-initialized .slick-track {
    display: flex;
    align-items: stretch;
}

.santegidio-carousel.slick-initialized .slick-slide {
    height: auto;
}

.santegidio-carousel.slick-initialized .slick-slide > div {
    height: 100%;
}

#footer .row-main {
    clip-path: polygon(0 0%, 100% 9%, 100% 100%, 0% 100%);
}

.progetti header h3.card-title {
    position: absolute;
    top: 310px;
    background: #223564;
    padding-bottom: 40px;
}
.progetti .card-footer {
    text-align: right;
    background: #fff;
    position: absolute;
    bottom: -35px;
    right: 0;
}
li.organigramma-term-list-item {
    padding: 5px 0;
    margin-bottom: 5px;
    border-bottom: 1px solid #223564;
}
ul.organigramma-term-list.list-unstyled.mb-3 {
    margin-bottom: 30px !important;
}
h3.text-uppercase.organigramma-title.mb-4.text-start {
    background-color: #223564;
    padding: 20px 20px;
    margin-bottom: 0 !important;
    color: #fff;
}