/* Hadaef Vivid - The Vibrant Design System */
:root {
  /* Vibrant Palette */
  --primary: #7db96a;
  --primary-bright: #5cdb95;
  --accent: #379683;
  --deep-blue: #05386b;

  /* Gradients */
  --grad-main: linear-gradient(135deg, #7db96a 0%, #379683 100%);
  --grad-text: linear-gradient(to right, #1a1a1a, #05386b);
  --grad-glow: radial-gradient(circle, rgba(125, 185, 106, 0.4) 0%, rgba(55, 150, 131, 0) 70%);

  /* Glassmorphism */
  --glass-surface: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.8);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);

  /* Shapes */
  --radius-circle: 50%;
  --radius-pill: 50px;
  --radius-card: 24px;
}

/* --- Living Background Animation --- */
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f0f4f8;
  color: #1a1a1a;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* The Animated Orbs */
body::before, body::after {
  content: '';
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  animation: float-bg 10s infinite alternate;
}
body::before {
  background: rgba(125, 185, 106, 0.3); /* Hadaef Green */
  top: -100px; left: -100px;
}
body::after {
  background: rgba(55, 150, 131, 0.2); /* Teal Accent */
  bottom: -100px; right: -100px;
  animation-delay: -5s;
}

@keyframes float-bg {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(50px, 50px) scale(1.1); }
}

/* --- Interactive Floating Navbar --- */
.navbar {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1000px;
  height: 70px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px 0 24px;
  z-index: 1000;
  box-sizing: border-box;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  width: 92%; /* Expands slightly on hover */
}

/* CIRCULAR LOGO */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #1a1a1a;
  font-weight: 800;
  font-size: 1.25rem;
}

.nav-brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%; /* PERFECT CIRCLE */
  border: 2px solid white;
  box-shadow: 0 4px 10px rgba(125, 185, 106, 0.3);
  transition: transform 0.3s;
}

.nav-brand:hover img { transform: rotate(15deg) scale(1.1); }

.nav-menu { display: flex; gap: 8px; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch select {
  border-radius: var(--radius-pill);
  border: 1px solid #d7e5d1;
  padding: 10px 14px;
  font-weight: 700;
  background: linear-gradient(135deg, #f9fffa 0%, #f3f8f4 100%);
  color: #1f3a2d;
  outline: none;
  box-shadow: 0 10px 28px rgba(0,0,0,0.07);
  appearance: none;
  position: relative;
  padding-right: 38px;
  cursor: pointer;
}

.lang-switch {
  position: relative;
}
.lang-switch::after {
  content: "⌄";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  pointer-events: none;
  font-weight: 800;
}

.lang-switch.custom {
  min-width: 160px;
}
.lang-switch.custom .lang-btn {
  width: 100%;
  border: 1px solid #d7e5d1;
  border-radius: var(--radius-pill);
  padding: 10px 14px;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 0%, #f2f8f3 100%);
  color: #1f3a2d;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0,0,0,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.lang-switch.custom .lang-btn::after {
  content: "⌄";
  color: var(--primary);
  font-weight: 900;
}
.lang-switch.custom .lang-menu {
  display: none;
  list-style: none;
  padding: 8px;
  margin: 8px 0 0;
  position: absolute;
  width: 100%;
  background: #fff;
  border: 1px solid #e6f0e2;
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(0,0,0,0.08);
  z-index: 1001;
}
.lang-switch.custom.open .lang-menu { display: block; }
.lang-switch.custom .lang-menu li {
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  color: #2c3f35;
}
.lang-switch.custom .lang-menu li:hover {
  background: rgba(125, 185, 106, 0.12);
  color: var(--primary);
}
.lang-switch.custom .lang-menu li.active {
  background: rgba(125, 185, 106, 0.18);
  color: #0f2419;
}

.nav-menu .lang-switch.custom {
  width: 100%;
}
.nav-menu .lang-switch.custom .lang-btn {
  width: 100%;
  justify-content: space-between;
}
.nav-lang-mobile {
  margin-top: 8px;
  display: none;
}

.nav-download {
  padding: 12px 18px;
  font-size: 0.95rem;
}

.nav-link {
  text-decoration: none;
  color: #555;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.nav-toggle {
  display: none;
  background: rgba(255,255,255,0.8);
  border: 1px solid #d7e5d1;
  border-radius: 16px;
  padding: 10px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #1a1a1a;
  margin: 4px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Active/Hover State for Links */
.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: rgba(125, 185, 106, 0.1);
}

/* --- Hero Section --- */
.hero {
  text-align: center;
  padding: 180px 20px 100px;
  max-width: 900px;
  margin: 0 auto;
}

.hero-title {
  margin: 0 0 24px;
}

.hero-sub {
  margin: 0 auto 40px;
}

.hero-logo-container {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 20px auto 28px;
}

.hero-logo {
  width: 100%;
  height: 100%;
  border-radius: 50%; /* CIRCLE */
  border: 4px solid white;
  box-shadow: 0 0 40px rgba(125, 185, 106, 0.5); /* GLOW */
  animation: float-logo 6s ease-in-out infinite;
  background: white;
}

@keyframes float-logo {
  0%, 100% { transform: translateY(0); box-shadow: 0 0 40px rgba(125, 185, 106, 0.5); }
  50% { transform: translateY(-20px); box-shadow: 0 20px 60px rgba(125, 185, 106, 0.8); }
}

.hero h1 {
  font-size: 4rem;
  font-weight: 900;
  margin: 0 0 24px;
  line-height: 1.1;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1.5px;
}

.hero p {
  font-size: 1.35rem;
  color: #555;
  max-width: 600px;
  margin: 0 auto 40px;
}

/* --- Vibrant Buttons --- */
.btn-group { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

.btn {
  padding: 18px 40px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  transition: all 0.3s;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.btn-primary {
  background: var(--grad-main);
  color: white;
  box-shadow: 0 10px 25px rgba(125, 185, 106, 0.4);
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(125, 185, 106, 0.6);
}

.btn-secondary {
  background: white;
  color: var(--primary);
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.btn-secondary:hover {
  transform: translateY(-4px);
  color: var(--accent);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

#btn-p {
  box-shadow: 0 16px 36px rgba(55, 150, 131, 0.35), 0 0 0 6px rgba(125, 185, 106, 0.12);
  animation: pulse-btn 3s ease-in-out infinite;
}

@keyframes pulse-btn {
  0% { transform: translateY(0); box-shadow: 0 14px 30px rgba(55,150,131,0.35), 0 0 0 6px rgba(125,185,106,0.12); }
  50% { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(55,150,131,0.45), 0 0 0 10px rgba(125,185,106,0.18); }
  100% { transform: translateY(0); box-shadow: 0 14px 30px rgba(55,150,131,0.35), 0 0 0 6px rgba(125,185,106,0.12); }
}

/* --- Glass Cards Grid --- */
.features-section {
  padding: 60px 20px 120px;
  max-width: 1200px;
  margin: 0 auto;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid white;
  padding: 40px;
  border-radius: 32px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.card:hover {
  background: white;
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 50px rgba(0,0,0,0.08);
  border-color: var(--primary);
}

.card-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #e8f5e9 0%, #f0fff4 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 28px;
  color: var(--primary);
  transition: transform 0.3s;
}

.card:hover .card-icon { transform: rotate(10deg) scale(1.1); background: var(--grad-main); color: white; }

.card h3 { margin: 0 0 12px; font-size: 1.4rem; font-weight: 800; color: #1a1a1a; }
.card p { margin: 0; font-size: 1rem; color: #666; line-height: 1.6; }

/* --- FAQ Styles --- */
.faq-container { max-width: 800px; margin: 40px auto 100px; padding: 0 20px; }
.faq-item {
  background: white;
  border-radius: 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  overflow: hidden;
  transition: all 0.3s;
}
.faq-item[open] { box-shadow: 0 10px 30px rgba(125, 185, 106, 0.15); }

summary.faq-question {
  padding: 24px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  position: relative;
  color: #333;
  padding-inline-end: 48px;
}
summary.faq-question::after {
  content: '+';
  position: absolute;
  inset-inline-end: 24px;
  inset-inline-start: auto;
  font-size: 1.5rem;
  color: var(--primary);
  transition: 0.3s;
}
details[open] summary.faq-question::after { transform: rotate(45deg); }
.faq-answer { padding: 0 24px 24px; color: #666; line-height: 1.6; }

.legal-container {
  max-width: 900px;
  margin: 140px auto 80px;
  background: rgba(255,255,255,0.8);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  line-height: 1.7;
}

body[dir="rtl"] .navbar { flex-direction: row-reverse; }
body[dir="rtl"] .nav-menu { flex-direction: row-reverse; }
body[dir="rtl"] .nav-actions { flex-direction: row-reverse; }
body[dir="rtl"] .hero { text-align: center; }
body[dir="rtl"] .card, body[dir="rtl"] .faq-answer, body[dir="rtl"] .faq-question { text-align: right; direction: rtl; }
body[dir="rtl"] summary.faq-question { padding-inline-start: 48px; padding-inline-end: 24px; }
body[dir="rtl"] summary.faq-question::after {
  inset-inline-start: 24px !important;
  inset-inline-end: auto !important;
}
body[dir="rtl"] { direction: rtl; text-align: right; }
body[dir="rtl"] .nav-brand { flex-direction: row-reverse; justify-content: flex-start; }
body[dir="rtl"] .nav-brand span { margin-right: 6px; }
body[dir="rtl"] .nav-menu { justify-content: flex-end; }
body[dir="rtl"] .legal-container, body[dir="rtl"] .faq-container, body[dir="rtl"] .features-section { text-align: right; }
body[dir="rtl"] .lang-switch.custom .lang-btn { justify-content: center; }
.font-arabic {
  font-family: 'Cairo', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}
.font-arabic * {
  font-family: 'Cairo', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.navbar.modern-nav {
  position: fixed !important;
  top: 24px !important;
  left: 0 !important;
  right: 0 !important;
  transform: none !important;
  margin: 0 auto !important;
  max-width: 1100px !important;
  width: calc(100% - 80px) !important;
  justify-content: space-between !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
  z-index: 1100;
}
.navbar.modern-nav a,
.navbar.modern-nav .nav-link {
  color: #1a1a1a !important;
}

/* Mobile */
@media (max-width: 768px) {
  .navbar { padding: 0 16px; height: auto; flex-wrap: wrap; gap: 10px; box-sizing: border-box; }
  .navbar.modern-nav,
  .navbar {
    left: 16px !important;
    right: 16px !important;
    transform: none !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 12px 14px !important;
  }
  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
  }
  .nav-menu.open { display: flex; }
  .nav-actions { gap: 6px; width: 100%; justify-content: flex-start; display: none; }
  .nav-toggle { display: block; }
  .hero h1 { font-size: 2.8rem; }
  .nav-lang-mobile { display: block; }
}
