:root {
    --hub-olive: #6b8e23;
    --hub-olive-dark: #4f6f1d;
}

.section-head h6 {
    color: var(--hub-olive) !important;
}

.pace .pace-progress {
    background: var(--hub-olive) !important;
}

.btn-main {
    border-color: var(--hub-olive) !important;
}

.btn-main:after {
    background: var(--hub-olive) !important;
}

.progress-wrap::after {
    color: var(--hub-olive) !important;
}

.progress-wrap svg.progress-circle path {
    stroke: var(--hub-olive) !important;
}

.author-info h5 {
    color: var(--hub-olive) !important;
}

.swiper-pagination-bullet-active {
    background: var(--hub-olive) !important;
}

.quote-block .content h6,
.quote-block .content h6 span {
    color: var(--hub-olive) !important;
}

.social-icons li a:hover,
.footer .footer_menu_list li a:hover {
    color: var(--hub-olive) !important;
}

.services-section .items {
    height: 320px;
    overflow: hidden;
}

.services-section .items .item {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.services-section .items h5,
.services-section .items p {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

.services-section .items h5 {
    -webkit-line-clamp: 2;
}

.services-section .items p {
    -webkit-line-clamp: 2;
}

#contact .contact-details p {
    color: var(--hub-olive) !important;
    font-weight: 700;
}

#contact .contact-details > i {
    background: var(--hub-olive) !important;
    color: #fff !important;
}

[dir="rtl"] body {
    direction: rtl;
    text-align: right;
    font-family: "Cairo", "Tajawal", "Poppins", sans-serif;
}

.top-navbar .container-fluid {
    position: relative;
    align-items: center;
}

/* أزرار اللغة في منتصف الشريط دائماً — يمنع تداخل الشعار الواسع (EN) مع الأزرار دون تصغير الشعار */
.top-navbar .language-switch {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    margin: 0;
}

[dir="rtl"] .top-navbar .container-fluid {
    justify-content: space-between;
}

[dir="rtl"] .top-navbar .logo {
    width: auto;
    flex-shrink: 0;
}

[dir="rtl"] .top-navbar .menu-icon {
    margin: 0;
    display: flex;
    align-items: center;
}

.language-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.language-switch .lang-btn {
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    color: #fff;
    padding: 2px 8px;
    font-size: 12px;
    line-height: 1.4;
    cursor: pointer;
}

.language-switch .lang-btn.is-active {
    background: var(--hub-olive);
    border-color: var(--hub-olive);
    color: #fff;
}

[dir="rtl"] .top-navbar .menu-icon .text {
    padding-left: 0;
    padding-right: 15px;
}

[dir="rtl"] .top-navbar .menu-icon .text:after {
    content: "إغلاق";
    padding-left: 0;
    padding-right: 15px;
}

[dir="rtl"] .menu-wrapper {
    left: auto;
    right: -100%;
}

[dir="rtl"] .menu-wrapper .menu-links .main-menu > li span.nm {
    margin-right: 0;
    margin-left: 10px;
}

[dir="rtl"] .menu-wrapper .menu-links .main-menu > li .link i {
    margin-left: 0;
    margin-right: 5px;
}

[dir="rtl"] .slide-controls .swiper-pagination-fraction {
    right: auto;
    left: 50px;
}

[dir="rtl"] .contact-details {
    text-align: right;
}

[dir="rtl"] .contact-details i {
    float: right;
    margin-right: 0;
    margin-left: 15px;
}

[dir="rtl"] .contact-details ul.social-icons li {
    margin-right: 0 !important;
    margin-left: 8px;
}

[dir="rtl"] .author-info {
    text-align: left !important;
}

[dir="rtl"] .offset-lg-1 {
    margin-left: 0;
    margin-right: 8.333333%;
}

[dir="rtl"] .company .img {
    min-height: 430px;
    justify-content: flex-end;
}

[dir="rtl"] .company .img .imgone,
[dir="rtl"] .company .img .imgtwo {
    width: 55%;
}

[dir="rtl"] .company .img .imgone {
    right: auto;
    left: 0;
    bottom: -80px;
}

[dir="rtl"] .company .img .imgtwo {
    right: 0;
    left: auto;
    top: 0;
}

[dir="rtl"] .company .img .imgone img,
[dir="rtl"] .company .img .imgtwo img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

[dir="rtl"] .btn-main span,
[dir="rtl"] .btn-lit span {
    letter-spacing: 0;
}

.quote-block {
    background: url(../img/hub/hero-3.jpg) center center fixed;
    background-size: cover;
}

[dir="rtl"] .hub-brand {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.2px;
    line-height: 1;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

[dir="rtl"] .hub-brand .hub-logo-ar,
[dir="rtl"] .hub-brand-footer .hub-logo-ar-footer,
[dir="ltr"] .hub-brand .hub-logo-en,
[dir="ltr"] .hub-brand-footer .hub-logo-en-footer {
    display: inline-block;
}

.hub-brand .hub-logo-ar,
.hub-brand .hub-logo-en,
.hub-brand-footer .hub-logo-ar-footer,
.hub-brand-footer .hub-logo-en-footer {
    display: none;
    height: 140px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.98)) drop-shadow(0 0 20px rgba(255, 255, 255, 0.82)) drop-shadow(0 0 30px rgba(255, 255, 255, 0.58));
}

.hub-brand-footer .hub-logo-ar-footer,
.hub-brand-footer .hub-logo-en-footer {
    height: 88px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 1)) drop-shadow(0 0 24px rgba(255, 255, 255, 0.85)) drop-shadow(0 0 34px rgba(255, 255, 255, 0.62));
}

[dir="rtl"] .hub-brand .hub-brand-text,
[dir="rtl"] .hub-brand-footer .hub-brand-text {
    display: none;
}

[dir="ltr"] .hub-brand .hub-brand-text,
[dir="ltr"] .hub-brand-footer .hub-brand-text {
    display: none;
}

[dir="rtl"] .hub-brand:hover {
    color: #fff;
}

.hub-accent {
    color: var(--hub-olive);
    font-weight: 800;
}

.hub-main {
    color: #fff;
    font-weight: 700;
}

[dir="rtl"] .hub-brand-footer {
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.2px;
}

/* فوتر فاتح: خلفية بيضاء ونصوص داكنة وظل خفيف للشعار */
.footer,
footer.footer,
.footer.theme-bg,
footer.footer.theme-bg {
    background: #fff !important;
    background-color: #fff !important;
    box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.07);
}

.footer-top {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.footer .ftr-about {
    color: #555;
}

.footer .footer_menu_list li a {
    color: #333 !important;
}

.footer .copyrights p {
    color: #444 !important;
}

.footer .hub-brand-footer {
    color: #1a1a1a;
}

.footer .hub-main {
    color: #1a1a1a !important;
}

.footer .hub-brand-footer .hub-logo-ar-footer,
.footer .hub-brand-footer .hub-logo-en-footer {
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.12));
}

html[dir="ltr"] body {
    direction: ltr;
    text-align: left;
    font-family: "Poppins", "Roboto", sans-serif;
}

/* شريط علوي متجاوب: عمود للشعار + عمود ضيق للغة + عمود للقائمة — يمنع تداخل الشعار مع AR/EN */
@media (max-width: 991px) {
    .top-navbar .container-fluid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        gap: 6px 10px;
        position: relative;
    }

    .top-navbar .language-switch {
        position: static;
        left: auto;
        transform: none;
        z-index: 2;
        margin: 0;
        justify-self: center;
        flex-shrink: 0;
    }

    .top-navbar .logo {
        margin: 0 !important;
        justify-self: start;
        width: auto !important;
        max-width: 100%;
        min-width: 0;
    }

    .top-navbar .menu-icon {
        justify-self: end;
        margin: 0 !important;
    }

    .top-navbar .hub-brand {
        display: inline-flex;
        align-items: center;
        max-width: 100%;
    }

    .top-navbar .hub-brand .hub-logo-ar,
    .top-navbar .hub-brand .hub-logo-en {
        max-width: 100%;
        height: auto;
        max-height: 48px;
        width: auto;
        object-fit: contain;
    }

    .top-navbar.nav-scroll .hub-brand .hub-logo-ar,
    .top-navbar.nav-scroll .hub-brand .hub-logo-en {
        height: auto;
        max-height: 48px;
    }

    /* تأكيد إضافي للموبايل/التابلت: ناف بيضاء بعد السكرول + فوتر أبيض */
    #nav-bar.top-navbar.nav-scroll,
    .top-navbar.nav-scroll {
        background: #fff !important;
        background-color: #fff !important;
    }

    .footer,
    footer.footer.theme-bg {
        background: #fff !important;
        background-color: #fff !important;
    }
}

@media (max-width: 767px) {
    .hub-brand .hub-logo-ar {
        height: 52px;
    }

    .hub-brand .hub-logo-en {
        height: 52px;
    }

    .hub-brand-footer .hub-logo-ar-footer {
        height: 66px;
    }

    .hub-brand-footer .hub-logo-en-footer {
        height: 66px;
    }

    .services-section .items {
        height: 280px;
    }

    [dir="rtl"] .company .img {
        min-height: 360px;
    }

    [dir="rtl"] .company .img .imgone,
    [dir="rtl"] .company .img .imgtwo {
        width: 68%;
    }

    [dir="rtl"] .company .img .imgone img,
    [dir="rtl"] .company .img .imgtwo img {
        height: 220px;
    }

    .hub-brand-text {
        font-size: 20px; /* جرّب 18 - 28 حسب ما يناسبك */
        font-weight: 600;
    }
}

/*
 * شريط التنقل بعد التمرير: يضيف main.js الصنف nav-scroll عند scrollTop > 50.
 * الخلفية البيضاء هنا بـ !important لتغلب على أي كاش قديم أو ستايلات الجوال (Safari/iOS).
 */
#nav-bar.top-navbar.nav-scroll,
.top-navbar.nav-scroll {
    background: #fff !important;
    background-color: #fff !important;
    box-shadow: 0 2px 18px rgba(0, 0, 0, 0.07);
    color: #1a1a1a;
    padding-top: 12px;
    padding-bottom: 12px;
}

#nav-bar.top-navbar.nav-scroll .menu-icon .icon i,
.top-navbar.nav-scroll .menu-icon .icon i {
    background: #1a1a1a !important;
}

.top-navbar.nav-scroll .hub-brand .hub-logo-ar,
.top-navbar.nav-scroll .hub-brand .hub-logo-en {
    height: 72px;
    width: auto;
    max-width: min(200px, 40vw);
    object-fit: contain;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.15));
}

.top-navbar.nav-scroll .menu-icon .text {
    font-size: 12px;
    color: #1a1a1a;
}

.top-navbar.nav-scroll .menu-icon .text:after {
    color: #1a1a1a;
}

.top-navbar.nav-scroll .language-switch .lang-btn {
    border-color: rgba(0, 0, 0, 0.22);
    color: #333;
    background: transparent;
}

.top-navbar.nav-scroll .language-switch .lang-btn.is-active {
    background: var(--hub-olive);
    border-color: var(--hub-olive);
    color: #fff;
}

.top-navbar.nav-scroll .hub-brand-text,
.top-navbar.nav-scroll .hub-brand-text .hub-main {
    color: #1a1a1a !important;
    text-shadow: none !important;
}

.top-navbar.nav-scroll .hub-brand-text .hub-accent {
    color: var(--hub-olive) !important;
    text-shadow: none !important;
}

[dir="rtl"] .top-navbar.nav-scroll .hub-brand {
    color: #1a1a1a;
}

@media (max-width: 767px) {
    .top-navbar.nav-scroll {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .top-navbar.nav-scroll .hub-brand .hub-logo-ar,
    .top-navbar.nav-scroll .hub-brand .hub-logo-en {
        height: 48px;
        max-width: min(160px, 45vw);
    }
}
