
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap");

/* ===== CSS Variables (Root) ===== */
:root {
  --primary-text-color: #3d4f72;
  --secondary-text-color: #7a8aa4;
  --accent-color: #88b4c4;
  --background-color: #ffffff;
  --section-bg-color: #f7f9fc;
  --projects-wrapper-bg: #fdfeff;
  --projects-wrapper-border: #e8effe;
  --mockup-bg-color: #f0f2f5; /* لون خلفية الموكب */
}

/* ===== Global Reset & Basic Styles ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Poppins", sans-serif;
  color: var(--primary-text-color);
  background-color: var(--background-color);
  line-height: 1.7;
  overflow-x: hidden;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  
}
h1,
h2,
h3 {
  font-weight: 700;
  color: var(--primary-text-color);
}
h1 {
  font-size: 3.5rem;
}
h2 {
  font-size: 2.5rem;
}
h3 {
  font-size: 1.5rem;
}
p {
  color: var(--secondary-text-color);
  font-size: 0.95rem;
}
a {
  text-decoration: none;
  color: var(--accent-color);
}

/* (General styles remain the same) */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid #f0f0f0;
}
.main-header .container {
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.main-nav ul {
  list-style: none;
  display: flex;
  justify-content: flex-end;
  gap: 2.5rem;
}
.main-nav a {
  color: var(--primary-text-color);
  font-weight: 500;
  position: relative;
}
.main-nav a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}
.main-nav a:hover::after {
  width: 100%;
}
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 2rem;
}
.hero-buttons{
padding-top:10px;
}
.hero-content {
  flex: 1;
  max-width: 550px;
}
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 500;
  margin-right: 1rem;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}
.btn-primary {
  background-color: var(--accent-color);
  color: white;
}
.btn-secondary {
  background-color: transparent;
  border-color: #ddd;
  color: var(--secondary-text-color);
}
.btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
.hero-image-blob {
  flex: 1;
  flex-shrink: 0;
  width: 450px;
  height: 450px;
  max-width: 450px;
  background-image: url("images/r1_img.jpg");
  background-size: cover;
  background-position: center;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation: blob-morph 8s ease-in-out infinite;
}
@keyframes blob-morph {
  0% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
}
.about-section {
  padding: 100px 0;
}
.about-container {
  display: flex;
  align-items: center;
  gap: 5rem;
}
.about-content {
  flex: 1;
}.about-image-container {
    width: 380px;
    height: 380px;
    flex-shrink: 0;
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.about-image-container.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* 2. الصورة نفسها (الحالة الابتدائية والنهائية) */
.about-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    
    /* الظل الأساسي الناعم في الوضع الطبيعي */
    box-shadow: 0 20px 50px -15px rgba(100, 100, 100, 0.15);
    
    /* حركة ناعمة لكل التغييرات (الظل والحجم) */
    transition: all 0.4s ease-out;
}

/* 3. تأثيرات الـ hover (هنا يحدث السحر) */
.about-image-container:hover img {
    /* تكبير بسيط للصورة لجعلها بارزة */
    transform: scale(1.05);

    /* ظل متعدد الطبقات لعمل الإطار والوهج */
    box-shadow:
        /* الطبقة الأولى: إطار أبيض داخلي حاد وواضح */
        0 0 0 4px rgba(255, 255, 255, 0.8),

        /* الطبقة الثانية: الوهج الدائري المضيء (بلون accent) */
        0 0 60px 20px var(--accent-color),
        
        /* الطبقة الثالثة: ظل سفلي خفيف لعمق التصميم */
        0 10px 30px rgba(0, 0, 0, 0.1);
}

/* تعديل بسيط للوضع الليلي لزيادة جمالية الوهج */
body.dark-mode .about-image-container:hover img {
     box-shadow:
        0 0 0 4px rgba(255, 255, 255, 0.1),
        0 0 80px 30px var(--accent-color);
}
/* ===== <<< نهاية الجزء المعدل >>> ===== */
.skills-list {
  margin-top: 2.5rem;
}
.skill {
  margin-bottom: 2rem;
}
.skill-name {
  font-weight: 500;
}
.skill-bar {
  width: 100%;
  height: 8px;
  background-color: #eef2f5;
  border-radius: 4px;
}
.skill-level {
  height: 100%;
  width: 0;
  background-color: var(--accent-color);
  border-radius: 4px;
  transition: width 1.5s cubic-bezier(0.25, 1, 0.5, 1);
  position: relative;
}
.skill-level::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  transform: translate(50%, -50%);
  width: 20px;
  height: 20px;
  background-color: white;
  border-radius: 50%;
  box-shadow: 0 0 1px 1px var(--accent-color), 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* ===== <<< تم إضافة قسم الخدمات الجديد هنا >>> ===== */
.services-section {
    padding: 100px 0;
    background-color: var(--background-color); /* خلفية بيضاء */
}

/* نص فرعي تحت العنوان الرئيسي للقسم */
.section-subtitle {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3.5rem auto; /* مسافة سفلية أكبر */
    color: var(--secondary-text-color);
    font-size: 1rem;
    line-height: 1.8;
}

.services-grid {
    display: grid;
    /* responsive grid: 3 أعمدة على الشاشات الكبيرة، وعمود واحد على الصغيرة */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: #FBFCFF; /* لون أفتح وأنعم */
    border: 1px solid #EFF3FB;
    padding: 2.5rem 2rem;
    border-radius: 25px; /* حواف دائرية */
    text-align: center;
    transition: all 0.3s ease-in-out;
}

/* تأثير الـ hover الأنيق */
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px -15px rgba(210, 220, 240, 0.8);
    border-color: #E2EAFB;
}

.service-icon {
    margin-bottom: 1.5rem;
    height: 64px; /* تحديد ارتفاع الأيقونة */
}

.service-title {
    font-size: 1.3rem; /* تكبير الخط قليلاً */
    margin-bottom: 0.75rem;
    font-weight: 500; /* خط أنعم */
}

.service-card p {
    font-size: 0.9rem;
    line-height: 1.7;
}
/* ===== <<< نهاية قسم الخدمات >>> ===== */

/* ===== <<< تم تعديل قسم المشاريع بالكامل هنا ليطابق الـ UI >>> ===== */
.projects-section {
  padding: 100px 0;
  background-color: var(--section-bg-color);
}
.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
}
.project-filters {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}
.filter-btn {
  background-color: transparent;
  color: var(--secondary-text-color);
  border: 1px solid #e3e9f6;
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}
.filter-btn.active,
.filter-btn:hover {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}
.projects-wrapper {
  background-color: var(--projects-wrapper-bg);
  border: 1px solid var(--projects-wrapper-border);
  border-radius: 40px;
  padding: 3rem;
}
.projects-grid {
  display: grid;
  gap: 3rem;
}

.project-item {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  /* 1. هذا هو السر للأحجام المتساوية: نجعل العناصر تتمدد */
  align-items: stretch;
}

.project-item:nth-child(even) .project-info {
  order: 2;
}
.project-item:nth-child(even) .project-image {
  order: 1;
}

.project-info {
  background-color: white;
  padding: 2.5rem;
  border-radius: 25px;
  box-shadow: 0 10px 40px -15px rgba(200, 210, 230, 0.6);
  /* توسيط المحتوى داخل الحاوية بعد تمددها */
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.project-info h3 {
  margin-bottom: 0.75rem;
}
.project-info p {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}
.btn-view-project {
  color: var(--primary-text-color);
  border: 1px solid #e0e8f6;
  padding: 9px 22px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  align-self: flex-start; /* يمنع الزر من التمدد */
}
.btn-view-project:hover {
  border-color: var(--accent-color);
  background-color: #f7f9fc;
}

/* 2. تصميم حاوية الموكب */
.project-image {
  position: relative;
  background-color: var(--mockup-bg-color);
  padding: 2rem;
  border-radius: 25px;
  display: flex; /* لتوسيط الصورة بالداخل */
  align-items: center;
  justify-content: center;
}
.project-image img {
  width: 400px;
  border-radius: 15px;
  box-shadow: 0 15px 40px -15px rgba(0, 0, 0, 0.2);
}


.fab {
  position: absolute;
  bottom: 0px;
  right: 0px;
  transform: translate(30%, 30%);
  width: 50px;
  height: 50px;
  /* background-color: var(--accent-color); */
  border-radius: 50%; 
   display: flex;
  /* align-items: center; */
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(136, 180, 196, 0.4);
}
.fab:hover {
  transform: translate(30%, 30%) scale(1.1);
}



.contact-section {
  text-align: center;
  padding: 100px 0;
}
.main-footer {
  text-align: center;
  padding: 2rem;
  background-color: var(--section-bg-color);
  color: #6c757d;
}
.fade-in-element {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in-element.visible {
  opacity: 1;
  transform: translateY(0);
}




/* ===== <<< تم إضافة قسم التواصل الجديد هنا >>> ===== */
.contact-section {
    padding: 100px 0;
    background-color: var(--section-bg-color);
}

.contact-box {
    background-color: var(--projects-wrapper-bg);
    border: 1px solid var(--projects-wrapper-border);
    border-radius: 40px;
    padding: 4rem;
    text-align: center;
    box-shadow: 0 20px 60px -20px rgba(200, 210, 230, 0.5);
    margin-bottom: 250px;
}

.contact-box h2 {
    font-size: 2.2rem;
    line-height: 1.4;
    margin-bottom: 2.5rem;
}

.contact-box h2 .highlight {
    color: #C1A788; /* اللون البيج المائل للذهبي */
    font-style: italic;
}

.contact-form {
    max-width: 550px;
    margin: 0 auto;
    background-color: white;
    border-radius: 30px; /* حواف دائرية جدًا */
    padding: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 20px -5px rgba(200, 210, 230, 0.7);
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-left: 1rem;
    flex-grow: 1; /* يأخذ المساحة المتبقية */
}

.input-wrapper img {
    width: 50px;
    opacity: 0.7;
}

.contact-form input {
    border: none;
    outline: none;
    background: none;
    width: 100%;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: var(--primary-text-color);
}
.contact-form input::placeholder {
    color: #AEB9D0;
}

.btn-send {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(136, 180, 196, 0.4);
}
/* ===== <<< نهاية قسم التواصل >>> ===== */



/* --- الفوتر الجديد --- */
.main-footer {
    background-color: #252525; /* لون الخلفية الداكن */
    color: #A9A9A9; /* لون النصوص الفاتح */
    padding: 100px 0 0 0;
    position: relative;
    margin-top: -80px; /* يسحب الفوتر للأعلى ليتداخل مع قسم التواصل */
}

.footer-cta {
    /* background-color: #333333; */
    padding: 3rem;
    text-align: center;
    border-radius: 20px;
    margin-bottom: 4rem;
    /* position: relative; */
    top: -160px; /* يرفع هذا الجزء ليكون في الفاصل بين القسمين */
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.footer-cta h2 {
    font-size: 2.5rem;
    color: white;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr; /* تقسيم الأعمدة */
    gap: 2.5rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #444;
}

.footer-column .footer-heading {
    color: white;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}
.footer-column a, .footer-column li {
    color: #A9A9A9;
    transition: color 0.3s ease;
}
.footer-column a:hover {
    color: white;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 1.2rem;
}
.footer-logo span {
    color: white;
}

.footer-column.about img {
    width: 30px;
    height: 30px;
}

.social-icons {
    display: flex;
    gap: 1rem;
}
.social-icons a {
    display: block;
    width: 24px;
    height: 24px;
}

.footer-column.links ul,
.footer-column.contact ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.newsletter-form {
    display: flex;
    background-color: white;
    border-radius: 12px;
    padding: 5px;
}
.newsletter-form input {
    flex-grow: 1;
    border: none;
    outline: none;
    background: none;
    padding: 0 1rem;
    font-family: 'Poppins', sans-serif;
    color: #252525;
}
.newsletter-form button {
    background-color: var(--accent-color);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    gap: 1rem;
}
.footer-legal span {
    color: #444;
}

.theme-toggle-btn{
background-color: unset;
border: none;
}
 .dark-mode {
  
  --primary-text-color: #7a8aa4;
  --secondary-text-color: #7a8aa4;
  --accent-color: #88b4c4;
  --background-color: #333333;
  --section-bg-color: #333333;
  --projects-wrapper-bg: #333333;
  --projects-wrapper-border: #6c758a;
  --mockup-bg-color: #ffffff; /* لون خلفية الموكب */
}
  
  


@media (max-width: 992px) {
  .project-item,
  .project-item:nth-child(even) {
    grid-template-columns: 1fr;
  }
  .project-item:nth-child(even) .project-info {
    order: 0;
  }
  .projects-wrapper {
    padding: 1.5rem;
  }
  .container {
    padding: 0 1.5rem;
  }
  h1 {
    font-size: 2.8rem;
  }
  h2 {
    font-size: 2rem;
  }
  .hero-container,
  .about-container {
    flex-direction: column;
    text-align: center;
  }
  .hero-section {
    padding-top: 120px;
    min-height: auto;
  }
  .hero-image-blob {
    margin-top: 3rem;
    width: 380px;
    height: 380px;
  }
  .about-container {
    flex-direction: column-reverse;
  }
  .about-section {
    padding-top: 50px;
  }
  .main-nav ul {
    justify-content: center;
  }
  .services-grid { grid-template-columns: 1fr;}
}
@media (max-width: 768px) {
  h1 {
    font-size: 2.2rem;
  }
  .hero-section {
    padding-top: 100px;
  }
  .hero-image-blob {
    width: 300px;
    height: 300px;
  }
  .about-image-container {
    width: 280px;
    height: 280px;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .btn {
    padding: 10px 20px;
    width: 100%;
    margin-right: 0;
    margin-bottom: 1rem;
  }
  .hero-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

/* --- (Media Queries to be added for footer responsiveness) --- */
@media (max-width: 992px) {
    .footer-main {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 768px) {
    .footer-main {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-logo, .social-icons, .footer-bottom {
        justify-content: center;
        flex-direction: column;
        gap: 1.5rem;
    }
    .footer-legal {
        margin-top: 1rem;
    }}




    