@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Colors */
  --primary: #1F7A3E;
  --primary-dark: #14532D;
  --accent: #1D9A8C;
  --secondary: #1D9A8C;
  --bg-white: #FFFFFF;
  --bg-alt: #F5F7FA;
  --text-primary: #1A1A1A;
  --text-secondary: #6B7280;
  --white: #FFFFFF;
  --danger: #D32F2F;
  --success: #1F7A3E;

  /* Spacing Scale (8px) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;

  /* Border Radius */
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  padding-top: 80px;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='1200' height='1200' viewBox='0 0 1200 1200' xmlns='http://www.w3.org/2000/svg'%3E%3Cg stroke='%231F7A3E' stroke-width='2' fill='none' opacity='0.08'%3E%3Cpath d='M-100 200 C 300 100, 400 600, 1300 500' /%3E%3Cpath d='M1300 800 C 900 1000, 700 400, -100 700' /%3E%3Cpath d='M400 -100 C 500 400, 100 800, 500 1300' /%3E%3Cpath d='M800 1300 C 1000 900, 600 600, 1000 -100' /%3E%3Cpath d='M-100 1000 C 200 1100, 1100 200, 1300 100' /%3E%3Cpath d='M600 -100 C 700 500, 1100 700, 1300 1100' /%3E%3C/g%3E%3C/svg%3E");
  background-size: max(1200px, 100vw) auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.25;
  color: var(--primary-dark);
}

h1 {
  font-size: 56px;
  font-weight: 700;
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
}

h2 {
  font-size: 36px;
  font-weight: 600;
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: var(--space-2);
}

h4 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--space-2);
}

p {
  margin-bottom: var(--space-2);
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Grid System */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.grid {
  display: grid;
  gap: var(--space-3);
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {

  .grid-cols-4,
  .grid-cols-3,
  .grid-cols-2 {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 28px;
  }
}

/* Shared Components */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-size: 16px;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--accent);
  color: var(--white);
}

.btn-secondary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: var(--white);
}

.btn-resource {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 50px;
  padding: 12px 28px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.btn-resource:hover {
  background-color: var(--primary);
  color: var(--white);
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.btn-resource i {
  transition: transform 0.3s ease;
}

.btn-resource:hover i {
  transform: translateX(4px) scale(1.1);
}

/* Cards */
.card {
  background: var(--white);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

/* Navbar */
.navbar {
  height: 80px;
  display: flex;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-weight: 800;
  font-size: 24px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo-img {
  height: 60px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  height: 100%;
}

.nav-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-link {
  font-weight: 600;
  color: var(--text-primary);
  padding: var(--space-1) 0;
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link i {
  transition: transform 0.2s ease;
}

.nav-item:hover .nav-link i {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  min-width: 240px;
  box-shadow: var(--shadow-lg);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: var(--space-2);
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.2s ease;
}

.nav-item:hover .dropdown-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-link {
  display: flex;
  flex-direction: column;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: background 0.2s ease;
}

.dropdown-link:hover {
  background: var(--bg-alt);
}

.dropdown-link span {
  font-weight: 600;
  color: var(--primary);
  font-size: 15px;
}

.dropdown-link p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

/* Mega Menu */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: min(100vw - 40px, 1000px);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: var(--space-4);
  display: none;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 1001;
}

.nav-item:hover .mega-menu {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.mega-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.mega-column-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
  padding-left: var(--space-2);
}

.report-btn {
  background-color: var(--danger);
  color: var(--white) !important;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 700;
  box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.3);
}

.report-btn:hover {
  background-color: #dc2626;
  transform: scale(1.05);
}

.mobile-toggle {
  display: none;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
}

/* Icon styling */
.icon-sm {
  width: 16px;
}

.icon-secondary {
  color: var(--secondary);
}

.icon-primary {
  color: var(--primary);
}

/* Section variants */
.section-alt {
  background-color: var(--bg-alt);
}

/* Text styles */
.text-muted-small {
  font-size: 13px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.text-secondary-bold {
  color: var(--secondary);
  font-weight: 600;
}

.mb-space-4 {
  margin-bottom: var(--space-4);
}

/* Button variants */
.btn-full {
  width: 100%;
}

.btn-outline-full {
  width: 100%;
  font-size: 14px;
}

.btn-mt-4 {
  margin-top: var(--space-4);
}

/* Mega menu sizing */
.mega-menu-md {
  width: 650px;
}

/* News image backgrounds */
.news-img-bg-1 {
  background: url('https://images.unsplash.com/photo-1574629810360-7efbbe195018?auto=format&fit=crop&q=80&w=800') center/cover;
}

.news-img-bg-2 {
  background: url('https://images.unsplash.com/photo-1517649763962-0c623066013b?auto=format&fit=crop&q=80&w=800') center/cover;
}

.news-img-bg-3 {
  background: url('https://images.unsplash.com/photo-1526628953301-3e589a6a8b74?auto=format&fit=crop&q=80&w=800') center/cover;
}

/* Common inline style utilities */
.w-16 {
  width: 16px;
}

.w-100pct {
  width: 100%;
}

.mt-2 {
  margin-top: var(--space-2);
}

.mb-2 {
  margin-bottom: var(--space-2);
}

.mb-3 {
  margin-bottom: var(--space-3);
}

.mb-12 {
  margin-bottom: 12px;
}

.fs-14 {
  font-size: 14px;
}

.fs-13 {
  font-size: 13px;
}

.fw-600 {
  font-weight: 600;
}

.fw-500 {
  font-weight: 500;
}

.c-primary {
  color: var(--primary);
}

.c-secondary {
  color: var(--secondary);
}

.bg-alt {
  background-color: var(--bg-alt);
}

.text-center {
  text-align: center;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gap-2 {
  gap: var(--space-2);
}

.gap-3 {
  gap: var(--space-3);
}

.list-disc {
  list-style: disc;
  margin-left: 20px;
  color: var(--text-secondary);
}


@media (max-width: 1024px) {
  .nav-links {
    gap: var(--space-2);
  }
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background: var(--white);
    flex-direction: column;
    padding: var(--space-4);
    overflow-y: auto;
    align-items: flex-start;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-item {
    width: 100%;
    height: auto;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: var(--space-2) 0;
  }

  .dropdown-menu,
  .mega-menu {
    position: static;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    box-shadow: none;
    border-radius: 0;
    padding: var(--space-2) 0 var(--space-2) var(--space-3);
    border-left: 2px solid var(--bg-alt);
    background: transparent;
    display: none !important;
    opacity: 1;
    transition: none !important;
  }

  .nav-item:hover .dropdown-menu,
  .nav-item:hover .mega-menu {
    display: none !important;
    transform: none !important;
    opacity: 1 !important;
  }

  .nav-item.open>.dropdown-menu,
  .nav-item.open>.mega-menu {
    display: block !important;
  }

  .mega-column {
    margin-bottom: var(--space-3);
  }

  .mega-column-title {
    color: var(--primary) !important;
    border-bottom: 1px solid var(--bg-alt);
    padding-bottom: 4px;
    margin-top: var(--space-2);
    font-size: 12px;
    margin-bottom: var(--space-1);
    padding-left: var(--space-2);
  }

  .dropdown-link p {
    display: none;
  }

  .dropdown-link {
    padding: 8px var(--space-2);
    border-radius: 0;
    border-bottom: 1px solid #f8f9fa;
  }

  .mega-menu .btn {
    margin-top: var(--space-2);
    width: 100%;
  }

  .mobile-toggle {
    display: block;
  }

  .report-btn {
    width: 100%;
    text-align: center;
    margin-top: var(--space-4);
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: var(--space-4);
  }
}

/* Hero Section */
.hero {
  padding: var(--space-7) 0;
  position: relative;
  color: var(--white);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -10px;
  right: -10px;
  bottom: -10px;
  left: -10px;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../Images/Home%20Page%20Front.jpg') center/cover no-repeat fixed;
  filter: blur(2px);
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: var(--white);
}

.hero-content {
  max-width: 800px;
}

.hero-btns {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

/* Sections */
.section {
  padding: var(--space-6) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-5);
}

.section-title h2 {
  margin-bottom: var(--space-1);
}

.section-title p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* User Types */
.user-type-card {
  text-align: center;
}

.icon-box {
  width: 64px;
  height: 64px;
  background: var(--bg-alt);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-3);
  color: var(--accent);
}

/* Services */
.service-item {
  display: flex;
  gap: var(--space-3);
}

/* About Preview */
.about-preview {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.about-img {
  flex: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.about-text {
  flex: 1;
}

@media (max-width: 768px) {
  .about-preview {
    flex-direction: column;
  }
}

/* News Section */
.news-card {
  overflow: hidden;
}

.news-img {
  height: 200px;
  background: #eee;
  margin: calc(var(--space-4) * -1);
  margin-bottom: var(--space-3);
}

.news-meta {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}

/* CTA Strip */
.cta-strip {
  background-color: var(--primary);
  color: var(--white);
  padding: var(--space-5) 0;
  text-align: center;
}

.cta-strip h2 {
  color: var(--white);
}

.cta-cheating {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../Images/Is someone cheating.jpg') center/cover no-repeat fixed;
}

/* Footer */
.footer {
  background-color: #0F172A;
  color: #94A3B8;
  padding: var(--space-6) 0 var(--space-3);
}

.footer h4 {
  color: white;
  margin-bottom: var(--space-3);
  font-size: 18px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

.footer-links li {
  margin-bottom: var(--space-1);
}

.footer-links a:hover {
  color: white;
}

.copyright {
  border-top: 1px solid #374151;
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: 14px;
}

.social-icons {
  display: flex;
  gap: var(--space-3);
}

.social-icons a {
  color: #94A3B8;
  transition: color 0.3s ease;
}

.social-icons a:hover {
  color: white;
}

@media (max-width: 640px) {
  .copyright {
    justify-content: center;
    flex-direction: column;
    text-align: center;
  }
}

/* Inner Page Header */
.page-header {
  padding: var(--space-5) 0;
  background-color: var(--bg-alt);
  border-bottom: 1px solid #E5E7EB;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

.breadcrumb a:hover {
  color: var(--primary);
}

/* Sidebar Layout */
.sidebar-layout {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: var(--space-5);
}

@media (max-width: 992px) {
  .sidebar-layout {
    grid-template-columns: 1fr;
  }
}

.sidebar-widget {
  background: var(--bg-alt);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}

/* Timeline */
.timeline {
  position: relative;
  padding: var(--space-4) 0;
}

.timeline-item {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  position: relative;
}

.timeline-step {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
}

.timeline-content {
  background: var(--bg-alt);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  flex-grow: 1;
}

/* FAQ Accordion */
.accordion-item {
  border-bottom: 1px solid #E5E7EB;
}

.accordion-header {
  width: 100%;
  background: none;
  border: none;
  padding: var(--space-3) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 18px;
  text-align: left;
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.accordion-body.active {
  max-height: 2000px;
}

.accordion-content {
  padding-bottom: var(--space-3);
  color: var(--text-secondary);
}

/* Form */
.form-group {
  margin-bottom: var(--space-3);
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid #D1D5DB;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 16px;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 122, 62, 0.1);
}

.invalid-feedback {
  color: var(--danger);
  font-size: 14px;
  margin-top: 4px;
  display: none;
}

.form-control.invalid {
  border-color: var(--danger);
}

.form-control.invalid+.invalid-feedback {
  display: block;
}

/* Utilities */
.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: var(--space-4);
}

.mb-4 {
  margin-bottom: var(--space-4);
}

/* Organizational Chart Styles */

/* Org chart: vertical hierarchy for desktop */
.org-chart {
  display: flex;
  justify-content: center;
  padding: var(--space-4) 0;
  overflow-x: auto;
}

.org-chart ul {
  padding-top: 20px;
  position: relative;
  transition: all 0.5s;
  display: block;
}

.org-chart>ul>li>ul {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0;
}

.org-chart li {
  text-align: center;
  list-style-type: none;
  position: relative;
  padding: 20px 10px 0 10px;
  transition: all 0.5s;
}

/* Connecting lines */
.org-chart li::before,
.org-chart li::after {
  content: '';
  position: absolute;
  top: 0;
  right: 50%;
  border-top: 2px solid var(--primary);
  width: 50%;
  height: 20px;
}

.org-chart li::after {
  right: auto;
  left: 50%;
  border-left: 2px solid var(--primary);
}

/* Only root elements don't need top connecting lines */
.org-chart li:only-child::after,
.org-chart li:only-child::before {
  display: none;
}

/* Remove space from the top of single children */
.org-chart li:only-child {
  padding-top: 0;
}

/* First and last child formatting */
.org-chart li:first-child::before,
.org-chart li:last-child::after {
  border: 0 none;
}

.org-chart li:last-child::before {
  border-right: 2px solid var(--primary);
  border-radius: 0 5px 0 0;
}

.org-chart li:first-child::after {
  border-radius: 5px 0 0 0;
}

/* Vertical line for parents */
.org-chart ul ul::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  border-left: 2px solid var(--primary);
  width: 0;
  height: 20px;
}

.org-node {
  background: var(--bg-white);
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 10px 8px;
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark);
  transition: all 0.3s ease;
  min-width: 110px;
  max-width: 140px;
  word-wrap: break-word;
}

/* Vertical Sub-levels */

/* Improved vertical tree for org chart */
.org-chart ul.vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding-top: 20px;
  margin: 0;
}

.org-chart ul.vertical::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  border-left: 2px solid var(--primary);
  width: 0;
  height: 20px;
  transform: translateX(-50%);
}

.org-chart ul.vertical>li {
  position: relative;
  padding: 15px 0 0 0;
  width: 100%;
  float: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.org-chart ul.vertical>li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  border-left: 2px solid var(--primary);
  width: 0;
  height: 15px;
  transform: translateX(-50%);
}

.org-chart ul.vertical>li:first-child::before {
  display: none;
}

/* For horizontal split under a node (e.g., Admin -> Supportive Services & Services) */

.org-chart ul.vertical>li>ul.vertical {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  padding-top: 20px;
  gap: 0;
}

.org-chart ul.vertical>li>ul.vertical::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: calc(100% - 40px);
  height: 2px;
  border-top: 2px solid var(--primary);
  border-left: none;
  z-index: 0;
}

.org-chart ul.vertical>li>ul.vertical>li {
  padding: 0 20px;
  position: relative;
}

.org-chart ul.vertical>li>ul.vertical>li::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  width: 0;
  height: 20px;
  border-left: 2px solid var(--primary);
  transform: translateX(-50%);
  z-index: 1;
}

.org-node:hover {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.org-node.ceo {
  background: var(--primary);
  color: var(--white);
  font-size: 16px;
  padding: 16px 24px;
  border-color: var(--primary-dark);
}

/* Responsive vertical stacking */
@media (max-width: 1024px) {
  .org-chart {
    display: block;
    overflow-x: hidden;
  }

  .org-chart ul {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 0;
    padding-left: 0;
  }

  .org-chart li {
    padding: 10px 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .org-chart li::before,
  .org-chart li::after,
  .org-chart ul ul::before {
    display: none;
  }

  /* Custom connecting lines for mobile */
  .org-chart ul ul {
    border-left: 2px solid var(--primary);
    margin-top: 10px;
    margin-left: 20px;
    padding-left: 0;
  }

  .org-chart ul ul li {
    position: relative;
    padding-left: 20px;
  }

  .org-chart ul ul li::before {
    content: '';
    display: block;
    position: absolute;
    top: 30px;
    left: 0;
    width: 20px;
    border-top: 2px solid var(--primary);
    height: 0;
  }

  .org-node {
    width: 100%;
    max-width: 300px;
    text-align: left;
  }
}

/* Prohibited List Specific Styles */
.prohibited-download-card {
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.prohibited-download-card h3 {
  color: white;
  margin-bottom: var(--space-1);
}

.medication-card {
  background: var(--bg-alt);
  border: none;
}

.search-buttons {
  display: flex;
  gap: var(--space-2);
}

/* Anti-Doping Overview Specific Styles */
.strict-liability-card {
  background: var(--bg-alt);
  border-left: 4px solid var(--primary);
}

.questions-card {
  background: var(--primary);
  color: white;
}


/* TUE Specific Styles */
.alert {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.alert-warning {
  background-color: #FEF2F2;
  border-left: 4px solid var(--danger);
  color: #991B1B;
}

.alert-icon {
  flex-shrink: 0;
}

.timeline-vertical {
  position: relative;
  padding: 0;
  margin: var(--space-4) 0;
}

.timeline-vertical::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 2px;
  background-color: #E5E7EB;
  z-index: 0;
}

.checklist-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.checklist-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(31, 122, 62, 0.2);
}

.checklist-icon {
  color: var(--primary);
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
  transition: transform 0.3s ease;
}

.checklist-card:hover .checklist-icon {
  transform: scale(1.15) rotate(5deg);
}

/* TUE Hero Section */
.hero-tue {
  padding: var(--space-7) 0;
  position: relative;
  color: var(--white);
  overflow: hidden;
  text-align: center;
}

.hero-tue::before {
  content: '';
  position: absolute;
  top: -10px;
  right: -10px;
  bottom: -10px;
  left: -10px;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../Images/TUE Front.jpg') center/cover no-repeat fixed;
  filter: blur(2px);
  z-index: 0;
}

.hero-tue .container {
  position: relative;
  z-index: 1;
}

.hero-tue h1,
.hero-tue p {
  color: var(--white);
}

/* Prohibited List Hero Section */
.hero-prohibited {
  padding: var(--space-7) 0;
  position: relative;
  color: var(--white);
  overflow: hidden;
  text-align: center;
}

.hero-prohibited::before {
  content: '';
  position: absolute;
  top: -10px;
  right: -10px;
  bottom: -10px;
  left: -10px;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../Images/Prohibited List.jpg') center/cover no-repeat fixed;
  filter: blur(2px);
  z-index: 0;
}

.hero-prohibited .container {
  position: relative;
  z-index: 1;
}

.hero-prohibited h1,
.hero-prohibited p {
  color: var(--white);
}

.hero-about {
  padding: var(--space-7) 0;
  position: relative;
  color: var(--white);
  overflow: hidden;
  text-align: center;
}

.hero-about::before {
  content: '';
  position: absolute;
  top: -10px;
  right: -10px;
  bottom: -10px;
  left: -10px;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../Images/About%20Page%20Header.jpg') center/cover no-repeat fixed;
  filter: blur(0.5px);
  z-index: 0;
}

.hero-about .container {
  position: relative;
  z-index: 1;
}

.hero-about h1,
.hero-about p,
.hero-about .breadcrumb,
.hero-about .breadcrumb a {
  color: var(--white);
}

.hero-anti-doping {
  padding: var(--space-7) 0;
  position: relative;
  color: var(--white);
  overflow: hidden;
  text-align: center;
}

.hero-anti-doping::before {
  content: '';
  position: absolute;
  top: -10px;
  right: -10px;
  bottom: -10px;
  left: -10px;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../Images/Anti-Doping%20Header.jpg') center/cover no-repeat fixed;
  filter: blur(2px);
  z-index: 0;
}

.hero-anti-doping .container {
  position: relative;
  z-index: 1;
}

.hero-anti-doping h1,
.hero-anti-doping p,
.hero-anti-doping .breadcrumb,
.hero-anti-doping .breadcrumb a {
  color: var(--white);
}

.hero-violations {
  padding: var(--space-7) 0;
  position: relative;
  color: var(--white);
  overflow: hidden;
  text-align: center;
}

.hero-violations::before {
  content: '';
  position: absolute;
  top: -10px;
  right: -10px;
  bottom: -10px;
  left: -10px;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../Images/Violations%20Header.jpg') center/cover no-repeat fixed;
  filter: blur(2px);
  z-index: 0;
}

.hero-violations .container {
  position: relative;
  z-index: 1;
}

.hero-violations h1,
.hero-violations p,
.hero-violations .breadcrumb,
.hero-violations .breadcrumb a {
  color: var(--white);
}

.hero-testing {
  padding: var(--space-7) 0;
  position: relative;
  color: var(--white);
  overflow: hidden;
  text-align: center;
}

.hero-testing::before {
  content: '';
  position: absolute;
  top: -10px;
  right: -10px;
  bottom: -10px;
  left: -10px;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../Images/Testing%20Header.jpg') center/cover no-repeat fixed;
  filter: blur(2px);
  z-index: 0;
}

.hero-testing .container {
  position: relative;
  z-index: 1;
}

.hero-testing h1,
.hero-testing p,
.hero-testing .breadcrumb,
.hero-testing .breadcrumb a {
  color: var(--white);
}

.hero-results {
  padding: var(--space-7) 0;
  position: relative;
  color: var(--white);
  overflow: hidden;
  text-align: center;
}

.hero-results::before {
  content: '';
  position: absolute;
  top: -10px;
  right: -10px;
  bottom: -10px;
  left: -10px;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../Images/Results%20Management%20Header.jpg') center/cover no-repeat fixed;
  filter: blur(2px);
  z-index: 0;
}

.hero-results .container {
  position: relative;
  z-index: 1;
}

.hero-results h1,
.hero-results p,
.hero-results .breadcrumb,
.hero-results .breadcrumb a {
  color: var(--white);
}

.hero-education {
  padding: var(--space-7) 0;
  position: relative;
  color: var(--white);
  overflow: hidden;
  text-align: center;
}

.hero-education::before {
  content: '';
  position: absolute;
  top: -10px;
  right: -10px;
  bottom: -10px;
  left: -10px;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../Images/Education%20Header.jpg') center/cover no-repeat fixed;
  filter: blur(2px);
  z-index: 0;
}

.hero-education .container {
  position: relative;
  z-index: 1;
}

.hero-education h1,
.hero-education p,
.hero-education .breadcrumb,
.hero-education .breadcrumb a {
  color: var(--white);
}

.hero-news {
  padding: var(--space-7) 0;
  position: relative;
  color: var(--white);
  overflow: hidden;
  text-align: center;
}

.hero-news::before {
  content: '';
  position: absolute;
  top: -10px;
  right: -10px;
  bottom: -10px;
  left: -10px;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../Images/News%20Header.jpeg') center/cover no-repeat fixed;
  filter: blur(2px);
  z-index: 0;
}

.hero-news .container {
  position: relative;
  z-index: 1;
}

.hero-news h1,
.hero-news p,
.hero-news .breadcrumb,
.hero-news .breadcrumb a {
  color: var(--white);
}

.hero-resources {
  padding: var(--space-7) 0;
  position: relative;
  color: var(--white);
  overflow: hidden;
  text-align: center;
}

.hero-resources::before {
  content: '';
  position: absolute;
  top: -10px;
  right: -10px;
  bottom: -10px;
  left: -10px;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../Images/Resources%20Header.jpg') center/cover no-repeat fixed;
  filter: blur(2px);
  z-index: 0;
}

.hero-resources .container {
  position: relative;
  z-index: 1;
}

.hero-resources h1,
.hero-resources p,
.hero-resources .breadcrumb,
.hero-resources .breadcrumb a {
  color: var(--white);
}

.hero-contact {
  padding: var(--space-7) 0;
  position: relative;
  color: var(--white);
  overflow: hidden;
  text-align: center;
}

.hero-contact::before {
  content: '';
  position: absolute;
  top: -10px;
  right: -10px;
  bottom: -10px;
  left: -10px;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../Images/Contact%20Us%20Header.jpg') center/cover no-repeat fixed;
  filter: blur(2px);
  z-index: 0;
}

.hero-contact .container {
  position: relative;
  z-index: 1;
}

.hero-contact h1,
.hero-contact p,
.hero-contact .breadcrumb,
.hero-contact .breadcrumb a {
  color: var(--white);
}

.hero-whereabouts {
  padding: var(--space-7) 0;
  position: relative;
  color: var(--white);
  overflow: hidden;
  text-align: center;
}

.hero-whereabouts::before {
  content: '';
  position: absolute;
  top: -10px;
  right: -10px;
  bottom: -10px;
  left: -10px;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../Images/Whereabouts%20page%20Header.jpg') bottom/cover no-repeat fixed;
  filter: blur(2px);
  z-index: 0;
}

.hero-whereabouts .container {
  position: relative;
  z-index: 1;
}

.hero-whereabouts h1,
.hero-whereabouts p,
.hero-whereabouts .breadcrumb,
.hero-whereabouts .breadcrumb a {
  color: var(--white);
}

.hero-report {
  padding: var(--space-7) 0;
  position: relative;
  color: var(--white);
  overflow: hidden;
  text-align: center;
}

.hero-report::before {
  content: '';
  position: absolute;
  top: -10px;
  right: -10px;
  bottom: -10px;
  left: -10px;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../Images/Is%20someone%20cheating.jpg') center/cover no-repeat fixed;
  filter: blur(2px);
  z-index: 0;
}

.hero-report .container {
  position: relative;
  z-index: 1;
}

.hero-report h1,
.hero-report p,
.hero-report .breadcrumb,
.hero-report .breadcrumb a {
  color: var(--white);
}

/* Responsive Nav CTA */
.header-report-btn {
  display: none;
}

@media (max-width: 900px) {
  .desktop-only-btn {
    display: flex !important;
    order: -1;
    width: 100%;
    margin-bottom: var(--space-4);
  }

  .desktop-only-btn .report-btn {
    margin-top: 0;
  }

  .header-report-btn {
    display: none !important;
  }

  .nav-actions {
    display: flex;
    align-items: center;
  }
}

/* News Layout Styles */
.news-layout {
  display: grid;
  grid-template-columns: 2.2fr 1.1fr;
  gap: var(--space-4);
  align-items: start;
}

.main-news-area {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.sidebar-area {
  position: sticky;
  top: 100px;
}

@media (max-width: 992px) {
  .news-layout {
    grid-template-columns: 1fr;
  }

  .sidebar-area {
    position: static;
  }
}

/* Statistics Dashboard Custom Styles */
.dashboard-card {
  background: var(--white);
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  overflow: hidden;
}

.stats-header-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stats-control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid #E5E7EB;
  padding-bottom: 16px;
  margin-bottom: 8px;
}

.stats-select-wrapper {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.stats-year-btn {
  padding: 6px 14px;
  border-radius: 30px;
  background: var(--bg-alt);
  border: 1px solid #E5E7EB;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.stats-year-btn:hover {
  background: #E5E7EB;
  color: var(--text-primary);
}

.stats-year-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.stats-search-wrapper {
  position: relative;
  width: 100%;
  max-width: 220px;
}

.stats-search-input {
  padding: 8px 12px 8px 36px;
  border: 1.5px solid #E5E7EB;
  border-radius: 30px;
  font-size: 13.5px;
  outline: none;
  width: 100%;
  transition: all 0.2s ease;
}

.stats-search-input:focus {
  border-color: var(--primary);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-mini-card {
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  border: 1px solid #E5E7EB;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-mini-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.stat-mini-val {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 2px;
}

.stat-mini-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stats-table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid #E5E7EB;
  max-height: 400px;
  overflow-y: auto;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}

.stats-table th {
  background: var(--bg-alt);
  color: var(--primary-dark);
  font-weight: 700;
  padding: 10px 14px;
  border-bottom: 2px solid #E5E7EB;
  position: sticky;
  top: 0;
  z-index: 10;
}

.stats-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #E5E7EB;
  color: var(--text-primary);
}

.stats-table tr:last-child td {
  border-bottom: none;
}

.stats-table tr:nth-child(even) td {
  background-color: #FAFBFD;
}

.stats-table tr.total-row td {
  background-color: var(--bg-alt);
  font-weight: 700;
  color: var(--primary-dark);
  border-top: 2px solid #E5E7EB;
  position: sticky;
  bottom: 0;
  z-index: 9;
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stats-control-row {
    flex-direction: column;
    align-items: stretch;
  }

  .stats-search-wrapper {
    max-width: none;
  }
}

/* Native Accordion Custom Styles */
.native-accordion details {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.native-accordion details:hover {
  border-color: #cbd5e1;
}

.native-accordion summary {
  padding: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
}

.native-accordion summary::-webkit-details-marker {
  display: none;
}

.native-accordion summary::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--primary);
  line-height: 1;
}

.native-accordion details[open] summary::after {
  content: '\2212';
}

.native-accordion .details-content {
  padding: 0 16px 16px 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  border-top: 1px solid #f1f5f9;
  margin-top: 4px;
  padding-top: 12px;
}

/* Visibility Utilities */
@media (max-width: 992px) {
  .desktop-only {
    display: none !important;
  }
}

@media (min-width: 993px) {
  .mobile-only {
    display: none !important;
  }
}

/* ==========================================================================
   Organizational Structure Section
   ========================================================================== */
.org-structure-section {
  padding: var(--space-5) 0;
  background-color: transparent;
  width: 100%;
}

.org-structure-section .section-header {
  text-align: center;
  margin-bottom: var(--space-5);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.org-structure-section .section-header h2 {
  position: relative;
  display: inline-block;
  margin-bottom: 12px;
}

.org-structure-section .section-header p {
  font-size: 16px;
  color: var(--text-secondary);
}

.org-tree-container {
  width: 100%;
  overflow-x: auto;
  padding: 20px 0;
}

/* Scrollbar styling for desktop horizontal scroll if viewport is tight */
.org-tree-container::-webkit-scrollbar {
  height: 8px;
}

.org-tree-container::-webkit-scrollbar-track {
  background: var(--bg-alt);
  border-radius: 4px;
}

.org-tree-container::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}

.org-tree-container::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Tree container styling */
.org-tree-wrapper {
  min-width: max-content;
  /* Dynamically sizes to fit the full tree width without wrapping */
  display: flex;
  justify-content: flex-start;
  /* Starts from the left as requested */
  padding: 40px var(--space-3);
}

.org-tree {
  display: grid;
  grid-template-columns: 250px 90px auto;
  /* Enforces 3 distinct layout columns */
  align-items: center;
  /* Centered vertically relative to branches */
  position: relative;
  padding-left: 20px;
  /* Good breathing space from left */
  flex-shrink: 0;
  /* Prevent the main tree container from shrinking */
}

/* Root level (CEO) node styling */
.org-root {
  grid-column: 1;
  /* CEO card strictly stays in first grid column */
  width: 250px;
  /* Explicit width matching CEO card */
  flex-shrink: 0;
  position: relative;
}

/* Root node connector line to the right */
.org-root::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -90px;
  /* Match the grid gap column width */
  width: 90px;
  /* Match the grid gap column width */
  height: 2px;
  background-color: #CBD5E1;
  transform: translateY(-50%);
  z-index: 1;
  transition: background-color 0.3s ease;
}

/* Level 2 & 3 column container */
.org-branches {
  grid-column: 3;
  /* Branches strictly stay in the third grid column */
  display: flex;
  flex-direction: column;
  position: relative;
  flex-shrink: 0;
  /* Prevent branches column from shrinking */
}

/* Vertical trunk line on the left side of branches */
.org-branches::before {
  content: '';
  position: absolute;
  left: -45px;
  /* Halfway of the 90px gap */
  top: 43px;
  /* Center height of the first card (86px / 2) */
  bottom: 43px;
  /* Center height of the last card (86px / 2) */
  width: 2px;
  background-color: #CBD5E1;
  z-index: 1;
  transition: background-color 0.3s ease;
}

/* Individual Branch styling */
.org-branch {
  display: flex;
  align-items: center;
  position: relative;
  flex-shrink: 0;
  /* Prevent branch layout from shrinking */
}

.org-branch:not(:last-child) {
  margin-bottom: 28px;
  /* Stable spacing between level-2 branches */
}

/* Branch Grid Alignment for sub-level branches */
.org-branch:has(.org-sub-branches) {
  display: grid;
  grid-template-columns: 240px 80px 210px;
  /* Enforces 3 distinct layout columns within the branch */
  align-items: center;
}

/* Level 2 (Manager) Node */
.org-node {
  position: relative;
  flex-shrink: 0;
}

.org-node.parent-node {
  grid-column: 1;
  /* Manager card stays strictly in the first column of the branch grid */
  width: 240px;
  /* Explicit width matching Level 2 card */
}

.org-node.leaf-node {
  width: 210px;
  /* Explicit width matching Level 3 card */
}

.org-node.leaf-node:not(:last-child) {
  margin-bottom: 14px;
  /* Stable spacing between level-3 cards */
}

/* Level 2 Node horizontal connection extending to the left to meet the trunk line */
.org-node.parent-node::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -45px;
  /* Meet the halfway line of the 90px gap */
  width: 45px;
  height: 2px;
  background-color: #CBD5E1;
  transform: translateY(-50%);
  z-index: 1;
  transition: background-color 0.3s ease;
}

/* Level 2 Node horizontal connection extending to the right to meet Level 3 sub-levels */
.org-branch:has(.org-sub-branches) .org-node.parent-node::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -80px;
  /* Match the margin gap */
  width: 80px;
  /* Match the margin gap */
  height: 2px;
  background-color: #CBD5E1;
  transform: translateY(-50%);
  z-index: 1;
  transition: background-color 0.3s ease;
}

/* Level 3 Sub-branches Column */
.org-sub-branches {
  grid-column: 3;
  /* MUST occupy the third grid column of the branch grid to leave the second column as the gap */
  display: flex;
  flex-direction: column;
  position: relative;
  flex-shrink: 0;
  /* Prevent column from shrinking */
  width: 210px;
  /* Explicit width matching leaf cards to ensure alignment */
}

/* Level 3 vertical trunk line on the left side of sub-branches */
.org-sub-branches::before {
  content: '';
  position: absolute;
  left: -40px;
  /* Halfway of the 80px gap */
  top: 30px;
  /* Center of first card (60px / 2) */
  bottom: 30px;
  /* Center of last card (60px / 2) */
  width: 2px;
  background-color: #CBD5E1;
  z-index: 1;
  transition: background-color 0.3s ease;
}

/* Level 3 node connector extending left to meet sub-branch trunk line */
.org-node.leaf-node::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -40px;
  /* Meet the halfway line of the 80px gap */
  width: 40px;
  height: 2px;
  background-color: #CBD5E1;
  transform: translateY(-50%);
  z-index: 1;
  transition: background-color 0.3s ease;
}

/* Card Design & Aesthetic Details */
.org-card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid #E5E7EB;
  padding: 12px 18px;
  width: 240px;
  min-height: 86px;
  flex-shrink: 0;
  /* CRITICAL: Prevent cards from shrinking/compressing in flex container */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  z-index: 2;
}

.org-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.org-card .org-badge {
  align-self: flex-start;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 6px;
  border-radius: 4px;
  background-color: var(--bg-alt);
  color: var(--text-secondary);
  line-height: 1.2;
}

.org-card .org-card-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.org-card .org-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background-color: var(--bg-alt);
  color: var(--primary);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.org-card:hover .org-icon-wrapper {
  background-color: var(--primary);
  color: var(--white);
}

.org-card h3,
.org-card h4,
.org-card h5 {
  margin: 0;
  color: var(--primary-dark);
  line-height: 1.3;
}

.org-card h3 {
  font-size: 15px;
  font-weight: 700;
}

.org-card h4 {
  font-size: 13px;
  font-weight: 600;
}

.org-card h5 {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Custom styles for specific levels to establish strong visual hierarchy */

/* Root Level (CEO Card) */
.org-card.card-ceo {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  border: none;
  width: 250px;
  min-height: 96px;
  flex-shrink: 0;
  /* Prevent shrinking */
  box-shadow: 0 10px 20px rgba(31, 122, 62, 0.2);
}

.org-card.card-ceo:hover {
  box-shadow: 0 14px 28px rgba(31, 122, 62, 0.35);
  transform: translateY(-6px);
}

.org-card.card-ceo h3 {
  color: var(--white);
  font-size: 16px;
}

.org-card.card-ceo .org-icon-wrapper {
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--white);
}

.org-card.card-ceo:hover .org-icon-wrapper {
  background-color: var(--white);
  color: var(--primary-dark);
}

.org-card.card-ceo .org-badge {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

/* Level 2 (Manager/Director Cards) style */
.org-card.card-manager {
  border-left: 4px solid var(--primary);
}

.org-card.card-director {
  border-left: 4px solid var(--primary-dark);
}

.org-card.card-specialist,
.org-card.card-it,
.org-card.card-hr,
.org-card.card-admin,
.org-card.card-support {
  border-left: 4px solid var(--accent);
}

.org-card.card-manager .org-badge {
  background-color: #E6F4EA;
  color: var(--primary);
}

.org-card.card-director .org-badge {
  background-color: #E6F5F2;
  color: var(--primary-dark);
}

.org-card.card-specialist .org-badge,
.org-card.card-it .org-badge,
.org-card.card-hr .org-badge,
.org-card.card-admin .org-badge,
.org-card.card-support .org-badge {
  background-color: #E0F2F1;
  color: var(--accent);
}

/* Level 3 (Leaf Cards) style */
.org-card.card-leaf {
  width: 210px;
  min-height: 60px;
  background-color: #FAFBFD;
  padding: 10px 14px;
  border-left: 3px solid #9CA3AF;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  /* Prevent shrinking */
}

.org-card.card-leaf:hover {
  background-color: var(--white);
  border-left-color: var(--primary);
}

.org-card.card-leaf .org-icon-wrapper {
  width: 26px;
  height: 26px;
  border-radius: 4px;
}

/* Hover highlights for active paths */
.org-branch:hover>.parent-node>.org-card {
  border-color: var(--primary);
}

.org-branch:hover::before,
.org-branch:hover::after,
.org-branch:hover .org-node.parent-node::before,
.org-branch:hover .org-node.parent-node::after,
.org-branch:hover .org-sub-branches::before,
.org-branch:hover .org-node.leaf-node::before {
  background-color: var(--primary);
}

.org-tree:hover .org-root::after,
.org-tree:hover .org-branches::before {
  background-color: var(--primary);
}

/* Responsive (Mobile/Tablet View) */
@media (max-width: 992px) {
  .org-tree-container {
    padding: 10px 0;
    overflow-x: visible;
  }

  .org-tree-wrapper {
    min-width: 0;
    padding: 20px 0;
  }

  .org-tree {
    display: flex;
    /* Reset grid to flex column on mobile */
    flex-direction: column;
    gap: 48px;
    width: 100%;
    align-items: center;
  }

  .org-root {
    grid-column: auto;
    /* Reset grid position */
    margin-right: 0;
    /* Reset desktop margin */
    width: 100%;
    display: flex;
    justify-content: center;
  }

  /* Disable all desktop connector lines */
  .org-root::after,
  .org-branches::before,
  .org-node.parent-node::before,
  .org-branch:has(.org-sub-branches) .org-node.parent-node::after,
  .org-sub-branches::before,
  .org-node.leaf-node::before {
    display: none !important;
  }

  /* Mobile container of cards */
  .org-branches {
    grid-column: auto;
    /* Reset grid position */
    width: 100%;
    max-width: 480px;
    gap: 36px;
    align-items: center;
  }

  .org-branch,
  .org-branch:has(.org-sub-branches) {
    display: flex;
    /* Reset grid to flex column on mobile */
    flex-direction: column;
    width: 100%;
    gap: 20px;
    align-items: center;
  }

  .org-node {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-right: 0 !important;
    /* Reset desktop margins */
    grid-column: auto !important;
    /* Reset grid positions */
  }

  .org-node.leaf-node {
    margin-bottom: 0 !important;
    /* Reset desktop vertical margin spacing */
  }

  .org-card {
    width: 100%;
    max-width: 320px;
    text-align: center;
    align-items: center;
    border-left: none !important;
    min-height: 80px;
  }

  .org-card .org-card-content {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }

  /* Specific border tops instead of border lefts for cards on mobile */
  .org-card.card-ceo {
    border-top: none;
  }

  .org-card.card-manager {
    border-top: 4px solid var(--primary);
  }

  .org-card.card-director {
    border-top: 4px solid var(--primary-dark);
  }

  .org-card.card-specialist,
  .org-card.card-it,
  .org-card.card-hr,
  .org-card.card-admin,
  .org-card.card-support {
    border-top: 4px solid var(--accent);
  }

  .org-card.card-leaf {
    max-width: 260px;
    border-top: 3px solid #9CA3AF;
  }

  .org-card .org-badge {
    align-self: center;
  }

  /* Mobile vertical connector lines */
  /* Line from CEO to branches */
  .org-root::before {
    content: '';
    position: absolute;
    bottom: -48px;
    left: 50%;
    width: 2px;
    height: 48px;
    background-color: #CBD5E1;
    transform: translateX(-50%);
    z-index: 1;
  }

  /* Vertical line between parent node and sub-branches on mobile */
  .org-branch:has(.org-sub-branches) .parent-node::after {
    display: block !important;
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    width: 2px;
    height: 20px;
    background-color: #CBD5E1;
    transform: translateX(-50%);
    z-index: 1;
  }

  .org-sub-branches {
    grid-column: auto !important;
    /* Reset grid position */
    width: 100%;
    align-items: center;
    gap: 16px;
  }

  /* Top vertical lines for Level 3 items on mobile */
  .org-node.leaf-node::before {
    display: block !important;
    content: '';
    position: absolute;
    top: -16px;
    left: 50%;
    width: 2px;
    height: 16px;
    background-color: #CBD5E1;
    transform: translateX(-50%);
    z-index: 1;
  }
}

/* Flip Card Component */
.flip-card {
  background-color: transparent;
  perspective: 1000px;
  cursor: pointer;
  min-height: 250px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: left;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}

.org-card.card-leaf .org-icon-wrapper {
  width: 26px;
  height: 26px;
  border-radius: 4px;
}

/* Hover highlights for active paths */
.org-branch:hover>.parent-node>.org-card {
  border-color: var(--primary);
}

.org-branch:hover::before,
.org-branch:hover::after,
.org-branch:hover .org-node.parent-node::before,
.org-branch:hover .org-node.parent-node::after,
.org-hover .org-sub-branches::before,
.org-branch:hover .org-node.leaf-node::before {
  background-color: var(--primary);
}

.org-tree:hover .org-root::after,
.org-tree:hover .org-branches::before {
  background-color: var(--primary);
}

/* Responsive (Mobile/Tablet View) */
@media (max-width: 992px) {
  .org-tree-container {
    padding: 10px 0;
    overflow-x: visible;
  }

  .org-tree-wrapper {
    min-width: 0;
    padding: 20px 0;
  }

  .org-tree {
    display: flex;
    /* Reset grid to flex column on mobile */
    flex-direction: column;
    gap: 48px;
    width: 100%;
    align-items: center;
  }

  .org-root {
    grid-column: auto;
    /* Reset grid position */
    margin-right: 0;
    /* Reset desktop margin */
    width: 100%;
    display: flex;
    justify-content: center;
  }

  /* Disable all desktop connector lines */
  .org-root::after,
  .org-branches::before,
  .org-node.parent-node::before,
  .org-branch:has(.org-sub-branches) .org-node.parent-node::after,
  .org-sub-branches::before,
  .org-node.leaf-node::before {
    display: none !important;
  }

  /* Mobile container of cards */
  .org-branches {
    grid-column: auto;
    /* Reset grid position */
    width: 100%;
    max-width: 480px;
    gap: 36px;
    align-items: center;
  }

  .org-branch,
  .org-branch:has(.org-sub-branches) {
    display: flex;
    /* Reset grid to flex column on mobile */
    flex-direction: column;
    width: 100%;
    gap: 20px;
    align-items: center;
  }

  .org-node {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-right: 0 !important;
    /* Reset desktop margins */
    grid-column: auto !important;
    /* Reset grid positions */
  }

  .org-node.leaf-node {
    margin-bottom: 0 !important;
    /* Reset desktop vertical margin spacing */
  }

  .org-card {
    width: 100%;
    max-width: 320px;
    text-align: center;
    align-items: center;
    border-left: none !important;
    min-height: 80px;
  }

  .org-card .org-card-content {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }

  /* Specific border tops instead of border lefts for cards on mobile */
  .org-card.card-ceo {
    border-top: none;
  }

  .org-card.card-manager {
    border-top: 4px solid var(--primary);
  }

  .org-card.card-director {
    border-top: 4px solid var(--primary-dark);
  }

  .org-card.card-specialist,
  .org-card.card-it,
  .org-card.card-hr,
  .org-card.card-admin,
  .org-card.card-support {
    border-top: 4px solid var(--accent);
  }

  .org-card.card-leaf {
    max-width: 260px;
    border-top: 3px solid #9CA3AF;
  }

  .org-card .org-badge {
    align-self: center;
  }

  /* Mobile vertical connector lines */
  /* Line from CEO to branches */
  .org-root::before {
    content: '';
    position: absolute;
    bottom: -48px;
    left: 50%;
    width: 2px;
    height: 48px;
    background-color: #CBD5E1;
    transform: translateX(-50%);
    z-index: 1;
  }

  /* Vertical line between parent node and sub-branches on mobile */
  .org-branch:has(.org-sub-branches) .parent-node::after {
    display: block !important;
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    width: 2px;
    height: 20px;
    background-color: #CBD5E1;
    transform: translateX(-50%);
    z-index: 1;
  }

  .org-sub-branches {
    grid-column: auto !important;
    /* Reset grid position */
    width: 100%;
    align-items: center;
    gap: 16px;
  }

  /* Top vertical lines for Level 3 items on mobile */
  .org-node.leaf-node::before {
    display: block !important;
    content: '';
    position: absolute;
    top: -16px;
    left: 50%;
    width: 2px;
    height: 16px;
    background-color: #CBD5E1;
    transform: translateX(-50%);
    z-index: 1;
  }
}

/* Flip Card Component */
.flip-card {
  background-color: transparent;
  perspective: 1000px;
  cursor: pointer;
  min-height: 250px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: left;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.flip-card-front {
  padding: 0 !important;
  overflow: hidden;
  background-color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.flip-card-front-bg {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background-size: cover;
  background-position: center;
  filter: blur(4px) brightness(0.6);
  z-index: 0;
}

.flip-card-front h3 {
  position: relative;
  z-index: 1;
  color: var(--white);
  margin: 0;
  font-size: 24px;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.flip-card-front::after {
  content: 'Click to flip';
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.4);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  opacity: 0.9;
  z-index: 2;
  pointer-events: none;
}

.flip-card-back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--white);
  padding: var(--space-3);
  border: 1px solid var(--bg-alt);
}

/* ==========================================================================
   Mobile Overflow Fixes for News Page Sections
   ========================================================================== */
@media (max-width: 768px) {

  html,
  body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  .news-layout,
  .main-news-area,
  .sidebar-area {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  /* 1. OFFICIAL APPOINTMENT */
  #ceo-appointment {
    padding: 16px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  #ceo-appointment .grid {
    grid-template-columns: 1fr !important;
  }

  #ceo-appointment .grid>div {
    max-width: 100% !important;
  }

  #ceo-appointment .grid>div>div {
    max-width: 100% !important;
    height: auto !important;
  }

  /* 2. Testing Statistics Dashboard */
  #stats-dashboard-container {
    padding: 16px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .stats-header-group h3,
  .sidebar-area .card h3 {
    flex-wrap: wrap !important;
    word-break: break-word !important;
  }

  /* 3. Facebook Updates */
  .sidebar-area .card {
    padding: 16px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .sidebar-area .card iframe {
    max-width: 100% !important;
  }

  /* Catch-all for components in cards */
  img,
  svg,
  video,
  iframe {
    max-width: 100% !important;
  }

  /* Global mobile padding fix for cards */
  .card {
    padding: 16px !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
  }

  /* Fix flex wrapping issues for inline flex elements */
  .card>div[style*="min-width: 300px"] {
    min-width: 100% !important;
  }
}

/* Facebook Graph API Dynamic Feed Styles */
.fb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  width: 100%;
}

.fb-post-card {
  background: var(--bg-white);
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.fb-post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.fb-post-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--bg-alt);
}

.fb-post-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.fb-post-date {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.fb-post-message {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 16px;

  /* Text clamping for 4 lines */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.fb-post-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-top: auto;

  /* Search Overlay */
  .search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s ease, transform 0.2s ease;
  }

  .search-toggle:hover {
    background-color: var(--bg-alt);
    transform: scale(1.05);
  }

  .search-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    z-index: 2000;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: var(--shadow-md);
  }

  .search-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .search-form {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
  }

  .search-icon-input {
    position: absolute;
    left: 16px;
    color: var(--text-secondary);
  }

  .search-overlay input {
    width: 100%;
    padding: 16px 48px;
    font-size: 18px;
    border: none;
    background-color: transparent;
    outline: none;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
  }

  .search-overlay input::placeholder {
    color: #9CA3AF;
    font-weight: 400;
  }

  .close-search {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.2s ease;
  }

}

.hero-careers {
  padding: var(--space-7) 0;
  position: relative;
  color: var(--white);
  overflow: hidden;
  text-align: center;
}

.hero-careers::before {
  content: '';
  position: absolute;
  top: -10px;
  right: -10px;
  bottom: -10px;
  left: -10px;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../Images/Careers%20Page%20Header.jpg') center/cover no-repeat fixed;
  filter: blur(2px);
  z-index: 0;
}

.hero-careers .container {
  position: relative;
  z-index: 1;
}

.hero-careers h1,
.hero-careers p,
.hero-careers .breadcrumb,
.hero-careers .breadcrumb a {
  color: var(--white);
}

/* Search Overlay */
.search-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.search-toggle:hover {
  background-color: var(--bg-alt);
  transform: scale(1.05);
}

.search-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--white);
  z-index: 2000;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: var(--shadow-md);
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-icon-input {
  position: absolute;
  left: 16px;
  color: var(--text-secondary);
}

.search-overlay input {
  width: 100%;
  padding: 16px 48px;
  font-size: 18px;
  border: none;
  background-color: transparent;
  outline: none;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
}

.search-overlay input::placeholder {
  color: #9CA3AF;
  font-weight: 400;
}

.close-search {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, transform 0.2s ease;
}

.close-search:hover {
  color: var(--danger);
  transform: rotate(90deg);
}

.nav-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  flex-shrink: 0;
  align-items: center;
  gap: var(--space-2);
}

/* ------------------------------------- */
/*        ARABIC (RTL) STYLES          */
/* ------------------------------------- */

html[lang="ar"] body {
  font-family: 'Cairo', sans-serif;
  direction: rtl;
  text-align: right;
}


html[lang="ar"] .logo {
  font-size: 18px;
}

html[lang="ar"] .logo-img {
  margin-right: 0;
  margin-left: var(--space-1);
}

html[lang="ar"] .logo span {
  line-height: 1.2;
  text-align: right;
  display: inline-block;
}


html[lang="ar"] .nav-links {
  margin-left: 0;
  margin-right: 0;
  gap: var(--space-1);
  /* Reduced to 8px to fit */
  white-space: nowrap;
}

html[lang="ar"] .nav-link {
  font-size: 15px;
  /* Smaller font to ensure fit */
  padding: 4px 8px;
  /* Less padding */
}

html[lang="ar"] .nav-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  flex-shrink: 0;
  align-items: center;
  gap: var(--space-1);
  white-space: nowrap;
}

html[lang="ar"] .report-btn {
  padding: 6px 10px;
  font-size: 14px;
  white-space: nowrap;
}

html[lang="ar"] .search-icon-input {
  left: auto;
  right: 16px;
}

html[lang="ar"] .close-search {
  right: auto;
  left: 16px;
}

html[lang="ar"] .search-overlay input {
  padding: 16px 48px 16px 16px;
}

html[lang="ar"] .hero-content {
  margin-right: 0;
  margin-left: auto;
}

html[lang="ar"] .icon-box {
  margin-right: 0;
  margin-left: var(--space-3);
}

/* Fix grid alignments for RTL */
html[lang="ar"] .footer-grid>div {
  text-align: right;
}

html[lang="ar"] .social-icons {
  justify-content: flex-start;
}

html[lang="ar"] .copyright {
  flex-direction: row;
}

/* Language Switcher Styling */
.lang-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--bg-alt);
  color: var(--primary);
  font-weight: 600;
  font-size: 16px;
  transition: all 0.2s ease;
  border: 1px solid rgba(31, 122, 62, 0.1);
  text-decoration: none;
}

.lang-switch:hover {
  background-color: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

html[lang="ar"] .lang-switch {
  font-family: 'Inter', sans-serif;
}

/* RTL Support for Org Tree Layout Lines and Borders */
html[lang="ar"] .org-tree {
  padding-left: 0;
  padding-right: 20px;
}

html[lang="ar"] .org-root::after {
  right: auto;
  left: -90px;
}

html[lang="ar"] .org-branches::before {
  left: auto;
  right: -45px;
}

html[lang="ar"] .org-node.parent-node::before {
  left: auto;
  right: -45px;
}

html[lang="ar"] .org-branch:has(.org-sub-branches) .org-node.parent-node::after {
  right: auto;
  left: -80px;
}

html[lang="ar"] .org-sub-branches::before {
  left: auto;
  right: -40px;
}

html[lang="ar"] .org-node.leaf-node::before {
  left: auto;
  right: -40px;
}

/* RTL Org Tree Card Borders */
html[lang="ar"] .org-card.card-manager {
  border-left: 1px solid #E5E7EB;
  border-right: 4px solid var(--primary);
}

html[lang="ar"] .org-card.card-director {
  border-left: 1px solid #E5E7EB;
  border-right: 4px solid var(--primary-dark);
}

html[lang="ar"] .org-card.card-specialist,
html[lang="ar"] .org-card.card-it,
html[lang="ar"] .org-card.card-hr,
html[lang="ar"] .org-card.card-admin,
html[lang="ar"] .org-card.card-support {
  border-left: 1px solid #E5E7EB;
  border-right: 4px solid var(--accent);
}

html[lang="ar"] .org-card.card-leaf {
  border-left: 1px solid #E5E7EB;
  border-right: 3px solid #9CA3AF;
}

html[lang="ar"] .org-card.card-leaf:hover {
  border-left-color: #E5E7EB;
  border-right-color: var(--primary);
}

/* RTL Form Inputs */
html[lang="ar"] input[type="tel"],
html[lang="ar"] input[type="email"] {
  text-align: right;
  direction: rtl;
}

/* RTL Flip Cards */
html[lang="ar"] .flip-card-inner {
  text-align: right;
}

/* RTL List Disc */
html[lang="ar"] .list-disc {
  margin-left: 0;
  margin-right: 20px;
}

/* RTL Stats Table */
html[lang="ar"] .stats-table {
  text-align: right;
}

/* RTL Dashboard Search Input */
html[lang="ar"] .stats-search-input {
  padding: 8px 36px 8px 12px;
}

/* Mobile Navigation Adjustments (Global & RTL) */
@media (max-width: 640px) {

  .logo-img,
  html[lang="ar"] .logo-img {
    height: 56px;
    /* Bigger logo image */
  }

  /* English Logo Text */
  .logo span {
    font-size: 22px;
  }

  /* Arabic Logo Text (kept slightly smaller because it's two long lines) */
  html[lang="ar"] .logo span {
    font-size: 16px;
  }

  .logo {
    gap: 6px;
    font-size: 22px;
  }

  html[lang="ar"] .logo {
    font-size: 16px;
  }

  .nav-actions,
  html[lang="ar"] .nav-actions {
    gap: 6px;
  }

  .lang-switch,
  html[lang="ar"] .lang-switch {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .search-toggle,
  .mobile-toggle {
    padding: 6px;
  }
}