@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700&family=Tajawal:wght@400;700&display=swap');

:root {
    --primaryColor: #212223;
    --middleColor: #C1785A;
    --helperColor: #000B58;
    --lightHelper: #D2C1B6;
    --hrColor: rgb(222, 184, 135);
    --transparentColor: rgba(0, 0, 0, 0.699);
    --shadow: rgba(189, 188, 188, 0.514);
    /* --------------------------------- */
    --whatsappColor: #25D366;
    --white: #ffff;
    --blue: #1877F2;
    --green: #25D366;
    --gray: #f8f8f8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', 'Tajawal', sans-serif;
}

/* ====== BASE ====== */
.dropdown {
    position: relative;
}

.dropdown-menu,
.sub-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fff;
    display: none;
    position: absolute;
    min-width: 220px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.dropdown-menu li {
    position: relative;
}

.dropdown-menu a,
.submenu-title {
    display: inline;
    padding: 12px 15px;
    color: #222;
    cursor: pointer;
}

/* ====== DESKTOP ====== */
@media (min-width: 769px) {

    .dropdown:hover>.dropdown-menu {
        display: block;
        top: 100%;
        right: 0;
    }

    .has-sub:hover>.sub-menu {
        display: block;
        top: 0;
        right: 100%;
    }

    .submenu-toggle {
        display: none;
    }
}

/* ====== MOBILE ====== */
@media (max-width: 768px) {

    .pages {
        display: none;
        flex-direction: column;
    }

    .pages.active {
        display: flex;
    }

    .dropdown-menu,
    .sub-menu {
        position: static;
        box-shadow: none;
    }

    .dropdown.open>.dropdown-menu {
        display: block;
    }

    .has-sub.open>.sub-menu {
        display: block;
    }

    .submenu-toggle {
        background: none;
        border: none;
        font-size: 14px;
        cursor: pointer;

    }
}


/* ✅ نافبار */
.navbar {
    background: #222;
    color: #fff;
    padding: 5px 15px;
}

.navbar-container {
    display: flex;
    align-items: center;
}

.navbar a {
    color: #fff;
    text-decoration: none;
}

.spacer {
    flex: 1;
}

.social-icons i {
    font-size: 20px;
}

/* ✅ الهيدر الرئيسي */
.header {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 99999;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
}

.logo img {
    height: 50px;
}

.company-name {
    font-size: 20px;
}

.pages {
    display: flex;
    align-items: center;
    text-align: center;
    gap: 15px;
}

.pages a {
    text-decoration: none;
    color: #333;
    font-size: 20px;
    padding: 8px 12px;
}

.dropdown a {
    padding: 0;
}

.dropdown button {
    background-color: #fff;
    border: none;
}

.pages a:hover {
    background: #f5f5f5;
    border-radius: 4px;
}

/* القائمة الفرعية */
.dropdown-menu {
    display: none;
    flex-direction: column;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px 10px 5px;
    list-style: none;
}

.dropdown-menu li a {
    padding: 10px 15px;
    display: block;
    color: #333;
    padding: 10px 5px;
    text-decoration: none;
}

/* ✅ زر القائمة للموبايل */
.menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
}

/* الكمبيوتر: تظهر بالـ hover */
@media (min-width: 769px) {
    .dropdown:hover .dropdown-menu {
        display: flex;
        position: absolute;
        min-width: 220px;
        z-index: 998;
    }
}

@media (max-width: 768px) {
    .dropdown-menu {
        position: relative;
        box-shadow: none;
    }

    .dropdown.open .dropdown-menu {
        display: flex;
    }

    .pages {
        position: absolute;
        top: 100%;
        right: 0;
        background: #fff;
        flex-direction: column;
        width: 100%;
        transform: translateY(-55px);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.4s ease, opacity 0.4s ease;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 99;
        overflow: auto;
        max-height: 500px;
    }

    .pages.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .menu-btn {
        display: block;
        color: #333;
    }
}