* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #f4f6fb;
  color: #333;
  line-height: 1.6;
  padding-top: 90px;
  overflow-x: hidden;
  min-width: 320px;
  -webkit-text-size-adjust: 100%;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

p {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Prevent long words from breaking layout */
.service-card p,
.product-card p,
.about-left p,
.details-box p,
.choose-list li,
.contact-item p {
  overflow-wrap: break-word;
  word-wrap: break-word;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  -moz-hyphens: auto;
  hyphens: auto;
}

/* Ensure cards handle long text properly */
.service-card,
.product-card {
  overflow: hidden;
}

/* Fix for long English words in Arabic */
body.rtl-mode .service-card p,
body.rtl-mode .product-card p {
  text-align: center;
  direction: rtl;
  unicode-bidi: embed;
}



/* HEADER */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 95px;
  background: #0d2d63;
  border-bottom: 2px solid #f5b400;
  z-index: 999;
  display: flex;
  align-items: center;
}

.header-container {
  width: 90%;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* HEADER SCROLL EFFECT */
header.scrolled {
  background: linear-gradient(to right, #0b1f3a 0%, #102a4d 50%, #0b1f3a 100%);
  height: 80px;
  border-bottom: 2px solid #f4b400;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.lang-dropdown {
  position: relative;
  display: inline-block;
  font-family: Arial, sans-serif;
}

.lang-btn {
  padding: 8px 14px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(86, 11, 11, 0.1);
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #f5b400;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.lang-btn .fi {
  font-size: 18px;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.lang-btn:hover .fi {
  transform: scale(1.15);
}

.lang-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  border: 1px solid #ccc;
  z-index: 100;
  min-width: 120px;
}

.lang-menu .lang-item {
  padding: 5px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.lang-menu .lang-item:hover {
  background: #f0f0f0;
}

.lang-dropdown.show .lang-menu {
  display: block;
}

.selected-lang {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 8px 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: #fff;
  cursor: pointer;
  transition: 0.3s;
}

.selected-lang:hover {
  border-color: #f5b400;
  color: #f5b400;
}

.arrow {
  transition: 0.3s;
  font-size: 12px;
}

.lang-dropdown.active .arrow {
  transform: rotate(180deg);
}

.lang-options {
  position: absolute;
  top: 50px;
  width: 100%;
  background: #0d2d63;
  border-radius: 10px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: 0.3s ease;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  z-index: 999;
}

.lang-dropdown.active .lang-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-options div {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  transition: 0.3s;
  cursor: pointer;
}

.lang-options div:hover {
  background: #f5b400;
  color: #0d2d63;
}

/* LOGO */
.logo {
  padding: 0px 20px;
  margin-top: -5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo img {
  height: 105px;
  width: 160px;
  object-fit: contain;
  display: block;
}

/* NAV */
.nav {
  display: flex;
  gap: 25px;
  flex-wrap: nowrap;
  align-items: center;
}

.nav a {
  text-decoration: none;
  color: white;
  font-size: 18px;
  font-weight: 550;
  opacity: 0.9;
  transition: 0.4s;
  padding: 10px 15px;
  border-radius: 6px;
  white-space: nowrap;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f5b400;
  opacity: 1;
}

.nav a.active {
  color: #f5b400;
}

/* HAMBURGER MENU */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
  margin-left: auto;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: white;
  transition: 0.3s;
  border-radius: 2px;
}

/* MOBILE NAV */
@media(max-width: 768px) {
  .hamburger {
    display: flex;
    z-index: 1001;
  }

  /* Hamburger animation to X */
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }

  .nav {
    display: none;
    position: fixed;
    top: 95px;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 95px);
    background: #0d2d63;
    flex-direction: column;
    padding: 15px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    z-index: 998;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav.active {
    display: flex;
  }

  .nav a {
    margin-bottom: 5px;
    width: 100%;
    padding: 12px 15px;
    text-align: center;
  }

  /* Language dropdown in mobile nav */
  .lang-dropdown-wrapper {
    margin: 10px auto;
    width: 100%;
    max-width: 200px;
  }

  .lang-dropdown-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 15px;
  }

  .lang-dropdown-menu {
    position: relative;
    width: 100%;
    margin-top: 5px;
    transform: none;
  }

  .lang-dropdown-menu.show {
    transform: none;
  }
}

/* SCROLL TO TOP BUTTON */
#scrollTop {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 45px;
  height: 45px;
  border: none;
  border-radius: 50%;
  background: #f5b400;
  color: #0d2d63;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 999;
  box-shadow: 0px 5px 20px rgba(0,0,0,0.25);
}

#scrollTop.show {
  opacity: 1;
  visibility: visible;
}

#scrollTop:hover {
  background: white;
  transform: translateY(-5px);
}

/* HERO */
.hero {
  height: 520px;
  width: 100%;
  background: url("../img/hero.png") center/cover no-repeat;
  position: relative;
  display: flex;
  align-items: center;
  padding-top: 90px;
  background-position: center;
  background-size: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.1);
  z-index: 1;
}

.hero-content {
  transform: translateY(-40px);
  position: relative;
  z-index: 2;
  padding-left: 90px;
  color: white;
  max-width: 700px;
}

.hero-content h1,
.hero-content p {
  text-shadow: 0px 2px 10px rgba(0,0,0,0.6);
}

.hero-content h1 {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.hero-sub {
  margin-top: 40px;
  font-size: 24px;
  font-weight: bold;
  opacity: 0.85;
}

.hero-subtitle span {
  color: #ffd700;
  font-weight: 900;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.9);
}

.hero-services {
  margin-top: 10px;
  font-size: 24px;
  font-weight: bold;
  opacity: 0.85;
}

.hero-services span {
  margin: 0 6px;
  opacity: 0.8;
}

/* BUTTON */
.btn {
  display: inline-block;
  margin-top: 20px;
  background: #0d2d63;
  color: white;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  transition: 0.3s;
}

.btn span {
  margin-left: 8px;
  font-size: 16px;
}

.btn:hover {
  background: #093a88;
}

/* FEATURES */
.features {
  background: #e9eef7;
  padding: 25px 0;
}

.features-container {
  width: 85%;
  margin: auto;
  background: white;
  border-radius: 6px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 18px;
  box-shadow: 0px 2px 12px rgba(0,0,0,0.08);
}

.feature-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-circle {
  width: 50px;
  height: 50px;
  background: #0d2d63;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-circle i {
  font-size: 20px;
  color: #f5b400;
}

.feature-text h3 {
  font-size: 16px;
  color: #0d2d63;
  font-weight: 700;
}

.feature-text p {
  font-size: 13px;
  color: #555;
}

.divider {
  height: 45px;
  width: 1px;
  background: #d6dce8;
}

/* ABOUT */
.about {
  display: flex;
  justify-content: center;  /* أفقياً */
  align-items: center;      /* عمودياً */
  text-align: center;       /* كل النصوص في المنتصف */
  padding: 80px 20px;
  background: #f7f9fc;
  flex-direction: column;
}

.about-container {
  width: 85%;
  margin: auto;
  display: flex;
  gap: 40px;
  align-items: center;
}

.about-left {
  flex: 1;
}

.about-left h2 {
  font-size: 32px;
  font-weight: 800;
  color: #0d2d63;
}

.about-left h4 {
  margin-top: 12px;
  font-size: 16px;
  color: #0d2d63;
  font-weight: 700;
}

.about-left p {
  margin-top: 15px;
  color: #000000;
  font-size: 14px;
  line-height: 1.7;
  max-width: 600px; /* ✅ FIXED: كان 100px وده اللي كان بيكسر النص */
  word-break: normal;
  overflow-wrap: break-word;
}

.about-right {
  flex: 1.3;
}

.about-right img {
  width: 100%;
  border-radius: 6px;
  box-shadow: 0px 2px 14px rgba(0,0,0,0.12);
}

/* SERVICES */
.services {
  padding: 80px 0;
  background: #ffffff;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 45px;
  justify-content: center;
}

@media(max-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(max-width: 600px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

.service-card {
  background: #f7f9fc;
  border: 1px solid #e3e7f0;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: 0.3s;
  box-shadow: 0px 3px 15px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.service-card img.product-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0px 4px 12px rgba(0,0,0,0.1);
  margin-bottom: 15px;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: #f5b400;
}

.service-icon {
  width: 70px;
  height: 70px;
  background: #0d2d63;
  border-radius: 50%;
  margin: 0 auto 18px auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.service-icon i {
  font-size: 28px;
  color: #f5b400;
}

.service-icon.product-icon {
  width: 100%;
  height: auto;
  background: none;
  border-radius: 0;
  margin: 0;
  display: block;
}

.service-card h3 {
  font-size: 20px;
  font-weight: 800;
  color: #0d2d63;
  margin-bottom: 15px;
}

.service-card p {
  font-size: 14px;
  color: #000000;
  line-height: 1.7;
  flex-grow: 1;
}

/* PRODUCTS */
.products {
  padding: 80px 0;
  background: #f7f9fc;
}

.products .section-title {
  text-align: center;
  margin-bottom: 40px;
}

.products .section-title h2 {
  font-size: 34px;
  font-weight: 800;
  color: #0d2d63;
}

.products .section-title p {
  margin-top: 10px;
  font-size: 15px;
  color: #000000;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.product-card {
  background: white;
  padding: 25px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid #e3e7f0;
  box-shadow: 0px 3px 15px rgba(0,0,0,0.08);
  transition: 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-8px);
  border-color: #f5b400;
}

.product-card img.product-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
}

.product-card h3 {
  font-size: 20px;
  font-weight: 800;
  color: #0d2d63;
  margin-bottom: 15px;
}

.product-card p {
  font-size: 14px;
  color: #000000;
  line-height: 1.6;
  flex-grow: 1;
}

.back-button {
  text-align: center;
  margin-top: 40px;
}

/* PAGE TITLE */
.page-title {
   text-align: center;
  padding-top: 120px;
  padding-bottom: 50px;
  background: #0d2d63;
  color: white;
}

.page-title h1 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 15px;
  text-align: center; /* توسيط حتى في العربية */
}

.page-title p {
  font-size: 18px;
  opacity: 0.9;
  text-align: center; /* توسيط النص */  
}

/* SECTION TITLE */
.section-title {
  text-align: center;
  margin-bottom: 45px;
}

.section-title h2 {
  font-size: 40px;
  font-weight: 900;
  color: #0d2d63;
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}

.section-title h2::after {
  content: "";
  width: 80px;
  height: 4px;
  background: #f5b400;
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  border-radius: 5px;
}

.section-title p {
  margin-top: 15px;
  font-size: 15px;
  color: #000000;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* DETAILS BOX */
.details-box {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0px 3px 16px rgba(0,0,0,0.1);
  border: 1px solid #e4e8f1;
}

.details-box h2 {
  color: #0d2d63;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 15px;
}

.details-box ul {
  list-style: none;
  margin-bottom: 25px;
}

.details-box ul li {
  padding-left: 20px;
  margin-bottom: 12px;
  position: relative;
  font-size: 14px;
  color: #444;
}

.details-box ul li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: #f5b400;
  font-weight: bold;
}

/* FOOTER SECTION */
.choose-contact {
  background: linear-gradient(135deg, #0d2d63, #123c7a);
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}

.choose-contact::before,
.choose-contact::after {
  content: "";
  position: absolute;
  top: 0;
  left: -200px;
  width: 700px;
  height: 100%;
  background: rgba(255, 255, 255, 0.04);
  transform: skewX(-20deg);
}

.choose-contact::after {
  left: 250px;
  background: rgba(255, 255, 255, 0.02);
}

.choose-contact-container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  position: relative;
  z-index: 2;
}

.choose-box h2,
.contact-box h2 {
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
  display: inline-block; /* مهم */
}

.choose-box h2::after,
.contact-box h2::after {
  content: "";
  width: 55px;
  height: 3px;
  background: #f5b400;
  position: absolute;
  bottom: 0;
  border-radius: 5px;
  left: 0; /* default */
}

/* RTL Fix */
.rtl-mode .choose-box h2::after,
.rtl-mode .contact-box h2::after {
  left: auto;
  right: 0;
}



.choose-list {
  list-style: none;
}

.choose-list li {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.choose-list li::before {
  content: "✔";
  color: #f5b400;
  font-weight: bold;
  font-size: 16px;
}

.contact-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 25px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.contact-item .icon {
  font-size: 18px;
  color: #f5b400;
  width: 30px;
  text-align: center;
}

.contact-item p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}

.contact-item strong {
  color: #fff;
}

/* CONTACT FORM */
#contactForm {
  margin-bottom: 20px;
}

#contactForm input,
#contactForm textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 14px;
}

#contactForm input::placeholder,
#contactForm textarea::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

#contactForm textarea {
  height: 80px;
  resize: vertical;
}

#contactForm button {
  background: #f5b400;
  color: #0d2d63;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
}

#contactForm button:hover {
  background: #e6a400;
}

#formMessage {
  margin-top: 10px;
  font-size: 14px;
}

/* FOOTER */
.footer {
  background: #0d2d63;
  padding: 20px 0;
  color: white;
  font-size: 14px;
}

/* RESPONSIVE FIXES */
@media(max-width: 1000px) {
  .hero-content {
    padding-left: 40px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-container {
    flex-direction: column;
  }

  .about-left p {
    max-width: 100%;
  }
}

@media(max-width: 900px) {
  .choose-contact-container {
    grid-template-columns: 1fr;
    gap: 35px;
  }
}

@media(max-width: 768px) {
  .logo img {
    max-height: 60px;
  }
}

@media(max-width: 600px) {
  .hero-content h1 {
    font-size: 32px;
  }

  .section-title h2 {
    font-size: 32px;
  }

  .about-left h2 {
    font-size: 28px;
  }

  .service-card h3 {
    font-size: 18px;
  }

  .btn {
    padding: 10px 18px;
    font-size: 13px;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .logo img {
    max-height: 50px;
  }
}

@media(max-width: 480px) {
  .hero-content {
    padding-left: 20px;
  }

  .features-container {
    flex-direction: column;
    gap: 20px;
  }

  .about-container {
    flex-direction: column;
  }

  .choose-contact-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* CTA Spotlight Effect */
.cta-box {
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  inset: -200%;
  background: radial-gradient(circle, rgba(245, 180, 4, 0.3) 0%, transparent 70%);
  background-position: 0% 0%;
  animation: spotlight 15s infinite;
  opacity: 0.25;
  pointer-events: none;
}

@keyframes spotlight {
  0%, 10% { background-position: 0% 0%; }
  10%, 30% { background-position: 100% 0%; }
  30%, 50% { background-position: 100% 100%; }
  50%, 70% { background-position: 0% 100%; }
  70%, 100% { background-position: 0% 0%; }
}

/* RTL Support for Who We Are Section */
body.rtl-mode .about-intro {
  flex-direction: row-reverse;
}

body.rtl-mode .about-intro-text {
  text-align: right;
}

body.rtl-mode .about-intro-image img {
  margin-left: 0;
  margin-right: 0;
}

/* Arabic text direction only */
.rtl-mode [data-i18n],
.rtl-mode [data-i18n-placeholder] {
  direction: rtl;
}


body.rtl-mode {
  direction: rtl;
  text-align: right;
}

body.rtl-mode header,
body.rtl-mode .header-container,
body.rtl-mode .about-container,
body.rtl-mode .features-container,
body.rtl-mode .choose-contact-container {
  direction: rtl;
}

body.rtl-mode .nav {
  flex-direction: row-reverse;
}

/* HERO - اجعل النص العربي يظهر على الشمال */
body.rtl-mode .hero-content {
  direction: rtl;      /* يحافظ على الكتابة العربية */
  text-align: left;    /* يظهر النص على الشمال */
  padding-left: 20px;  /* المسافة من الشمال */
  padding-right: 1000px;    /* إزالة المسافة من اليمين */
  max-width: 1500px;    /* حجم النص */
}

body.rtl-mode .hero-content h1 {
  font-size: 60px;     
  line-height: 1.2;    
}
  
body.rtl-mode .hero-content p {
  font-size: 30px;     /* تكبير النصوص الفرعية */
}

body.rtl-mode .btn span {
  margin-left: 0;
  margin-right: 8px;
}


.rtl-mode .section-title p,
.rtl-mode .section-title h2 {
  text-align: center !important;
  direction: rtl;
}

/* Fix yellow line position in Arabic */
.rtl-mode .choose-box h2::after,
.rtl-mode .contact-box h2::after {
  left: auto;
  right: 0;
}

/* فقط ضبط h1 في النسخة العربية دون التأثير على باقي المحتوى */
.rtl-mode h1.page-title {
    text-align: center;  /* يثبت العنوان في النص */
    direction: rtl;      /* اتجاه الكتابة عربي */
}


/* Language Switcher Style */
.lang-switcher {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  transition: 0.3s;
  height: 40px;
}

/* Hover */
.lang-switcher:hover {
  border-color: #f5b400;
  color: #f5b400;
}

/* Dropdown options */
.lang-switcher option {
  background: #0d2d63;
  color: white;
  font-weight: 600;
}

/* RTL Fix */
.rtl-mode .lang-switcher {
  direction: rtl;
  text-align: right;
}

/* إصلاح ظهور أرقام الهاتف في اللغة العربية */
body.rtl-mode .contact-item p {
    unicode-bidi: embed;   /* منع تأثير الاتجاه العام للصفحة على الأرقام */
    text-align: left;      /* تأكد من محاذاة النص لليسار */
}

body.rtl-mode .page-title {
  text-align: center !important;
}

body.rtl-mode .page-title h1,
body.rtl-mode .page-title p {
  text-align: center !important;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   ARABIC RTL MOBILE FIXES (320px - 576px)
   Only affects Arabic language on mobile
   ============================================ */

@media (max-width: 576px) {
  /* Base RTL fixes for mobile Arabic */
  body.rtl-mode {
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
  }

  /* Header fixes */
  body.rtl-mode .header-container {
    flex-direction: row-reverse;
    padding: 0 10px;
  }

  body.rtl-mode .logo {
    padding: 0 10px;
  }

  body.rtl-mode .hamburger {
    margin-left: 0;
  }

  /* Mobile nav menu */
  body.rtl-mode .nav {
    left: auto;
    right: 0;
    text-align: right;
  }

  body.rtl-mode .nav a {
    text-align: right;
    padding: 12px 15px;
  }

  /* Hero section */
  body.rtl-mode .hero-content {
    direction: rtl;
    text-align: right;
    padding-left: 20px;
    padding-right: 20px;
    max-width: 100%;
  }

  body.rtl-mode .hero-content h1 {
    font-size: 26px;
    line-height: 1.3;
    text-align: right;
  }

  body.rtl-mode .hero-sub,
  body.rtl-mode .hero-services {
    font-size: 16px;
    text-align: right;
    direction: rtl;
  }

  body.rtl-mode .btn span {
    margin-right: 8px;
    margin-left: 0;
  }

  /* Features section */
  body.rtl-mode .features-container {
    flex-direction: column;
    padding: 15px;
    gap: 15px;
  }

  body.rtl-mode .feature-box {
    width: 100%;
    justify-content: flex-start;
  }

  body.rtl-mode .divider {
    display: none;
  }

  /* About section */
  body.rtl-mode .about-container {
    flex-direction: column;
    gap: 25px;
    padding: 0 15px;
  }

  body.rtl-mode .about-left,
  body.rtl-mode .about-right {
    width: 100%;
    text-align: right;
  }

  body.rtl-mode .about-left h2,
  body.rtl-mode .about-left h4,
  body.rtl-mode .about-left p {
    text-align: right;
    max-width: 100%;
  }

  /* Services grid */
  body.rtl-mode .services-grid {
    grid-template-columns: 1fr;
    padding: 0 15px;
    gap: 15px;
  }

  body.rtl-mode .service-card {
    padding: 20px 15px;
    text-align: center;
  }

  body.rtl-mode .service-card h3,
  body.rtl-mode .service-card p {
    text-align: center;
    direction: rtl;
  }

  /* Products grid */
  body.rtl-mode .products-grid {
    grid-template-columns: 1fr;
    padding: 0 15px;
    gap: 15px;
  }

  body.rtl-mode .product-card {
    padding: 15px;
  }

  body.rtl-mode .product-card h3,
  body.rtl-mode .product-card p {
    text-align: center;
    direction: rtl;
  }

  /* Page title */
  body.rtl-mode .page-title {
    padding: 100px 15px 40px;
  }

  body.rtl-mode .page-title h1 {
    font-size: 28px;
  }

  body.rtl-mode .page-title p {
    font-size: 14px;
    text-align: center;
  }

  /* Section title */
  body.rtl-mode .section-title {
    padding: 0 15px;
  }

  body.rtl-mode .section-title h2 {
    font-size: 26px;
  }

  body.rtl-mode .section-title p {
    text-align: center;
    padding: 0 10px;
  }

  /* Details box */
  body.rtl-mode .details-box {
    padding: 20px 15px;
    margin: 0 15px;
  }

  body.rtl-mode .details-box h2,
  body.rtl-mode .details-box ul li {
    text-align: right;
    direction: rtl;
  }

  body.rtl-mode .details-box ul li {
    padding-left: 0;
    padding-right: 20px;
  }

  body.rtl-mode .details-box ul li::before {
    left: auto;
    right: 0;
  }

  /* Choose & Contact section */
  body.rtl-mode .choose-contact-container {
    grid-template-columns: 1fr;
    padding: 0 15px;
    gap: 25px;
  }

  body.rtl-mode .choose-box,
  body.rtl-mode .contact-box {
    text-align: right;
  }

  body.rtl-mode .choose-box h2::after,
  body.rtl-mode .contact-box h2::after {
    left: auto;
    right: 0;
  }

  body.rtl-mode .choose-list li {
    flex-direction: row-reverse;
    text-align: right;
  }

  body.rtl-mode .choose-list li::before {
    margin-left: 10px;
    margin-right: 0;
  }

  body.rtl-mode .contact-item {
    flex-direction: row-reverse;
  }

  body.rtl-mode .contact-item .icon {
    text-align: center;
  }

  /* Contact form */
  body.rtl-mode #contactForm input,
  body.rtl-mode #contactForm textarea {
    text-align: right;
    direction: rtl;
  }

  body.rtl-mode #contactForm input::placeholder,
  body.rtl-mode #contactForm textarea::placeholder {
    text-align: right;
    direction: rtl;
  }

  /* Footer */
  body.rtl-mode .footer {
    padding: 15px;
    text-align: center;
  }

  /* Buttons - touch-friendly sizing */
  body.rtl-mode .btn {
    min-height: 44px;
    min-width: 120px;
    padding: 12px 20px;
    font-size: 14px;
    text-align: center;
    touch-action: manipulation;
  }

  body.rtl-mode #scrollTop {
    left: 25px;
    right: auto;
  }

  /* Language switcher */
  body.rtl-mode .lang-switcher {
    direction: rtl;
    text-align: center;
    min-width: 80px;
    height: 40px;
    padding: 8px 10px;
  }

  body.rtl-mode .lang-dropdown {
    width: auto;
  }

  /* Images and icons */
  body.rtl-mode .service-icon,
  body.rtl-mode .product-icon {
    margin: 0 auto 15px;
  }

  body.rtl-mode .about-right img,
  body.rtl-mode .product-card img,
  body.rtl-mode .service-card img.product-image {
    width: 100%;
    height: auto;
    max-width: 100%;
  }

  /* Grid gap fixes */
  body.rtl-mode .services-grid,
  body.rtl-mode .products-grid {
    margin-left: 0;
    margin-right: 0;
  }
}

/* Fix language switcher visibility in Arabic mobile */
@media (max-width: 768px) {

  body.rtl-mode .nav {
    flex-direction: column;
    align-items: stretch;
  }

  body.rtl-mode #languageSwitcher {
    display: block;
    width: 100%;
    margin-top: 10px;
    position: relative;
    z-index: 1000;
  }

}

/* ============================================
   TABLET RESPONSIVE (577px - 900px)
   Works for all languages
   ============================================ */

@media (min-width: 577px) and (max-width: 900px) {
  /* Header */
  .header-container {
    width: 95%;
    padding: 0 10px;
  }
  
  .logo img {
    max-height: 65px;
    width: 130px;
  }
  
  /* Hero */
  .hero {
    height: 400px;
    padding-top: 100px;
  }
  
  .hero-content {
    padding-left: 40px;
    max-width: 600px;
  }
  
  .hero-content h1 {
    font-size: 38px;
  }
  
  .hero-sub {
    font-size: 18px;
    margin-top: 25px;
  }
  
  .hero-services {
    font-size: 16px;
  }
  
  /* Features */
  .features-container {
    width: 95%;
    padding: 15px;
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .feature-box {
    flex: 1 1 45%;
    justify-content: center;
  }
  
  .divider {
    display: none;
  }
  
  /* About */
  .about {
    padding: 50px 15px;
  }
  
  .about-container {
    width: 95%;
    gap: 30px;
  }
  
  .about-left h2 {
    font-size: 28px;
  }
  
  .about-left p {
    font-size: 13px;
  }
  
  /* Services */
  .services {
    padding: 50px 15px;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 30px;
  }
  
  .service-card {
    padding: 20px 15px;
  }
  
  .service-card h3 {
    font-size: 16px;
  }
  
  .service-card p {
    font-size: 13px;
  }
  
  /* Products */
  .products {
    padding: 50px 15px;
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .product-card {
    padding: 15px;
  }
  
  .product-card h3 {
    font-size: 16px;
  }
  
  .product-card p {
    font-size: 13px;
  }
  
  /* Page Title */
  .page-title {
    padding: 100px 20px 35px;
  }
  
  .page-title h1 {
    font-size: 32px;
  }
  
  .page-title p {
    font-size: 15px;
  }
  
  /* Section Title */
  .section-title h2 {
    font-size: 28px;
  }
  
  .section-title p {
    font-size: 14px;
  }
  
  /* Choose & Contact */
  .choose-contact {
    padding: 40px 15px;
  }
  
  .choose-contact-container {
    width: 95%;
    gap: 30px;
  }
  
  .choose-box h2,
  .contact-box h2 {
    font-size: 22px;
  }
  
  /* Details Box */
  .details-box {
    padding: 20px;
    margin: 0 15px;
  }
  
  /* Footer */
  .footer {
    padding: 15px;
    font-size: 12px;
  }
}

/* ============================================
   MOBILE RESPONSIVE (320px - 576px)
   Works for all languages
   ============================================ */

@media (max-width: 576px) {
  /* Base */
  body {
    padding-top: 80px;
    min-width: 320px;
  }
  
  /* Header */
  header {
    height: 80px;
  }
  
  .header-container {
    width: 95%;
    padding: 0 10px;
  }
  
  .logo img {
    max-height: 50px;
    width: 110px;
  }
  
  /* Hamburger */
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
  }
  
  .hamburger span {
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
  }
  
  /* Mobile Nav */
  .nav {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: #0d2d63;
    flex-direction: column;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 998;
  }
  
  .nav.active {
    display: flex;
  }
  
  .nav a {
    padding: 12px 15px;
    font-size: 16px;
    width: 100%;
    text-align: center;
    border-radius: 4px;
  }
  
  .nav a:hover {
    background: rgba(255,255,255,0.1);
  }
  
  /* Hero */
  .hero {
    height: 350px;
    padding-top: 80px;
  }
  
  .hero-content {
    padding: 0 20px;
    max-width: 100%;
  }
  
  .hero-content h1 {
    font-size: 26px;
    line-height: 1.2;
  }
  
  .hero-sub {
    font-size: 14px;
    margin-top: 15px;
    opacity: 0.9;
  }
  
  .hero-services {
    font-size: 12px;
    margin-top: 8px;
  }
  
  .btn {
    padding: 10px 16px;
    font-size: 12px;
    margin-top: 15px;
  }
  
  /* Features */
  .features {
    padding: 20px 0;
  }
  
  .features-container {
    width: 95%;
    padding: 15px 10px;
    flex-direction: column;
    gap: 15px;
  }
  
  .feature-box {
    width: 100%;
    justify-content: flex-start;
  }
  
  .icon-circle {
    width: 40px;
    height: 40px;
  }
  
  .icon-circle i {
    font-size: 16px;
  }
  
  .feature-text h3 {
    font-size: 14px;
  }
  
  .feature-text p {
    font-size: 11px;
  }
  
  .divider {
    display: none;
  }
  
  /* About */
  .about {
    padding: 40px 15px;
  }
  
  .about-container {
    width: 95%;
    flex-direction: column;
    gap: 25px;
  }
  
  .about-left,
  .about-right {
    width: 100%;
  }
  
  .about-left h2 {
    font-size: 24px;
    text-align: center;
  }
  
  .about-left h4 {
    font-size: 14px;
    text-align: center;
  }
  
  .about-left p {
    font-size: 13px;
    text-align: center;
    max-width: 100%;
  }
  
  .about-right img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }
  
  /* Services */
  .services {
    padding: 40px 15px;
  }
  
  .section-title {
    margin-bottom: 30px;
  }
  
  .section-title h2 {
    font-size: 24px;
  }
  
  .section-title p {
    font-size: 13px;
    padding: 0 10px;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 25px;
    padding: 0 5px;
  }
  
  .service-card {
    padding: 20px 15px;
  }
  
  .service-icon {
    width: 55px;
    height: 55px;
    margin-bottom: 15px;
  }
  
  .service-icon i {
    font-size: 22px;
  }
  
  .service-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
  }
  
  .service-card p {
    font-size: 13px;
  }
  
  /* Products */
  .products {
    padding: 40px 15px;
  }
  
  .products .section-title h2 {
    font-size: 24px;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 0 5px;
  }
  
  .product-card {
    padding: 15px;
  }
  
  .product-card img.product-image {
    height: 160px;
  }
  
  .product-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
  }
  
  .product-card p {
    font-size: 13px;
  }
  
  /* Page Title */
  .page-title {
    padding: 90px 15px 30px;
  }
  
  .page-title h1 {
    font-size: 24px;
    margin-bottom: 10px;
  }
  
  .page-title p {
    font-size: 13px;
  }
  
  /* Details Box */
  .details-box {
    padding: 20px 15px;
    margin: 0 15px;
  }
  
  .details-box h2 {
    font-size: 18px;
  }
  
  .details-box ul li {
    font-size: 13px;
    padding-left: 15px;
  }
  
  /* Choose & Contact */
  .choose-contact {
    padding: 35px 15px;
  }
  
  .choose-contact-container {
    width: 95%;
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .choose-box h2,
  .contact-box h2 {
    font-size: 20px;
  }
  
  .choose-list li {
    font-size: 13px;
    padding-bottom: 10px;
  }
  
  .contact-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .contact-item .icon {
    font-size: 16px;
  }
  
  .contact-item p {
    font-size: 13px;
  }
  
  /* Contact Form */
  #contactForm input,
  #contactForm textarea {
    padding: 8px;
    font-size: 13px;
  }
  
  #contactForm button {
    padding: 10px 18px;
    font-size: 13px;
    width: 100%;
  }
  
  /* Footer */
  .footer {
    padding: 15px;
    font-size: 11px;
    text-align: center;
  }
  
  /* Scroll Top Button */
  #scrollTop {
    width: 38px;
    height: 38px;
    bottom: 15px;
    right: 15px;
    font-size: 16px;
  }
  
  /* Language Switcher */
  .lang-switcher {
    height: 35px;
    font-size: 13px;
    padding: 6px 8px;
  }
}

/* ============================================
   ARABIC RTL MENU FIX - TABLET (577px - 900px)
   Only applies to lang="ar" 
   ============================================ */

@media (min-width: 577px) and (max-width: 900px) {
  html[lang="ar"] .header-container,
  [lang="ar"] .header-container {
    direction: rtl;
  }
  
  html[lang="ar"] .nav,
  [lang="ar"] .nav {
    direction: rtl;
    text-align: right;
  }
  
  html[lang="ar"] .nav a,
  [lang="ar"] .nav a {
    text-align: right;
  }
  
  html[lang="ar"] .hamburger,
  [lang="ar"] .hamburger {
    margin-right: auto;
    margin-left: 0;
  }
}

/* ============================================
   ARABIC RTL MENU FIX - MOBILE (320px - 576px)
   Only applies to lang="ar"
   ============================================ */

@media (max-width: 576px) {
  html[lang="ar"],
  [lang="ar"] {
    direction: rtl;
    text-align: right;
  }
  
  html[lang="ar"] .logo,
  [lang="ar"] .logo {
    padding: 0 10px;
  }

  /* Logo sizing on mobile */
  body.rtl-mode .logo img {
    max-height: 50px;
    width: auto;
  }

  /* Card heights for consistency */
  body.rtl-mode .service-card,
  body.rtl-mode .product-card {
    min-height: auto;
    height: auto;
  }

  /* Grid gap fixes */
  body.rtl-mode .services-grid,
  body.rtl-mode .products-grid {
    margin-left: 0;
    margin-right: 0;
  }
}


.services-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 22px;
}

/* Tablet */
@media (max-width: 992px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Mobile */
@media (max-width: 576px) {
  .services-grid {
    grid-template-columns: 1fr !important;
  }
}

.plastic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.plastic-card {
  background: #f7f9fc;
  border: 1px solid #e3e7f0;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: 0.3s;
  box-shadow: 0px 3px 15px rgba(0,0,0,0.07);
}

.plastic-card:hover {
  transform: translateY(-8px);
  border-color: #f5b400;
}

.plastic-card h3 {
  font-size: 20px;
  font-weight: 800;
  color: #0d2d63;
  margin-bottom: 15px;
}

.plastic-card p {
  font-size: 14px;
  color: #000;
  line-height: 1.6;
  flex-grow: 1;
}


/* === CONSULTING SECTION === */

/* السيكشن كله: تحكم في المسافات فوق وتحت + لون الخلفية */
.consulting-section {
  padding: 80px 0;          /* المسافة من فوق وتحت السيكشن (كبر/صغّر الرقم حسب ما تحب) */
  background: #f7f9fc;     /* لون خلفية القسم (غيّره لأي لون يناسبك) */
}

/* الكونتينر الأساسي اللي بيقسم الصفحة نص + صورة */
.consulting-container {
  display: grid;                          /* استخدام Grid عشان نخلي العناصر جنب بعض */
  grid-template-columns: 1fr 1fr;         /* عمودين: نص + صورة (تقدر تخليها 2fr 1fr لو عايز النص أوسع) */
  gap: 50px;                              /* المسافة بين النص والصورة */
  align-items: start;                     /* محاذاة العناصر من فوق */
  max-width: 1500px;                      /* أقصى عرض للمحتوى */
  margin: auto;                           /* توسيط المحتوى في الصفحة */
  padding: 0 15px;                        /* مسافة جانبية للموبايل */
}

/* عنوان كل جزء (FACILITATOR / Consulting & Compliance) */
.consulting-text h2 {
  font-weight: bold; 
  font-size: 28px;        /* حجم العنوان */
  font-weight: 1000;      /* سُمك الخط */
  color: #0d2d63;        /* لون العنوان */
  margin-right: 40px;
  margin-bottom: 16px;  /* مسافة تحت العنوان */
}

/* الفقرات النصية */
.consulting-text p {
  font-weight: bold; 
  font-size: 18px;       /* حجم النص */
  color: #000000;           /* لون النص */
  line-height: 1.8;      /* ارتفاع السطر (يزوّد وضوح القراءة) */
  margin-bottom: 16px;  /* مسافة بين كل فقرة والتانية */
}

/* الليستة (النقط) */
.consulting-list {
  list-style-type: disc;  /* شكل النقط (disc = دايرة – ممكن square) */
  padding-left: 20px;     /* مسافة من ناحية الشمال قبل النقط */
  margin-bottom: 20px;    /* مسافة تحت الليستة */
}

/* كل عنصر في الليستة */
.consulting-list li {
  font-weight: bold; 
  font-size: 18px;      /* حجم نص النقط */
  color: #000000;          /* لون نص النقط */
  margin-bottom: 16px; /* مسافة بين كل نقطة والتانية */
}

/* الصورة */
.consulting-image img {
  width: 100%;                              /* الصورة تاخد عرض العمود كله */
  border-radius: 8px;                      /* تدوير حواف الصورة */
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);   /* ظل خفيف للصورة */
}

/* ========== Responsive ========== */

/* للشاشات المتوسطة (تابلت) */
@media (max-width: 992px) {
  .consulting-container {
    grid-template-columns: 1fr;  /* خلي النص والصورة تحت بعض بدل جنب بعض */
    gap: 30px;                   /* مسافة أقل بين العناصر */
  }
}

/* للموبايل */
@media (max-width: 600px) {
  .consulting-text h2 {
    font-size: 24px;   /* تصغير حجم العنوان على الموبايل */
  }

  .consulting-text p {
    font-size: 15px;   /* تصغير حجم النص على الموبايل */
  }
}