@font-face {
    font-family: 'IranianSans';
    src: url('fonts/Iranian-Sans.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}



input {
    font-family: 'IranianSans', Tahoma, sans-serif;
  }
  


/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'IranianSans', sans-serif;
    background-color: #f5f5f5;
    direction: rtl;
    text-align: right;
}

/* Container */
.donation-container {
    display: flex;
    justify-content: center;
    align-items: flex-start; /* از بالا شروع کن */
    min-height: 100vh;
    padding-top: 80px; /* فاصله مطمئن از بالا */
    padding-bottom: 40px;
    box-sizing: border-box;
}



/* Banner */
.banner {
    position: absolute;
    top: -105px;
    left: 50%;
    transform: translateX(-50%);
}


/* Donation Card */
.donation-card {
    margin-top: 50px;
    max-width: 374px;
    position: relative;
    background: white;
    border-radius: 28px;
    border: 1px solid #dde1e6;
    padding: 30px 17px;
    margin-top: 50px;
    padding-top: 120px;
}

/* Form Sections */
.amount-section,
.custom-amount-section,
.input-section {
    margin-bottom: 30px;
}

.section-label {
    display: block;
    font-size: 11px;
    color: #393939;
    margin-bottom: 12px;
    text-align: right;
}

.optional {
    color: #c4c4c4;
}

/* Amount Buttons */
.amount-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-direction: reverse;
}

.amount-btn {
    width: 98px;
    height: 42px;
    background-color: #f8faff;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.amount-btn:hover {
    background-color: #e8f0ff;
    transform: translateY(-1px);
}

.amount-btn.active {
    background-color: #1758ba;
    color: white;
}

.amount-btn.active .amount-value,
.amount-btn.active .amount-currency {
    color: white;
}

.amount-value,
.amount-currency {
    font-size: 13px;
    color: #1758ba;
    font-weight: normal;
}

/* Custom Amount Input */
.amount-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.amount-input {
    width: 100%;
    height: 50px;
    background: white;
    border: 1px solid #dedede;
    border-radius: 15px;
    padding: 0 30px 0 20px;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    direction: ltr;
    outline: none;
    transition: border-color 0.3s ease;

}

.amount-text {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
    text-align: right;
    direction: rtl;
}
  

.amount-input:focus {
    border-color: gray;
}

.currency-label {
    position: absolute;
    left: 0;
    top: 0;
    width: 65px;
    height: 50px;
    background-color: #0007ff;
    border-radius: 15px 0 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Text Inputs */
.text-input {
    width: 100%;
    height: 48px;
    background: white;
    border: 1px solid #dde1e6;
    border-radius: 16px;
    padding: 0 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.text-input:focus {
    border-color: gray;

}

/* Phone Input */
.phone-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #dde1e6;
    border-radius: 16px;
    height: 48px;
    overflow: hidden;
}

.country-code {
    padding: 0 12px;
    font-size: 13px;
    color: #161616;
    background: white;
    display: flex;
    align-items: center;
    height: 100%;
}

.phone-separator {
    width: 1px;
    height: 44px;
    background-color: #dde1e6;
}

.phone-input {
    flex: 1;
    height: 100%;
    border: none;
    outline: none;
    padding: 0 16px;
    font-size: 14px;
    direction: ltr;
    text-align: left;
}

.phone-input-container:focus-within {
    border-color: gray;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    height: 50px;
    background-color: #0007ff;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.submit-btn:hover {
    background-color: #0006dd;
    transform: translateY(-1px);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.submit-text {
    transition: opacity 0.3s ease;
}

.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
}

.submit-btn.loading .submit-text {
    opacity: 0;
}

.submit-btn.loading .loading-spinner {
    display: block;
}

.form-errors {
    margin-top: 10px;
    text-align: center;
}

.error-message {
    color: red;
    font-size: 14px;
    margin-top: 4px;
}


@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 400px) {
    .donation-container {
        padding: 10px;
    }

    .donation-frame {
        width: 100%;
        max-width: 375px;
        height: auto;
        min-height: 100vh;
    }

    .amount-buttons {
        flex-wrap: wrap;
        gap: 6px;
    }

    .amount-btn {
        width: 90px;
        height: 38px;
    }
}

/* Animation for smooth transitions */
.amount-btn,
.text-input,
.amount-input,
.phone-input-container,
.submit-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}