/* Base and Reset Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base Colors */
: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 */
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', sans-serif;
    line-height: 1.8;
    background-color: var(--light-bg);
    color: var(--text-color-light);
    direction: rtl;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease, transform 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'El Messiri', sans-serif;
    color: #ffffff;
    line-height: 1.3;
}

p {
    line-height: 1.8;
}

/* --- Header & Navigation --- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: var(--card-bg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .logo-image {
    height: 60px;
    width: auto;
    display: block;
}

.nav-menu {
    transition: transform 0.4s ease;
}

.nav-links {
    display: flex;
    gap: 35px;
    list-style: none;
}

.nav-links a {
    font-weight: 500;
    font-size: 1.1rem;
    position: relative;
    color: var(--text-color-dark);
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: width 0.4s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.cta-header-button {
    background-color: var(--primary-color);
    color: var(--card-bg) !important;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(90, 115, 69, 0.2);
    transition: transform 0.3s ease;
}

.cta-header-button:hover {
    transform: translateY(-2px);
}

/* --- Hamburger Menu & Mobile Navigation --- */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 150;
    transition: all 0.3s ease;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-color-dark);
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    padding: 120px 20px;
    text-align: center;
}

.hero .container {
    padding: 0 20px;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto 40px;
    color: #ffffff;
}

/* --- About Page Specific Styles --- */
.about-intro-section, .about-content-section, .values-section {
    padding: 80px 0;
}

.about-intro-section {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 60px;
}

.about-intro-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.about-intro-section p {
    font-size: 1.2rem;
    line-height: 2;
    color: var(--text-color-dark);
}

.about-content-section {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 800px;
    margin: 0 auto 60px;
}

.about-block {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-right: 5px solid var(--primary-color);
}

.about-block h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-color-dark);
}

.about-block p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color-light);
}

.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    color: var(--text-color-dark);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: 50%;
    transform: translateX(50%);
    width: 90px;
    height: 5px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.value-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    border-bottom: 3px solid var(--secondary-color);
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}

.value-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.value-card h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-color-dark);
}

.value-card p {
    font-size: 1rem;
    color: var(--text-color-light);
}

/* --- 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 Styles --- */
@media (max-width: 768px) {
    .header {
        padding: 20px;
    }
    .hamburger-menu {
        display: flex;
    }
    .nav-menu {
        /* Drop-down animation properties */
        position: fixed;
        top: 80px; /* Position below the header */
        right: 0;
        width: 100%;
        max-height: 0; /* Initially collapsed */
        overflow: hidden;
        background-color: var(--card-bg);
        box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
        z-index: 120;
        transition: max-height 0.6s cubic-bezier(0.5, 0, 0.3, 1);
        display: flex;
        justify-content: center;
    }
    .nav-menu.active {
        /* When active, expand the menu */
        max-height: 500px; /* A value large enough to show all links */
    }
    .nav-links {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        height: auto; /* Allow height to be determined by content */
        gap: 20px; /* Reduced gap for a tighter look */
        padding: 20px 0;
    }
    .nav-links a {
        font-size: 1.2rem; /* Adjusted font size for better readability */
        opacity: 0;
        transform: translateY(-20px);
        transition: all 0.4s ease;
    }
    .nav-menu.active .nav-links a {
        opacity: 1;
        transform: translateY(0);
    }
    /* Staggered animation effect for each link */
    .nav-menu.active .nav-links li:nth-child(1) a { transition-delay: 0.1s; }
    .nav-menu.active .nav-links li:nth-child(2) a { transition-delay: 0.2s; }
    .nav-menu.active .nav-links li:nth-child(3) a { transition-delay: 0.3s; }
    .nav-menu.active .nav-links li:nth-child(4) a { transition-delay: 0.4s; }
    .cta-header-button {
        display: none;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero p {
        font-size: 1.2rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .values-grid {
        grid-template-columns: 1fr;
    }
    /* Existing mobile improvements - these are now replaced by the new code above. */
    .nav-menu::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
        height: 80px;
        background-color: var(--card-bg);
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        z-index: -1;
    }
    .nav-links li {
        opacity: 0;
        transform: translateX(50px);
        transition: all 0.4s ease;
    }
    .nav-menu.active .nav-links li {
        opacity: 1;
        transform: translateX(0);
    }
    .nav-menu.active .nav-links li:nth-child(1) { transition-delay: 0.1s; }
    .nav-menu.active .nav-links li:nth-child(2) { transition-delay: 0.2s; }
    .nav-menu.active .nav-links li:nth-child(3) { transition-delay: 0.3s; }
    .nav-menu.active .nav-links li:nth-child(4) { transition-delay: 0.4s; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .header {
        padding: 20px 30px;
    }
    .nav-links {
        gap: 25px;
    }
}