:root {
    --primary-blue: #1a2e5a;
    --light-bg: #eef4fc;
    --green-btn: #457b5c;
    --green-btn-hover: #366149;
    --text-color: #333;
    --gray-border: #ccc;
}

body {
    font-family: 'Heebo', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--light-bg);
    color: var(--text-color);
    direction: rtl;
}

/* Full-width bar that hosts the logos above the header. Background color is
   driven by --logo-bg, which defaults (in form.ejs) to --primary-blue so existing
   pages keep their original look until an admin sets a separate logo color. */
.logo-bar {
    width: 100%;
    background-color: var(--logo-bg, var(--primary-blue));
    padding: 20px 15px;
    box-sizing: border-box;
}

/* Partner logo is rendered first, site logo right after, with no padding between them. */
.header-logos {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.partner-logo,
.site-logo {
    text-align: center;
    padding: 0;
    margin: 0;
    line-height: 0;
}

.partner-logo img,
.site-logo img {
    display: inline-block;
    max-width: 100%;
    height: auto;
}

/* Header Section */
header {
    background-color: var(--primary-blue);
    color: white;
    text-align: center;
    padding: 30px 15px;
    border-bottom: 5px solid #fff;
}

header h1 {
    font-size: 2.5rem;
    margin: 0;
    font-weight: 900;
    line-height: 1.2;
}

header .amount {
    position: relative;
    display: inline-block;
}

/* Green underline effect */
header .amount::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: #4CAF50;
    border-radius: 2px;
    transform: rotate(-2deg);
}

header h2 {
    font-size: 1.8rem;
    margin-top: 10px;
    font-weight: 700;
}

/* Main Container */
.container {
    max-width: 800px;
    margin: -30px auto 50px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    padding: 40px 20px;
    position: relative;
    z-index: 10;
}

.intro-text {
    text-align: center;
    color: var(--primary-blue);
}

.intro-text h3 {
    font-size: 1.6rem;
    margin-bottom: 5px;
}

.intro-text p {
    font-size: 0.95rem;
    color: #666;
    margin-top: 0;
}

/* Progress Bar */
.progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0 50px 0;
    position: relative;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.progress-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
    transform: translateY(-50%);
}

.step-indicator {
    width: 30px;
    height: 30px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #999;
    z-index: 2;
    position: relative;
    transition: all 0.3s ease;
}

.step-indicator.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
}

.step-indicator.completed {
    background: var(--green-btn);
    border-color: var(--green-btn);
    color: white;
}

/* Form Styling */
.form-step {
    display: none; /* Hidden by default */
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    animation: fadeIn 0.5s;
}

.form-step.active-step {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

label {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #000;
}

input[type="text"],
input[type="tel"],
input[type="number"],
select {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border: 1px solid var(--gray-border);
    border-radius: 5px;
    box-sizing: border-box;
    font-family: 'Heebo', sans-serif;
    margin-bottom: 10px;
}

.radio-group {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 1.1rem;
    cursor: pointer;
}

.fullname-split {
    display: flex;
    gap: 10px;
}

.fullname-split input {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.btn-next {
    background-color: var(--green-btn);
    color: white;
    border: none;
    width: 100%;
    padding: 15px;
    font-size: 1.3rem;
    font-weight: 700;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s;
}

.btn-next:hover {
    background-color: var(--green-btn-hover);
}

.error-msg {
    color: #d93025;
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
    text-align: right;
}

/* Footer / Disclaimers */
.disclaimer {
    text-align: center;
    font-size: 0.75rem;
    color: #777;
    margin-top: 30px;
    line-height: 1.5;
}

.security-badges {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    color: #555;
    font-size: 0.9rem;
    font-weight: 600;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-check {
    color: var(--green-btn);
    font-size: 1.5rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.legal-content {
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.8;
    font-size: 1rem;
    color: var(--text-color);
}

.legal-content p {
    margin-bottom: 15px;
}

.legal-content h1,
.legal-content h2,
.legal-content h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--primary-blue);
}

.legal-content ul,
.legal-content ol {
    margin: 15px 0;
    padding-right: 30px;
}

.legal-content li {
    margin-bottom: 8px;
}

/* Thank You Section */
.thank-you-section {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thank-you-content {
    text-align: center;
    padding: 40px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.thank-you-content h1 {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
    font-weight: 900;
}

.thank-you-message {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 15px;
    line-height: 1.6;
}

.thank-you-sub-message {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
}

/* Submit disclaimer (short sentence above the regulatory disclaimer) */
.submit-disclaimer {
    text-align: center;
    font-size: 0.85rem;
    color: #555;
    margin-top: 25px;
    line-height: 1.6;
}

/* Consent checkbox above submit button */
.consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: right;
    margin: 20px 0 10px;
    padding: 12px 14px;
    background: #f7f9fc;
    border: 1px solid #e1e7f0;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-color);
    cursor: pointer;
    font-weight: 400;
}

.consent-checkbox input[type="checkbox"] {
    margin-top: 4px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--green-btn);
}

.consent-checkbox .consent-text {
    flex: 1;
}

.consent-checkbox a {
    color: var(--primary-blue);
    text-decoration: underline;
}

.consent-checkbox a:hover {
    color: var(--green-btn);
}
