/* ===== متغيرات الألوان ===== */
:root {
  --primary-dark: #22223b;
  --primary-medium: #4a4e69;
  --secondary-light: #9a8c98;
  --accent-light: #c9ada7;
  --light-bg: #f2e9e4;
  --text-dark: #22223b;
  --text-light: #f2e9e4;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --border-radius: 10px;
}

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

body {
  font-family: 'Tajawal', sans-serif;
  line-height: 1.7;
  color: var(--text-dark);
  background-color: var(--light-bg);
  padding-top: 80px; /* هامش لشريط التنقل الثابت */
}

/* ===== شريط التنقل ===== */
.main-header {
  background: var(--primary-dark);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: var(--shadow);
  height: 70px;
  display: flex;
  align-items: center;
}

.navbar {
  width: 100%;
  padding: 0 1rem;
}

.navbar ul {
  display: flex;
  justify-content: space-around;
  list-style: none;
  width: 100%;
}

.navbar li {
  flex: 1;
  text-align: center;
  min-width: 70px;
}

.navbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 0.5rem;
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  height: 100%;
  transition: var(--transition);
  position: relative;
  background: transparent;
}

.navbar a i {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
  color: var(--text-light);
}

.navbar a span {
  display: block;
}

.navbar a:hover,
.navbar a.active {
  background: rgba(255, 255, 255, 0.15);
}

.navbar a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent-light);
}

/* ===== الصفحة الرئيسية ===== */
.hero-section {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-medium) 100%);
  color: var(--text-light);
  text-align: center;
  padding: 0 2rem;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-content h1 {
  font-size: 2.8rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

/* ===== صفحة السيرة الذاتية ===== */
.cv-container {
  padding: 3rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.cv-section {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  margin-bottom: 2rem;
}

.cv-section h1,
.cv-section h2 {
  color: var(--primary-dark);
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--accent-light);
  padding-bottom: 0.5rem;
}

.timeline-item {
  border-left: 3px solid var(--primary-medium);
  padding-left: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 3px solid var(--primary-medium);
}

/* ===== صفحة المشاريع ===== */
.projects-container {
  padding: 3rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-10px);
}

.project-image {
  height: 220px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-details {
  padding: 1.5rem;
}

.project-details h3 {
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

/* ===== صفحة المدونة ===== */
.blog-container {
  padding: 3rem 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.blog-article {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.article-cover {
  height: 350px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  color: var(--text-light);
  padding: 2rem;
  position: relative;
}

.article-cover::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(34, 34, 59, 0.8), transparent);
}

.article-content {
  padding: 2rem;
}

.article-content h2 {
  color: var(--primary-dark);
  margin: 1.5rem 0 1rem;
}

/* ===== صفحة التواصل ===== */
.contact-container {
  padding: 3rem 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.contact-card {
  background: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
}

.contact-card:hover {
  transform: translateY(-5px);
}

.contact-card i {
  font-size: 2rem;
  color: var(--primary-medium);
  margin-bottom: 1rem;
}

/* ===== الفوتر ===== */
.main-footer {
  background: var(--primary-dark);
  color: var(--text-light);
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
}

/* ===== التجاوب مع الهاتف ===== */
@media (max-width: 768px) {
  body {
    padding-top: 70px;
  }
  
  .navbar ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 5px;
  }
  
  .navbar li {
    flex: 0 0 auto;
    min-width: 80px;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .cta-buttons {
    flex-direction: column;
    gap: 1rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
}
/* ===== تحسينات إضافية ===== */
.project-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* تنسيقات للهاتف */
@media (max-width: 768px) {
  .quick-links {
    grid-template-columns: 1fr;
  }
  
  .project-links {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .project-link {
    width: 100%;
    text-align: center;
  }
}
@media (max-width: 480px) {
  .navbar a span {
    font-size: 0.7rem;
  }
  
  .navbar a i {
    font-size: 1rem;
  }
}