/* إخفاء لحظي لمحتوى الصفحة (عدا الهيدر) لحين وصول المحتوى الفعلي من لوحة التحكم،
   لمنع ظهور المحتوى/الصور القديمة قبل استبدالها بالجديدة عند التحديث */
body.dlx-loading > *:not(.care-header) {
    opacity: 0;
}

body > *:not(.care-header) {
    transition: opacity 0.25s ease;
}

/* Header */
.care-header {
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    border-bottom: 1px solid #222;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* الشعار */
.logo img {
    max-height: 70px;
    width: auto;
    display: block;
}

/* القائمة في المنتصف (Desktop) */
.nav-menu-desktop {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-menu-desktop ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-menu-desktop ul li {
    position: relative;
}

.nav-menu-desktop ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 0;
}

.nav-menu-desktop ul li a:hover, .nav-menu-desktop ul li.active > a {
    color: var(--accent-color);
}

/* القائمة المنسدلة (Desktop) */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--dropdown-bg);
    min-width: 180px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    padding: 8px 0 !important;
    border: 1px solid #333;
    text-align: right;
}

.nav-menu-desktop ul li:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    padding: 8px 40px !important;
    width: 100%;
    display: block !important;
    font-size: 14px !important;
    text-align: right;
    justify-content: right;
}

.dropdown-menu li a:hover {
    background-color: var(--accent-color);
    color: #fff !important;
    border-radius: 8px;
}

/* محول اللغة (Desktop) */
/* ملاحظة: margin-inline-start بدل margin-right لأن هذا الملف مشترك بين صفحات عربي (RTL) وإنجليزي (LTR) -
   بهذا الشكل تبقى المسافة صحيحة تلقائياً في الاتجاهين بدون الحاجة لأي تخصيص إضافي لكل لغة */
.lang-switcher-desktop {
    margin-inline-start: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid #333;
    padding: 5px 15px;
    border-radius: 20px;
    transition: var(--transition);
    text-decoration: none;
    color: white;
}

.lang-switcher-desktop img {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
}

.lang-switcher-desktop:hover {
    border-color: #fff;
    background-color: #fff;
    color: var(--accent-color);
}

/* أزرار الأكشن (Desktop) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.book-btn {
    background-color: var(--accent-color);
    color: #fff;
    padding: 8px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid var(--accent-color);
    transition: var(--transition);
    font-size: 14px;
}

.book-btn:hover {
    background-color: #fff;
    color: var(--accent-color);
    border-color: #fff;
}

/* زر الموبايل */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

/* القائمة الجانبية للجوال (الموجودة حالياً) *

/* Scrolling */
.mobile-aside {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100dvh;
    background-color: #000;
    z-index: 2000;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 25px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-left: 1px solid #222;
}



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

.aside-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.close-aside {
    background: #222;
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav ul {
    list-style: none;
}

.mobile-nav ul li {
    border-bottom: 1px solid #1a1a1a;
}

.mobile-nav ul li a {
    color: #ccc;
    text-decoration: none;
    display: flex;
    justify-content:right;
    align-items: center;
    padding: 15px 0;
    font-size: 16px;
    transition: var(--transition);
}

.mobile-nav ul li a i {
    padding-left: 15px;
}

.mobile-nav ul li.has-dropdown > a::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.mobile-nav ul li.open > a::after {
    transform: rotate(180deg);
}

.mobile-nav ul li.active > a {
    color: var(--accent-color);
    font-weight: bold;
}

.mobile-sub-menu {
    display: none;
    list-style: none;
    padding-right: 20px;
    background: #0a0a0a;
}

.mobile-sub-menu li a {
    padding: 10px 0;
    font-size: 14px;
    border-bottom: none;
}

.aside-footer {
    margin-top: auto;
    padding-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-action-btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
}

.btn-login {
    background: var(--accent-color);
    color: white;
}

.btn-lang-mobile {
    border: 1px solid #333;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1999;
    display: none;
}

.overlay.active {
    display: block;
}

/* استعلامات الوسائط للتبديل بين الكودين */
@media (max-width: 1100px) {
    .nav-menu-desktop, .lang-switcher-desktop, .book-btn-container {
        display: none;
    }
    .menu-toggle {
        display: block;
    }


    /* Scrolling */
    .mobile-aside {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .aside-footer {
        margin-top: 30px;
        padding-bottom: 30px;
    }


}

/* ==========================================================================
   زر العودة للأعلى (موحّد لكل صفحات الموقع الحالية والمستقبلية عبر header.js)
   ========================================================================== */
.dlx-scroll-top-btn {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #000000;
    border: 2px solid var(--accent-color);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(15px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.dlx-scroll-top-btn.dlx-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}
.dlx-scroll-top-btn:hover {
    background-color: var(--accent-color);
}
@media (max-width: 640px) {
    .dlx-scroll-top-btn {
        bottom: 16px;
        left: 16px;
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
}

/* ==========================================================================
   أزرار التواصل العائمة: واتساب فوق، واتصال تحته (يمين أسفل الصفحة، كل الصفحات)
   ========================================================================== */
:root {
    --dlx-fab-size: 60px;
    --dlx-fab-gap: 16px;
}
.dlx-fab-btn {
    position: fixed;
    right: calc(var(--dlx-fab-gap) + env(safe-area-inset-right));
    width: var(--dlx-fab-size);
    height: var(--dlx-fab-size);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
    z-index: 997;
    text-decoration: none;
    overflow: visible;
    transform-origin: center;
    transition: transform 0.18s ease, background-color 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}
.dlx-fab-btn i {
    position: relative;
    z-index: 2;
    color: #ffffff;
    font-size: calc(var(--dlx-fab-size) * 0.42);
    pointer-events: none;
}
.dlx-fab-btn:hover {
    transform: scale(1.06);
}

/* زر واتساب (الأعلى) */
.dlx-fab-whatsapp {
    bottom: calc(var(--dlx-fab-size) + var(--dlx-fab-gap) * 2 + env(safe-area-inset-bottom));
    background-color: #25d366;
}
.dlx-fab-whatsapp:hover {
    background-color: #1ebe5d;
}
.dlx-fab-whatsapp::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%) scale(1);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45);
    animation: dlx-wa-pulse 1.6s ease-out infinite;
}
@keyframes dlx-wa-pulse {
    0% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45); }
    70% { transform: translate(-50%, -50%) scale(1.35); box-shadow: 0 0 0 20px rgba(37, 211, 102, 0); }
    100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* زر الاتصال (الأسفل) */
.dlx-fab-call {
    bottom: calc(var(--dlx-fab-gap) + env(safe-area-inset-bottom));
    background-color: var(--accent-color);
}
.dlx-fab-call:hover {
    background-color: #cc0000;
}

@media (max-width: 420px) {
    :root {
        --dlx-fab-size: 50px;
        --dlx-fab-gap: 12px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .dlx-fab-whatsapp::after { animation: none; box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
    .dlx-fab-btn { transition: none; }
}
