/* الخطوط العامة */
@font-face {
  font-family: "Bahij TheSansArabic";
  src: url("../fonts/Bahij_TheSansArabic-Plain.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Tajawal", "Cairo", sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.7;
}

h1,
h2,
h3 {
  font-family: "Bahij TheSansArabic", "Tajawal", sans-serif;
  font-weight: 700;
}

/* شريط التنقل */
.navbar {
  background-color: whitesmoke;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo {
  color: #0760dc;
  font-family: "Bahij TheSansArabic", sans-serif;
  font-size: 1.5rem;
  font-weight: bold;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 2rem;
}

.nav-links a {
  color: black;
  text-decoration: none;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
}

.nav-links a i {
  margin-left: 0.5rem;
  font-size: 0.9rem;
}

.nav-links a:hover {
  color: #3498db;
  transform: translateY(-2px);
}

/* قسم الهوية */
.hero-section {
  padding: 4rem 2rem;
  background: #0760dc;
  text-align: center;
  border-bottom: 1px solid #e0e0e0;
}

.profile-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 1s ease-in-out;
}

.profile-image {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid #f5f5f5;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.profile-image:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.name-title {
  margin-bottom: 1rem;
}

.full-name {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
}

.nickname {
  font-size: 1.2rem;
  color: #ecf0f1;
  margin-bottom: 1rem;
}

.experience {
  font-size: 1.1rem;
  color: #ecf0f1;
  font-weight: bolder;
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.details {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.detail-item {
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  color: #ecf0f1;
  font-weight: bold;
}

.detail-item i {
  margin-left: 0.5rem;
  color: #ecf0f1;
}

/* الأقسام العامة */
.section {
  padding: 3rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
  color: #2c3e50;
  position: relative;
  padding-bottom: 0.5rem;
}

.section-title:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: #3498db;
}

/* قسم نبذة عني */
.about-container {
  max-width: 1200px;
  margin: 0 auto;
}

.experience-section,
.interests-section {
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}

.experience-section h3,
.interests-section h3 {
  color: #2c3e50;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.experience-section h3 i,
.interests-section h3 i {
  color: #3498db;
  margin-left: 0.5rem;
  font-size: 1.5rem;
}

.interests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.interest-item {
  display: flex;
  align-items: center;
}

.interest-item i {
  color: #3498db;
  margin-left: 0.5rem;
  font-size: 1.2rem;
}

.interest-item span {
  color: #555;
}

/* قسم الأدوات والتقنيات */
.skills-container {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.skill-category {
  background-color: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border: 1px solid #eee;
}

.skill-category:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.skill-category h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skill-category h3 i {
  color: #3498db;
  margin-left: 0.5rem;
}

.skill-item {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  color: #555;
  font-weight: bold;
}

.skill-item i {
  margin-left: 0.5rem;
  color: #27ae60;
}

/* قسم الذكاء الاصطناعي */
.ai-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.ai-tool {
  background-color: #f9f9f9;
  padding: 1rem 1.5rem;
  border-radius: 30px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  border: 1px solid #eee;
  color: #555;
}

.ai-tool:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  background-color: #3498db;
  color: white;
}

.ai-tool i {
  margin-left: 0.5rem;
}

/* قسم الفلسفة */
.philosophy {
  background-color: #0760dc;
  color: white;
  padding: 3rem 2rem;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin-top: 2rem;
  position: relative;
  overflow: hidden;
}

.philosophy:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    rgba(52, 152, 219, 0.1) 0%,
    rgba(41, 128, 185, 0.2) 100%
  );
  z-index: 0;
}

.philosophy-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.philosophy-content h2 {
  color: yellow;
  margin-bottom: 1.5rem;
}

.quote {
  font-style: italic;
  font-size: 1.2rem;
  color: #333;
  font-weight: bold;
  margin: 2rem 0;
  padding: 1.5rem;
  border-left: 8px solid #3498db;
  background-color: whitesmoke;
  border-radius: 0 8px 8px 0;
}

/* المعرض وشبكة الصور */
.photos-grid,
.publications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  padding: 1rem;
}

.photo-card,
.publication-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: default;
}

.photo-card:hover,
.publication-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.photo-card img,
.publication-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  cursor: pointer;
}

/* نافذة العرض الكامل */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: auto;
  animation: fadeIn 0.3s;
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.close-btn:hover {
  color: #3498db;
}

.modal-caption {
  margin: auto;
  display: block;
  width: 80%;
  text-align: center;
  color: white;
  padding: 10px 0;
  position: absolute;
  bottom: 20px;
  left: 10%;
}

/* الفوتر */
footer {
  background-color: #0760dc;
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
}

.footer-name {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-family: "Bahij TheSansArabic", sans-serif;
  font-weight: bolder;
}

.footer-quote {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.copyright {
  font-size: 0.9rem;
  color: #bdc3c7;
}

/* زر العودة للأعلى */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: black;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(7, 96, 220, 0.3);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 1001;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: #3498db;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(7, 96, 220, 0.4);
}

/* تأثيرات الحركة */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* نماذج الاتصال */
.contact-form {
  display: grid;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 0.5rem;
  color: #555;
  font-weight: 500;
}

.form-control {
  padding: 0.8rem 1rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* تحميل الملفات */
.file-upload {
  position: relative;
  margin-bottom: 1rem;
}

.file-upload input[type="file"] {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-upload-label {
  display: block;
  padding: 0.8rem 1rem;
  border: 1px dashed #ddd;
  border-radius: 5px;
  text-align: center;
  color: #555;
  cursor: pointer;
  transition: all 0.3s ease;
  word-wrap: break-word;
  white-space: normal;
  line-height: 1.4;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-upload-label:hover {
  border-color: #3498db;
  color: #3498db;
}

.file-upload-label.has-files {
  border-color: #27ae60;
  background-color: #f8fff8;
  color: #27ae60;
  border-style: solid;
}

.file-upload-label.has-files:hover {
  border-color: #229954;
  background-color: #f0fff0;
  color: #229954;
}

.file-info {
  font-size: 0.9rem;
  color: #777;
  margin-top: 0.5rem;
}

.selected-files-preview {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background-color: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #e9ecef;
  font-size: 0.9rem;
  color: #495057;
  display: none;
}

.selected-files-preview.show {
  display: block;
}

.selected-files-preview .file-name {
  display: inline-block;
  background-color: #e7f3ff;
  color: #0056b3;
  padding: 0.2rem 0.5rem;
  margin: 0.1rem;
  border-radius: 3px;
  font-size: 0.8rem;
  border: 1px solid #b3d7ff;
}

.file-list {
  margin-top: 1rem;
  border-top: 1px solid #eee;
  padding-top: 1rem;
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f5f5f5;
}

.file-item-name {
  flex: 1;
  color: #555;
}

.file-item-size {
  color: #777;
  font-size: 0.9rem;
}

.file-item-remove {
  color: #e74c3c;
  margin-right: 0.5rem;
  cursor: pointer;
}

.remaining-space {
  text-align: right;
  font-size: 0.9rem;
  color: #3498db;
  margin-top: 0.5rem;
}

/* أزرار عامة */
.submit-btn {
  background-color: #0760dc;
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Bahij TheSansArabic", sans-serif;
  margin-top: 1rem;
}

.submit-btn:hover {
  background-color: #0650b8;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* صفحة الخدمات والدورات */
.main-title {
  background-color: #0760dc;
  color: white;
  padding: 3rem 2rem;
  text-align: center;
}

.main-title h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}

.service-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.service-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  cursor: pointer;
}

.service-content {
  padding: 1.5rem;
}

.service-content h3 {
  color: #0760dc;
  margin-bottom: 1rem;
}

.service-content p {
  color: #555;
  line-height: 1.6;
}

/* التجاوب */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    padding: 1rem;
    position: relative;
  }

  .nav-links {
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-links li {
    margin: 0.5rem;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .skills-container {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .hero-section {
    margin-top: 0;
  }

  .cards-container {
    grid-template-columns: 1fr;
    padding: 0 1rem 2rem;
  }
}
