/* =================================================
   XBrandAds — RTL support
   Enqueued by xbrandads_enqueue_styles() only when
   is_rtl() is true (see inc/child-functions.php).
   All rules are scoped to html[dir="rtl"] so they
   never affect LTR layouts.
   ================================================= */

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

/* ── Header: topbar / preheader / navbar / extras ── */
html[dir="rtl"] .header-social-preheader {
    margin-left: 0;
    margin-right: 30px;
}
html[dir="rtl"] .collapsed-header-logo {
    margin-right: 0;
    margin-left: 20px;
}
html[dir="rtl"] .collapsed-header-extras {
    margin-right: 0;
    margin-left: 15px;
}

/* ── Topbar marquee: move left-to-right in RTL ── */
html[dir="rtl"] .topbar .marquee-content {
    animation: scroll-right 15s linear infinite;
}
@keyframes scroll-right {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

/* ── Services overlap cards: alternate icon corners ── */
html[dir="rtl"] .service-card:nth-child(odd) .service-icon {
    border-radius: 10rem 0 10rem 10rem;
}
html[dir="rtl"] .service-card:nth-child(even) .service-icon {
    border-radius: 0 10rem 10rem 10rem;
}
html[dir="rtl"] .service-card .service-number {
    right: auto;
    left: 2rem;
}

/* ── Footer titles: red underline to the right ── */
html[dir="rtl"] .footer-title::after {
    left: auto;
    right: 0;
}

/* ── Desktop navbar dropdowns ── */
html[dir="rtl"] .nav-links > li > ul,
html[dir="rtl"] .nav-links .sub-menu,
html[dir="rtl"] .nav-links .dropdown {
    left: auto;
    right: 0;
}
html[dir="rtl"] .nav-links .sub-menu .sub-menu,
html[dir="rtl"] .nav-links .dropdown .dropdown {
    top: 0;
    right: 100%;
    left: auto;
    border-top: none;
    border-right: 3px solid #DF1111;
    border-radius: 8px 0 0 8px;
}
html[dir="rtl"] .nav-links .sub-menu a,
html[dir="rtl"] .nav-links .dropdown a,
html[dir="rtl"] .nav-links > li > ul li a {
    border-left: none !important;
    border-right: 3px solid transparent;
}
html[dir="rtl"] .nav-links .sub-menu a:hover,
html[dir="rtl"] .nav-links .dropdown a:hover,
html[dir="rtl"] .nav-links > li > ul li a:hover {
    border-right-color: #DF1111;
    padding-left: 25px !important;
    padding-right: 30px !important;
}

/* ── Mobile drawer (xba-drawer) ── */
html[dir="rtl"] .xba-drawer-action-btn {
    border-right: none;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}
html[dir="rtl"] .xba-drawer-action-btn:last-child {
    border-left: none;
}
html[dir="rtl"] .xba-submenu-toggle {
    border-left: none;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}
html[dir="rtl"] .xba-drawer-submenu a {
    padding-left: 0 !important;
    padding-right: 44px !important;
    border-left: none !important;
    border-right: none !important;
}

/* ── Stats / wide-sections counter suffix ── */
html[dir="rtl"] .stat-suffix {
    margin-left: 0;
    margin-right: 4px;
}

/* ── Footer links hover indent ── */
html[dir="rtl"] .footer-links a:hover {
    padding-left: 0;
    padding-right: 5px;
}

/* ── Protect / "Why" section: align text to the right ── */
html[dir="rtl"] .security-content,
html[dir="rtl"] .security-features {
    text-align: right;
}

/* ── WooCommerce: my-account nav + forms ── */
html[dir="rtl"] body.woocommerce-account .xba-nav-list li a {
    border-left: none !important;
    border-right: 3px solid transparent !important;
}
html[dir="rtl"] .woocommerce .col2-set .col-1,
html[dir="rtl"] .woocommerce .col2-set .col-2 {
    float: right;
}
html[dir="rtl"] .xba-form-field label .required {
    margin-left: 0;
    margin-right: 2px;
}
html[dir="rtl"] .wc-block-components-notice-banner,
html[dir="rtl"] .wc-block-components-notice-banner.is-info {
    border-left: none !important;
    border-right: 4px solid var(--xba-red) !important;
}

/* ── Pricing cards (hostinger + xba-plan) ── */
html[dir="rtl"] .xba-host-mo {
    margin-left: 0;
    margin-right: 4px;
}
html[dir="rtl"] .xba-host-features {
    text-align: right;
}
html[dir="rtl"] .xba-host-btn:hover i {
    transform: translateX(-4px);
}
html[dir="rtl"] .xba-host-show-features i {
    margin-right: 0;
    margin-left: 8px;
}
html[dir="rtl"] .xba-host-btn i,
html[dir="rtl"] .xba-host-show-features i {
    display: inline-block;
}

/* ── Hero Slider: flip text alignment & arrow positions in RTL ── */
html[dir="rtl"] .hero-slide .container {
    text-align: right;
}
html[dir="rtl"] .hero-prev {
    left: auto;
    right: 30px;
}
html[dir="rtl"] .hero-next {
    right: auto;
    left: 30px;
}
html[dir="rtl"] .hero-slide .hero-btn i {
    transform: scaleX(-1);
}
@media (max-width: 768px) {
    html[dir="rtl"] .hero-prev { right: 10px; left: auto; }
    html[dir="rtl"] .hero-next { left: 10px; right: auto; }
}