/**
 * Elementor Shortcodes Styling
 * Responsive design for campaign details and pledges carousel
 */

/* ========================================
   Campaign Details
   ======================================== */

.cf-campaign-details {
    margin: 0;
    padding: 0;
}
.cf-campaign-details__image {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.cf-campaign-details__image img {
    width: 100%;
    height: auto;
    display: block;
}

.cf-campaign-details__content {
    padding: 0;
}

.cf-campaign-details__title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #222;
}

.cf-campaign-details__description {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 2rem;
}

.cf-campaign-details__description p {
    margin: 0 0 1rem 0;
}

.cf-campaign-details__description p:last-child {
    margin-bottom: 0;
}

/* Progress Section */

.cf-campaign-details__progress-section {
    border: 2px solid #87a0a5;
    background: #f9f9f9;
    padding: 2rem;
    border-radius: 8px;
    /* border: 1px solid #eee; */
}

/* Progress Bar */

.cf-progress-bar {
    margin-bottom: 1.5rem;
}

.cf-progress-bar__track {
    width: 100%;
    height: 12px;
    background: #eee;
    border-radius: 6px;
    overflow: hidden;
}

.cf-progress-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, #87a0a5, #87a0a5);
    transition: width 0.3s ease;
    border-radius: 6px;
}

/* Progress Stats */

.cf-progress-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.cf-progress-stats__item {
    text-align: center;
}

.cf-progress-stats__value {
    font-weight: 700;
    color: #222;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.cf-progress-stats__label {
    font-size: 0.85rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Campaign Dates */

.cf-campaign-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ddd;
    display: none;
}

.cf-campaign-dates__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cf-campaign-dates__label {
    font-size: 0.85rem;
    color: #999;
    font-weight: 600;
}

.cf-campaign-dates__value {
    font-size: 0.95rem;
    color: #222;
}

/* ========================================
   Pledges List (Vertical)
   ======================================== */

.cf-pledges-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cf-pledge-list-item {
    background: #fff;
    border: 1px solid var(--cf-border);
    border-radius: 8px;
    padding: 2rem;
    display: flex
;
    flex-direction: column;
    transition: all 0.3s ease;
}

.cf-pledge-list-item:hover {
    border-color: #4CAF50;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.1);
}

.cf-pledge-list-item__left {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 100px;
}

.cf-pledge-list-item__amount {
    font-size: 2rem;
    font-weight: 700;
    color: #4CAF50;
}

.cf-pledge-list-item__badge {
    background: #4CAF50;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
}

.cf-pledge-list-item__content {
    flex: 1;
}

.cf-pledge-list-item__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #222;
}

.cf-pledge-list-item__description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 0.75rem;
}

.cf-pledge-list-item__description p {
    margin: 0;
}

.cf-pledge-list-item__details {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0;
    font-size: 0.9rem;
    color: #666;
}

.cf-pledge-list-item__details li {
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.cf-pledge-list-item__details li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4CAF50;
    font-weight: bold;
}

.cf-pledge-list-item__limited {
    background: #fff3cd;
    color: #856404;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-top: 0.75rem;
    display: inline-block;
}

.cf-pledge-list-item__right {
    display: flex;
    align-items: center;
}

.cf-pledge-list-item__btn {
    white-space: nowrap;
}

/* ========================================
   Pledges Carousel (Horizontal)
   ======================================== */

.cf-pledges-carousel {
    position: relative;
    margin: 0;
    padding: 0;
}

.cf-pledges-carousel__swiper {
    padding: 0 0 3rem 0;
}

/* Pledge Card */

.cf-pledge-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s ease;
    min-height: 400px;
}

.cf-pledge-card:hover {
    border-color: #4CAF50;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.1);
}

.cf-pledge-card__badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #4CAF50;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.cf-pledge-card__amount {
    font-size: 2rem;
    font-weight: 700;
    color: #4CAF50;
    margin-bottom: 1rem;
}

.cf-pledge-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #222;
}

.cf-pledge-card__description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.cf-pledge-card__description p {
    margin: 0;
}

.cf-pledge-card__details {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: #666;
}

.cf-pledge-card__details li {
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.cf-pledge-card__details li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4CAF50;
    font-weight: bold;
}

.cf-pledge-card__details li:last-child {
    margin-bottom: 0;
}

.cf-pledge-card__limited {
    background: #fff3cd;
    color: #856404;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin: 1rem 0;
    text-align: center;
}

.cf-pledge-card__btn {
    width: 100%;
    margin-top: auto;
}

/* Carousel Controls */

.cf-pledges-carousel__pagination {
    text-align: center;
}

/* Swiper Pagination Styles */
.swiper-pagination {
    position: relative;
    bottom: auto;
    padding-top: 1rem;
}

.swiper-pagination-bullet {
    background: #ddd;
    opacity: 0.6;
    transition: all 0.3s ease;
    width: 10px;
    height: 10px;
    margin: 0 6px;
}

.swiper-pagination-bullet-active {
    background: #4CAF50;
    opacity: 1;
    width: 32px;
    border-radius: 5px;
}

/* Alternative: Progress Bar Style Pager */
.cf-pledges-carousel__progress {
    margin-top: 1.5rem;
    padding: 0 1rem;
}

.cf-pledges-carousel__progress-track {
    background: #eee;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
}

.cf-pledges-carousel__progress-fill {
    background: #4CAF50;
    height: 100%;
    transition: width 0.3s ease;
}

.cf-pledges-carousel__progress-text {
    text-align: center;
    font-size: 0.85rem;
    color: #999;
    margin-top: 0.75rem;
}

.cf-pledges-carousel__prev,
.cf-pledges-carousel__next {
    display: none;
    color: #4CAF50;
}

.cf-pledges-carousel__prev::after,
.cf-pledges-carousel__next::after {
    font-size: 1.5rem;
}

/* ========================================
   Button Styling
   ======================================== */

.cf-btn {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
}

.cf-btn--primary {
    background: #28393c; /* #28393c; */
    color: #f9f9f9 !important; /* #d1c5b0; */
}

.cf-btn--primary:hover {
    background: #d1c5b0;
    color: #28393c;
    text-decoration: none;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet (768px and below) */
@media (max-width: 768px) {

    .cf-campaign-details__title {
        font-size: 2rem;
    }

    .cf-progress-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .cf-pledges-carousel__prev,
    .cf-pledges-carousel__next {
        display: none;
    }

    /* List layout on tablet */
    .cf-pledge-list-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .cf-pledge-list-item__left {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        min-width: auto;
    }

    .cf-pledge-list-item__right {
        width: 100%;
    }

    .cf-pledge-list-item__btn {
        width: 100%;
    }

}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    
    .cf-campaign-details__title {
        font-size: 1.5rem;
    }

    .cf-campaign-details__progress-section {
        padding: 1.5rem;
    }

    .cf-progress-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .cf-progress-stats__value {
        font-size: 1.5rem;
    }

    .cf-campaign-dates {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .cf-pledges-carousel__swiper {
        padding: 0 0 3.5rem 0;
    }

    .cf-pledge-card {
        padding: 1rem;
        min-height: 450px;
    }

    .cf-pledge-card__amount {
        font-size: 1.5rem;
    }

    .cf-pledge-card__title {
        font-size: 1.1rem;
    }

    .swiper-wrapper {
        padding: 0;
    }

    /* Equal height cards on mobile carousel */
    .swiper-slide {
        height: auto;
    }

    /* Pagination dots styling for mobile */
    .swiper-pagination {
        padding-top: 1.5rem;
    }

    .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
        margin: 0 4px;
    }

    .swiper-pagination-bullet-active {
        width: 28px;
    }

    /* List layout on mobile */
    .cf-pledge-list-item {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .cf-pledge-list-item__left {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
        min-width: auto;
    }

    .cf-pledge-list-item__amount {
        font-size: 1.5rem;
    }

    .cf-pledge-list-item__right {
        width: 100%;
    }

    .cf-pledge-list-item__btn {
        width: 100%;
        padding: 0.75rem 1rem;
    }

    .cf-pledge-list-item__title {
        font-size: 1rem;
    }

    .cf-pledge-list-item__description {
        font-size: 0.9rem;
    }

}