/**handles:cfp-styles**/
/**
 * Frontend styles for Crowdfunding Projects
 * Enhanced version inspired by the old carousel
 */

:root {
    --cfp-accent: #125B2C;
    --cfp-accent-alt: #569817;
    --cfp-strongest-text: #073D30;
    --cfp-strong-text: #2D4A3D;
    --cfp-medium-text: #4A6B57;
    --cfp-subtle-bg: #5A7865;
    --cfp-lighter-bg: #F8FCF9;
    --cfp-white: #FFFFFF;
    --cfp-status-active: #569817;
    --cfp-status-in-progress: #1e7e34;
    --cfp-status-completed: #125B2C;
    --cfp-status-paused: #d68c23;
    --cfp-status-cancelled: #c44d56;
}

/* Common Styles */
.cfp-linked-project {
    background: var(--cfp-lighter-bg);
    padding: 20px;
    margin: 30px 0;
    border-left: 4px solid var(--cfp-accent);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cfp-linked-project h4 {
    margin-top: 0;
    color: var(--cfp-strongest-text);
    font-size: 18px;
    font-weight: 600;
}

.cfp-status-active {
    color: var(--cfp-status-active);
}

.cfp-status-in_progress {
    color: var(--cfp-status-in-progress);
}

.cfp-status-completed {
    color: var(--cfp-status-completed);
}

.cfp-status-paused {
    color: var(--cfp-status-paused);
}

.cfp-status-cancelled {
    color: var(--cfp-status-cancelled);
}

/* Project Details Box - Enhanced */
.cfp-project-details {
    /*margin: 30px 0;*/
    padding: 25px;
   /* background: var(--cfp-lighter-bg);*/
    /*border: 1px solid #e0e0e0;*/
    border-radius: 12px;
   /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);*/
}

.cfp-project-details h3 {
    margin-top: 0;
    color: var(--cfp-strongest-text);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    text-align: center;
}

.cfp-project-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.cfp-detail-item {
    background: var(--cfp-white);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #eee;
}


.cfp-detail-item strong {
    color: var(--cfp-medium-text);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    display: block;
    margin: 0;
}

.cfp-detail-item span {
    font-size: 18px;
    color: var(--cfp-strong-text);
    font-weight: 700;
    line-height: 1.2;
}

.cfp-detail-item.cfp-raised span {
    color: var(--cfp-status-active);
}

.cfp-detail-item.cfp-goal span {
    color: var(--cfp-accent);
}

/* Progress Bar - Enhanced */
.cfp-progress-wrapper {
    margin-top: 25px;
    background: var(--cfp-white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.cfp-progress-bar {
    background: #e5e7eb;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.cfp-progress-fill {
    background: linear-gradient(90deg, var(--cfp-accent) 0%, var(--cfp-status-active) 50%, #569817 100%);
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 6px;
}

.cfp-progress-info {
    margin: 12px 0 0 0;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--cfp-strong-text);
}

.cfp-progress-info strong {
    color: var(--cfp-status-active);
    font-size: 18px;
}

/* Shortcode fallback styles */
.cfp-progress-simple .cfp-fallback {
    text-align: center;
    font-style: italic;
    color: var(--cfp-strong-text);
    margin: 8px 0;
}

.cfp-progress-simple .cfp-fallback-note {
    text-align: center;
    color: var(--cfp-medium-text);
    font-size: 14px;
    margin-top: 4px;
}

/* Project Updates - Enhanced */
.cfp-project-updates {
    margin-top: 40px;
}

.cfp-project-updates h3 {
    font-size: 22px;
    color: var(--cfp-strongest-text);
    font-weight: 700;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
}

.cfp-project-updates h3 span {
    margin-right: 10px;
}

/* Inline icon used in headings/meta */
.cfp-inline-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
}

.cfp-updates-list {
    display: grid;
    gap: 25px;
}

.cfp-update-item {
    background: var(--cfp-white);
    border: 1px solid #eaeef5;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cfp-update-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.cfp-update-content {
    display: flex;
    gap: 0; /* remove gap to eliminate white space */
    flex-wrap: wrap;
    align-items: stretch; /* keep equal height between image and text */
    min-height: 200px; /* ensure minimum height for consistency */
}

.cfp-update-image {
    flex: 0 0 220px;
    display: flex; /* make image container flex */
}

.cfp-update-image img {
    width: 100%;
    height: 100%; /* fill entire container height */
    object-fit: cover;
    border-radius: 12px 0 0 12px;
}

.cfp-update-text {
    flex: 1;
    padding: 20px 20px 20px 25px; /* add left padding to compensate for removed gap */
    min-width: 280px;
    display: flex;
    flex-direction: column;
}

.cfp-update-text h4 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
}

.cfp-update-text h4 a {
    text-decoration: none;
    color: var(--cfp-strongest-text);
    transition: color 0.2s ease;
}

.cfp-update-text h4 a:hover {
    color: var(--cfp-accent);
}

.cfp-update-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--cfp-medium-text);
}

.cfp-update-excerpt {
    color: var(--cfp-strong-text);
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 15px;
}

.cfp-read-more {
    display: inline-flex;
    align-items: center;
    color: var(--cfp-accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
    margin-top: auto; /* push read more to bottom to avoid white line mismatch */
}

.cfp-read-more span {
    margin-left: 6px;
    transition: transform 0.2s ease;
}

.cfp-read-more:hover {
    color: var(--cfp-accent-alt);
}

.cfp-read-more:hover span {
    transform: translateX(4px);
}

.cfp-view-all-updates {
    text-align: center;
    margin-top: 30px;
}

.cfp-button {
    display: inline-block;
    padding: 12px 30px;
    background: var(--cfp-accent);
    color: var(--cfp-white);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(18, 91, 44, 0.3);
}

.cfp-button:hover {
    background: var(--cfp-accent-alt);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(18, 91, 44, 0.4);
}

/* Project List Shortcode - Enhanced */
.cfp-projects-list {
    display: grid;
    gap: 25px;
}

.cfp-project-item {
    margin-bottom: 25px;
    padding: 25px;
    border: 1px solid #eaeef5;
    border-radius: 12px;
    background: var(--cfp-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cfp-project-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.cfp-project-item h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 700;
}

.cfp-project-item h3 a {
    color: var(--cfp-strongest-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.cfp-project-item h3 a:hover {
    color: var(--cfp-accent);
}

.cfp-project-meta {
    color: var(--cfp-medium-text);
    margin: 10px 0;
    font-size: 15px;
}

.cfp-separator {
    margin: 0 10px;
}

.cfp-project-excerpt {
    margin: 18px 0;
    color: var(--cfp-strong-text);
    font-size: 15px;
    line-height: 1.6;
}

.cfp-project-progress {
    margin: 15px 0;
}

.cfp-progress-stats {
    display: flex;
    justify-content: center;
    margin-top: 8px;
    font-size: 13px;
    color: var(--cfp-medium-text);
    text-align: center;
    width: 100%;
}

/* Specifico per Project Details desktop */
.cfp-progress-wrapper .cfp-progress-percentage {
    text-align: center;
    width: 100%;
    display: block;
}

/* Stili specifici per il carosello */
.cfp-carousel-wrapper {
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
}

/* Sezione progresso nel carosello */
.cfp-progress-section {
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
   /* min-height: 200px;
    padding: 15px 0;*/
}

.cfp-progress-section .cfp-progress-bar,
.cfp-carousel-wrapper .cfp-progress-bar {
    width: 100%;
    margin: 10px 0;
    height: 12px;
    flex-shrink: 0;
}

.cfp-carousel-raised,
.cfp-carousel-percent {
    display: flex;
    justify-content: center;
    margin: 8px 0;
    font-size: 16px;
    color: var(--cfp-medium-text);
    text-align: center;
    width: 100%;
    font-weight: 600;
    flex-grow: 1;
    align-items: center;
}



.cfp-carousel-raised {
    margin-top: 0;
    margin-bottom: 8px;
}

.cfp-carousel-percent {
    margin-top: 8px;
    margin-bottom: 0;
    font-size: 18px;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cfp-percentage {
    font-weight: 700;
    color: var(--cfp-status-active);
}

.cfp-donors-count {
    margin: 5px 0 0 0;
    font-size: 13px;
    color: var(--cfp-medium-text);
}

.cfp-project-recent-updates {
    margin-top: 15px;
}

.cfp-project-recent-updates h5 {
    margin: 0 0 10px 0;
    color: var(--cfp-medium-text);
    font-size: 15px;
    font-weight: 600;
}

.cfp-update-link {
    margin: 6px 0;
    padding: 10px;
    background: var(--cfp-lighter-bg);
    border-radius: 6px;
    transition: background 0.2s ease;
}

.cfp-update-link:hover {
    background: #f0f6f1;
}

.cfp-update-link a {
    font-size: 14px;
    color: var(--cfp-accent);
    text-decoration: none;
    font-weight: 500;
}

.cfp-update-date {
    color: var(--cfp-medium-text);
    font-size: 12px;
    margin-left: 10px;
}

/* Project Info Shortcode - Enhanced */
.cfp-project-info {
    padding: 20px;
    background: var(--cfp-lighter-bg);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cfp-project-details-simple {
    margin-bottom: 18px;
}

.cfp-update-preview {
    margin: 10px 0;
    padding: 12px;
    background: #f0f4f8;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.cfp-update-preview:hover {
    background: #e8f2f5;
}

.cfp-update-preview a {
    color: var(--cfp-accent);
    text-decoration: none;
    font-weight: 600;
}

/* Carousel Styles - MASSIVELY ENHANCED */
.cfp-carousel-wrapper {
    position: relative;
    max-width: 100%;
    margin: 40px auto;
    overflow: hidden;
    padding: 0 80px;
    cursor: grab;
}

.cfp-carousel-wrapper:active {
    cursor: grabbing;
}

.cfp-carousel {
    display: flex;
    transition: transform 0.5s ease;
    gap: 25px;
    align-items: stretch;
    user-select: none; /* Previene selezione testo durante drag */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Modalità statica - disabilita il comportamento carousel */
.cfp-static {
    cursor: default !important;
    padding: 0 20px;
}

.cfp-static:active {
    cursor: default !important;
}

.cfp-static .cfp-carousel {
    flex-wrap: wrap;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    transform: none !important;
    transition: none;
}

.cfp-card {
    flex: 0 0 calc(33.333% - 17px);
    background: var(--cfp-white);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 520px;
    border: 1px solid #eaeef5;
}

/* Vista a 2 colonne */
.cfp-columns-2 .cfp-card {
    flex: 0 0 calc(50% - 12.5px);
}

/* Media query per mobile - forza sempre 1 colonna */
@media (max-width: 768px) {
    .cfp-card,
    .cfp-columns-2 .cfp-card,
    .cfp-columns-3 .cfp-card {
        flex: 0 0 100% !important;
    }
    
    .cfp-carousel-wrapper {
        padding: 0 40px; /* Riduci padding laterale su mobile */
    }
    
    /* Nascondi le frecce di navigazione su mobile */
    .cfp-nav {
        display: none !important;
    }
}

.cfp-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.cfp-image {
    width: 100%;
    height: 220px;
    background: var(--cfp-lighter-bg);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.cfp-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cfp-card:hover .cfp-image img {
    transform: scale(1.05);
}

.cfp-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--cfp-lighter-bg) 0%, #e0e8f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cfp-image-placeholder::before {
    content: "💝";
    font-size: 48px;
    opacity: 0.4;
}

.cfp-country-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cfp-strong-text);
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.cfp-status-badge {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.cfp-status-badge.active:before,
.cfp-status-badge.in_progress:before,
.cfp-status-badge.completed:before,
.cfp-status-badge.paused:before,
.cfp-status-badge.cancelled:before {
    content: "●";
    font-size: 10px;
}

.cfp-status-badge.active {
    color: var(--cfp-status-active);
}

.cfp-status-badge.active:before {
    color: var(--cfp-status-active);
}

.cfp-status-badge.in_progress {
    color: var(--cfp-status-in-progress);
}

.cfp-status-badge.in_progress:before {
    color: var(--cfp-status-in-progress);
}

.cfp-status-badge.completed {
    color: var(--cfp-status-completed);
}

.cfp-status-badge.completed:before {
    color: var(--cfp-status-completed);
}

.cfp-status-badge.paused {
    color: var(--cfp-status-paused);
}

.cfp-status-badge.paused:before {
    color: var(--cfp-status-paused);
}

.cfp-status-badge.cancelled {
    color: var(--cfp-status-cancelled);
}

.cfp-status-badge.cancelled:before {
    color: var(--cfp-status-cancelled);
}

.cfp-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cfp-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.3;
    color: var(--cfp-strongest-text);
    min-height: 58px;
}

.cfp-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cfp-title a:hover {
    color: var(--cfp-accent);
}

.cfp-excerpt {
    font-size: 15px;
    color: var(--cfp-strong-text);
    line-height: 1.6;
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 72px;
    flex-grow: 1;
}

.cfp-goal-section {
    margin-bottom: 20px;
    margin-top: auto;
}

.cfp-goal-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.cfp-goal-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--cfp-medium-text);
}

.cfp-goal-amount {
    font-size: 20px;
    font-weight: 700;
    color: var(--cfp-strongest-text);
}

.cfp-progress-wrapper {
    margin: 15px 0 10px 0;
    min-height: 60px;
}

.cfp-progress-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 14px;
    color: var(--cfp-medium-text);
    margin-top: 8px;
    text-align: center;
}

.cfp-progress-amount {
    font-weight: 600;
    color: var(--cfp-strong-text);
}

.cfp-raised {
    color: var(--cfp-status-active);
    font-weight: 600;
}

.cfp-donors-info {
    margin-top: 8px;
    font-size: 13px;
    color: var(--cfp-medium-text);
    text-align: center;
}

.cfp-completed-section {
    margin-bottom: 20px;
    margin-top: auto;
    text-align: center;
    padding: 30px 20px;
    background: var(--cfp-lighter-bg);
    border-radius: 12px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.cfp-completed-amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--cfp-status-completed);
    margin-bottom: 10px;
}

.cfp-completed-text {
    font-size: 18px;
    color: var(--cfp-strong-text);
    font-weight: 600;
}

.cfp-cta {
    display: block;
    width: 100%;
    padding: 14px 25px;
    background: linear-gradient(90deg, var(--cfp-accent) 0%, var(--cfp-accent-alt) 100%);
    color: var(--cfp-white);
    text-align: center;
    text-decoration: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 20px;
    box-shadow: 0 4px 8px rgba(18, 91, 44, 0.3);
}

.cfp-cta::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}

.cfp-cta:hover {
    background: linear-gradient(90deg, var(--cfp-accent-alt) 0%, #10b981 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(18, 91, 44, 0.4);
    color: var(--cfp-white);
}

.cfp-cta:hover::before {
    left: 100%;
}

.cfp-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.cfp-nav:hover {
    background: var(--cfp-white);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.05);
}

.cfp-nav.prev {
    left: 15px;
}

.cfp-nav.next {
    right: 15px;
}

.cfp-nav svg {
    width: 24px;
    height: 24px;
    fill: var(--cfp-strong-text);
}

/* Freccia sinistra (ruotata) */
.cfp-nav.prev svg {
    transform: rotate(180deg);
}

/* Hover effects per le frecce */
.cfp-nav:hover svg {
    fill: var(--cfp-accent);
}

/* Prevent sticky focus/tap-highlight on nav buttons */
.cfp-nav { -webkit-tap-highlight-color: transparent; }

/* Remove focus outline and avoid green fill on focus */
.cfp-nav:focus { outline: none; }
.cfp-nav:focus svg { fill: var(--cfp-strong-text); }

/* On touch-only devices, disable hover color to prevent sticky hover after tap */
@media (hover: none) {
    .cfp-nav:hover svg { fill: var(--cfp-strong-text); }
    .cfp-nav:hover {
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        transform: translateY(-50%);
    }
}

.cfp-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 25px;
}

.cfp-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cfp-dot.active {
    background: var(--cfp-accent);
    width: 30px;
    border-radius: 5px;
}

.cfp-view-all {
    text-align: center;
    margin-top: 30px;
}

.cfp-view-all a {
    display: inline-block;
    padding: 12px 30px;
    background: var(--cfp-accent);
    color: var(--cfp-white);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(18, 91, 44, 0.3);
}

.cfp-view-all a:hover {
    background: var(--cfp-accent-alt);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(18, 91, 44, 0.4);
    color: var(--cfp-white);
}

/* Progress Shortcode */
.cfp-progress-shortcode {
    margin: 20px 0;
}

/* Progress Shortcode Simple (compact width only) */
.cfp-progress-shortcode.cfp-progress-simple {
   /* max-width: 350px;*/
}

.cfp-progress-shortcode .cfp-progress-text {
    margin-top: 10px;
    font-size: 15px;
}

/* Progress Shortcode Styles */
.cfp-progress-shortcode .cfp-progress-percentage {
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
}

.cfp-progress-shortcode .cfp-progress-bar {
    height: 12px;
    background-color: #e0e0e0;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.cfp-progress-shortcode .cfp-progress-fill {
    height: 100%;
    background-color: #28a745;
    border-radius: 999px;
    transition: width 0.3s ease;
}

/* Hide old label inside bar */
.cfp-progress-shortcode .cfp-progress-label {
    display: none;
}

/* Simple style: two column layout */
.cfp-progress-simple .cfp-progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 14px;
}

.cfp-progress-simple .cfp-amounts {
    color: #334d3e;
    font-size: 15px;
}

.cfp-progress-simple .cfp-donors {
    color: #666;
}

/* Status Shortcode */
.cfp-status-badge {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    background: var(--cfp-lighter-bg);
    border: 1px solid #eaeef5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.cfp-status-full {
    margin: 12px 0;
    font-size: 15px;
}

/* Updates Shortcode */
.cfp-updates-shortcode {
    margin: 25px 0;
}

.cfp-updates-list .cfp-update-shortcode-item {
    margin-bottom: 18px;
    padding: 15px;
    background: var(--cfp-lighter-bg);
    border-radius: 8px;
    border-left: 4px solid var(--cfp-accent);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.cfp-updates-list .cfp-update-shortcode-item:hover {
    transform: translateX(4px);
}

.cfp-updates-cards .cfp-update-shortcode-item {
    margin-bottom: 20px;
    padding: 20px;
    background: var(--cfp-white);
    border: 1px solid #eaeef5;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cfp-updates-cards .cfp-update-shortcode-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.cfp-update-shortcode-item h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.cfp-update-shortcode-item h4 a {
    color: var(--cfp-strongest-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.cfp-update-shortcode-item h4 a:hover {
    color: var(--cfp-accent);
}

.cfp-update-shortcode-item .cfp-update-date {
    font-size: 13px;
    color: var(--cfp-medium-text);
    margin-bottom: 10px;
    font-weight: 500;
}

.cfp-update-shortcode-item .cfp-update-excerpt {
    font-size: 15px;
    color: var(--cfp-strong-text);
    line-height: 1.5;
}

/* Mobile specific layout for Project Details */
@media (max-width: 768px) {
    .cfp-project-details {
        padding: 20px;
        margin: 25px -20px; /* Rompe i margini del container per essere più largo */
        border-radius: 0; /* Rimuove border radius sui lati */
    }
    
    .cfp-project-details-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Per schermi molto piccoli */
@media (max-width: 480px) {
    .cfp-project-details {
        margin: 25px -15px;
        padding: 18px 15px;
    }
    
    .cfp-project-details-grid {
        gap: 12px;
    }
    
    .cfp-detail-item {
        padding: 15px 12px;
    }
    
    .cfp-detail-item span {
        font-size: 16px;
    }
}

/* Assicura che i container parent non limitino la larghezza */
@media (max-width: 768px) {
    .entry-content .cfp-project-details,
    .post-content .cfp-project-details,
    .content .cfp-project-details {
       border-radius: 0;
    }
}

/* Enhanced Responsive */
@media (max-width: 1024px) {
    .cfp-card {
        flex: 0 0 calc(50% - 12px);
        min-height: 480px;
    }
    
    .cfp-carousel-wrapper {
        padding: 0 70px;
    }
    
    .cfp-project-details-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

/* Tablet adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
    .cfp-update-content {
        min-height: 180px; /* smaller min-height for tablet */
    }
    
    .cfp-update-image {
        flex: 0 0 200px; /* slightly smaller image width */
    }
    
    .cfp-update-text {
        padding: 18px 18px 18px 22px; /* adjust padding for tablet */
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .cfp-card {
        flex: 0 0 100%;
        min-height: 450px;
    }
    
    .cfp-carousel-wrapper {
        padding: 0 60px;
    }
    
    .cfp-nav {
        width: 40px;
        height: 40px;
    }
    
    .cfp-nav.prev {
        left: 10px;
    }
    
    .cfp-nav.next {
        right: 10px;
    }
    
    .cfp-content {
        padding: 20px;
    }
    
    .cfp-title {
        font-size: 20px;
        min-height: 50px;
    }
    
    .cfp-image {
        height: 200px;
    }
    

}

/* Mobile specific fixes for update cards */
@media (max-width: 768px) {
    .cfp-update-content {
        flex-direction: column !important;
        gap: 0 !important;
        min-height: auto !important;
        align-items: stretch !important;
    }
    
    .cfp-update-image {
        flex: 0 0 auto !important;
        width: 100% !important;
        order: 1 !important;
        display: block !important;
    }
    
    .cfp-update-image img {
        border-radius: 12px 12px 0 0 !important;
        height: 200px !important;
        width: 100% !important;
        object-fit: cover !important;
    }
    
    .cfp-update-text {
        padding: 20px !important;
        order: 2 !important;
        display: flex !important;
        flex-direction: column !important;
        min-width: auto !important;
        flex: 1 !important;
    }
    
    .cfp-update-meta {
        margin-bottom: 10px;
        font-size: 13px;
    }
    
    .cfp-update-excerpt {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 15px;
    }
    
    .cfp-read-more {
        font-size: 14px;
        margin-top: auto;
    }
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .cfp-project-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cfp-progress-wrapper {
        display: flex;
        flex-direction: column;
    }

    .cfp-progress-info {
        order: 1; /* Amount on top */
        text-align: center;
        margin-bottom: 8px;
        width: 100%;
    }

    .cfp-progress-bar {
        order: 2; /* Progress bar in the middle */
    }

    .cfp-progress-percentage {
        order: 3; /* Percentage at the bottom */
        text-align: center;
        margin-top: 8px;
        font-size: 14px;
        color: var(--cfp-medium-text);
    }
}

@media (max-width: 500px) {
    .cfp-project-details-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .cfp-project-details {
        padding: 20px;
    }

    .cfp-detail-item {
        padding: 12px;
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .cfp-detail-item strong {
        font-size: 12px;
    }

    .cfp-detail-item span {
        font-size: 18px;
    }
}