:root {
  --primary-color: #ff7f00;
  --secondary-color: #2c3e50;
  --accent-color: #e67e22;
  --light-bg-color: #f8f9fa;
  --dark-bg-color: #343a40;
  --text-color: #333;
  --light-text-color: #ffffff;
  --text-muted: #6c757d;
  --border-radius: 8px;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  --box-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.12);
  --font-primary: "Montserrat", sans-serif;
  --font-secondary: "Cairo", sans-serif;
  --header-height-scroll: 70px;
  --header-height-top: 80px;
  --dark-blue: #1a2e40;
  --light-grey-bg: #f7f8fc;
}

/* --- Global Styles & Resets --- */
* {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  line-height: 1.7;
  color: var(--text-color);
  background-color: #fff;
  font-weight: 400;
  overflow-x: hidden;
  width: 100vw;
}

html[dir="rtl"] body,
html[dir="rtl"] body button {
  font-family: var(--font-secondary);
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: 1.2rem;
  font-weight: 700;
  color: var(--secondary-color);
  line-height: 1.3;
}
h1 {
  font-size: 3rem;
  font-weight: 700;
}
h3 {
  font-size: 1.6rem;
  font-weight: 600;
}

section {
  padding: 80px 0;
  position: relative;
}

/* --- Reusable Components --- */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
  font-size: 1rem;
  letter-spacing: 0.5px;
}
.btn i {
  margin-left: 8px;
}
html[dir="rtl"] .btn i {
  margin-left: 0;
  margin-right: 8px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--light-text-color);
  border-color: var(--primary-color);
}
.btn-primary:hover {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}
.section-title .sub-title {
  display: block;
  font-size: 1rem;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
  font-weight: 600;
}
.section-title h2 {
  font-size: 2.8rem;
  color: var(--secondary-color);
  margin-bottom: 0;
  position: relative;
  padding-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.section-title h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

/* --- Header --- */
#header {
  height: var(--header-height-top);
  background-color: transparent;
  position: fixed;
  width: 100vw;
  z-index: 1000;
  transition: background-color 0.4s ease, height 0.4s ease, box-shadow 0.4s ease;
  display: flex;
  align-items: center;
}
#header.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  height: var(--header-height-scroll);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}
#header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#header .logo img {
  height: 80px;
  transition: height 0.4s ease;
}
#header.scrolled .logo img {
  height: 60px;
}
#header nav ul {
  list-style: none;
  display: flex;
}
#header nav ul li {
  margin-left: 30px;
}
html[dir="rtl"] #header nav ul li {
  margin-left: 0;
  margin-right: 30px;
}

#header nav ul li a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 5px 0;
  position: relative;
  transition: color 0.3s ease;
}

#header:not(.scrolled) nav ul li a {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
  font-weight: 600;
}

#header.scrolled nav ul li a {
  color: var(--secondary-color);
}
#header nav ul li a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}
html[dir="rtl"] #header nav ul li a::after {
  left: auto;
  right: 0;
}
.email-link {
  word-break: break-all;
}
#header nav ul li a:hover,
#header nav ul li a.active {
  color: var(--primary-color);
}
#header nav ul li a:hover::after,
#header nav ul li a.active::after {
  width: 100%;
}

#header .header-right {
  display: flex;
  align-items: center;
}
#header .lang-switcher {
  margin-right: 20px;
}
html[dir="rtl"] #header .lang-switcher {
  margin-right: 0;
  margin-left: 20px;
}

#header .lang-switcher button {
  background: none;
  border: 1px solid transparent;
  padding: 6px 12px;
  margin-left: 5px;
  cursor: pointer;
  border-radius: 20px;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  font-weight: 500;
}
html[dir="rtl"] #header .lang-switcher button {
  margin-left: 0;
  margin-right: 5px;
}

#header:not(.scrolled) .lang-switcher button {
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.4);
}
#header:not(.scrolled) .lang-switcher button.active {
  background-color: var(--primary-color);
  color: var(--light-text-color);
  border-color: var(--primary-color);
}
#header:not(.scrolled) .lang-switcher button:not(.active):hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
}
#header.scrolled .lang-switcher button {
  color: var(--text-muted);
  border-color: #ddd;
}
#header.scrolled .lang-switcher button.active {
  background-color: var(--primary-color);
  color: var(--light-text-color);
  border-color: var(--primary-color);
}
#header.scrolled .lang-switcher button:not(.active):hover {
  color: var(--secondary-color);
  border-color: var(--secondary-color);
}

#header .menu-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s ease;
}
#header:not(.scrolled) .menu-toggle {
  color: var(--light-text-color);
}
#header.scrolled .menu-toggle {
  color: var(--secondary-color);
}
#header .menu-toggle i {
  transition: transform 0.3s ease;
}
#header .menu-toggle.open i {
  transform: rotate(90deg);
}
/* --- NEW LANGUAGE SWITCHER (V2) --- */
.lang-switcher-v2 {
  margin-right: 20px;
}
html[dir="rtl"] .lang-switcher-v2 {
  margin-right: 0;
  margin-left: 20px;
}

#lang-toggle-btn {
  background: none;
  border: 1px solid transparent;
  padding: 8px 15px;
  cursor: pointer;
  border-radius: 50px; /* Fully rounded */
  font-size: 0.9rem;
  transition: all 0.3s ease;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px; /* Space between icon and text */
}

/* Style for Header on Top (Transparent) */
#header:not(.scrolled):not(.header-solid) #lang-toggle-btn {
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.4);
}
#header:not(.scrolled):not(.header-solid) #lang-toggle-btn:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.8);
  color: #fff;
}

/* Style for Scrolled or Solid Header */
#header.scrolled #lang-toggle-btn,
#header.header-solid #lang-toggle-btn {
  color: var(--text-muted);
  border-color: #ddd;
  background-color: #f8f9fa;
}
#header.scrolled #lang-toggle-btn:hover,
#header.header-solid #lang-toggle-btn:hover {
  color: var(--secondary-color);
  border-color: var(--secondary-color);
  background-color: #f1f1f1;
}
/* --- Hero Section --- */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  color: var(--light-text-color);
  padding-top: var(--header-height-top);
}
.hero-video-background {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  z-index: -2;
  overflow: hidden;
}
.hero-video-background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 20, 30, 0.5);
  z-index: -1;
}
.hero-section .container {
  position: relative;
  z-index: 1;
}
.hero-content h1 {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 25px;
  color: var(--light-text-color);
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}
.hero-content p {
  font-size: 1.25rem;
  font-weight: 300;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
}
.hero-social-icons {
  position: absolute;
  bottom: 40px;
  left: 40px; /* Positions it on the left for LTR (English) */
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.scroll-down-container {
  position: absolute;
  margin-top: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
}

.scroll-mouse-wrapper {
  display: block;
  position: relative;
}

.mouse {
  width: 25px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 60px;
  position: relative;
  overflow: hidden;
}

.mouse .wheel {
  width: 4px;
  height: 10px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.7);
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  animation: mouse-wheel 2s ease infinite;
}

@keyframes mouse-wheel {
  0% {
    top: 7px;
    opacity: 1;
  }
  50% {
    top: 20px;
    opacity: 1;
  }
  100% {
    top: 20px;
    opacity: 0;
  }
}

.scroll-arrows {
  display: block;
  width: 5px;
  height: 5px;
  transform: rotate(45deg);
  border-right: 2px solid rgba(255, 255, 255, 0.7);
  border-bottom: 2px solid rgba(255, 255, 255, 0.7);
  margin: 0 0 3px 10px;
  width: 16px;
  height: 16px;
}

.scroll-arrows.unu,
.scroll-arrows.doi,
.scroll-arrows.trei {
  animation: mouse-scroll 1.5s infinite;
}

.scroll-arrows.doi {
  animation-delay: 0.2s;
}

.scroll-arrows.trei {
  animation-delay: 0.4s;
}

@keyframes mouse-scroll {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .scroll-down-container {
    display: none; /* Hide on mobile to prevent overlap */
  }
}

/* For RTL (Arabic) version */
html[dir="rtl"] .hero-social-icons {
  left: auto;
  right: 40px; /* Moves it to the right */
}

.hero-social-icons a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.2rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

.hero-social-icons a:hover {
  color: var(--primary-color);
  transform: scale(1.2);
}

/* --- About Section --- */
.about-section {
  background-color: #fff;
}
.about-content-creative {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 50px;
  margin-bottom: 60px;
}
.about-image-creative {
  flex: 1;
}
.about-image-creative img {
  width: 100%;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(44, 62, 80, 0.15);
}
.about-text-creative {
  flex: 1.2;
}
.about-text-creative p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 30px;
  line-height: 1.8;
}
.about-stats {
  display: flex;
  justify-content: space-around;
  gap: 20px;
  margin-top: 30px;
  text-align: center;
}
.stat-item h3 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 5px;
}
.stat-item p {
  font-size: 0.95rem;
  color: var(--secondary-color);
  font-weight: 500;
}
.core-values {
  margin-top: 50px;
  text-align: center;
}
.values-title {
  font-size: 1.8rem;
  color: var(--secondary-color);
  margin-bottom: 30px;
}
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.value-item {
  background-color: var(--light-grey-bg);
  padding: 20px;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--secondary-color);
  transition: background-color 0.3s, color 0.3s, transform 0.3s;
}
.value-item i {
  color: var(--primary-color);
  margin-right: 10px;
  font-size: 1.5rem;
  transition: color 0.3s;
}
html[dir="rtl"] .value-item i {
  margin-right: 0;
  margin-left: 10px;
}

.value-item:hover {
  background-color: var(--primary-color);
  color: #fff;
  transform: translateY(-5px);
}
.value-item:hover i {
  color: #fff;
}

/* --- Services Section (IMPROVED) --- */
.services-section {
  background-color: var(--light-grey-bg);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}
.service-card {
  background-color: #fff;
  padding: 40px 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 3px solid transparent;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--box-shadow-hover);
  border-color: var(--primary-color);
}
.service-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  line-height: 1;
  transition: color 0.3s ease;
}
.service-card h3 {
  color: var(--secondary-color);
  margin-bottom: 15px;
  font-size: 1.4rem;
  transition: color 0.3s ease;
}
.service-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.service-card:hover .service-icon,
.service-card:hover h3 {
  color: var(--accent-color);
}

/* --- Process Section --- */
.process-section {
  background-color: #fff;
}
.process-timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}
.process-timeline::after {
  content: "";
  position: absolute;
  width: 3px;
  background-color: var(--primary-color);
  opacity: 0.3;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1.5px;
}
html[dir="rtl"] .process-timeline::after {
  left: auto;
  right: 50%;
  margin-left: 0;
  margin-right: -1.5px;
}
.timeline-item {
  padding: 20px 40px;
  position: relative;
  background-color: inherit;
  width: 50%;
  margin-bottom: 30px;
}
.timeline-item:nth-child(odd) {
  left: 0;
}
html[dir="rtl"] .timeline-item:nth-child(odd) {
  left: auto;
  right: 0;
}
.timeline-item:nth-child(even) {
  left: 50%;
}
html[dir="rtl"] .timeline-item:nth-child(even) {
  left: auto;
  right: 50%;
}

.timeline-item .timeline-icon {
  position: absolute;
  width: 50px;
  height: 50px;
  right: -25px;
  background-color: var(--primary-color);
  color: #fff;
  top: 20px;
  border-radius: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px var(--primary-color);
}
.timeline-item:nth-child(even) .timeline-icon {
  left: -25px;
  right: auto;
}
html[dir="rtl"] .timeline-item:nth-child(odd) .timeline-icon {
  right: auto;
  left: -25px;
}
html[dir="rtl"] .timeline-item:nth-child(even) .timeline-icon {
  left: auto;
  right: -25px;
}

.timeline-content {
  padding: 20px 30px;
  background-color: var(--light-grey-bg);
  position: relative;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}
.timeline-content h3 {
  color: var(--secondary-color);
  margin-bottom: 10px;
  font-size: 1.3rem;
}
.timeline-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.timeline-item:nth-child(odd) .timeline-content::before {
  content: " ";
  height: 0;
  position: absolute;
  top: 28px;
  width: 0;
  z-index: 1;
  right: -15px;
  border: medium solid var(--light-grey-bg);
  border-width: 10px 0 10px 15px;
  border-color: transparent transparent transparent var(--light-grey-bg);
}
.timeline-item:nth-child(even) .timeline-content::before {
  content: " ";
  height: 0;
  position: absolute;
  top: 28px;
  width: 0;
  z-index: 1;
  left: -15px;
  border: medium solid var(--light-grey-bg);
  border-width: 10px 15px 10px 0;
  border-color: transparent var(--light-grey-bg) transparent transparent;
}
html[dir="rtl"] .timeline-item:nth-child(odd) .timeline-content::before {
  right: auto;
  left: -15px;
  border-width: 10px 15px 10px 0;
  border-color: transparent var(--light-grey-bg) transparent transparent;
}
html[dir="rtl"] .timeline-item:nth-child(even) .timeline-content::before {
  left: auto;
  right: -15px;
  border-width: 10px 0 10px 15px;
  border-color: transparent transparent transparent var(--light-grey-bg);
}

/* --- Contact Section --- */
.contact-section {
  background-color: var(--light-grey-bg);
}
.contact-content {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-start;
}
.contact-form-container {
  flex: 1.5;
  background-color: #fff;
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}
.contact-info {
  flex: 1;
  background-color: #fff;
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}
.form-group {
  position: relative;
  margin-bottom: 25px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px 10px 10px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  background-color: transparent;
  transition: border-color 0.3s;
}
.form-group label {
  position: absolute;
  top: 12px;
  left: 10px;
  color: #777;
  transition: all 0.2s ease-out;
  pointer-events: none;
  font-size: 1rem;
  background-color: #fff;
  padding: 0 5px;
}
html[dir="rtl"] .form-group label {
  left: auto;
  right: 10px;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}
.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
  top: -10px;
  font-size: 0.8rem;
  color: var(--primary-color);
}
.contact-info h3 {
  color: var(--primary-color);
  margin-bottom: 20px;
}
.contact-info p {
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
  color: var(--text-muted);
}
.contact-info p i {
  color: var(--primary-color);
  margin-right: 12px;
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  margin-top: 4px;
}
html[dir="rtl"] .contact-info p i {
  margin-right: 0;
  margin-left: 12px;
}
.contact-info a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s;
}
.contact-info a:hover {
  color: var(--primary-color);
}
.contact-info .tagline {
  font-style: italic;
  color: var(--accent-color);
  margin-top: 25px;
  font-weight: 500;
  text-align: center;
  border-top: 1px dashed #ddd;
  padding-top: 20px;
}

/* --- Footer --- */
.footer-creative {
  background-color: var(--dark-blue);
  color: rgba(255, 255, 255, 0.7);
  padding: 70px 0 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}
.footer-logo {
  height: 180px;
}
.footer-column h4 {
  color: #fff;
  margin-bottom: 20px;
  font-size: 1.2rem;
  position: relative;
  padding-bottom: 10px;
}
.footer-column h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
}
html[dir="rtl"] .footer-column h4::after {
  left: auto;
  right: 0;
}
.footer-column p {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 10px;
}
.footer-column ul {
  list-style: none;
  padding: 0;
}
.footer-column ul li a.nav-link-footer {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
  transition: color 0.3s, padding-left 0.3s;
}
html[dir="rtl"] .footer-column ul li a.nav-link-footer {
  transition: color 0.3s, padding-right 0.3s;
}
.footer-column ul li a.nav-link-footer:hover {
  color: var(--primary-color);
  padding-left: 5px;
}
html[dir="rtl"] .footer-column ul li a.nav-link-footer:hover {
  padding-left: 0;
  padding-right: 5px;
}
.footer-column a {
  color: rgba(255, 255, 255, 0.7);
}
.footer-column a:hover {
  color: var(--primary-color);
}

.footer-column i.fas {
  margin-right: 8px;
  color: var(--primary-color);
  width: 15px;
}
html[dir="rtl"] .footer-column i.fas {
  margin-right: 0;
  margin-left: 8px;
}

.social-links-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  margin-right: 10px;
  transition: background-color 0.3s, color 0.3s;
  font-size: 1.1rem;
}
html[dir="rtl"] .social-links-footer a {
  margin-right: 0;
  margin-left: 10px;
}
.social-links-footer a:hover {
  background-color: var(--primary-color);
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 25px 0;
  text-align: center;
  font-size: 0.9rem;
}

/* --- Scroll Top Button --- */
#scrollTopBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  border: none;
  outline: none;
  background-color: var(--primary-color);
  color: white;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 1.2rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s, opacity 0.3s, transform 0.3s;
  opacity: 0;
  transform: translateY(100px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#scrollTopBtn.show {
  opacity: 1;
  transform: translateY(0);
}
#scrollTopBtn:hover {
  background-color: var(--accent-color);
}

/* --- Responsive Media Queries --- */

@media (max-width: 992px) {
  .container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
  }

  .hero-content h1 {
    font-size: 3.2rem;
  }

  #header nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: var(--header-height-scroll);
    left: 0;
    background-color: #fff;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    border-top: 1px solid #eee;
  }
  #header nav ul.active {
    display: flex;
  }
  #header nav ul li {
    margin: 10px 20px;
    text-align: center;
    width: auto;
  }
  html[dir="rtl"] #header nav ul li {
    margin: 10px 20px;
  }
  #header nav ul li a::after {
    display: none;
  }
  #header nav ul li a,
  #header.scrolled nav ul li a,
  #header:not(.scrolled) nav ul li a {
    color: var(--secondary-color);
  }
  #header nav ul li a:hover,
  #header nav ul li a.active {
    color: var(--primary-color);
  }

  #header:not(.scrolled) nav ul {
    top: var(--header-height-top);
  }

  #header .menu-toggle {
    display: block;
  }
  .about-content-creative {
    gap: 30px;
  }
  .about-text-creative,
  .about-image-creative {
    min-width: 100%;
  }
  .values-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 768px) {
  .contact-info,
  .contact-form-container {
    padding: 40px 20px;
  }
  h1 {
    font-size: 2.5rem;
  }
  .hero-content h1 {
    font-size: 2.8rem;
  }
  .section-title h2 {
    font-size: 2.2rem;
  }
  h3 {
    font-size: 1.4rem;
  }
  section {
    padding: 60px 0;
  }
  .btn {
    padding: 10px 25px;
    font-size: 0.95rem;
  }

  .process-timeline::after {
    left: 25px !important;
    margin-left: 0 !important;
  }
  html[dir="rtl"] .process-timeline::after {
    left: auto !important;
    right: 25px !important;
    margin-right: 0 !important;
  }
  .timeline-item {
    width: 100% !important;
    padding-left: 70px !important;
    padding-right: 20px !important;
  }
  html[dir="rtl"] .timeline-item {
    padding-left: 20px !important;
    padding-right: 70px !important;
  }
  .timeline-item:nth-child(even) {
    left: 0% !important;
  }
  html[dir="rtl"] .timeline-item:nth-child(even) {
    left: auto !important;
    right: 0% !important;
  }
  .timeline-item .timeline-icon {
    left: 0px !important;
  }
  html[dir="rtl"] .timeline-item .timeline-icon {
    left: auto !important;
    right: 0px !important;
  }

  .timeline-item:nth-child(odd) .timeline-content::before,
  .timeline-item:nth-child(even) .timeline-content::before {
    left: -15px !important;
    border-width: 10px 15px 10px 0 !important;
    border-color: transparent var(--light-grey-bg) transparent transparent !important;
  }
  html[dir="rtl"] .timeline-item:nth-child(odd) .timeline-content::before,
  html[dir="rtl"] .timeline-item:nth-child(even) .timeline-content::before {
    left: auto !important;
    right: -15px !important;
    border-width: 10px 0 10px 15px !important;
    border-color: transparent transparent transparent var(--light-grey-bg) !important;
  }

  .services-grid {
    grid-template-columns: 1fr !important;
  }
  .contact-content {
    flex-direction: column !important;
  }
  .contact-form-container,
  .contact-info {
    width: 100% !important;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2.2rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
  .section-title h2 {
    font-size: 1.8rem;
  }
  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  .about-stats {
    flex-direction: column;
    gap: 30px;
  }
  .stat-item h3 {
    font-size: 2rem;
  }
  .values-grid {
    grid-template-columns: 1fr;
  }
  .service-card,
  .project-card-creative,
  .contact-form-container,
  .contact-info {
    padding: 25px 20px;
  }
  /* .timeline-content {
    padding: 15px 20px;
  } */
}
/* --- BACKGROUND PATTERN FOR SECTIONS --- */
.section-with-bg-pattern {
  position: relative; /* ضروري لعمل الـ pseudo-element */
  z-index: 1;
}

.section-with-bg-pattern::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-image: radial-gradient(var(--text-muted) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.6;

  /* الخيار الثاني: نمط مربعات متداخلة (Grid Lines) */

  background-color: #ffffff;
  background-image: linear-gradient(
      var(--secondary-color) 0.5px,
      transparent 0.5px
    ),
    linear-gradient(to right, var(--secondary-color) 0.5px, #ffffff 0.5px);
  background-size: 40px 40px;
  opacity: 0.05;

  /* الخيار الثالث: نمط مربعات مائلة (Diagonal Lines) */
  /*
    background: repeating-linear-gradient(
        45deg,
        #f0f0f0,
        #f0f0f0 5px,
        #ffffff 5px,
        #ffffff 25px
    );
    opacity: 0.2;
    */
}

/* ========= PROJECTS FULLSCREEN SLIDER (CCC Inspired - FINAL) ========= */
.projects-fullscreen-slider {
  padding: 0;
  height: 100vh; /* Takes full viewport height */
  background-color: #111; /* Dark background as a fallback */
  position: relative;
  overflow: hidden;
}

.projects-slider-container {
  height: 100%;
  position: relative;
}

/* --- Main Projects Swiper --- */
.main-projects-swiper {
  width: 100%;
  height: 100%;
}

.project-slide {
  position: relative;
  overflow: hidden;
  color: #fff;
}

.project-slide-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1), filter 0.8s ease;
  filter: brightness(0.7) saturate(0.9);
  transform: scale(1.1); /* Start slightly zoomed in */
}

.swiper-slide-active .project-slide-bg {
  transform: scale(1); /* Zoom out to normal scale for active slide */
}

.project-slide::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.6) 100%
  );
  z-index: 1;
}

.project-slide-content {
  position: absolute;
  top: 120px; /* Space from bottom */
  left: 5vw;
  right: 5vw;
  z-index: 2;
}

.project-info h3 {
  font-size: 2.5rem;
  color: #fff;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  font-weight: 700;
}

.project-info p {
  font-size: 1rem;
  opacity: 0.8;
  margin: 5px 0 0 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.project-slide-cta {
  color: #fff;
  font-weight: 600;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 5px;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.project-slide-cta:hover {
  color: var(--primary-color);
}

/* --- Thumbs / Categories Swiper --- */
.thumbs-projects-swiper {
  position: absolute;
  left: 5vw;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  height: 300px;
  z-index: 10;
}

html[dir="rtl"] .thumbs-projects-swiper {
  left: auto;
  right: 5vw;
}

.thumb-slide {
  writing-mode: vertical-lr; /* Vertical text */
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 10px 0;
  height: auto !important; /* Important for Swiper vertical auto height */
  display: flex;
  align-items: center;
  justify-content: center;
}

html[dir="rtl"] .thumb-slide {
  writing-mode: vertical-rl;
}

.thumb-slide.swiper-slide-thumb-active {
  color: #fff;
}

/* --- Footer Controls --- */
.projects-slider-footer {
  position: absolute;
  bottom: 40px;
  left: 5vw;
  right: 5vw;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.projects-slider-nav {
  display: flex;
  gap: 10px;
}

.projects-slider-nav div {
  width: 45px;
  height: 45px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: #fff;
}

.projects-slider-nav div.swiper-button-disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.projects-slider-nav div:not(.swiper-button-disabled):hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.projects-slider-nav div i {
  font-size: 0.9rem;
}

.view-all-projects-btn {
  font-size: 1rem;
  padding: 12px 30px;
}

/* Responsive for the fullscreen slider */
@media (max-width: 992px) {
  .project-info h3 {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .project-info h3 {
    font-size: 1.8rem;
  }
  .thumbs-projects-swiper {
    display: none; /* Hide vertical text on mobile for more space */
  }
  .project-slide-content {
    bottom: 100px;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .projects-slider-footer {
    flex-direction: column;
    align-items: center;
    gap: 30px;
    bottom: 30px;
  }
}
/* =================================== */
/* ===      CUSTOM SCROLLBAR      ==== */
/* =================================== */

/* For WebKit browsers (Chrome, Safari, Edge, Opera) */
::-webkit-scrollbar {
  width: 12px; /* عرض شريط التمرير */
  background-color: var(--light-bg-color); /* لون خلفية الشريط */
}

::-webkit-scrollbar-thumb {
  background-color: var(--primary-color); /* لون المقبض (الجزء المتحرك) */
  border-radius: 10px; /* جعل الحواف دائرية */
  border: 3px solid var(--light-bg-color); /* إضافة هامش داخلي حول المقبض */
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent-color); /* تغيير لون المقبض عند مرور الماوس */
}

/* For Firefox */
/* Firefox supports a newer standard */
html {
  scrollbar-width: thin; /* يمكن أن تكون 'auto', 'thin', أو 'none' */
  scrollbar-color: var(--primary-color) var(--light-bg-color); /* (لون المقبض) (لون الخلفية) */
}
