/* app.css */

/* ------------------------------------------------------------
   RESET & GLOBAL
------------------------------------------------------------ */
:root {
  --primary: #141414;
  --secondary: #445dfe;
  --accent: #6a1b9a;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #fff;
  line-height: 1.6;
  width: 100%;
  overflow-x: hidden;

  /* خلفية موحدة لكامل الصفحة مع تثبيت (parallax) */
  background: url("bg.png") no-repeat center center fixed;
  background-size: cover;
}

/* ------------------------------------------------------------#hero-graphic
   UTILITIES
------------------------------------------------------------ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-title {
  font-size: 2.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  padding: 3rem 0 1.5rem;
  position: relative;
}
.section-title::after {
  content: "";
  width: 60px;
  height: 4px;
  background: var(--secondary);
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  color: #fff;
  text-decoration: none;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.7);
  backface-visibility: hidden;
  will-change: transform, background-position;
  transform-origin: center center;
  transition: transform 0.3s ease;

  /* 🌊 التدرّج العريض لألوان الموج */
  background: linear-gradient(
    60deg,
    #445dfe81 0%,
    #691b9a81 25%,
    #4fe2d581 50%,
    #6a1b9a81 75%,
    #445dfe81 100%
  );
  background-size: 200% 200%;
}

.btn:hover {
  transform: scale3d(1.05, 1.05, 1);
  /* يمكنك إضافة توهج أو تغيير ظلّ لمزيد من الديناميكية */
  box-shadow: 0 0 15px rgba(121, 63, 171, 0.75);
  animation: wave 6s ease infinite;
}

/* تحريك التدرّج ليبدو كأنه يتدفّق أفقياً */
@keyframes wave {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ------------------------------------------------------------
   HEADER & NAV
------------------------------------------------------------ */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(20, 20, 20, 0.348);
  backdrop-filter: blur(10px);
  border-bottom-left-radius: 20px;
  /* تقويس الزاوية اليمنى السفلى */
  border-bottom-right-radius: 20px;
  z-index: 1000;
}

.logo img {
  height: 40px;
}

nav {
  position: relative;
}
nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}
nav ul li a {
  color: #fff;
  text-decoration: none;
  position: relative;
}
nav ul li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: width 0.3s ease;
}
nav ul li a:hover::after,
nav ul li a.active::after {
  width: 100%;
}

/* mobile nav
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.hamburger span {
  width: 25px;
  height: 3px;
  background: #fff;
  transition: all 0.3s ease;
}
.hamburger.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
} */
nav ul.active {
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  background: rgba(20, 20, 20, 0.95);
  flex-direction: column;
  padding: 1rem 0;
}
nav ul.active li {
  text-align: center;
  margin: 0.5rem 0;
}

/* ------------------------------------------------------------
   HERO / LANDING
------------------------------------------------------------ */
#landing {
  position: relative;
  height: 80vh;
}

#landing .overlay {
  position: absolute;
  inset: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.hero-content h1 {
  font-size: 4rem;
  letter-spacing: 2px;
  background: linear-gradient(45deg, var(--secondary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}
.hero-content p {
  font-size: 1.5rem;
  max-width: 700px;
  margin-bottom: 2rem;
}
.hero-cta {
  /* border: 2px solid var(--secondary); */
  /* background: rgba(16, 16, 16, 0.76); */
  color: #ffffff;
  /* 
  filter: drop-shadow(0 0 15px rgba(121, 63, 171, 0.695));
  transition: 0.5s; */
  backface-visibility: hidden;
  will-change: transform, background-position;
  transform-origin: center center;
  transition: transform 0.3s ease;

  /* 🌊 التدرّج العريض لألوان الموج */
  background: linear-gradient(
    60deg,
    rgba(20, 20, 20, 0.7) 0%,
    rgba(68, 93, 254, 0.7) 25%,
    rgba(106, 27, 154, 0.7) 50%,
    #6a1b9a81 75%,
    #00000081 100%
  );
  background-size: 200% 200%;
}
.hero-cta:hover {
  /* background: rgba(16, 16, 16, 0.426); */
  box-shadow: 0 0 15px rgba(68, 93, 254, 0.411);
  transform: scale(1.05);
  transform: scale3d(1.05, 1.05, 1);
  /* يمكنك إضافة توهج أو تغيير ظلّ لمزيد من الديناميكية */
  box-shadow: 0 0 15px rgba(121, 63, 171, 0.75);
  animation: wave 6s ease infinite;
}

/* ------------------------------------------------------------
   HERO GRAPHIC
------------------------------------------------------------ */
#hero-graphic {
  display: flex;
  padding: 4rem 1rem;
  width: 100%;
  align-items: flex-end;
  justify-content: center;
  flex-direction: column-reverse;
}
.graphic-wrapper {
  position: relative;
  width: 400px;
  height: 350px;
  top: 70px;
}
.graphic-wrapper .shape {
}
.graphic-wrapper .device {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
  z-index: 1;
}

/* ------------------------------------------------------------
   PROJECTS
------------------------------------------------------------ */
#projects {
  padding: 2rem 0 4rem;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  align-items: center;
  justify-items: center;
  margin-top: 30px;
}
.project-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  overflow: hidden;
  filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.5));
  max-width: 80%;
}
.project-item img {
  width: 100%;
}
.project-info {
  padding: 1.5rem;
}
.project-info h3 {
  margin-bottom: 0.8rem;
  font-size: 1.4rem;
}
.project-cta {
  border: 2px solid var(--secondary);
}
.project-cta:hover {
  background: var(--secondary);
  box-shadow: 0 0 10px rgba(68, 93, 254, 0.4);
}

/* ------------------------------------------------------------
   CONTACT
------------------------------------------------------------ */
#contact .contact-container {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 2rem 0 4rem;
}
.contact-image img {
  max-width: 400px;
  width: 100%;
  border-radius: 8px;
  /* أزل box-shadow: ...; */

  /* ضيف بداله: */
  filter: drop-shadow(0 0 15px rgba(5, 10, 159, 0.777));
}
.contact-info {
  flex: 1;
  font-size: 1.1rem;
  opacity: 0.9;
  text-align: right;
}

/* ------------------------------------------------------------
   WORK WITH US
------------------------------------------------------------ */
#work .work-container {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 2rem 0 4rem;
}
.work-image img {
  max-width: 400px;
  width: 100%;
  border-radius: 8px;
  filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.5));
}
.work-form {
  flex: 1;
  font-size: 1.1rem;
  opacity: 0.9;
}
.role-selection {
  display: flex;
  gap: 1.5rem;
  margin: 1rem 0;
}
.role {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.upload-area {
  border: 2px dashed var(--secondary);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  transition: background 0.3s;
}
.upload-area.dragover {
  background: rgba(68, 93, 254, 0.1);
}
.upload-btn {
  margin-top: 1rem;
}

/* ------------------------------------------------------------
   RESPONSIVE
------------------------------------------------------------ */

@media (max-width: 868px) {
  .hero-graphic {
    display: flex;
    padding: 4rem 1rem;
    width: 50%;
    align-items: flex-end;
    justify-content: center;
    flex-direction: column-reverse;
  }
  .graphic-wrapper {
    right: 0;
  }
  #hero-graphic {
    justify-content: center;
  }
}
@media (max-width: 768px) {
  /* .hamburger {
    display: flex;
  } */
  nav ul {
    display: none;
  }
  header {
    padding: 1rem;
  }
  .graphic-wrapper {
    transform: scale(0.7);
    /* align-items: center; */
  }
  #contact .contact-container {
    padding: 0;
    justify-content: center;
    flex-direction: column-reverse;
    align-content: center;
  }
  .contact-info {
    text-align: center;
    margin-top: 10px;
  }
}

@media (max-width: 480px) {
  .section-title {
    font-size: 1.8rem;
  }
  .hero-content h1 {
    font-size: 2rem;
  }
  .hero-content p,
  .about-text,
  .contact-info,
  .work-form p {
    font-size: 1rem;
  }
  .hero-content h1 span {
    font-size: 45px;
  }
  .project-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.5));
    max-width: 80%;
    max-height: 400px;
  }

  .project-info p {
    height: 80px;
    overflow-y: hidden;
  }
  .header-cta {
    padding: 0.4rem 0.5rem;
  }
  .logo {
    width: 50%;
  }
  .logo img {
    width: 80%;
    height: 80%;
  }
}
@media (max-width: 380px) {
  .header-cta {
    padding: 0.3rem 0.2rem;
  }
  .contact-info {
    padding: 0 12px;
  }
  #contact .contact-container {
    padding: 10px 0 0 0;
  }
  .projects-grid {
    justify-content: center;
  }
  .graphic-wrapper .device {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
    z-index: 1;
    /* top: -40px; */
  }

  #hero-graphic {
    align-items: center;
  }
  .graphic-wrapper {
    transform: scale(0.6);
  }
}

/* ============================================================
   ABOUT SECTION (محدَّث بالكامل)
   ============================================================ */
#about {
  padding: 0; /* إزالة أي با딩 موروث من الــlanding أو ما قبله */
}

#about .section-title {
  font-size: 2.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  padding: 3rem 0 1.5rem;
  position: relative;
}
#about .section-title::after {
  content: "";
  width: 60px;
  height: 4px;
  background: var(--secondary);
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

/* حاوية النص والصورة جنب بعض */
#about .about-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 3rem 1.5rem;
  flex-wrap: wrap; /* للانتقال إلى عمود عند تصغير الشاشة */
}

/* النص */
.about-text {
  flex: 1 1 400px; /* ينكمش حتى 400px كحد أدنى ويمكنه التمدد */
  font-size: 1.1rem;
  line-height: 1.6;
  opacity: 0.9;
}

/* ------------------------------------------------------------
   ABOUT — ضبط ديناميكي لحجم الصورة
------------------------------------------------------------ */
.about-image {
  flex: 1 1 auto; /* يسمح بالتمدد والانكماش حسب المساحة المتاحة */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20%;
  /* لا تحدد width/height ثابتة هنا */
}

.about-image img {
  display: block; /* يزيل المسافات البيضاء أسفل الصورة */
  max-width: 100%; /* لا يتجاوز عرض الحاوية */
  height: auto; /* يحافظ على النسبة الأصلية */
  object-fit: contain; /* يناسب المحتوى داخل الإطار (إذا تم تحديد إطار للحاوية) */
}

/* ============================================================
     استجابة للشاشات الصغيرة
     ============================================================ */
@media (max-width: 920px) {
  #about .about-container {
    flex-direction: column;
    padding: 2rem 1rem;
  }
  .about-text {
    flex: 1 1 40px;
  }
  .about-image {
    width: 100%;
    max-width: 400px; /* يقلل حجم الصورة تلقائياً */
    height: auto;
    margin: 0 auto 2rem;
    flex: 1 1 auto;
  }
  .about-text {
    text-align: center;
  }
}

.cards-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  overflow-x: auto;       /* تمرير أفقي فقط */
  scroll-behavior: auto;   /* لا smooth */
  cursor: grab;
  margin-top: 40px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  /* لا نستخدم scroll-snap هنا */
}
.cards-grid::-webkit-scrollbar {
  display: none;
}
.cards-grid.dragging {
  cursor: grabbing;
}

/* -------------------------------------------------------------------
   Card Styles (ثابتة العرض 348px)
------------------------------------------------------------------- */
.card {
  flex: none;
  width: 348px;
  background: linear-gradient(
    180deg,
    rgba(106, 27, 154, 0.2) 0%,
    rgba(68, 93, 254, 0.2)   100%
  );
  height: 430px;
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  margin: 15px 0;
  flex-direction: column;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
  transition: transform .3s, box-shadow .3s, background .3s;
}
.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0,0,0,0.6);
  background: linear-gradient(
    180deg,
    rgba(106, 27, 154, 0.3) 0%,
    rgba(68, 93, 254, 0.3)   100%
  );
}

/* المحتوى والأزرار كما سابقاً… */
.card-content {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.card-content ul {
  list-style: disc inside;
  margin: 0;
  padding-left: 1em;
  line-height: 1.6;
}
.read-more { color: #ffffff;
  backface-visibility: hidden;
  will-change: transform, background-position;
  transform-origin: center center;
  transition: transform 0.3s ease;
  border: none  ;
   padding: 5px ;
  background: linear-gradient(60deg, rgba(20, 20, 20, 0.7) 0%, rgba(68, 93, 254, 0.7) 25%, rgba(106, 27, 154, 0.7) 50%, #6a1b9a81 75%, #00000081 100%);
  background-size: 200% 200%; }

/* ===================================================================
   Responsive
=================================================================== */
@media (max-width: 600px) {
  /* #offers { margin-left: calc(-50vw + 1rem); margin-right: calc(-50vw + 1rem); } */
  .card { width: 80vw; max-width: 348px; }
  .webhid{display: none;}
}

/* === تنسيق أيقونات التواصل الاجتماعي === */
.social-icons {
  display: flex;
  gap: 1rem;               /* مسافة بين الأيقونات */
  justify-content: center; /* أو flex-start حسب التصميم */
  margin-top: 1rem;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;             /* حجم المربع الحاوي */
  height: 48px;
  color: #fff;             /* لون الأيقونة الأساسي */
  background: rgba(0,0,0,0.3); /* خلفية نصف شفافة */
  border-radius: 50%;      /* يجعل الحاوية دائرية */
  text-decoration: none;
  transition: 
    background 0.3s ease,
    transform 0.3s ease,
    color 0.3s ease;
}

.social-icons a:hover {
  background: var(--secondary); /* متغير اللون الثانوي معرف سابقًا */
  color: #fff;
  transform: scale(1.1);
}

/* ألوان خاصة بالأيقونات المميزة */
.social-icons a .fa-whatsapp {
  /* لون خلفية أخضر خاص بالواتساب عند الحالة العادية */
  color: #fff;
}
.social-icons a:hover .fa-whatsapp {
  color: #25D366;
}

.social-icons a .fa-instagram {
  /* خلفية متدرجة لألوان إنستاجرام */
  background: linear-gradient(
    45deg, 
    #feda75 0%, 
    #d62976 50%, 
    #962fbf 75%, 
    #4f5bd5 100%
  );
  padding: 0.5rem; /* لتعويض الحشو الدائري */
  border-radius: 50%;
  width: auto;
  height: auto;
}
.social-icons a:hover .fa-instagram {
  filter: brightness(1.2);
}
