/* ====== VARIABLES & GENERAL ====== */
:root {
  --primary-color: #3685d8;
  --primary-hover: #2f72bf;
  --text-dark: #0f172a;
  --text-light: #d1d5db;
  --bg-dark: #000;
  --bg-light-start: rgba(245, 247, 248, 0.85);
  /* Added transparency for blur */
  --bg-light-end: rgba(230, 235, 238, 0.85);
  /* Added transparency for blur */
  --font-primary: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --shadow-color: #004aad;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-dark);
  color: #fff;
  margin: 0;
  padding: 0;
}


@keyframes float {

  0%,
  100% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 0.6;
  }

  50% {
    transform: translateY(-100px) translateX(50px) rotate(180deg);
    opacity: 1;
  }

  90% {
    opacity: 0.6;
  }
}

/* ====== NAVBAR ====== */
.navbar {
  position: fixed;
  top: 1rem;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.navbar.hidden {
  transform: translateY(-120%);
  opacity: 0;
}

.nav-container {
  width: 100%;
  display: flex;
  justify-content: center;
}

.pill-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 90%;
  max-width: 1200px;
  border-radius: 9999px;
  padding: 1rem 1.5rem;
  background: linear-gradient(180deg, var(--bg-light-start) 0%, var(--bg-light-end) 100%);
  color: var(--text-dark);
  box-shadow: 0 6px 24px var(--shadow-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /* Safari support */
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: bold;
}

.nav-links {
  display: none;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-dark);
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--primary-color);
}


/* ====== MOBILE MENU ====== */
.nav-mobile {
  display: flex;
}

.menu-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.3rem;
  padding: 0;
}

.menu-icon .line {
  width: 1.5rem;
  height: 3px;
  background-color: var(--text-dark);
  border-radius: 9999px;
  transition: all 0.3s ease-in-out;
}

/* Hamburger to X animation */
.menu-icon.active .line-1 {
  transform: translateY(0.35rem) rotate(45deg);
}

.menu-icon.active .line-2 {
  opacity: 0;
}

.menu-icon.active .line-3 {
  transform: translateY(-0.35rem) rotate(-45deg);
}

/* Mobile Menu Panel */
.mobile-menu {
  position: fixed;
  top: 1rem;
  left: 50%;
  width: 90%;
  max-width: 400px;
  background: linear-gradient(180deg, rgb(245, 247, 248) 0%, rgb(230, 235, 238) 100%);
  color: var(--text-dark);
  border-radius: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  padding: 4rem 2rem 2rem;
  z-index: 1010;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -20px);
  /* Start slightly above */
  transition: transform 0.4s ease-out, opacity 0.4s ease-out, visibility 0s 0.4s;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.mobile-menu.mobile-menu-active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  /* End at the correct position */
  transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

.close-menu-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
}

.close-menu-btn svg {
  width: 100%;
  height: 100%;
  color: var(--text-dark);
}

.mobile-menu a {
  width: 100%;
  text-align: right;
  padding: 0.75rem 0;
  text-decoration: none;
  color: var(--text-dark);
  font-size: 1.25rem;
  font-weight: 500;
}

/* Menu backdrop */
.menu-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1005;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

.menu-backdrop.active {
  opacity: 1;
  visibility: visible;
}


/* ====== HERO SECTION ====== */
.hero-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  /* مهم لجعل الدائرة تتحرك داخل الـ hero فقط */
  padding-top: 40px;
  overflow: hidden;
  /* يمنع الدائرة من الخروج من الـ hero */
}

.hero-section {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
  padding: 0rem 1rem;
  z-index: 2;
  max-width: 1200px;
}

.hero-logo img {
  height: 12rem;
  width: auto;
}

.hero-text {
  flex: 1;
  animation: fadeInHero 1s ease-out forwards;
  /* أسرع من 2s */
  opacity: 0;
}


.hero-text h1 {
  font-weight: 800;
  font-size: 2rem;
  line-height: 1.2;
}

.hero-text p {
  margin-top: 1rem;
  max-width: 40rem;
  color: var(--text-light);
  font-size: 1rem;
}

.hero-btn {
  display: inline-block;
  margin-top: 1.5rem;
  background-color: var(--primary-color);
  color: #fff;
  padding: 0.75rem 3rem;
  border-radius: 0.375rem;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.3s;
}

.hero-btn:hover {
  background-color: var(--primary-hover);
  transform: scale(1.05);
}

/* ====== CHAT BUTTON ====== */
.chat-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background-color: var(--primary-color);
  padding: 1rem;
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s, transform 0.3s;
  z-index: 999;
}

.chat-btn:hover {
  background-color: var(--primary-hover);
  transform: scale(1.1);
}

.chat-btn svg {
  width: 1.5rem;
  height: 1.5rem;
  color: #fff;
  display: block;
  /* Fixes tiny alignment issues */
}


/* ====== ANIMATIONS ====== */
@keyframes fadeInHero {
  0% {
    opacity: 0;
    transform: translateY(20px);
    /* يظهر وكأنه يرتفع قليلاً */
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ====== RESPONSIVE ====== */
@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }

  .nav-mobile {
    display: none;
  }

  .mobile-menu,
  .menu-backdrop {
    display: none;
  }

  .hero-section {
    flex-direction: row;
    text-align: left;
    gap: 4rem;
  }

  .hero-logo img {
    height: 18rem;
  }

  .hero-text h1 {
    font-size: 3rem;
  }
}

@media (min-width: 1024px) {
  .hero-logo img {
    height: 24rem;
  }
}

/* ====== ANIMATED BACKGROUND CIRCLE ====== */

.animated-bg {
  position: absolute;
  top: -50px;
  /* يمكن تعديل موقع البداية */
  left: -50px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.245);
  filter: blur(40px);
  animation: flowAround 20s linear infinite;
  z-index: 0;
}

/* Circle flowing across the page */
@keyframes flowAround {
  0% {
    transform: translate(0%, 0%);
  }

  25% {
    transform: translate(80%, 10%);
  }

  50% {
    transform: translate(60%, 60%);
  }

  75% {
    transform: translate(10%, 50%);
  }

  100% {
    transform: translate(0%, 0%);
  }
}



/* Adjust size for smaller screens */
@media (max-width: 767px) {
  .animated-bg {
    width: 200px;
    height: 200px;
    filter: blur(40px);
  }
}

/* ====== STATS SECTION ====== */
.stats-section {
  background-color: #fff;
  color: var(--primary-color);
  padding: 6rem 2rem;
  text-align: center;
}

.stats-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}

.stats-title::after {
  content: '';
  position: absolute;
  width: 50%;
  height: 4px;
  background-color: var(--primary-color);
  bottom: -10px;
  left: 25%;
  border-radius: 2px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.stat-box {
  background: #f9f9f9;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.stat-box:hover {
  transform: translateY(-5px);
}

.stat-box h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-color);
  margin: 0;
}

.stat-box p {
  margin-top: 0.5rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: #333;
}

/* ====== TEAM SECTION ====== */
/* ====== TEAM SECTION ====== */
.team-section {
  background-color: #000000;
  color: #0f172a;
  padding: 6rem 2rem;
  text-align: center;
}

.team-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  color: white;

}

.team-title::after {
  content: '';
  position: absolute;
  width: 50%;
  height: 4px;
  background-color: white;
  bottom: -10px;
  left: 25%;
  border-radius: 2px;
  color: white;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.team-member {
  background: linear-gradient(135deg, #fff 0%, #f0f4ff 100%);
  border-radius: 1rem;
  padding: 1.8rem;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  max-width: 250px;
  /* حجم متوسط */
  margin: 1rem auto;
  transition: transform 0.4s, box-shadow 0.4s;
}

.team-member:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.team-member img {
  width: 100%;
  max-width: 180px;
  height: 180px;
  border-radius: 0.5rem;
  /* مربع بحواف ناعمة */
  object-fit: scale-down;
  margin-bottom: 1rem;
  border: 3px solid var(--primary-color);
}

.team-member h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--text-dark);
}

.team-member p {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 1rem;
  min-height: 2.4rem;
  /* يحافظ على توازن الكروت */
}

.team-member .social-icons {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.team-member .social-icons a {
  font-size: 1.3rem;
  color: #5ddf21;
  transition: transform 0.3s, color 0.3s;
}

.team-member .social-icons a:hover {
  color: #e3eaf1;
  transform: scale(1.2);
}


/* ====== PARTNERS SECTION ====== */
.partners-section {
  background: #fff;
  padding: 100px 20px;
  /* زودنا المساحة */
  text-align: center;
}

.partners-title {
  font-size: 3rem;
  /* أكبر */
  color: var(--primary-color);
  margin-bottom: 15px;
}

.partners-desc {
  color: #444;
  font-size: 1.3rem;
  margin-bottom: 60px;
}

.partners-slider {
  overflow: hidden;
  position: relative;
  max-width: 1200px;
  /* وسعنا العرض */
  margin: 0 auto;
}

.partners-track {
  display: flex;
  width: 200%;
  animation: scrollPartners 25s linear infinite;
  /* أسرع شوي */
}

.partners-group {
  display: flex;
  gap: 80px;
  /* زودنا الفراغ */
  align-items: center;
}

.partners-group img {
  height: 150px;
  width: auto;
  filter: grayscale(0%);
  /* أزلنا اللون الأسود */
  transition: transform 0.3s, filter 0.3s;
}

.partners-group img:hover {
  transform: scale(1.2);
  /* تكبير عند المرور */
  filter: brightness(1.2);
  /* يبرز اللون شوي */
}

@keyframes scrollPartners {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 767px) {
  .partners-track {
    animation-duration: 12s; /* أسرع من 25s */
  }

  .partners-group {
    gap: 40px; /* أقل فراغ لتناسب الشاشات الصغيرة */
  }

  .partners-group img {
    height: 100px; /* أصغر على الموبايل */
  }
}

/* ====== DYNAMIC DIVIDER ====== */


.dynamic-divider {
  position: relative;
  height: 220px;
  width: 100%;
  overflow: hidden;
  background: #000;
}

/* Waves */
.wave {
  position: absolute;
  bottom: 0;
  width: 200%;
  height: 100px;
  background: rgba(0, 74, 173, 0.7);
  border-radius: 100% 50%;
  animation: waveMove 8s linear infinite;
}

.wave1 {
  left: -50%;
  animation-duration: 12s;
}

.wave2 {
  left: -60%;
  opacity: 0.5;
  height: 120px;
  background: rgba(0, 74, 173, 0.5);
  animation-duration: 18s;
}

.wave3 {
  left: -70%;
  opacity: 0.3;
  height: 140px;
  background: rgba(255, 255, 255, 0.15);
  animation-duration: 25s;
}

@keyframes waveMove {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(50%);
  }
}

/* Bubbles */
.bubble {
  position: absolute;
  bottom: -60px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  opacity: 0.6;
  animation: rise 12s infinite ease-in;
}

.bubble:nth-child(4) {
  left: 25%;
  width: 25px;
  height: 25px;
  animation-delay: 2s;
}

.bubble:nth-child(5) {
  left: 50%;
  width: 15px;
  height: 15px;
  animation-delay: 4s;
}

.bubble:nth-child(6) {
  left: 70%;
  width: 30px;
  height: 30px;
  animation-delay: 6s;
}

.bubble:nth-child(7) {
  left: 85%;
  width: 20px;
  height: 20px;
  animation-delay: 8s;
}

@keyframes rise {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.6;
  }

  50% {
    transform: translateY(-120px) scale(1.2);
    opacity: 0.9;
  }

  100% {
    transform: translateY(-250px) scale(0.8);
    opacity: 0;
  }
}


/* ====== FOOTER ====== */
.footer {
  background-color: #0f172a;
  color: var(--text-light);
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.875rem;
  position: relative;
  z-index: 1;
}

.footer a {
  color: var(--text-light);
  margin: 0 0.75rem;
  text-decoration: none;
  transition: color 0.3s;
}

.footer a:hover {
  color: var(--primary-color);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
  }
}

/* End of style.css */
/* Default state */
.partners-section,
.team-section,
.stats-section {
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s ease-out;
}

/* When visible */
.partners-section.visible,
.team-section.visible,
.stats-section.visible {
  opacity: 1;
  transform: translateY(0);
}
/* End of style.css */