/**
 * LTR (Left-to-Right) styles for RTL/LTR Direction Control
 * Optimized for the Renata theme and general WordPress themes
 */

/* Base LTR Layout */
.ltr-layout,
.text-direction-ltr {
    direction: ltr;
    text-align: left;
}

/* Typography and Text Alignment */
.ltr-layout h1,
.ltr-layout h2,
.ltr-layout h3,
.ltr-layout h4,
.ltr-layout h5,
.ltr-layout h6 {
    text-align: left;
}

.ltr-layout p,
.ltr-layout div,
.ltr-layout span {
    text-align: left;
}

.ltr-layout .entry-content,
.ltr-layout .post-content,
.ltr-layout .page-content {
    text-align: left;
}

/* WordPress Alignment Classes */
.ltr-layout .alignleft {
    float: left !important;
    margin: 0 1.5em 1em 0 !important;
}

.ltr-layout .alignright {
    float: right !important;
    margin: 0 0 1em 1.5em !important;
}

.ltr-layout .aligncenter {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* Lists */
.ltr-layout ul,
.ltr-layout ol {
    padding-right: 0;
    padding-left: 2em;
    text-align: left;
}

.ltr-layout li {
    text-align: left;
}

.ltr-layout ul ul,
.ltr-layout ol ol,
.ltr-layout ul ol,
.ltr-layout ol ul {
    margin-right: 0;
    margin-left: 1.5em;
}

/* Blockquotes */
.ltr-layout blockquote {
    border-right: none !important;
    border-left: 4px solid #ccc !important;
    padding-right: 0 !important;
    padding-left: 1.5em !important;
    text-align: left;
    margin-right: 0;
    margin-left: 1.5em;
}

.ltr-layout blockquote cite {
    text-align: left;
    display: block;
}

/* Tables */
.ltr-layout table {
    text-align: left;
}

.ltr-layout th,
.ltr-layout td {
    text-align: left;
}

.ltr-layout caption {
    text-align: left;
}

/* Images and Media */
.ltr-layout img {
    text-align: left;
}

.ltr-layout .wp-caption {
    text-align: left;
}

.ltr-layout .wp-caption .wp-caption-text {
    text-align: left;
    padding-right: 0;
    padding-left: 10px;
}

.ltr-layout .gallery-caption {
    text-align: left;
}

/* Navigation Menus */
.ltr-layout .menu,
.ltr-layout .nav-menu,
.ltr-layout nav ul {
    text-align: left;
}

.ltr-layout .menu li,
.ltr-layout .nav-menu li,
.ltr-layout nav li {
    float: left;
    text-align: left;
}

.ltr-layout .menu li a,
.ltr-layout .nav-menu li a,
.ltr-layout nav li a {
    text-align: left;
}

.ltr-layout .menu li ul,
.ltr-layout .nav-menu li ul,
.ltr-layout nav li ul {
    right: auto;
    left: 0;
    text-align: left;
}

.ltr-layout .menu li ul li,
.ltr-layout .nav-menu li ul li,
.ltr-layout nav li ul li {
    float: none;
    text-align: left;
}

/* Dropdown menus */
.ltr-layout .sub-menu,
.ltr-layout .children {
    right: auto;
    left: 0;
}

.ltr-layout .menu-item-has-children > a::after,
.ltr-layout .page_item_has_children > a::after {
    content: "▶";
    margin-right: 0;
    margin-left: 5px;
}

/* Forms */
.ltr-layout input[type="text"],
.ltr-layout input[type="email"],
.ltr-layout input[type="url"],
.ltr-layout input[type="password"],
.ltr-layout input[type="search"],
.ltr-layout input[type="tel"],
.ltr-layout input[type="number"],
.ltr-layout textarea,
.ltr-layout select {
    text-align: left;
    direction: ltr;
}

.ltr-layout label {
    text-align: left;
}

.ltr-layout .form-row {
    text-align: left;
}

.ltr-layout input[type="checkbox"],
.ltr-layout input[type="radio"] {
    margin-right: 8px;
    margin-left: 0;
}

.ltr-layout .button,
.ltr-layout .btn,
.ltr-layout input[type="submit"],
.ltr-layout input[type="button"] {
    text-align: center;
}

/* Search Forms */
.ltr-layout .search-form {
    text-align: left;
}

.ltr-layout .search-field {
    text-align: left;
    direction: ltr;
}

/* Comments */
.ltr-layout .comment-content,
.ltr-layout .comment-text {
    text-align: left;
}

.ltr-layout .comment-author {
    text-align: left;
}

.ltr-layout .comment-meta {
    text-align: left;
}

.ltr-layout .comment-reply-link {
    float: right;
}

.ltr-layout .comment-list {
    text-align: left;
}

.ltr-layout .comment-list .children {
    margin-right: 0;
    margin-left: 2em;
}

/* Widgets */
.ltr-layout .widget {
    text-align: left;
}

.ltr-layout .widget-title,
.ltr-layout .widgettitle {
    text-align: left;
}

.ltr-layout .widget ul,
.ltr-layout .widget ol {
    text-align: left;
    padding-right: 0;
    padding-left: 1em;
}

.ltr-layout .widget li {
    text-align: left;
}

/* Sidebar */
.ltr-layout .sidebar {
    text-align: left;
}

/* Footer */
.ltr-layout .footer,
.ltr-layout .site-footer {
    text-align: left;
}

.ltr-layout .footer-widget {
    text-align: left;
}

/* Pagination */
.ltr-layout .pagination {
    text-align: left;
}

.ltr-layout .page-numbers {
    float: left;
    margin-right: 5px;
    margin-left: 0;
}

.ltr-layout .nav-links {
    text-align: left;
}

.ltr-layout .nav-previous {
    float: left;
}

.ltr-layout .nav-next {
    float: right;
}

/* Breadcrumbs */
.ltr-layout .breadcrumb,
.ltr-layout .breadcrumbs {
    text-align: left;
}

.ltr-layout .breadcrumb-separator::before {
    content: "▶";
}

/* Post Meta */
.ltr-layout .post-meta,
.ltr-layout .entry-meta {
    text-align: left;
}

.ltr-layout .post-date,
.ltr-layout .post-author,
.ltr-layout .post-categories,
.ltr-layout .post-tags {
    text-align: left;
}

/* Social Media Icons */
.ltr-layout .social-links,
.ltr-layout .social-media {
    text-align: left;
}

.ltr-layout .social-links li,
.ltr-layout .social-media li {
    float: left;
    margin-right: 10px;
    margin-left: 0;
}

/* Renata Theme Specific Styles */
.ltr-layout .bt-header {
    text-align: left;
}

.ltr-layout .bt-menu {
    text-align: left;
}

.ltr-layout .bt-content {
    text-align: left;
}

.ltr-layout .bt-sidebar {
    text-align: left;
}

.ltr-layout .bt-footer {
    text-align: left;
}

/* BoldThemes Framework Adjustments */
.ltr-layout .boldthemes-element {
    text-align: left;
}

.ltr-layout .bt-text {
    text-align: left;
}

.ltr-layout .bt-button {
    text-align: center;
}

/* WooCommerce LTR Support */
.ltr-layout .woocommerce {
    text-align: left;
}

.ltr-layout .woocommerce .product-title,
.ltr-layout .woocommerce .woocommerce-product-details__short-description,
.ltr-layout .woocommerce .woocommerce-tabs {
    text-align: left;
}

.ltr-layout .woocommerce .price {
    text-align: left;
}

.ltr-layout .woocommerce .cart-collaterals {
    float: right;
}

.ltr-layout .woocommerce .cart_totals {
    text-align: left;
}

/* Gutenberg Blocks LTR */
.ltr-layout .wp-block-group,
.ltr-layout .wp-block-column,
.ltr-layout .wp-block-columns {
    text-align: left;
}

.ltr-layout .wp-block-quote {
    border-right: none;
    border-left: 4px solid #ccc;
    padding-right: 0;
    padding-left: 1em;
    text-align: left;
}

.ltr-layout .wp-block-pullquote {
    text-align: left;
}

.ltr-layout .wp-block-image {
    text-align: left;
}

.ltr-layout .wp-block-gallery {
    text-align: left;
}

/* Responsive LTR Adjustments */
@media screen and (max-width: 768px) {
    .ltr-layout .menu li,
    .ltr-layout .nav-menu li {
        float: none;
        text-align: left;
    }
    
    .ltr-layout .alignleft,
    .ltr-layout .alignright {
        float: none;
        margin: 0 auto 1em;
        text-align: center;
    }
    
    .ltr-layout .comment-list .children {
        margin-left: 1em;
    }
}

/* Print Styles for LTR */
@media print {
    .ltr-layout {
        direction: ltr;
        text-align: left;
    }
    
    .ltr-layout * {
        text-align: left !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .ltr-layout blockquote {
        border-left-color: #000 !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .ltr-layout * {
        transition: none !important;
        animation: none !important;
    }
}

/* Force LTR for specific elements that should always be LTR */
.ltr-layout .email,
.ltr-layout .url,
.ltr-layout .phone,
.ltr-layout .code,
.ltr-layout .number {
    direction: ltr;
    text-align: left;
}

/* Ensure proper text direction for mixed content */
.ltr-layout [lang="ar"],
.ltr-layout [lang="he"],
.ltr-layout [lang="fa"] {
    direction: rtl;
    text-align: right;
}

.ltr-layout [lang="en"],
.ltr-layout [lang="fr"],
.ltr-layout [lang="de"],
.ltr-layout [lang="es"] {
    direction: ltr;
    text-align: left;
}


/* ========================================
   SLIDER COMPATIBILITY FIXES
   ======================================== */

/* Slider Container Fixes */
.rtl-layout .bt_bb_content_slider,
.ltr-layout .bt_bb_content_slider {
    direction: ltr !important; /* Keep slider mechanics LTR for proper functionality */
}

/* Slider Item Background Image Fixes */
.rtl-layout .bt_bb_content_slider_item,
.ltr-layout .bt_bb_content_slider_item {
    background-attachment: scroll !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Ensure background images are properly displayed */
.rtl-layout .bt_bb_content_slider_item[style*="background-image"],
.ltr-layout .bt_bb_content_slider_item[style*="background-image"] {
    background-attachment: scroll !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
}

/* Fix for slider content positioning in RTL */
.rtl-layout .bt_bb_content_slider_item .bt_bb_row_inner {
    direction: rtl;
    text-align: right;
}

.rtl-layout .bt_bb_content_slider_item .bt_bb_column_inner {
    direction: rtl;
    text-align: right;
}

/* Fix for slider content positioning in LTR */
.ltr-layout .bt_bb_content_slider_item .bt_bb_row_inner {
    direction: ltr;
    text-align: left;
}

.ltr-layout .bt_bb_content_slider_item .bt_bb_column_inner {
    direction: ltr;
    text-align: left;
}

/* Preserve slider navigation functionality */
.rtl-layout .bt_bb_content_slider .slick-prev,
.rtl-layout .bt_bb_content_slider .slick-next,
.ltr-layout .bt_bb_content_slider .slick-prev,
.ltr-layout .bt_bb_content_slider .slick-next {
    direction: ltr !important;
}

/* Fix slider dots positioning */
.rtl-layout .bt_bb_content_slider .slick-dots,
.ltr-layout .bt_bb_content_slider .slick-dots {
    direction: ltr !important;
    text-align: center !important;
}

/* Ensure slider track maintains proper positioning */
.rtl-layout .bt_bb_content_slider .slick-track,
.ltr-layout .bt_bb_content_slider .slick-track {
    direction: ltr !important;
    display: flex !important;
}

/* Fix for slider item display */
.rtl-layout .bt_bb_content_slider .slick-slide,
.ltr-layout .bt_bb_content_slider .slick-slide {
    float: none !important;
    display: block !important;
    position: relative !important;
}

/* Ensure proper z-index for slider content */
.rtl-layout .bt_bb_content_slider_item > *,
.ltr-layout .bt_bb_content_slider_item > * {
    position: relative;
    z-index: 2;
}

/* Fix for background overlay if present */
.rtl-layout .bt_bb_content_slider_item::before,
.ltr-layout .bt_bb_content_slider_item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

/* Specific fixes for BoldThemes slider animations */
.rtl-layout .bt_bb_content_slider[data-animation="fade"] .slick-slide,
.ltr-layout .bt_bb_content_slider[data-animation="fade"] .slick-slide {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.rtl-layout .bt_bb_content_slider[data-animation="fade"] .slick-slide.slick-active,
.ltr-layout .bt_bb_content_slider[data-animation="fade"] .slick-slide.slick-active {
    opacity: 1;
}

/* Fix for headline positioning in slider */
.rtl-layout .bt_bb_content_slider_item .bt_bb_headline,
.ltr-layout .bt_bb_content_slider_item .bt_bb_headline {
    position: relative;
    z-index: 3;
}

/* Fix for call-to-action buttons in slider */
.rtl-layout .bt_bb_content_slider_item .bt_bb_call_to_action,
.ltr-layout .bt_bb_content_slider_item .bt_bb_call_to_action {
    position: relative;
    z-index: 3;
}

/* Ensure proper text direction for slider content */
.rtl-layout .bt_bb_content_slider_item .bt_bb_headline {
    direction: rtl;
    text-align: right;
}

.ltr-layout .bt_bb_content_slider_item .bt_bb_headline {
    direction: ltr;
    text-align: left;
}

/* Force background image display for problematic slides */
.bt_bb_content_slider_item {
    min-height: 100vh !important;
    background-attachment: scroll !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
}

/* Specific fix for slides that appear blank */
.bt_bb_content_slider .slick-slide {
    background-attachment: scroll !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
}

/* Ensure slider container has proper height */
.bt_bb_content_slider {
    min-height: 100vh;
    position: relative;
}

/* Fix for slider initialization issues */
.bt_bb_content_slider .slick-list {
    overflow: hidden;
    position: relative;
}

.bt_bb_content_slider .slick-track {
    position: relative;
    top: 0;
    left: 0;
    display: block;
}

/* Additional fix for background image inheritance */
.bt_bb_content_slider_item[style*="background-image"] {
    background-attachment: scroll !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    position: relative !important;
}

/* Ensure content is visible over background */
.bt_bb_content_slider_item .bt_bb_row,
.bt_bb_content_slider_item .bt_bb_row_inner,
.bt_bb_content_slider_item .bt_bb_column,
.bt_bb_content_slider_item .bt_bb_column_inner {
    position: relative;
    z-index: 2;
}


/* ========================================
/**
 * RTL/LTR Direction Control - Ultra-Minimal Animation Fix
 * Only fixes visibility without touching any animation properties
 */

/* ========================================
   ULTRA-MINIMAL ANIMATION COMPATIBILITY
   ======================================== */

/* Only ensure the animated text container doesn't get hidden by RTL direction changes */
.rtl-layout .bt_bb_animated_text,
.ltr-layout .bt_bb_animated_text {
    /* Don't change direction - let the theme handle animation */
    /* Only ensure visibility */
    visibility: visible !important;
    opacity: 1 !important;
}

/* Only ensure the content inside is visible - NO animation property changes */
.rtl-layout .bt_bb_animated_text *,
.ltr-layout .bt_bb_animated_text * {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Apply text direction ONLY to the final text content, not the animation container */
.rtl-layout .bt_bb_animated_text h1,
.rtl-layout .bt_bb_animated_text h2,
.rtl-layout .bt_bb_animated_text h3,
.rtl-layout .bt_bb_animated_text h4,
.rtl-layout .bt_bb_animated_text h5,
.rtl-layout .bt_bb_animated_text h6 {
    /* Only change text direction, nothing else */
    direction: rtl;
}

.ltr-layout .bt_bb_animated_text h1,
.ltr-layout .bt_bb_animated_text h2,
.ltr-layout .bt_bb_animated_text h3,
.ltr-layout .bt_bb_animated_text h4,
.ltr-layout .bt_bb_animated_text h5,
.ltr-layout .bt_bb_animated_text h6 {
    /* Only change text direction, nothing else */
    direction: ltr;
}

/* That's it - no other changes to avoid interfering with BoldThemes animation */

