/* ملف CSS محسن بشكل إبداعي وجميل */
/* تم إصلاح مشكلة خطوات التقدم ومشكلة PDF */

/* ----- إصلاح كامل لخطوات التقدم ----- */
.progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0 40px 0;
    padding: 20px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    flex-wrap: nowrap;
    position: relative;
    border: 1px solid #eef2f7;
    overflow-x: auto;
    gap: 5px;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 40px;
    left: 40px;
    height: 3px;
    background: #eef2f7;
    transform: translateY(-50%);
    z-index: 0;
    border-radius: 2px;
}

.progress-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    position: relative;
    padding: 0 8px;
    min-width: 90px;
    z-index: 1;
}

.step {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f0f4f9;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    border: 2px solid #eef2f7;
    z-index: 1;
    font-size: 0.9rem;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
}

.step.active {
    background: linear-gradient(135deg, #2c5aa0, #4a7bc8);
    color: white;
    border-color: #2c5aa0;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.25);
}

.step.completed {
    background: linear-gradient(135deg, #4a7bc8, #6b9be8);
    color: white;
    border-color: #4a7bc8;
    box-shadow: 0 4px 12px rgba(74, 123, 200, 0.25);
}

.step.completed::after {
    content: '✓';
    position: absolute;
    top: -6px;
    left: -6px;
    background: #27ae60;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    color: white;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.step-label {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
    line-height: 1.2;
    font-weight: 500;
    text-align: center;
    max-width: 100px;
    white-space: normal;
    word-break: break-word;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-item.active .step-label {
    color: #2c5aa0;
    font-weight: 600;
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 1200px) {
    .progress-bar {
        padding: 15px;
        gap: 3px;
    }
    
    .progress-item {
        min-width: 80px;
    }
    
    .step {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
    
    .step-label {
        font-size: 0.75rem;
        max-width: 90px;
    }
}

@media (max-width: 992px) {
    .progress-bar {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .progress-bar::before {
        display: none;
    }
    
    .progress-item {
        flex: 0 0 calc(33.333% - 15px);
        margin-bottom: 10px;
        min-width: 70px;
    }
    
    .step {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .step-label {
        font-size: 0.7rem;
        max-width: 80px;
        height: 28px;
    }
}

@media (max-width: 768px) {
    .progress-bar {
        padding: 15px 10px;
        gap: 10px;
    }
    
    .progress-item {
        flex: 0 0 calc(33.333% - 10px);
        min-width: 60px;
    }
    
    .step {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }
    
    .step-label {
        font-size: 0.65rem;
        max-width: 70px;
        height: 26px;
    }
}

@media (max-width: 576px) {
    .progress-bar {
        gap: 8px;
    }
    
    .progress-item {
        flex: 0 0 calc(50% - 8px);
        min-width: 55px;
    }
    
    .step {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .step-label {
        font-size: 0.6rem;
        max-width: 65px;
        height: 24px;
    }
}
/* ----- نهاية إصلاح خطوات التقدم ----- */

:root {
    --primary-color: #2c5aa0;
    --secondary-color: #4a7bc8;
    --accent-color: #e74c3c;
    --light-color: #f5f7fa;
    --dark-color: #2c3e50;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --gradient-primary: linear-gradient(135deg, #2c5aa0, #5a8de0);
    --gradient-secondary: linear-gradient(135deg, #4a7bc8, #7ba5e8);
    --gradient-accent: linear-gradient(135deg, #e74c3c, #ff6b6b);
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 6px 20px rgba(0, 0, 0, 0.08);
    --shadow-strong: 0 8px 30px rgba(0, 0, 0, 0.12);
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --border-radius: 12px;
    --border-radius-circle: 50%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ef 100%);
    color: #333;
    line-height: 1.7;
    font-family: 'Segoe UI', 'Inter', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    min-height: 100vh;
    overflow-x: hidden;
}

/* الهيدر المحسن */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(44, 94, 160, 0.1);
    transition: var(--transition-smooth);
}

.main-header.scrolled {
    padding: 5px 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    letter-spacing: -0.5px;
    position: relative;
    padding: 5px 0;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-accent);
    transition: width 0.5s ease;
    border-radius: 2px;
}

.logo:hover::after {
    width: 100%;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 35px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    transition: var(--transition-smooth);
    font-size: 1rem;
    position: relative;
    padding: 8px 0;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
    border-radius: 1px;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a:hover::before {
    width: 100%;
}

/* المحتوى الرئيسي */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 25px;
    min-height: calc(100vh - 160px);
}

.page-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.3;
    animation: floatBackground 30s linear infinite;
}

@keyframes floatBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 30px); }
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 800;
    position: relative;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-header p {
    font-size: 1.1rem;
    font-weight: 300;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    opacity: 0.9;
}

/* الحاوية الرئيسية للنموذج */
.form-container {
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(44, 94, 160, 0.08);
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background: var(--gradient-primary);
}

/* الخطوات */
.form-step {
    display: none;
    animation: fadeIn 0.5s;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-step h2 {
    color: var(--dark-color);
    margin-bottom: 25px;
    border-bottom: 2px solid #eef2f7;
    padding-bottom: 12px;
    font-weight: 700;
    font-size: 1.6rem;
    position: relative;
}

.form-step h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 80px;
    height: 2px;
    background: var(--gradient-primary);
}

.form-step h3 {
    color: var(--primary-color);
    margin: 20px 0 15px 0;
    font-weight: 600;
    font-size: 1.2rem;
    padding-right: 10px;
    border-right: 4px solid var(--secondary-color);
}

/* مجموعة الحقول */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e6ef;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition-smooth);
    background-color: #fafcff;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: var(--secondary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(74, 123, 200, 0.15);
    background-color: white;
    transform: translateY(-2px);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.form-group i {
    position: absolute;
    left: 15px;
    top: 45px;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

/* الحقول الديناميكية */
.dynamic-field {
    border: 2px dashed #dce4f1;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    background-color: #f9fbfe;
    position: relative;
    transition: var(--transition-smooth);
}

.dynamic-field:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.dynamic-field h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dynamic-field h3 i {
    font-size: 1.1rem;
}

/* رفع الصورة */
.image-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.image-preview {
    width: 180px;
    height: 180px;
    border-radius: var(--border-radius-circle);
    border: 3px dashed #d1d9e8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafd, #eef2f7);
    transition: var(--transition-smooth);
    position: relative;
}

.image-preview:hover {
    border-color: var(--secondary-color);
    transform: scale(1.02);
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius-circle);
}

.image-preview::after {
    content: 'اضغط لرفع الصورة';
    position: absolute;
    bottom: -30px;
    text-align: center;
    width: 100%;
    color: #666;
    font-size: 0.85rem;
}

.upload-btn {
    background: var(--gradient-secondary);
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-weight: 600;
    border: none;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(74, 123, 200, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(74, 123, 200, 0.3);
}

.upload-btn:active {
    transform: translateY(-1px);
}

#imageInput {
    display: none;
}

/* مجموعة التواريخ */
.date-group {
    display: flex;
    gap: 20px;
}

.date-input {
    flex: 1;
    position: relative;
}

/* خيارات الإقامة */
.residence-options {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafd, #f0f4f9);
    border-radius: 10px;
    border: 2px solid #e6ebf5;
    transition: var(--transition-smooth);
}

.residence-options:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 2px solid #e0e6ef;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
}

.radio-label:hover {
    border-color: var(--secondary-color);
    background-color: #f8fafd;
    transform: translateX(-5px);
}

.radio-label input {
    margin-left: 12px;
    width: 18px;
    height: 18px;
}

.radio-label::after {
    content: '';
    position: absolute;
    left: 20px;
    width: 10px;
    height: 10px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius-circle);
    opacity: 0;
    transition: var(--transition-smooth);
}

.radio-label input:checked ~ *::after {
    opacity: 1;
}

/* عرض الحالة */
.status-display {
    padding: 15px;
    border-radius: 10px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.status-display::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
}

.status-display.success {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.status-display.success::before {
    background: #229954;
}

.status-display.warning {
    background: linear-gradient(135deg, #f39c12, #f1c40f);
    color: white;
}

.status-display.warning::before {
    background: #d68910;
}

.status-display.danger {
    background: linear-gradient(135deg, #e74c3c, #ff6b6b);
    color: white;
}

.status-display.danger::before {
    background: #c0392b;
}

/* أزرار التنقل */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eef2f7;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: var(--border-radius-circle);
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 250px;
    height: 250px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(44, 94, 160, 0.25);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(44, 94, 160, 0.35);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #868e96);
    color: white;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.2);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(108, 117, 125, 0.3);
}

.btn-success {
    background: var(--gradient-secondary);
    color: white;
    padding: 15px 30px;
    width: 100%;
    margin-top: 25px;
    box-shadow: 0 5px 15px rgba(74, 123, 200, 0.25);
    font-size: 1.05rem;
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74, 123, 200, 0.35);
}

.btn-danger {
    background: var(--gradient-accent);
    color: white;
    padding: 10px 18px;
    margin-top: 12px;
    display: block;
    width: fit-content;
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.2);
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(231, 76, 60, 0.3);
}

.add-btn {
    margin-top: 15px;
    padding: 10px 20px;
    border: 2px dashed var(--secondary-color);
    background: transparent;
    color: var(--secondary-color);
    transition: var(--transition-smooth);
    font-size: 0.95rem;
}

.add-btn:hover {
    background: rgba(74, 123, 200, 0.1);
    border-style: solid;
}

/* معاينة السيرة الذاتية - إصدار خاص للطباعة */
.cv-preview {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-medium);
    margin-top: 30px;
    display: none;
    overflow: hidden;
    border: 1px solid #eef2f7;
}

.cv-preview.active {
    display: block;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.ats-template {
    font-family: 'Segoe UI', 'Inter', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.ats-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--primary-color);
    position: relative;
}

.ats-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    right: 0;
    width: 120px;
    height: 3px;
    background: var(--gradient-accent);
}

.ats-header h1 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 8px;
    word-wrap: break-word;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.ats-header h2 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    border-bottom: none;
    padding-bottom: 0;
    word-wrap: break-word;
    font-weight: 600;
}

.ats-contact {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 12px;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: var(--border-radius-circle);
    object-fit: cover;
    border: 3px solid var(--secondary-color);
    margin: 0 auto 20px;
    display: block;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.ats-section {
    margin-bottom: 25px;
    page-break-inside: avoid;
    position: relative;
    padding-right: 15px;
}

.ats-section::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.ats-section-title {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f4f9;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ats-experience-item, .ats-education-item {
    margin-bottom: 20px;
    page-break-inside: avoid;
    padding: 15px;
    background: #f9fbfe;
    border-radius: 10px;
    border-right: 4px solid var(--secondary-color);
    transition: var(--transition-smooth);
}

.ats-experience-item:hover, .ats-education-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.ats-experience-title, .ats-education-title {
    font-weight: 700;
    color: var(--dark-color);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.ats-experience-company, .ats-education-institution {
    color: var(--secondary-color);
    font-style: italic;
    font-weight: 500;
    margin-bottom: 6px;
}

.ats-experience-dates, .ats-education-dates {
    color: #777;
    font-size: 0.9rem;
    display: inline-block;
    padding: 3px 10px;
    background: #eef2f7;
    border-radius: 15px;
    margin-top: 5px;
}

.ats-skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ats-skill-tag {
    background: linear-gradient(135deg, #eef2f7, #e4eaf3);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid #dce4f1;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.ats-skill-tag:hover {
    background: linear-gradient(135deg, #e4eaf3, #dae2f0);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.ats-languages-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ats-language-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f9fbfe;
    border-radius: 8px;
}

.ats-language-name {
    margin-left: 12px;
    font-weight: 600;
    min-width: 100px;
    color: var(--dark-color);
}

.ats-language-level {
    color: #777;
    background: #eef2f7;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
}

.ats-links-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ats-link-item a {
    color: var(--secondary-color);
    text-decoration: none;
    word-break: break-all;
    padding: 6px 10px;
    display: block;
    border-radius: 6px;
    transition: var(--transition-smooth);
    border: 1px solid #eef2f7;
}

.ats-link-item a:hover {
    text-decoration: underline;
    background: #f9fbfe;
    border-color: var(--secondary-color);
}

.ats-media-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #f0f4f9;
}

.ats-media-item {
    margin-bottom: 12px;
    padding: 12px;
    background: #f9fbfe;
    border-radius: 8px;
}

.ats-media-name {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--dark-color);
}

/* قسم التحميل */
.download-section {
    text-align: center;
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.download-section .btn {
    min-width: 200px;
    padding: 15px 25px;
    font-size: 1.05rem;
}

/* رسالة النجاح */
.success-message {
    margin-top: 20px;
    animation: fadeIn 0.5s;
    padding: 20px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 6px 15px rgba(39, 174, 96, 0.25);
}

/* التحميل */
.loading {
    display: none;
    text-align: center;
    margin: 25px 0;
}

.loading-spinner {
    border: 4px solid rgba(74, 123, 200, 0.1);
    border-top: 4px solid var(--secondary-color);
    border-radius: var(--border-radius-circle);
    width: 50px;
    height: 50px;
    animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
    margin: 0 auto 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* الفوتر */
.main-footer {
    background: linear-gradient(135deg, var(--dark-color), #34495e);
    color: white;
    margin-top: 50px;
    padding: 30px 0 20px;
    position: relative;
    overflow: hidden;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer-container p {
    opacity: 0.8;
    font-size: 0.95rem;
}

/* تأثيرات إضافية */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(44, 94, 160, 0.3); }
    70% { box-shadow: 0 0 0 12px rgba(44, 94, 160, 0); }
    100% { box-shadow: 0 0 0 0 rgba(44, 94, 160, 0); }
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}

/* شريط التمرير المخصص */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #1e4a7a, #2c5aa0);
}

/* التجاوب */
@media (max-width: 992px) {
    .container {
        padding: 20px;
    }
    
    .page-header h1 {
        font-size: 2.2rem;
    }
    
    .ats-header h1 {
        font-size: 2rem;
    }
    
    .ats-header h2 {
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.1);
        border-top: 1px solid rgba(44, 94, 160, 0.1);
    }
    
    .nav-menu.active {
        display: flex;
        animation: slideDown 0.3s ease;
    }
    
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-20px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .date-group {
        flex-direction: column;
        gap: 0;
    }
    
    .download-section {
        flex-direction: column;
        align-items: center;
    }
    
    .download-section .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .ats-contact {
        flex-direction: column;
        align-items: center;
    }
    
    .ats-header h1 {
        font-size: 1.8rem;
    }
    
    .ats-header h2 {
        font-size: 1.3rem;
    }
    
    .navigation-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .navigation-buttons .btn {
        width: 100%;
    }
    
    .form-step h2 {
        font-size: 1.5rem;
    }
    
    .form-container {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 15px;
    }
    
    .form-container {
        padding: 15px;
    }
    
    .page-header {
        padding: 25px 15px;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .image-preview {
        width: 150px;
        height: 150px;
    }
    
    .profile-image {
        width: 130px;
        height: 130px;
    }
    
    .ats-header h1 {
        font-size: 1.6rem;
    }
    
    .ats-header h2 {
        font-size: 1.2rem;
    }
}

/* =================================================== */
/* أنماط الطباعة المحسنة - إصلاح مشكلة PDF الفاهي */
/* =================================================== */

@media print {
    /* إعدادات الطباعة العامة */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    
    /* إخفاء العناصر غير الضرورية للطباعة */
    .main-header,
    .main-footer,
    .navigation-buttons,
    .download-section,
    .progress-bar,
    .form-container,
    .page-header {
        display: none !important;
    }
    
    /* إظهار معاينة السيرة الذاتية فقط */
    .cv-preview,
    .cv-preview.active {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        padding: 15mm !important;
        margin: 0 !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        background: white !important;
        position: static !important;
        overflow: visible !important;
    }
    
    /* إعادة تعيين الحاوية */
    .container {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        background: white !important;
    }
    
    /* أنماط السيرة الذاتية للطباعة */
    .ats-template {
        font-family: 'Times New Roman', Times, serif !important;
        font-size: 11pt !important;
        line-height: 1.3 !important;
        color: #000000 !important;
        background: white !important;
    }
    
    /* رأس السيرة الذاتية للطباعة */
    .ats-header {
        text-align: center !important;
        margin-bottom: 20px !important;
        padding-bottom: 15px !important;
        border-bottom: 2px solid #000000 !important;
        background: white !important;
    }
    
    .ats-header h1 {
        font-size: 22pt !important;
        color: #000000 !important;
        font-weight: bold !important;
        margin: 10px 0 5px 0 !important;
    }
    
    .ats-header h2 {
        font-size: 16pt !important;
        color: #333333 !important;
        font-weight: 600 !important;
        margin: 0 0 10px 0 !important;
    }
    
    .ats-header p {
        color: #000000 !important;
        font-size: 10pt !important;
        line-height: 1.4 !important;
    }
    
    .ats-contact {
        color: #000000 !important;
        font-size: 9pt !important;
        margin: 10px 0 !important;
    }
    
    .profile-image {
        width: 100px !important;
        height: 100px !important;
        border: 2px solid #000000 !important;
        margin: 0 auto 15px !important;
    }
    
    /* أقسام السيرة الذاتية */
    .ats-section {
        margin-bottom: 15px !important;
        padding: 10px 0 !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    
    .ats-section::before {
        display: none !important;
    }
    
    .ats-section-title {
        font-size: 13pt !important;
        color: #000000 !important;
        font-weight: bold !important;
        border-bottom: 1px solid #000000 !important;
        padding-bottom: 5px !important;
        margin-bottom: 10px !important;
    }
    
    /* عناصر الخبرة والتعليم */
    .ats-experience-item,
    .ats-education-item {
        margin-bottom: 12px !important;
        padding: 10px !important;
        background: #ffffff !important;
        border: 1px solid #cccccc !important;
        border-left: 3px solid #000000 !important;
        border-radius: 0 !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    
    .ats-experience-title,
    .ats-education-title {
        font-size: 11pt !important;
        color: #000000 !important;
        font-weight: bold !important;
        margin: 0 0 3px 0 !important;
    }
    
    .ats-experience-company,
    .ats-education-institution {
        font-size: 10pt !important;
        color: #333333 !important;
        font-style: normal !important;
        margin: 0 0 3px 0 !important;
    }
    
    .ats-experience-dates,
    .ats-education-dates {
        font-size: 9pt !important;
        color: #666666 !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 0 5px 0 !important;
    }
    
    /* المهارات */
    .ats-skills-list {
        gap: 5px !important;
    }
    
    .ats-skill-tag {
        background: #f0f0f0 !important;
        color: #000000 !important;
        border: 1px solid #cccccc !important;
        padding: 3px 8px !important;
        font-size: 9pt !important;
        border-radius: 2px !important;
        margin: 2px !important;
        display: inline-block !important;
    }
    
    /* اللغات */
    .ats-language-item {
        background: #ffffff !important;
        border: 1px solid #eeeeee !important;
        padding: 8px !important;
        margin-bottom: 5px !important;
    }
    
    .ats-language-name {
        font-size: 10pt !important;
        color: #000000 !important;
    }
    
    .ats-language-level {
        font-size: 9pt !important;
        color: #666666 !important;
        background: transparent !important;
    }
    
    /* الروابط */
    .ats-link-item a {
        color: #000000 !important;
        text-decoration: underline !important;
        font-size: 9pt !important;
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
    }
    
    /* التحكم في فواصل الصفحات */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid !important;
        break-after: avoid !important;
    }
    
    p, li, div {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    
    img {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    
    /* إزالة جميع التدرجات والخلفيات الشفافة */
    .page-header,
    .btn-primary,
    .btn-success,
    .status-display,
    [style*="gradient"],
    [class*="gradient"] {
        background: #ffffff !important;
        background-image: none !important;
    }
    
    /* إزالة جميع الظلال */
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    /* تأكد من ظهور الألوان */
    .ats-header::after,
    .ats-section::before,
    .form-container::before {
        display: none !important;
    }
}

/* =================================================== */
/* أنماط خاصة لمعاينة PDF (عرض في المتصفح) */
/* =================================================== */
.cv-preview.pdf-preview {
    background: white !important;
    border: 1px solid #cccccc !important;
    box-shadow: 0 0 10px rgba(0,0,0,0.1) !important;
}

.cv-preview.pdf-preview .ats-header h1 {
    color: #000000 !important;
}

.cv-preview.pdf-preview .ats-header h2 {
    color: #333333 !important;
}

.cv-preview.pdf-preview .ats-section-title {
    color: #000000 !important;
    border-bottom-color: #cccccc !important;
}

.cv-preview.pdf-preview .ats-experience-item,
.cv-preview.pdf-preview .ats-education-item {
    background: #f9f9f9 !important;
    border-color: #dddddd !important;
}

/* تلميحات الطباعة */
.print-tips {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #2c5aa0;
}

.print-tips h4 {
    margin: 0 0 10px 0;
    color: #2c5aa0;
    font-size: 1rem;
}

.print-tips ul {
    margin: 0;
    padding-right: 20px;
    list-style-type: disc;
}

.print-tips li {
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #555;
}