/* app.css - Bootstrap friendly overrides (RTL site) */
:root{
  --brand: var(--primaryprimary-500);
  --accent: var(--primarysecondarysecondary-500);
  --page-bg: var(--bg);
}

html, body { height: 100%; }
body{
  font-family: "IBM Plex Sans Arabic", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans Arabic", "Noto Sans", sans-serif;
  background: var(--page-bg);
}

.bg-page{ background: var(--page-bg); }
.bg-brand{ background-color: var(--brand) !important; }
.text-brand{ color: var(--brand) !important; }

.btn-accent{
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--accent);
  --bs-btn-hover-border-color: var(--accent);
  --bs-btn-focus-shadow-rgb: 47,170,225;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--accent);
  --bs-btn-active-border-color: var(--accent);
}

.section-pad{ padding: 3rem 0;}

#locations {
  color: #fff; padding: 3rem 0; background-image: url("img/locations.png");background-position: center;
}

#chairman {
  padding-bottom: 0;
}

 /* Org Tree CSS */
    .org-tree ul {
      padding-top: 20px; position: relative;
      transition: all 0.5s;
      display: flex;
      justify-content: center;
      padding-right: 0;
      margin-bottom: 0;
    }
    .org-tree li {
      float: left; text-align: center;
      list-style-type: none;
      position: relative;
      padding: 20px 10px 0 10px;
      transition: all 0.5s;
    }
    .org-tree li::before, .org-tree li::after {
      content: '';
      position: absolute; top: 0; right: 50%;
      border-top: 2px solid #dee2e6;
      width: 50%; height: 20px;
    }
    .org-tree li::after {
      right: auto; left: 50%;
      border-left: 2px solid #dee2e6;
    }
    .org-tree li:only-child::after { border-top: 0; }
    .org-tree li:only-child::before { display: none; }
    .org-tree li:only-child { padding-top: 0; }
    .org-tree li:first-child::after { display: none; }
    .org-tree li:last-child::before { display: none; }
    .org-tree li:first-child::before {
      border-right: 2px solid #dee2e6;
      border-radius: 0 5px 0 0;
    }
    .org-tree li:last-child::after {
      border-radius: 5px 0 0 0;
    }
    .org-tree ul ul::before {
      content: '';
      position: absolute; top: 0; left: 50%;
      border-left: 2px solid #dee2e6;
      width: 0; height: 20px;
    }
    .org-tree .node {
      display: inline-block;
      min-width: 140px;
      z-index: 2;
      position: relative;
      background: #fff;
    }
    
@media (min-width: 992px){
  .section-pad{ padding: 4rem 0; }
  .py-lg-6{ padding-top: 5rem !important; padding-bottom: 5rem !important; }
}

.hero{
  min-height: 70vh;
  display: grid;
  place-items: stretch;
}
.hero-bg{
  position: absolute;
  inset: 0;
  background-image: url("img/container.png");
  background-size: cover;
  background-position: center;
}
.hero-overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(41,58,136,.90) 0%, rgba(41,58,136,.80) 50%, rgba(41,58,136,.70) 100%);
}

.brand-logo{ width: auto; object-fit: contain; }

.bg-soft{ background: rgba(234, 235, 243, 0.55); }

.flag-img{
      width: auto;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #fff;
}

.service-card{
  border-radius: 0px;
  min-height: 350px;
  background-size: cover;
  background-position: left center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 0;
  overflow: hidden;
  transition: all 0.4s ease;
  position: relative;
  z-index: 1;
}
.service-card:hover {
  transform: scale(1.05);
  z-index: 10;
  box-shadow: 0 1rem 3rem rgba(0,0,0,0.25) !important;
}
.service-card .card-body {
  flex-grow: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
  color: #fff;
  width: 100%;
  padding-top: 3rem;
  transition: all 0.4s ease;
}
.service-card:hover .card-body {
  background: linear-gradient(0deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.5) 100%);
}
.service-card .hover-content {
  max-height: 0; opacity: 0; overflow: hidden; transition: all 0.5s ease;
}
.service-card:hover .hover-content {
  max-height: 200px; opacity: 1; margin-top: 1rem;
}
.footer .icon-sm{
  width: 18px;
  height: 18px;
}

.skip-link{
  position: absolute;
  top: .5rem;
  right: .5rem;
  z-index: 9999;
  background: #fff;
  color: #000;
  padding: .5rem .75rem;
  border-radius: .5rem;
}

/* Animation on scroll */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.service-item{
  border-radius: 0px;
  background-size: cover;
  background-position: left center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 0;
  overflow: hidden;
  transition: all 0.4s ease;
  position: relative;
  z-index: 1;
  color: #fff;
}
/* Next Article Button */
.next-article-btn {
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: bounce 2s infinite;
}

.next-article-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.next-article-btn:active {
  transform: translateY(-2px);
}

/* Scroll to Top Button */
.scroll-to-top-btn {
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: bounce-up 2s infinite;
}

.scroll-to-top-btn:hover {
  transform: translateY(5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.scroll-to-top-btn:active {
  transform: translateY(2px);
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes bounce-up {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
}

/* Content Animation Styles */
/* Fade in from left */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Fade in from right */
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scale in */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Slide up */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger animation for list items */
.service-item h2 {
  animation: fadeInLeft 0.8s ease-out 0.2s both;
}

.service-item p {
  animation: fadeInLeft 0.8s ease-out 0.4s both;
}

.service-item .d-flex {
  animation: scaleIn 0.6s ease-out 0.6s both;
}

.service-item .d-flex a {
  transition: all 0.3s ease;
}

.service-item .d-flex a:hover {
  transform: translateY(-5px);
}

/* Hero animation */
.hero h1 {
  animation: slideUp 0.9s ease-out 0.3s both;
}

.hero .lead {
  animation: slideUp 0.9s ease-out 0.5s both;
}

.hero .btn {
  animation: scaleIn 0.6s ease-out 0.7s both;
}

.hero .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Navbar animation */
.navbar {
  animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Social icons hover animation */
.service-item .link-light svg {
  transition: all 0.3s ease;
}

.service-item .link-light:hover svg {
  transform: scale(1.2) rotate(5deg);
}

/* Button hover animation */
.next-article-btn,
.scroll-to-top-btn {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.next-article-btn:hover,
.scroll-to-top-btn:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Footer animation */
.footer {
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Link hover animations */
.navbar-nav .nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background-color: currentColor;
  transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
  width: 100%;
}