/* Arabic Font Optimization */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&display=swap');

/* ÉCO-GREEN Modern Stylesheet - AI Inspired */

/* Modern Variables */
:root {
  --primary-color: #16a34a;
  --primary-light: #22c55e;
  --primary-dark: #15803d;
  --secondary-color: #0f766e;
  --accent-color: #eab308;
  --background-light: #f0f4f8;
  --background-dark: #0f172a;
  --card-background: #ffffff;
  --text-light: #f8fafc;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --transition-normal: all 0.3s ease;
  --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  --font-arabic: 'Tajawal', 'Scheherazade New', 'Traditional Arabic', sans-serif;
}

/* Dark Mode Variables */
.dark-mode {
  --background-light: #121a29;
  --background-dark: #1e293b;
  --card-background: #1e293b;
  --text-dark: #f1f5f9;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
  --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
}

/* Base Styles */
body {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-dark);
  background-color: var(--background-light);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: var(--transition-normal);
}

/* RTL and Arabic specific styles */
html[dir="rtl"] body {
  font-family: var(--font-arabic);
  letter-spacing: 0;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6 {
  font-family: var(--font-arabic);
  font-weight: 700;
  letter-spacing: 0;
}

html[dir="rtl"] .navbar-brand {
  font-family: var(--font-arabic);
  font-weight: 800;
}

html[dir="rtl"] .section-heading {
  font-family: var(--font-arabic);
  font-weight: 800;
}

/* Improve Arabic text readability */
html[dir="rtl"] p,
html[dir="rtl"] .service-description,
html[dir="rtl"] .feature-content {
  line-height: 1.8;
  font-size: 1.05rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition-normal);
}

a:hover {
  color: var(--primary-dark);
}

/* Modern Header */
.navbar {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
  background: var(--card-background) !important;
  transition: var(--transition-normal);
}

.dark-mode .navbar {
  background: var(--background-dark) !important;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

/* Light navbar styles */
.navbar-light .navbar-nav .nav-link {
  color: var(--text-dark) !important;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: var(--transition-normal);
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
  color: var(--primary-color) !important;
  background-color: rgba(22, 163, 74, 0.1);
}

.dark-mode .navbar-light .navbar-nav .nav-link {
  color: var(--text-light) !important;
}

.dark-mode .navbar-light .navbar-toggler-icon {
  filter: invert(1);
}

.dark-mode .dropdown-menu {
  background-color: var(--background-dark);
  border-color: var(--border-color);
}

.dark-mode .dropdown-item {
  color: var(--text-light);
}

.dark-mode .dropdown-item:hover,
.dark-mode .dropdown-item:focus {
  background-color: rgba(22, 163, 74, 0.1);
  color: var(--primary-light);
}

/* Section Layouts - Fix Gaps */
section {
  position: relative;
  overflow: hidden;
}

.section-heading {
  position: relative;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  color: var(--text-dark);
  text-align: center;
  letter-spacing: -0.5px;
}

.section-heading::after {
  content: '';
  display: block;
  width: 50px;
  height: 4px;
  background: var(--primary-color);
  margin: 0.75rem auto 0;
  border-radius: 4px;
}

/* Enhanced Hero Section with Animations */
.hero-section {
  position: relative;
  background: var(--gradient-primary);
  color: white;
  padding: 6rem 0;
  margin-bottom: 0;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: url('data:image/svg+xml;charset=utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"%3E%3Cpath fill="%23ffffff" fill-opacity="0.1" d="M0,160L48,154.7C96,149,192,139,288,160C384,181,480,235,576,224C672,213,768,139,864,117.3C960,96,1056,128,1152,133.3C1248,139,1344,117,1392,106.7L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"%3E%3C/path%3E%3C/svg%3E');
  background-size: cover;
  animation: wave 15s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes wave {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

.hero-section h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -1px;
  color: var(--text-light);
  position: relative;
  display: inline-block;
  background: linear-gradient(90deg, #ffffff, #e0e0e0, #ffffff);
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 3s linear infinite;
}

@keyframes shine {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease forwards 0.5s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-weight: 600;
  background: var(--accent-color);
  color: var(--text-dark);
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(234, 179, 8, 0.3);
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
  z-index: 5;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.3);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 4px 20px rgba(234, 179, 8, 0.5);
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.3);
    transform: scale(1);
  }
}

.hero-btn:hover {
  background: #f7c948;
  color: var(--text-dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(234, 179, 8, 0.4);
}

.hero-image {
  position: relative;
  z-index: 2;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.15));
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0px);
  }
}

.hero-image img {
  max-width: 100%;
  transition: transform 0.5s ease;
}

.hero-image:hover img {
  transform: scale(1.05);
}

/* Green leaf particles animation */
.hero-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.hero-particle {
  position: absolute;
  display: block;
  pointer-events: none;
  width: 10px;
  height: 10px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: particles 25s linear infinite;
}

/* Leaf-shaped particles */
.hero-particle.leaf-particle {
  background-color: transparent;
  width: 15px;
  height: 15px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='rgba(255,255,255,0.6)' d='M17,8C8,10 5.9,16.17 3.82,21.34L5.71,22L6.66,19.7C7.14,19.87 7.64,20 8,20C19,20 22,3 22,3C21,5 14,5.25 9,6.25C4,7.25 2,11.5 2,13.5C2,15.5 3.75,17.25 3.75,17.25C7,8 17,8 17,8Z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  animation: leafFall 25s linear infinite, leafSway 5s ease-in-out infinite alternate;
}

@keyframes leafFall {
  0% {
    transform: translateY(-20px) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

@keyframes leafSway {
  0% {
    transform: translateX(0) rotate(0deg);
  }
  25% {
    transform: translateX(15px) rotate(15deg);
  }
  50% {
    transform: translateX(0) rotate(0deg);
  }
  75% {
    transform: translateX(-15px) rotate(-15deg);
  }
  100% {
    transform: translateX(0) rotate(0deg);
  }
}

/* Hero content container */
.hero-content {
  position: relative;
  z-index: 5;
}

.hero-buttons {
  position: relative;
  z-index: 6;
}

/* Animated title for hero section */
.animated-title {
  display: inline-block;
  position: relative;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.animated-title::after {
  content: '';
  position: absolute;
  height: 4px;
  width: 40%;
  background: var(--accent-color);
  bottom: -8px;
  left: 0;
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  animation: growLine 1.5s ease forwards 2s;
}

@keyframes growLine {
  to {
    transform: scaleX(1);
  }
}

/* RTL support for hero animations */
html[dir="rtl"] .animated-title::after {
  left: auto;
  right: 0;
  transform-origin: right;
}

html[dir="rtl"] .hero-btn i,
html[dir="rtl"] .btn-outline-light i {
  margin-right: 0;
  margin-left: 0.5rem;
}

/* Fix Mission Section */
.mission-section {
  padding: 5rem 0;
  background-color: var(--background-light);
  transition: var(--transition-normal);
  margin: 0;
}

.mission-content h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.mission-content p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.mission-img {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.mission-img img {
  width: 100%;
  height: auto;
  transition: transform 0.5s ease;
}

.mission-img:hover img {
  transform: scale(1.05);
}

/* Fix Services Section */
.services-section {
  padding: 5rem 0;
  background-color: var(--background-light);
  transition: var(--transition-normal);
  margin: 0;
  border-top: 1px solid var(--border-color);
}

.service-card {
  background: var(--card-background);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--card-shadow);
  transition: var(--transition-normal);
  height: 100%;
  text-align: center;
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
}

.service-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--primary-light);
}

.service-card:hover .service-icon {
  transform: scale(1.1);
  background-color: rgba(22, 163, 74, 0.15);
}

.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background-color: rgba(22, 163, 74, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-normal);
}

.service-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  transition: var(--transition-normal);
}

.service-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.service-description {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* For RTL service cards */
[dir="rtl"] .service-card {
  text-align: right;
}

@media (max-width: 767px) {
  .service-card {
    margin-bottom: 1.5rem;
  }
  
  [dir="rtl"] .service-card {
    text-align: center;
  }
}

/* Fix Stats Section */
.stats-section {
  background-color: var(--primary-color);
  color: white;
  padding: 4rem 0;
  margin: 0;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  opacity: 0.9;
}

/* Testimonial Section */
.testimonial-card {
  background: var(--card-background);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
}

.dark-mode .testimonial-card {
  background: var(--background-dark);
}

.testimonial-content {
  font-style: italic;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

.testimonial-author {
  display: flex;
  align-items: center;
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 1rem;
}

.testimonial-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-dark);
}

.testimonial-title {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Fix Call to Action Section */
.cta-section {
  background: var(--gradient-primary);
  padding: 5rem 0;
  margin: 0;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: url('data:image/svg+xml;charset=utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"%3E%3Cpath fill="%23ffffff" fill-opacity="0.1" d="M0,224L34.3,213.3C68.6,203,137,181,206,181.3C274.3,181,343,203,411,229.3C480,256,549,288,617,266.7C685.7,245,754,171,823,144C891.4,117,960,139,1029,165.3C1097.1,192,1166,224,1234,218.7C1302.9,213,1371,171,1406,149.3L1440,128L1440,320L1405.7,320C1371.4,320,1303,320,1234,320C1165.7,320,1097,320,1029,320C960,320,891,320,823,320C754.3,320,686,320,617,320C548.6,320,480,320,411,320C342.9,320,274,320,206,320C137.1,320,69,320,34,320L0,320Z"%3E%3C/path%3E%3C/svg%3E');
  background-size: cover;
  opacity: 0.1;
}

.cta-section h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.cta-section p {
  font-size: 1.125rem;
  max-width: 700px;
  margin: 0 auto 2rem;
  opacity: 0.9;
}

.cta-btn {
  background-color: var(--card-background);
  color: var(--primary-color);
  border: none;
  border-radius: 50px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  font-size: 1.1rem;
  transition: var(--transition-normal);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: inline-block;
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.1);
  background-color: var(--background-light);
  text-decoration: none;
  color: var(--primary-color);
}

/* Fix Values Section */
.values-section {
  padding: 5rem 0;
  background-color: var(--background-light);
  transition: var(--transition-normal);
  margin: 0;
  border-top: 1px solid var(--border-color);
}

/* Fix Payment Methods Section */
.payment-section {
  padding: 5rem 0;
  background-color: var(--background-light);
  transition: var(--transition-normal);
  margin: 0;
  border-top: 1px solid var(--border-color);
}

/* Fix Featured Products Section */
.featured-products-section {
  padding: 5rem 0;
  background-color: var(--background-light);
  transition: var(--transition-normal);
  margin: 0;
  border-top: 1px solid var(--border-color);
}

/* Dark Mode Adjustments */
.dark-mode .mission-section,
.dark-mode .services-section,
.dark-mode .values-section,
.dark-mode .payment-section,
.dark-mode .featured-products-section {
  background-color: var(--background-dark);
  border-color: var(--border-color);
}

/* Remove bg-light class effect */
.bg-light {
  background-color: transparent !important;
}

/* Footer */
.footer {
  background-color: var(--background-dark);
  color: var(--text-light);
  padding: 4rem 0 1rem;
}

.footer-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-light);
  opacity: 0.8;
  transition: var(--transition-normal);
}

.footer-links a:hover {
  opacity: 1;
  color: var(--primary-light);
  text-decoration: none;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  opacity: 0.7;
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  transition: var(--transition-normal);
}

.social-icon:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  text-decoration: none;
}

/* Dark Mode Toggle */
#dark-mode-toggle {
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-normal);
}

#dark-mode-toggle:hover {
  background-color: rgba(22, 163, 74, 0.1);
}

.dark-mode #dark-mode-toggle i {
  color: #fbbf24;
}

/* Buttons */
.btn-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white;
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  border-radius: 5px;
  transition: var(--transition-normal);
}

.btn-primary:hover {
  background-color: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-outline-primary {
  color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  border-radius: 5px;
  transition: var(--transition-normal);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color) !important;
  color: white !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.will-animate {
  opacity: 0;
}

.animated {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* For Arabic RTL Support */
[dir="rtl"] .navbar-nav {
  padding-right: 0;
}

[dir="rtl"] .me-auto {
  margin-left: auto !important;
  margin-right: 0 !important;
}

[dir="rtl"] .ms-auto {
  margin-right: auto !important;
  margin-left: 0 !important;
}

[dir="rtl"] .social-icon {
  margin-right: 0;
  margin-left: 0.5rem;
}

[dir="rtl"] .me-1, 
[dir="rtl"] .me-2, 
[dir="rtl"] .me-3 {
  margin-right: 0 !important;
  margin-left: 0.25rem !important;
}

[dir="rtl"] .ms-1, 
[dir="rtl"] .ms-2, 
[dir="rtl"] .ms-3 {
  margin-left: 0 !important;
  margin-right: 0.25rem !important;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
  .navbar {
    padding: 0.5rem 0;
  }
  
  .hero-section {
    padding: 4rem 0;
    text-align: center;
  }
  
  .hero-section h1 {
    font-size: 2.5rem;
  }
  
  .section-heading {
    font-size: 1.75rem;
  }
  
  .product-card .card-img-top {
    height: 180px;
  }
  
  .hero-image {
    margin-top: 2rem;
  }
  
  .d-flex.gap-3 {
    justify-content: center;
  }
}

@media (max-width: 767px) {
  .hero-section {
    padding: 3rem 0;
  }
  
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .hero-section p {
    font-size: 1rem;
  }
  
  .stat-value {
    font-size: 2rem;
  }
  
  .cta-section h2 {
    font-size: 1.75rem;
  }
  
  .mission-img {
    margin-top: 2rem;
    margin-bottom: 2rem;
  }
  
  .mission-content {
    text-align: center;
  }
  
  .feature-card {
    margin-bottom: 1.5rem;
  }
  
  .order-lg-1 {
    order: 2 !important;
  }
  
  .order-lg-2 {
    order: 1 !important;
  }
  
  .footer-title {
    margin-top: 1.5rem;
  }
}

@media (max-width: 575px) {
  .hero-section h1 {
    font-size: 1.75rem;
  }
  
  .hero-btn {
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
  }
  
  .section-heading {
    font-size: 1.5rem;
  }
  
  .feature-title, .product-title {
    font-size: 1.1rem;
  }
  
  .cta-section h2 {
    font-size: 1.5rem;
  }
  
  .cta-section p {
    font-size: 1rem;
  }
}

/* Additional UI Components */

/* Dropdown Menus */
.dropdown-menu {
  background-color: var(--card-background);
  border-color: var(--border-color);
  box-shadow: var(--card-shadow);
}

.dropdown-item {
  color: var(--text-dark);
  transition: var(--transition-normal);
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: rgba(22, 163, 74, 0.1);
  color: var(--primary-color);
}

/* Form Elements */
.form-control, 
.form-select {
  background-color: var(--card-background);
  border-color: var(--border-color);
  color: var(--text-dark);
}

.form-control:focus, 
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(22, 163, 74, 0.25);
  background-color: var(--card-background);
}

.dark-mode .form-control,
.dark-mode .form-select {
  color: var(--text-light);
}

.form-control::placeholder {
  color: var(--text-muted);
}

/* Tables */
.table {
  color: var(--text-dark);
}

.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.02);
}

.dark-mode .table-striped > tbody > tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.05);
}

.table-hover tbody tr:hover {
  background-color: rgba(22, 163, 74, 0.05);
}

/* Cards */
.card {
  background-color: var(--card-background);
  border-color: var(--border-color);
  box-shadow: var(--card-shadow);
}

.card-header, 
.card-footer {
  background-color: rgba(0, 0, 0, 0.02);
  border-color: var(--border-color);
}

.dark-mode .card-header, 
.dark-mode .card-footer {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Alerts */
.alert {
  background-color: var(--card-background);
  border-width: 1px;
  border-left-width: 4px;
}

.alert-success {
  border-color: var(--primary-color);
  color: var(--primary-dark);
}

.dark-mode .alert-success {
  color: var(--primary-light);
}

.alert-danger {
  border-color: #dc3545;
}

.alert-warning {
  border-color: #ffc107;
}

.alert-info {
  border-color: #0dcaf0;
}

/* Services Section */
.service-card {
  background: var(--card-background);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--card-shadow);
  transition: var(--transition-normal);
  height: 100%;
  text-align: center;
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
}

.service-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--primary-light);
}

.service-card:hover .service-icon {
  transform: scale(1.1);
  background-color: rgba(22, 163, 74, 0.15);
}

.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background-color: rgba(22, 163, 74, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-normal);
}

.service-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  transition: var(--transition-normal);
}

.service-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.service-description {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* For RTL service cards */
[dir="rtl"] .service-card {
  text-align: right;
}

@media (max-width: 767px) {
  .service-card {
    margin-bottom: 1.5rem;
  }
  
  [dir="rtl"] .service-card {
    text-align: center;
  }
}

/* Feature Cards */
.feature-card {
  background: var(--card-background);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  margin-bottom: 2rem;
  transition: var(--transition-normal);
  height: 100%;
  border: 1px solid var(--border-color);
}

.dark-mode .feature-card {
  background: var(--background-dark);
  border-color: var(--border-color);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(22, 163, 74, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.feature-icon i {
  font-size: 1.75rem;
  color: var(--primary-color);
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.feature-content {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Product Cards */
.product-card {
  border-radius: 10px;
  overflow: hidden;
  transition: var(--transition-normal);
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.product-card .card-img-top {
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .card-img-top {
  transform: scale(1.05);
}

.product-card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--card-background);
}

.product-card .card-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: var(--text-dark);
}

.product-card .price {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.2rem;
  margin-top: auto;
}

.product-card .card-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.product-card .btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  transition: var(--transition-normal);
}

.product-card .btn-primary:hover {
  background-color: var(--primary-color-dark);
  border-color: var(--primary-color-dark);
  transform: translateY(-2px);
}

.out-of-stock-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(220, 53, 69, 0.85);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 1;
}

html[dir="rtl"] .out-of-stock-badge {
  right: auto;
  left: 10px;
}

/* Pagination Styling */
.pagination .page-item .page-link {
  color: var(--text-dark);
  border: 1px solid var(--border-color);
  margin: 0 3px;
  border-radius: 5px;
  transition: var(--transition-normal);
}

.pagination .page-item.active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.pagination .page-item .page-link:hover {
  background-color: rgba(22, 163, 74, 0.1);
  color: var(--primary-color);
}

/* Sort and Filter Controls */
.filter-controls {
  padding: 1rem;
  background-color: var(--card-background);
  border-radius: 10px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
  transition: var(--transition-normal);
}

.filter-controls .form-control,
.filter-controls .form-select {
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  background-color: var(--input-background);
  color: var(--text-dark);
}

.filter-controls .form-control:focus,
.filter-controls .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(22, 163, 74, 0.25);
}

/* Enhanced RTL/Arabic Text Styling */
html[dir="rtl"] {
  text-align: right;
}

html[dir="rtl"] .text-end {
  text-align: left !important;
}

html[dir="rtl"] .text-start {
  text-align: right !important;
}

/* Fix floating elements in RTL */
html[dir="rtl"] .float-start {
  float: right !important;
}

html[dir="rtl"] .float-end {
  float: left !important;
}

/* Arabic font size adjustments for better readability */
html[dir="rtl"] .hero-section h1 {
  font-size: 3.2rem;
  line-height: 1.4;
}

html[dir="rtl"] .hero-section p {
  font-size: 1.2rem;
  line-height: 1.8;
}

html[dir="rtl"] .service-title {
  font-weight: 800;
  letter-spacing: 0;
}

html[dir="rtl"] .stat-value {
  font-family: var(--font-arabic);
  font-weight: 700;
}

html[dir="rtl"] .feature-title {
  font-family: var(--font-arabic);
  font-weight: 700;
  line-height: 1.6;
}

/* Fix button text alignment in RTL */
html[dir="rtl"] .btn {
  letter-spacing: 0;
}

/* Adjust padding for RTL menu items */
html[dir="rtl"] .dropdown-item {
  text-align: right;
}

/* Improve Arabic numerals */
html[dir="rtl"] .stat-value {
  font-feature-settings: "tnum";
}

/* Fix form elements for RTL */
html[dir="rtl"] .form-control {
  text-align: right;
}

html[dir="rtl"] .form-check {
  padding-right: 1.5em;
  padding-left: 0;
}

@media (max-width: 767px) {
  html[dir="rtl"] .hero-section h1 {
    font-size: 2.2rem;
  }
}

/* Categories Sidebar Styling */
.categories-sidebar {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  transition: var(--transition-normal);
}

.categories-sidebar .card-header {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem;
  font-weight: 600;
}

.categories-sidebar .list-group-item {
  padding: 0.75rem 1rem;
  border-left: 3px solid transparent;
  transition: var(--transition-normal);
}

.dark-mode .categories-sidebar .list-group-item {
  background-color: var(--card-background);
  color: var(--text-dark);
  border-color: var(--border-color);
}

.categories-sidebar .list-group-item:hover {
  background-color: rgba(22, 163, 74, 0.05);
  border-left-color: var(--primary-color);
}

.categories-sidebar .list-group-item.active {
  background-color: rgba(22, 163, 74, 0.1);
  color: var(--primary-color);
  border-left-color: var(--primary-color);
  font-weight: 600;
}

.dark-mode .categories-sidebar .list-group-item.active {
  background-color: rgba(22, 163, 74, 0.2);
}

/* Active Filters styling */
.active-filters {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--card-background) !important;
}

/* RTL specific adjustments for sidebar */
html[dir="rtl"] .categories-sidebar .list-group-item {
  border-left: none;
  border-right: 3px solid transparent;
  text-align: right;
}

html[dir="rtl"] .categories-sidebar .list-group-item:hover,
html[dir="rtl"] .categories-sidebar .list-group-item.active {
  border-left-color: transparent;
  border-right-color: var(--primary-color);
}

/* Adjustments for mobile view */
@media (max-width: 991px) {
  .categories-sidebar {
    margin-bottom: 2rem;
  }
}

/* Product Detail Page Styling */
/* Replace carousel styling with static gallery styling */
.product-gallery {
  width: 100%;
}

.main-image-container {
  border-radius: 10px;
  overflow: hidden;
  background-color: var(--card-background);
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 450px;
}

.main-product-image {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 15px;
}

.thumbnail-item {
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--card-background);
  box-shadow: var(--card-shadow);
}

.thumbnail-item.active {
  border-color: var(--primary-color);
}

.product-thumbnail {
  max-height: 100%;
  max-width: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .thumbnail-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .main-image-container {
    height: 350px;
  }
}

@media (max-width: 576px) {
  .thumbnail-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .main-image-container {
    height: 300px;
  }
} 