:root {
  --brand: #2d6df6;
  --brand-2: #2dc8f6;
  --dark: #0f172a;
  --muted: #64748b;
  --bg: #0b1022;
  --card: #0f1530;
  --radius: 1.25rem;
  --radius-full: 999px;
  --transition: all 1s ease;
}

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

body {
  font-family: "Arial", "Tahoma", sans-serif;
  background: #ffffff;
  min-height: 100vh;
  overflow-x: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease;
  padding-top: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

/* Animated Background Elements */
.bg-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  animation: floatComplex 12s ease-in-out infinite;
  opacity: 0.06;
}

.shape:nth-child(1) {
  width: 320px;
  height: 320px;
  background: #239cb6;
  top: 5%;
  right: -160px;
  animation-delay: 0s;
}

.shape:nth-child(2) {
  width: 250px;
  height: 250px;
  background: #f9b43a;
  bottom: 20%;
  left: -125px;
  animation-delay: -4s;
}

.shape:nth-child(3) {
  width: 180px;
  height: 180px;
  background: #7c320c;
  top: 40%;
  right: 15%;
  animation-delay: -8s;
}

.shape:nth-child(4) {
  width: 140px;
  height: 140px;
  background: #239cb6;
  top: 70%;
  left: 20%;
  animation-delay: -2s;
}

@keyframes floatComplex {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg) scale(1);
  }

  25% {
    transform: translateY(-30px) rotate(90deg) scale(1.1);
  }

  50% {
    transform: translateY(-15px) rotate(180deg) scale(0.9);
  }

  75% {
    transform: translateY(-25px) rotate(270deg) scale(1.05);
  }
}

/* ====== NAVBAR ====== */
.navbar {
  position: sticky !important;
  top: 0;
  right: 0;
  z-index: 1000;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  background-color: rgba(35, 155, 182, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

/* Logo */
.navbar img {
  position: relative;
  top: 5px;
  right: 210px;
  width: 60px;
  height: auto;
}
@media (max-width: 992px) {
  .navbar img {
    display: block;
    position: absolute;
    top: -10px;
    right: 180px;
    margin-inline-end: 0.75rem;
  }
}

/* Brand text */
.navbar-brand {
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff !important;
  margin-inline-end: 4.5rem;
}

/* Links */
.navbar-nav .nav-link {
  font-weight: 500;
  color: #f0f4f8 !important;
  transition: var(--transition);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
}

.navbar-nav .nav-link:hover {
  color: #f9b43a !important;
}

/* Dropdown */
.dropdown-menu {
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.dropdown-item {
  font-weight: 500;
  color: #222;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  transition: var(--transition);
}

.dropdown-item:hover {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  color: #fff !important;
}

/* Submenu RTL fix */
.dropdown-submenu {
  position: relative;
}
.dropdown-submenu > .dropdown-menu {
  top: 0;
  right: 100%;
  left: auto;
  margin-top: -0.25rem;
}
@media (min-width: 992px) {
  .dropdown-submenu:hover > .dropdown-menu {
    display: block;
  }
}

/* Navbar when scrolled */
.navbar.scrolled {
  background: rgba(0, 0, 0, 0.285) !important;
}

/* Toggler */
.navbar-toggler {
  border: none;
}
.navbar-toggler:focus {
  box-shadow: none;
}
.navbar-toggler-icon {
  filter: invert(1);
}

/* Reading Progress */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 5px;
  background: linear-gradient(90deg, #f9b43a, #239cb6, #7c320c, #f9b43a);
  background-size: 200% 100%;
  z-index: 1000;
  transition: width 0.3s ease;
  animation: progressGlow 3s ease-in-out infinite;
}

@keyframes progressGlow {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* Header */
header {
  text-align: center;
  padding: 80px 20px 60px;
  position: relative;
}

.logo {
  font-size: 4rem;
  font-weight: bold;
  color: #7c320c;
  margin-bottom: 20px;
  text-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
  animation: logoGlow 5s ease-in-out infinite alternate;
}

@keyframes logoGlow {
  from {
    text-shadow: 4px 4px 10px rgba(124, 50, 12, 0.3),
      0 0 30px rgba(249, 180, 58, 0.2);
  }

  to {
    text-shadow: 4px 4px 10px rgba(124, 50, 12, 0.3),
      0 0 50px rgba(249, 180, 58, 0.6);
  }
}

.page-title {
  font-size: 2.2rem;
  color: #239cb6;
  font-weight: 700;
  margin-bottom: 10px;
}

.tagline {
  font-size: 1.2rem;
  color: #7c320c;
  opacity: 0.9;
  font-weight: 500;
}

/* Section Cards */
.section-card {
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: blur(25px);
  backdrop-filter: blur(25px);
  border-radius: 35px;
  margin: 40px 20px;
  padding: 50px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.18);
  position: relative;
  overflow: hidden;
  animation: slideUp 1.4s ease-out;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

@keyframes slideUp {
  from {
    transform: translateY(80px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.section-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
  background: linear-gradient(90deg, #f9b43a, #239cb6, #7c320c, #f9b43a);
  border-radius: 35px 35px 0 0;
  background-size: 300% 100%;
  animation: gradientFlow 8s ease-in-out infinite;
}

@keyframes gradientFlow {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* Phase Container */
.phase-container {
  margin: 60px 0;
  position: relative;
}

.phase-title {
  text-align: center;
  font-size: 2.2rem;
  color: #7c320c;
  margin-bottom: 40px;
  padding: 20px;
  background: rgba(249, 180, 58, 0.15);
  border-radius: 20px;
  border-right: 6px solid #f9b43a;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.phase-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 50px;
  font-style: italic;
}

/* Organizational Chart */
.org-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  margin: 50px 0;
}

.level {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  width: 100%;
  position: relative;
}

.org-box {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
  transition: all 0.4s ease;
  cursor: pointer;
  position: relative;
  min-width: 200px;
  text-align: center;
  border: 3px solid transparent;
}

.org-box:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.org-box.founding {
  background: linear-gradient(135deg, #f9b43a, #ff9800);
  color: white;
  border-color: #f9b43a;
}

.org-box.management {
  background: linear-gradient(135deg, #239cb6, #0097a7);
  color: white;
  border-color: #239cb6;
  background: linear-gradient(135deg, #239cb6, #5d4037);
}

.org-box.operational {
  background: linear-gradient(135deg, #7c320c, #5d4037);
  color: white;
  border-color: #7c320c;
}

.org-box-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.org-box-desc {
  font-size: 0.95rem;
  opacity: 0.9;
  line-height: 1.4;
}

/* Connection Lines */
.connection-line {
  position: absolute;
  background: linear-gradient(90deg, #f9b43a, #239cb6);
  height: 3px;
  border-radius: 2px;
  opacity: 0.6;
  animation: connectionPulse 3s ease-in-out infinite;
}

@keyframes connectionPulse {
  0%,
  100% {
    opacity: 0.6;
    transform: scaleX(1);
  }

  50% {
    opacity: 1;
    transform: scaleX(1.05);
  }
}

/* Phase Evolution */
.phase-evolution {
  margin-top: 80px;
  padding: 40px;
  background: rgba(35, 156, 182, 0.1);
  border-radius: 25px;
  border-right: 6px solid #239cb6;
}

.evolution-title {
  font-size: 1.8rem;
  color: #239cb6;
  margin-bottom: 25px;
  text-align: center;
}

.evolution-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.evolution-step {
  background: rgba(255, 255, 255, 0.9);
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.evolution-step:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.step-number {
  display: inline-block;
  width: 40px;
  height: 40px;
  background: linear-gradient(45deg, #f9b43a, #239cb6);
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
  font-weight: bold;
  margin-bottom: 15px;
}

.step-title {
  font-size: 1.3rem;
  color: #7c320c;
  margin-bottom: 10px;
  font-weight: 600;
}

.step-desc {
  color: #555;
  line-height: 1.6;
  font-size: 1.05rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .org-chart {
    gap: 30px;
  }

  .level {
    gap: 20px;
  }

  .org-box {
    min-width: 180px;
    padding: 20px;
  }

  .org-box-title {
    font-size: 1.2rem;
  }

  .org-box-desc {
    font-size: 0.9rem;
  }

  .evolution-steps {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .section-card {
    margin: 30px 15px;
    padding: 35px 25px;
  }

  .phase-title {
    font-size: 1.8rem;
  }
}

/* Loading animation */
.loaded {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Interactive Elements */
.highlight-orange {
  color: #f9b43a;
  font-weight: 700;
}

.highlight-brown {
  color: #7c320c;
  font-weight: 700;
}

.highlight-blue {
  color: #239cb6;
  font-weight: 700;
}
