/* CSS Variables for Theming */
:root {
    /* Colors - Light Theme */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;

    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #e2e8f0;

    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    /* Border & Shadow */
    --border-color: #e2e8f0;
    --border-radius: 8px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Typography */
    --font-family: 'Cairo', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 900;

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
}

/* Dark Theme */
[data-theme="dark"] {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #94a3b8;
    --accent-color: #f59e0b;

    /* Background Colors */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;

    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;

    /* Border & Shadow */
    --border-color: #334155;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-md);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.section {
    padding: var(--spacing-2xl) 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

h1 {
    font-size: var(--font-size-3xl);
}

h2 {
    font-size: var(--font-size-2xl);
}

h3 {
    font-size: var(--font-size-xl);
}

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-family: var(--font-family);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    gap: var(--spacing-sm);
}

.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Full width button in step 6 */
.btn-full {
    width: 100%;
    margin-bottom: var(--spacing-md);
}

/* Header & Navigation */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    transition: background-color var(--transition-normal);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) 0;
    position: relative;
}

.nav-logo img {
    height: 40px;
    width: auto;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: var(--font-weight-semibold);
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-fast);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
}

/* Language Switcher */
.language-switcher {
    position: relative;
    display: inline-block;
    z-index: 200;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.language-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 140px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    display: none;
    flex-direction: column;
    z-index: 1000;
    margin-top: var(--spacing-xs);
}

.language-dropdown.show {
    display: flex;
}

.language-dropdown button {
    background: none;
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: center;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    transition: all var(--transition-fast);
}

.language-dropdown button:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: var(--font-size-xl);
    color: var(--text-primary);
    cursor: pointer;
}

/* Registration Header */
.registration-header {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-2xl) 0;
}

.registration-header h1 {
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
}
.registration-header p {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--spacing-xl);
    font-size: var(--font-size-lg);
}


.registration-progress {
    display: flex;
    justify-content: space-between;
    position: relative;
    max-width: 600px;
    margin: var(--spacing-lg) auto 0;
    padding: 0 var(--spacing-md); /* Add padding to prevent steps from touching container edges */
}

.registration-progress::before {
    content: '';
    position: absolute;
    top: calc(40px / 2); /* Half height of step-number */
    left: var(--spacing-lg);
    right: var(--spacing-lg);
    height: 2px;
    background-color: var(--border-color);
    transform: translateY(-50%);
    z-index: 1;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    color: var(--text-muted);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-sm);
    transition: all var(--transition-normal);
}

.progress-step.active .step-number {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.step-label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-muted);
    text-align: center;
}

.progress-step.active .step-label {
    color: var(--primary-color);
}

/* Registration Form */
.registration-form {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md); /* Use md for the main container */
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
    border: 1px solid var(--border-color); /* Added subtle border */
}

.multi-step-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-step {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-step h2 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--bg-tertiary);
    padding-bottom: var(--spacing-sm);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Adjusted minmax for better spacing */
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full { /* Used 'full' instead of 'full-width' from original */
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: var(--font-size-md);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: all var(--transition-fast);
    /* For file inputs, make them look nice */
    appearance: none;
    -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-nav {
    display: flex;
    justify-content: space-between; /* Space out previous and next buttons */
    margin-top: var(--spacing-xl);
}
.form-nav .next-btn:only-child {
    margin-left: auto; /* If only next button exists (like in step 1), push it right */
}

/* File Upload Specific Styling */
input[type="file"] {
    /* Hide the default file input text area */
    color: transparent;
}
input[type="file"]::file-selector-button {
    /* Style the file selector button */
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    background-color: var(--primary-color);
    color: white;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    margin-right: var(--spacing-md);
    transition: all var(--transition-fast);
}
input[type="file"]::file-selector-button:hover {
    background-color: var(--primary-dark);
}

/* PACKAGE SELECTION (Step 5) */
.packages-select {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.packages-select label {
    cursor: pointer;
    display: block;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    transition: all var(--transition-fast);
    text-align: center;
    background-color: var(--bg-secondary);
}

.packages-select label:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.packages-select input[type="radio"] {
    display: none; /* Hide the default radio button */
}

/* Highlight the selected package */
.packages-select input[type="radio"]:checked + .package-option {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    background-color: var(--bg-primary); /* Light background for contrast */
    color: var(--primary-color);
    font-weight: var(--font-weight-bold);
}

.package-option {
    display: block;
    padding: 0;
    margin: 0;
    font-size: var(--font-size-md);
}

/* REVIEW STEP (Step 6) */
#reviewContainer {
    margin-bottom: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.review-box {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

.review-box h3 {
    color: var(--primary-color);
    font-size: var(--font-size-lg);
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.review-box p {
    margin-bottom: var(--spacing-xs);
    font-size: var(--font-size-md);
    color: var(--text-secondary);
}

.review-box b {
    color: var(--text-primary);
    font-weight: var(--font-weight-semibold);
    display: inline-block;
    min-width: 150px; /* Align data */
}

/* Footer */
.footer {
    background-color: var(--bg-secondary);
    padding: var(--spacing-2xl) 0 var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-logo img {
    height: 40px;
    width: auto;
    margin-bottom: var(--spacing-md);
}

.footer-description {
    color: var(--text-secondary);
    max-width: 300px;
}

.footer-title {
    font-size: var(--font-size-lg);
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-contact p {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

.footer-contact i {
    color: var(--primary-color);
    min-width: 20px;
    padding-top: 3px;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: var(--spacing-lg);
}

.footer-bottom-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
}

.footer-bottom p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

.footer-legal {
    display: flex;
    gap: var(--spacing-lg);
}

.footer-legal a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-legal a:hover {
    color: var(--primary-color);
}

/* Utility Classes & Components Cleanup (Removed unused classes) */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-0 { margin-top: 0; }

/* Dark Mode Toggle & Back to Top */
.dark-mode-toggle {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
}

.back-to-top {
    position: fixed;
    bottom: var(--spacing-xl);
    right: var(--spacing-xl);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    z-index: 99;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.back-to-top:hover {
    transform: translateY(-5px);
}

.back-to-top.show {
    display: flex;
}

/* Loading Overlay (Corrected implementation) */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s cubic-bezier(0.5, 0, 0.5, 1) infinite; /* Used better spin timing */
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Form Validation Styles (Increased specificity for reliability) */
.form-group.error input,
.form-group.error select,
.form-group.error textarea,
input.error,
select.error,
textarea.error {
    border-color: var(--error-color) !important; /* Use !important only when necessary */
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-group.error label {
    color: var(--error-color);
}

/* SweetAlert Customization */
.swal-custom {
    font-size: var(--font-size-md) !important;
    border-radius: 12px !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-list, .nav-actions {
        /* Mobile menu styles */
        display: none;
    }

    .nav-toggle {
        display: block;
        z-index: 101;
    }

    /* Adjust language switcher position on tablet */
    .language-switcher {
        position: absolute;
        top: var(--spacing-sm);
        right: var(--spacing-2xl);
    }
}

@media (max-width: 768px) {
    :root {
        --font-size-3xl: 1.5rem;
        --font-size-2xl: 1.25rem;
        --font-size-xl: 1.125rem;
        --spacing-lg: 1rem;
        --spacing-xl: 1.25rem;
        --spacing-2xl: 2rem;
    }

    .container {
        padding: 0 var(--spacing-md);
    }

    /* Progress Bar Stacked */
    .registration-progress {
        flex-direction: column;
        gap: var(--spacing-lg);
        align-items: flex-start;
    }

    .registration-progress::before {
        display: none;
    }

    .progress-step {
        flex-direction: row;
        gap: var(--spacing-md);
        width: 100%; /* Make steps fill width for better tapping area */
    }

    .step-label {
        font-size: var(--font-size-md);
    }

    .registration-form {
        padding: var(--spacing-md);
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .form-group label {
        margin-bottom: 4px;
    }

    /* Prevent mobile zoom */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
        padding: 10px 12px;
    }

    .form-nav {
        flex-direction: column-reverse; /* Previous button on top */
        gap: var(--spacing-md);
    }
    .form-nav button {
        width: 100%;
    }
    .form-nav .next-btn:only-child {
        margin-left: 0;
    }

    .packages-select {
        grid-template-columns: 1fr;
    }

    .review-box p {
        flex-direction: column;
    }

    .review-box b {
        min-width: unset;
        display: block;
        margin-bottom: var(--spacing-xs);
    }
}

@media (max-width: 480px) {
    .section {
        padding: var(--spacing-lg) 0;
    }

    .registration-header {
        padding: var(--spacing-xl) 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    header, .header, .nav, .dark-mode-toggle, .back-to-top,
    .registration-header, .registration-progress, .form-nav,
    .footer, .modal, .language-dropdown, .language-switcher {
        display: none !important;
    }
    body {
        background-color: #fff !important;
        color: #000 !important;
    }
    .registration-form { box-shadow: none !important; padding: 0 !important; border: none !important; }
    #reviewContainer {
        display: block !important;
        padding: 0;
        margin: 0;
    }
    .review-box {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        background: #fff !important;
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }
    .review-box h3 {
        color: #000 !important;
        border-bottom: 1px solid #000 !important;
    }
}
/* Mobile-First Fixes */
body { padding-bottom: 80px; background-color: #f8fafc; font-family: 'Poppins', 'Cairo', sans-serif; }

/* شريط التقدم العلوي */
.mobile-progress-bar {
    position: fixed; top: 0; left: 0; width: 100%; height: 4px; z-index: 1100; background: #e2e8f0;
}
.mobile-progress-fill {
    height: 100%; background: #2563eb; width: 0%; transition: width 0.3s ease;
}

/* ============================== */
/* 🔥 NEW HEADER STYLES 🔥        */
/* ============================== */
.reg-header {
    background: white;
    padding: 10px 15px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Buttons (Home & Lang) */
.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s;
    cursor: pointer;
}
.icon-btn:active { background-color: #f1f5f9; transform: scale(0.95); }

/* Language Specific */
.lang-wrapper { position: relative; }
.lang-btn {
    width: auto;
    padding: 0 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    gap: 5px;
}

/* Dropdown Menu */
.lang-dropdown {
    position: absolute;
    top: 115%;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1001;
}
.lang-dropdown.show { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-option {
    padding: 10px 15px;
    font-size: 0.9rem;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    display: flex; align-items: center; gap: 8px;
}
.lang-option:last-child { border-bottom: none; }
.lang-option:active { background: #f8fafc; color: #2563eb; }

/* Step Counter Badge */
.step-badge {
    background: #eff6ff;
    color: #2563eb;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-left: 5px;
}

/* ============================== */
/* EXISTING FORM STYLES           */
/* ============================== */
.input-wrapper {
    position: relative; display: flex; align-items: center;
    background: #fff; border: 1px solid #cbd5e1; border-radius: 12px;
    padding: 0 15px; margin-top: 5px; height: 55px;
    transition: border-color 0.3s;
}
.input-wrapper:focus-within { border-color: #2563eb; box-shadow: 0 0 0 4px rgba(37,99,235,0.1); }
.input-wrapper i { color: #64748b; font-size: 1.2rem; margin-right: 10px; }
.input-wrapper input, .input-wrapper select {
    border: none; outline: none; width: 100%; height: 100%;
    font-size: 16px; background: transparent;
}

.package-card-label {
    display: block; position: relative;
    background: #fff; border: 2px solid #e2e8f0; border-radius: 16px;
    padding: 20px; margin-bottom: 15px; cursor: pointer;
    transition: all 0.2s;
}
.package-card-label input { position: absolute; opacity: 0; }
.package-card-label:has(input:checked) {
    border-color: #2563eb; background-color: #eff6ff; transform: scale(1.02);
}
.pkg-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.pkg-title { font-weight: bold; font-size: 1.1rem; color: #1e293b; }
.pkg-icon { color: #2563eb; font-size: 1.5rem; }

.upload-zone {
    border: 2px dashed #cbd5e1; border-radius: 16px; background: #fff;
    padding: 20px; text-align: center; margin-bottom: 15px; position: relative;
}
.upload-zone input {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; z-index: 2;
}
.upload-icon { font-size: 2rem; color: #2563eb; margin-bottom: 10px; }
.file-status { font-size: 0.85rem; color: #2563eb; margin-top: 5px; font-weight: 600; }

.fixed-bottom-actions {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: #fff; padding: 15px 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
    z-index: 999; display: flex; gap: 15px;
    padding-bottom: calc(15px + env(safe-area-inset-bottom));
}
.btn-mobile {
    flex: 1; height: 50px; border-radius: 12px; font-weight: 600; font-size: 1rem;
    display: flex; align-items: center; justify-content: center; gap: 8px; border: none;
}
.btn-next-mob { background: #2563eb; color: white; }
.btn-prev-mob { background: #f1f5f9; color: #475569; }
.hide { display: none !important; }


/* =========================================
   PREMIUM LANGUAGE SWITCHER (App Style)
   ========================================= */

/* 1. Wrapper to hold position */
.lang-wrapper {
    position: relative;
    z-index: 2000; /* High z-index to sit above everything */
}

/* 2. The Toggle Button */
#langToggleBtn {
    width: 42px;
    height: 42px;
    border-radius: 12px; /* Soft Square */
    background: #ffffff;
    border: 1px solid #f1f5f9;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

/* Hover & Active Effects */
#langToggleBtn:active {
    transform: scale(0.92);
}

/* When Menu is OPEN (Add this class via JS if possible, or just rely on focus) */
.lang-wrapper:focus-within #langToggleBtn {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* 3. The Dropdown Menu */
#langDropdown {
    position: absolute;
    top: 130%; /* Slight gap below button */
    right: 0;
    width: 160px;
    background: rgba(255, 255, 255, 0.95); /* Slightly transparent */
    backdrop-filter: blur(10px); /* Glass Effect */
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    box-shadow:
            0 10px 30px -5px rgba(0, 0, 0, 0.15),
            0 0 0 1px rgba(0,0,0,0.02); /* Crisp border */
    padding: 8px;

    /* ANIMATION START STATE */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.95);
    transform-origin: top right;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); /* Bouncy Animation */
}

/* 4. Show State (Toggled by JS) */
#langDropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* 5. Dropdown Items */
.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    color: #334155;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

/* Flags styling */
.lang-option::before {
    font-size: 1.2rem;
}

/* Add flags via CSS content (Optional - or keep them in HTML) */
/* This makes the text align perfectly */

/* Hover Item Effect */
.lang-option:hover {
    background: #f8fafc;
    color: #2563eb;
    transform: translateX(3px); /* Subtle slide */
}

.lang-option:active {
    background: #eff6ff;
}

/* Selected Item Indicator (Optional) */
.lang-option.active-lang {
    background: #eff6ff;
    color: #2563eb;
}
/* ============================================================
   FIX LANGUAGE BUTTON STYLE (Like Index Page)
   تعديل زر اللغة ليصبح مثل الصفحة الرئيسية
   ============================================================ */

/* 1. إلغاء الشكل الدائري وتحويله لشكل مستطيل بحواف دائرية */
#langToggleBtn {
    width: auto !important;  /* السماح للعرض بالتمدد حسب النص */
    height: 42px !important; /* ارتفاع مناسب */
    border-radius: 50px !important; /* حواف دائرية كاملة */
    padding: 0 15px !important; /* مساحة داخلية للنص */

    /* تنسيق العناصر الداخلية (أيقونة - نص - سهم) */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important; /* مسافة بين الأيقونات والنص */

    /* الألوان والخلفية مثل الصورة */
    background-color: #f1f5f9 !important; /* خلفية رمادية فاتحة جداً */
    border: 1px solid #e2e8f0 !important; /* حدود خفيفة */
    color: #334155 !important; /* لون النص */
    font-weight: 600 !important;
    box-shadow: none !important; /* إزالة الظل القوي إن وجد */
}

/* 2. تنسيق النص (EN / AR / FR) */
#currentLangLabel {
    display: inline-block !important; /* إظهار النص */
    font-size: 0.9rem !important;
    margin-top: 2px; /* تعديل بسيط للمحاذاة */
}

/* 3. تنسيق السهم الصغير */
#langToggleBtn .fa-chevron-down {
    display: inline-block !important; /* التأكد من ظهور السهم */
    font-size: 0.75rem !important; /* حجم صغير للسهم */
    opacity: 0.7;
}

/* 4. تأثير عند الضغط */
#langToggleBtn:active {
    background-color: #e2e8f0 !important;
    transform: scale(0.98);
}

/* 5. إخفاء زر اللغة القديم الدائري إذا كان هناك تداخل */
.icon-btn.lang-btn {
    width: auto !important; /* التأكيد على إلغاء العرض الثابت */
}