/* 
 * ملف الأنماط الخاص بأجهزة التابلت
 * يطبق على الشاشات من 768px إلى 1023px
 * تم تصميمه وفقاً لأفضل ممارسات الهندسة المعمارية النظيفة
 */

/* إعدادات عامة للتابلت */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    position: relative; /* لضمان وضع الزر العائم بشكل صحيح */
    padding: 15px 20px;
}

/* الحاوي الرئيسي للسيرة الذاتية */
.cv-container {
    max-width: 700px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin: 0 auto;
}

/* قسم الرأس - تخطيط أفقي للتابلت */
.cv-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 30px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 300px;
}

/* الصورة الشخصية */
.profile-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid #3498db;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.05);
    border-color: #e74c3c;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

/* احتياطي للأيقونة في حالة عدم تحميل الصورة */
.profile-image i {
    font-size: 100px;
    color: #ecf0f1;
    opacity: 0.8;
    display: none;
}

/* المعلومات الأساسية */
.basic-info {
    flex: 1;
}

.full-name {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.full-name-english {
    font-size: 18px;
    font-weight: 500;
    color: #7f8c8d;
    margin-bottom: 12px;
    text-align: center;
    font-family: 'Arial', sans-serif;
    font-style: italic;
    direction: ltr;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.job-title {
    font-size: 18px;
    font-weight: 400;
    color: #3498db;
    margin-bottom: 4px;
}

.job-title-english {
    font-size: 16px;
    font-weight: 400;
    color: #7f8c8d;
    margin-bottom: 10px;
    text-align: center;
    font-family: 'Arial', sans-serif;
    direction: ltr;
    font-style: italic;
}

.graduation-info {
    font-size: 15px;
    opacity: 0.9;
    font-weight: 300;
}

/* معلومات الاتصال - تخطيط عمودي مضغوط */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 250px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

.contact-item i {
    color: #3498db;
    width: 18px;
    text-align: center;
}

/* المحتوى الرئيسي */
.cv-main {
    padding: 30px 25px;
}

/* الأقسام العامة */
.cv-section {
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.cv-section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* عناوين الأقسام */
.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 3px solid #3498db;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    right: 0;
    width: 50px;
    height: 3px;
    background: #e74c3c;
    border-radius: 2px;
}

.section-title i {
    color: #3498db;
    font-size: 18px;
}

/* محتوى الأقسام */
.section-content {
    padding: 0 10px;
}

/* قسم الملف الشخصي */
.summary-text {
    font-size: 16px;
    line-height: 1.8;
    text-align: justify;
    color: #555;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 20px;
    border-radius: 15px;
    border-right: 5px solid #3498db;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* قسم التعليم */
.education-item {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 25px;
    border-radius: 18px;
    border-right: 5px solid #3498db;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}



.education-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.education-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}

.degree-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.graduation-year {
    font-size: 16px;
    color: #3498db;
    font-weight: 600;
    background: rgba(52, 152, 219, 0.1);
    padding: 6px 18px;
    border-radius: 25px;
    border: 2px solid rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
}

.graduation-year:hover {
    background: #3498db;
    color: white;
    transform: scale(1.05);
}

.education-details p {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.7;
}

.institution {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 17px;
}

.institution i {
    color: #3498db;
    font-size: 18px;
}

.specialization-description {
    text-align: justify;
    background: rgba(52, 152, 219, 0.05);
    padding: 15px;
    border-radius: 12px;
    border-right: 4px solid #3498db;
    margin: 15px 0;
    font-size: 15px;
}

/* المهارات الأكاديمية */
.academic-skills {
    margin-top: 20px;
}

.skills-section-title {
    font-size: 17px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skills-section-title::before {
    content: '📚';
    font-size: 18px;
}

.academic-skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.academic-skill-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border-radius: 12px;
    border: 1px solid rgba(52, 152, 219, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.academic-skill-item:hover {
    transform: translateY(-3px);
    border-color: #3498db;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
}

.academic-skill-item i {
    color: #3498db;
    font-size: 16px;
    width: 18px;
    text-align: center;
}

.academic-skill-item span {
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

/* قسم الأهداف المهنية */
.goals-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.goal-item {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 25px;
    border-radius: 18px;
    border-right: 5px solid #3498db;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.goal-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.short-term {
    border-right-color: #e74c3c;
}

.medium-term {
    border-right-color: #f39c12;
}

.long-term {
    border-right-color: #27ae60;
}

.goal-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.goal-header i {
    font-size: 24px;
    color: #3498db;
}

.short-term .goal-header i {
    color: #e74c3c;
}

.medium-term .goal-header i {
    color: #f39c12;
}

.long-term .goal-header i {
    color: #27ae60;
}

.goal-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    flex: 1;
}

.goal-timeline {
    font-size: 14px;
    color: #7f8c8d;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: 500;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.goal-content p {
    font-size: 16px;
    line-height: 1.7;
    color: #555;
    margin: 0;
    text-align: justify;
}

/* قسم المهارات التقنية */
.skills-category {
    margin-bottom: 25px;
}

.skills-category-title {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin-bottom: 15px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.3);
}

/* شبكة المهارات - تخطيط شبكي للتابلت */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-radius: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: right 0.6s ease;
}

.skill-item:hover::before {
    right: 100%;
}

.skill-item.expert {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: 2px solid #58d68d;
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
}

.skill-item.intermediate {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.skill-item i {
    font-size: 22px;
    width: 28px;
    text-align: center;
}

.skill-item span {
    font-size: 16px;
    font-weight: 500;
    flex: 1;
}

/* مستويات المهارات */
.skill-level {
    width: 80px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.skill-level::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    background: white;
    border-radius: 3px;
    animation: fillLevel 2s ease-out forwards;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.expert-level::after {
    width: 90%;
}

.intermediate-level::after {
    width: 70%;
}

/* تأثيرات الحركة */
@keyframes fillLevel {
    from {
        width: 0;
    }
}

/* تنسيق خاص لبطاقات العناوين */
.expert-category .skills-category-title {
    background: linear-gradient(135deg, #d35400, #e67e22);
    color: white;
    border: 2px solid #f39c12;
    box-shadow: 0 8px 25px rgba(211, 84, 0, 0.3);
}

.intermediate-category .skills-category-title {
    background: linear-gradient(135deg, #d35400, #e67e22);
    color: white;
    border: 2px solid #f39c12;
    box-shadow: 0 8px 25px rgba(211, 84, 0, 0.3);
}

/* تأثيرات التفاعل */
.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.skill-item:active {
    transform: translateY(-3px) scale(0.98);
}

/* تحسينات للتابلت الصغير */
@media (max-width: 900px) {
    .cv-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-section {
        justify-content: center;
        min-width: auto;
    }
    
    .contact-info {
        align-items: center;
        min-width: auto;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* قسم المشاريع */
.projects-category {
    margin-bottom: 30px;
}

.projects-category-title {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin-bottom: 18px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    border-radius: 25px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.3);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.project-item {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 20px;
    border-radius: 15px;
    border-right: 5px solid #9b59b6;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.project-item.featured {
    border-right-color: #e74c3c;
    background: linear-gradient(135deg, #fff5f5, #f0f8ff);
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.project-title {
    font-size: 17px;
    font-weight: 600;
    color: #2c3e50;
    flex: 1;
}

.project-type {
    font-size: 13px;
    color: #9b59b6;
    font-weight: 500;
    background: rgba(155, 89, 182, 0.1);
    padding: 4px 12px;
    border-radius: 15px;
    border: 1px solid rgba(155, 89, 182, 0.3);
}

.project-description {
    margin-bottom: 15px;
}

.project-description p {
    font-size: 14px;
    line-height: 1.7;
    color: #666;
    text-align: justify;
}

.project-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    font-size: 12px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.3);
}

/* قسم نقاط القوة */
.strengths-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.strength-item {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    border-right: 5px solid #f39c12;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.strength-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.strength-item i {
    font-size: 32px;
    color: #f39c12;
    margin-bottom: 15px;
    display: block;
}

.strength-item h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.strength-item p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* تحسينات للتابلت في الوضع العمودي */
@media (max-width: 820px) {
    .education-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .graduation-year {
        align-self: flex-start;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-type {
        align-self: flex-start;
    }
}

/* تنسيق الفوتر للأجهزة اللوحية */
.cv-footer {
    padding: 35px 25px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    text-align: left;
    margin-bottom: 25px;
}

.footer-section h4 {
    font-size: 18px;
    color: #3498db;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
    margin-bottom: 18px;
}

.footer-contact {
    gap: 12px;
}

.footer-link {
    font-size: 15px;
    justify-content: flex-start;
    padding: 10px 0;
    background: transparent;
    border-radius: 0;
    max-width: none;
}

.footer-link:hover {
    background: transparent;
    transform: translateX(5px);
}

.footer-link i {
    font-size: 15px;
    color: #3498db;
    margin-left: 0;
    margin-right: 12px;
}

.footer-info p {
    font-size: 14px;
    margin-bottom: 10px;
    color: #bdc3c7;
    line-height: 1.6;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid #34495e;
    text-align: center;
}

.copyright {
    font-size: 15px;
    color: #ecf0f1;
    margin-bottom: 6px;
    text-align: center;
}

.footer-note {
    font-size: 13px;
    color: #95a5a6;
}

/* تحسينات للأجهزة اللوحية في الوضع العمودي */
@media (max-width: 820px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 25px;
    }

    .footer-link {
        justify-content: center;
    }

    .footer-link:hover {
        transform: translateY(-2px);
    }
}

/* تنسيقات زر WhatsApp العائم */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 55px;
    height: 55px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 28px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #128C7E;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.whatsapp-icon {
    margin-top: 3px;
}
