/* --- General Setup --- */
:root {
  --primary-color: #171c24; /* أزرق داكن */
  --secondary-color: #1976d2; /* أزرق أفتح */
  --accent-color: #ffab40; /* برتقالي للتمييز */
  --text-color: #333;
  --bg-color: #f4f7f9;
  --card-bg: #ffffff;
  --header-text: #ffffff;
}

body {
  margin: 0;
  font-family: 'Cairo', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  direction: rtl;
  line-height: 1.7;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 {
  font-weight: 900;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s;
}
a:hover {
  color: var(--accent-color);
}

/* --- Header & Navigation --- */
header {
  background-color: var(--primary-color);
  color: var(--header-text);
  padding-bottom: 40px;
}
.main-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  padding-bottom: 60px;
  text-align: center;
}
/* =================================== */
/* === جعل شريط التنقل ثابتًا === */
/* =================================== */

/* استهداف الهيدر الرئيسي في كل الصفحات */
body > header {
  position: sticky; /* الخاصية الأساسية لجعل العنصر لزجًا */
  top: 0; /* تحديد التصاقه بأعلى الشاشة */
  z-index: 1000; /* ضمان بقائه فوق كل العناصر الأخرى */
  background-color: var(--primary-color); /* تأكيد لون الخلفية عند التمرير */
  
  /* إضافة ظل خفيف ليظهر فوق المحتوى بشكل أفضل */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15); 
}

nav {
  display: flex;
  justify-content: center;
  padding: 20px 0;
  gap: 25px;
}
nav a {
  color: var(--header-text);
  font-weight: 700;
  padding: 5px 10px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s;
}
nav a:hover, nav a.active {
  border-bottom-color: var(--accent-color);
}

/* --- Hero Section (Home Page) --- */
.hero-content {
  padding-top: 40px;
}
.profile-picture {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 5px solid var(--accent-color);
  object-fit: cover;
  margin-bottom: 20px;
}
.hero-title {
  font-size: 3.5rem;
  margin: 10px 0;
  color: var(--header-text);
}
.hero-subtitle {
  font-size: 1.2rem;
  color: var(--header-text);
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 30px;
}
.cta-button {
  background-color: var(--accent-color);
  color: var(--text-color);
  padding: 15px 35px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: transform 0.3s, box-shadow 0.3s;
  display: inline-block;
}
.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  color: var(--text-color);
}

/* --- General Page & Section Titles --- */
main {
  padding: 60px 0;
}
.section-title, .page-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 20px;
  position: relative;
}
.section-title::after, .page-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background-color: var(--accent-color);
  margin: 15px auto 0;
  border-radius: 2px;
}
.page-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: #666;
  max-width: 700px;
  margin: 0 auto 60px;
}

/* --- Portfolio Grid & Cards --- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}
.project-card {
  background-color: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.project-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.project-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.project-title {
  font-size: 1.5rem;
  margin: 0 0 10px;
  color: var(--primary-color);
}
.project-description {
  flex-grow: 1;
  margin-bottom: 15px;
  color: #555;
}
.project-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.project-tags span {
  background-color: #e9ecef;
  color: #495057;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}
.project-button {
  display: block;
  background-color: var(--secondary-color);
  color: white;
  padding: 12px;
  text-align: center;
  border-radius: 8px;
  font-weight: 700;
  transition: background-color 0.3s;
}
.project-button:hover {
  background-color: var(--primary-color);
  color: white;
}
.project-button.disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* --- About Page --- */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.about-content p {
  font-size: 2rem;
  margin-bottom: 20px;
}
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 40px;
}
.skill-item {
  background-color: var(--card-bg);
  padding: 10px 25px;
  border-radius: 50px;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  color: var(--primary-color);
}

/* --- Contact Page --- */
.contact-section {
  max-width: 700px;
  margin: 0 auto;
}
.contact-info {
  text-align: center;
  margin-bottom: 40px;
  font-size: 1.1rem;
}
.contact-info p {
  margin: 10px 0;
}
.contact-form {
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.contact-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 20px;
  font-family: 'Cairo', sans-serif;
}
.contact-form button {
  width: 100%;
  border: none;
  cursor: pointer;
}

/* --- Footer --- */
footer {
  background-color: #333;
  color: #eee;
  text-align: center;
  padding: 25px 0;
  margin-top: 60px;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
  .hero-title { font-size: 2.5rem; }
  nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }
}
/* --- Project Detail Page Styles --- */
.project-detail {
  max-width: 900px;
  margin: 0 auto;
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}

.project-detail-header {
  text-align: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 30px;
  margin-bottom: 40px;
}

.project-detail-title {
  font-size: 2.8rem;
  margin: 0;
}

.project-detail-subtitle {
  font-size: 1.2rem;
  color: #eee;
  margin: 15px 0 30px;
}

.project-detail-image {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 40px;
}

.project-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
  background-color: var(--bg-color);
  padding: 30px;
  border-radius: 10px;
  margin-bottom: 40px;
  text-align: center;
}

.overview-item h4 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: var(--primary-color);
}

.overview-item p {
  margin: 0;
  font-size: 1rem;
  color: #444;
}

.project-content-section h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-top: 40px;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 10px;
  display: inline-block;
}

.project-content-section p, 
.project-content-section li {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
}

.project-content-section ol,
.project-content-section ul {
  padding-right: 20px;
}

.back-to-portfolio {
  text-align: center;
  margin-top: 60px;
}

/* --- Style for Secondary Button in Project Detail --- */
.cta-button.secondary {
  background-color: #6c757d; /* A neutral grey color */
}

.cta-button.secondary:hover {
  background-color: #5a6268;
}

/* --- Style for GitHub Icon in Button --- */
.cta-button .fa-github {
  margin-left: 8px; /* Adds some space between the icon and text */
}
/* --- Testimonials Section (Improved Version ) --- */
.testimonials {
  background-color: var(--bg-color); /* Changed to bg-color for contrast */
  padding: 60px 0;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.testimonial-card {
  background-color: var(--card-bg); /* White background for cards */
  padding: 30px;
  border-radius: 15px;
  border-top: 5px solid var(--accent-color); /* Accent color top border */
  box-shadow: 0 4px 15px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
}

.testimonial-rating {
  margin-bottom: 15px;
  color: #ffc107; /* Gold color for stars */
}

.testimonial-rating .fa-star {
  margin: 0 1px;
}

.testimonial-text {
  font-size: 1.1rem;
  color: #444;
  flex-grow: 1;
  margin: 0 0 25px;
  line-height: 1.8;
}

.testimonial-author {
  border-top: 1px solid #eee;
  padding-top: 15px;
}

.author-name {
  margin: 0 0 5px;
  color: var(--primary-color);
  font-weight: 700;
}

.author-project {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
}

.testimonials-link {
  text-align: center;
  margin-top: 50px;
}
/* --- Services Page Styles --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.service-card {
  background-color: var(--card-bg);
  padding: 40px 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.07);
  border-bottom: 5px solid transparent;
  transition: transform 0.3s, border-color 0.3s;
}

.service-card:hover {
  transform: translateY(-10px);
  border-bottom-color: var(--accent-color);
}

.service-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.service-title {
  font-size: 1.6rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.service-description {
  font-size: 1rem;
  color: #555;
  line-height: 1.8;
  margin-bottom: 25px;
}

.service-outcomes {
  list-style: none;
  padding: 0;
  text-align: right;
  font-size: 1rem;
  color: #333;
}

.service-outcomes li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.service-outcomes .fa-check-circle {
  color: var(--accent-color);
  margin-left: 10px;
}

/* --- How It Works Section --- */
.how-it-works {
    padding: 60px 0;
}

.steps-container {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 40px;
    text-align: center;
}

.step {
    flex: 1;
    padding: 20px;
}

.step-number {
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: white;
    font-size: 1.8rem;
    font-weight: 900;
    margin: 0 auto 20px;
}

.step-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 60px 20px;
  text-align: center;
  border-radius: 15px;
  margin-top: 40px;
}

.cta-section h2 {
  font-size: 2.2rem;
  margin: 0 0 15px;
}

.cta-section p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 30px;
}
/* --- Blog Page & Post Styles --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 35px;
  padding: 20px 0;
}

.blog-post-card {
  background-color: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.blog-post-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
}

/* صورة المقال في البطاقة */
.post-card-image-link {
  display: block;
  height: 200px; /* حجم جديد للصورة */
  overflow: hidden;
  background: none; /* بدون خلفية */
}

.post-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0; /* بدون زوايا */
  transition: transform 0.5s ease;
}

.blog-post-card:hover .post-card-image {
  transform: scale(1.05);
}

.post-card-content {
  flex: 1;
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* الوسوم */
.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.post-card-tags span {
  background-color: var(--primary-color);
  color: #fff;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.post-card-tags span:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

/* العناوين */
.post-card-title a {
  font-size: 1.6rem;
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.post-card-title a:hover {
  color: var(--accent-color);
}

.post-card-excerpt {
  color: #555;
  margin: 15px 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.post-card-meta {
  font-size: 0.85rem;
  color: #777;
  display: flex;
  gap: 20px;
  margin-top: auto;
}

.post-card-meta i {
  margin-left: 5px;
  opacity: 0.8;
}

/* --- Single Post Styles --- */
.blog-post {
  max-width: 850px;
  margin: 0 auto;
  padding: 0 20px;
}

.post-header {
  text-align: center;
  margin-bottom: 45px;
}

.post-title {
  font-size: 2.8rem;
  margin-bottom: 15px;
  font-weight: 800;
  line-height: 1.3;
}

.post-meta {
  display: flex;
  justify-content: center;
  gap: 25px;
  color: #ffffff;
  font-size: 0.9rem;
  margin-bottom: 30px;
}

/* صورة المقال الفردي */
.post-featured-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: none; /* بدون خلفية */
  box-shadow: none; /* بدون ظل */
  margin-bottom: 40px;
}

.post-content {
  font-size: 1.1rem;
  line-height: 2;
  color: #333;
}

.post-content h2 {
  font-size: 2rem;
  margin-top: 50px;
  margin-bottom: 20px;
  color: var(--primary-color);
  font-weight: 700;
}

.post-content ul {
  padding-right: 25px;
  margin-bottom: 20px;
}

.post-content li {
  margin-bottom: 8px;
}

.post-content hr {
  border: 0;
  height: 1px;
  background-color: #ddd;
  margin: 50px 0;
}

/* --- Latest Posts Section on Home Page --- */
.latest-posts {
  padding: 70px 0;
  background-color: var(--bg-color);
  text-align: center;
}

.latest-posts h2 {
  font-size: 2.2rem;
  margin-bottom: 35px;
  font-weight: 800;
  color: var(--primary-color);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .post-title {
    font-size: 2.2rem;
  }
}


/* =================================== */
/* === تنسيقات صفحة المقال الفردي (بدون خلفية للهيدر) === */
/* =================================== */

/* إزالة أي تنسيقات قديمة من حاوية المقال الرئيسية */
.blog-post {
  padding: 0;
  background-color: transparent;
  box-shadow: none;
}

/* الحاوية البيضاء الجديدة التي تحتوي على كل شيء */
.post-container-white {
  background-color: white;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  max-width: 850px;
  margin: 0 auto; /* توسيط الحاوية */
}

/* الصورة الرئيسية في أعلى المقال */
.post-featured-image {
  width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: fit;
  border-radius: 12px;
  margin-bottom: 30px;
}

/* رأس المقال (الذي يحتوي على العنوان والتفاصيل) */
.post-header {
  padding: 0; /* لا حاجة لأي حشوة */
  text-align: center;
  margin-bottom: 40px;
  color: inherit; /* يرث اللون من الأب */
  background: none; /* الأهم: لا يوجد أي لون أو صورة خلفية */
}

/* عنوان المقال */
.post-title {
  color: var(--primary-color); /* لون أزرق داكن */
  font-size: 2.8rem;
  margin-top: 15px;
  margin-bottom: 20px;
}

/* تفاصيل المقال (الكاتب، التاريخ، إلخ) */
.post-meta {
  color: #555; /* لون رمادي داكن ليكون واضحاً */
  display: flex;
  justify-content: center;
  gap: 25px;
}

/* الوسوم (Tags) فوق العنوان */
.post-header .post-card-tags {
    justify-content: center;
    margin-bottom: 20px;
}
.post-header .post-card-tags span {
    background-color: #e9ecef;
    color: #495057;
    border: none;
}

/* تنسيق المحتوى النصي للمقال */
.post-content {
  font-size: 1.1rem;
  line-height: 1.9;
  color: #333;
}
/* =================================== */
/* === تعديلات الصفحة الرئيسية (بدون صورة ) === */
/* =================================== */

.hero-content {
  /* زيادة الحشوة العلوية لتعويض المساحة الفارغة بعد حذف الصورة */
  padding-top: 60px; 
}

/* =================================== */
/* === تنسيقات صفحة "عني" الجديدة === */
/* =================================== */

.about-layout {
  display: grid;
  grid-template-columns: 2fr 1fr; /* تقسيم الشاشة لعمودين: ثلثين للنص وثلث للصورة */
  gap: 50px; /* مسافة بين النص والصورة */
  align-items: center; /* محاذاة رأسية في المنتصف */
  margin-top: 40px;
  margin-bottom: 60px;
}

.about-text p {
  font-size: 1.7rem;
  line-height: 1.9;
  color: #333;
}

.about-image img {
  width: 100%;
  border-radius: 15px; /* زوايا دائرية للصورة */
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* تعديلات للشاشات الصغيرة (الجوال) */
@media (max-width: 768px) {
  .about-layout {
    grid-template-columns: 1fr; /* عرض عمود واحد فقط */
    text-align: center;
  }

  .about-image {
    /* تغيير ترتيب العناصر في الجوال لتظهر الصورة أولاً */
    order: -1; 
    margin-bottom: 30px;
    max-width: 250px; /* تحديد عرض أقصى للصورة في الجوال */
    margin-left: auto;
    margin-right: auto;
  }
}
/* =================================== */
/* === التصميم الجديد للصفحة الرئيسية === */
/* =================================== */

/* --- قسم الهيرو الجديد --- */
.new-hero-section {
  background: linear-gradient(135deg, #0d47a1, #1565c0); /* تدرج لوني أزرق احترافي */
  color: white;
  padding: 100px 0 80px 0; /* حشوة علوية وسفلية كبيرة */
  text-align: center;
}

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

.new-hero-title {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 20px;
}

.new-hero-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 650px;
  margin: 0 auto 30px;
  line-height: 1.7;
}

.new-hero-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 50px;
}

/* تعديل على الزر الثانوي ليتناسب مع الخلفية الداكنة */
.new-hero-buttons .cta-button.secondary {
  background-color: transparent;
  color: white;
  border: 2px solid var(--accent-color);
}
.new-hero-buttons .cta-button.secondary:hover {
  background-color: var(--accent-color);
  color: var(--text-color);
}

.hero-expertise-cards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.expertise-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 20px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 700;
  transition: background 0.3s;
}
.expertise-card:hover {
  background: rgba(255, 255, 255, 0.2);
}
.expertise-card i {
  margin-left: 8px;
  color: var(--accent-color);
}


/* --- قسم "لماذا تختارني؟" --- */
.why-me-section {
  padding: 80px 0;
}

.why-me-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.why-me-card {
  background-color: var(--card-bg);
  padding: 40px 30px;
  text-align: center;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border-top: 4px solid var(--accent-color);
  transition: transform 0.3s, box-shadow 0.3s;
}
.why-me-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.why-me-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.why-me-title {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.why-me-card p {
  font-size: 1rem;
  line-height: 1.8;
  color: #555;
}
/* --- General Setup --- */
:root {
  --primary-color: #0d47a1; /* أزرق داكن */
  --secondary-color: #1976d2; /* أزرق أفتح */
  --accent-color: #ffab40; /* برتقالي للتمييز */
  --text-color: #333;
  --bg-color: #f4f7f9;
  --card-bg: #ffffff;
  --header-text: #ffffff;
}

body {
  margin: 0;
  font-family: 'Cairo', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  direction: rtl;
  line-height: 1.7;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 {
  font-weight: 900;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s;
}
a:hover {
  color: var(--accent-color);
}

/* --- Header & Navigation --- */
header {
  background-color: var(--primary-color);
  color: var(--header-text);
  padding-bottom: 40px;
}
.main-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  padding-bottom: 60px;
  text-align: center;
}
nav {
  display: flex;
  justify-content: center;
  padding: 20px 0;
  gap: 25px;
}
nav a {
  color: var(--header-text);
  font-weight: 700;
  padding: 5px 10px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s;
}
nav a:hover, nav a.active {
  border-bottom-color: var(--accent-color);
}

/* --- Hero Section (Home Page) --- */
.hero-content {
  padding-top: 40px;
}
.profile-picture {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 5px solid var(--accent-color);
  object-fit: cover;
  margin-bottom: 20px;
}
.hero-title {
  font-size: 3.5rem;
  margin: 10px 0;
  color: var(--header-text);
}
.hero-subtitle {
  font-size: 1.2rem;
  color: var(--header-text);
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 30px;
}
.cta-button {
  background-color: var(--accent-color);
  color: var(--text-color);
  padding: 15px 35px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: transform 0.3s, box-shadow 0.3s;
  display: inline-block;
}
.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  color: var(--text-color);
}

/* --- General Page & Section Titles --- */
main {
  padding: 60px 0;
}
.section-title, .page-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 20px;
  position: relative;
}
.section-title::after, .page-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background-color: var(--accent-color);
  margin: 15px auto 0;
  border-radius: 2px;
}
.page-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: #666;
  max-width: 700px;
  margin: 0 auto 60px;
}

/* --- Portfolio Grid & Cards --- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}
.project-card {
  background-color: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.project-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.project-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.project-title {
  font-size: 1.5rem;
  margin: 0 0 10px;
  color: var(--primary-color);
}
.project-description {
  flex-grow: 1;
  margin-bottom: 15px;
  color: #555;
}
.project-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.project-tags span {
  background-color: #e9ecef;
  color: #495057;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}
.project-button {
  display: block;
  background-color: var(--secondary-color);
  color: white;
  padding: 12px;
  text-align: center;
  border-radius: 8px;
  font-weight: 700;
  transition: background-color 0.3s;
}
.project-button:hover {
  background-color: var(--primary-color);
  color: white;
}
.project-button.disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* --- About Page --- */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.about-content p {
  font-size: 1.1rem;
  margin-bottom: 20px;
}
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 40px;
}
.skill-item {
  background-color: var(--card-bg);
  padding: 10px 25px;
  border-radius: 50px;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  color: var(--primary-color);
}

/* --- Contact Page --- */
.contact-section {
  max-width: 700px;
  margin: 0 auto;
}
.contact-info {
  text-align: center;
  margin-bottom: 40px;
  font-size: 1.1rem;
}
.contact-info p {
  margin: 10px 0;
}
.contact-form {
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.contact-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 20px;
  font-family: 'Cairo', sans-serif;
}
.contact-form button {
  width: 100%;
  border: none;
  cursor: pointer;
}

/* --- Footer --- */
footer {
  background-color: #333;
  color: #eee;
  text-align: center;
  padding: 25px 0;
  margin-top: 60px;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
  .hero-title { font-size: 2.5rem; }
  nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }
}
/* --- Project Detail Page Styles --- */
.project-detail {
  max-width: 900px;
  margin: 0 auto;
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}

.project-detail-header {
  text-align: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 30px;
  margin-bottom: 40px;
}

.project-detail-title {
  font-size: 2.8rem;
  margin: 0;
}

.project-detail-subtitle {
  font-size: 1.2rem;
  color: #eee;
  margin: 15px 0 30px;
}

.project-detail-image {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 40px;
}

.project-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
  background-color: var(--bg-color);
  padding: 30px;
  border-radius: 10px;
  margin-bottom: 40px;
  text-align: center;
}

.overview-item h4 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: var(--primary-color);
}

.overview-item p {
  margin: 0;
  font-size: 1rem;
  color: #444;
}

.project-content-section h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-top: 40px;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 10px;
  display: inline-block;
}

.project-content-section p, 
.project-content-section li {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
}

.project-content-section ol,
.project-content-section ul {
  padding-right: 20px;
}

.project-content-section hr {
  border: 0;
  height: 1px;
  background-color: #ddd;
  margin: 50px 0;
}

.back-to-portfolio {
  text-align: center;
  margin-top: 60px;
}

/* --- Style for Secondary Button in Project Detail --- */
.cta-button.secondary {
  background-color: #6c757d; /* A neutral grey color */
}

.cta-button.secondary:hover {
  background-color: #5a6268;
}

/* --- Style for GitHub Icon in Button --- */
.cta-button .fa-github {
  margin-left: 8px; /* Adds some space between the icon and text */
}
/* --- Testimonials Section (Improved Version ) --- */
.testimonials {
  background-color: var(--bg-color); /* Changed to bg-color for contrast */
  padding: 60px 0;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.testimonial-card {
  background-color: var(--card-bg); /* White background for cards */
  padding: 30px;
  border-radius: 15px;
  border-top: 5px solid var(--accent-color); /* Accent color top border */
  box-shadow: 0 4px 15px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
}

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

.testimonial-rating {
  margin-bottom: 15px;
  color: #ffc107; /* Gold color for stars */
}

.testimonial-rating .fa-star {
  margin: 0 1px;
}

.testimonial-text {
  font-size: 1.1rem;
  color: #444;
  flex-grow: 1;
  margin: 0 0 25px;
  line-height: 1.8;
}

.testimonial-author {
  border-top: 1px solid #eee;
  padding-top: 15px;
}

.author-name {
  margin: 0 0 5px;
  color: var(--primary-color);
  font-weight: 700;
}

.author-project {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
}

.testimonials-link {
  text-align: center;
  margin-top: 50px;
}
/* --- Services Page Styles --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.service-card {
  background-color: var(--card-bg);
  padding: 40px 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.07);
  border-bottom: 5px solid transparent;
  transition: transform 0.3s, border-color 0.3s;
}

.service-card:hover {
  transform: translateY(-10px);
  border-bottom-color: var(--accent-color);
}

.service-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.service-title {
  font-size: 1.6rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.service-description {
  font-size: 1rem;
  color: #555;
  line-height: 1.8;
  margin-bottom: 25px;
}

.service-outcomes {
  list-style: none;
  padding: 0;
  text-align: right;
  font-size: 1rem;
  color: #333;
}

.service-outcomes li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.service-outcomes .fa-check-circle {
  color: var(--accent-color);
  margin-left: 10px;
}

/* --- How It Works Section --- */
.how-it-works {
    padding: 60px 0;
}

.steps-container {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 40px;
    text-align: center;
}

.step {
    flex: 1;
    padding: 20px;
}

.step-number {
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: white;
    font-size: 1.8rem;
    font-weight: 900;
    margin: 0 auto 20px;
}

.step-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 60px 20px;
  text-align: center;
  border-radius: 15px;
  margin-top: 40px;
}

.cta-section h2 {
  font-size: 2.2rem;
  margin: 0 0 15px;
}

.cta-section p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 30px;
}
/* --- Blog Page & Post Styles --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 35px;
  padding: 20px 0;
}

.blog-post-card {
  background-color: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.blog-post-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
}

/* صورة المقال في البطاقة */
.post-card-image-link {
  display: block;
  height: 200px; /* حجم جديد للصورة */
  overflow: hidden;
  background: none; /* بدون خلفية */
}

.post-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0; /* بدون زوايا */
  transition: transform 0.5s ease;
}

.blog-post-card:hover .post-card-image {
  transform: scale(1.05);
}

.post-card-content {
  flex: 1;
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* الوسوم */
.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.post-card-tags span {
  background-color: var(--primary-color);
  color: #fff;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.post-card-tags span:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

/* العناوين */
.post-card-title a {
  font-size: 1.6rem;
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.post-card-title a:hover {
  color: var(--accent-color);
}

.post-card-excerpt {
  color: #555;
  margin: 15px 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.post-card-meta {
  font-size: 0.85rem;
  color: #777;
  display: flex;
  gap: 20px;
  margin-top: auto;
}

.post-card-meta i {
  margin-left: 5px;
  opacity: 0.8;
}

/* --- Single Post Styles --- */
.blog-post {
  max-width: 850px;
  margin: 0 auto;
  padding: 0 20px;
}

.post-header {
  text-align: center;
  margin-bottom: 45px;
}

.post-title {
  font-size: 2.8rem;
  margin-bottom: 15px;
  font-weight: 800;
  line-height: 1.3;
}

.post-meta {
  display: flex;
  justify-content: center;
  gap: 25px;
  color: #ffffff;
  font-size: 0.9rem;
  margin-bottom: 30px;
}

/* صورة المقال الفردي */
.post-featured-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: none; /* بدون خلفية */
  box-shadow: none; /* بدون ظل */
  margin-bottom: 40px;
}

.post-content {
  font-size: 1.1rem;
  line-height: 2;
  color: #333;
}

.post-content h2 {
  font-size: 2rem;
  margin-top: 50px;
  margin-bottom: 20px;
  color: var(--primary-color);
  font-weight: 700;
}

.post-content ul {
  padding-right: 25px;
  margin-bottom: 20px;
}

.post-content li {
  margin-bottom: 8px;
}

.post-content hr {
  border: 0;
  height: 1px;
  background-color: #ddd;
  margin: 50px 0;
}

/* --- Latest Posts Section on Home Page --- */
.latest-posts {
  padding: 70px 0;
  background-color: var(--bg-color);
  text-align: center;
}

.latest-posts h2 {
  font-size: 2.2rem;
  margin-bottom: 35px;
  font-weight: 800;
  color: var(--primary-color);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .post-title {
    font-size: 2.2rem;
  }
}

/* =================================== */
/* === New Hero Section Styles === */
/* =================================== */
.new-hero-section {
  height: 100vh; /* Full viewport height */
  background-image: url('https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80'); /* Example image */
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* Parallax effect */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white; /* Text color for hero content */
  text-align: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7); /* Dark overlay */
  z-index: 1;
}

.new-hero-content {
  position: relative;
  z-index: 2; /* Ensure content is above overlay */
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.new-hero-title {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.new-hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

.new-hero-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 50px;
}

.hero-expertise-cards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.expertise-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 20px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 700;
  transition: background 0.3s;
}
.expertise-card:hover {
  background: rgba(255, 255, 255, 0.2);
}
.expertise-card i {
  margin-left: 8px;
  color: var(--accent-color);
}

/* Adjustments for existing CTA buttons to fit new hero section */
.new-hero-buttons .cta-button {
  background-color: var(--accent-color);
  color: white;
  padding: 15px 30px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: transform 0.3s, box-shadow 0.3s;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.new-hero-buttons .cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.new-hero-buttons .cta-button.secondary {
  background-color: transparent;
  color: white;
  border: 2px solid var(--accent-color);
}

.new-hero-buttons .cta-button.secondary:hover {
  background-color: var(--accent-color);
  color: var(--text-color);
}

/* Fixed Navigation Header (from previous request) */
body > header {
  position: sticky; 
  top: 0; 
  z-index: 1000; 
  background-color: var(--primary-color); 
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15); 
}

/* Ensure main content starts below fixed header */
main {
  margin-top: 0; /* Reset any default margin-top */
}

/* Adjustments for main header padding to accommodate fixed nav */
header .container {
  padding-top: 0; /* Remove top padding if it causes issues with fixed nav */
}

/* Ensure the nav links are visible on the fixed header */
header nav a {
  color: white; /* Ensure nav links are white on blue header */
}

header nav a:hover, header nav a.active {
  border-bottom-color: var(--accent-color);
}

/* =================================== */
/* === Why Me Section (from previous request) === */
/* =================================== */
.why-me-section {
  padding: 80px 0;
}

.why-me-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.why-me-card {
  background-color: var(--card-bg);
  padding: 40px 30px;
  text-align: center;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border-top: 4px solid var(--accent-color);
  transition: transform 0.3s, box-shadow 0.3s;
}
.why-me-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.why-me-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.why-me-title {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.why-me-card p {
  font-size: 1rem;
  line-height: 1.8;
  color: #555;
}

/* =================================== */
/* === Responsive Design for New Hero === */
/* =================================== */
@media (max-width: 768px) {
  .new-hero-title {
    font-size: 2.5rem;
  }
  .new-hero-subtitle {
    font-size: 1.1rem;
  }
  .new-hero-buttons {
    flex-direction: column;
    gap: 10px;
  }
  .hero-expertise-cards {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .new-hero-title {
    font-size: 2rem;
  }
  .new-hero-subtitle {
    font-size: 1rem;
  }
  .new-hero-buttons .cta-button {
    width: 80%;
  }
  .expertise-card {
    width: 90%;
  }
}

/* --- General Setup --- */
:root {
  --primary-color: #30405c; /* أزرق داكن */
  --secondary-color: #1976d2; /* أزرق أفتح */
  --accent-color: #ffab40; /* برتقالي للتمييز */
  --text-color: #30405c;
  --bg-color: #f4f7f9;
  --card-bg: #ffffff;
  --header-text: #ffffff;
}

body {
  margin: 0;
  font-family: 'Cairo', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  direction: rtl;
  line-height: 1.7;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 {
  font-weight: 900;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s;
}
a:hover {
  color: var(--accent-color);
}

/* --- Header & Navigation --- */
/* The main header is now part of the new-hero-section */
header {
  /* Remove background and padding from here as it's handled by new-hero-section */
  background-color: transparent; /* Make header background transparent */
  padding-bottom: 0; /* Remove padding if it's causing issues */
}

.fixed-header-in-hero {
  position: absolute; /* Position absolutely within the hero section */
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000; /* Ensure it's above the overlay */
  padding: 20px 0; /* Add padding for navigation */
  background-color: transparent; /* Ensure it's transparent to show background image */
}

.fixed-header-in-hero nav {
  display: flex;
  justify-content: center;
}

.fixed-header-in-hero nav a {
  color: white; /* Ensure nav links are white on the background image */
  font-weight: 700;
  padding: 5px 10px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s;
}

.fixed-header-in-hero nav a:hover, .fixed-header-in-hero nav a.active {
  border-bottom-color: var(--accent-color);
}

/* --- Hero Section (Home Page) --- */
.new-hero-section {
  height: 100vh; /* Full viewport height */
  background-image: url('https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80'); /* Example image */
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* Parallax effect */
  position: relative;
  display: flex;
  flex-direction: column; /* Arrange items vertically */
  align-items: center;
  justify-content: center;
  color: white; /* Text color for hero content */
  text-align: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7); /* Dark overlay */
  z-index: 1;
}

.hero-content-wrapper {
  position: relative;
  z-index: 2; /* Ensure content is above overlay */
  flex-grow: 1; /* Allow content to take available space */
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 80px; /* Adjust padding to account for fixed header */
}

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

.new-hero-title {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.new-hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

.new-hero-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 50px;
}

.hero-expertise-cards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.expertise-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 20px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 700;
  transition: background 0.3s;
}
.expertise-card:hover {
  background: rgba(255, 255, 255, 0.2);
}
.expertise-card i {
  margin-left: 8px;
  color: var(--accent-color);
}

/* Adjustments for existing CTA buttons to fit new hero section */
.new-hero-buttons .cta-button {
  background-color: var(--accent-color);
  color: white;
  padding: 15px 30px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: transform 0.3s, box-shadow 0.3s;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.new-hero-buttons .cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.new-hero-buttons .cta-button.secondary {
  background-color: transparent;
  color: white;
  border: 2px solid var(--accent-color);
}

.new-hero-buttons .cta-button.secondary:hover {
  background-color: var(--accent-color);
  color: var(--text-color);
}

/* --- General Page & Section Titles --- */
main {
  padding: 60px 0;
}
.section-title, .page-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 20px;
  position: relative;
}
.section-title::after, .page-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background-color: var(--accent-color);
  margin: 15px auto 0;
  border-radius: 2px;
}
.page-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: #666;
  max-width: 700px;
  margin: 0 auto 60px;
}

/* --- Portfolio Grid & Cards --- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}
.project-card {
  background-color: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.project-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.project-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.project-title {
  font-size: 1.5rem;
  margin: 0 0 10px;
  color: var(--primary-color);
}
.project-description {
  flex-grow: 1;
  margin-bottom: 15px;
  color: #555;
}
.project-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.project-tags span {
  background-color: #e9ecef;
  color: #495057;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}
.project-button {
  display: block;
  background-color: #30405c;
  color: white;
  padding: 12px;
  text-align: center;
  border-radius: 8px;
  font-weight: 700;
  transition: background-color 0.3s;
}
.project-button:hover {
  background-color: var(--primary-color);
  color: white;
}
.project-button.disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* --- About Page --- */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.about-content p {
  font-size: 1.1rem;
  margin-bottom: 20px;
}
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 40px;
}
.skill-item {
  background-color: var(--card-bg);
  padding: 10px 25px;
  border-radius: 50px;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  color: var(--primary-color);
}

/* --- Contact Page --- */
.contact-section {
  max-width: 700px;
  margin: 0 auto;
}
.contact-info {
  text-align: center;
  margin-bottom: 40px;
  font-size: 1.1rem;
}
.contact-info p {
  margin: 10px 0;
}
.contact-form {
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.contact-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 20px;
  font-family: 'Cairo', sans-serif;
}
.contact-form button {
  width: 100%;
  border: none;
  cursor: pointer;
}

/* --- Footer --- */
footer {
  background-color: #333;
  color: #eee;
  text-align: center;
  padding: 25px 0;
  margin-top: 60px;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
  .hero-title { font-size: 2.5rem; }
  nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }
}
/* --- Project Detail Page Styles --- */
.project-detail {
  max-width: 900px;
  margin: 0 auto;
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}

.project-detail-header {
  text-align: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 30px;
  margin-bottom: 40px;
}

.project-detail-title {
  font-size: 2.8rem;
  color: #30405c;
  margin: 0;
}

.project-detail-subtitle {
  font-size: 1.2rem;
  color:#30405c;
  margin: 15px 0 30px;
}

.project-detail-image {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 40px;
}

.project-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
  background-color: var(--bg-color);
  padding: 30px;
  border-radius: 10px;
  margin-bottom: 40px;
  text-align: center;
}

.overview-item h4 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: var(--primary-color);
}

.overview-item p {
  margin: 0;
  font-size: 1rem;
  color: #444;
}

.project-content-section h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-top: 40px;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 10px;
  display: inline-block;
}

.project-content-section p, 
.project-content-section li {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
}

.project-content-section ol,
.project-content-section ul {
  padding-right: 20px;
}

.project-content-section hr {
  border: 0;
  height: 1px;
  background-color: #ddd;
  margin: 50px 0;
}

.back-to-portfolio {
  text-align: center;
  margin-top: 60px;
}

/* --- Style for Secondary Button in Project Detail --- */
.cta-button.secondary {
  background-color: #6c757d; /* A neutral grey color */
}

.cta-button.secondary:hover {
  background-color: #5a6268;
}

/* --- Style for GitHub Icon in Button --- */
.cta-button .fa-github {
  margin-left: 8px; /* Adds some space between the icon and text */
}
/* --- Testimonials Section (Improved Version ) --- */
.testimonials {
  background-color: var(--bg-color); /* Changed to bg-color for contrast */
  padding: 60px 0;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.testimonial-card {
  background-color: var(--card-bg); /* White background for cards */
  padding: 30px;
  border-radius: 15px;
  border-top: 5px solid var(--accent-color); /* Accent color top border */
  box-shadow: 0 4px 15px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
}

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

.testimonial-rating {
  margin-bottom: 15px;
  color: #ffc107; /* Gold color for stars */
}

.testimonial-rating .fa-star {
  margin: 0 1px;
}

.testimonial-text {
  font-size: 1.1rem;
  color: #444;
  flex-grow: 1;
  margin: 0 0 25px;
  line-height: 1.8;
}

.testimonial-author {
  border-top: 1px solid #eee;
  padding-top: 15px;
}

.author-name {
  margin: 0 0 5px;
  color: var(--primary-color);
  font-weight: 700;
}

.author-project {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
}

.testimonials-link {
  text-align: center;
  margin-top: 50px;
}
/* --- Services Page Styles --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.service-card {
  background-color: var(--card-bg);
  padding: 40px 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.07);
  border-bottom: 5px solid transparent;
  transition: transform 0.3s, border-color 0.3s;
}

.service-card:hover {
  transform: translateY(-10px);
  border-bottom-color: var(--accent-color);
}

.service-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.service-title {
  font-size: 1.6rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.service-description {
  font-size: 1rem;
  color: #555;
  line-height: 1.8;
  margin-bottom: 25px;
}

.service-outcomes {
  list-style: none;
  padding: 0;
  text-align: right;
  font-size: 1rem;
  color: #333;
}

.service-outcomes li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.service-outcomes .fa-check-circle {
  color: var(--accent-color);
  margin-left: 10px;
}

/* --- How It Works Section --- */
.how-it-works {
    padding: 60px 0;
}

.steps-container {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 40px;
    text-align: center;
}

.step {
    flex: 1;
    padding: 20px;
}

.step-number {
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: white;
    font-size: 1.8rem;
    font-weight: 900;
    margin: 0 auto 20px;
}

.step-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 60px 20px;
  text-align: center;
  border-radius: 15px;
  margin-top: 40px;
}

.cta-section h2 {
  font-size: 2.2rem;
  margin: 0 0 15px;
}

.cta-section p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 30px;
}
/* --- Blog Page & Post Styles --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 35px;
  padding: 20px 0;
}

.blog-post-card {
  background-color: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.blog-post-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
}

/* صورة المقال في البطاقة */
.post-card-image-link {
  display: block;
  height: 200px; /* حجم جديد للصورة */
  overflow: hidden;
  background: none; /* بدون خلفية */
}

.post-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0; /* بدون زوايا */
  transition: transform 0.5s ease;
}

.blog-post-card:hover .post-card-image {
  transform: scale(1.05);
}

.post-card-content {
  flex: 1;
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* الوسوم */
.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.post-card-tags span {
  background-color: var(--primary-color);
  color: #fff;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.post-card-tags span:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

/* العناوين */
.post-card-title a {
  font-size: 1.6rem;
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.post-card-title a:hover {
  color: var(--accent-color);
}

.post-card-excerpt {
  color: #555;
  margin: 15px 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.post-card-meta {
  font-size: 0.85rem;
  color: #777;
  display: flex;
  gap: 20px;
  margin-top: auto;
}

.post-card-meta i {
  margin-left: 5px;
  opacity: 0.8;
}

/* --- Single Post Styles --- */
.blog-post {
  max-width: 850px;
  margin: 0 auto;
  padding: 0 20px;
}

.post-header {
  text-align: center;
  margin-bottom: 45px;
}

.post-title {
  font-size: 2.8rem;
  margin-bottom: 15px;
  font-weight: 800;
  line-height: 1.3;
}

.post-meta {
  display: flex;
  justify-content: center;
  gap: 25px;
  color: #30405c;
  font-size: 0.9rem;
  margin-bottom: 30px;
}

/* صورة المقال الفردي */
.post-featured-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: none; /* بدون خلفية */
  box-shadow: none; /* بدون ظل */
  margin-bottom: 40px;
}

.post-content {
  font-size: 1.1rem;
  line-height: 2;
  color: #333;
}

.post-content h2 {
  font-size: 2rem;
  margin-top: 50px;
  margin-bottom: 20px;
  color: var(--primary-color);
  font-weight: 700;
}

.post-content ul {
  padding-right: 25px;
  margin-bottom: 20px;
}

.post-content li {
  margin-bottom: 8px;
}

.post-content hr {
  border: 0;
  height: 1px;
  background-color: #ddd;
  margin: 50px 0;
}

/* --- Latest Posts Section on Home Page --- */
.latest-posts {
  padding: 70px 0;
  background-color: var(--bg-color);
  text-align: center;
}

.latest-posts h2 {
  font-size: 2.2rem;
  margin-bottom: 35px;
  font-weight: 800;
  color: var(--primary-color);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .post-title {
    font-size: 2.2rem;
  }
}

/* =================================== */
/* === New Hero Section Styles === */
/* =================================== */
.new-hero-section {
  height: 100vh; /* Full viewport height */
  background-image: url('https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80'); /* Example image */
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* Parallax effect */
  position: relative;
  display: flex;
  flex-direction: column; /* Arrange items vertically */
  align-items: center;
  justify-content: center;
  color: white; /* Text color for hero content */
  text-align: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7); /* Dark overlay */
  z-index: 1;
}

.hero-content-wrapper {
  position: relative;
  z-index: 2; /* Ensure content is above overlay */
  flex-grow: 1; /* Allow content to take available space */
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 80px; /* Adjust padding to account for fixed header */
}

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

.new-hero-title {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.new-hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

.new-hero-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 50px;
}

.hero-expertise-cards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.expertise-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 20px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 700;
  transition: background 0.3s;
}
.expertise-card:hover {
  background: rgba(255, 255, 255, 0.2);
}
.expertise-card i {
  margin-left: 8px;
  color: var(--accent-color);
}

/* Adjustments for existing CTA buttons to fit new hero section */
.new-hero-buttons .cta-button {
  background-color: var(--accent-color);
  color: white;
  padding: 15px 30px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: transform 0.3s, box-shadow 0.3s;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.new-hero-buttons .cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.new-hero-buttons .cta-button.secondary {
  background-color: transparent;
  color: white;
  border: 2px solid var(--accent-color);
}

.new-hero-buttons .cta-button.secondary:hover {
  background-color: var(--accent-color);
  color: var(--text-color);
}

/* =================================== */
/* === Why Me Section (from previous request) === */
/* =================================== */
.why-me-section {
  padding: 80px 0;
}

.why-me-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.why-me-card {
  background-color: var(--card-bg);
  padding: 40px 30px;
  text-align: center;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border-top: 4px solid var(--accent-color);
  transition: transform 0.3s, box-shadow 0.3s;
}
.why-me-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.why-me-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.why-me-title {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.why-me-card p {
  font-size: 1rem;
  line-height: 1.8;
  color: #555;
}

/* =================================== */
/* === Responsive Design for New Hero === */
/* =================================== */
@media (max-width: 500px) {
  .new-hero-title {
    font-size: 2.5rem;
  }
  .new-hero-subtitle {
    font-size: 1.1rem;
  }
  .new-hero-buttons {
    flex-direction: column;
    gap: 10px;
  }
  .hero-expertise-cards {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width:250px) {
  .new-hero-title {
    font-size: 2rem;
  }
  .new-hero-subtitle {
    font-size: 1rem;
  }
  .new-hero-buttons .cta-button {
    width: 80%;
  }
  .expertise-card {
    width: 90%;
  }
}

/* ===== CSS Reset & Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Color Palette */
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary-color: #f59e0b;
  --secondary-dark: #d97706;
  --accent-color: #10b981;
  --accent-dark: #059669;
  
  /* Neutral Colors */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Status Colors */
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;
  
  /* Typography */
  --font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  
  /* Spacing */
  --spacing-1: 0.25rem;
  --spacing-2: 0.5rem;
  --spacing-3: 0.75rem;
  --spacing-4: 1rem;
  --spacing-5: 1.25rem;
  --spacing-6: 1.5rem;
  --spacing-8: 2rem;
  --spacing-10: 2.5rem;
  --spacing-12: 3rem;
  --spacing-16: 4rem;
  --spacing-20: 5rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--gray-800);
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
  min-height: 100vh;
  direction: rtl;
  text-align: right;
}

/* ===== Skip Link for Accessibility ===== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: var(--white);
  padding: var(--spacing-2) var(--spacing-4);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  z-index: 1000;
  transition: var(--transition-fast);
}

.skip-link:focus {
  top: 6px;
}

/* ===== Container ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-4);
}

@media (min-width: 770px) {
  .container {
    padding: 0 var(--spacing-6);
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 var(--spacing-8);
  }
}

/* ===== Header & Navigation ===== */
header {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

nav {
  padding: var(--spacing-4) 0;
}

.nav-list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-2);
  list-style: none;
  flex-wrap: wrap;
}

.nav-list a {
  display: inline-block;
  padding: var(--spacing-3) var(--spacing-5);
  text-decoration: none;
  color: var(--gray-600);
  font-weight: 500;
  border-radius: var(--radius-lg);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.nav-list a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  transform: scaleX(0);
  transform-origin: right;
  transition: var(--transition-normal);
  z-index: -1;
}

.nav-list a:hover::before,
.nav-list a.active::before {
  transform: scaleX(1);
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--white);
  transform: translateY(-2px);
}

.nav-list a.active {
  font-weight: 600;
}

/* ===== Main Content ===== */
main {
  padding: var(--spacing-12) 0;
  min-height: calc(100vh - 200px);
}

/* ===== Contact Section ===== */
.contact-section {
  max-width: 1000px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-16);
  animation: fadeInUp 0.8s ease-out;
}

.page-title {
  font-size: var(--font-size-5xl);
  font-weight: 900;
  color: var(--gray-900);
  margin-bottom: var(--spacing-6);
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: var(--radius-sm);
}

.page-subtitle {
  font-size: var(--font-size-xl);
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== Contact Content Layout ===== */
.contact-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-12);
  margin-top: var(--spacing-16);
}

@media (min-width: 1024px) {
  .contact-content {
    grid-template-columns: 1fr 1.2fr;
    gap: var(--spacing-16);
  }
}

/* ===== Contact Info ===== */
.contact-info-wrapper {
  animation: fadeInRight 0.8s ease-out 0.2s both;
}

.contact-info-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--spacing-8);
  position: relative;
  padding-bottom: var(--spacing-3);
}

.contact-info-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
  border-radius: var(--radius-sm);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-6);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-4);
  padding: var(--spacing-6);
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
  border: 1px solid var(--gray-100);
  position: relative;
  overflow: hidden;
}

.contact-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  transform: scaleY(0);
  transition: var(--transition-normal);
}

.contact-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
}

.contact-item:hover::before {
  transform: scaleY(1);
}

.contact-icon {
  font-size: var(--font-size-xl);
  color: var(--primary-color);
  margin-top: var(--spacing-1);
  transition: var(--transition-normal);
}

.contact-item:hover .contact-icon {
  color: var(--accent-color);
  transform: scale(1.1);
}

.contact-details {
  flex: 1;
}

.contact-label {
  display: block;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: var(--spacing-2);
  font-size: var(--font-size-sm);
}

.contact-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
  position: relative;
}

.contact-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: var(--transition-normal);
}

.contact-link:hover {
  color: var(--accent-color);
}

.contact-link:hover::after {
  width: 100%;
}

/* ===== Contact Form ===== */
.contact-form-wrapper {
  animation: fadeInLeft 0.8s ease-out 0.4s both;
}

.form-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--spacing-8);
  position: relative;
  padding-bottom: var(--spacing-3);
}

.form-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: var(--radius-sm);
}

.contact-form {
  background: var(--white);
  padding: var(--spacing-10);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-100);
}

.form-group {
  margin-bottom: var(--spacing-6);
  position: relative;
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: var(--spacing-3);
  font-size: var(--font-size-sm);
}

.required {
  color: var(--error-color);
  font-weight: 700;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: var(--spacing-4) var(--spacing-5);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  transition: var(--transition-normal);
  background: var(--gray-50);
  color: var(--gray-800);
  direction: rtl;
  text-align: right;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

.form-input.valid,
.form-textarea.valid {
  border-color: var(--success-color);
  background: rgba(16, 185, 129, 0.05);
}

.form-input.error,
.form-textarea.error {
  border-color: var(--error-color);
  background: rgba(239, 68, 68, 0.05);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.error-message {
  display: block;
  color: var(--error-color);
  font-size: var(--font-size-sm);
  margin-top: var(--spacing-2);
  font-weight: 500;
}

.character-count {
  display: block;
  text-align: left;
  font-size: var(--font-size-xs);
  color: var(--gray-500);
  margin-top: var(--spacing-2);
  transition: var(--transition-fast);
}

.character-count.over-limit {
  color: var(--error-color);
  font-weight: 600;
}

/* ===== Submit Button ===== */
.cta-button {
  width: 100%;
  padding: var(--spacing-5) var(--spacing-8);
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--white);
  border: none;
  border-radius: var(--radius-lg);
  font-size: var(--font-size-lg);
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: var(--transition-slow);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.cta-button:hover::before {
  left: 100%;
}

.cta-button:active {
  transform: translateY(0);
}

.cta-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.cta-button.loading {
  pointer-events: none;
}

.button-loading {
  display: none;
  align-items: center;
  gap: var(--spacing-2);
}

.button-loading .fa-spinner {
  animation: spin 1s linear infinite;
}

/* ===== Submit Status ===== */
.submit-status {
  margin-top: var(--spacing-4);
  padding: var(--spacing-3) var(--spacing-4);
  border-radius: var(--radius-md);
  font-weight: 500;
  text-align: center;
  transition: var(--transition-normal);
}

.submit-status.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.submit-status.error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error-color);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.submit-status.loading {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info-color);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ===== Footer ===== */
footer {
  background: var(--gray-900);
  color: var(--gray-300);
  text-align: center;
  padding: var(--spacing-8) 0;
  margin-top: var(--spacing-20);
}

footer p {
  font-size: var(--font-size-sm);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ===== Responsive Design ===== */
@media (max-width: 767px) {
  :root {
    --font-size-5xl: 2.5rem;
    --font-size-4xl: 2rem;
    --font-size-3xl: 1.5rem;
  }
  
  .container {
    padding: 0 var(--spacing-4);
  }
  
  main {
    padding: var(--spacing-8) 0;
  }
  
  .section-header {
    margin-bottom: var(--spacing-10);
  }
  
  .page-title {
    font-size: var(--font-size-4xl);
  }
  
  .page-subtitle {
    font-size: var(--font-size-lg);
  }
  
  .contact-content {
    gap: var(--spacing-8);
  }
  
  .contact-form {
    padding: var(--spacing-6);
  }
  
  .contact-item {
    padding: var(--spacing-4);
  }
  
  .nav-list {
    gap: var(--spacing-1);
  }
  
  .nav-list a {
    padding: var(--spacing-2) var(--spacing-3);
    font-size: var(--font-size-sm);
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: var(--font-size-3xl);
  }
  
  .contact-item {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-3);
  }
  
  .contact-icon {
    font-size: var(--font-size-2xl);
  }
  
  .nav-list {
    flex-direction: row;
    gap: var(--spacing-2);
  }
  
  .nav-list a {
    width: 100%;
    text-align: center;
  }
}

/* ===== Print Styles ===== */
@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  .skip-link,
  .button-loading,
  .cta-button {
    display: none !important;
  }
  
  .contact-form {
    border: 1px solid #ccc;
  }
  
  .contact-item {
    break-inside: avoid;
  }
}

/* ===== High Contrast Mode ===== */
@media (prefers-contrast: high) {
  :root {
    --gray-100: #e0e0e0;
    --gray-200: #c0c0c0;
    --gray-300: #a0a0a0;
    --gray-600: #404040;
    --gray-700: #202020;
    --gray-800: #000000;
  }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- General Setup --- */
:root {
  --primary-color: #171c24; /* أزرق داكن */
  --secondary-color: #1976d2; /* أزرق أفتح */
  --accent-color: #ffab40; /* برتقالي للتمييز */
  --text-color: #333;
  --bg-color: #f4f7f9;
  --card-bg: #ffffff;
  --header-text: #ffffff;
}

body {
  margin: 0;
  font-family: 'Cairo', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  direction: rtl;
  line-height: 1.7;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 {
  font-weight: 900;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s;
}
a:hover {
  color: var(--accent-color);
}

/* --- Header & Navigation --- */
header {
  background-color: var(--primary-color);
  color: var(--header-text);
  padding-bottom: 40px;
}
.main-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  padding-bottom: 60px;
  text-align: center;
}
/* =================================== */
/* === جعل شريط التنقل ثابتًا === */
/* =================================== */

/* استهداف الهيدر الرئيسي في كل الصفحات */
body > header {
  position: sticky; /* الخاصية الأساسية لجعل العنصر لزجًا */
  top: 0; /* تحديد التصاقه بأعلى الشاشة */
  z-index: 1000; /* ضمان بقائه فوق كل العناصر الأخرى */
  background-color: var(--primary-color); /* تأكيد لون الخلفية عند التمرير */
  
  /* إضافة ظل خفيف ليظهر فوق المحتوى بشكل أفضل */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15); 
}

nav {
  display: flex;
  justify-content: center;
  padding: 20px 0;
  gap: 25px;
}
nav a {
  color: var(--header-text);
  font-weight: 700;
  padding: 5px 10px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s;
}
nav a:hover, nav a.active {
  border-bottom-color: var(--accent-color);
}

/* --- Hero Section (Home Page) --- */
.hero-content {
  padding-top: 40px;
}
.profile-picture {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 5px solid var(--accent-color);
  object-fit: cover;
  margin-bottom: 20px;
}
.hero-title {
  font-size: 3.5rem;
  margin: 10px 0;
  color: var(--header-text);
}
.hero-subtitle {
  font-size: 1.2rem;
  color: var(--header-text);
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 30px;
}
.cta-button {
  background-color: var(--accent-color);
  color: var(--text-color);
  padding: 15px 35px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: transform 0.3s, box-shadow 0.3s;
  display: inline-block;
}
.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  color: var(--text-color);
}

/* --- General Page & Section Titles --- */
main {
  padding: 60px 0;
}
.section-title, .page-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 20px;
  position: relative;
}
.section-title::after, .page-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background-color: var(--accent-color);
  margin: 15px auto 0;
  border-radius: 2px;
}
.page-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: #666;
  max-width: 700px;
  margin: 0 auto 60px;
}

/* --- Portfolio Grid & Cards --- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}
.project-card {
  background-color: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.project-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.project-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.project-title {
  font-size: 1.5rem;
  margin: 0 0 10px;
  color: var(--primary-color);
}
.project-description {
  flex-grow: 1;
  margin-bottom: 15px;
  color: #555;
}
.project-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.project-tags span {
  background-color: #e9ecef;
  color: #495057;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}
.project-button {
  display: block;
  background-color: var(--secondary-color);
  color: white;
  padding: 12px;
  text-align: center;
  border-radius: 8px;
  font-weight: 700;
  transition: background-color 0.3s;
}
.project-button:hover {
  background-color: var(--primary-color);
  color: white;
}
.project-button.disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* --- About Page --- */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.about-content p {
  font-size: 2rem;
  margin-bottom: 20px;
}
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 40px;
}
.skill-item {
  background-color: var(--card-bg);
  padding: 10px 25px;
  border-radius: 50px;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  color: var(--primary-color);
}

/* --- Contact Page --- */
.contact-section {
  max-width: 700px;
  margin: 0 auto;
}
.contact-info {
  text-align: center;
  margin-bottom: 40px;
  font-size: 1.1rem;
}
.contact-info p {
  margin: 10px 0;
}
.contact-form {
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.contact-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 20px;
  font-family: 'Cairo', sans-serif;
}
.contact-form button {
  width: 100%;
  border: none;
  cursor: pointer;
}

/* --- Footer --- */
footer {
  background-color: #333;
  color: #eee;
  text-align: center;
  padding: 25px 0;
  margin-top: 60px;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
  .hero-title { font-size: 2.5rem; }
  nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }
}
/* --- Project Detail Page Styles --- */
.project-detail {
  max-width: 900px;
  margin: 0 auto;
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}

.project-detail-header {
  text-align: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 30px;
  margin-bottom: 40px;
}

.project-detail-title {
  font-size: 2.8rem;
  margin: 0;
}

.project-detail-subtitle {
  font-size: 1.2rem;
  color: #eee;
  margin: 15px 0 30px;
}

.project-detail-image {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 40px;
}

.project-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
  background-color: var(--bg-color);
  padding: 30px;
  border-radius: 10px;
  margin-bottom: 40px;
  text-align: center;
}

.overview-item h4 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: var(--primary-color);
}

.overview-item p {
  margin: 0;
  font-size: 1rem;
  color: #444;
}

.project-content-section h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-top: 40px;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 10px;
  display: inline-block;
}

.project-content-section p, 
.project-content-section li {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
}

.project-content-section ol,
.project-content-section ul {
  padding-right: 20px;
}

.back-to-portfolio {
  text-align: center;
  margin-top: 60px;
}

/* --- Style for Secondary Button in Project Detail --- */
.cta-button.secondary {
  background-color: #6c757d; /* A neutral grey color */
}

.cta-button.secondary:hover {
  background-color: #5a6268;
}

/* --- Style for GitHub Icon in Button --- */
.cta-button .fa-github {
  margin-left: 8px; /* Adds some space between the icon and text */
}
/* --- Testimonials Section (Improved Version ) --- */
.testimonials {
  background-color: var(--bg-color); /* Changed to bg-color for contrast */
  padding: 60px 0;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.testimonial-card {
  background-color: var(--card-bg); /* White background for cards */
  padding: 30px;
  border-radius: 15px;
  border-top: 5px solid var(--accent-color); /* Accent color top border */
  box-shadow: 0 4px 15px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
}

.testimonial-rating {
  margin-bottom: 15px;
  color: #ffc107; /* Gold color for stars */
}

.testimonial-rating .fa-star {
  margin: 0 1px;
}

.testimonial-text {
  font-size: 1.1rem;
  color: #444;
  flex-grow: 1;
  margin: 0 0 25px;
  line-height: 1.8;
}

.testimonial-author {
  border-top: 1px solid #eee;
  padding-top: 15px;
}

.author-name {
  margin: 0 0 5px;
  color: var(--primary-color);
  font-weight: 700;
}

.author-project {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
}

.testimonials-link {
  text-align: center;
  margin-top: 50px;
}
/* --- Services Page Styles --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.service-card {
  background-color: var(--card-bg);
  padding: 40px 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.07);
  border-bottom: 5px solid transparent;
  transition: transform 0.3s, border-color 0.3s;
}

.service-card:hover {
  transform: translateY(-10px);
  border-bottom-color: var(--accent-color);
}

.service-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.service-title {
  font-size: 1.6rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.service-description {
  font-size: 1rem;
  color: #555;
  line-height: 1.8;
  margin-bottom: 25px;
}

.service-outcomes {
  list-style: none;
  padding: 0;
  text-align: right;
  font-size: 1rem;
  color: #333;
}

.service-outcomes li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.service-outcomes .fa-check-circle {
  color: var(--accent-color);
  margin-left: 10px;
}

/* --- How It Works Section --- */
.how-it-works {
    padding: 60px 0;
}

.steps-container {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 40px;
    text-align: center;
}

.step {
    flex: 1;
    padding: 20px;
}

.step-number {
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: white;
    font-size: 1.8rem;
    font-weight: 900;
    margin: 0 auto 20px;
}

.step-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 60px 20px;
  text-align: center;
  border-radius: 15px;
  margin-top: 40px;
}

.cta-section h2 {
  font-size: 2.2rem;
  margin: 0 0 15px;
}

.cta-section p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 30px;
}
/* --- Blog Page & Post Styles --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 35px;
  padding: 20px 0;
}

.blog-post-card {
  background-color: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.blog-post-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
}

/* صورة المقال في البطاقة */
.post-card-image-link {
  display: block;
  height: 200px; /* حجم جديد للصورة */
  overflow: hidden;
  background: none; /* بدون خلفية */
}

.post-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0; /* بدون زوايا */
  transition: transform 0.5s ease;
}

.blog-post-card:hover .post-card-image {
  transform: scale(1.05);
}

.post-card-content {
  flex: 1;
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* الوسوم */
.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.post-card-tags span {
  background-color: var(--primary-color);
  color: #fff;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.post-card-tags span:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

/* العناوين */
.post-card-title a {
  font-size: 1.6rem;
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.post-card-title a:hover {
  color: var(--accent-color);
}

.post-card-excerpt {
  color: #555;
  margin: 15px 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.post-card-meta {
  font-size: 0.85rem;
  color: #777;
  display: flex;
  gap: 20px;
  margin-top: auto;
}

.post-card-meta i {
  margin-left: 5px;
  opacity: 0.8;
}

/* --- Single Post Styles --- */
.blog-post {
  max-width: 850px;
  margin: 0 auto;
  padding: 0 20px;
}

.post-header {
  text-align: center;
  margin-bottom: 45px;
}

.post-title {
  font-size: 2.8rem;
  margin-bottom: 15px;
  font-weight: 800;
  line-height: 1.3;
}

.post-meta {
  display: flex;
  justify-content: center;
  gap: 25px;
  color: #ffffff;
  font-size: 0.9rem;
  margin-bottom: 30px;
}

/* صورة المقال الفردي */
.post-featured-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: none; /* بدون خلفية */
  box-shadow: none; /* بدون ظل */
  margin-bottom: 40px;
}

.post-content {
  font-size: 1.1rem;
  line-height: 2;
  color: #333;
}

.post-content h2 {
  font-size: 2rem;
  margin-top: 50px;
  margin-bottom: 20px;
  color: var(--primary-color);
  font-weight: 700;
}

.post-content ul {
  padding-right: 25px;
  margin-bottom: 20px;
}

.post-content li {
  margin-bottom: 8px;
}

.post-content hr {
  border: 0;
  height: 1px;
  background-color: #ddd;
  margin: 50px 0;
}

/* --- Latest Posts Section on Home Page --- */
.latest-posts {
  padding: 70px 0;
  background-color: var(--bg-color);
  text-align: center;
}

.latest-posts h2 {
  font-size: 2.2rem;
  margin-bottom: 35px;
  font-weight: 800;
  color: var(--primary-color);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .post-title {
    font-size: 2.2rem;
  }
}


/* =================================== */
/* === تنسيقات صفحة المقال الفردي (بدون خلفية للهيدر) === */
/* =================================== */

/* إزالة أي تنسيقات قديمة من حاوية المقال الرئيسية */
.blog-post {
  padding: 0;
  background-color: transparent;
  box-shadow: none;
}

/* الحاوية البيضاء الجديدة التي تحتوي على كل شيء */
.post-container-white {
  background-color: white;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  max-width: 850px;
  margin: 0 auto; /* توسيط الحاوية */
}

/* الصورة الرئيسية في أعلى المقال */
.post-featured-image {
  width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: fit;
  border-radius: 12px;
  margin-bottom: 30px;
}

/* رأس المقال (الذي يحتوي على العنوان والتفاصيل) */
.post-header {
  padding: 0; /* لا حاجة لأي حشوة */
  text-align: center;
  margin-bottom: 40px;
  color: inherit; /* يرث اللون من الأب */
  background: none; /* الأهم: لا يوجد أي لون أو صورة خلفية */
}

/* عنوان المقال */
.post-title {
  color: var(--primary-color); /* لون أزرق داكن */
  font-size: 2.8rem;
  margin-top: 15px;
  margin-bottom: 20px;
}

/* تفاصيل المقال (الكاتب، التاريخ، إلخ) */
.post-meta {
  color: #555; /* لون رمادي داكن ليكون واضحاً */
  display: flex;
  justify-content: center;
  gap: 25px;
}

/* الوسوم (Tags) فوق العنوان */
.post-header .post-card-tags {
    justify-content: center;
    margin-bottom: 20px;
}
.post-header .post-card-tags span {
    background-color: #e9ecef;
    color: #495057;
    border: none;
}

/* تنسيق المحتوى النصي للمقال */
.post-content {
  font-size: 1.1rem;
  line-height: 1.9;
  color: #333;
}
/* =================================== */
/* === تعديلات الصفحة الرئيسية (بدون صورة ) === */
/* =================================== */

.hero-content {
  /* زيادة الحشوة العلوية لتعويض المساحة الفارغة بعد حذف الصورة */
  padding-top: 60px; 
}

/* =================================== */
/* === تنسيقات صفحة "عني" الجديدة === */
/* =================================== */

.about-layout {
  display: grid;
  grid-template-columns: 2fr 1fr; /* تقسيم الشاشة لعمودين: ثلثين للنص وثلث للصورة */
  gap: 50px; /* مسافة بين النص والصورة */
  align-items: center; /* محاذاة رأسية في المنتصف */
  margin-top: 40px;
  margin-bottom: 60px;
}

.about-text p {
  font-size: 1.7rem;
  line-height: 1.9;
  color: #333;
}

.about-image img {
  width: 100%;
  border-radius: 15px; /* زوايا دائرية للصورة */
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* تعديلات للشاشات الصغيرة (الجوال) */
@media (max-width: 768px) {
  .about-layout {
    grid-template-columns: 1fr; /* عرض عمود واحد فقط */
    text-align: center;
  }

  .about-image {
    /* تغيير ترتيب العناصر في الجوال لتظهر الصورة أولاً */
    order: -1; 
    margin-bottom: 30px;
    max-width: 250px; /* تحديد عرض أقصى للصورة في الجوال */
    margin-left: auto;
    margin-right: auto;
  }
}
/* =================================== */
/* === التصميم الجديد للصفحة الرئيسية === */
/* =================================== */

/* --- قسم الهيرو الجديد --- */
.new-hero-section {
  background: linear-gradient(135deg, #0d47a1, #1565c0); /* تدرج لوني أزرق احترافي */
  color: white;
  padding: 100px 0 80px 0; /* حشوة علوية وسفلية كبيرة */
  text-align: center;
}

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

.new-hero-title {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 20px;
}

.new-hero-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 650px;
  margin: 0 auto 30px;
  line-height: 1.7;
}

.new-hero-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 50px;
}

/* تعديل على الزر الثانوي ليتناسب مع الخلفية الداكنة */
.new-hero-buttons .cta-button.secondary {
  background-color: transparent;
  color: white;
  border: 2px solid var(--accent-color);
}
.new-hero-buttons .cta-button.secondary:hover {
  background-color: var(--accent-color);
  color: var(--text-color);
}

.hero-expertise-cards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.expertise-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 20px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 700;
  transition: background 0.3s;
}
.expertise-card:hover {
  background: rgba(255, 255, 255, 0.2);
}
.expertise-card i {
  margin-left: 8px;
  color: var(--accent-color);
}


/* --- قسم "لماذا تختارني؟" --- */
.why-me-section {
  padding: 80px 0;
}

.why-me-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.why-me-card {
  background-color: var(--card-bg);
  padding: 40px 30px;
  text-align: center;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border-top: 4px solid var(--accent-color);
  transition: transform 0.3s, box-shadow 0.3s;
}
.why-me-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.why-me-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.why-me-title {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.why-me-card p {
  font-size: 1rem;
  line-height: 1.8;
  color: #555;
}
/* --- General Setup --- */
:root {
  --primary-color: #0d47a1; /* أزرق داكن */
  --secondary-color: #1976d2; /* أزرق أفتح */
  --accent-color: #ffab40; /* برتقالي للتمييز */
  --text-color: #333;
  --bg-color: #f4f7f9;
  --card-bg: #ffffff;
  --header-text: #ffffff;
}

body {
  margin: 0;
  font-family: 'Cairo', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  direction: rtl;
  line-height: 1.7;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 {
  font-weight: 900;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s;
}
a:hover {
  color: var(--accent-color);
}

/* --- Header & Navigation --- */
header {
  background-color: var(--primary-color);
  color: var(--header-text);
  padding-bottom: 40px;
}
.main-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  padding-bottom: 60px;
  text-align: center;
}
nav {
  display: flex;
  justify-content: center;
  padding: 20px 0;
  gap: 25px;
}
nav a {
  color: var(--header-text);
  font-weight: 700;
  padding: 5px 10px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s;
}
nav a:hover, nav a.active {
  border-bottom-color: var(--accent-color);
}

/* --- Hero Section (Home Page) --- */
.hero-content {
  padding-top: 40px;
}
.profile-picture {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 5px solid var(--accent-color);
  object-fit: cover;
  margin-bottom: 20px;
}
.hero-title {
  font-size: 3.5rem;
  margin: 10px 0;
  color: var(--header-text);
}
.hero-subtitle {
  font-size: 1.2rem;
  color: var(--header-text);
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 30px;
}
.cta-button {
  background-color: var(--accent-color);
  color: var(--text-color);
  padding: 15px 35px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: transform 0.3s, box-shadow 0.3s;
  display: inline-block;
}
.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  color: var(--text-color);
}

/* --- General Page & Section Titles --- */
main {
  padding: 60px 0;
}
.section-title, .page-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 20px;
  position: relative;
}
.section-title::after, .page-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background-color: var(--accent-color);
  margin: 15px auto 0;
  border-radius: 2px;
}
.page-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: #666;
  max-width: 700px;
  margin: 0 auto 60px;
}

/* --- Portfolio Grid & Cards --- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}
.project-card {
  background-color: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.project-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.project-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.project-title {
  font-size: 1.5rem;
  margin: 0 0 10px;
  color: var(--primary-color);
}
.project-description {
  flex-grow: 1;
  margin-bottom: 15px;
  color: #555;
}
.project-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.project-tags span {
  background-color: #e9ecef;
  color: #495057;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}
.project-button {
  display: block;
  background-color: var(--secondary-color);
  color: white;
  padding: 12px;
  text-align: center;
  border-radius: 8px;
  font-weight: 700;
  transition: background-color 0.3s;
}
.project-button:hover {
  background-color: var(--primary-color);
  color: white;
}
.project-button.disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* --- About Page --- */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.about-content p {
  font-size: 1.1rem;
  margin-bottom: 20px;
}
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 40px;
}
.skill-item {
  background-color: var(--card-bg);
  padding: 10px 25px;
  border-radius: 50px;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  color: var(--primary-color);
}

/* --- Contact Page --- */
.contact-section {
  max-width: 700px;
  margin: 0 auto;
}
.contact-info {
  text-align: center;
  margin-bottom: 40px;
  font-size: 1.1rem;
}
.contact-info p {
  margin: 10px 0;
}
.contact-form {
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.contact-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 20px;
  font-family: 'Cairo', sans-serif;
}
.contact-form button {
  width: 100%;
  border: none;
  cursor: pointer;
}

/* --- Footer --- */
footer {
  background-color: #333;
  color: #eee;
  text-align: center;
  padding: 25px 0;
  margin-top: 60px;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
  .hero-title { font-size: 2.5rem; }
  nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }
}
/* --- Project Detail Page Styles --- */
.project-detail {
  max-width: 900px;
  margin: 0 auto;
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}

.project-detail-header {
  text-align: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 30px;
  margin-bottom: 40px;
}

.project-detail-title {
  font-size: 2.8rem;
  margin: 0;
}

.project-detail-subtitle {
  font-size: 1.2rem;
  color: #eee;
  margin: 15px 0 30px;
}

.project-detail-image {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 40px;
}

.project-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
  background-color: var(--bg-color);
  padding: 30px;
  border-radius: 10px;
  margin-bottom: 40px;
  text-align: center;
}

.overview-item h4 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: var(--primary-color);
}

.overview-item p {
  margin: 0;
  font-size: 1rem;
  color: #444;
}

.project-content-section h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-top: 40px;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 10px;
  display: inline-block;
}

.project-content-section p, 
.project-content-section li {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
}

.project-content-section ol,
.project-content-section ul {
  padding-right: 20px;
}

.project-content-section hr {
  border: 0;
  height: 1px;
  background-color: #ddd;
  margin: 50px 0;
}

.back-to-portfolio {
  text-align: center;
  margin-top: 60px;
}

/* --- Style for Secondary Button in Project Detail --- */
.cta-button.secondary {
  background-color: #6c757d; /* A neutral grey color */
}

.cta-button.secondary:hover {
  background-color: #5a6268;
}

/* --- Style for GitHub Icon in Button --- */
.cta-button .fa-github {
  margin-left: 8px; /* Adds some space between the icon and text */
}
/* --- Testimonials Section (Improved Version ) --- */
.testimonials {
  background-color: var(--bg-color); /* Changed to bg-color for contrast */
  padding: 60px 0;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.testimonial-card {
  background-color: var(--card-bg); /* White background for cards */
  padding: 30px;
  border-radius: 15px;
  border-top: 5px solid var(--accent-color); /* Accent color top border */
  box-shadow: 0 4px 15px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
}

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

.testimonial-rating {
  margin-bottom: 15px;
  color: #ffc107; /* Gold color for stars */
}

.testimonial-rating .fa-star {
  margin: 0 1px;
}

.testimonial-text {
  font-size: 1.1rem;
  color: #444;
  flex-grow: 1;
  margin: 0 0 25px;
  line-height: 1.8;
}

.testimonial-author {
  border-top: 1px solid #eee;
  padding-top: 15px;
}

.author-name {
  margin: 0 0 5px;
  color: var(--primary-color);
  font-weight: 700;
}

.author-project {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
}

.testimonials-link {
  text-align: center;
  margin-top: 50px;
}
/* --- Services Page Styles --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.service-card {
  background-color: var(--card-bg);
  padding: 40px 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.07);
  border-bottom: 5px solid transparent;
  transition: transform 0.3s, border-color 0.3s;
}

.service-card:hover {
  transform: translateY(-10px);
  border-bottom-color: var(--accent-color);
}

.service-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.service-title {
  font-size: 1.6rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.service-description {
  font-size: 1rem;
  color: #555;
  line-height: 1.8;
  margin-bottom: 25px;
}

.service-outcomes {
  list-style: none;
  padding: 0;
  text-align: right;
  font-size: 1rem;
  color: #333;
}

.service-outcomes li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.service-outcomes .fa-check-circle {
  color: var(--accent-color);
  margin-left: 10px;
}

/* --- How It Works Section --- */
.how-it-works {
    padding: 60px 0;
}

.steps-container {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 40px;
    text-align: center;
}

.step {
    flex: 1;
    padding: 20px;
}

.step-number {
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: white;
    font-size: 1.8rem;
    font-weight: 900;
    margin: 0 auto 20px;
}

.step-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 60px 20px;
  text-align: center;
  border-radius: 15px;
  margin-top: 40px;
}

.cta-section h2 {
  font-size: 2.2rem;
  margin: 0 0 15px;
}

.cta-section p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 30px;
}
/* --- Blog Page & Post Styles --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 35px;
  padding: 20px 0;
}

.blog-post-card {
  background-color: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.blog-post-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
}

/* صورة المقال في البطاقة */
.post-card-image-link {
  display: block;
  height: 200px; /* حجم جديد للصورة */
  overflow: hidden;
  background: none; /* بدون خلفية */
}

.post-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0; /* بدون زوايا */
  transition: transform 0.5s ease;
}

.blog-post-card:hover .post-card-image {
  transform: scale(1.05);
}

.post-card-content {
  flex: 1;
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* الوسوم */
.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.post-card-tags span {
  background-color: var(--primary-color);
  color: #fff;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.post-card-tags span:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

/* العناوين */
.post-card-title a {
  font-size: 1.6rem;
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.post-card-title a:hover {
  color: var(--accent-color);
}

.post-card-excerpt {
  color: #555;
  margin: 15px 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.post-card-meta {
  font-size: 0.85rem;
  color: #777;
  display: flex;
  gap: 20px;
  margin-top: auto;
}

.post-card-meta i {
  margin-left: 5px;
  opacity: 0.8;
}

/* --- Single Post Styles --- */
.blog-post {
  max-width: 850px;
  margin: 0 auto;
  padding: 0 20px;
}

.post-header {
  text-align: center;
  margin-bottom: 45px;
}

.post-title {
  font-size: 2.8rem;
  margin-bottom: 15px;
  font-weight: 800;
  line-height: 1.3;
}

.post-meta {
  display: flex;
  justify-content: center;
  gap: 25px;
  color: #ffffff;
  font-size: 0.9rem;
  margin-bottom: 30px;
}

/* صورة المقال الفردي */
.post-featured-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: none; /* بدون خلفية */
  box-shadow: none; /* بدون ظل */
  margin-bottom: 40px;
}

.post-content {
  font-size: 1.1rem;
  line-height: 2;
  color: #333;
}

.post-content h2 {
  font-size: 2rem;
  margin-top: 50px;
  margin-bottom: 20px;
  color: var(--primary-color);
  font-weight: 700;
}

.post-content ul {
  padding-right: 25px;
  margin-bottom: 20px;
}

.post-content li {
  margin-bottom: 8px;
}

.post-content hr {
  border: 0;
  height: 1px;
  background-color: #ddd;
  margin: 50px 0;
}

/* --- Latest Posts Section on Home Page --- */
.latest-posts {
  padding: 70px 0;
  background-color: var(--bg-color);
  text-align: center;
}

.latest-posts h2 {
  font-size: 2.2rem;
  margin-bottom: 35px;
  font-weight: 800;
  color: var(--primary-color);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .post-title {
    font-size: 2.2rem;
  }
}

/* =================================== */
/* === New Hero Section Styles === */
/* =================================== */
.new-hero-section {
  height: 100vh; /* Full viewport height */
  background-image: url('https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80'); /* Example image */
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* Parallax effect */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white; /* Text color for hero content */
  text-align: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7); /* Dark overlay */
  z-index: 1;
}

.new-hero-content {
  position: relative;
  z-index: 2; /* Ensure content is above overlay */
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.new-hero-title {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.new-hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

.new-hero-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 50px;
}

.hero-expertise-cards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.expertise-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 20px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 700;
  transition: background 0.3s;
}
.expertise-card:hover {
  background: rgba(255, 255, 255, 0.2);
}
.expertise-card i {
  margin-left: 8px;
  color: var(--accent-color);
}

/* Adjustments for existing CTA buttons to fit new hero section */
.new-hero-buttons .cta-button {
  background-color: var(--accent-color);
  color: white;
  padding: 15px 30px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: transform 0.3s, box-shadow 0.3s;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.new-hero-buttons .cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.new-hero-buttons .cta-button.secondary {
  background-color: transparent;
  color: white;
  border: 2px solid var(--accent-color);
}

.new-hero-buttons .cta-button.secondary:hover {
  background-color: var(--accent-color);
  color: var(--text-color);
}

/* Fixed Navigation Header (from previous request) */
body > header {
  position: sticky; 
  top: 0; 
  z-index: 1000; 
  background-color: var(--primary-color); 
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15); 
}

/* Ensure main content starts below fixed header */
main {
  margin-top: 0; /* Reset any default margin-top */
}

/* Adjustments for main header padding to accommodate fixed nav */
header .container {
  padding-top: 0; /* Remove top padding if it causes issues with fixed nav */
}

/* Ensure the nav links are visible on the fixed header */
header nav a {
  color: white; /* Ensure nav links are white on blue header */
}

header nav a:hover, header nav a.active {
  border-bottom-color: var(--accent-color);
}

/* =================================== */
/* === Why Me Section (from previous request) === */
/* =================================== */
.why-me-section {
  padding: 80px 0;
}

.why-me-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.why-me-card {
  background-color: var(--card-bg);
  padding: 40px 30px;
  text-align: center;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border-top: 4px solid var(--accent-color);
  transition: transform 0.3s, box-shadow 0.3s;
}
.why-me-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.why-me-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.why-me-title {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.why-me-card p {
  font-size: 1rem;
  line-height: 1.8;
  color: #555;
}

/* =================================== */
/* === Responsive Design for New Hero === */
/* =================================== */
@media (max-width: 768px) {
  .new-hero-title {
    font-size: 2.5rem;
  }
  .new-hero-subtitle {
    font-size: 1.1rem;
  }
  .new-hero-buttons {
    flex-direction: column;
    gap: 10px;
  }
  .hero-expertise-cards {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .new-hero-title {
    font-size: 2rem;
  }
  .new-hero-subtitle {
    font-size: 1rem;
  }
  .new-hero-buttons .cta-button {
    width: 80%;
  }
  .expertise-card {
    width: 90%;
  }
}

/* --- General Setup --- */
:root {
  --primary-color: #30405c; /* أزرق داكن */
  --secondary-color: #1976d2; /* أزرق أفتح */
  --accent-color: #ffab40; /* برتقالي للتمييز */
  --text-color: #30405c;
  --bg-color: #f4f7f9;
  --card-bg: #ffffff;
  --header-text: #ffffff;
}

body {
  margin: 0;
  font-family: 'Cairo', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  direction: rtl;
  line-height: 1.7;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 {
  font-weight: 900;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s;
}
a:hover {
  color: var(--accent-color);
}

/* --- Header & Navigation --- */
/* The main header is now part of the new-hero-section */
header {
  /* Remove background and padding from here as it's handled by new-hero-section */
  background-color: transparent; /* Make header background transparent */
  padding-bottom: 0; /* Remove padding if it's causing issues */
}

.fixed-header-in-hero {
  position: absolute; /* Position absolutely within the hero section */
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000; /* Ensure it's above the overlay */
  padding: 20px 0; /* Add padding for navigation */
  background-color: transparent; /* Ensure it's transparent to show background image */
}

.fixed-header-in-hero nav {
  display: flex;
  justify-content: center;
}

.fixed-header-in-hero nav a {
  color: white; /* Ensure nav links are white on the background image */
  font-weight: 700;
  padding: 5px 10px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s;
}

.fixed-header-in-hero nav a:hover, .fixed-header-in-hero nav a.active {
  border-bottom-color: var(--accent-color);
}

/* --- Hero Section (Home Page) --- */
.new-hero-section {
  height: 100vh; /* Full viewport height */
  background-image: url('https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80'); /* Example image */
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* Parallax effect */
  position: relative;
  display: flex;
  flex-direction: column; /* Arrange items vertically */
  align-items: center;
  justify-content: center;
  color: white; /* Text color for hero content */
  text-align: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7); /* Dark overlay */
  z-index: 1;
}

.hero-content-wrapper {
  position: relative;
  z-index: 2; /* Ensure content is above overlay */
  flex-grow: 1; /* Allow content to take available space */
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 80px; /* Adjust padding to account for fixed header */
}

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

.new-hero-title {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.new-hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

.new-hero-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 50px;
}

.hero-expertise-cards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.expertise-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 20px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 700;
  transition: background 0.3s;
}
.expertise-card:hover {
  background: rgba(255, 255, 255, 0.2);
}
.expertise-card i {
  margin-left: 8px;
  color: var(--accent-color);
}

/* Adjustments for existing CTA buttons to fit new hero section */
.new-hero-buttons .cta-button {
  background-color: var(--accent-color);
  color: white;
  padding: 15px 30px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: transform 0.3s, box-shadow 0.3s;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.new-hero-buttons .cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.new-hero-buttons .cta-button.secondary {
  background-color: transparent;
  color: white;
  border: 2px solid var(--accent-color);
}

.new-hero-buttons .cta-button.secondary:hover {
  background-color: var(--accent-color);
  color: var(--text-color);
}

/* --- General Page & Section Titles --- */
main {
  padding: 60px 0;
}
.section-title, .page-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 20px;
  position: relative;
}
.section-title::after, .page-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background-color: var(--accent-color);
  margin: 15px auto 0;
  border-radius: 2px;
}
.page-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: #666;
  max-width: 700px;
  margin: 0 auto 60px;
}

/* --- Portfolio Grid & Cards --- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}
.project-card {
  background-color: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.project-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.project-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.project-title {
  font-size: 1.5rem;
  margin: 0 0 10px;
  color: var(--primary-color);
}
.project-description {
  flex-grow: 1;
  margin-bottom: 15px;
  color: #555;
}
.project-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.project-tags span {
  background-color: #e9ecef;
  color: #495057;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}
.project-button {
  display: block;
  background-color: #30405c;
  color: white;
  padding: 12px;
  text-align: center;
  border-radius: 8px;
  font-weight: 700;
  transition: background-color 0.3s;
}
.project-button:hover {
  background-color: var(--primary-color);
  color: white;
}
.project-button.disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* --- About Page --- */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.about-content p {
  font-size: 1.1rem;
  margin-bottom: 20px;
}
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 40px;
}
.skill-item {
  background-color: var(--card-bg);
  padding: 10px 25px;
  border-radius: 50px;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  color: var(--primary-color);
}

/* --- Contact Page --- */
.contact-section {
  max-width: 700px;
  margin: 0 auto;
}
.contact-info {
  text-align: center;
  margin-bottom: 40px;
  font-size: 1.1rem;
}
.contact-info p {
  margin: 10px 0;
}
.contact-form {
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.contact-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 20px;
  font-family: 'Cairo', sans-serif;
}
.contact-form button {
  width: 100%;
  border: none;
  cursor: pointer;
}

/* --- Footer --- */
footer {
  background-color: #333;
  color: #eee;
  text-align: center;
  padding: 25px 0;
  margin-top: 60px;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
  .hero-title { font-size: 2.5rem; }
  nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }
}
/* --- Project Detail Page Styles --- */
.project-detail {
  max-width: 900px;
  margin: 0 auto;
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}

.project-detail-header {
  text-align: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 30px;
  margin-bottom: 40px;
}

.project-detail-title {
  font-size: 2.8rem;
  color: #30405c;
  margin: 0;
}

.project-detail-subtitle {
  font-size: 1.2rem;
  color:#30405c;
  margin: 15px 0 30px;
}

.project-detail-image {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 40px;
}

.project-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
  background-color: var(--bg-color);
  padding: 30px;
  border-radius: 10px;
  margin-bottom: 40px;
  text-align: center;
}

.overview-item h4 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: var(--primary-color);
}

.overview-item p {
  margin: 0;
  font-size: 1rem;
  color: #444;
}

.project-content-section h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-top: 40px;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 10px;
  display: inline-block;
}

.project-content-section p, 
.project-content-section li {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
}

.project-content-section ol,
.project-content-section ul {
  padding-right: 20px;
}

.project-content-section hr {
  border: 0;
  height: 1px;
  background-color: #ddd;
  margin: 50px 0;
}

.back-to-portfolio {
  text-align: center;
  margin-top: 60px;
}

/* --- Style for Secondary Button in Project Detail --- */
.cta-button.secondary {
  background-color: #6c757d; /* A neutral grey color */
}

.cta-button.secondary:hover {
  background-color: #5a6268;
}

/* --- Style for GitHub Icon in Button --- */
.cta-button .fa-github {
  margin-left: 8px; /* Adds some space between the icon and text */
}
/* --- Testimonials Section (Improved Version ) --- */
.testimonials {
  background-color: var(--bg-color); /* Changed to bg-color for contrast */
  padding: 60px 0;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.testimonial-card {
  background-color: var(--card-bg); /* White background for cards */
  padding: 30px;
  border-radius: 15px;
  border-top: 5px solid var(--accent-color); /* Accent color top border */
  box-shadow: 0 4px 15px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
}

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

.testimonial-rating {
  margin-bottom: 15px;
  color: #ffc107; /* Gold color for stars */
}

.testimonial-rating .fa-star {
  margin: 0 1px;
}

.testimonial-text {
  font-size: 1.1rem;
  color: #444;
  flex-grow: 1;
  margin: 0 0 25px;
  line-height: 1.8;
}

.testimonial-author {
  border-top: 1px solid #eee;
  padding-top: 15px;
}

.author-name {
  margin: 0 0 5px;
  color: var(--primary-color);
  font-weight: 700;
}

.author-project {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
}

.testimonials-link {
  text-align: center;
  margin-top: 50px;
}
/* --- Services Page Styles --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.service-card {
  background-color: var(--card-bg);
  padding: 40px 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.07);
  border-bottom: 5px solid transparent;
  transition: transform 0.3s, border-color 0.3s;
}

.service-card:hover {
  transform: translateY(-10px);
  border-bottom-color: var(--accent-color);
}

.service-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.service-title {
  font-size: 1.6rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.service-description {
  font-size: 1rem;
  color: #555;
  line-height: 1.8;
  margin-bottom: 25px;
}

.service-outcomes {
  list-style: none;
  padding: 0;
  text-align: right;
  font-size: 1rem;
  color: #333;
}

.service-outcomes li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.service-outcomes .fa-check-circle {
  color: var(--accent-color);
  margin-left: 10px;
}

/* --- How It Works Section --- */
.how-it-works {
    padding: 60px 0;
}

.steps-container {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 40px;
    text-align: center;
}

.step {
    flex: 1;
    padding: 20px;
}

.step-number {
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: white;
    font-size: 1.8rem;
    font-weight: 900;
    margin: 0 auto 20px;
}

.step-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 60px 20px;
  text-align: center;
  border-radius: 15px;
  margin-top: 40px;
}

.cta-section h2 {
  font-size: 2.2rem;
  margin: 0 0 15px;
}

.cta-section p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 30px;
}
/* --- Blog Page & Post Styles --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 35px;
  padding: 20px 0;
}

.blog-post-card {
  background-color: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.blog-post-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
}

/* صورة المقال في البطاقة */
.post-card-image-link {
  display: block;
  height: 200px; /* حجم جديد للصورة */
  overflow: hidden;
  background: none; /* بدون خلفية */
}

.post-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0; /* بدون زوايا */
  transition: transform 0.5s ease;
}

.blog-post-card:hover .post-card-image {
  transform: scale(1.05);
}

.post-card-content {
  flex: 1;
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* الوسوم */
.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.post-card-tags span {
  background-color: var(--primary-color);
  color: #fff;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.post-card-tags span:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

/* العناوين */
.post-card-title a {
  font-size: 1.6rem;
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.post-card-title a:hover {
  color: var(--accent-color);
}

.post-card-excerpt {
  color: #555;
  margin: 15px 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.post-card-meta {
  font-size: 0.85rem;
  color: #777;
  display: flex;
  gap: 20px;
  margin-top: auto;
}

.post-card-meta i {
  margin-left: 5px;
  opacity: 0.8;
}

/* --- Single Post Styles --- */
.blog-post {
  max-width: 850px;
  margin: 0 auto;
  padding: 0 20px;
}

.post-header {
  text-align: center;
  margin-bottom: 45px;
}

.post-title {
  font-size: 2.8rem;
  margin-bottom: 15px;
  font-weight: 800;
  line-height: 1.3;
}

.post-meta {
  display: flex;
  justify-content: center;
  gap: 25px;
  color: #30405c;
  font-size: 0.9rem;
  margin-bottom: 30px;
}

/* صورة المقال الفردي */
.post-featured-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: none; /* بدون خلفية */
  box-shadow: none; /* بدون ظل */
  margin-bottom: 40px;
}

.post-content {
  font-size: 1.1rem;
  line-height: 2;
  color: #333;
}

.post-content h2 {
  font-size: 2rem;
  margin-top: 50px;
  margin-bottom: 20px;
  color: var(--primary-color);
  font-weight: 700;
}

.post-content ul {
  padding-right: 25px;
  margin-bottom: 20px;
}

.post-content li {
  margin-bottom: 8px;
}

.post-content hr {
  border: 0;
  height: 1px;
  background-color: #ddd;
  margin: 50px 0;
}

/* --- Latest Posts Section on Home Page --- */
.latest-posts {
  padding: 70px 0;
  background-color: var(--bg-color);
  text-align: center;
}

.latest-posts h2 {
  font-size: 2.2rem;
  margin-bottom: 35px;
  font-weight: 800;
  color: var(--primary-color);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .post-title {
    font-size: 2.2rem;
  }
}

/* =================================== */
/* === New Hero Section Styles === */
/* =================================== */
.new-hero-section {
  height: 100vh; /* Full viewport height */
  background-image: url('https://images.unsplash.com/photo-1551288049-bebda4e38f71?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80'); /* Example image */
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* Parallax effect */
  position: relative;
  display: flex;
  flex-direction: column; /* Arrange items vertically */
  align-items: center;
  justify-content: center;
  color: white; /* Text color for hero content */
  text-align: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7); /* Dark overlay */
  z-index: 1;
}

.hero-content-wrapper {
  position: relative;
  z-index: 2; /* Ensure content is above overlay */
  flex-grow: 1; /* Allow content to take available space */
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 80px; /* Adjust padding to account for fixed header */
}

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

.new-hero-title {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.new-hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

.new-hero-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 50px;
}

.hero-expertise-cards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.expertise-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 20px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 700;
  transition: background 0.3s;
}
.expertise-card:hover {
  background: rgba(255, 255, 255, 0.2);
}
.expertise-card i {
  margin-left: 8px;
  color: var(--accent-color);
}

/* Adjustments for existing CTA buttons to fit new hero section */
.new-hero-buttons .cta-button {
  background-color: var(--accent-color);
  color: white;
  padding: 15px 30px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: transform 0.3s, box-shadow 0.3s;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.new-hero-buttons .cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.new-hero-buttons .cta-button.secondary {
  background-color: transparent;
  color: white;
  border: 2px solid var(--accent-color);
}

.new-hero-buttons .cta-button.secondary:hover {
  background-color: var(--accent-color);
  color: var(--text-color);
}

/* =================================== */
/* === Why Me Section (from previous request) === */
/* =================================== */
.why-me-section {
  padding: 80px 0;
}

.why-me-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.why-me-card {
  background-color: var(--card-bg);
  padding: 40px 30px;
  text-align: center;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border-top: 4px solid var(--accent-color);
  transition: transform 0.3s, box-shadow 0.3s;
}
.why-me-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.why-me-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.why-me-title {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.why-me-card p {
  font-size: 1rem;
  line-height: 1.8;
  color: #555;
}

/* =================================== */
/* === Responsive Design for New Hero === */
/* =================================== */
@media (max-width: 500px) {
  .new-hero-title {
    font-size: 2.5rem;
  }
  .new-hero-subtitle {
    font-size: 1.1rem;
  }
  .new-hero-buttons {
    flex-direction: column;
    gap: 10px;
  }
  .hero-expertise-cards {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width:250px) {
  .new-hero-title {
    font-size: 2rem;
  }
  .new-hero-subtitle {
    font-size: 1rem;
  }
  .new-hero-buttons .cta-button {
    width: 80%;
  }
  .expertise-card {
    width: 90%;
  }
}

/* ===== CSS Reset & Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Color Palette */
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary-color: #f59e0b;
  --secondary-dark: #d97706;
  --accent-color: #10b981;
  --accent-dark: #059669;
  
  /* Neutral Colors */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Status Colors */
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;
  
  /* Typography */
  --font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  
  /* Spacing */
  --spacing-1: 0.25rem;
  --spacing-2: 0.5rem;
  --spacing-3: 0.75rem;
  --spacing-4: 1rem;
  --spacing-5: 1.25rem;
  --spacing-6: 1.5rem;
  --spacing-8: 2rem;
  --spacing-10: 2.5rem;
  --spacing-12: 3rem;
  --spacing-16: 4rem;
  --spacing-20: 5rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--gray-800);
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
  min-height: 100vh;
  direction: rtl;
  text-align: right;
}

/* ===== Skip Link for Accessibility ===== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: var(--white);
  padding: var(--spacing-2) var(--spacing-4);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  z-index: 1000;
  transition: var(--transition-fast);
}

.skip-link:focus {
  top: 6px;
}

/* ===== Container ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-4);
}

@media (min-width: 770px) {
  .container {
    padding: 0 var(--spacing-6);
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 var(--spacing-8);
  }
}

/* ===== Header & Navigation ===== */
header {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

nav {
  padding: var(--spacing-4) 0;
}

.nav-list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-2);
  list-style: none;
  flex-wrap: wrap;
}

.nav-list a {
  display: inline-block;
  padding: var(--spacing-3) var(--spacing-5);
  text-decoration: none;
  color: var(--gray-600);
  font-weight: 500;
  border-radius: var(--radius-lg);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.nav-list a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  transform: scaleX(0);
  transform-origin: right;
  transition: var(--transition-normal);
  z-index: -1;
}

.nav-list a:hover::before,
.nav-list a.active::before {
  transform: scaleX(1);
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--white);
  transform: translateY(-2px);
}

.nav-list a.active {
  font-weight: 600;
}

/* ===== Main Content ===== */
main {
  padding: var(--spacing-12) 0;
  min-height: calc(100vh - 200px);
}

/* ===== Contact Section ===== */
.contact-section {
  max-width: 1000px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-16);
  animation: fadeInUp 0.8s ease-out;
}

.page-title {
  font-size: var(--font-size-5xl);
  font-weight: 900;
  color: var(--gray-900);
  margin-bottom: var(--spacing-6);
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: var(--radius-sm);
}

.page-subtitle {
  font-size: var(--font-size-xl);
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== Contact Content Layout ===== */
.contact-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-12);
  margin-top: var(--spacing-16);
}

@media (min-width: 1024px) {
  .contact-content {
    grid-template-columns: 1fr 1.2fr;
    gap: var(--spacing-16);
  }
}

/* ===== Contact Info ===== */
.contact-info-wrapper {
  animation: fadeInRight 0.8s ease-out 0.2s both;
}

.contact-info-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--spacing-8);
  position: relative;
  padding-bottom: var(--spacing-3);
}

.contact-info-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
  border-radius: var(--radius-sm);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-6);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-4);
  padding: var(--spacing-6);
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
  border: 1px solid var(--gray-100);
  position: relative;
  overflow: hidden;
}

.contact-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  transform: scaleY(0);
  transition: var(--transition-normal);
}

.contact-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
}

.contact-item:hover::before {
  transform: scaleY(1);
}

.contact-icon {
  font-size: var(--font-size-xl);
  color: var(--primary-color);
  margin-top: var(--spacing-1);
  transition: var(--transition-normal);
}

.contact-item:hover .contact-icon {
  color: var(--accent-color);
  transform: scale(1.1);
}

.contact-details {
  flex: 1;
}

.contact-label {
  display: block;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: var(--spacing-2);
  font-size: var(--font-size-sm);
}

.contact-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
  position: relative;
}

.contact-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: var(--transition-normal);
}

.contact-link:hover {
  color: var(--accent-color);
}

.contact-link:hover::after {
  width: 100%;
}

/* ===== Contact Form ===== */
.contact-form-wrapper {
  animation: fadeInLeft 0.8s ease-out 0.4s both;
}

.form-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--spacing-8);
  position: relative;
  padding-bottom: var(--spacing-3);
}

.form-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: var(--radius-sm);
}

.contact-form {
  background: var(--white);
  padding: var(--spacing-10);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-100);
}

.form-group {
  margin-bottom: var(--spacing-6);
  position: relative;
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: var(--spacing-3);
  font-size: var(--font-size-sm);
}

.required {
  color: var(--error-color);
  font-weight: 700;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: var(--spacing-4) var(--spacing-5);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  transition: var(--transition-normal);
  background: var(--gray-50);
  color: var(--gray-800);
  direction: rtl;
  text-align: right;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

.form-input.valid,
.form-textarea.valid {
  border-color: var(--success-color);
  background: rgba(16, 185, 129, 0.05);
}

.form-input.error,
.form-textarea.error {
  border-color: var(--error-color);
  background: rgba(239, 68, 68, 0.05);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.error-message {
  display: block;
  color: var(--error-color);
  font-size: var(--font-size-sm);
  margin-top: var(--spacing-2);
  font-weight: 500;
}

.character-count {
  display: block;
  text-align: left;
  font-size: var(--font-size-xs);
  color: var(--gray-500);
  margin-top: var(--spacing-2);
  transition: var(--transition-fast);
}

.character-count.over-limit {
  color: var(--error-color);
  font-weight: 600;
}

/* ===== Submit Button ===== */
.cta-button {
  width: 100%;
  padding: var(--spacing-5) var(--spacing-8);
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--white);
  border: none;
  border-radius: var(--radius-lg);
  font-size: var(--font-size-lg);
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: var(--transition-slow);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.cta-button:hover::before {
  left: 100%;
}

.cta-button:active {
  transform: translateY(0);
}

.cta-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.cta-button.loading {
  pointer-events: none;
}

.button-loading {
  display: none;
  align-items: center;
  gap: var(--spacing-2);
}

.button-loading .fa-spinner {
  animation: spin 1s linear infinite;
}

/* ===== Submit Status ===== */
.submit-status {
  margin-top: var(--spacing-4);
  padding: var(--spacing-3) var(--spacing-4);
  border-radius: var(--radius-md);
  font-weight: 500;
  text-align: center;
  transition: var(--transition-normal);
}

.submit-status.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.submit-status.error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error-color);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.submit-status.loading {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info-color);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ===== Footer ===== */
footer {
  background: var(--gray-900);
  color: var(--gray-300);
  text-align: center;
  padding: var(--spacing-8) 0;
  margin-top: var(--spacing-20);
}

footer p {
  font-size: var(--font-size-sm);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ===== Responsive Design ===== */
@media (max-width: 767px) {
  :root {
    --font-size-5xl: 2.5rem;
    --font-size-4xl: 2rem;
    --font-size-3xl: 1.5rem;
  }
  
  .container {
    padding: 0 var(--spacing-4);
  }
  
  main {
    padding: var(--spacing-8) 0;
  }
  
  .section-header {
    margin-bottom: var(--spacing-10);
  }
  
  .page-title {
    font-size: var(--font-size-4xl);
  }
  
  .page-subtitle {
    font-size: var(--font-size-lg);
  }
  
  .contact-content {
    gap: var(--spacing-8);
  }
  
  .contact-form {
    padding: var(--spacing-6);
  }
  
  .contact-item {
    padding: var(--spacing-4);
  }
  
  .nav-list {
    gap: var(--spacing-1);
  }
  
  .nav-list a {
    padding: var(--spacing-2) var(--spacing-3);
    font-size: var(--font-size-sm);
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: var(--font-size-3xl);
  }
  
  .contact-item {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-3);
  }
  
  .contact-icon {
    font-size: var(--font-size-2xl);
  }
  
  .nav-list {
    flex-direction: row;
    gap: var(--spacing-2);
  }
  
  .nav-list a {
    width: 100%;
    text-align: center;
  }
}

/* ===== Print Styles ===== */
@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  .skip-link,
  .button-loading,
  .cta-button {
    display: none !important;
  }
  
  .contact-form {
    border: 1px solid #ccc;
  }
  
  .contact-item {
    break-inside: avoid;
  }
}

/* ===== High Contrast Mode ===== */
@media (prefers-contrast: high) {
  :root {
    --gray-100: #e0e0e0;
    --gray-200: #c0c0c0;
    --gray-300: #a0a0a0;
    --gray-600: #404040;
    --gray-700: #202020;
    --gray-800: #000000;
  }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}



/* === Author Information Styles === */

/* Author link styling for both blog cards and individual posts */
.author-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.author-link:hover {
  color: var(--accent-color);
  text-decoration: none;
}

/* LinkedIn icon styling */
.author-link .fab.fa-linkedin {
  font-size: 0.9em;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.author-link:hover .fab.fa-linkedin {
  opacity: 1;
}

/* Author container in individual posts */
.post-author {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Enhanced post meta styling for better author display */
.post-meta {
  display: flex;
  justify-content: center;
  gap: 25px;
  color: #30405c;
  font-size: 0.9rem;
  margin-bottom: 30px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.post-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Blog card meta enhancements */
.post-card-meta {
  font-size: 0.85rem;
  color: #777;
  display: flex;
  gap: 20px;
  margin-top: auto;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.post-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.post-card-meta .author-link {
  font-size: 0.85rem;
  font-weight: 500;
}

/* Responsive design for author information */
@media (max-width: 768px) {
  .post-meta {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  
  .post-card-meta {
    flex-direction: column;
    gap: 10px;
  }
  
  .author-link {
    font-size: 0.8rem;
  }
}

/* Special styling for author highlight in individual posts */
.post-header .post-author {
  font-weight: 600;
}

.post-header .author-link {
  font-weight: 700;
  font-size: 1em;
}

/* --- General Setup --- */
:root {
  --primary-color: #171c24; /* Dark Blue */
  --secondary-color: #1976d2; /* Lighter Blue */
  --accent-color: #ffab40; /* Orange Accent */
  --text-color: #333;
  --bg-color: #f4f7f9;
  --card-bg: #ffffff;
  --header-text: #ffffff;
}

/* Default to RTL for Arabic */
body {
  margin: 0;
  font-family: 'Cairo', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  direction: rtl;
  line-height: 1.7;
}

/* LTR override for English */
[dir="ltr"] body {
  direction: ltr;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 {
  font-weight: 900;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s;
}
a:hover {
  color: var(--accent-color);
}

/* --- Header & Navigation --- */
header {
  background-color: var(--primary-color);
  color: var(--header-text);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

nav a {
  color: var(--header-text);
  font-weight: 700;
  padding: 5px 10px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s, color 0.3s;
}

nav a:hover, nav a.active {
  border-bottom-color: var(--accent-color);
  color: var(--accent-color);
}

.language-switcher {
  background-color: var(--accent-color);
  color: var(--primary-color);
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: 700;
  margin: 0 20px;
}
[dir="ltr"] .language-switcher {
  margin-left: 20px;
  margin-right: 0;
}
[dir="rtl"] .language-switcher {
  margin-right: 20px;
  margin-left: 0;
}
.language-switcher:hover {
  background-color: #fff;
  color: var(--primary-color);
  border-bottom-color: transparent;
}


/* --- Hero Section (Home Page) --- */
.new-hero-section {
  color: white;
  text-align: center;
  padding: 80px 0;
}
.new-hero-title {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 20px;
}
.new-hero-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 650px;
  margin: 0 auto 30px;
  line-height: 1.7;
}
.new-hero-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 50px;
}
.cta-button {
  background-color: var(--accent-color);
  color: var(--primary-color);
  padding: 15px 35px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: transform 0.3s, box-shadow 0.3s;
  display: inline-block;
}
.cta-button:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.cta-button.secondary {
  background-color: #6c757d;
  color: white;
}
.expertise-card i {
  margin-left: 8px;
}
[dir="ltr"] .expertise-card i {
  margin-left: 0;
  margin-right: 8px;
}


/* --- General Section Styles --- */
main {
  padding: 60px 0;
}
.section-title, .page-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 20px;
  position: relative;
}
.section-title::after, .page-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background-color: var(--accent-color);
  margin: 15px auto 0;
  border-radius: 2px;
}
.page-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: #666;
  max-width: 700px;
  margin: 0 auto 60px;
}

/* --- Cards (Portfolio, Blog, Services) --- */
.portfolio-grid, .blog-grid, .services-grid, .why-me-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.project-card, .blog-post-card, .service-card, .why-me-card {
  background-color: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.project-card:hover, .blog-post-card:hover, .service-card:hover, .why-me-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.project-image, .post-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.project-content, .post-card-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-title, .post-card-title a {
  font-size: 1.5rem;
  margin: 0 0 10px;
  color: var(--primary-color);
}
.post-card-title a {
    color: var(--secondary-color);
}

/* --- Blog & Project Specifics --- */
.post-card-meta {
  font-size: 0.85rem;
  color: #777;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: auto;
  align-items: center;
}
.post-card-meta i, .service-outcomes i {
  margin-left: 5px;
}
[dir="ltr"] .post-card-meta i, [dir="ltr"] .service-outcomes i {
  margin-left: 0;
  margin-right: 5px;
}

.author-link {
  color: var(--secondary-color);
  font-weight: 600;
}
.author-link i {
    font-size: 0.9em;
    opacity: 0.8;
}

/* --- Single Post/Project Page --- */
.project-detail, .blog-post {
  max-width: 900px;
  margin: 0 auto;
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}

.post-content h2, .project-content-section h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-top: 40px;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 10px;
  display: inline-block;
}

.post-content ul, .post-content ol,
.project-content-section ul, .project-content-section ol {
  padding-right: 20px; /* RTL Default */
}
[dir="ltr"] .post-content ul, [dir="ltr"] .post-content ol,
[dir="ltr"] .project-content-section ul, [dir="ltr"] .project-content-section ol {
  padding-right: 0;
  padding-left: 20px;
}


/* --- Contact Form --- */
.contact-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 1024px) {
  .contact-content {
    grid-template-columns: 1fr 1.2fr;
  }
}
.form-label {
    text-align: right;
}
[dir="ltr"] .form-label {
    text-align: left;
}
.character-count {
  text-align: left;
}
[dir="ltr"] .character-count {
  text-align: right;
}
.error-message {
    color: #ef4444;
}

/* --- Footer --- */
footer {
  background-color: #333;
  color: #eee;
  text-align: center;
  padding: 25px 0;
  margin-top: 60px;
}

/* Add other specific styles and responsive adjustments as needed *//* --- General Setup --- */
:root {
  --primary-color: #171c24; /* Dark Blue */
  --secondary-color: #1976d2; /* Lighter Blue */
  --accent-color: #ffab40; /* Orange Accent */
  --text-color: #333;
  --bg-color: #f4f7f9;
  --card-bg: #ffffff;
  --header-text: #ffffff;
}

/* Default to RTL for Arabic */
body {
  margin: 0;
  font-family: 'Cairo', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  direction: rtl;
  text-align: right; /* Default text alignment */
  line-height: 1.7;
}

/* LTR override for English */
[dir="ltr"] body {
  direction: ltr;
  text-align: left; /* LTR text alignment */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3, h4 {
  font-weight: 900;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s;
}
a:hover {
  color: var(--accent-color);
}

/* --- Header & Navigation --- */
header {
  background-color: var(--primary-color);
  color: var(--header-text);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

nav a {
  color: var(--header-text);
  font-weight: 700;
  padding: 5px 10px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s, color 0.3s;
}

nav a:hover, nav a.active {
  border-bottom-color: var(--accent-color);
  color: var(--accent-color);
}

.language-switcher {
  background-color: var(--accent-color);
  color: var(--primary-color);
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: 700;
}
[dir="rtl"] .language-switcher {
  margin-right: 20px;
}
[dir="ltr"] .language-switcher {
  margin-left: 20px;
}
.language-switcher:hover {
  background-color: #fff;
  color: var(--primary-color);
  border-bottom-color: transparent;
}


/* --- Hero Section (Home Page) --- */
.new-hero-section {
  color: white;
  text-align: center;
  padding: 80px 0;
}
.new-hero-title {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 20px;
}
.new-hero-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 650px;
  margin: 0 auto 30px;
  line-height: 1.7;
}
.new-hero-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 50px;
}
.cta-button {
  background-color: var(--accent-color);
  color: var(--primary-color);
  padding: 15px 35px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: transform 0.3s, box-shadow 0.3s;
  display: inline-block;
}
.cta-button:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.cta-button.secondary {
  background-color: #6c757d;
  color: white;
}
.hero-expertise-cards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}
.expertise-card i {
  margin-right: 8px;
}
[dir="ltr"] .expertise-card i {
  margin-right: 0;
  margin-left: 8px;
}


/* --- General Section Styles --- */
main {
  padding: 0px 0;
}
.section-title, .page-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 20px;
  position: relative;
}
.section-title::after, .page-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background-color: var(--accent-color);
  margin: 15px auto 0;
  border-radius: 2px;
}
.page-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: #666;
  max-width: 700px;
  margin: 0 auto 60px;
}

/* --- Cards (Portfolio, Blog, Services) --- */
.portfolio-grid, .blog-grid, .services-grid, .why-me-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.project-card, .blog-post-card, .service-card, .why-me-card {
  background-color: var(--card-bg);
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.project-card:hover, .blog-post-card:hover, .service-card:hover, .why-me-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.project-image, .post-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.project-content, .post-card-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-title, .post-card-title a {
  font-size: 1.5rem;
  margin: 0 0 10px;
  color: var(--primary-color);
}
.post-card-title a {
    color: var(--secondary-color);
}
.service-card, .why-me-card {
    text-align: center;
}

/* --- Blog & Project Specifics --- */
.post-card-meta {
  font-size: 0.85rem;
  color: #777;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: auto;
  align-items: center;
}
.post-card-meta i, .service-outcomes i {
  margin-left: 5px; /* RTL margin */
}
[dir="ltr"] .post-card-meta i, [dir="ltr"] .service-outcomes i {
  margin-left: 0;
  margin-right: 5px; /* LTR margin */
}

.author-link {
  color: var(--secondary-color);
  font-weight: 600;
}
.author-link i {
    font-size: 0.9em;
    opacity: 0.8;
}
.service-outcomes {
  list-style: none;
  padding: 0;
  /* الخطوة 1: اجعل القائمة تتصرف ككتلة مضمنة لتأخذ عرض محتواها فقط */
  display: inline-block; 
  margin: 0;
  /* الخطوة 2: قم بمحاذاة النص داخل كل عنصر في القائمة */
  text-align: right; 
}

[dir="ltr"] .service-outcomes {
  text-align: left; /* محاذاة لليسار في النسخة الإنجليزية */
}

.service-outcomes li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.service-outcomes i {
  color: var(--accent-color);
}

/* هوامش الأيقونة حسب اتجاه اللغة */
[dir="rtl"] .service-outcomes i {
    margin-left: 8px; /* في العربي، أضف مسافة على يسار الأيقونة */
}
[dir="ltr"] .service-outcomes i {
    margin-right: 8px; /* في الإنجليزي، أضف مسافة على يمين الأيقونة */
}

/* --- Single Post/Project Page --- */
.project-detail, .blog-post {
  max-width: 900px;
  margin: 0 auto;
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}

.post-content h2, .project-content-section h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-top: 40px;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 10px;
  display: inline-block;
}

.post-content ul, .post-content ol,
.project-content-section ul, .project-content-section ol {
  padding-right: 20px; /* RTL Default */
}
[dir="ltr"] .post-content ul, [dir="ltr"] .post-content ol,
[dir="ltr"] .project-content-section ul, [dir="ltr"] .project-content-section ol {
  padding-right: 0;
  padding-left: 20px; /* LTR Override */
}


/* --- Contact Form --- */
.contact-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 1024px) {
  .contact-content {
    grid-template-columns: 1fr 1.2fr;
  }
}
.form-label {
    text-align: right;
}
[dir="ltr"] .form-label {
    text-align: left;
}
.character-count {
  text-align: left;
}
[dir="rtl"] .character-count {
  text-align: right;
}
.error-message {
    color: #ef4444;
}

/* --- Footer --- */
footer {
  background-color: #333;
  color: #eee;
  text-align: center;
  padding: 25px 0;
  margin-top: 60px;
}

/* Add other specific styles and responsive adjustments as needed */
