/* =========================================
   NAVBAR
========================================= */

#mainNav {
    padding-top: 10px;
    padding-bottom: 10px;
    inset-inline-start: 0;
    width: 100%;
    background: linear-gradient(white, #f8f9fa);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    font-size: 18px;
    z-index: 1050;             /* أعلى من أي عنصر */
}

.navbar-brand img {
    height: 40px;
    width: auto;
    display: block;
}

@media (max-width: 991px) {
    .navbar-brand img {
        height: 32px;
    }
}

.nav-link {
    color: #000 !important;
    font-weight: 400;
    margin: 0 6px;
}

.nav-link.active {
    color: red !important;
    font-weight: bold;
    border-radius: 12px;
}

.nav-link:hover {
    color: #c00 !important;
}

.dropdown-menu {
    text-align: start; /* ✅ يدعم RTL تلقائيًا */
}

/* =========================================
   SEARCH BAR (RTL / LTR SAFE)
========================================= */

.search-container {
    position: relative;
    max-width: 100%;
    margin: 0 20px;
}

.search-container input {
    width: 100%;
    height: 46px;
    padding-inline-start: 56px;
    padding-inline-end: 15px;
    border: 1px solid #868686;
    border-radius: 6px;
    background: #fff;
    font-size: 16px;
    color: #444;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    outline: none;
}

.search-icon {
    position: absolute;
    top: 50%;
    inset-inline-start: 8px;
    width: 36px;
    height: 36px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
}

.search-container .divider {
    position: absolute;
    top: 50%;
    inset-inline-start: 48px;
    transform: translateY(-50%);
    width: 1px;
    height: 24px;
    background: #868686;
}

.search-container input::placeholder {
    color: #b3b3b3;
}

/* Mobile small */
@media (max-width: 480px) {
    .search-container {
        width: 90%;
    }

    .search-container input {
        height: 42px;
        padding-inline-start: 52px;
        font-size: 15px;
    }

    .search-icon {
        width: 32px;
        height: 32px;
        inset-inline-start: 6px;
    }

    .search-container .divider {
        inset-inline-start: 44px;
        height: 20px;
    }

    .search-lang-wrapper {
        justify-content: center;
        margin-top: 10px;
    }
}

/* =========================================
   MOBILE NAV FIXES
========================================= */

@media (max-width: 768px) {
    .nav-mobile-horizontal {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        padding-bottom: 10px;
        padding-top: 20px;
        font-size: 13px;
    }

    .nav-link {
        font-weight: 600;
        margin: 0 2px;
    }

    .nav-mobile-horizontal .nav-item {
        white-space: nowrap;
    }
}

/* =========================================
   FOOTER
========================================= */

div#mainFooter {
    background-color: #868686;
    color: #ffffff;
    text-align: center;
    padding: 20px 0;
    margin-top: 0;
}

div#mainFooter a {
    margin: 0 10px;
}

.social-icons a {
    margin: 0 8px;
    color: #434343ff;
    font-size: 1.5rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icons a:hover {
    transform: scale(1.15);
    color: #c00;
}

.text-dark a:hover,
.text-white a:hover {
    color: #c00 !important;
}

.footer-links-spaced li {
    margin-bottom: 5px;
}

.footer-links-spaced li:last-child {
    margin-bottom: 0;
}

/* =========================================
   FOOTER RESPONSIVE
========================================= */

@media (max-width: 768px) {

    /* روابط السياسات تظهر بشكل عمودي */
    #mainFooter p a {
        display: block;
        margin: 5px 0 !important;
    }

    /* أيقونات التواصل */
    .social-icons {
        justify-content: center !important;
        gap: 10px;
        margin-top: 10px;
    }

    .social-icons a i {
        font-size: 1.2rem;
    }

    /* نموذج النشرة البريدية */
    .newsletter form {
        flex-direction: column;
        gap: 10px;
        
    }

    .newsletter form input,
    .newsletter form button {
        width: 100%;
    }

    /* شعار الفوتر */
    #mainFooter img {
        height: 18px;
        margin-top: 5px;
    }

    /* ترتيب أعمدة الفوتر عموديًا */
    footer .row {
        align-items: center;
        border: none !important; /* إزالة الحدود الجانبية على الموبايل */
    }

    footer .footer-col {
        margin-bottom: 20px;
        padding: 0 10px;
    }
}
