/* ========================
   RTL SUPPORT SYSTEM
======================== */

html[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

/* Fix Bootstrap spacing */
html[dir="rtl"] .ms-1,
html[dir="rtl"] .ms-2,
html[dir="rtl"] .ms-3,
html[dir="rtl"] .ms-4,
html[dir="rtl"] .ms-5 {
  margin-left: 0 !important;
  margin-right: 1rem !important;
}

html[dir="rtl"] .me-1,
html[dir="rtl"] .me-2,
html[dir="rtl"] .me-3,
html[dir="rtl"] .me-4,
html[dir="rtl"] .me-5 {
  margin-right: 0 !important;
  margin-left: 1rem !important;
}

/* Flex direction fix */
html[dir="rtl"] .d-flex {
  flex-direction: row-reverse;
}

/* Text alignment */
html[dir="rtl"] .text-start {
  text-align: right !important;
}

html[dir="rtl"] .text-end {
  text-align: left !important;
}

/* Icons spacing */
html[dir="rtl"] .service-icon-box {
  margin: 0 auto 15px; /* keep centered sections correct */
}

/* Lists */
html[dir="rtl"] ul {
  padding-right: 20px;
  padding-left: 0;
}

html[dir="rtl"] .btn {
  text-align: center;
}

/* Push menu to the LEFT instead of right */
html[dir="rtl"] .navbar-nav {
  margin-right: auto !important;
  margin-left: 0 !important;
}

/* Fix spacing between links */
html[dir="rtl"] .navbar-light .navbar-nav .nav-link {
  margin-left: 25px;
  margin-right: 0;
}

html[dir="rtl"] .navbar-brand {
  margin-left: 1rem;
  margin-right: 0;
}

/* Keep logo scaling clean in RTL */
html[dir="rtl"] .logo-lg {
  transform: scale(4.4); /* increase size visually */
  transform-origin: right center;
}

html[dir="rtl"] .dropdown-menu {
  text-align: right;
  right: 0;
  left: auto;
}

html[dir="rtl"] .fa,
html[dir="rtl"] i {
  margin-left: 5px;
  margin-right: 0;
}

body {
  direction: rtl;
  text-align: right;
}

.navbar-nav {
  margin-right: auto;
  margin-left: 0;
}

.dropdown-menu {
  text-align: right;
}

/* =========================
   CERTIFICATIONS RTL GRID
========================= */

.aboutAr-certifications {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* Card */
.cert-itemAr {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 15px;
  padding: 18px;
  background: #f1f3f5;
  border-right: 4px solid #dc3545;
  border-radius: 6px;
  direction: rtl;
  text-align: right;
  transition: 0.3s;
  cursor: pointer;
}

/* Icon */
.cert-itemAr i {
  font-size: 22px;
  color: #dc3545;
}

/* Text */
.cert-itemAr strong {
  display: block;
  font-size: 15px;
  color: #2c2c2c;
}

.cert-itemAr span {
  font-size: 14px;
  color: #6c757d;
}

/* Active (first card) */
.cert-itemAr.active {
  background: #dc3545;
  color: #fff;
}

.cert-itemAr.active strong,
.cert-itemAr.active span,
.cert-itemAr.active i {
  color: #fff;
}

/* Hover (optional subtle) */
.cert-itemAr:hover {
  transform: translateY(-4px);
  background: var(--bs-primary);
  color: var(--bs-white);
  strong {
    color: var(--bs-white);
  }
  i {
    color: var(--bs-white);
  }
  span {
    color: var(--bs-white);
  }
}

/* Make cards clickable cleanly */
.aboutAr-certifications a {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Responsive */
@media (max-width: 768px) {
  .aboutAr-certifications {
    grid-template-columns: 1fr;
  }
}

.corporate {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  padding: 40px;
}

.corporate-header {
  text-align: center;
  margin-bottom: 30px;
}

.corporate-header .tag {
  display: inline-block;
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  margin-bottom: 10px;
}

.corporate-header h1 {
  font-weight: 700;
  font-size: 32px;
  margin-bottom: 10px;
}

.corporate-content p {
  color: #6c757d;
  line-height: 1.8;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 15px;
}

.accordion-item {
  background: #f8f9fa;
  border-radius: 10px;
  overflow: hidden;
  transition: 0.3s;
}

.accordion-button {
  background: #ffff;
  font-weight: 600;
  color: #333;
  text-align: right;
}

.accordion-button:not(.collapsed) {
  background: #dc3545;
  color: #fff;
}

.accordion-body {
  background: #ffffff;
  color: #6c757d;
}

.accordion-item:hover {
  transform: translateY(-3px);
}

.accordion-button::after {
  margin-left: 0;
  margin-right: auto;
}

/* Background soft */
.bg-soft {
  background: #f8f9fa;
}

/* Challenge Cards */
.challenge-card {
  background: #fff;
  padding: 30px 20px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: 0.3s;
  height: 100%;
}

.challenge-card:hover {
  transform: translateY(-6px);
}

/* Icon circle */
.icon-box {
  width: 60px;
  height: 60px;
  margin: 0 auto 15px;
  border-radius: 50%;
  background: rgba(220, 53, 69, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-box i {
  font-size: 22px;
  color: #dc3545;
}

/* Text */
.challenge-card h5 {
  font-weight: 600;
  margin-bottom: 10px;
}

.challenge-card p {
  color: #6c757d;
  font-size: 14px;
}

.challenge-card:hover {
  background: #dc3545;
  color: #fff;
}

.challenge-card:hover p,
.challenge-card:hover h5 {
  color: #fff;
}

.challenge-card:hover .icon-box {
  background: #fff;
}

/* Shared text styling */
.section-text,
.section-text-ar {
  max-width: 850px;
  margin: 0 auto 20px;
  line-height: 1.9;
  font-size: 16.5px;
  color: #555;
}

/* English */
.section-text {
  text-align: justify;
  text-justify: inter-word;
}

/* Arabic */
.section-text-ar {
  text-align: justify;
  direction: rtl;
  unicode-bidi: plaintext;
}

/* Better headings spacing */
.text-center h2 {
  margin-bottom: 20px;
}

.text-center h5 {
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.container .text-center {
  max-width: 900px;
  margin: auto;
}

/* Timeline Line */
.timeline-line::before {
  content: "";
  position: absolute;
  top: 12px;
  right: 0;
  left: 0;
  height: 2px;
  background: #e0e0e0;
  z-index: 0;
}

/* Step */
.timeline-step {
  position: relative;
  z-index: 1;
}

/* Dot */
.timeline-dot {
  width: 14px;
  height: 14px;
  background: #dc3545;
  border-radius: 50%;
  margin: 0 auto 10px;
  position: relative;
}

/* Text */
.timeline-step h6 {
  font-weight: 600;
  margin-bottom: 5px;
}

.timeline-step small {
  color: #6c757d;
}

/* Hover Effect */
.timeline-step:hover .timeline-dot {
  transform: scale(1.3);
  transition: 0.3s;
}

------------------

/* Section */
.comparison-premium {
  background: linear-gradient(180deg, #f8f9fc, #ffffff);
}

/* Title */
.section-tag {
  display: inline-block;
  color: #dc3545;
  font-weight: 600;
  margin-bottom: 10px;
}

.section-title {
  font-weight: 800;
  font-size: 32px;
}

/* Divider */
.premium-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 50%;
  width: 2px;
  background: linear-gradient(to bottom, transparent, #ddd, transparent);
  transform: translateX(50%);
}

/* Cards */
.premium-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 30px;
  height: 100%;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
}

/* Hover */
.premium-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.08);
}

/* Header */
.card-header {
  margin-bottom: 20px;
}

.card-header h5 {
  font-weight: 700;
  margin-top: 10px;
}

/* Status badges */
.status {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 50px;
  font-weight: 600;
}

.status.success {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
}

.status.danger {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

/* Lists */
.premium-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.premium-card li {
  margin-bottom: 15px;
  padding-right: 30px;
  position: relative;
  color: #555;
  font-size: 14px;
}

/* Icons */
.premium-card.after li::before {
  content: "✔";
  position: absolute;
  right: 0;
  color: #28a745;
  font-weight: bold;
}

.premium-card.before li::before {
  content: "✖";
  position: absolute;
  right: 0;
  color: #dc3545;
  font-weight: bold;
}

/* Side Accent */
.premium-card.after {
  border-right: 4px solid #28a745;
}

.premium-card.before {
  border-right: 4px solid #dc3545;
}

/* Responsive */
@media (max-width: 991px) {
  .premium-divider {
    display: none;
  }
}

/* RTL Breadcrumb Fix */
.rtl-breadcrumb {
  direction: rtl;
}

.rtl-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  float: right;
  padding-left: 0;
  padding-right: 0.2rem;
  content: "/";
}

.rtl-breadcrumb a {
  color: #6c757d;
  text-decoration: none;
}

.rtl-breadcrumb a:hover {
  color: #dc3545;
}

.rtl-breadcrumb .active {
  font-weight: 600;
}

/* ===== Premium Stats Section ===== */

.stats-premium .stat-card {
  background: #fff;
  border-radius: 16px;
  padding: 25px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
  border: 1px solid #eee;
}

/* Hover Effect */
.stats-premium .stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

/* Text */
.stat-content {
  text-align: right;
}

.stat-content h2 {
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 5px;
  color: #2c2c2c;
}

.stat-content p {
  margin: 0;
  font-size: 14px;
  color: #6c757d;
}

/* Icon */
.stat-icon {
  font-size: 34px;
  color: #dc3545;
  background: rgba(220, 53, 69, 0.1);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

body {
  color: #212529;
}

.service-text {
  color: #333;
}

/* Arabic */
html[lang="ar"] body {
  font-family: "Cairo", sans-serif;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] h5,
html[lang="ar"] h6 {
  font-family: "Cairo", sans-serif;
}

.copyright-text {
  font-size: 13px;
  color: #000000;
  text-align: center;
}

.company-name {
  color: #000000;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}

.company-name:hover {
  color: #0d6efd;
}

------------------
/* Section background */
.about-core {
  background: #f8f9fa;
}

/* Card */
.core-card {
  will-change: transform;
  background: #ffffff;
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 1px solid #eee;
}

/* Hover effect */
.core-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

/* Icon circle */
.icon-box {
  width: 70px;
  height: 70px;
  margin: 0 auto;
  border-radius: 50%;
  background: rgba(220, 53, 69, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-box i {
  font-size: 28px;
  color: #dc3545;
}

/* Typography */
.core-card h4 {
  font-weight: 600;
}

.core-card p {
  font-size: 15px;
  line-height: 1.8;
}

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* CONTAINER */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* SECTION */
.counter-section {
  background: linear-gradient(to bottom, #ffffff, #f7f9fc);
  padding: 80px 0;
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
  box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.06);
}

/* GRID */
.counter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

/* ITEM */
.counter-item {
  background: #fff;
  border-radius: 20px;
  padding: 30px 20px;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid #f1f1f1;
}

.counter-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* ICON (BIG LIKE IMAGE) */
.counter-icon {
  font-size: 50px;
  color: #e63946;
  min-width: 80px;
  margin-bottom: 15px;
}

/* NUMBER */
.counter-item h2 {
  font-size: 40px;
  font-weight: 700;
  color: #1f2d3d;
  margin-bottom: 5px;
}

/* TEXT */
.counter-item p {
  margin: 0;
  color: #000000;
  font-size: 15px;
}

/* RTL SUPPORT */
[dir="rtl"] .counter-item {
  direction: rtl;
}

/* RESPONSIVE */
@media (max-width: 992px) {
  .counter-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .counter-grid {
    grid-template-columns: 1fr;
  }

  .counter-icon {
    font-size: 55px;
  }
}

@media (max-width: 576px) {
  .counter-grid {
    grid-template-columns: 1fr;
  }
}
