/* Donate Page Styles */
body {
    background: var(--bg);
    color: var(--text);
}

.donate-section {
    max-width: 900px;
    margin: 4rem auto;
    padding: 3rem;
    background: var(--card);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.45);
    border: 1px solid var(--card-line);
    border-top: 5px solid var(--gold-bright);
}

    .donate-section h1 {
        font-family: 'Playfair Display', serif;
        color: var(--card-heading);
        font-size: 2.8rem;
        margin-bottom: 2rem;
        text-align: center;
    }

.donate-table-container {
    overflow-x: auto;
    border: 1px solid var(--card-line);
    border-radius: 16px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.15);
}

.donate-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Poppins', sans-serif;
}

    /* Header row */
    .donate-table thead th {
        padding: 1.1rem 1.25rem;
        background: linear-gradient(135deg, var(--maroon-deep), var(--maroon));
        color: var(--gold-soft);
        font-size: 0.78rem;
        font-weight: 600;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        text-align: center;
        border-bottom: 2px solid var(--gold);
        white-space: nowrap;
    }

        .donate-table thead th:nth-child(2) {
            text-align: left;
        }

    /* Body cells */
    .donate-table tbody td {
        padding: 1rem 1.25rem;
        color: var(--card-text);
        border-bottom: 1px solid var(--card-line);
        vertical-align: middle;
        text-align: center;
    }

    .donate-table tbody tr:last-child td {
        border-bottom: none;
    }

    /* Zebra striping + hover */
    .donate-table tbody tr:nth-child(even) td {
        background: var(--card-2);
    }

    .donate-table tbody tr:hover td {
        background: var(--card-2);
    }

    /* Per-column treatment */
    .donate-table tbody td:nth-child(1) {
        color: var(--card-muted);
        font-weight: 600;
    }

    .donate-table tbody td:nth-child(2) {
        text-align: left;
        line-height: 1.55;
        font-size: 0.97rem;
    }

    .donate-table tbody td:nth-child(3) {
        color: var(--card-muted);
        font-size: 0.9rem;
    }

    .donate-table tbody td:nth-child(4) {
        color: var(--card-heading);
        font-weight: 700;
        font-size: 1.05rem;
        white-space: nowrap;
    }

    .donate-table .donation-amount-col {
        width: 150px;
        min-width: 90px;
        max-width: 150px;
        text-align: center;
    }

    .donate-table .date-col {
        width: 150px;
        min-width: 90px;
        max-width: 150px;
        text-align: center;
    }

    .donate-table .sl-no-col {
        width: 70px;
        min-width: 60px;
        max-width: 150px;
        text-align: center;
    }

    .donate-table .donate-col {
        width: 150px;
        min-width: 100px;
        max-width: 150px;
        text-align: center;
        padding: 0.5rem;
    }

        .donate-table .donate-col .razorpay-embed-btn {
            display: inline-block;
            margin: 0 auto;
        }

.donate-custom-text {
    margin-top: 2rem;
    margin-bottom: 2rem;
    color: var(--text);
    text-align: center;
    font-size: 1.2rem;
    font-family: 'Poppins', sans-serif;
}

/* Donation Image Section */
.donation-image-section {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    text-align: center;
}

.donation-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(178, 34, 34, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .donation-image:hover {
        transform: scale(1.02);
        box-shadow: 0 8px 30px rgba(178, 34, 34, 0.25);
    }

@media (max-width: 900px) {
    .donate-form-qr-row {
        flex-direction: column-reverse;
        gap: 2rem;
        align-items: stretch;
    }

    .donate-qr-placeholder, .donate-form-iframe {
        min-width: 0;
        width: 100%;
        align-items: center;
    }

        .donate-qr-placeholder img {
            margin: 0 auto;
        }
}

@media (max-width: 768px) {
    .donate-section {
        margin: 2rem auto 1rem auto;
        padding: 1.5rem;
    }

        .donate-section h1 {
            font-size: 1.8rem;
            margin-bottom: 1.5rem;
        }

    .donate-table {
        font-size: 0.8rem;
    }

        .donate-table th,
        .donate-table td {
            padding: 0.5rem 0.3rem;
            font-size: 0.8rem;
        }

        .donate-table .donate-col {
            min-width: 80px;
            max-width: 80px;
            padding: 0.3rem;
        }

    .donate-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .donate-custom-text {
        font-size: 1rem;
        margin-top: 1.5rem;
    }

    .donation-image-section {
        margin: 1.5rem auto;
        padding: 0 0.5rem;
    }

    .donation-image {
        max-width: 100%;
        border-radius: 8px;
    }

    .donate-qr-placeholder img {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 480px) {
    .donate-section {
        margin: 1rem auto;
        padding: 1rem;
    }

        .donate-section h1 {
            font-size: 1.5rem;
            margin-bottom: 1rem;
        }

    .donate-table {
        font-size: 0.7rem;
    }

        .donate-table th,
        .donate-table td {
            padding: 0.4rem 0.2rem;
            font-size: 0.7rem;
        }

        .donate-table .donation-amount-col,
        .donate-table .date-col {
            min-width: 60px;
            max-width: 60px;
        }

        .donate-table .sl-no-col {
            min-width: 35px;
            max-width: 35px;
        }

        .donate-table .donate-col {
            min-width: 60px;
            max-width: 60px;
            padding: 0.2rem;
        }

    .donate-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
        border-radius: 20px;
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .donate-custom-text {
        font-size: 0.9rem;
        margin-top: 1rem;
    }

    .donation-image-section {
        margin: 1rem auto;
        padding: 0 0.25rem;
    }

    .donation-image {
        max-width: 100%;
        border-radius: 6px;
    }

    .donate-qr-placeholder img {
        width: 150px;
        height: 150px;
    }

    .donate-form-iframe iframe {
        min-height: 400px;
    }
}

.donate-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--gold-bright) 0%, var(--saffron) 100%);
    color: var(--maroon-deep);
    padding: 0.55rem 1.3rem;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

    .donate-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
        filter: brightness(1.08);
    }

    .donate-btn:focus {
        outline: 2px solid var(--gold-bright);
        outline-offset: 2px;
        background-color: var(--gold-bright);
        color: var(--maroon);
    }

    .donate-btn:focus-visible {
        outline: 2px solid var(--gold-bright);
        outline-offset: 2px;
    }

/* ----------------------------------------------------------------------
   Mobile: stack each table row into a card so the Donate button is
   always visible (no off-screen horizontal scrolling).
   ---------------------------------------------------------------------- */
@media (max-width: 600px) {
    /* Cards flow vertically — drop the horizontal scroll & container chrome */
    .donate-table-container {
        overflow-x: visible;
        border: none;
        box-shadow: none;
        background: transparent;
    }

    .donate-table,
    .donate-table tbody,
    .donate-table tbody td {
        display: block;
        width: 100%;
    }

        /* The column headers are replaced by per-field labels below */
        .donate-table thead {
            display: none;
        }

        /* Each row becomes a self-contained card */
        .donate-table tbody tr {
            display: flex;
            flex-direction: column;
            margin-bottom: 1.25rem;
            border: 1px solid var(--card-line);
            border-radius: 14px;
            overflow: hidden;
            background: var(--card);
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
        }

            /* Neutralise the desktop zebra / hover backgrounds inside cards */
            .donate-table tbody tr:nth-child(even) td,
            .donate-table tbody tr:hover td {
                background: transparent;
            }

        /* Generic cell: label on the left, value on the right */
        .donate-table tbody td {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            text-align: right;
            padding: 0.65rem 1rem;
            border-bottom: 1px solid var(--card-line);
            font-size: 0.9rem;
            min-width: 0;
            max-width: none;
            white-space: normal;
        }

            .donate-table tbody td::before {
                font-weight: 600;
                color: var(--card-muted);
                text-transform: uppercase;
                font-size: 0.7rem;
                letter-spacing: 0.05em;
                text-align: left;
                white-space: nowrap;
            }

            /* Sl. No. is not needed on mobile cards */
            .donate-table tbody td:nth-child(1) {
                display: none;
            }

            /* Field labels (the <td>s carry no classes, so key off position) */
            .donate-table tbody td:nth-child(3)::before {
                content: "Date";
            }

            .donate-table tbody td:nth-child(4)::before {
                content: "Amount";
            }

            /* Pooja name = card title, full width, shown first, no label */
            .donate-table tbody td:nth-child(2) {
                order: -1;
                display: block;
                text-align: left;
                font-weight: 600;
                font-size: 1rem;
                line-height: 1.5;
                color: var(--card-heading);
                background: var(--card-2);
                padding: 0.9rem 1rem;
            }

            /* Hide empty date cells (most rows have no scheduled date) */
            .donate-table tbody td:nth-child(3):empty {
                display: none;
            }

            /* Donate cell = full-width button at the bottom of the card */
            .donate-table tbody td:nth-child(5) {
                display: block;
                text-align: center;
                border-bottom: none;
                padding: 0.85rem 1rem;
            }

                .donate-table tbody td:nth-child(5) .donate-btn {
                    display: block;
                    width: 100%;
                    padding: 0.7rem 1rem;
                    font-size: 0.92rem;
                    min-height: 44px;
                }
}
