@import url('https://fonts.googleapis.com/css2?family=El+Messiri:wght@400..700&family=Tajawal:wght@200;300;400;500;700;800;900&display=swap');

:root {
  --primary-color: #5A7345; /* A deep, rich green for primary actions and accents */
  --secondary-color: #a1ce7c; /* A lighter, more vibrant green for secondary accents */
  --text-color-dark: #2F332C; /* A dark, almost black color for headings and main text */
  --text-color-light: #5A7345; /* The primary color, used for secondary text to create harmony */
  --light-bg: #eef1ff; /* A very light, subtle blue-grey for the overall background */
  --card-bg: #ffffff; /* Pure white for cards and elements that need to stand out */
  --border-color: #dce1e6; /* A light grey for borders and lines */
  --dark-bg: #343a40; /* A dark charcoal for the footer and other dark sections */
  --accent-color: #ff6b6b;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --border-radius: 12px;
  --box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Tajawal', sans-serif;
  line-height: 1.7;
  color: var(--text-color-dark);
  background-color: var(--light-bg);
  direction: rtl;
  overflow-x: hidden;
}

/* Header & Navigation */
header {
  background-color: white;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo img {
  height: 45px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-color-dark);
  font-weight: 700;
  font-family: 'El Messiri', serif;
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  transition: var(--transition);
  font-size: 1.05rem;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
  background-color: rgba(90, 115, 69, 0.05);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.nav-link:hover::after {
  width: 70%;
}

.nav-action .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.8rem;
  background: linear-gradient(135deg, var(--primary-color), #4a6038);
  color: white;
  border: none;
  border-radius: 50px;
  font-weight: 700;
  font-family: 'El Messiri', serif;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  font-size: 1.05rem;
  box-shadow: 0 4px 15px rgba(90, 115, 69, 0.3);
}

.nav-action .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(90, 115, 69, 0.4);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #1da851);
}

.btn-whatsapp:hover {
  background: linear-gradient(135deg, #1da851, #188b44);
}

.hamburger {
   display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: var(--transition);
}

.bar {
  width: 28px;
  height: 3px;
  background-color: var(--text-color-dark);
  margin: 4px 0;
  transition: var(--transition);
  border-radius: 2px;
}

/* Hero Section */
.hero-section {
  padding: 14rem 5% 7rem;
  background: linear-gradient(135deg, rgba(90, 115, 69, 0.9) 0%, rgba(74, 96, 56, 0.95) 100%), url('https://images.unsplash.com/photo-1506126700336-2511a3a09999?ixlib=rb-4.0.3&auto=format&fit=crop&w=1950&q=80');
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
  margin-top: 70px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.hero-section h1 {
  font-family: 'El Messiri', serif;
  font-size: 3.2rem;
  font-weight: 700;
  margin-bottom: 1.8rem;
  line-height: 1.3;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  position: relative;
}

.hero-section p {
  font-family: 'Tajawal', sans-serif;
  font-size: 1.4rem;
  max-width: 750px;
  margin: 0 auto 2.5rem;
  opacity: 0.95;
  font-weight: 400;
  line-height: 1.8;
}

.btn-primary {
  background: linear-gradient(135deg, var(--secondary-color), #8abf5a);
  color: var(--text-color-dark);
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 700;
  font-family: 'El Messiri', serif;
  text-decoration: none;
  display: inline-block;
  transition: var(--transition);
  border: none;
  font-size: 1.2rem;
  box-shadow: 0 6px 20px rgba(161, 206, 124, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: 0.5s;
}

.btn-primary:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(161, 206, 124, 0.5);
}

.btn-primary:hover::before {
  left: 100%;
}

/* Features Section */
.features-section {
  padding: 6rem 5% 4rem;
  background-color: var(--light-bg);
  position: relative;
}

.features-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(to top, white, transparent);
  z-index: 1;
}

.features-section h2 {
  text-align: center;
  font-family: 'El Messiri', serif;
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 4rem;
  color: var(--text-color-dark);
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.features-section h2::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

.features-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.feature-card {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  text-align: center;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 5px;
  background: var(--primary-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.feature-card:hover {
  transform: translateY(-15px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card i {
  font-size: 3.5rem;
  color: var(--primary-color);
  margin-bottom: 1.8rem;
  transition: var(--transition);
}

.feature-card:hover i {
  transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
  font-family: 'El Messiri', serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--text-color-dark);
  transition: var(--transition);
}

.feature-card p {
  font-family: 'Tajawal', sans-serif;
  color: var(--gray-700);
  margin-bottom: 2rem;
  line-height: 1.8;
  font-weight: 400;
  flex-grow: 1;
}

.learn-more {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 700;
  font-family: 'El Messiri', serif;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: var(--transition);
  font-size: 1.05rem;
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  border: 2px solid var(--primary-color);
  align-self: flex-start;
}

.learn-more:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateX(8px);
  box-shadow: 0 5px 15px rgba(90, 115, 69, 0.3);
}

/* Services Section */
.services-section {
  padding: 6rem 5% 4rem;
  background-color: white;
  position: relative;
}

.services-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(to bottom, var(--light-bg), transparent);
  z-index: 1;
}

.services-section h2 {
  text-align: center;
  font-family: 'El Messiri', serif;
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 4rem;
  color: var(--text-color-dark);
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.services-section h2::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--secondary-color);
  border-radius: 2px;
}

.services-section .container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  position: relative;
  z-index: 2;
}

.card {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  text-align: center;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 5px;
  background: var(--secondary-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.card:hover {
  transform: translateY(-15px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.card:hover::before {
  transform: scaleX(1);
}

.card i {
  font-size: 3rem;
  color: var(--secondary-color);
  margin-bottom: 1.8rem;
  transition: var(--transition);
}

.card:hover i {
  transform: scale(1.1) rotate(5deg);
}

.card h3 {
  font-family: 'El Messiri', serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--text-color-dark);
  transition: var(--transition);
}

.card p {
  font-family: 'Tajawal', sans-serif;
  color: var(--gray-700);
  margin-bottom: 2rem;
  line-height: 1.8;
  font-weight: 400;
  flex-grow: 1;
}

/* Specialists Section */
.specialists-section {
  padding: 6rem 5% 4rem;
  background-color: var(--light-bg);
  position: relative;
}

.specialists-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(to top, white, transparent);
  z-index: 1;
}

.specialists-section h2 {
  text-align: center;
  font-family: 'El Messiri', serif;
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  color: var(--text-color-dark);
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.specialists-section h2::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

.therapist-carousel {
  display: flex;
  overflow-x: scroll;
  gap: 30px;
  scroll-behavior: smooth;
  padding: 30px 20px;
  margin-top: 30px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) var(--gray-200);
  -ms-overflow-style: none;
}

.therapist-carousel::-webkit-scrollbar {
  display: none;
}

.specialist-card {
  flex: 0 0 auto;
  width: 320px;
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  text-align: center;
  scroll-snap-align: start;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.specialist-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: var(--secondary-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.specialist-card:hover {
  transform: translateY(-15px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.specialist-card:hover::before {
  transform: scaleX(1);
}

.specialist-image-wrapper {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 2rem;
  border: 5px solid var(--gray-100);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.specialist-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
  filter: saturate(1.1);
}

.specialist-card:hover .specialist-image-wrapper {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.specialist-card:hover .specialist-image-wrapper img {
  transform: scale(1.1);
}

.specialist-card h3 {
  font-family: 'El Messiri', serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--text-color-dark);
  transition: var(--transition);
}

.specialist-card p {
  font-family: 'Tajawal', sans-serif;
  color: var(--primary-color);
  margin-bottom: 2rem;
  line-height: 1.6;
  font-size: 1.1rem;
  font-weight: 600;
  flex-grow: 1;
}

.btn-secondary {
  background: linear-gradient(135deg, var(--primary-color), #4a6038);
  color: white;
  padding: 0.8rem 1.8rem;
  border: none;
  border-radius: 50px;
  font-weight: 700;
  font-family: 'El Messiri', serif;
  text-decoration: none;
  display: inline-block;
  transition: var(--transition);
  font-size: 1.05rem;
  box-shadow: 0 4px 15px rgba(90, 115, 69, 0.3);
  align-self: flex-start;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #4a6038, var(--primary-color));
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(90, 115, 69, 0.4);
}

/* Footer */
.site-footer {
  background-color: var(--dark-bg);
  color: white;
  padding: 5rem 5% 3rem;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-logo img {
  height: 60px;
  width: auto;
  margin-bottom: 1.5rem;
  filter: brightness(0) invert(1);
}

.footer-column p {
  font-family: 'Tajawal', sans-serif;
  color: var(--gray-400);
  line-height: 1.8;
  margin-bottom: 2rem;
  font-weight: 400;
  font-size: 1.05rem;
}

.footer-column h4 {
  font-family: 'El Messiri', serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: white;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-column h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 50px;
  height: 3px;
  background: var(--secondary-color);
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 1rem;
}

.footer-column ul li a {
  font-family: 'Tajawal', sans-serif;
  color: var(--gray-400);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 400;
  font-size: 1.05rem;
  padding: 0.3rem 0;
  display: block;
}

.footer-column ul li a:hover {
  color: var(--secondary-color);
  padding-right: 10px;
}

.social-icons {
  display: flex;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 50%;
  transition: var(--transition);
  text-decoration: none;
  font-size: 1.2rem;
  border: 2px solid transparent;
}

.social-icons a:hover {
  background-color: var(--primary-color);
  transform: translateY(-5px) scale(1.1);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 5px 15px rgba(90, 115, 69, 0.4);
}

.footer-bottom {
  text-align: center;
  padding-top: 3rem;
  margin-top: 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gray-500);
  font-family: 'Tajawal', sans-serif;
  font-size: 1rem;
  font-weight: 400;
}

/* Responsive Design */
@media (max-width: 992px) {
  .hero-section h1 {
    font-size: 2.6rem;
  }
  
  .hero-section p {
    font-size: 1.2rem;
  }
  
  .features-section h2,
  .services-section h2,
  .specialists-section h2 {
    font-size: 2.4rem;
  }
}

@media (max-width: 768px) {
  /* This is the updated code for a smoother drop-down animation */
  .nav-menu {
    position: fixed;
    left: 0;
    top: 78px;
    flex-direction: column;
    background-color: white;
    width: 100%;
    max-width: none;
    text-align: right;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    height: auto;
    overflow: hidden;
    z-index: 1000;
    
    /* Key properties for a smoother animation */
    max-height: 0;
    transition: max-height 0.7s cubic-bezier(0.5, 0, 0.3, 1);
    padding: 0 2rem;
  }
  
  .nav-menu.active {
    max-height: 500px;
    padding: 3rem 2rem;
  }
  
  .nav-item {
    margin: 1.2rem 0;
  }
  
  .hamburger {
    display: flex;
    z-index: 1001;
  }
  
  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background-color: var(--primary-color);
  }
  
  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background-color: var(--primary-color);
  }
  
  .hero-section {
    padding: 12rem 5% 6rem;
  }
  
  .hero-section h1 {
    font-size: 2.2rem;
  }
  
  .features-section,
  .services-section,
  .specialists-section {
    padding: 5rem 5% 3rem;
  }
  
  .features-section h2,
  .services-section h2,
  .specialists-section h2 {
    font-size: 2.2rem;
  }
  
  .therapist-carousel {
    padding: 20px 15px;
    gap: 20px;
  }
  
  .specialist-card {
    width: 280px;
    padding: 2rem;
  }
  
  .specialist-image-wrapper {
    width: 140px;
    height: 140px;
    margin-bottom: 1.5rem;
  }
  
  .specialist-card h3 {
    font-size: 1.6rem;
  }
}

@media (max-width: 576px) {
  .nav-action {
    display: none;
  }
  
  .hero-section h1 {
    font-size: 1.9rem;
  }
  
  .hero-section p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
  }
  
  .btn-primary {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
  }
  
  .features-section h2,
  .services-section h2,
  .specialists-section h2 {
    font-size: 1.9rem;
  }
  
  .feature-card,
  .card {
    padding: 2rem;
  }
  
  .feature-card h3,
  .card h3,
  .specialist-card h3 {
    font-size: 1.5rem;
  }
  
  .therapist-carousel {
    padding: 15px 10px;
  }
  
  .specialist-card {
    width: 260px;
    padding: 1.8rem;
  }
  
  .specialist-image-wrapper {
    width: 130px;
    height: 130px;
  }
  
  .footer-container {
    gap: 2.5rem;
  }
  
  .footer-column h4 {
    font-size: 1.4rem;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

.feature-card,
.card,
.specialist-card {
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

.feature-card:nth-child(1),
.card:nth-child(1) {
  animation-delay: 0.1s;
}

.feature-card:nth-child(2),
.card:nth-child(2) {
  animation-delay: 0.3s;
}

.feature-card:nth-child(3),
.card:nth-child(3) {
  animation-delay: 0.5s;
}

.specialist-card:nth-child(1) { animation-delay: 0.1s; }
.specialist-card:nth-child(2) { animation-delay: 0.2s; }
.specialist-card:nth-child(3) { animation-delay: 0.3s; }
.specialist-card:nth-child(4) { animation-delay: 0.4s; }
.specialist-card:nth-child(5) { animation-delay: 0.5s; }
.specialist-card:nth-child(6) { animation-delay: 0.6s; }

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 2rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Button Styles */
.btn {
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Tajawal', sans-serif;
}

.btn:hover {
  opacity: 0.95;
  transform: translateY(-2px);
}

/* Scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar for Webkit */
.therapist-carousel::-webkit-scrollbar {
  height: 8px;
}

.therapist-carousel::-webkit-scrollbar-track {
  background: var(--gray-200);
  border-radius: 10px;
}

.therapist-carousel::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 10px;
}

/* Floating elements animation */
.hero-section h1 {
  animation: fadeInUp 1s ease forwards;
  opacity: 0;
  animation-delay: 0.3s;
}

.hero-section p {
  animation: fadeInUp 1s ease forwards;
  opacity: 0;
  animation-delay: 0.6s;
}

.btn-primary {
  animation: fadeInUp 1s ease forwards;
  opacity: 0;
  animation-delay: 0.9s;
}