/* الأساسيات */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

:root {
  --primary-color: #4a3260;
  --secondary-color: rgba(86, 59, 85, 0.681);
  --dark-color: #121212;
  --light-color: #f8f9fa;
  --gray-color: #2d2d2d;
}

/* Body */
body {
  background-color: var(--dark-color);
  color: var(--light-color);
  line-height: 1.6;
  transition: all 0.3s ease;
  overflow-x: hidden;
  min-height: 100vh;
}

body.light-mode {
  background-color: var(--light-color);
  color: var(--dark-color);
}

/* Container */
.container {
  max-width: 1800px; /* زيادة العرض الأقصى للسماح بمزيد من الكروت */
  margin: 0 auto;
  padding: 0 20px;
}

/* Cursor */
.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary-color);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s;
  opacity: 0;
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9998;
  transition: all 0.2s ease-out;
  opacity: 0;
}

body.custom-cursor .cursor-dot,
body.custom-cursor .cursor-outline {
  opacity: 1;
}

/* Header */
header {
  background-color: var(--dark-color);
  padding: 15px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.light-mode header {
  background-color: var(--light-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.logo {
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
}

.logo-img {
  width: 50px;
  height: 40px;
  border-radius: 50%;
  margin-left: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  filter: drop-shadow(0 0 8px #541e54) drop-shadow(0 0 15px #b266b2);
  transition: 0.3s ease-in-out;
}

.logo-img:hover {
  filter: drop-shadow(0 0 12px #541e54) drop-shadow(0 0 25px #d080d0);
}

/* Nav */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 25px;
}

.nav-links a {
  color: var(--light-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.light-mode .nav-links a {
  color: var(--dark-color);
}

.nav-links a:hover {
  color: var(--primary-color);
}

/* أزرار */
.language-switcher,
.theme-switcher,
.menu-toggle {
  background: var(--gray-color);
  color: var(--light-color);
  border: none;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  margin-left: 15px;
  transition: all 0.3s ease;
  font-size: 0.8rem;
}

.light-mode .language-switcher,
.light-mode .theme-switcher,
.light-mode .menu-toggle {
  background: #e9ecef;
  color: var(--dark-color);
}
.menu-toggle:hover,
.theme-switcher:hover,
.language-switcher:hover {
  background: var(--primary-color);
  color: white;
}
/* زر العودة */
.back-btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 25px;
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-bottom: 30px;
  box-shadow: 0 4px 12px rgba(138, 43, 226, 0.2);
}

.light-mode .back-btn {
  color: var(--primary-color);
}

.back-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(138, 43, 226, 0.4);
}

.back-btn i {
  margin-right: 8px;
  margin-left: 8px;
  transition: transform 0.3s ease;
}
/*------*/
.sidebar {
  position: fixed;
  top: 0;
  right: -350px;
  width: 300px;
  height: 100vh;
  background: linear-gradient(to bottom, var(--dark-color), #1a1a1a);
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
  transition: right 0.4s ease;
  z-index: 2000;
  padding: 80px 20px 20px;
  overflow-y: auto;
}

.light-mode .sidebar {
  background: linear-gradient(to bottom, var(--light-color), #e9ecef);
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.sidebar.active {
  right: 0;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.light-mode .sidebar-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--light-color);
}

.light-mode .sidebar-title {
  color: var(--dark-color);
}

.close-sidebar {
  background: transparent;
  border: none;
  color: var(--light-color);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.light-mode .close-sidebar {
  color: var(--dark-color);
}

.close-sidebar:hover {
  color: var(--primary-color);
}

.sidebar-nav {
  list-style: none;
  margin-bottom: 30px;
}

.sidebar-nav li {
  margin-bottom: 15px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: var(--light-color);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.light-mode .sidebar-nav a {
  color: var(--dark-color);
}

.sidebar-nav a:hover {
  background: rgba(74, 50, 96, 0.3);
  color: var(--primary-color);
  transform: translateX(-5px);
}

.light-mode .sidebar-nav a:hover {
  background: rgba(74, 50, 96, 0.1);
}

.sidebar-nav i {
  margin-left: 10px;
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.sidebar-social {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 40px;
}

.sidebar-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.sidebar-social a:hover {
  transform: translateY(-5px);
  background: var(--secondary-color);
}

.sidebar-contact {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.light-mode .sidebar-contact {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar-contact p {
  margin-bottom: 10px;
  color: var(--light-color);
  font-size: 0.9rem;
}

.light-mode .sidebar-contact p {
  color: var(--dark-color);
}

.sidebar-contact a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}
.back-btn:hover i {
  transform: translateX(5px);
}
/* ===== حل نهائي: ترتيب المسافة بين الأيقونة والنص في السايدبار ===== */

/* 1) تأكد أن روابط السايدبار تستخدم flex بحيث يمكن عمل مسافة بسهولة */
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 8px; /* المسافة بين الأيقونة والنص (عمل ممتاز على المتصفحات الحديثة) */
  white-space: nowrap; /* يمنع التفاف النص لداخل الأيقونة */
}

/* 2) اجعل الأيقونة صندوق ثابت العرض حتى النص ما يلزق فيها */
.sidebar-nav i {
  min-width: 28px;   /* عرض ثابت صغير يكفي للأيقونة */
  width: 28px;
  display: inline-flex;
  justify-content: center;
  text-align: center;
  margin: 0;         /* إلغاء أي مارجن سابق */
}

/* 3) إعدادات خاصة عندما تكون الصفحة باللغة الإنجليزية (LTR) */
body[dir="ltr"] .sidebar-nav a {
  flex-direction: row;  /* أيقونة على اليسار، نص على اليمين */
  text-align: left;
}
body[dir="ltr"] .sidebar-nav i {
  margin-right: 8px !important; /* تأمين المسافة إذا كانت هناك قواعد تِغيِرها */
  margin-left: 0 !important;
}

/* 4) إعدادات خاصة عندما تكون الصفحة بالعربية (RTL) */
body[dir="rtl"] .sidebar-nav a {
  flex-direction: row-reverse; /* أيقونة على اليمين، نص على اليسار */
  text-align: right;
}
body[dir="rtl"] .sidebar-nav i {
  margin-left: 8px !important;
  margin-right: 0 !important;
}

/* 5) احتياط: لو الأيقونات تُضاف عبر ::before بدل عنصر i */
.sidebar-nav a::before {
  display: inline-block;
  margin-right: 8px;
}
body[dir="rtl"] .sidebar-nav a::before {
  margin-left: 8px;
  margin-right: 0;
}
/* Hero */
.hero {
  padding: 130px 0 60px;
  background: linear-gradient(to bottom, var(--dark-color), #1a1a1a);
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.light-mode .hero {
  background: linear-gradient(to bottom, var(--light-color), #e9ecef);
}

.hero-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Gallery Section */
.gallery-section {
  margin-top: 40px;
}

.gallery-header {
  text-align: center;
  margin-bottom: 40px;
}

.gallery-header h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.gallery-header p {
  font-size: 1.1rem;
  color: #ced4da;
  max-width: 600px;
  margin: 0 auto;
}

.light-mode .gallery-header p {
  color: #495057;
}

/* شبكة المعرض المعدلة لعرض المزيد من الأعمال في الصف */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
  margin: 16px;
}

.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
  height: 250px;
}

.gallery-item.scale-down {
  transform: scale(0.95);
  opacity: 0.9;
  box-shadow: 0 4px 15px rgba(138, 43, 226, 0.6);
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(138, 43, 226, 0.4);
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* تأثير التكبير عند التمرير */
.gallery-item:hover img,
.gallery-item:hover video {
  transform: scale(1.1);
}

.gallery-item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 20px;
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.gallery-item-desc {
  font-size: 0.9rem;
  color: #ced4da;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: block;
  opacity: 1;
}

.modal-content {
  position: relative;
  margin: 5% auto;
  width: 80%;
  max-width: 700px; /* تصغير حجم المودال */
  animation: zoom 0.3s ease;
}

@keyframes zoom {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-media {
  width: 100%;
  max-height: 80vh;
  object-fit: contain; /* التأكد من أن الصور تظهر بالحجم المناسب */
  border-radius: 8px;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  color: white;
  font-size: 30px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: var(--primary-color);
}

.modal-caption {
  color: white;
  text-align: center;
  padding: 15px;
  font-size: 1.1rem;
}

/* قسم الكتالوج */
.catalog-section {
  text-align: center;
  padding: 50px 0;
  background: linear-gradient(to top, var(--dark-color), #1a1a1a);
  margin-top: 40px;
}

.light-mode .catalog-section {
  background: linear-gradient(to top, var(--light-color), #e9ecef);
}

.catalog-content {
  max-width: 600px;
  margin: 0 auto;
}

.catalog-content h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.catalog-content p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: #ced4da;
}

.light-mode .catalog-content p {
  color: #495057;
}

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  padding: 15px 30px;
  background: #25d366;
  color: white;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:hover {
  background: #128c7e;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.whatsapp-btn i {
  margin-left: 10px;
  font-size: 1.2rem;
}

/* Footer */
footer {
  padding: 25px 0;
  background-color: #0a0a0a;
  color: white;
  text-align: center;
}

.light-mode footer {
  background-color: #dee2e6;
  color: var(--dark-color);
}

/* Responsive */
@media (min-width: 2000px) {
  .gallery-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 1600px) {
  .gallery-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 1400px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-links {
    display: none;
  }

  .gallery-header h1 {
    font-size: 2rem;
  }

  .modal-content {
    width: 95%;
    margin: 10% auto;
  }
}

@media (max-width: 576px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

.cursor-dot {
  position: fixed;
  width: 10px;
  height: 10px;
  background: #000;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.15s ease-out;
  display: none;
}

.cursor-outline {
  position: fixed;
  width: 40px;
  height: 40px;
  background: rgba(128, 0, 128, 0.3);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transition: transform 0.25s ease-out;
    display: none;

}
/* 🔹 جعل الشعار والأزرار في صف واحد حتى في الجوال */
header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
}

/* الشعار (الصورة + النص) */
header .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* الحاوية اللي فيها الأزرار الثلاثة */
header nav > div:last-child {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 🔹 في الجوال */
@media (max-width: 768px) {
  header nav {
    flex-direction: row; /* خليهم صف واحد دائمًا */
  }

  header .logo img {
    width: 40px; /* تصغير بسيط للشعار عشان يركب بالسطر */
    height: auto;
  }

  header .logo-text {
    font-size: 1rem;
  }

  .language-switcher,
  .theme-switcher,
  .menu-toggle {
    flex-shrink: 0; /* ما يتقلص حجمها */
  }
}