:root {
  --primary-green: #16a34a;
  --primary-green-dark: #15803d;
  --light-green: #dcfce7;
  --blue-gradient-start: #1e3a8a;
  --blue-gradient-end: #1d4ed8;
}

* {
  font-family: 'Cairo', sans-serif;
}

body {
  background-color: #f8fafc;
  line-height: 1.6;
}

/* Smooth scrolling for the entire page */
html {
  scroll-behavior: smooth;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-green) !important;
}

.navbar-nav .nav-link {
  font-weight: 500;
  color: #374151 !important;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: var(--primary-green) !important;
}

.btn-primary {
  background-color: var(--primary-green);
  border-color: var(--primary-green);
  font-weight: 600;
}

.btn-primary:hover {
  background-color: var(--primary-green-dark);
  border-color: var(--primary-green-dark);
}

.btn-outline-primary {
  color: var(--primary-green);
  border-color: var(--primary-green);
  font-weight: 600;
}

.btn-outline-primary:hover {
  background-color: var(--primary-green);
  border-color: var(--primary-green);
}

.hero-section {
  background: linear-gradient(135deg, var(--light-green) 0%, #ffffff 100%);
  padding: 80px 0;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1.5rem;
}

.hero-text {
  font-size: 1.1rem;
  color: #6b7280;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.course-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-img-top {
  height: 250px;
  object-fit: contain;
  background-color: #071952;
}

.course-category {
  background-color: white;
  padding: 8px 15px;
  border-radius: 8px;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 160px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.course-category a {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.instructor-img {
  width: 32px;
  height: 32px;
  border: 1px solid #e5e7eb;
  object-fit: cover;
}

.instructor-name {
  font-size: 0.9rem;
  color: #4b5563;
}

.rating-stars {
  font-size: 0.9rem;
}

.badge.bg-success {
  padding: 5px 10px;
  font-weight: normal;
  font-size: 0.85rem;
}

@media (max-width: 767px) {
  .card-img-top {
    height: 250px;
  }

  .course-category {
    padding: 6px 12px;
    min-width: 140px;
  }
}

.teachers-section {
  background: var(--primary-green);
  color: white;
  position: relative;
  overflow: hidden;
}

.teachers-section::before {
  content: '';
  position: absolute;
  top: -100px;
  left: -100px;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}

.teachers-section::after {
  content: '';
  position: absolute;
  bottom: -150px;
  right: -150px;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.teacher-card {
  background: white;
  color: #1f2937;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  position: relative;
  z-index: 2;
}

.teacher-avatar {
  width: 80px;
  height: 80px;
  background: #e5e7eb;
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #6b7280;
}

.mission-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  background: var(--light-green);
  color: var(--primary-green);
  font-size: 1.5rem;
}

.section-title {
  color: #1f2937;
  font-weight: 700;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--primary-green);
  border-radius: 2px;
}

.faq-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
  background: white;
}

.faq-header {
  padding: 1rem 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  transition: background 0.3s ease;
}

.faq-header:hover {
  background: #f9fafb;
}

.faq-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-content-inner {
  padding: 0 1.5rem 1rem;
  color: #6b7280;
}

.faq-content.active {
  max-height: 200px;
}

.faq-icon {
  color: var(--primary-green);
}

.footer {
  background-color: #1f2937;
  color: #e5e7eb;
}

.footer h5 {
  color: white;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.footer-link {
  display: block;
  color: #9ca3af;
  margin-bottom: 0.75rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--primary-green);
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.1);
  color: white;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.social-icon:hover {
  background-color: var(--primary-green);
  transform: translateY(-2px);
}

.copyright {
  font-size: 0.875rem;
  color: #9ca3af;
  padding-top: 1.5rem;
  margin-top: 3rem;
  border-top: 1px solid #374151;
}

.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background-color: var(--primary-green);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.contact-form .form-control {
  border-radius: 8px;
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;
}

.contact-form .form-control:focus {
  box-shadow: none;
  border-color: var(--primary-green);
}

.contact-info {
  padding: 2rem;
  background-color: #f9fafb;
  border-radius: 12px;
}

.contact-item {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
}

.contact-icon {
  width: 40px;
  height: 40px;
  background-color: var(--light-green);
  color: var(--primary-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
}

@media (max-width: 991.98px) {
  .hero-section {
    padding: 60px 0;
  }

  .hero-title {
    font-size: 2rem;
  }
}

@media (max-width: 767.98px) {
  .hero-section {
    padding: 40px 0;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .section-title {
    margin-bottom: 2rem;
  }
}

/* Mobile Sidebar Styles */
.mobile-sidebar {
  position: fixed;
  top: 0;
  right: -280px; /* Start off-screen for RTL */
  width: 280px;
  height: 100%;
  background-color: #fff;
  z-index: 1050;
  overflow-y: auto;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease-in-out;
}

.mobile-sidebar.active {
  right: 0;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sidebar-header {
  border-bottom: 1px solid #e5e7eb;
}

.sidebar-logo {
  display: block;
  padding: 10px 0;
  text-align: center;
}

.sidebar-menu {
  padding-right: 0;
  margin-top: 1rem;
}

.sidebar-item {
  position: relative;
}

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: #374151;
  text-decoration: none;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.sidebar-link:hover {
  color: var(--primary-green);
  background-color: #f9fafb;
}

.sidebar-link.active {
  color: var(--primary-green);
  background-color: var(--light-green);
}

.sidebar-link i {
  margin-left: 10px;
  width: 20px;
  text-align: center;
}

.sidebar-auth {
  margin-top: 1.5rem;
}

.sidebar-auth .btn {
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.language-selector .btn {
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.875rem;
  font-weight: 500;
}

.language-selector .btn.active {
  box-shadow: none;
}

#sidebarToggle {
  border: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 6px 10px;
  transition: all 0.2s ease;
}

#sidebarToggle:hover {
  background-color: var(--primary-green-dark);
}

#sidebarToggle i {
  font-size: 1.25rem;
}

#sidebarClose {
  border: none;
  background-color: transparent;
  color: #6b7280;
  transition: all 0.2s ease;
  padding: 8px;
  border-radius: 50%;
}

#sidebarClose:hover {
  background-color: #f3f4f6;
  color: #1f2937;
}
