/* =================================================================
   RTL Overrides for style-v2.css (Updated for Timeline Fixes)
   Load this file AFTER the main stylesheet for RTL languages.
================================================================= */

/* General Layout & Text Alignment */
body.rtl-mode,
[dir="rtl"] {
    text-align: right;
}

/* FBT Widget Heading */
[dir="rtl"] .fbt-widget-heading > span {
    margin-right: 0;
    margin-left: 10px;
}
[dir="rtl"] .fbt-widget-heading > span::after {
    transform: skewX(19deg);
}
[dir="rtl"] .fbt-widget-heading a {
    margin-left: 0;
    margin-right: 10px;
}
[dir="rtl"] .fbt-widget-heading a span.material-symbols-outlined {
    transform: scaleX(-1);
}

/* Post Card */
[dir="rtl"] .post-card .badge-category {
    left: auto;
    right: 15px;
}

/* Main Slider Arrows */
[dir="rtl"] .featured-slider-wrapper .slick-prev {
    right: 15px;
    left: auto;
}
[dir="rtl"] .featured-slider-wrapper .slick-next {
    left: 15px;
    right: auto;
}

/* Meta Info */
[dir="rtl"] .item-meta-date {
    margin-left: 0;
    margin-right: 15px;
}
[dir="rtl"] .post-details-meta .item-meta-author,
[dir="rtl"] .post-details-meta .item-meta-date {
    margin-left: 1rem;
    margin-right: 0;
}
[dir="rtl"] .post-details-meta .ms-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

/*
=================================================================
  Live Update Timeline Fixes (RTL & Mobile Responsive)
=================================================================
*/

[dir="rtl"] .live-updates-container .title .material-symbols-outlined {
    margin-right: 0;
    margin-left: 10px;
}

[dir="rtl"] .timeline {
    padding-left: 0;
    padding-right: 40px;
    border-left: none;
    border-right: 3px dotted #dcdcdc;
}

[dir="rtl"] .timeline-dot {
    left: auto;
    right: -45px;
}

/* Arrow pointing from card to timeline */
[dir="rtl"] .timeline-content.card::before {
    left: auto;
    right: -12px;
    border-left: 12px solid #ffffff;
    border-right: 0;
    filter: drop-shadow(2px 1px 1px rgba(0,0,0,0.02));
}
[dir="rtl"] .timeline-content.card::after {
    left: auto;
    right: -14px;
    border-left: 13px solid #ecf0f1;
    border-right: 0;
}

/* Dark mode arrows for RTL */
[dir="rtl"] .dark-mode .timeline-content.card::before {
    border-left-color: #2a2a2a;
    border-right: 0;
}
[dir="rtl"] .dark-mode .timeline-content.card::after {
    border-left-color: #444;
    border-right: 0;
}
[dir="rtl"] .dark-mode .timeline {
    border-right: 3px dotted #555;
    border-left: 0;
}

/* Timeline Footer content */
[dir="rtl"] .timeline-author-avatar {
    margin-right: 0;
    margin-left: 10px;
}
[dir="rtl"] .timeline-time .material-symbols-outlined {
    margin-right: 0;
    margin-left: 5px;
}
[dir="rtl"] .share-popover {
    right: auto;
    left: 0;
}

/* MOBILE RESPONSIVE FIXES for Timeline (Affects both LTR & RTL) */
@media (max-width: 576px) {
    .timeline {
        margin-left: 10px;
        padding-left: 20px;
    }
    .timeline-dot {
        left: -10px; /* Position dot ON the line */
        width: 16px;
        height: 16px;
        top: 28px;
    }
    .timeline-content.card::before,
    .timeline-content.card::after {
        display: none; /* Hide arrow on mobile */
    }

    /* RTL specific overrides for mobile */
    [dir="rtl"] .timeline {
        margin-left: 0;
        margin-right: 10px;
        padding-left: 0;
        padding-right: 20px;
    }
    [dir="rtl"] .timeline-dot {
        left: auto;
        right: -10px; /* Position dot ON the line for RTL */
    }
}
/*
=================================================================
  End of Timeline Fixes
=================================================================
*/

/* Live Updates Section (Homepage) */
[dir="rtl"] .section-live-updates .section-title .title .material-symbols-outlined {
    margin-right: 0;
    margin-left: 8px;
}
[dir="rtl"] .live-pulse-dot {
    margin-left: 0;
    margin-right: 10px;
}

/* Small Post Card (Headlines) & Playlist Item */
[dir="rtl"] .post-card-small .img-link,
[dir="rtl"] .playlist-item .item-image {
    margin-right: 0;
    margin-left: 15px;
}

/* Role Badge */
[dir="rtl"] .role {
    transform: skew(25deg);
}

/* Footer */
[dir="rtl"] .nav-footer {
    text-align: left;
}
[dir="rtl"] .copyright {
    text-align: right !important;
}
@media (max-width: 767px) {
    [dir="rtl"] .nav-footer,
    [dir="rtl"] .copyright {
        text-align: center !important;
    }
}

[dir="rtl"] .scrollup {
    right: auto;
    left: 15px;
}

/* Utility classes */
[dir="rtl"] .m-l-5 {
  margin-right: 5px !important;
  margin-left: 0 !important;
}
[dir="rtl"] .ms-3 {
    margin-right: 1rem !important;
    margin-left: 0 !important;
}

/* Sidebar */
[dir="rtl"] .sidebar-widget .tag-list {
  padding-right: 0;
}