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

/* إعدادات عامة للهواتف المحمولة */
* {
  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: 8px 12px;
}

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

/* قسم الرأس - تخطيط عمودي للهواتف */
.cv-header {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  padding: 20px 15px;
  text-align: center;
}

.profile-section {
  margin-bottom: 20px;
}

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

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

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

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

/* المعلومات الأساسية */
.basic-info {
  margin-bottom: 20px;
}

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

.full-name-english {
  font-size: 16px;
  font-weight: 500;
  color: #7f8c8d;
  margin-bottom: 8px;
  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: 16px;
  font-weight: 400;
  color: #3498db;
  margin-bottom: 3px;
}

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

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

/* معلومات الاتصال - تخطيط عمودي */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  width: 100%;
  max-width: 280px;
  justify-content: center;
}

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

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

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

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

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

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

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

/* قسم الملف الشخصي */
.summary-text {
  font-size: 14px;
  line-height: 1.8;
  text-align: justify;
  color: #555;
  background: #f8f9fa;
  padding: 15px;
  border-radius: 10px;
  border-right: 4px solid #3498db;
}

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

.education-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
}

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

.graduation-year {
  font-size: 14px;
  color: #3498db;
  font-weight: 600;
  align-self: flex-start;
  background: rgba(52, 152, 219, 0.1);
  padding: 4px 12px;
  border-radius: 15px;
  border: 2px solid rgba(52, 152, 219, 0.3);
}

.education-details p {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
  line-height: 1.6;
}

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

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

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

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

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

.skills-section-title::before {
  content: "📚";
  font-size: 16px;
}

.academic-skills-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

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

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

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

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

.skills-category-title {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: white;
  border-radius: 20px;
  text-align: center;
}

/* شبكة المهارات - تخطيط عمودي للهواتف */
.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-radius: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

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

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

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

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

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

.skill-level::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  background: white;
  border-radius: 2px;
  animation: fillLevel 2s ease-out forwards;
}

.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 6px 20px 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 6px 20px rgba(211, 84, 0, 0.3);
}

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

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

/* تحسينات إضافية للهواتف */
@media (max-width: 480px) {
  .cv-container {
    border-radius: 10px;
    margin: 5px;
  }

  .cv-header {
    padding: 15px 10px;
  }

  .cv-main {
    padding: 15px 10px;
  }

  .full-name {
    font-size: 20px;
  }

  .job-title {
    font-size: 14px;
  }

  .section-title {
    font-size: 16px;
  }

  .summary-text {
    font-size: 13px;
    padding: 12px;
  }
}

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

.projects-category-title {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin-bottom: 15px;
  padding: 10px 15px;
  background: linear-gradient(135deg, #9b59b6, #8e44ad);
  border-radius: 20px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.project-item {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 12px;
  border-right: 4px solid #9b59b6;
  transition: all 0.3s ease;
}

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

.project-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.project-header {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}

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

.project-type {
  font-size: 12px;
  color: #9b59b6;
  font-weight: 500;
  background: rgba(155, 89, 182, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  align-self: flex-start;
}

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

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

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

.tech-tag {
  font-size: 11px;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 500;
}

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

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

.goal-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px 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;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.goal-header i {
  font-size: 20px;
  color: #3498db;
  align-self: flex-start;
}

.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: 16px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
}

.goal-timeline {
  font-size: 12px;
  color: #7f8c8d;
  background: rgba(255, 255, 255, 0.8);
  padding: 4px 8px;
  border-radius: 10px;
  align-self: flex-start;
  font-weight: 500;
}

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

/* قسم نقاط القوة */
.strengths-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.strength-item {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  padding: 15px;
  border-radius: 12px;
  text-align: center;
  border-right: 4px solid #f39c12;
  transition: all 0.3s ease;
}

.strength-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

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

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

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

/* تحسينات للشاشات الصغيرة جداً */
@media (max-width: 360px) {
  body {
    padding: 5px;
  }

  .profile-image i {
    font-size: 60px;
  }

  .full-name {
    font-size: 18px;
  }

  .contact-item {
    font-size: 12px;
    padding: 6px 10px;
  }

  .project-item {
    padding: 12px;
  }

  .project-title {
    font-size: 14px;
  }

  .project-description p {
    font-size: 12px;
  }

  .tech-tag {
    font-size: 10px;
    padding: 2px 6px;
  }
}

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

.footer-content {
  grid-template-columns: 1fr;
  gap: 20px;
  text-align: center;
  margin-bottom: 20px;
}

.footer-section h4 {
  font-size: 16px;
  margin-bottom: 12px;
  color: #3498db;
  border-bottom: 2px solid #3498db;
  padding-bottom: 6px;
  display: inline-block;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  width: 100%;
}

.footer-link {
  font-size: 13px;
  justify-content: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin: 0 auto;
  max-width: 280px;
  width: 100%;
  transition: all 0.3s ease;
  display: flex;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.footer-link:hover {
  background: rgba(52, 152, 219, 0.2);
  transform: translateY(-1px);
}

.footer-link i {
  font-size: 14px;
  color: #3498db;
  margin-left: 8px;
}

.footer-info p {
  font-size: 12px;
  margin-bottom: 8px;
  color: #bdc3c7;
  line-height: 1.5;
  padding: 0 10px;
}

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

.copyright {
  font-size: 13px;
  margin-bottom: 5px;
  color: #ecf0f1;
  font-weight: 600;
  text-align: center;
  padding: 0 10px;
  line-height: 1.4;
  text-align: center;
}

.footer-note {
  font-size: 11px;
  color: #95a5a6;
  font-style: italic;
  text-align: center;
  padding: 0 10px;
  line-height: 1.3;
}

/* تحسينات إضافية للهواتف الصغيرة جداً */
@media (max-width: 360px) {
  .cv-footer {
    padding: 15px 8px;
    margin-top: 20px;
  }

  .footer-content {
    gap: 15px;
    margin-bottom: 15px;
  }

  .footer-section h4 {
    font-size: 15px;
    margin-bottom: 10px;
  }

  .footer-contact {
    gap: 8px;
    width: 100%;
  }

  .footer-link {
    font-size: 11px;
    padding: 6px 8px;
    max-width: 95%;
    width: 95%;
    margin: 0 auto;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .footer-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
    display: inline-block;
  }

  .footer-info p {
    font-size: 11px;
    margin-bottom: 6px;
    padding: 0 5px;
    line-height: 1.4;
  }

  .copyright {
    font-size: 12px;
    padding: 0 5px;
    text-align: center;
    line-height: 1.3;
    margin-bottom: 4px;
    text-align: center;
  }

  .footer-note {
    font-size: 10px;
    padding: 0 5px;
    text-align: center;
    line-height: 1.2;
  }
}

/* تحسينات للهواتف الصغيرة */
@media (max-width: 480px) {
  .footer-contact {
    gap: 12px;
    width: 100%;
  }

  .footer-link {
    max-width: 90%;
    width: 90%;
    font-size: 12px;
    padding: 8px 10px;
  }

  .footer-link span {
    max-width: 220px;
  }
}

/* تنسيقات زر WhatsApp العائم */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  background-color: #25d366;
  color: white;
  border-radius: 50%;
  text-align: center;
  font-size: 24px;
  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;
}
