/* Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    margin-top: 24px;
    align-items: stretch;
}

/* Card */
.project-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(34, 34, 34, 0.08);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
    min-height: 420px;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(34, 34, 34, 0.12);
}

/* Image (keeps aspect ratio and covers) */
.card-image-link {
    display: block;
}

.card-image {
    width: 100%;
    height: 170px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
}

.card-title {
    font-size: 18px;
    margin: 0;
    color: #1b2a3a;
    line-height: 1.2;
}

.card-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: #5b6b78;
    flex-wrap: wrap;
}

.meta-item strong {
    color: #354a57;
}

.card-desc {
    color: #394b57;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    flex-grow: 1;
}

/* Progress */
.progress-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.progress-track {
    background: #eef2f4;
    border-radius: 999px;
    height: 10px;
    width: 100%;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8bc34a, #66bb6a);
    transition: width .5s ease;
}

.progress-label {
    font-size: 13px;
    min-width: 46px;
    text-align: right;
    color: #31424a;
}

/* Actions */
.card-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 6px;
}

.btn {
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #91c241ff;
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: #56646f;
    border: 1px solid rgba(86, 100, 111, 0.12);
    padding: 7px 10px;
}

.btn-disabled {
    background: #bfc9cc;
    color: #fff;
    cursor: not-allowed;
}

/* Pagination */
.pagination-wrap {
    margin-top: 28px;
    text-align: center;
    padding-top: 18px;
}

.pagination-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.page-link {
    display: inline-block;
    padding: 8px 11px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #eee;
    color: #333;
    text-decoration: none;
    min-width: 36px;
    text-align: center;
}

.page-link.active,
.page-link:hover {
    background: #91c241ff;
    color: #fff;
    border-color: #91c241ff;
}

.dots {
    display: flex;
    align-items: center;
    color: #9aa6ac;
    padding: 0 6px;
}

/* No projects */
.no-projects {
    padding: 40px;
    text-align: center;
    color: #666;
    font-size: 16px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-box {
    background: #fff;
    max-width: 800px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px;
    border-radius: 8px;
    position: relative;
}

.modal-close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    border: none;
    background: none;
    cursor: pointer;
}

.update-images img {
    width: 100%;
    margin-bottom: 10px;
    border-radius: 6px;
}

.view-project-btn {
    background-color: #94c84a !important;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.view-project-btn:hover {
    background-color: #82b03a !important;
    transform: translateY(-2px);
}

.view-project-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(148, 200, 74, 0.5);
}

.progress-bar-wrap {
    background-color: #eee;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 5px;
}

.progress-bar-fill {
    background-color: #94c84a !important;
    height: 20px;
    line-height: 20px;
    color: #fff;
    text-align: center;
    font-weight: bold;
}

.impact-text {
    font-style: italic;
    margin-top: 5px;
    color: #555;
}

.carousel img {
    margin-bottom: 5px;
}

/* Become a Donor Button */
.donate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 26px;
    background: linear-gradient(135deg, #94c84a, #7fb43d);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    border-radius: 30px;
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 18px rgba(148, 200, 74, 0.35);
    letter-spacing: 0.3px;
}

.donate-btn:hover {
    background: linear-gradient(135deg, #7fb43d, #6aa12f);
    transform: translateY(-2px);
    box-shadow: 0 12px 22px rgba(148, 200, 74, 0.45);
}

.donate-btn:active {
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(148, 200, 74, 0.35);
}
.donate-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(148, 200, 74, 0.35);
}

.modal-footer {
    margin-top: 20px;
    text-align: center;
}

@media (max-width: 576px) {
    .projects-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        /* single column */
        gap: 15px;
        /* spacing between cards */
    }

    .project-card {
        width: 100% !important;
        min-height: auto;
    }

    .card-image {
        height: 180px;
    }
}