/* ================================
   تنسيقات عامة للصفحة
   ================================ */

body {
  margin: 0;
  font-family: 'Tajawal', 'Segoe UI', Arial, sans-serif;
  direction: rtl;
  background-color: #fefefe;
  color: #333;
  line-height: 1.6;
}

/* ================================
   Navbar
   ================================ */

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ffffff;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  position: relative;
  z-index: 1000;
}

.navbar .nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar .nav-links a {
  text-decoration: none;
  color: #333;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.navbar .nav-links a:hover {
  color: #007bff;
}

.menu-toggle {
  display: none;
  font-size: 1.8rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #007bff;
}

/* ================================
   Responsive Navbar
   ================================ */

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    display: none;
    padding: 15px 0;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    padding: 10px 20px;
    border-bottom: 1px solid #eee;
  }

  .nav-links a {
    font-size: 1rem;
    color: #333;
  }
}

/* ================================
/* ================================
   Hero Section
   ================================ */

.hero {
  background-color: #ffffff; /* خلفية بيضاء بدون تدرج */
  padding: 80px 20px 60px;
  text-align: center;
  position: relative;
}

.hero h2 {
  font-size: 2.5rem;
  color: #0078D7;
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.hero p {
  font-size: 1.2rem;
  color: #444;
  max-width: 800px;
  margin: 0 auto 30px;
  line-height: 1.8;
}

.hero-image-container {
  margin: 40px auto;
  max-width: 900px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border: 1px solid rgba(0,0,0,0.05);
}

.hero-image {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.hero-image:hover {
  transform: scale(1.02);
}

.hero-button {
  background-color: #0078D7;
  color: white;
  border: none;
  padding: 14px 32px;
  font-size: 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 120, 215, 0.2);
}

.hero-button:hover {
  background-color: #0063b3;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 120, 215, 0.3);
}/* ================================
   Vision & Mission Section
   ================================ */

.vision-section {
  background-color: #f0f4f8;
  padding: 60px 20px;
  border-radius: 12px;
  margin: 40px auto;
  position: relative;
  overflow: hidden;
}

.vision-container {
  max-width: 900px;
  margin: auto;
  text-align: center;
  position: relative;
  z-index: 2;
}

.vision-section h2 {
  color: #0078D7;
  font-size: 2.2rem;
  margin-bottom: 30px;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.vision-section h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  right: 50%;
  transform: translateX(50%);
  width: 80px;
  height: 3px;
  background-color: #0078D7;
}

.vision-section p {
  font-size: 1.1rem;
  line-height: 1.9;
  margin-bottom: 20px;
  color: #444;
}

.vision-section strong {
  color: #0078D7;
  font-weight: 600;
}

.highlight-text {
  color: #0078D7;
  font-weight: 600;
  display: inline-block;
  margin: 0 3px;
}

/* ===== Brand Carousel in Hero ===== */
.carousel-container {
  overflow: hidden;
  width: 100%;
  margin-top: 40px;
  direction: ltr;
}

.carousel-track {
  display: flex;
  gap: 24px;
  width: max-content;
  animation: scrollBrands 30s linear infinite;
  align-items: center;
}

.logo-box {
  width: 100px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0.8;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.logo-box img:hover {
  transform: scale(1.1);
  opacity: 1;
}

@keyframes scrollBrands {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Pause on hover */
.carousel-container:hover .carousel-track {
  animation-play-state: paused;
}

/* ================================
   Projects Section
   ================================ */

section h2 {
  font-size: 2rem;
  color: #34495e;
  margin-bottom: 30px;
  text-align: center;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.service-card {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: visible;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 500px;
  height: auto;
}

.service-img {
  flex: 0 0 300px;
  overflow: hidden;
  border-bottom: 1px solid #eee;
  width: 100%;
  height: 220px;
  background-color: #f9f9f9;
  position: relative;
  z-index: 1;
}

.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

img.cover {
  object-fit: cover;
}

img.contain {
  object-fit: contain;
  background-color: #f0f0f0;
}

.service-content {
  position: relative;
  z-index: 2;
  flex: 1;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.service-content h3 {
  font-size: 1.2rem;
  color: #2c3e50;
  margin-bottom: 8px;
}

.service-content p {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.5;
  margin: 0;
}

/* ================================
 /* Accordion Toggle Styles
   ================================ */
.accordion-toggle {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px 15px;
  font-size: 0.9rem;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 10px;
  width: 100%;
  transition: background-color 0.3s ease;
  font-family: 'Tajawal', sans-serif;
  text-align: right; /* RTL alignment */
}

.accordion-toggle:hover {
  background-color: #0056b3;
}

/* Accordion Content Styles */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding: 0 15px;
}

/* Active state with dynamic height handled by JS */
.accordion-content.active {
  padding: 10px 15px;
}

/* List Styling */
.accordion-content ul {
  padding-right: 20px;
  margin: 10px 0;
}
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding: 0 15px;
}

.accordion-content.active {
  padding: 10px 15px;
}

/* ================================
   Responsive Adjustments
   ================================ */

@media (max-width: 768px) {
  .hero {
    padding: 50px 15px;
  }
  
  .hero h2 {
    font-size: 1.8rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .hero-image-container {
    margin: 30px auto;
  }
  
  .hero-button {
    padding: 12px 24px;
    font-size: 1rem;
  }
  
  .vision-section {
    padding: 40px 15px;
  }
  
  .vision-section h2 {
    font-size: 1.8rem;
  }
  
  .vision-section p {
    font-size: 1rem;
    line-height: 1.8;
  }
  
  .service-img {
    height: 180px;
    flex: 0 0 180px;
  }
  
  .service-content {
    padding: 12px 14px;
  }
  
  .accordion-toggle {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
}

@media (min-width: 1200px) {
  .hero {
    padding: 100px 20px;
  }
  
  .hero h2 {
    font-size: 3rem;
  }
  
  .hero p {
    font-size: 1.3rem;
  }
  
  .vision-section {
    padding: 80px 20px;
  }
  
  .vision-section h2 {
    font-size: 2.5rem;
  }
  
  .vision-section p {
    font-size: 1.2rem;
  }
}