/* ===================================================
   direction.css - RTL / LTR Direction Support
   =================================================== */

/* RTL default */
html[dir="rtl"] body {
    text-align: right;
}

html[dir="rtl"] * {
    text-align: right;
}

html[dir="rtl"] .navbar-nav {
    padding-right: 0;
}

html[dir="rtl"] .ms-lg-5 {
    margin-right: 3rem !important;
    margin-left: 0 !important;
}

html[dir="rtl"] .me-3 {
    margin-left: 1rem !important;
    margin-right: 0 !important;
}

/* LTR */
html[dir="ltr"] body {
    text-align: left;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

html[dir="ltr"] * {
    text-align: left;
}

html[dir="ltr"] .navbar-nav {
    padding-left: 0;
}

html[dir="ltr"] .ms-lg-5 {
    margin-left: 3rem !important;
    margin-right: 0 !important;
}

html[dir="ltr"] .me-3 {
    margin-right: 1rem !important;
    margin-left: 0 !important;
}

html[dir="ltr"] .navbar-brand {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

html[dir="ltr"] .nav-link {
    text-align: left !important;
}

html[dir="ltr"] .footer-list a:hover {
    padding-left: 5px;
    padding-right: 0;
}

html[dir="ltr"] .swiper {
    direction: ltr;
}

html[dir="ltr"] .btn-primary-custom {
    flex-direction: row;
}

html[dir="ltr"] .top-bar-contact {
    flex-direction: row;
}

html[dir="ltr"] .top-bar-contact a i {
    margin-right: 0;
    margin-left: 6px;
}

/* ===================================================
   Dark Top Bar
   =================================================== */
.top-bar {
    background-color: #1a1a2e;
    color: #fff;
    padding: 6px 0;
    font-size: 12px;
    position: relative;
    z-index: 1021;
}

.top-bar a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.top-bar a:hover {
    color: #00d4c7;
}

.top-bar-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    white-space: nowrap;
}

.top-bar-link i {
    font-size: 13px;
    color: #00d4c7;
}

.top-bar-social {
    display: flex;
    align-items: center;
}

.top-bar-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    transition: all 0.3s ease;
}

.top-bar-social-link:hover {
    background-color: #00d4c7;
    color: #1a1a2e !important;
    transform: translateY(-2px);
}

.top-bar-separator {
    width: 1px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.top-bar-translate {
    min-width: 40px;
}

/* ===================================================
   Google Translate - Hidden (We use our own language menu)
   =================================================== */

/* إخفاء الفرامات */
.goog-te-banner-frame,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
iframe.skiptranslate,
.goog-te-gadget-icon {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    position: absolute !important;
    top: -9999px !important;
    left: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

body {
    top: 0 !important;
}

/* container الترجمة والزرار */
.top-bar-translate {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.top-bar-translate .translate-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 6px !important;
    padding: 4px 10px !important;
    font-size: 13px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    white-space: nowrap !important;
}

.top-bar-translate .translate-btn:hover {
    background: rgba(0, 212, 199, 0.2) !important;
    border-color: #00d4c7 !important;
    color: #fff !important;
}

.top-bar-translate .translate-btn i {
    color: #00d4c7 !important;
}

/* قائمة اللغات المخصصة */
.lang-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    min-width: 200px;
    z-index: 99999;
    padding: 8px 0;
    margin-top: 6px;
}

.lang-menu.show {
    display: block;
}

.lang-menu-header {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.lang-menu-list {
    padding: 4px 0;
    max-height: 300px;
    overflow-y: auto;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 16px;
    border: none;
    background: none;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
    text-align: right;
}

[dir="ltr"] .lang-option {
    text-align: left;
}

.lang-option:hover {
    background: #f0f4ff;
}

.lang-option .lang-flag {
    font-size: 18px;
    line-height: 1;
}

/* ===================================================
   Mobile Responsive
   =================================================== */
@media (max-width: 767px) {
    .top-bar {
        padding: 4px 0;
        font-size: 11px;
    }

    .top-bar-social-link {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }

    .top-bar-separator {
        display: none;
    }

    .lang-menu {
        min-width: 160px;
        left: auto;
        right: -99px;
        transform: none;
        top: 77px;
    }

    [dir="ltr"] .lang-menu {
        left: -99px;
        right: auto;
        top: 77px;
    }

    .lang-option {
        font-size: 12px;
        padding: 6px 12px;
    }

    .lang-option .lang-flag {
        font-size: 15px;
    }
}

@media (max-width: 400px) {
    .top-bar-contact a:not(:first-child) {
        display: none !important;
    }

    .top-bar-social a:nth-child(n+4) {
        display: none !important;
    }
}
