html {
    overflow-y: scroll;
}

:root {
    --primary-light: #05316b;
    --primary-dark: #000000;
    --primary-accent: #c21f26;
    --white: #ffffff;
    --text-dark: #1a252f;
    --text-muted: #1b344c;
    --bg-light: #fafdff;
    --border-light: #eef6e4;
    --max-width: 1200px;
}

body {
    background-color: var(--white);
}

.main-content-box {
    background-color: #f3f1e9;
    max-width: none;
    width: calc(100% - 80px);
    margin: 100px auto 40px auto;
    padding: 60px;
    border-radius: 40px;
    background-clip: padding-box;
    box-sizing: border-box;
    display: flex;
    gap: 40px;
    overflow-x: clip;
}

.image-side {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.side-content h1 {
    font-size: 2.5rem;
    line-height: 1.1;
    margin: 0 0 16px 0;
    color: var(--primary-light);
}

.side-content p {
    font-size: 1.15rem;
    line-height: 1.7;
    margin: 0;
    color: var(--text-muted);
}

.image-wrapper {
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 20px;
    background-color: #e0e0e0;
    margin: 40px auto 20px auto;

}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.payment-side {
    flex: 1;
    min-width: 0;
    border: 2px solid #dcd8ca;
    border-radius: 40px;
    padding: 30px;
    background-color: var(--white);
    box-sizing: border-box;
    overflow-x: clip;
}

.donation-steps {
    position: relative;
    width: 100%;
}

.donation-tiers {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

/* ONE TIER */
.donation-tiers .tier-option:first-child:last-child {
    grid-column: 2;
}

/* TWO TIERS */
.donation-tiers:has(.tier-option:nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* FOUR TIERS */
.donation-tiers .tier-option:nth-child(4):last-child {
    grid-column: 2;
}

/* FIVE TIERS — keep second row inside the grid, no margin offset */
.donation-tiers:has(.tier-option:nth-child(5):last-child) .tier-option:nth-child(4) {
    grid-column: 1;
}

.donation-tiers:has(.tier-option:nth-child(5):last-child) .tier-option:nth-child(5) {
    grid-column: 3;
}

.tier-option {
    width: 100%;
    max-width: 100%;
    height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background-color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tier-option:hover {
    border-color: var(--primary-accent);
    background-color: #fff5f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tier-option.active {
    border-color: var(--primary-accent);
    background-color: #fff5f5;
    box-shadow: 0 0 0 2px var(--primary-accent);
}

.amount {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-light);
    text-align: center;
}

.description {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 500;
    text-align: center;
}

.custom-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.custom-container input {
    width: 100%;
    padding: 24px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    box-sizing: border-box;
    font-size: 24px;
}

.custom-container button {
    width: 100%;
    padding: 20px;
    background-color: #05316b;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.custom-container button:hover {
    background-color: #245492;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 20px;
    color: #ccc;
}

#step-2[hidden] {
    display: none !important;
}

.oval-amount {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background-color: #fff0f0;
    color: #05316b;
    border: none;
    border-radius: 4px;
    padding: 15px 20px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}

.oval-amount::before {
    content: "\f004";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: red;
    margin-right: 15px;
}

* Button Styling */ .custom-container button,
#step-2 form button {
    background-color: #05316b;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
}

/* Form Styling */
.payment-side .form-container {
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    max-width: none;
    margin: 0;
}

.donation-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* required field container */
.donation-form label {
    position: relative;
    display: block;
}

/* input styling */
.donation-form input,
.donation-form textarea {
    width: 100%;
    padding: 20px;
    padding-right: 30px;
    border: 1px solid #1b344c;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    background: #E8F3FF;
}

/* ONLY required fields get Font Awesome asterisk */
.donation-form label:has(input:required)::after {
    content: "\f069";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: red;
    pointer-events: none;
}

/* Make the textarea significantly larger */
.donation-form textarea {
    height: 200px;
}

.donate-btn {
    width: 100%;
    background-color: #05316b;
    color: #ffffff;
    border: none;
    padding: 20px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

.donate-btn:hover {
    background-color: #4d8de2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.oval-amount {
    border: 2px solid #05316b;
    border-radius: 50px;
    padding: 12px 20px;
    background: #E8F3FF;
    font-size: 18px;
    margin-bottom: 20px;
    display: inline-block;
}

/* Frequency tabs */
.frequency-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background-color: var(--primary-light);
    border-radius: 25px;
    padding: 4px;
    width: fit-content;
    margin: 0 auto;
}

.tab-btn {
    padding: 10px 30px;
    border: none;
    border-radius: 50px;
    background: transparent;
    cursor: pointer;
    color: var(--white);
    font-weight: 600;
}

.tab-btn.active {
    background: #fff;
    color: #2c3e50;
}

.monthly-tab::after {
    content: "\f004";
    font-family: "FontAwesome";
    font-size: 16px;
    margin-left: 8px;
    color: #c21f26;
    display: inline-block;
}

.monthly-tab.active::after {
    animation: pop 0.5s ease-out;
}

@keyframes pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.5);
    }

    100% {
        transform: scale(1);
    }
}

.stripe-input-container {
    width: 100%;
    padding: 20px;
    padding-right: 30px;
    border: 1px solid #1b344c;
    border-radius: 8px;
    font-size: 16px;
    background: #E8F3FF;
    box-sizing: border-box;
    margin-bottom: 20px;
}

.stripe-custom-input {
    width: 100%;
    padding: 20px;
    padding-right: 30px;
    border: 1px solid #1b344c;
    border-radius: 8px;
    background: #E8F3FF;
    box-sizing: border-box;
    min-height: 60px;
}

.StripeElement {
    width: 100%;
    height: 100%;
}

.donation-form label:has(.stripe-custom-input.required)::after {
    content: "\f069";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: red;
    pointer-events: none;
}

.StripeElement {
    background: transparent;
}

.StripeElement--focus {
    border-color: #4d8de2 !important;
    box-shadow: 0 0 0 2px rgba(77, 141, 226, 0.25);
}

.StripeElement--invalid {
    border-color: #E63946 !important;
}




.impact-banner {
    position: relative;
    background-color: #6b0836;
    color: var(--white);
    text-align: center;
    padding: 12px 20px;
    margin-top: 10px;
    margin-bottom: 25px;
    border-radius: 8px;
    font-weight: 600;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.impact-banner::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 70%;
    width: 14px;
    height: 14px;
    background: #6b0836;
    transform: rotate(45deg);
}

#error-message {
    color: red;
    margin-bottom: 10px;
    display: none;
}

.currencies-dropdown #currency-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.payment-methods-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    margin-top: 40px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 15px !important;
    width: 100%;
    max-width: 100%;
}

.visa-icon {
    max-width: 80% !important;
}

.pm-wrapper {
    display: inline-flex !important;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 40px;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

.pm-icon {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.back-arrow {
    background: none;
    border: none;
    color: #1b344c;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
}

.back-arrow::before {
    margin-right: 8px;
    font-size: 16px;
    transition: transform 0.2s ease;
}

.back-arrow:hover {
    color: var(--primary-accent);
    transform: translateX(-4px);
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .main-content-box {
        flex-direction: column;
        width: calc(100% - 32px);
        padding: 20px;
        margin: 120px auto 20px auto;
        gap: 20px;
    }

    .side-content {
        text-align: center;
    }

    .image-side {
        order: -1;
        gap: 16px;
    }

    .image-wrapper {
        height: 250px;
        margin: 20px auto 20px auto;

    }

    .side-content h1 {
        font-size: 1.8rem;

    }

    .payment-side {
        padding: 20px;
    }

    .donation-tiers {
        grid-template-columns: repeat(3, 1fr);
    }

    .tier-option {
        width: 100%;

    }

    .currencies-dropdown {
        width: 100%;
        margin-bottom: 20px;
    }

    .currencies-dropdown #currency-select {
        width: 100%;
        padding: 15px;
        font-size: 16px;
        border: 1px solid #ccc;
        border-radius: 8px;
        background-color: white;
        cursor: pointer;
    }

    .back-arrow {
        padding: 10px 0;
        font-size: 16px;
    }

    .payment-methods-grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        margin-top: 40px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 10px !important;
        width: 100%;
    }
}

.payment-alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 20px;
    font-weight: 600;
    text-align: center;
    display: none;
}

.payment-alert.success {
    background-color: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #C8E6C9;
}

.payment-alert.error {
    background-color: #FFEBEE;
    color: #C62828;
    border: 1px solid #FFCDD2;
}

.payment-alert {
    background: #ffffff;
    border-radius: 14px;
    padding: 35px 30px;
    max-width: 380px;
    margin: 40px auto;
    text-align: center;
    font-size: 16px;
    line-height: 1.6;
    font-weight: 500;
}

/* ICON */
.payment-alert::before {
    display: block;
    width: 75px;
    height: 75px;
    border-radius: 50%;
    margin: 0 auto 18px auto;
    font-size: 38px;
    font-weight: bold;
    line-height: 75px;
    color: #ffffff;
    text-align: center;
}

/* SUCCESS ICON */
#payment-success::before {
    content: "✔";
    background: #2E7D32;
}

/* ERROR ICON */
#card-errors::before {
    content: "?";
    background: #C62828;
}

/* TITLE (FROM YOUR HTML) */
.alert-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 18px;
    text-transform: uppercase;
    text-align: center;
}

/* SUCCESS TITLE COLOR */
#payment-success .alert-title {
    color: #2E7D32;
}

/* ERROR TITLE COLOR */
#card-errors .alert-title {
    color: #C62828;
}