/* Header navigation styles */
.main-navigation li a {
    transition: all 0.3s ease;
}

.main-navigation li a:hover {
    color: #ED1A23 !important;
}

.main-navigation li a.is-active {
    text-decoration: underline;
    text-underline-offset: 5px;
}

/* Latin font for emails and numbers */
.latin-font,
.english-content {
    font-family: 'Arial', sans-serif !important;
    direction: ltr !important;
    display: inline-block;
    unicode-bidi: isolate;
}

/* Ensure emails and phone numbers always stay in English format */
.latin-font,
.english-content,
[data-i18n*="email"],
[data-i18n*="phone"],
[data-i18n*="Email"],
[data-i18n*="Phone"] {
    font-family: 'Arial', sans-serif !important;
    direction: ltr !important;
    display: inline-block;
    unicode-bidi: isolate;
}

/* Force LTR direction for contact information in both languages */
html[dir="rtl"] .latin-font,
html[dir="rtl"] .english-content,
html[dir="rtl"] [data-i18n*="email"],
html[dir="rtl"] [data-i18n*="phone"],
html[dir="rtl"] [data-i18n*="Email"],
html[dir="rtl"] [data-i18n*="Phone"] {
    direction: ltr !important;
    text-align: left !important;
    font-family: 'Arial', sans-serif !important;
}

/* Fix arrow direction for RTL/LTR */
html[dir="rtl"] .fx-pr-btn-1 i.fa-angle-right {
    transform: rotate(180deg);
}

html[dir="rtl"] .fx-slider-btn-2-item i.fa-angle-left,
html[dir="rtl"] .fx-slider-btn-2-item i.fa-angle-right {
    transform: rotate(180deg);
}

html[dir="rtl"] .txa-offcanvas-services-item i.fa-arrow-right {
    transform: rotate(180deg);
}

html[dir="rtl"] i.fa-arrow-up-right {
    transform: rotate(270deg);
}

/* Override: WhatsApp buttons should NEVER have transformed icons */
html[dir="rtl"] .whatsapp-btn i,
html[dir="rtl"] .whatsapp-btn-cta i,
.whatsapp-btn i,
.whatsapp-btn-cta i {
    transform: none !important;
}

/* Fix all contact page button arrows for RTL */
html[dir="rtl"] a i.fa-angle-right {
    transform: rotate(180deg) !important;
}

html[dir="rtl"] button i.fa-angle-right {
    transform: rotate(180deg) !important;
}

html[dir="rtl"] .fx-pr-btn-1 i {
    transform: rotate(180deg) !important;
}

html[dir="rtl"] .whatsapp-btn i.fa-whatsapp {
    transform: none !important;
}

/* Default navigation styles */
.main-navigation li a {
    color: #39B54A !important;
    font-weight: 600;
    transition: color 0.3s;
}

.main-navigation li a:hover {
    color: #ED1A23 !important;
}

/* Sticky header styles */
.txa_sticky_header.sticky-menu-active .main-navigation li a {
    color: #39B54A !important;
}

.txa_sticky_header.sticky-menu-active .main-navigation li a:hover {
    color: #ED1A23 !important;
}

/* Language toggle styles - Contact page - AR/EN format with offset */
.lang-toggle {
    background: transparent !important;
    border: none !important;
    padding: 8px 12px !important;
    display: flex !important;
    align-items: baseline !important;
    gap: 0 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    transition: none !important;
    height: 40px !important;
    min-width: 60px !important;
    direction: ltr !important;
}

.lang-toggle:hover {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.lang-toggle .lang-item {
    cursor: pointer;
    color: rgba(57, 181, 74, 0.6);
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
}

.lang-toggle .lang-item[data-lang="ar"] {
    transform: translateY(-3px);
    margin-right: 2px;
}

.lang-toggle .lang-item[data-lang="en"] {
    transform: translateY(3px);
    margin-left: 2px;
}

.lang-toggle .lang-item.active {
    color: #ED1A23;
    font-weight: 700;
}

.lang-toggle .lang-separator {
    color: rgba(57, 181, 74, 0.6);
    font-weight: 800;
    margin: 0 1px;
    font-size: 20px;
}

/* Sticky header language toggle */
.txa_sticky_header.sticky-menu-active .lang-toggle .lang-item {
    color: rgba(57, 181, 74, 0.6);
}

.txa_sticky_header.sticky-menu-active .lang-toggle .lang-item.active {
    color: #ED1A23;
}

/* Hide language toggle in header on mobile view */
@media (max-width: 991px) {
    .fx-header-3-action-link .lang-toggle {
        display: none !important;
    }
}

/* Sidebar language toggle styles - inline next to logo */
.txa-offcanvas-lang-toggle-inline .lang-toggle {
    justify-content: flex-end;
}

.txa-offcanvas-lang-toggle-inline .lang-toggle .lang-item {
    color: rgba(57, 181, 74, 0.6);
}

.txa-offcanvas-lang-toggle-inline .lang-toggle .lang-item.active {
    color: #ED1A23;
}

.txa-offcanvas-lang-toggle-inline .lang-toggle .lang-separator {
    color: rgba(57, 181, 74, 0.6);
}

/* Sidebar WhatsApp button row - full width */
.txa-offcanvas-whatsapp-row {
    display: flex;
}

.txa-offcanvas-whatsapp-row .whatsapp-btn {
    background-color: transparent !important;
    border-radius: 25px !important;
    border: 2px solid #39B54A !important;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.txa-offcanvas-whatsapp-row .whatsapp-btn:hover {
    border-color: #ED1A23 !important;
}

.txa-offcanvas-whatsapp-row .whatsapp-btn:hover span,
.txa-offcanvas-whatsapp-row .whatsapp-btn:hover i {
    color: #ED1A23;
}

.txa-offcanvas-whatsapp-row .whatsapp-btn span {
    color: #39B54A;
    font-weight: 600;
}

.txa-offcanvas-whatsapp-row .whatsapp-btn i {
    color: #39B54A;
}

/* RTL WhatsApp button in row */
html[dir="rtl"] .txa-offcanvas-whatsapp-row .whatsapp-btn {
    flex-direction: row-reverse !important;
}

.txa_sticky_header.sticky-menu-active .lang-toggle .lang-separator {
    color: rgba(57, 181, 74, 0.6);
}

/* WhatsApp button styles */
.whatsapp-btn {
    background-color: transparent !important;
    border-radius: 25px !important;
    border: 2px solid #39B54A !important;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.whatsapp-btn:hover {
    border-color: #ED1A23 !important;
}

.whatsapp-btn:hover span,
.whatsapp-btn:hover i {
    color: #ED1A23;
}

.whatsapp-btn span {
    color: #39B54A;
    font-weight: 600;
}

.whatsapp-btn {
    flex-direction: row !important;
}

.whatsapp-btn i {
    color: #39B54A;
    margin-left: 8px;
    margin-right: 0;
}

/* RTL WhatsApp icon positioning */
html[dir="rtl"] .whatsapp-btn {
    flex-direction: row-reverse !important;
}

html[dir="rtl"] .whatsapp-btn i {
    margin-left: 0 !important;
    margin-right: 8px !important;
}

html[dir="rtl"] .txa_sticky_header.sticky-menu-active .whatsapp-btn i {
    margin-left: 0 !important;
    margin-right: 8px !important;
}

/* Prevent WhatsApp icon from being flipped/rotated */
.whatsapp-btn i.fa-brands.fa-whatsapp,
.whatsapp-btn-cta i.fa-brands.fa-whatsapp,
.whatsapp-btn i[class*="fa-whatsapp"],
.whatsapp-btn-cta i[class*="fa-whatsapp"] {
    transform: none !important;
}

html[dir="rtl"] .whatsapp-btn i.fa-brands.fa-whatsapp,
html[dir="rtl"] .whatsapp-btn-cta i.fa-brands.fa-whatsapp,
html[dir="rtl"] .whatsapp-btn i[class*="fa-whatsapp"],
html[dir="rtl"] .whatsapp-btn-cta i[class*="fa-whatsapp"] {
    transform: none !important;
}

.txa_sticky_header.sticky-menu-active .whatsapp-btn {
    background-color: transparent !important;
    border: 2px solid #39B54A !important;
}

.txa_sticky_header.sticky-menu-active .whatsapp-btn span,
.txa_sticky_header.sticky-menu-active .whatsapp-btn i {
    color: #39B54A;
}

.whatsapp-btn:hover,
.txa_sticky_header.sticky-menu-active .whatsapp-btn:hover {
    border-color: #ED1A23 !important;
}

.whatsapp-btn:hover span,
.whatsapp-btn:hover i,
.txa_sticky_header.sticky-menu-active .whatsapp-btn:hover span,
.txa_sticky_header.sticky-menu-active .whatsapp-btn:hover i {
    color: #ED1A23 !important;
}

/* Explicitly handle logo swap */
.fx-header-3-main-logo .default-logo {
    display: block;
}

.fx-header-3-main-logo .sticky-logo {
    display: none;
}

.txa_sticky_header.sticky-menu-active .fx-header-3-main-logo .default-logo {
    display: none;
}

.txa_sticky_header.sticky-menu-active .fx-header-3-main-logo .sticky-logo {
    display: block;
}

/* Arabic text spacing fixes */
html[dir="rtl"] .fx-scn-title-3 {
    line-height: 1.4 !important;
    margin-bottom: 25px !important;
}

html[dir="rtl"] .scn-disc {
    line-height: 1.6 !important;
    margin-bottom: 20px !important;
}

html[dir="rtl"] .fx-contact-6-content h2 {
    line-height: 1.4 !important;
    margin-bottom: 20px !important;
}

html[dir="rtl"] .fx-contact-6-content p {
    line-height: 1.6 !important;
    margin-bottom: 15px !important;
}

html[dir="rtl"] .fx-contact-2-content-inner h4 {
    line-height: 1.4 !important;
    margin-bottom: 15px !important;
}

html[dir="rtl"] .fx-contact-2-content-inner p {
    line-height: 1.6 !important;
    margin-bottom: 15px !important;
}

html[dir="rtl"] .fx-counter-4-content h4 {
    line-height: 1.4 !important;
    margin-bottom: 15px !important;
}

html[dir="rtl"] .fx-counter-4-content p {
    line-height: 1.6 !important;
    margin-bottom: 15px !important;
}

html[dir="rtl"] .fx-footer-1-contact {
    line-height: 1.6 !important;
}

html[dir="rtl"] .fx-footer-1-contact li {
    margin-bottom: 15px !important;
}

html[dir="rtl"] .fx-footer-1-menu-2 li {
    margin-bottom: 8px !important;
}

html[dir="rtl"] .fx-cta-1-content-title {
    line-height: 1.4 !important;
    margin-bottom: 25px !important;
}

/* Fix Arabic navigation buttons - swap positions and arrows */
html[dir="rtl"] .fx-project-2-slider-btn {
    display: flex !important;
    flex-direction: row-reverse !important;
}

html[dir="rtl"] .fx-p2-slider-prev {
    order: 3 !important;
}

html[dir="rtl"] .fx-p2-slider-next {
    order: 1 !important;
}

html[dir="rtl"] .fx-p2-scrollbar {
    order: 2 !important;
}

/* Fix arrow directions and text order for RTL navigation */
html[dir="rtl"] .fx-p2-slider-prev {
    flex-direction: row-reverse !important;
}

html[dir="rtl"] .fx-p2-slider-next {
    flex-direction: row !important;
}

html[dir="rtl"] .fx-p2-slider-prev i.fa-angle-left {
    transform: rotate(180deg) !important;
}

html[dir="rtl"] .fx-p2-slider-next i.fa-angle-right {
    transform: rotate(180deg) !important;
}

/* Fix button text order for proper RTL display */
html[dir="rtl"] .fx-slider-btn-2-item {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Fix 'View on Map' button text order */
.fx-pr-btn-1 {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    flex-direction: row !important;
}

/* LTR (English): Text first, then arrow */
.fx-pr-btn-1 .text {
    order: 1 !important;
}

.fx-pr-btn-1 i {
    order: 2 !important;
}

/* RTL (Arabic): Text first, then arrow (but arrow is flipped) */
html[dir="rtl"] .fx-pr-btn-1 {
    flex-direction: row !important;
}

html[dir="rtl"] .fx-pr-btn-1 .text {
    order: 1 !important;
}

html[dir="rtl"] .fx-pr-btn-1 i {
    order: 2 !important;
}

/* Ensure button content is properly aligned */
.fx-pr-btn-1 * {
    flex-shrink: 0;
}

/* Override any potential conflicting styles */
.fx-project-2-slider-item .fx-pr-btn-1 {
    display: flex !important;
    flex-direction: row !important;
}

.fx-project-2-slider-item .fx-pr-btn-1 .text {
    order: 1 !important;
}

.fx-project-2-slider-item .fx-pr-btn-1 i {
    order: 2 !important;
}

@media only screen and (min-width: 1200px) and (max-width: 1399px),
only screen and (min-width: 992px) and (max-width: 1199px),
only screen and (min-width: 768px) and (max-width: 991px),
(max-width: 767px) {
    .fx-project-2-slider:is(.has-project-3) .fx-project-2-slider-btn {
        right: 0px;
    }
}

.fx-project-2-slider-item:is(.has-project-3) .fx-project-2-slider-item-box {
    padding: 45px 40px 50px;
}

@media only screen and (min-width: 1400px) and (max-width: 1599px) {
    .fx-project-2-slider-item:is(.has-project-3) .fx-project-2-slider-item-box {
        padding: 40px 35px 45px;
    }
}

@media only screen and (min-width: 1200px) and (max-width: 1399px) {
    .fx-project-2-slider-item:is(.has-project-3) .fx-project-2-slider-item-box {
        padding: 35px 30px 40px;
    }
}

@media only screen and (min-width: 992px) and (max-width: 1199px) {
    .fx-project-2-slider-item:is(.has-project-3) .fx-project-2-slider-item-box {
        padding: 30px 25px 35px;
    }
}

@media only screen and (min-width: 768px) and (max-width: 991px) {
    .fx-project-2-slider-item:is(.has-project-3) .fx-project-2-slider-item-box {
        padding: 25px 20px 30px;
    }
}

@media (max-width: 767px) {
    .fx-project-2-slider-item:is(.has-project-3) .fx-project-2-slider-item-box {
        padding: 20px 15px 25px;
    }
}

/* Fix Arabic hero section text spacing */
html[dir="rtl"] .fx-about-3-scn-title .fx-scn-title-3 {
    line-height: 1.3 !important;
    margin-bottom: 25px !important;
    font-size: clamp(32px, 4.5vw, 56px) !important;
    font-weight: 600 !important;
    text-align: start !important;
}

/* Enhanced Arabic title styling to match project titles */
html[dir="rtl"][lang="ar"] .fx-scn-title-3 {
    font-size: 64px !important;
    line-height: 1.1 !important;
    font-weight: 700 !important;
    margin-bottom: 35px !important;
    text-transform: uppercase !important;
    letter-spacing: -1px !important;
    color: #000 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Special styling for hero sections */
html[dir="rtl"][lang="ar"] .fx-about-3-scn-title .fx-scn-title-3,
html[dir="rtl"][lang="ar"] .fx-hero-1-slider-item-title,
html[dir="rtl"][lang="ar"] .fx-about-6-scn-title-big {
    font-size: 68px !important;
    line-height: 1.05 !important;
    font-weight: 800 !important;
    letter-spacing: -2px !important;
    margin-bottom: 40px !important;
    text-transform: uppercase !important;
    background: linear-gradient(135deg, #000 0%, #333 100%) !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: #000 !important;
}

@media only screen and (min-width: 1400px) and (max-width: 1599px) {
    html[dir="rtl"][lang="ar"] .fx-scn-title-3 {
        font-size: 58px !important;
    }

    html[dir="rtl"][lang="ar"] .fx-about-3-scn-title .fx-scn-title-3,
    html[dir="rtl"][lang="ar"] .fx-hero-1-slider-item-title,
    html[dir="rtl"][lang="ar"] .fx-about-6-scn-title-big {
        font-size: 62px !important;
    }
}

@media only screen and (min-width: 1200px) and (max-width: 1399px) {
    html[dir="rtl"][lang="ar"] .fx-scn-title-3 {
        font-size: 52px !important;
    }

    html[dir="rtl"][lang="ar"] .fx-about-3-scn-title .fx-scn-title-3,
    html[dir="rtl"][lang="ar"] .fx-hero-1-slider-item-title,
    html[dir="rtl"][lang="ar"] .fx-about-6-scn-title-big {
        font-size: 56px !important;
    }
}

@media only screen and (min-width: 992px) and (max-width: 1199px) {
    html[dir="rtl"][lang="ar"] .fx-scn-title-3 {
        font-size: 46px !important;
    }

    html[dir="rtl"][lang="ar"] .fx-about-3-scn-title .fx-scn-title-3,
    html[dir="rtl"][lang="ar"] .fx-hero-1-slider-item-title,
    html[dir="rtl"][lang="ar"] .fx-about-6-scn-title-big {
        font-size: 50px !important;
    }
}

@media only screen and (min-width: 768px) and (max-width: 991px) {
    html[dir="rtl"][lang="ar"] .fx-scn-title-3 {
        font-size: 40px !important;
    }

    html[dir="rtl"][lang="ar"] .fx-about-3-scn-title .fx-scn-title-3,
    html[dir="rtl"][lang="ar"] .fx-hero-1-slider-item-title,
    html[dir="rtl"][lang="ar"] .fx-about-6-scn-title-big {
        font-size: 44px !important;
    }
}

@media (max-width: 767px) {
    html[dir="rtl"][lang="ar"] .fx-scn-title-3 {
        font-size: 32px !important;
        letter-spacing: -1px !important;
    }

    html[dir="rtl"][lang="ar"] .fx-about-3-scn-title .fx-scn-title-3,
    html[dir="rtl"][lang="ar"] .fx-hero-1-slider-item-title,
    html[dir="rtl"][lang="ar"] .fx-about-6-scn-title-big {
        font-size: 36px !important;
        letter-spacing: -1px !important;
    }
}

@media only screen and (min-width: 576px) and (max-width: 767px) {

    html[dir="rtl"][lang="ar"] .fx-about-3-scn-title .fx-scn-title-3,
    html[dir="rtl"][lang="ar"] .fx-hero-1-slider-item-title,
    html[dir="rtl"][lang="ar"] .fx-about-6-scn-title-big {
        font-size: 42px !important;
    }
}

html[dir="rtl"] .fx-about-3-scn-title .scn-disc {
    line-height: 1.6 !important;
    margin-bottom: 20px !important;
    margin-top: 0 !important;
}

html[dir="rtl"] .fx-about-3-scn-title {
    margin-bottom: 40px !important;
}

/* Footer location link styling */
.fx-footer-1-contact li a {
    color: inherit;
    transition: color 0.3s ease;
}

.fx-footer-1-contact li a:hover {
    color: #ED1A23;
}

/* CTA WhatsApp button styling */
.whatsapp-btn-cta {
    background-color: transparent !important;
    border-radius: 35px !important;
    border: 3px solid white !important;
    padding: 18px 45px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    text-decoration: none !important;
    width: 100%;
    max-width: 400px;
    font-size: 1.1rem;
    min-height: 65px;
}

.whatsapp-btn-cta span {
    color: white !important;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.4s ease;
}

.whatsapp-btn-cta i {
    color: white !important;
    margin-left: 12px;
    font-size: 1.4rem;
    transition: all 0.4s ease;
}

.whatsapp-btn-cta:hover {
    background-color: transparent !important;
    border-color: #25D366 !important;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn-cta:hover span,
.whatsapp-btn-cta:hover i {
    color: #25D366 !important;
}

/* RTL WhatsApp CTA icon positioning - icon on left in RTL, right in LTR */
.whatsapp-btn-cta {
    flex-direction: row !important;
}

.whatsapp-btn-cta i {
    margin-left: 12px !important;
    margin-right: 0 !important;
}

html[dir="rtl"] .whatsapp-btn-cta {
    flex-direction: row-reverse !important;
}

html[dir="rtl"] .whatsapp-btn-cta i {
    margin-left: 0 !important;
    margin-right: 12px !important;
}

/* WhatsApp CTA button order - text first, icon second for LTR */
.fx-pr-btn-1.whatsapp-btn-cta .text {
    order: 1 !important;
}

.fx-pr-btn-1.whatsapp-btn-cta i {
    order: 2 !important;
}

/* WhatsApp CTA button order for RTL - icon first, text second */
html[dir="rtl"] .fx-pr-btn-1.whatsapp-btn-cta .text {
    order: 2 !important;
}

html[dir="rtl"] .fx-pr-btn-1.whatsapp-btn-cta i {
    order: 1 !important;
}

/* Fix Arabic counter text centering */
html[dir="rtl"] .fx-counter-1-item-disc {
    text-align: center !important;
    display: block !important;
    margin: 0 auto !important;
    width: 100% !important;
}

html[dir="rtl"] .fx-counter-1-item {
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
}

html[dir="rtl"] .fx-counter-1-item-number {
    text-align: center !important;
    margin: 0 auto !important;
    display: block !important;
}

html[dir="rtl"] .txxaslideup-item {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Mobile sidebar toggle button styling - Contact page - 3 horizontal lines */
.fx-header-3-action-link .fx-menu-btn-1 {
    background: transparent !important;
    border: none !important;
    padding: 8px !important;
    width: 40px !important;
    height: 40px !important;
    display: none !important;
    /* Hidden by default, shown dynamically */
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    transition: all 0.3s ease;
    margin-left: 10px !important;
}

/* Show mobile menu button only when navigation is hidden */
@media (max-width: 1200px) {
    .fx-header-3-action-link .fx-menu-btn-1 {
        display: flex !important;
    }

    .fx-header-3-action-link .whatsapp-btn {
        display: none !important;
    }
}

.fx-header-3-action-link .fx-menu-btn-1 span {
    width: 20px !important;
    height: 2px !important;
    background: #39B54A !important;
    border-radius: 1px !important;
    transition: all 0.3s ease;
    display: block !important;
}

/* Hide extra spans - only show first 3 */
.fx-header-3-action-link .fx-menu-btn-1 span:nth-child(n+4) {
    display: none !important;
}

/* Sticky header mobile toggle button */
.txa_sticky_header.sticky-menu-active .fx-header-3-action-link .fx-menu-btn-1 {
    background: transparent !important;
    border: none !important;
}

.txa_sticky_header.sticky-menu-active .fx-header-3-action-link .fx-menu-btn-1 span {
    background: #39B54A !important;
}

/* Hover effects for mobile toggle button */
.fx-header-3-action-link .fx-menu-btn-1:hover span,
.txa_sticky_header.sticky-menu-active .fx-header-3-action-link .fx-menu-btn-1:hover span {
    background: #ED1A23 !important;
}

/* Sidebar WhatsApp button styling - matches header style */
.txa-offcanvas-whatsapp .whatsapp-btn {
    background-color: transparent !important;
    border-radius: 25px !important;
    border: 2px solid #39B54A !important;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-direction: row !important;
    text-decoration: none !important;
    min-width: 200px;
}

.txa-offcanvas-whatsapp .whatsapp-btn:hover {
    border-color: #ED1A23 !important;
}

.txa-offcanvas-whatsapp .whatsapp-btn:hover span,
.txa-offcanvas-whatsapp .whatsapp-btn:hover i {
    color: #ED1A23;
}

.txa-offcanvas-whatsapp .whatsapp-btn span {
    color: #39B54A;
    font-weight: 600;
}

.txa-offcanvas-whatsapp .whatsapp-btn i {
    color: #39B54A;
    margin-left: 8px;
    margin-right: 0;
}

/* RTL WhatsApp icon positioning for sidebar */
html[dir="rtl"] .txa-offcanvas-whatsapp .whatsapp-btn {
    flex-direction: row-reverse !important;
}

html[dir="rtl"] .txa-offcanvas-whatsapp .whatsapp-btn i {
    margin-left: 0 !important;
    margin-right: 8px !important;
}

/* Prevent WhatsApp icon from being flipped/rotated in sidebar */
.txa-offcanvas-whatsapp .whatsapp-btn i.fa-brands.fa-whatsapp,
.txa-offcanvas-whatsapp .whatsapp-btn i[class*="fa-whatsapp"] {
    transform: none !important;
}

html[dir="rtl"] .txa-offcanvas-whatsapp .whatsapp-btn i.fa-brands.fa-whatsapp,
html[dir="rtl"] .txa-offcanvas-whatsapp .whatsapp-btn i[class*="fa-whatsapp"] {
    transform: none !important;
}

/* Sidebar RTL/LTR Direction Control */
.txa-offcanvas-box {
    right: -100% !important;
    left: auto !important;
}

html[dir="rtl"] .txa-offcanvas-box {
    left: -100% !important;
    right: auto !important;
}

.txa-offcanvas-box.offcanvas_box_active {
    right: 0 !important;
    left: auto !important;
}

html[dir="rtl"] .txa-offcanvas-box.offcanvas_box_active {
    left: 0 !important;
    right: auto !important;
}

/* Sidebar content direction */
.txa-offcanvas-box-container {
    direction: inherit;
}

/* Sidebar WhatsApp button - same size as header */
.txa-offcanvas-whatsapp .whatsapp-btn {
    padding: 8px 20px !important;
}

/* ========================================
                           RESPONSIVE TYPOGRAPHY - SMART SCALING
                           ======================================== */

/* Main Section Titles - Get bigger on smaller screens */
@media only screen and (max-width: 1199px) {
    .fx-scn-title-3 {
        font-size: 68px !important;
    }
}

@media only screen and (max-width: 991px) {
    .fx-scn-title-3 {
        font-size: 72px !important;
        line-height: 1.2 !important;
    }
}

@media only screen and (max-width: 767px) {
    .fx-scn-title-3 {
        font-size: 76px !important;
        line-height: 1.1 !important;
    }
}

@media only screen and (max-width: 575px) {
    .fx-scn-title-3 {
        font-size: 80px !important;
        line-height: 1.05 !important;
    }
}

@media only screen and (max-width: 480px) {
    .fx-scn-title-3 {
        font-size: 84px !important;
        line-height: 1.0 !important;
    }
}

/* Sub Titles (h2) - Get bigger on smaller screens */
@media only screen and (max-width: 1199px) {
    .fx-heading-2 {
        font-size: 44px !important;
    }
}

@media only screen and (max-width: 991px) {
    .fx-heading-2 {
        font-size: 48px !important;
        line-height: 1.2 !important;
    }
}

@media only screen and (max-width: 767px) {
    .fx-heading-2 {
        font-size: 52px !important;
        line-height: 1.15 !important;
    }
}

@media only screen and (max-width: 575px) {
    .fx-heading-2 {
        font-size: 56px !important;
        line-height: 1.1 !important;
    }
}

@media only screen and (max-width: 480px) {
    .fx-heading-2 {
        font-size: 60px !important;
        line-height: 1.05 !important;
    }
}

/* Paragraphs - Same size as desktop across all screens */
.fx-para-1,
.scn-disc {
    font-size: inherit !important;
    line-height: inherit !important;
}

/* Small subtitles - Moderate scaling */
@media only screen and (max-width: 991px) {
    .fx-subtitle-1 {
        font-size: 16px !important;
    }
}

@media only screen and (max-width: 767px) {
    .fx-subtitle-1 {
        font-size: 17px !important;
    }
}

@media only screen and (max-width: 575px) {
    .fx-subtitle-1 {
        font-size: 18px !important;
    }
}

/* Contact card titles - Scale appropriately with fx-heading-1 */
@media only screen and (max-width: 991px) {
    .fx-services-5-card-content .card-title.fx-heading-1 {
        font-size: 22px !important;
    }
}

@media only screen and (max-width: 767px) {
    .fx-services-5-card-content .card-title.fx-heading-1 {
        font-size: 24px !important;
    }
}

@media only screen and (max-width: 575px) {
    .fx-services-5-card-content .card-title.fx-heading-1 {
        font-size: 26px !important;
    }
}

/* Counter text - Same size as desktop across all screens */
.fx-counter-1-item-disc {
    font-size: inherit !important;
}



/* Custom Contact Info Mobile Styles */
@media (max-width: 767px) {
    .fx-services-5-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 30px 20px;
    }

    .fx-services-5-card-img {
        height: auto;
        width: 120px;
        height: 120px;
        border-radius: 50%;
        margin-bottom: 20px;
        clip-path: none;
    }

    .fx-services-5-card-img img {
        width: 100px !important;
        height: 100px !important;
        object-fit: contain !important;
    }

    /* Reduce animation intensity on mobile */
    .fx-services-5-card-img img[alt="Phone"] {
        animation: phoneRinging 2s ease-in-out infinite;
    }

    /* Mobile hover: Same gradual stop behavior */
    .fx-services-5-card:hover .fx-services-5-card-img img[alt="Phone"] {
        animation: phoneGradualStopAndScale 1.5s ease-out forwards;
    }

    .fx-services-5-card-img img[alt="Email"] {
        animation: emailFloating 2.5s ease-in-out infinite;
    }

    .fx-services-5-card-content {
        padding: 0;
    }

    .fx-services-5-card-content .card-title.fx-heading-1 {
        font-size: 20px !important;
        line-height: 1.2;
        margin-bottom: 0;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .fx-services-5-card-img img {
        width: 110px !important;
        height: 110px !important;
    }

    /* Medium animation timing on tablet */
    .fx-services-5-card-img img[alt="Phone"] {
        animation: phoneRinging 1.7s ease-in-out infinite;
    }

    /* Tablet hover: Same gradual stop behavior */
    .fx-services-5-card:hover .fx-services-5-card-img img[alt="Phone"] {
        animation: phoneGradualStopAndScale 1.3s ease-out forwards;
    }

    .fx-services-5-card-img img[alt="Email"] {
        animation: emailFloating 2.2s ease-in-out infinite;
    }
}

/* General styling for webp images */
.fx-services-5-card-img {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    overflow: visible;
    position: relative;
}

.fx-services-5-card-img img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
    transition: transform 0.3s ease;
}

/* Phone Icon Ringing Animation with rotation */
@keyframes phoneRinging {

    0%,
    100% {
        transform: translateX(0) rotate(0deg);
    }

    10% {
        transform: translateX(-3px) rotate(-2deg);
    }

    20% {
        transform: translateX(3px) rotate(2deg);
    }

    30% {
        transform: translateX(-3px) rotate(-3deg);
    }

    40% {
        transform: translateX(3px) rotate(3deg);
    }

    50% {
        transform: translateX(-2px) rotate(-2deg);
    }

    60% {
        transform: translateX(2px) rotate(2deg);
    }

    70% {
        transform: translateX(-2px) rotate(-1deg);
    }

    80% {
        transform: translateX(2px) rotate(1deg);
    }

    90% {
        transform: translateX(-1px) rotate(-0.5deg);
    }

    95% {
        transform: translateX(1px) rotate(0.5deg);
    }
}

/* Phone Hover: Gradually stop vibration then scale up */
@keyframes phoneGradualStopAndScale {
    0% {
        transform: translateX(-3px) rotate(-2deg) scale(1);
    }

    10% {
        transform: translateX(2px) rotate(1.5deg) scale(1);
    }

    20% {
        transform: translateX(-2px) rotate(-1deg) scale(1);
    }

    30% {
        transform: translateX(1.5px) rotate(0.8deg) scale(1);
    }

    40% {
        transform: translateX(-1px) rotate(-0.5deg) scale(1);
    }

    50% {
        transform: translateX(0.8px) rotate(0.3deg) scale(1);
    }

    60% {
        transform: translateX(-0.5px) rotate(-0.2deg) scale(1);
    }

    70% {
        transform: translateX(0.3px) rotate(0.1deg) scale(1);
    }

    80% {
        transform: translateX(0) rotate(0deg) scale(1);
    }

    85% {
        transform: translateX(0) rotate(0deg) scale(1.02);
    }

    90% {
        transform: translateX(0) rotate(0deg) scale(1.05);
    }

    95% {
        transform: translateX(0) rotate(0deg) scale(1.1);
    }

    100% {
        transform: translateX(0) rotate(0deg) scale(1.15);
    }
}

/* Email Icon Simple Floating Animation */
@keyframes emailFloating {

    0%,
    100% {
        transform: translateY(0px) scale(1);
    }

    25% {
        transform: translateY(-8px) scale(1);
    }

    50% {
        transform: translateY(-5px) scale(1);
    }

    75% {
        transform: translateY(-12px) scale(1);
    }
}

/* Email Hover: Gradually stop floating then scale up */
@keyframes emailGradualStopAndScale {
    0% {
        transform: translateY(-8px) scale(1);
    }

    20% {
        transform: translateY(-6px) scale(1);
    }

    40% {
        transform: translateY(-4px) scale(1);
    }

    60% {
        transform: translateY(-2px) scale(1);
    }

    80% {
        transform: translateY(0px) scale(1);
    }

    85% {
        transform: translateY(0px) scale(1.02);
    }

    90% {
        transform: translateY(0px) scale(1.05);
    }

    95% {
        transform: translateY(0px) scale(1.1);
    }

    100% {
        transform: translateY(0px) scale(1.15);
    }
}

/* Apply animations to phone icons */
.fx-services-5-card-img img[alt="Phone"] {
    animation: phoneRinging 1.5s ease-in-out infinite;
    will-change: transform;
}

/* Apply animations to email icons with different delays */
.fx-services-5-card-img img[alt="Email"] {
    animation: emailFloating 2s ease-in-out infinite;
    will-change: transform;
}

/* Different timing for each email icon */
.fx-services-5-card-posi:nth-child(5) .fx-services-5-card-img img[alt="Email"] {
    animation-delay: 0s;
}

.fx-services-5-card-posi:nth-child(6) .fx-services-5-card-img img[alt="Email"] {
    animation-delay: 0.5s;
}

.fx-services-5-card-posi:nth-child(7) .fx-services-5-card-img img[alt="Email"] {
    animation-delay: 1s;
}

.fx-services-5-card-posi:nth-child(8) .fx-services-5-card-img img[alt="Email"] {
    animation-delay: 1.5s;
}

/* Phone Icon Hover: Gradually stop vibrating then scale up */
.fx-services-5-card:hover .fx-services-5-card-img img[alt="Phone"] {
    animation: phoneGradualStopAndScale 1.2s ease-out forwards;
}

/* Phone icon smooth return to normal animation on mouse leave */
.fx-services-5-card:not(:hover) .fx-services-5-card-img img[alt="Phone"] {
    transition: transform 0.4s ease-out;
}

/* Email Icon Hover: Gradually stop floating then scale up */
.fx-services-5-card:hover .fx-services-5-card-img img[alt="Email"] {
    animation: emailGradualStopAndScale 1.2s ease-out forwards;
}

/* Email icon smooth return to normal animation on mouse leave */
.fx-services-5-card:not(:hover) .fx-services-5-card-img img[alt="Email"] {
    transition: transform 0.4s ease-out;
}

/* Smooth transitions between animation states */
.fx-services-5-card-img {
    position: relative;
    overflow: visible;
}

/* Override responsive animations to maintain consistency */
@media (max-width: 767px) {
    .fx-services-5-card-img img[alt="Email"] {
        animation-duration: 2.5s;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .fx-services-5-card-img img[alt="Email"] {
        animation-duration: 2.2s;
    }
}

/* Green hover effects for email links */
.fx-services-5-card-content .card-title a[href^="mailto:"]:hover {
    color: #39B54A !important;
}

.fx-services-5-card-content .card-title a[href^="mailto:"] span {
    color: #39B54A !important;
}

/* Force English font for phone numbers and emails */
.fx-services-5-card-content .card-title,
.fx-services-5-card-content .card-title a {
    direction: ltr !important;
    text-align: left !important;
    unicode-bidi: isolate !important;
}

/* Force RTL to use exact same font as LTR (English) version - Teko font */
html[dir="rtl"] .fx-services-5-card-content .card-title.fx-heading-1.fx-font-500,
html[dir="rtl"] .fx-services-5-card-content .card-title.fx-heading-1.fx-font-500 a {
    font-family: var(--fx-font-pr-2) !important;
    font-weight: 500 !important;
}

/* Even higher specificity for RTL font override */
html[dir="rtl"] .fx-services-5-area .fx-services-5-wrap .fx-services-5-card-posi .fx-services-5-card .fx-services-5-card-content h5.card-title.fx-heading-1.fx-font-500,
html[dir="rtl"] .fx-services-5-area .fx-services-5-wrap .fx-services-5-card-posi .fx-services-5-card .fx-services-5-card-content h5.card-title.fx-heading-1.fx-font-500 a {
    font-family: "Teko", sans-serif !important;
    font-weight: 500 !important;
}

/* Mobile center alignment override for English text */
@media (max-width: 767px) {

    .fx-services-5-card-content .card-title,
    .fx-services-5-card-content .card-title a {
        text-align: center !important;
    }
}


@media (max-width: 767px) {

    html[dir="rtl"] .fx-services-5-card-content .card-title,
    html[dir="rtl"] .fx-services-5-card-content .card-title a {
        text-align: center !important;
    }
}

/* Better mobile positioning for card numbers */
@media (max-width: 767px) {
    .fx-services-5-card-posi .card-number {
        position: absolute;
        top: 10px;
        right: 20px;
        writing-mode: horizontal-tb;
        font-size: 14px;
    }
}


/* Contact Cards AR fixes */
html[dir='rtl'] .card-title[data-i18n*='headOffice.title'],
html[dir='rtl'] .card-title[data-i18n*='ramadan.title'],
html[dir='rtl'] .card-title[data-i18n*='suez.title'],
html[dir='rtl'] .card-title[data-i18n*='nasrAndOsim.title'] {
    direction: ltr !important;
    text-align: left !important;
    color: #ED1A23 !important;
    font-size: 26px !important;
}

/* English Fonts in Arabic fix */
html[dir="rtl"] .latin-font,
html[dir="rtl"] .english-content,
html[dir="rtl"] [data-i18n*="email"],
html[dir="rtl"] [data-i18n*="phone"],
html[dir="rtl"] .no-arabic-number {
    font-family: var(--fx-ff-heading, 'Inter', sans-serif) !important;
}