/* ==================== ECOSISTEMA DE GENEROSIDAD (DONACIONES) ==================== */
.donation-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 1000000; /* Prioridad absoluta */
    padding: 80px 20px; /* Margen superior amplio */
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.donation-modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.donation-modal {
    background: #ffffff;
    width: 100%;
    max-width: 500px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 40px 100px -20px rgba(15, 23, 42, 0.25);
    transform: scale(1);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 40px; /* Espacio al final al scrollear */
}

.donation-modal-overlay.hidden .donation-modal {
    transform: scale(0.9);
}

.donation-modal-header {
    background: #0f172a;
    padding: 30px;
    color: #ffffff;
    text-align: center;
    position: relative;
}

.donation-modal-header i {
    width: 44px;
    height: 44px;
    color: #FF5E2A;
    margin-bottom: 12px;
}

.donation-modal-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
}

.donation-modal-sub {
    font-size: 0.9rem;
    opacity: 0.8;
}

.donation-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donation-modal-body {
    padding: 24px 30px 12px 30px; /* Reducido abajo */
}

.donation-step-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.donation-categories {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.donation-cat-opt {
    padding: 12px;
    background: #f1f5f9;
    border: 2px solid transparent;
    border-radius: 12px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.donation-cat-opt.active {
    background: #eef2ff;
    border-color: #2563eb;
    color: #2563eb;
}

.donation-amounts {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.donation-amount-opt {
    padding: 12px;
    background: #f1f5f9;
    border: 2px solid transparent;
    border-radius: 12px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
}

.donation-amount-opt.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.donation-custom-amount {
    grid-column: span 3;
    position: relative;
}

.donation-custom-amount .currency-symbol {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    color: #64748b;
}

.donation-custom-amount input {
    width: 100%;
    padding: 14px 14px 14px 30px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    font-weight: 700;
    font-size: 1.1rem;
    outline: none;
}

.donation-custom-amount input:focus {
    border-color: #2563eb;
}

.donation-total-display {
    margin-top: 24px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.donation-total-display strong {
    font-size: 1.5rem;
    color: #2563eb;
}

.donation-next-btn, .donation-pay-btn {
    width: 100%;
    margin-top: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.donation-summary-card {
    background: #f1f5f9;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.donation-security-notice {
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    line-height: 1.4;
}

.donation-security-notice i {
    width: 18px;
    height: 18px;
    color: #10b981;
    flex-shrink: 0;
}

.donation-back-btn {
    width: 100%;
    margin-top: 12px;
    background: none;
    border: none;
    color: #64748b;
    font-weight: 600;
    cursor: pointer;
}

.donation-modal-footer {
    padding: 15px 30px;
    background: #f8fafc;
    text-align: center;
}

.payment-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.payment-logos img {
    margin: -15px 0; /* Compensa el aire de la imagen generada */
}

.donation-modal-footer p {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 5px;
}

.donation-step.hidden {
    display: none;
}

/* FREQUENCY SELECTOR */
.donation-frequency {
    display: flex;
    gap: 8px;
    background: #f1f5f9;
    padding: 6px;
    border-radius: 14px;
}

.donation-freq-opt {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.donation-freq-opt.active {
    background: #ffffff;
    color: #2563eb;
    box-shadow: 0 4px 10px -2px rgba(15, 23, 42, 0.1);
}

#donation-freq-label {
    font-size: 0.8rem;
    font-style: normal;
    color: #94a3b8;
}

/* STEP 2: Form Groups */
.donation-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.donation-form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
}

.donation-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.donation-form-group input:focus {
    outline: none;
    border-color: #2563eb;
}

/* STEP 3: Success */
.donation-success-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.donation-success-icon i {
    width: 80px;
    height: 80px;
    color: #10b981;
}

.donation-success-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    text-align: center;
    margin-bottom: 10px;
}

.donation-success-text {
    text-align: center;
    color: #64748b;
    margin-bottom: 30px;
}

.donation-cert-box {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #eef2ff;
    border-radius: 16px;
    border: 1px solid #c3dafe;
    margin-bottom: 20px;
}

.donation-cert-box i {
    width: 32px;
    height: 32px;
    color: #2563eb;
}

.donation-cert-info {
    flex: 1;
}

.donation-cert-info span {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e3a8a;
}

.donation-cert-info small {
    display: block;
    font-size: 0.8rem;
    color: #3b82f6;
}

.donation-cert-btn {
    background: #2563eb;
    color: #ffffff;
    border: none;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.donation-cert-notice {
    font-size: 0.85rem;
    color: #94a3b8;
    text-align: center;
    margin-bottom: 20px;
}
