:root {
  --primary: #0a2463;
  --secondary: #1c77c3;
  --accent: #40a8c4;
  --white: #ffffff;
  --gray: #f5f5f5;
  --text: #333333;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  line-height: 1.6;
  text-align: justify;
  color: var(--text);
}

/* Loading Screen */
#loading-screen {
  position: fixed;
  inset: 0;
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity 0.5s;
}

.loader {
  width: 50px;
  height: 50px;
  border: 4px solid var(--gray);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--primary);
  color: var(--white);
  z-index: 100;
  transition: background-color 0.3s;
}

nav {
  max-width: 1200px;
  position: relative;
  top: 50px;
  background: var(--primary);
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: top 0.3s ease-in-out;
}
.nav-scrolled .top-bar {
  top: -50px; /* hide the top-bar */
}

.nav-scrolled nav {
  top: 0; /* move nav to very top */
}
.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.logo-text h1 {
  font-size: 1.8rem;
  margin: 0;
}

.logo-text span {
  font-size: 0.8rem;
  opacity: 0.9;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  transition: opacity 0.3s;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--white);
  transition: width 0.3s;
}

.nav-links a:hover::after {
  width: 100%;
}

.dropdown {
  position: relative;
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--primary);
  min-width: 200px;
  padding: 1rem 0;
  border-radius: 0 0 8px 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.dropdown:hover .dropdown-content,
.dropdown.active .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-content li {
  padding: 0.5rem 1rem;
}

.dropdown-content a {
  display: block;
  padding: 0.5rem;
}

.menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-btn span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--white);
  margin: 5px 0;
  transition: 0.3s;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("https://images.pexels.com/photos/1550337/pexels-photo-1550337.jpeg?auto=compress&cs=tinysrgb&w=1600")
      center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding: 2rem;
}

.hero-content {
  max-width: 800px;
  animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

/* About Section */
.about {
  padding: 6rem 2rem;
  background: var(--white);
}

.about-content {
  max-width: 1200px;
  margin: 0 auto;
}

h2 {
  text-align: center;
  position: relative;
  margin-bottom: 3rem;
  font-size: 2.5rem;
  color: var(--primary);
}

h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

.expandable {
  height: 0;
  overflow: hidden;
  transition: height 0.3s ease-out;
  opacity: 0;
}

.expandable.active {
  height: auto;
  opacity: 1;
  margin-top: 1rem;
}

.card {
  background: var(--white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.read-more {
  background: none;
  border: none;
  color: var(--secondary);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.5rem 0;
  transition: var(--transition);
}

.read-more:hover {
  color: var(--primary);
}

.read-more::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid;
  border-bottom: 2px solid;
  transform: rotate(45deg);
  transition: var(--transition);
}

.read-more.active::after {
  transform: rotate(-135deg);
}

.vm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}

.vm-card {
  padding: 2.5rem;
  background: var(--gray);
  border-radius: 12px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.vm-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.vm-card:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-5px);
}

.objectives-list {
  padding-left: 1.5rem;
}

.objectives-list li {
  margin-bottom: 0.8rem;
}

/* Milestones Section */
.milestones {
  padding: 6rem 2rem;
  background: var(--gray);
}

.timeline {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}

.milestone {
  margin-bottom: 4rem;
  position: relative;
}

.milestone::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: var(--secondary);
}

.milestone-content {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.1);
  width: calc(50% - 30px);
  position: relative;
}

.milestone:nth-child(odd) .milestone-content {
  margin-left: auto;
}

/* Organogram Section */
.organogram {
  padding: 3rem 1rem;
  background: white;
}

/* Chart Layout */
.org-chart {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.85);
}

/* Levels */
.level {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin: 1rem 0;
  position: relative;
}

.level.single {
  flex-direction: column;
  align-items: center;
}

.level.branches {
  justify-content: space-around;
  width: 100%;
}

/* Branch */
.branch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Nodes */
.node {
  background: linear-gradient(135deg, #0056b3, #007bff);
  color: white;
  padding: 1rem;
  border-radius: 10px;
  min-width: 200px;
  text-align: center;
  transition: 0.3s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.node.small {
  min-width: 150px;
  font-size: 0.9rem;
}

.node:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.node.observers {
  background: linear-gradient(135deg, #f9a825, #fdd835);
  border-radius: 50px;
}

/* Connectors */
.connector-vertical {
  width: 2px;
  height: 50px;
  background: #007bff;
  margin: 1px auto;
}

.connector-vertical.short {
  height: 25px;
}

.connector-horizontal.big {
  width: 60%;
  height: 2px;
  background: #007bff;
  margin: 10px auto;
}

.horizontal-split-small {
  width: 120px;
  height: 2px;
  background: #007bff;
  margin: 5px auto;
}

.horizontal-pair {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Footer */
footer {
  background: var(--primary);
  color: var(--white);
  padding: 4rem 2rem 1rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
}

.footer-section h3 {
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-section h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.8rem;
}

.footer-section a {
  color: var(--white);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.footer-section a:hover {
  opacity: 1;
}

.footer-bottom {
  text-align: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Utility Classes */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.primary {
  background: var(--primary);
  color: var(--white);
}

.primary:hover {
  background: #061539;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.secondary:hover {
  background: var(--white);
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.animate {
  animation: fadeUp 0.8s ease-out forwards;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .menu-btn {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    right: -100%;
    flex-direction: column;
    background: var(--primary);
    width: 80%;
    height: calc(100vh - 70px);
    padding: 2rem;
    transition: 0.3s;
  }

  .nav-links.active {
    right: 0;
  }

  .dropdown-content {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    padding: 0;
  }

  .dropdown.active .dropdown-content {
    display: block;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .milestone-content {
    width: 100%;
    margin-left: 0 !important;
  }

  .milestone::before {
    left: 20px;
  }

  .level {
    flex-direction: column;
  }

  .connector.horizontal {
    display: none;
  }
}

.top-bar {
  background-color: #0056b3;
  color: white;
  padding: 10px 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 999;
  transition: top 0.4s ease-in-out;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.top-bar a {
  color: white;
  margin-left: 20px;
  text-decoration: none;
}

.donate-btn {
  background-color: #ffc107;
  color: #000;
  border-radius: 20px;
  padding: 5px 15px;
  text-decoration: none;
}
/* Tablet Adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  .vm-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .level:nth-child(4) {
    flex-wrap: wrap;
  }

  .node {
    min-width: 180px;
  }
}
