@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@200..1000&display=swap");

:root {
  --background: #f9f9f6;
  --text-color: #3e3e3e;
  --header-bg: transparent;
  --header-scrolled-bg: rgba(255, 253, 246, 0.8);
  --card-bg: #ffffff;
  --primary-color: #7b8c6d;
  --primary-hover: #657458;
  --section-bg-alt: #f7f8f2;
}

html.dark {
  --background: #1a1a1a;
  --text-color: #e0e0e0;
  --header-bg: transparent;
  --header-scrolled-bg: rgba(26, 26, 26, 0.8);
  --card-bg: #2c2c2c;
  --primary-color: #8fb381;
  --primary-hover: #7b9a70;
  --section-bg-alt: #222222;
}

body {
  font-family: "Cairo", sans-serif;
  background-color: var(--background);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
}

#navbar {
  background-color: var(--header-bg);
  transition: background-color 0.3s;
}

#navbar.scrolled {
  background-color: var(--header-scrolled-bg);
  backdrop-filter: blur(10px);
}

.nav-link {
  color: var(--text-color);
}

.bg-white {
  background-color: var(--card-bg) !important;
}

.bg-\[\#F9F9F6\] {
  background-color: var(--background) !important;
}

.bg-\[\#F7F8F2\] {
  background-color: var(--section-bg-alt) !important;
}

.text-gray-800,
.text-gray-700 {
  color: var(--text-color) !important;
}

.text-gray-600 {
  color: var(--text-color) !important;
  opacity: 0.8;
}

.text-gray-500 {
  color: var(--text-color) !important;
  opacity: 0.7;
}

.text-\[\#7B8C6D\] {
  color: var(--primary-color) !important;
}

.bg-\[\#7B8C6D\] {
  background-color: var(--primary-color) !important;
}

.hover\:bg-\[\#657458\]:hover {
  background-color: var(--primary-hover) !important;
}

.shadow-md {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

html.dark .shadow-md {
  box-shadow: 0 4px 6px -1px rgba(255, 255, 255, 0.05),
    0 2px 4px -1px rgba(255, 255, 255, 0.03);
}

html {
  scroll-padding-top: 7rem;
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: hidden;
}

/* Mobile menu dark mode improvements */
.dark #mobile-menu {
  background-color: #232323 !important;
  color: #e0e0e0 !important;
}
.dark #mobile-menu a {
  color: #e0e0e0 !important;
}
.dark #mobile-menu a:hover {
  color: var(--primary-color) !important;
}
.dark #mobile-menu button {
  color: var(--primary-color) !important
}

/* Mobile menu smooth open/close animation */
#mobile-menu {
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px);
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s,
    transform 0.4s;
}
#mobile-menu.open {
  max-height: 500px;
  opacity: 1;
  transform: translateY(0);
}

/* Service Modal Enhancements */
#service-modal {
  animation: fadeIn 0.3s ease-out;
}

#service-modal > div {
  animation: slideIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Service Modal Dark Mode Support */
html.dark #service-modal > div {
  background-color: #2c2c2c !important;
  color: #e0e0e0 !important;
}

html.dark #service-modal .bg-gray-50 {
  background-color: #3a3a3a !important;
}

html.dark #service-modal .bg-\[\#F7F8F2\] {
  background-color: #3a3a3a !important;
}

html.dark #service-modal .text-gray-700 {
  color: #e0e0e0 !important;
}

/* Service Features List Styling */
#service-modal-features-list li {
  transition: transform 0.2s ease;
}

#service-modal-features-list li:hover {
  transform: translateX(-5px);
}

/* Service Modal Button Hover Effects */
#service-modal button,
#service-modal a {
  transition: all 0.3s ease;
}

#service-modal button:hover,
#service-modal a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(123, 140, 109, 0.3);
}

/* Responsive Modal Adjustments */
@media (max-width: 640px) {
  #service-modal > div {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
  }
  
  #service-modal .p-8 {
    padding: 1.5rem;
  }
}

/* Service Modal Articles Styling */
#service-modal-articles-list div {
  transition: all 0.3s ease;
  border-radius: 0.5rem;
  padding: 0.75rem;
}

#service-modal-articles-list div:hover {
  background-color: #f8f9fa;
  transform: translateX(-5px);
}

#service-modal-articles-list h4 {
  font-size: 0.95rem;
  line-height: 1.4;
}

#service-modal-articles-list p {
  line-height: 1.5;
  margin-top: 0.5rem;
}

/* Service Modal Keywords Styling */
#service-modal-keywords-list span {
  transition: all 0.3s ease;
  cursor: pointer;
  font-weight: 500;
}

#service-modal-keywords-list span:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(123, 140, 109, 0.3);
  background-color: #657458 !important;
}

/* Dark Mode Support for Articles and Keywords */
html.dark #service-modal-articles {
  background-color: #3a3a3a !important;
  border-color: #555 !important;
}

html.dark #service-modal-articles-list div:hover {
  background-color: #4a4a4a !important;
}

html.dark #service-modal-keywords {
  background-color: #3a3a3a !important;
}

html.dark #service-modal-articles-list h4 {
  color: #e0e0e0 !important;
}

html.dark #service-modal-articles-list p {
  color: #ccc !important;
}

/* Service Modal Tabs Styling */
.service-tab {
  position: relative;
  transition: all 0.3s ease;
}

.service-tab:hover {
  background-color: rgba(123, 140, 109, 0.1);
}

.service-tab.active {
  background-color: rgba(123, 140, 109, 0.1);
}

.service-tab-content {
  animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Service Modal Header Styling */
#service-modal .border-b {
  border-color: #e5e7eb;
}

/* Service Modal Content Styling */
#service-modal .flex-1 {
  scrollbar-width: thin;
  scrollbar-color: #7B8C6D #f3f4f6;
}

#service-modal .flex-1::-webkit-scrollbar {
  width: 6px;
}

#service-modal .flex-1::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 3px;
}

#service-modal .flex-1::-webkit-scrollbar-thumb {
  background: #7B8C6D;
  border-radius: 3px;
}

#service-modal .flex-1::-webkit-scrollbar-thumb:hover {
  background: #657458;
}

/* Service Modal Articles Enhanced Styling */
#service-modal-articles-list div {
  transition: all 0.3s ease;
  border-radius: 1.5rem;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 2px solid #f3f4f6;
}

#service-modal-articles-list div::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #7B8C6D, #A3B18A);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

#service-modal-articles-list div:hover::before {
  transform: scaleX(1);
}

#service-modal-articles-list div:hover {
  background-color: #ffffff;
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
  border-color: #7B8C6D;
}

/* تحسين عرض المقالات */
#service-modal-articles-list {
  max-width: 100%;
  margin: 0 auto;
}

#service-modal-articles-list .space-y-8 > div {
  margin-bottom: 2rem;
}

#service-modal-articles-list .space-y-8 > div:last-child {
  margin-bottom: 0;
}

/* تحسين العناوين */
#service-modal-articles-list h3 {
  font-size: 2rem;
  font-weight: 800;
  color: #7B8C6D;
  text-align: center;
  margin-bottom: 1rem;
}

#service-modal-articles-list h4 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #7B8C6D;
  line-height: 1.3;
  margin-bottom: 1rem;
}

/* تحسين المحتوى */
#service-modal-articles-list .bg-gray-50 {
  background-color: #f9fafb;
  border-radius: 1rem;
  padding: 1.5rem;
  border-right: 4px solid #7B8C6D;
}

#service-modal-articles-list .text-justify {
  text-align: justify;
  line-height: 1.8;
  font-size: 1.1rem;
  color: #374151;
}

/* تحسين الأرقام الدائرية */
#service-modal-articles-list .w-20 {
  width: 5rem;
  height: 5rem;
  box-shadow: 0 8px 25px rgba(123, 140, 109, 0.3);
  font-size: 1.5rem;
  font-weight: 800;
}

/* تحسين البطاقات الصغيرة */
#service-modal-articles-list .bg-\[#7B8C6D\] {
  background-color: #7B8C6D;
  color: white;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  box-shadow: 0 2px 8px rgba(123, 140, 109, 0.3);
}

/* تحسين الأزرار */
#service-modal-articles-list button {
  transition: all 0.3s ease;
  font-weight: 700;
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
}

#service-modal-articles-list button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 20px rgba(123, 140, 109, 0.4);
}

/* تحسين بطاقة الاتصال */
#service-modal-articles-list .bg-gradient-to-r {
  background: linear-gradient(135deg, #7B8C6D 0%, #657458 100%);
  border-radius: 1.5rem;
  box-shadow: 0 15px 35px rgba(123, 140, 109, 0.3);
  padding: 2rem;
}

#service-modal-articles-list .bg-gradient-to-r:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(123, 140, 109, 0.4);
}

#service-modal-articles-list .bg-gradient-to-r h4 {
  color: white;
  font-size: 1.5rem;
  font-weight: 800;
}

#service-modal-articles-list .bg-gradient-to-r p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
}

/* تحسين أزرار الاتصال */
#service-modal-articles-list .bg-gradient-to-r a {
  transition: all 0.3s ease;
  font-weight: 700;
  border-radius: 0.75rem;
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

#service-modal-articles-list .bg-gradient-to-r a:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* تحسينات إضافية لصفحة المقالات */
#service-modal-articles-list .bg-gradient-to-br {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

#service-modal-articles-list .bg-gradient-to-br:hover {
  background: linear-gradient(135deg, #ffffff 0%, #f0f2f5 100%);
}

#service-modal-articles-list .border-r-4 {
  border-right: 4px solid var(--primary-color);
  border-radius: 0 8px 8px 0;
}

#service-modal-articles-list .text-justify {
  text-align: justify;
  line-height: 1.8;
}

#service-modal-articles-list .rounded-xl {
  border-radius: 1rem;
}

#service-modal-articles-list .shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

#service-modal-articles-list .hover\:shadow-xl:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* تحسين أزرار المشاركة والحفظ */
#service-modal-articles-list button {
  transition: all 0.3s ease;
  font-weight: 600;
}

#service-modal-articles-list button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(123, 140, 109, 0.3);
}

/* تحسين البطاقة الأخيرة */
#service-modal-articles-list .bg-gradient-to-r {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(123, 140, 109, 0.3);
}

#service-modal-articles-list .bg-gradient-to-r:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(123, 140, 109, 0.4);
}

/* تحسين الأيقونات والأرقام */
#service-modal-articles-list .w-16 {
  width: 4rem;
  height: 4rem;
  box-shadow: 0 4px 12px rgba(123, 140, 109, 0.3);
}

#service-modal-articles-list .bg-gradient-to-br.from-\[#7B8C6D\] {
  background: linear-gradient(135deg, #7B8C6D 0%, #657458 100%);
}

/* تحسين النص والعناوين */
#service-modal-articles-list h3 {
  font-weight: 700;
  background: linear-gradient(135deg, #7B8C6D, #657458);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#service-modal-articles-list h4 {
  font-weight: 600;
  color: #7B8C6D;
  line-height: 1.4;
}

/* تحسين الفقرات */
#service-modal-articles-list .text-justify {
  text-align: justify;
  line-height: 1.8;
  color: #4a5568;
}

/* تحسين البطاقات الصغيرة */
#service-modal-articles-list .bg-\[#7B8C6D\] {
  background-color: #7B8C6D;
  color: white;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
}

/* Service Modal Contact Tab Styling */
#contact-tab .grid > div {
  transition: all 0.3s ease;
  border-radius: 0.75rem;
}

#contact-tab .grid > div:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(123, 140, 109, 0.2);
}

/* Dark Mode Enhancements for New Modal */
html.dark #service-modal-tabs {
  background-color: #3a3a3a !important;
  border-color: #555 !important;
}

html.dark .service-tab {
  color: #e0e0e0 !important;
}

html.dark .service-tab:hover {
  background-color: rgba(123, 140, 109, 0.2) !important;
}

html.dark .service-tab.active {
  background-color: rgba(123, 140, 109, 0.2) !important;
}

html.dark #service-modal .border-b {
  border-color: #555 !important;
}

html.dark #service-modal-articles-list div {
  background-color: #2c2c2c !important;
  border-color: #555 !important;
}

html.dark #service-modal-articles-list div:hover {
  background-color: #3a3a3a !important;
}

/* Dark Mode Enhancements for Articles */
html.dark #service-modal-articles-list div {
  background-color: #2c2c2c !important;
  border-color: #555 !important;
}

html.dark #service-modal-articles-list div:hover {
  background-color: #3a3a3a !important;
  border-color: #8fb381 !important;
}

html.dark #service-modal-articles-list .bg-gradient-to-br {
  background: linear-gradient(135deg, #2c2c2c 0%, #3a3a3a 100%) !important;
}

html.dark #service-modal-articles-list .bg-gradient-to-br:hover {
  background: linear-gradient(135deg, #3a3a3a 0%, #4a4a4a 100%) !important;
}

html.dark #service-modal-articles-list .text-justify {
  color: #e0e0e0 !important;
}

html.dark #service-modal-articles-list .bg-white {
  background-color: #3a3a3a !important;
  border-color: #555 !important;
}

html.dark #service-modal-articles-list .bg-gray-50 {
  background-color: #3a3a3a !important;
  border-color: #8fb381 !important;
}

html.dark #service-modal-articles-list .bg-gradient-to-r {
  background: linear-gradient(135deg, #8fb381 0%, #7b9a70 100%) !important;
}

html.dark #service-modal-articles-list .bg-gradient-to-r:hover {
  background: linear-gradient(135deg, #7b9a70 0%, #6b8a60 100%) !important;
}

html.dark #service-modal-articles-list .bg-\[#7B8C6D\] {
  background-color: #8fb381 !important;
}

html.dark #service-modal-articles-list h3 {
  color: #8fb381 !important;
}

html.dark #service-modal-articles-list h4 {
  color: #8fb381 !important;
}

html.dark #service-modal-articles-list .text-gray-600 {
  color: #d1d5db !important;
}

html.dark #service-modal-articles-list .text-gray-500 {
  color: #9ca3af !important;
}

html.dark #service-modal-articles-list .border-gray-200 {
  border-color: #555 !important;
}

html.dark #service-modal-articles-list .border-t {
  border-color: #555 !important;
}

html.dark #contact-tab .grid > div {
  background-color: #2c2c2c !important;
}

html.dark #contact-tab .grid > div:hover {
  background-color: #3a3a3a !important;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
  #service-modal-tabs {
    flex-wrap: wrap;
  }
  
  .service-tab {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
  }
  
  .service-tab i {
    display: block;
    margin: 0 auto 0.25rem;
  }
}

@media (max-width: 480px) {
  #service-modal > div {
    margin: 0.5rem;
    max-height: calc(100vh - 1rem);
  }
  
  #service-modal .p-6 {
    padding: 1rem;
  }
  
  .service-tab {
    font-size: 0.75rem;
    padding: 0.5rem 0.25rem;
  }
} 

#service-modal .service-tab-content {
  overflow-y: auto;
  max-height: 60vh;
  padding-left: 1rem;
  padding-right: 1rem;
} 