:root {
  --primary-color: #22b250;
  --secondary-color: #8f94fb;
  --accent-color: #bfff6b;
  --text-color: #333;
  --light-text: #fff;
  --background: #fff;
  --shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --header-height: 100px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  padding-top: var(--header-height);
  background: linear-gradient(to bottom, #f5f7fa, #e4e7ec);
  min-height: 100vh;
}

/* ================= HEADER ================= */
.main-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--light-text);
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  box-shadow: var(--shadow);
  transition: var(--transition);

  --primary-color: #22b250;
  --secondary-color: #8f94fb;
  --accent-color: #bfff6b;
  --text-color: #333;
  --light-text: #fff;
  --shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.main-header.scrolled {
  height: 70px;
  background: var(--primary-color);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
}

 .main-header .container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
 }

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

/* ---------- Logo ---------- */
.logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  perspective: 1000px;
}

.logo i {
  font-size: 2rem;
  color: #ff8a00;
  background: rgba(170, 161, 244, 0.91);
  padding: 0.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: var(--transition);
  animation: rotatePaw 5s ease-in-out infinite;
}

 .logo span {
  font-size: 2rem;
  color: #ff8a00;
  background: rgba(170, 161, 244, 0.91);
  padding: 0.5rem;
  border-radius: 50%;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  animation: rotatePaw 5s ease-in-out infinite;
 }

@keyframes rotatePaw {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(30deg); }
  50% { transform: rotate(0deg); }
  75% { transform: rotate(-30deg); }
  100% { transform: rotate(0deg); }
}

.logo h1 {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: .5;
  white-space: nowrap;
  margin: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  transition: var(--transition);
  background: linear-gradient(to right, hsl(84, 33%, 97%), #f6f3f3);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

 .main-header .logo {
  align-items: center;
 }

 .main-header .logo i,
 .main-header .logo span {
  vertical-align: middle;
 }

 .main-header .logo h1 {
  align-items: center;
 }

/* ---------- Navigation ---------- */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: clamp(0.6rem, 1.2vw, 1.1rem);
  margin: 0;
  padding: 0;
  align-items: center;
}

/* زر Sign In داخل قائمة الموبايل */
.main-nav ul .mobile-signin {
  display: none; /* يخفيه في الديسكتوب */
}

@media (max-width: 992px) {
  .main-nav ul .mobile-signin {
    display: block; /* يظهر في الموبايل والتابلت */
    margin-top: 1rem;
  }

  .main-nav ul .mobile-signin a {
    display: block;
    text-align: center;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    border: 2px solid #fff;
    color: #fff;
    font-weight: 800;
    transition: 0.3s;
  }

  .main-nav ul .mobile-signin a:hover {
    background: #fff;
    color: var(--primary-color);
  }
}


.main-nav a {
  display: inline-block;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--light-text);
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  background: transparent;
  border: 2px solid var(--light-text);
  transition: var(--transition);
}

 .main-header .main-nav ul li a {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
  font-size: clamp(0.98rem, 0.96vw, 1.1rem) !important;
  font-weight: 800 !important;
  color: var(--light-text) !important;
  padding: 0 0.85rem !important;
  border-radius: 50px !important;
  background: transparent !important;
  border: 2px solid var(--light-text) !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: clamp(108px, 8.6vw, 132px) !important;
  height: 38px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  transition: transform 160ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
 }

 .main-header .main-nav ul li a:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.95) !important;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
 }

 .main-header .main-nav ul li a:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
 }

 .main-header .main-nav ul li a:focus-visible {
  outline: none;
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.18),
    0 0 0 3px rgba(255, 255, 255, 0.34);
 }

 .main-header .main-nav ul li a.active,
 .main-header .main-nav ul li a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.92) !important;
  color: var(--primary-color) !important;
  border-color: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
 }

 .main-header a,
 .main-header button {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
 }

.main-nav a:hover {
  background: var(--light-text);
  color: var(--primary-color);
  box-shadow: var(--shadow);
}

.main-nav a.active {
  background: var(--light-text);
  color: var(--primary-color);
  font-weight: 800;
  box-shadow: var(--shadow);
}

/* ---------- Actions (Sign In + Menu) ---------- */
.header-actions {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1vw, 14px); /* مسافة بين الزرين */
}

/* زر تسجيل الدخول */
.header-actions .btn-secondary {
  background: transparent;
  color: var(--light-text);
  border: 2px solid var(--light-text);
  padding: clamp(0.25rem, 1vw, 0.5rem) clamp(0.6rem, 2vw, 1.2rem); /* بادينج مرن */
  min-width: clamp(70px, 15vw, 120px);   /* العرض يتكيف */
  min-height: clamp(28px, 5vw, 42px);    /* الارتفاع يتكيف */
  white-space: nowrap;
  border-radius: 50px;
  font-weight: 700;
  font-size: clamp(0.7rem, 1.8vw, 1rem); /* خط أصغر في الموبايل */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* هوفر */
.header-actions .btn-secondary:hover {
  background: rgba(255,255,255,0.15);
  color: var(--primary-color);
  border-color: var(--primary-color);
}


/* تأثير قبل الضغط */
.header-actions .btn-secondary:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2); /* شفاف */
  transition: width 0.4s ease;
  z-index: -1;
  border-radius: 50px;
}

.header-actions .btn-secondary:hover:before {
  width: 100%;
}

.header-actions .btn-secondary:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

/* زرار المنيو (hamburger) */
/* زر المينو (hamburger) يختفي افتراضياً */
/* زر المينو (مخفي افتراضياً) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 35px;
  height: 28px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 1100;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--light-text);
  margin: 4px 0;
  border-radius: 5px;
  transition: 0.3s;
}
/* شكل الـ X */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ---------- Desktop Navigation ---------- */
.main-nav {
  display: flex;
  gap: 2rem;
}

/* ---------- Mobile Navigation ---------- */
@media (max-width: 992px) {
  .hamburger {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    height: 100vh;
    background: var(--primary-color);
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: right 0.3s ease;
    z-index: 1000;
  }

  .main-nav.active {
    right: 0;
  }

  .main-nav ul {
    flex-direction: row;
    gap: 1.5rem;
    text-align: center;
  }

  .main-nav ul li a {
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
  }
}

/* ---------- Overlay ---------- */
.nav-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 900;
}
.nav-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ---------- Header Actions (Sign In) ---------- */
.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.header-actions .btn-secondary {
  font-size: clamp(0.8rem, 2.5vw, 1.1rem);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  white-space: nowrap;
}

/* ================= RESPONSIVE HEADER ================= */

/* التابلت والموبايل */
@media (max-width: 992px) {
  :root {
    --header-height: 70px; /* الهيدر يصغر */
  }

  .main-header {
    height: var(--header-height);
  }

  /* اللوجو */
  .logo i {
    font-size: 1.6rem;
    padding: 0.3rem;
  }

  .logo h1 {
    font-size: 1.2rem;
  }

  /* الروابط */
  .main-nav a {
    font-size: 1rem;
    padding: 0.5rem 1rem;
  }

  /* زرار Sign In */
  .header-actions .btn-secondary {
    font-size: 1rem;
    padding: 0.4rem 1rem;
  }
}

/* للموبايل الصغير جدًا */
@media (max-width: 480px) {
  :root {
    --header-height: 60px; /* يصغر أكتر */
  }

  .main-header {
    height: var(--header-height);
  }

  /* اللوجو */
  .logo i {
    font-size: 1.4rem;
  }

  .logo h1 {
    font-size: 1rem;
  }

  /* الروابط */
  .main-nav {
    width: 100%;
  }

  .main-nav ul {
    gap: 1rem;
  }

  .main-nav a {
    font-size: 0.9rem;
    padding: 0.6rem 0.8rem;
  }

  /* زرار Sign In */
  .header-actions .btn-secondary {
    font-size: 0.9rem;
    padding: 0.3rem 0.8rem;
  }
}


/* إصلاح نزول الأزرار تحت بعض */
.header-actions {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important; /* مسافة بينهم */
  flex-wrap: nowrap !important; /* مهم: يمنع النزول تحت بعض */
}

.header-actions .btn-secondary,
.header-actions .hamburger {
  flex-shrink: 0; /* يخلي الزر ما يصغرش لدرجة يطيح */
}
/* إصلاح نزول الأزرار تحت بعض */
.header-actions {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important; /* مسافة بينهم */
  flex-wrap: nowrap !important; /* مهم: يمنع النزول تحت بعض */
}

.header-actions .btn-secondary,
.header-actions .hamburger {
  flex-shrink: 0; /* يخلي الزر ما يصغرش لدرجة يطيح */
}
@media (max-width: 992px) {
  .header-actions .btn-secondary {
    display: none;
  }
}






/* ========== MOBILE MENU - Screenshot Design ========== */
@media (max-width: 992px) {
  /* Solid Blue Gradient Background */
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 380px;
    height: 100vh;
    background: linear-gradient(
      180deg,
      #2E86C1 0%,
      #3498DB 50%,
      #5DADE2 100%
    );
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    transition: right 0.35s ease;
    z-index: 1100;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
  }

  .main-nav.active {
    right: 0;
  }

  /* Navigation Links List - Larger Size */
  .main-nav ul {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    list-style: none;
    padding: 2.5rem 0 1.5rem;
    margin: 0;
  }

  .main-nav ul li {
    width: 100%;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .main-nav.active ul li {
    opacity: 1;
    transform: translateX(0);
  }

  .main-nav.active ul li:nth-child(1) { transition-delay: 0.1s; }
  .main-nav.active ul li:nth-child(2) { transition-delay: 0.15s; }
  .main-nav.active ul li:nth-child(3) { transition-delay: 0.2s; }
  .main-nav.active ul li:nth-child(4) { transition-delay: 0.25s; }
  .main-nav.active ul li:nth-child(5) { transition-delay: 0.3s; }

  /* Simple Text Links - Larger Size */
  .main-nav ul li a {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 1.65rem;
    font-weight: 500;
    padding: 1.9rem 2.75rem;
    width: 100%;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s ease;
    border: none;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }

  .main-nav ul li a:hover,
  .main-nav ul li a:focus {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
  }

  .main-nav ul li a.active,
  .main-nav ul li a[aria-current="page"] {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
  }

  /* Sign In Button Style */
  .main-nav ul .mobile-signin {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }

  .main-nav ul .mobile-signin a {
    background: rgba(255, 255, 255, 0.25);
    margin: 0.5rem 1.5rem;
    border-radius: 8px;
    justify-content: center;
  }

  /* Overlay */
  .nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 1099;
  }

  .nav-overlay.active {
    opacity: 1;
    pointer-events: all;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .main-nav {
    width: 90%;
    max-width: none;
  }

  .main-nav ul li a {
    font-size: 1.5rem;
    padding: 1.7rem 2.2rem;
    gap: 0;
  }

}
