:root {
    --primary-bg-color: #FFFFFF;
    --sec-bg-color: #F1F5F9;
    --primary-btn-color: #0558FE;
    --secondary-btn-color: #A9CFFF;
    --text-color: #414141;
}

body {
    font-family: sans-serif;
    margin: 0;
}

.container {
    display: flex;
    max-width: 1280px;
    padding: 0 48px;
    margin: 0 auto;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* start header  */
.header {
    background-color: var(--sec-bg-color);
    padding: 15px 0;
    border-bottom: 1px solid #C1C1C1;
}

.links {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.links li a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 500;
    line-height: 30px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: #f9f9f9;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    padding: 5px 15px;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    padding: 8px;
    font-size: 14px;
    width: 150px;
}

.search-bar button {
    background: none;
    border: none;
    cursor: pointer;
}
/*
.list-cars {
    text-decoration: none;
    font-size: 16px;
    color: var(--text-color);
    cursor: pointer;
    font-weight: 400;
    line-height: 30px;
}
*/
.signup-btn {
    background-color: var(--primary-btn-color);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-weight: 500;
    font-size: 16px;
    line-height: 100%;
    transition: 0.3s;
}

.signup-btn:hover {
    background-color: var(--secondary-btn-color);
    color: var(--text-color);
}

.menu-toggle {
    width: 28px;
    height: 20px;
    position: relative;
    cursor: pointer;
    display: none;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: #1e293b;
    left: 0;
    transition: 0.3s;
    border-radius: 2px;
}

.menu-toggle span {
    top: 50%;
    transform: translateY(-50%);
}

.menu-toggle::before {
    top: 0;
}

.menu-toggle::after {
    bottom: 0;
}

@media (min-width:769px) {
    .list-cars {
        display: none;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        z-index: 1001;
        /* عشان يفضل فوق المنيو */
    }

    /* تحويل الثلاث شرط لعلامة X */
    .menu-toggle.active span {
        background-color: transparent;
    }

    .menu-toggle.active::before {
        transform: rotate(45deg);
        top: 9px;
    }

    .menu-toggle.active::after {
        transform: rotate(-45deg);
        bottom: 8px;
    }

    .header-right {
        display: none;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        /* مخفي بره */
        width: 100%;
        height: 100vh;
        background: #fff;
        display: flex !important;
        /* إجبار الظهور عند التفعيل */
        flex-direction: column;
        padding: 80px 20px;
        /* تقليل البادنج عشان العناصر متتحدفش */
        transition: 0.3s ease-in-out;
        z-index: 1000;
        box-sizing: border-box;
        /* بيضمن إن البادنج ميكبرش المنيو */
    }

    /* الحالة النشطة - القوس هنا مقفول صح */
    nav.active {
        right: 0;
    }

    .links {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        display: flex !important;
    }

    .links li {
        width: 100%;
    }

    .links li a {
        display: block;
        padding: 15px 0;
        font-size: 18px;
        border-bottom: 1px solid #f0f0f0;
        width: 100%;
    }

    /* زرار الـ Login باستخدام Pseudo-element */
    nav::after {
        content: "Login";
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: var(--primary-btn-color);
        color: white;
        padding: 12px 35px;
        border-radius: 8px;
        width: fit-content;
        margin-top: 30px;
        font-weight: 600;
        cursor: pointer;
    }
}

/* الشاشات التي تبدأ من 768 بكسل (تابلت ولابتوب) */
@media (min-width: 768px) {
    .container {
        flex-wrap: nowrap;
    }

    /* التأكد من ظهور الناف بار بشكل أفقي دائماً */
    nav {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        padding: 0;
        display: block !important;
    }

    .links {
        flex-direction: row;
        /* الروابط بجانب بعضها */
        gap: 25px;
        /* مسافة متوازنة بين الروابط */
    }

    .links li a {
        border-bottom: none;
        /* إلغاء الخطوط التي وضعت للموبايل */
        padding: 0;
    }

    /* إخفاء زر القائمة (الهمبرجر) في الشاشات الكبيرة */
    .menu-toggle {
        display: none !important;
    }

    /* ضبط الجهة اليمنى (البحث والزرار) */
    .header-right {
        display: flex !important;
        align-items: center;
        gap: 20px;
    }

    /* جعل شريط البحث مرن */
    .search-bar {
        width: 180px;
        /* عرض ثابت بسيط أو استخدم max-width */
        transition: 0.3s ease;
    }

    .search-bar:focus-within {
        width: 220px;
        border-color: var(--primary-btn-color);
    }

    nav::after {
        display: none;
    }
}

/* شاشات التابلت تحديداً (بين 768 و 1024) */
@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }

    .links {
        gap: 15px;
    }

    .search-bar {
        display: none;
    }
}

/* end header  */
/* start footer */
.main-footer {
    padding-top: 80px;
    border-top: 1px solid #f1f5f9;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    /* توزيع الأعمدة */
    gap: 40px;
    padding-bottom: 60px;
}

.footer-logo {
    width: 150px;
    margin-bottom: 20px;
}

.footer-about p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 14px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons img {
    width: 20px;
    opacity: 0.7;
    transition: 0.3s;
}

.social-icons img:hover {
    opacity: 1;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #1e293b;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    text-decoration: none;
    color: #64748b;
    font-size: 14px;
    transition: 0.3s;
}

.footer-links ul li a:hover {
    color: #2563eb;
}

.footer-contact p {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 10px;
    line-height: 1.6;
}

.footer-bottom {
    border-top: 1px solid #f1f5f9;
    padding: 25px 0;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p,
.bottom-links a,
.bottom-links span {
    font-size: 13px;
    color: #94a3b8;
}

.bottom-links {
    display: flex;
    gap: 10px;
}

.bottom-links a {
    text-decoration: none;
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
        /* عمود واحد للموبايل */
    }

    .footer-bottom .container {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        /* عمودين فقط في التابلت */
    }
}


/* end footer */