/* donation.css - modern card grid + modal */
.donation-section {
    padding: 3rem 1rem;
}

.section-title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 1.6rem;
    color: var(--accent);
}

/* Grid */
.donation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: stretch;
}

/* Card */
.donation-card {
    background: linear-gradient(180deg, color-mix(in srgb, var(--card-bg) 85%, rgba(255, 255, 255, 0.02)), var(--card-bg));
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(12, 20, 15, 0.06);
    cursor: pointer;
    transition: transform .36s cubic-bezier(.2, .9, .3, 1), box-shadow .36s;
    display: flex;
    flex-direction: column;
    min-height: 320px;
    border: 1px solid color-mix(in srgb, var(--accent) 6%, transparent);
}

.donation-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 50px rgba(12, 20, 15, 0.12);
}

/* Header (title above image) */
/* ✅ کارت‌ها بدون پس‌زمینه */
.donation-card {
    background: transparent;
    border: none;
    box-shadow: none;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* عنوان بالای عکس */
.donation-card-header {
    padding: 0.6rem 0;
}

.donation-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--gold);
}

/* ✅ عکس‌ها: نسبت حفظ، کوچک‌تر، با افکت هاور فقط روی عکس */
.donation-media {
    background: transparent;
    padding: 0.3rem;
}

.donation-img {
    width: 100%;
    height: auto;
    max-width: 92%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    border-radius: 14px;
    transition: transform 0.4s ease, filter 0.4s ease;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

/* 🟢 فقط وقتی ماوس روی عکس رفت */
.donation-img:hover {
    transform: scale(1.06);
    filter: brightness(1.1) saturate(1.15);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

/* ✅ شبکه کارت‌ها */
.donation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    justify-items: center;
    padding: 1rem;
}

/* موبایل */
@media (max-width: 900px) {
    .donation-grid {
        grid-template-columns: 1fr;
    }

    .donation-img {
        max-width: 100%;
    }
}

/* Modal (centered sliding panel) */
.donation-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2200;
}

.donation-modal.active {
    display: flex;
}

.donation-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 6, 0.6);
    backdrop-filter: blur(6px);
    transition: opacity .25s;
}

.donation-modal-panel {
    position: relative;
    width: min(520px, 94%);
    background: var(--card-bg);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    padding: 1rem 1.2rem 1.6rem;
    transform: translateY(12px) scale(.995);
    transition: transform .28s ease, opacity .28s ease;
}

.donation-modal.active .donation-modal-panel {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 10px;
    left: 12px;
    background: transparent;
    border: none;
    font-size: 1.6rem;
    color: var(--muted);
    cursor: pointer;
}

/* body text */
.muted {
    color: var(--muted);
    margin: .25rem 0;
}

/* Actions */
.modal-actions {
    display: flex;
    gap: .6rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.btn {
    border: none;
    padding: .7rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
}

.action-copy {
    background: color-mix(in srgb, var(--accent) 8%, var(--card-bg));
    color: var(--accent);
}

.action-copy:hover {
    background: var(--accent);
    color: var(--accent-foreground);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 25%, transparent);
}

.action-link {
    background: linear-gradient(90deg, var(--accent), var(--gold));
    color: var(--accent-foreground);
}

.action-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 30%, transparent);
}

/* toast */
.modal-toast {
    margin-top: .8rem;
    min-height: 22px;
    color: var(--text);
    font-weight: 600;
    opacity: 0;
    transition: opacity .25s ease;
}

.modal-toast.show {
    opacity: 1;
}

/* Responsive */
@media (max-width: 900px) {
    .donation-grid {
        grid-template-columns: 1fr;
    }

    .donation-img {
        max-height: 320px;
    }

    .donation-card {
        min-height: auto;
    }
}
