/* Main Theme Styling */
body {
    font-family: 'Cairo', 'Montserrat', Arial, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
    color: #222;
    margin: 0;
}

/* Header Styling */
.main-header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 1rem 0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.logo {
    height: 60px;
}

.header-text {
    text-align: center;
}

.header-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3a4b;
    margin: 0;
    letter-spacing: 1px;
}

.header-subtitle {
    color: #2563eb;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 600;
}

/* Language Switcher */
.language-switcher {
    margin-left: 1rem;
}

.language-switcher .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    min-width: 50px;
}

[dir="ltr"] .language-switcher {
    margin-left: 0;
    margin-right: 1rem;
}

/* Main Card Styling */
.main-card {
    border: none;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

.card-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 16px 16px 0 0 !important;
    padding: 2rem;
}

/* Progress Steps Styling */
.progress-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    position: relative;
}

.progress-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #e2e8f0;
    z-index: 1;
}

/* Mobile step counter */
.mobile-step-counter {
    display: none;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2563eb;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: #f1f5f9;
    border-radius: 8px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    background: #f8fafc;
    padding: 0 15px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background-color: #2563eb;
    color: white;
}

.progress-step.active .step-label {
    color: #2563eb;
}

.progress-step.completed .step-number {
    background-color: #059669;
    color: white;
}

.progress-step.completed .step-label {
    color: #059669;
}

/* Form Steps */
.form-step {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

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

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

/* Form Styling */
.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    padding: 0.75rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus, .form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.form-check-input:checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc2626;
}

.form-control.is-invalid, .form-select.is-invalid {
    border-color: #dc2626;
}

/* Button Styling */
.btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background-color: #2563eb;
    border-color: #2563eb;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

.btn-success {
    background-color: #059669;
    border-color: #059669;
}

.btn-success:hover {
    background-color: #047857;
    border-color: #047857;
}

/* Alert Styling */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Form Text Styling */
.form-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Modal Styling */
.modal-content {
    border-radius: 15px;
    border: none;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .progress-container {
        display: none !important; /* Hide full progress steps on mobile */
    }
    
    .mobile-step-counter {
        display: block; /* Show mobile step counter */
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .header-title {
        font-size: 1.5rem;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .header-content {
        justify-content: center;
        text-align: center;
        gap: 0.5rem;
    }
    
    [dir="ltr"] .header-content {
        flex-direction: column;
        justify-content: center;
    }
    
    .language-switcher {
        margin: 0.5rem 0;
        order: -1;
    }
    
    .logo {
        height: 50px;
    }
    
    .header-title {
        font-size: 1.3rem;
    }
    
    .header-subtitle {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        align-items: center;
    }
    
    .language-switcher {
        margin: 0.25rem 0;
    }
    
    .mobile-step-counter {
        font-size: 1rem;
    }
}

/* RTL Specific Styles */
[dir="rtl"] .float-start {
    float: left !important;
}

[dir="rtl"] .float-end {
    float: right !important;
}

[dir="rtl"] .form-check {
    padding-right: 1.5em;
    padding-left: 0;
}

[dir="rtl"] .form-check-input {
    margin-right: -1.5em;
    margin-left: 0;
}

/* Font adjustments for different languages */
[dir="ltr"] body {
    font-family: 'Montserrat', 'Cairo', Arial, sans-serif;
}

[dir="rtl"] body {
    font-family: 'Cairo', 'Montserrat', Arial, sans-serif;
}

/* Button direction adjustments */
[dir="ltr"] #prevBtn i {
    order: 1;
    margin-left: 0.5rem;
    margin-right: 0;
}

[dir="ltr"] #prevBtn i.fa-arrow-right:before {
    content: "\f060"; /* fa-arrow-left */
}

[dir="ltr"] #nextBtn i {
    order: -1;
    margin-right: 0.5rem;
    margin-left: 0;
}

[dir="ltr"] #nextBtn i.fa-arrow-left:before {
    content: "\f061"; /* fa-arrow-right */
}

/* Progress steps adjustments */
[dir="ltr"] .progress-container {
    flex-direction: row-reverse;
}
