:root {
    --color-primary: #D2B766;
    --color-green: #2B544E;
    --color-dark: #353535;
    --color-cream: #F9F4E8;
    --color-white: #FFFFFF;
    --header-height: 114px;
}

/*------------------------------------*\
  #RESET & BASE STYLES
\*------------------------------------*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
}

html {
    width: 100%;
    position: relative;
    scroll-behavior: smooth;
}

/* Disable scroll when menu is open */
html.no-scroll {
    overflow: hidden;
    padding-right: 0 !important;
}

body {
    width: 100%;
    position: relative;
    font-family: 'Tajawal', sans-serif;
    background-color: var(--color-cream);
    min-height: calc(var(--vh, 1vh) * 100);

    overflow-x: hidden;
    overflow-y: auto; /* السماح بالتمرير العمودي */
    -webkit-overflow-scrolling: touch; /* تمرير سلس على iOS */
    overscroll-behavior-x: none; /* منع التمرير الأفقي فقط */
    overscroll-behavior-y: auto; /* السماح بالتمرير العمودي */
}
body.no-scroll {
    overflow: hidden;
    padding-right: 0 !important;
}

.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Force GPU compositing for animated background to reduce layout thrashing */
.animated-background,
.shape {
    will-change: transform, opacity;
    transform: translateZ(0);
}

/* Disable animated background shapes globally — only keep element animations (cards, avatars, buttons) */
/* تم إزالة تعطيل الأنيميشن لأنه مهم للتفاعل */

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    filter: blur(60px);
}

.shape {
    border-radius: 50%;
    position: absolute;
    background: linear-gradient(var(--angle, 135deg), var(--color-primary), var(--color-green));
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

.shape-1 {
    --angle: 135deg;
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    animation: float 20s infinite;
}

.shape-2 {
    --angle: 225deg;
    width: 350px;
    height: 350px;
    bottom: 100px;
    left: -100px;
    animation: float 18s infinite reverse;
}

.shape-3 {
    --angle: 45deg;
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 15s infinite;
}

.shape-4 {
    --angle: 315deg;
    width: 250px;
    height: 250px;
    top: 30%;
    right: 10%;
    animation: float 22s infinite;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(50px, -80px) rotate(120deg);
    }
    66% {
        transform: translate(-50px, 80px) rotate(240deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.15;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.25;
    }
}

@keyframes sway {
    0%, 100% {
        transform: translateX(0) rotate(0deg);
    }
    50% {
        transform: translateX(30px) rotate(10deg);
    }
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce-float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.1);
    }
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.header {
    background-color: var(--color-cream);
    padding: 5px 0; /* تقليل الارتفاع أكثر إلى 5px */
    position: fixed; /* keep header visible on scroll */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 950;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 100px; /* تصغير اللوجو */
    width: 100px;
    transform: scaleX(1); /* إلغاء العكس - اللوجو بشكل طبيعي */
}

.nav {
    display: flex;
    gap: 24px;
    transition: none;
}

.nav-link {
    font-size: 20px;
    color: var(--color-dark);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 400;
    -webkit-tap-highlight-color: transparent;
    padding: 5px 10px;
    border-radius: 8px;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-green);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover, .nav-link.active {
    color: var(--color-green);
    background-color: rgba(43, 84, 78, 0.05);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 80%;
}

.nav-link:active {
    transform: scale(0.95);
}

.nav-link.active {
    font-weight: 500;
}

.btn {
    padding: 15px 50px;
    border-radius: 20px;
    border: none;
    font-size: 24px;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    font-weight: 400;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    padding: 10px 30px;
    font-size: 20px;
    background-color: var(--color-green);
    color: var(--color-cream);
}

.btn-primary:hover {
    background-color: #234039;
    box-shadow: 0 4px 12px rgba(43, 84, 78, 0.3);
}

.btn-dark {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-dark:hover {
    background-color: #C4A95C;
    box-shadow: 0 4px 12px rgba(210, 183, 102, 0.3);
}

.btn-green {
    background-color: var(--color-green);
    color: var(--color-white);
}

.btn-green:hover {
    background-color: #234039;
    box-shadow: 0 4px 12px rgba(43, 84, 78, 0.3);
}

.hero {
    /* use dynamic viewport unit to avoid address-bar/toolbar jumps on mobile */
    height: calc(var(--vh, 1vh) * 100);
    background: url(imgs/Group\ 2.svg) center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--color-cream);
}

.hero-title {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
    position: relative;
    display: inline-block;
}

.hero-title::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    animation: shine-line 3s ease-in-out infinite;
}

@keyframes shine-line {
    0%, 100% { 
        width: 60px;
        opacity: 0.6;
        background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    }
    50% { 
        width: 160px;
        opacity: 1;
        background: linear-gradient(90deg, transparent, var(--color-green), var(--color-primary), var(--color-green), transparent);
    }
}

.hero-subtitle {
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 30px;
    animation: fadeInUp 1.2s ease;
}

.hero-buttons {
    display: flex;
    gap: 24px;
    justify-content: center;
    animation: fadeInUp 1.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.about-section {
    padding: 80px 0;
    position: relative;
}


    /* make space for fixed header so content isn't hidden under it */
    body {
        padding-top: var(--header-height);
    }
/* خطوط متحركة للخلفية */
/*------------------------------------*\
  #ANIMATED LINES
\*------------------------------------*/
.animated-line {
    --line-width: 150px;
    --line-rotation: 0deg;
    --line-delay: 0s;
    
    position: absolute;
    height: 2px;
    width: var(--line-width);
    background: linear-gradient(90deg, 
        transparent,
        var(--color-primary),
        transparent
    );
    transform: rotate(var(--line-rotation));
    animation: moveLine 8s linear infinite;
    animation-delay: var(--line-delay);
    opacity: 0.2;
    z-index: 0;
}

.animated-line:nth-child(1) {
    --line-width: 200px;
    --line-rotation: -45deg;
    top: 20%;
    left: 10%;
}

.animated-line:nth-child(2) {
    --line-width: 150px;
    --line-rotation: 30deg;
    --line-delay: -2s;
    top: 40%;
    right: 15%;
}

.animated-line:nth-child(3) {
    --line-width: 180px;
    --line-rotation: -15deg;
    --line-delay: -4s;
    bottom: 30%;
    left: 20%;
}

.animated-line:nth-child(4) {
    --line-width: 120px;
    --line-rotation: 60deg;
    --line-delay: -6s;
    bottom: 15%;
    right: 25%;
}

@keyframes moveLine {
    0% {
        transform: translateX(-100%) rotate(var(--rotation));
        opacity: 0;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        transform: translateX(200%) rotate(var(--rotation));
        opacity: 0;
    }
}

.about-section {
    position: relative;
    overflow: hidden;
}

.about-section::after {
    content: '';
    position: absolute;
    bottom: 100px;
    left: 5%;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--color-green), var(--color-primary));
    border-radius: 50%;
    opacity: 0.12;
    animation: float 15s ease-in-out infinite;
    z-index: 0;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 250px;
    left: 0;
    width: 100%;
    height: 309px;
    background: url('public/vector-1.svg') center/cover no-repeat;
    z-index: 0;
    opacity: 0.3;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 60px;
}

.about-img {
    width: 450px;
    height: 452px;
    object-fit: cover;
    position: relative;
    top: 66px;
    left: -50px;
    max-width: 100%;
}

@media (max-width: 768px) {
    .about-img {
        width: 100%;
        height: auto;
        left: 0;
        top: 0;
    }
}


.section-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--color-green);
    margin-bottom: 30px;
}

.section-title.centered {
    text-align: center;
}

.section-title.white {
    color: var(--color-white);
}

.about-text {
    font-size: 20px;
    line-height: 1.8;
    color: var(--color-dark);
    position: relative;
    padding-right: 20px;
}

.about-text::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, var(--color-primary), var(--color-green));
    border-radius: 4px;
    transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.about-text.in-view::before {
    height: 100%;
    opacity: 1;
}

.stats-card {
    background-color: var(--color-green);
    border-radius: 20px;
    padding: 40px 60px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 60px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: slideInUp 1s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 40px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.stat-label {
    font-size: 28px;
    color: var(--color-cream);
}

.stat-divider {
    width: 6px;
    height: 104px;
    background-color: var(--color-cream);
    border-radius: 50px;
    animation: pulse-divider 2s ease-in-out infinite;
}

@keyframes pulse-divider {
    0%, 100% {
        opacity: 0.6;
        height: 104px;
    }
    50% {
        opacity: 1;
        height: 120px;
    }
}

.vision-mission-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-bottom: 0; /* إزالة المسافة السفلية */
}

.card {
    background-color: var(--color-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    direction: rtl; /* إعادة الاتجاه للعربي داخل المربع */
}

.card {
    animation: slideInUp 0.8s ease forwards;
}

.card:nth-child(1) {
    animation-delay: 0.1s;
}

.card:nth-child(2) {
    animation-delay: 0.2s;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: 231px;
    object-fit: cover;
}

.mission-card .card-image {
    transform: scaleX(-1); /* عكس صورة رسالتنا أفقياً */
}

.card-body {
    padding: 20px;
    background-color: var(--color-white);
    border-radius: 0 0 20px 20px;
    position: relative;
}

.card-badge {
    position: absolute;
    top: -231px;
    right: 0; /* تغيير من left إلى right */
    background-color: var(--color-green);
    color: var(--color-primary);
    font-size: 32px;
    font-weight: 700;
    padding: 10px 40px;

    border-radius: 20px 0 20px 0; /* عكس الزوايا */
}

.card-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-green);
    line-height: 1.6;
}

.services-section {
    padding: 20px 0; /* تقليل المسافة العلوية */
    position: relative;
}

.services-section {
    position: relative;
    overflow: hidden;
}

.services-section::after {
    content: '';
    position: absolute;
    bottom: 50px;
    right: 50px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--color-primary), var(--color-green));
    border-radius: 50%;
    opacity: 0.1;
    animation: spin-slow 20s linear infinite;
    z-index: 0;
}

/* إضافة خطوط متحركة في قسم الخدمات */
.services-section .animated-line {
    background: linear-gradient(90deg, transparent, var(--color-green), transparent);
}

.services-section .animated-line:nth-child(1) {
    width: 160px;
    top: 15%;
    left: 5%;
    animation-delay: -1s;
}

.services-section .animated-line:nth-child(2) {
    width: 140px;
    top: 35%;
    right: 8%;
    animation-delay: -3s;
}

.services-section .animated-line:nth-child(3) {
    width: 200px;
    bottom: 25%;
    left: 15%;
    animation-delay: -5s;
}

.services-section::before {
    content: '';
    position: absolute;
    top: 250px;
    left: 0;
    width: 100%;
    height: 309px;
    background: url('public/vector-2.svg') center/cover no-repeat;
    z-index: 0;
    opacity: 0.3;
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 50px;
    margin-top: 60px;
    width: 100%;
    max-width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
}

.service-card {
    background-color: var(--color-white);
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: bounce-float 4s ease-in-out infinite; /* ✅ بطّأنا الأنيميشن */
    position: relative;
    width: 350px;
    max-width: 100%;
}

@keyframes bounce-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.service-card:nth-child(-n+3) {
    flex: 1 1 calc(33.333% - 30px);
}

.service-card:nth-child(n+4) {
    flex: 1 1 calc(33.333% - 30px);
}
.services-grid > .service-card:nth-child(4),
.services-grid > .service-card:nth-child(5) {
    margin-left: auto;
    margin-right: auto;
}

/* التأثير عند الهوفر */
.service-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    animation: none;
}

.service-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: icon-float 3s ease-in-out infinite;
}

@keyframes icon-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(4deg); }
}

.service-card:hover .service-icon {
    transform: scale(1.15) rotate(-8deg);
    animation-play-state: paused;
}

.service-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    background: linear-gradient(180deg, var(--color-white) 0%, var(--color-cream) 300%);
}

.service-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 15px;
}

.service-description {
    font-size: 16px;
    color: #000;
    line-height: 1.6;
}


.team-section {
    position: relative;
    height: 414px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 80px 0;
}

.team-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.team-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%);
}

.team-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--color-white);
}

.team-description {
    font-size: 24px;
    max-width: 877px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.team-avatars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 10px;
}

.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-white);
    transition: transform 0.3s ease;
    animation: bounce-float 3s ease-in-out infinite;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.avatar:nth-child(1) {
    animation-delay: 0s;
}

.avatar:nth-child(2) {
    animation-delay: 0.2s;
}

.avatar:nth-child(3) {
    animation-delay: 0.4s;
}

.avatar:hover {
    transform: scale(1.15) translateY(-5px);
    z-index: 10;
    animation: none;
}

.avatar-badge {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    border: 3px solid var(--color-white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: bounce-float 3s ease-in-out infinite;
    animation-delay: 0.6s;
}

.footer {
    background-color: var(--color-cream);
    padding: 0; /* إزالة المسافة بالكامل */
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-logo {
    width: 172px;
    height: 217px;
    margin-bottom: 20px;
}

.footer-description {
    font-size: 16px;
    color: var(--color-dark);
    line-height: 1.6;
}

.footer-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-green);
    margin-bottom: 29px;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-link {
    font-size: 18px;
    font-weight: 500;
    color: var(--color-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--color-green);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-icon {
    width: 24px;
    height: 24px;
}

.contact-text {
    font-size: 18px;
    font-weight: 500;
    color: var(--color-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-text:hover {
    color: var(--color-green);
}

.footer-bottom {
    background-color: var(--color-green);
    padding: 20px 0;
    text-align: center;
}

.copyright {
    font-size: 24px;
    color: var(--color-white);
}

/* Menu Toggle Button Styles - Modern Design */
.menu-toggle {
    display: none;
    background: linear-gradient(135deg, var(--color-green), var(--color-primary));
    border: none;
    cursor: pointer;
    padding: 8px;
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(43, 84, 78, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.menu-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(43, 84, 78, 0.3);
}

.menu-toggle:hover::before {
    opacity: 1;
}

.menu-toggle:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(43, 84, 78, 0.2);
}

/* Hide mobile overlay/menu-panel by default on desktop */
.menu-overlay {
    display: none;
}

.menu-panel {
    display: none;
}

.menu-icon {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 2.5px;
    background-color: var(--color-cream);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    width: 24px; /* نفس عرض الخط الأوسط */
    height: 2.5px;
    background-color: var(--color-cream);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    left: 0;
}

.menu-icon::before {
    top: -7px;
    transform-origin: center;
}

.menu-icon::after {
    bottom: -7px;
    transform-origin: center;
}

/* Menu Toggle Active State - Smooth X Animation */
.menu-toggle.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-green));
    transform: rotate(180deg);
}

.menu-toggle.active .menu-icon {
    background-color: transparent;
    box-shadow: none;
    transform: translate(-50%, -50%); /* الحفاظ على المركز */
}

.menu-toggle.active .menu-icon::before {
    transform: translateY(7px) rotate(45deg);
    width: 24px;
}

.menu-toggle.active .menu-icon::after {
    transform: translateY(-7px) rotate(-45deg);
    width: 24px;
}

@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
        width: 100%;
        max-width: 100%;
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        position: relative;
        width: 100%;
    }

    .menu-toggle {
        display: block;
        order: 3;
        z-index: 1000;
        position: relative;
        right: 0;
    }

    .desktop-nav {
        display: none;
    }

    .menu-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.35);
        display: flex;
        justify-content: flex-end;
        align-items: stretch;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transition: opacity 240ms ease, visibility 240ms ease;
        z-index: 999;
    }

    .menu-overlay.active {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

    .menu-panel {
        width: 80%;
        max-width: 320px;
        background-color: var(--color-cream);
        padding: 80px 20px;
        display: flex;
        flex-direction: column;
        gap: 18px;
        transform: translateX(100%);
        box-shadow: -8px 0 24px rgba(0,0,0,0.12);
        will-change: transform;
        transition: transform 0.3s ease-in-out;
    }

    .menu-panel.active {
        transform: translateX(0);
    }

    .menu-panel .nav-link {
        font-size: 18px;
        padding: 12px 15px;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .menu-panel .nav-link:hover,
    .menu-panel .nav-link.active {
        background-color: rgba(43, 84, 78, 0.1);
        color: var(--color-green);
        padding-right: 25px;
    }

    .menu-panel .nav-link::before {
        content: '';
        position: absolute;
        right: 10px;
        top: 50%;
        width: 0;
        height: 2px;
        background-color: var(--color-green);
        transform: translateY(-50%);
        transition: width 0.3s ease;
        opacity: 0;
    }

    .menu-panel .nav-link:hover::before,
    .menu-panel .nav-link.active::before {
        width: 8px;
        opacity: 1;
    }

    body.menu-open {
        overflow: hidden;
    }

    .logo { order: 1; }
    .btn-primary { order: 2; }
    .btn.btn-primary { display: none; }

    .hero-title { font-size: 32px; }
    .hero-subtitle { font-size: 22px; }

    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-image-wrapper { margin: 0 auto; }

    .stats-card {
        flex-wrap: wrap;
        gap: 30px;
        padding: 30px;
    }

    .stat-divider { display: none; }

    .vision-mission-grid { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-content { 
        grid-template-columns: 1fr;
        text-align: center;
    }

    .contact-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        margin: 0 auto;
        max-width: 300px;
    }

    .contact-item {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
        overflow-x: hidden;
    }

    .hero {
        height: 600px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-title,
    .hero-subtitle,
    .hero-buttons {
        padding: 0 20px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .btn-dark,
    .btn-green {
        width: 100%;
        font-size: 20px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 20px; /* تقليل المسافة العلوية */
    }

    .services-section {
        padding: 0; /* إزالة المسافة بالكامل في الموبايل */
        margin-top: -50px; /* سحب القسم للأعلى بقوة */
    }

    .services-section .section-title.centered {
        margin-bottom: 10px; /* تقليل المسافة تحت العنوان */
        margin-top: 0; /* إزالة المسافة فوق العنوان */
    }

    .stats-card {
        flex-direction: column;
    }

    .stat-item { width: 100%; }
    .section-title,
    .about-text,
    .team-description { font-size: 18px; }

    .team-description { 
        padding: 0 20px;
    }

    .shape {
        width: 200px;
        height: 200px;
    }

    .copyright {
        font-size: 16px; /* تصغير حجم الخط في الموبايل */
    }
}

@media (max-width: 480px) {
    /* Layout & Navigation */
    .nav {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .nav-link { font-size: 18px; }
    
    .logo {
        height: 80px; /* تكبير اللوجو قليلاً */
        width: 80px;
    }

    /* Hero Section */
    .hero { height: 500px; }
    .hero-title { font-size: 24px; }
    .hero-subtitle { font-size: 16px; }

    /* Buttons */
    .btn {
        font-size: 18px;
        padding: 8px 20px;
    }

    /* About Section */
    .about-image-wrapper {
        width: 300px;
        height: 300px;
        
        img {
            width: 250px;
            height: 300px;
        }
    }

    /* Stats Section */
    .stat-value { font-size: 32px; }
    .stat-label { font-size: 20px; }
    .card-badge {
        font-size: 24px;
        padding: 8px 20px;
    }

    /* Footer */
    .footer-logo {
        width: 120px;
        height: 150px;
    }
}
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background-color: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
    cursor: pointer;
    transition: transform 0.3s ease;
    will-change: transform;
    animation: whatsapp-pulse 2s infinite;
}

/* التأثير الأول: هالة نابضة */
.whatsapp-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #25D366;
    opacity: 0.6;
    animation: whatsapp-ripple 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
    z-index: -1;
}

/* التأثير الثاني: هالة خارجية */
.whatsapp-float::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #25D366;
    opacity: 0.4;
    animation: whatsapp-ripple 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
    animation-delay: 0.6s;
    z-index: -1;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    animation-play-state: paused;
}

.whatsapp-float:hover::before,
.whatsapp-float:hover::after {
    animation-play-state: paused;
}

.whatsapp-float img {
    width: 60%;
    height: 60%;
    transition: transform 0.3s ease;
}

.whatsapp-float:hover img {
    transform: scale(1.1);
}

@keyframes whatsapp-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes whatsapp-ripple {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* Pause heavy/background animations while menu is open to avoid reflows on mobile */
.menu-open .animated-background,
.menu-open .shape,
.menu-open .service-card,
.menu-open .avatar,
.menu-open .card {
    animation-play-state: paused !important;
    transition: none !important;
}

/* Ensure no layout shifts from scrollbar compensation */
html,
body {
    -webkit-tap-highlight-color: transparent;
    /* Prevent any accidental horizontal overflow / page shake on small viewports */
    overflow-x: hidden;
}

@media (max-width: 768px) {
    /* Ensure service cards stack vertically and ignore earlier flex-based rules */
    .services-grid > .service-card {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 30px 20px;
    }
}

/* تم إزالة أكواد التصحيح المؤقتة */
