:root {
    --primary-color: rgba(32, 69, 59, 1);
    --gold-color: rgba(202, 158, 74, 1);
    --bg-light: #fdfdfd;
    --card-border: #f0e6d2;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body {
    font-family: 'Cairo', sans-serif;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #fcfcfc;
    color: var(--primary-color);
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- شاشة اللودينغ للشعار --- */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(253, 253, 253, 0.96);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.page-loader.hide {
    opacity: 0;
    visibility: hidden;
}

.page-loader.show {
    opacity: 1;
    visibility: visible;
}

.loader-content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 140px;
    height: 140px;
}

.loader-logo {
    width: 85px;
    height: auto;
    object-fit: contain;
    animation: logoPulse 1.2s infinite ease-in-out;
    z-index: 2;
}

.spinner-ring {
    position: absolute;
    width: 135px;
    height: 135px;
    border: 3px solid rgba(202, 158, 74, 0.15);
    border-top: 3px solid rgba(202, 158, 74, 1);
    border-radius: 50%;
    animation: spinRing 0.85s linear infinite;
    z-index: 1;
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(0.92);
        opacity: 0.85;
    }
    50% {
        transform: scale(1.08);
        opacity: 1;
    }
}

@keyframes spinRing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- الاتجاهات --- */
html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

html[dir="ltr"] body {
    direction: ltr;
    text-align: left;
}

/* --- الهيدر والتنسيق الرئيسي --- */
.header-navbar { 
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    padding: 10px 0 !important; 
    background: transparent; 
    box-shadow: none; 
    margin-bottom: 15px;
    position: relative;
    z-index: 100;
    height: auto !important;
} 

.brand-logo-link { 
    display: flex;
    align-items: center;
    z-index: 110;
    text-decoration: none;
    height: auto !important;
} 

/* ضبط قياس اللوجو للشاشات الكبيرة */
.site-logo { 
    height: 95px !important; 
    width: auto !important; 
    max-width: 100% !important; 
    object-fit: contain !important; 
    display: block !important; 
    filter: drop-shadow(0px 4px 10px rgba(0,0,0,0.12));
    transition: transform 0.3s ease;
}

/* --- روابط التنقل --- */
.nav-links { 
    display: flex; 
    align-items: center;
    gap: 20px; 
    transition: all 0.3s ease;
} 

html[dir="rtl"] .nav-links {
    margin-right: auto;
    margin-left: 0;
}

html[dir="ltr"] .nav-links {
    margin-left: auto;
    margin-right: 0;
}

.nav-links .nav-menu-link { 
    position: relative; 
    text-decoration: none; 
    padding-bottom: 6px; 
    color: #003322; 
    font-size: 18px; 
    font-weight: bold; 
    transition: color 0.3s ease; 
    white-space: nowrap; 
} 

.nav-links .nav-menu-link.active::before, 
.nav-links .nav-menu-link:hover::before { 
    content: ""; 
    position: absolute; 
    bottom: -2px; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 45px; 
    height: 1px; 
    background-color: #C8A05D; 
    z-index: 1; 
} 

.nav-links .nav-menu-link.active::after, 
.nav-links .nav-menu-link:hover::after { 
    content: ""; 
    position: absolute; 
    bottom: -3px; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 15px; 
    height: 3px; 
    background-color: #003322; 
    border-radius: 2px; 
    z-index: 2; 
} 

/* زر تغيير اللغة */
.lang-switch-btn {
    background-color: #20453B;
    color: #ffffff !important;
    border: 1px solid #C8A05D;
    padding: 6px 16px;
    border-radius: 20px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.lang-switch-btn:hover {
    background-color: #C8A05D;
    color: #003322 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(200, 160, 93, 0.3);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

html[dir="rtl"] .mobile-menu-btn { margin-right: auto; }
html[dir="ltr"] .mobile-menu-btn { margin-left: auto; }

.mobile-menu-btn span {
    width: 100%;
    height: 3px;
    background-color: #003322;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* --- تصميم الكروت والمحتوى --- */
.header-title {
    color: var(--primary-color);
    font-weight: 800;
    font-size: 1.85rem;
}

.header-subtitle {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.05rem;
}

.section-title {
    color: var(--primary-color);
    font-weight: 800;
    font-size: 1.4rem;
    position: relative;
}

.service-card {
    border: 1.5px solid var(--card-border);
    border-radius: 10px;
    padding: 16px 10px;
    background-color: #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(32, 69, 59, 0.08);
}

.service-icon img {
    max-width: 42px;
    height: auto;
    margin-bottom: 8px;
}

.service-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 6px;
}

.service-desc {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary-color);
    opacity: 0.85;
    line-height: 1.4;
    margin: 0;
}

.value-item { padding: 6px; }

.value-icon img {
    max-width: 38px;
    height: auto;
    margin-bottom: 6px;
}

.value-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 3px;
}

.value-desc {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    opacity: 0.85;
    margin: 0;
}

/* --- CTA Section --- */
.cta-box { padding: 20px 30px !important; }
.cta-title { font-size: 1.35rem; }
.cta-desc { font-size: 0.88rem; }

.btn-cta {
    background-color: var(--gold-color);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 10px 24px;
    border-radius: 6px;
    border: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-cta:hover {
    background-color: #b3883b;
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* --- زر الواتساب --- */
.whatsapp-float-btn {
    position: fixed;
    bottom: 25px;
    width: 50px;
    height: 50px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 999;
    color: #ffffff;
    text-decoration: none;
    transition: transform 0.3s ease;
}

html[dir="rtl"] .whatsapp-float-btn { left: 25px; }
html[dir="ltr"] .whatsapp-float-btn { right: 25px; }

.whatsapp-float-btn:hover {
    transform: scale(1.1);
    color: #ffffff;
}

.whatsapp-icon { font-size: 28px; }

/* --- قياسات التجاوب مع الموبايل --- */
@media (max-width: 768px) {
    .header-navbar {
        height: auto !important;
        padding: 10px 15px !important; /* مسافة أمان داخلية تجنب الشاشة */
    }

    /* قياس اللوجو للموبايل */
    .site-logo {
        height: 65px !important;
    }

    .mobile-menu-btn {
        display: flex;
    }

    /* القائمة المنسدلة في الموبايل بمسافات متناسقة */
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 10px;
        right: 10px;
        width: calc(100% - 20px);
        background: #ffffff;
        padding: 20px;
        border-radius: 16px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        gap: 15px;
        align-items: center;
        z-index: 1000;
    }

    .nav-links.active {
        display: flex;
    }
}