/* Navbar & locale layout — LTR for all languages (incl. Arabic) */

/* ── Header row ── */
.main-header .header-upper .outer-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 88px;
    gap: 16px;
}

.main-header .outer-box .logo-box {
    flex-shrink: 0;
    float: none;
}

.main-header .outer-box .logo-box .logo {
    padding: 18px 0;
    margin: 0;
}

.main-header .outer-box .logo-box .logo img {
    max-height: 52px;
    width: auto;
    display: block;
}

.main-header .header-upper .outer-box .nav-box {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: 24px;
    min-width: 0;
    float: none;
}

.main-header .header-upper .outer-box .nav-box .menu-area {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    flex: 1 1 auto;
    float: none;
}

.main-header .header-upper .outer-box .nav-box .menu-right-content {
    float: none;
}

/* ── Main menu: flex instead of float ── */
.main-header .main-menu {
    float: none;
    width: 100%;
}

.main-header .main-menu .navbar-collapse {
    display: flex !important;
    justify-content: flex-end;
}

.main-header .main-menu .navigation {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 2px;
    float: none;
}

.main-header .main-menu .navigation > li {
    float: none;
    display: flex;
    align-items: center;
    padding-top: 0 !important;
    margin: 0 !important;
    position: relative;
}

.main-header .main-menu .navigation > li > a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 17px !important;
    line-height: 1.25 !important;
    padding: 10px 12px !important;
    letter-spacing: 0.01em;
    font-weight: 700;
    white-space: nowrap;
}

/* Desktop: hide JS dropdown toggle (mobile only) */
@media (min-width: 992px) {
    .main-header .main-menu .navigation li.dropdown .dropdown-btn {
        display: none !important;
    }

    .main-header .main-menu .navigation > li.dropdown > a::after {
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
        content: "\f107";
        font-size: 11px;
        line-height: 1;
        opacity: 0.65;
        margin-left: 2px;
    }
}

/* Arabic font */
html[lang="ar"] .main-header .main-menu .navigation > li > a,
html[lang="ar"] .main-header .language-switcher .dropdown-toggle,
html[lang="ar"] .main-header .language-switcher .dropdown-item {
    font-family: 'Tajawal', 'Poppins', sans-serif;
}

html[lang="ar"] .main-header .main-menu .navigation > li > a {
    font-size: 18px !important;
}

/* ── Right tools: language + search ── */
.main-header .menu-right-content {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
    padding-bottom: 0;
    align-self: center;
    margin-left: 4px;
}

.main-header .language-switcher {
    order: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.main-header .search-box-outer {
    order: 2;
    margin: 0 !important;
    display: flex;
    align-items: center;
}

.main-header .search-box-outer .search-toggler {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    line-height: 1;
    font-size: 16px;
}

/* ── Language switcher ── */
.main-header .language-switcher .dropdown {
    position: relative;
}

.main-header .language-switcher .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    padding: 8px 0;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    color: #161616;
    cursor: pointer;
    line-height: 1.2;
    box-shadow: none;
    white-space: nowrap;
}

.main-header .language-switcher .dropdown-toggle .fas.fa-globe {
    font-size: 15px;
    opacity: 0.85;
}

.main-header .language-switcher .dropdown-toggle::after {
    display: inline-block;
    margin-left: 5px;
    vertical-align: 0.15em;
    content: "";
    border-top: 0.35em solid currentColor;
    border-right: 0.35em solid transparent;
    border-left: 0.35em solid transparent;
    opacity: 0.7;
}

html[lang="ar"] .main-header .language-switcher .dropdown-toggle {
    font-size: 16px;
}

.main-header .language-switcher .dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: auto;
    min-width: 150px;
    margin: 0;
    padding: 6px 0;
    background: #fff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
    z-index: 999;
    list-style: none;
}

.main-header .language-switcher .dropdown-menu li {
    list-style: none;
}

.main-header .language-switcher .dropdown-item {
    display: block;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 600;
    color: #161616;
    text-decoration: none;
    white-space: nowrap;
}

.main-header .language-switcher .dropdown-item:hover,
.main-header .language-switcher .dropdown-item.active {
    background: #f5f5f5;
    color: #e91e63;
}

.main-header .language-switcher .dropdown.show .dropdown-menu,
.main-header .language-switcher:hover .dropdown-menu {
    display: block;
}

/* Inner pages — white header text */
.main-header.style-two .main-menu .navigation > li > a,
.main-header.style-two .language-switcher .dropdown-toggle,
.main-header.style-two .search-box-outer .search-toggler {
    color: #fff;
}

.main-header.style-two .main-menu .navigation > li.dropdown > a::after {
    color: #fff;
}

/* ── Sticky header ── */
.main-header:not(.fixed-header) .sticky-header {
    display: none !important;
}

.main-header.fixed-header .sticky-header {
    display: block !important;
}

.sticky-header .logo-box {
    float: left;
}

.sticky-header .menu-area {
    float: right;
}

.sticky-header .main-menu .navigation > li {
    padding-top: 0 !important;
}

.sticky-header .main-menu .navigation > li > a {
    font-size: 16px !important;
    line-height: 1.25 !important;
}

/* ── Arabic body text — keep LTR layout by default ── */
html[lang="ar"] body {
    font-family: 'Tajawal', 'Poppins', sans-serif;
}

/* When a language is marked RTL in admin (dir="rtl"), apply safe text mirroring
   without flipping the flex navbar/logo composition of the LTR theme. */
html[dir="rtl"] body {
    text-align: right;
}

html[dir="rtl"] .sec-title,
html[dir="rtl"] .content-box,
html[dir="rtl"] .text,
html[dir="rtl"] .widget-content,
html[dir="rtl"] .form-inner,
html[dir="rtl"] .service-details-content,
html[dir="rtl"] .blog-details-content,
html[dir="rtl"] .contact-section,
html[dir="rtl"] .page-title .content-box {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .main-header .language-switcher .dropdown-menu {
    right: auto;
    left: 0;
}

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

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] h5,
html[lang="ar"] h6,
html[lang="ar"] p,
html[lang="ar"] .sec-title h3,
html[lang="ar"] .content-box h1 {
    font-family: 'Tajawal', 'Poppins', sans-serif;
}

/* ── Responsive ── */
@media only screen and (max-width: 1199px) {
    .main-header .main-menu .navigation > li > a {
        font-size: 15px !important;
        padding: 10px 8px !important;
    }

    .main-header .menu-right-content {
        gap: 12px;
    }

    .main-header .language-switcher .dropdown-toggle {
        font-size: 14px;
    }
}

@media only screen and (min-width: 992px) and (max-width: 1400px) {
    .main-header .main-menu .navigation > li > a {
        font-size: 15px !important;
        padding: 10px 9px !important;
    }

    .main-header .header-upper .outer-box .nav-box {
        gap: 16px;
    }
}

@media only screen and (min-width: 1401px) {
    .main-header .main-menu .navigation > li > a {
        padding: 10px 14px !important;
    }
}

/* TikTok icon — not included in the bundled Font Awesome 5 file */
.fab.fa-tiktok:before {
    content: "";
    display: inline-block;
    width: 0.85em;
    height: 1em;
    vertical-align: -0.125em;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='black' d='M448 209.91a210.06 210.06 0 0 1 -122.77-39.25v178.72A161.66 161.66 0 1 1 185 188.31v89.89a74.62 74.62 0 1 0 52.23 71.18V0h88a121.18 121.18 0 0 0 1.86 22.17A122.18 122.18 0 0 0 448 209.91z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='black' d='M448 209.91a210.06 210.06 0 0 1 -122.77-39.25v178.72A161.66 161.66 0 1 1 185 188.31v89.89a74.62 74.62 0 1 0 52.23 71.18V0h88a121.18 121.18 0 0 0 1.86 22.17A122.18 122.18 0 0 0 448 209.91z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Page banner custom bubble images */
.page-title .bubble-box .bubble.bubble-custom {
    background-image: none !important;
    overflow: visible;
}

.page-title .bubble-box .bubble.bubble-custom .page-banner-bubble-img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    pointer-events: none;
}

.page-title .bubble-box .bubble.bubble-1.bubble-custom {
    -webkit-animation: zoom-fade 5s infinite linear;
    animation: zoom-fade 5s infinite linear;
}

.page-title .bubble-box .bubble.bubble-3.bubble-custom {
    -webkit-animation: zoom-fade 3s infinite linear;
    animation: zoom-fade 3s infinite linear;
}

.page-title .bubble-box .bubble.bubble-1 {
    background-size: contain;
    background-position: center center;
}

.page-title .bubble-box .bubble.bubble-2 {
    background-size: contain;
    background-position: center center;
}

.page-title .bubble-box .bubble.bubble-3 {
    background-size: contain;
    background-position: center center;
}

/* Service skill section - keep uploaded images within design bounds */
.about-style-two #image_block_03 .image-box .image {
    max-width: 520px;
    margin: 0 auto;
}

.about-style-two #image_block_03 .image-box .image img.service-skill-section-img,
.about-style-two #image_block_03 .image-box .image img {
    width: 100%;
    max-width: 520px;
    max-height: 420px;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
    margin: 0 auto;
}

@media only screen and (max-width: 767px) {
    .about-style-two #image_block_03 .image-box .image,
    .about-style-two #image_block_03 .image-box .image img {
        max-width: 100%;
        max-height: 320px;
    }
}

/* Service skill section - keep uploaded images within design bounds */
.about-style-two #image_block_03 .image-box .image {
    max-width: 520px;
    margin: 0 auto;
}

.about-style-two #image_block_03 .image-box .image img,
.about-style-two #image_block_03 .image-box .image .service-skill-section-img {
    width: 100%;
    max-width: 520px;
    max-height: 420px;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
    margin: 0 auto;
}

@media only screen and (max-width: 767px) {
    .about-style-two #image_block_03 .image-box .image,
    .about-style-two #image_block_03 .image-box .image img,
    .about-style-two #image_block_03 .image-box .image .service-skill-section-img {
        max-width: 100%;
        max-height: 320px;
    }
}

/* Our History — keep center title words inside the top circle */
.our-history .box-title h3 {
    display: inline-flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 110px;
    line-height: 1.15 !important;
    font-size: 22px;
    padding: 10px 8px;
    white-space: normal;
}

.our-history .box-title h3 span {
    display: block;
}

/* Contact page — keep badge text on one line (desktop/tablet) */
.contact-section .sec-title .title-two.contact-page-badge p {
    white-space: nowrap;
}

/* ── Site-wide responsive refinements ── */
img,
video,
iframe,
embed,
object {
    max-width: 100%;
    height: auto;
}

.service-details-content .carousel-box-one img,
.service-details-content .carousel-box-two img,
.blog-details-content img,
.page-title .content-box h1 {
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

/* Mobile menu toggle (hamburger) — works in menu-right-content */
.main-header .menu-right-content .mobile-nav-toggler {
    display: none;
    position: relative;
    float: none;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    color: #3786ff;
    margin: 0;
    padding: 8px 4px;
    flex-shrink: 0;
}

.main-header .menu-right-content .mobile-nav-toggler .icon-bar {
    position: relative;
    height: 2px;
    width: 30px;
    display: block;
    margin-bottom: 4px;
    background: -webkit-linear-gradient(0deg, #842af1, #0e3bab 50%);
    background: linear-gradient(0deg, #842af1, #0e3bab 50%);
    -webkit-transition: all 300ms ease;
    transition: all 300ms ease;
}

.main-header .menu-right-content .mobile-nav-toggler .icon-bar:last-child {
    margin-bottom: 0;
}

@media only screen and (max-width: 991px) {
    .main-header .header-upper .outer-box .nav-box {
        justify-content: flex-end;
        gap: 8px;
        flex: 1 1 auto;
        min-width: 0;
    }

    .main-header .header-upper .outer-box .nav-box .menu-area {
        display: none;
    }

    .main-header .menu-right-content {
        gap: 8px;
        flex: 0 0 auto;
        margin-left: 0;
        align-items: center;
    }

    .main-header .menu-right-content .mobile-nav-toggler {
        display: block;
    }

    .main-header .language-switcher .dropdown-toggle {
        font-size: 13px;
        padding: 6px 0;
        gap: 4px;
    }

    .main-header .language-switcher .dropdown-toggle .current-lang {
        max-width: 72px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .main-header .header-upper .outer-box {
        min-height: 72px;
        gap: 12px;
    }

    .main-header .outer-box .logo-box {
        flex: 1 1 auto;
        min-width: 0;
    }

    .main-header .outer-box .logo-box .logo img {
        max-height: 46px;
        max-width: 100%;
    }

    .testimonial-section.home-testimonial-dynamic .user-column,
    .testimonial-section.home-testimonial-dynamic .inner-column {
        padding-left: 15px;
        padding-right: 15px;
    }

    .testimonial-section.home-testimonial-dynamic .testimonial-inner {
        margin-left: 0;
        margin-right: 0;
    }
}

@media only screen and (max-width: 767px) {
    .contact-section .sec-title .title-two.contact-page-badge p,
    .footer-subscribe .sec-title .title-two p {
        white-space: normal;
    }

    .service-details-content .service-tab-box .tab-btn-box .tab-btns {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .service-details-content .service-tab-box .tab-btn-box .tab-btns li {
        float: none;
        margin: 0 !important;
    }

    .subscribe-section.home-subscribe-dynamic .content-box .subscribe-form .form-group {
        flex-direction: column;
        align-items: stretch;
    }

    .subscribe-section.home-subscribe-dynamic .content-box .subscribe-form .form-group button {
        width: 100%;
    }

    .main-footer.style-two .footer-subscribe .inner-box .subscribe-form-2 .form-group {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .main-footer.style-two .footer-subscribe .inner-box .subscribe-form-2 .form-group input[type='email'],
    .main-footer.style-two .footer-subscribe .inner-box .subscribe-form-2 .form-group button {
        width: 100%;
        max-width: 100%;
        position: relative;
        top: auto;
        right: auto;
    }

    .page-title .content-box h1 {
        font-size: clamp(26px, 7vw, 36px);
        line-height: 1.2;
    }

    .banner-section .content-box h1 {
        font-size: clamp(28px, 8vw, 42px);
        line-height: 1.2;
    }
}

@media only screen and (max-width: 575px) {
    .auto-container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .service-section .home-service-grid {
        gap: 30px 0;
    }

    .fun-facts-grid .counter-block-one h3 {
        font-size: 16px;
        line-height: 1.35;
    }
}
