/*
 * RTL ↔ LTR Direction Switching Stylesheet
 * Built specifically for the UrduPress theme (StyloThemes)
 *
 * Theme uses: Bootstrap 3 (16-col grid), flex/grid layouts,
 *   direction: rtl on body, float: right for layout, flex row-reverse for menus.
 *
 * Classes activated by plugin:
 *   body.dut-ltr  → English/LTR mode
 *   body.dut-rtl  → Urdu/RTL mode (default, restores original)
 */

/* ============================================
   1. BASE DIRECTION — body, html
   ============================================ */

body.dut-ltr,
body.dut-ltr button,
body.dut-ltr input,
body.dut-ltr select,
body.dut-ltr textarea {
    direction: ltr !important;
    text-align: left !important;
    unicode-bidi: embed;
}

body.dut-rtl,
body.dut-rtl button,
body.dut-rtl input,
body.dut-rtl select,
body.dut-rtl textarea {
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: embed;
}

/* ============================================
   2. FONT SWITCHING
   Theme default: font-family: Noto Nastaleeq (style.css line 287)
   Buttons: font-family: "Lateef", sans-serif
   Roboto imported for English elements
   ============================================ */

body.dut-ltr,
body.dut-ltr p,
body.dut-ltr span,
body.dut-ltr div,
body.dut-ltr li,
body.dut-ltr td,
body.dut-ltr th,
body.dut-ltr input,
body.dut-ltr textarea,
body.dut-ltr select,
body.dut-ltr button,
body.dut-ltr h1,
body.dut-ltr h2,
body.dut-ltr h3,
body.dut-ltr h4,
body.dut-ltr h5,
body.dut-ltr h6,
body.dut-ltr .textwidget,
body.dut-ltr .entry-title,
body.dut-ltr .widget-title,
body.dut-ltr .archive-heading,
body.dut-ltr .breaking_body,
body.dut-ltr .breaking_head,
body.dut-ltr .footer-copyrights p,
body.dut-ltr .read-more,
body.dut-ltr .search-field,
body.dut-ltr .search-submit {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif !important;
}

/* Headings alignment */
body.dut-ltr h1,
body.dut-ltr h2,
body.dut-ltr h3,
body.dut-ltr h4,
body.dut-ltr h5,
body.dut-ltr h6 {
    text-align: left !important;
}

body.dut-rtl h1,
body.dut-rtl h2,
body.dut-rtl h3,
body.dut-rtl h4,
body.dut-rtl h5,
body.dut-rtl h6 {
    text-align: right !important;
}

/* ============================================
   3. HEADER — #masthead.header
   Theme: layouts/theme-header.php
   ============================================ */

/* .header-top-content uses flex row-reverse (for RTL date|ticker ordering) */
body.dut-ltr .header-top-content {
    flex-direction: row !important;
}
body.dut-rtl .header-top-content {
    flex-direction: row-reverse !important;
}

/* Date/time row — flex row-reverse in RTL */
body.dut-ltr .date-time-row {
    flex-direction: row !important;
}
body.dut-rtl .date-time-row {
    flex-direction: row-reverse !important;
}

/* Logo area */
body.dut-ltr .logo {
    text-align: left !important;
    float: left !important;
}
body.dut-rtl .logo {
    text-align: right !important;
    float: right !important;
}

/* Header content row (logo + banner) — flex */
body.dut-ltr .header-content-row {
    flex-direction: row !important;
}
body.dut-rtl .header-content-row {
    flex-direction: row-reverse !important;
}

/* Header banner text alignment */
body.dut-ltr .header-banner {
    text-align: right !important;
}
body.dut-rtl .header-banner {
    text-align: left !important;
}

/* Search button alignment */
body.dut-ltr .searchBtn {
    float: left;
}

/* ============================================
   4. DESKTOP NAVIGATION — .main-menu-v3 #desktop-menu
   Theme: layouts/header-section3.php
   #desktop-menu { display: flex; flex-direction: row-reverse; }
   .main-menu-v3 li { float: right; border-right: 1px solid #333; }
   ============================================ */

body.dut-ltr #desktop-menu {
    flex-direction: row !important;
}
body.dut-rtl #desktop-menu {
    flex-direction: row-reverse !important;
}

body.dut-ltr .main-menu-v3 li,
body.dut-ltr .main-menu li {
    float: left !important;
    border-right: none !important;
    border-left: 1px solid #333333;
}
body.dut-rtl .main-menu-v3 li,
body.dut-rtl .main-menu li {
    float: right !important;
    border-left: none !important;
    border-right: 1px solid #333333;
}

/* Submenus — position left/right flip */
body.dut-ltr .main-menu-v3 ul .sub-menu,
body.dut-ltr .main-menu ul .sub-menu {
    left: 0 !important;
    right: auto !important;
}
body.dut-ltr .main-menu-v3 ul .sub-menu li,
body.dut-ltr .main-menu ul .sub-menu li {
    direction: ltr !important;
    text-align: left !important;
    float: none !important;
    border-left: none !important;
}

body.dut-rtl .main-menu-v3 ul .sub-menu,
body.dut-rtl .main-menu ul .sub-menu {
    right: 0 !important;
    left: auto !important;
}
body.dut-rtl .main-menu-v3 ul .sub-menu li,
body.dut-rtl .main-menu ul .sub-menu li {
    direction: rtl !important;
    text-align: right !important;
}

/* ============================================
   5. MOBILE HEADER — .mobile-bar, .mobile-menu
   Theme: layouts/mobile-header.php
   .mobile-bar { position: fixed; height: 50px; }
   ============================================ */

body.dut-ltr .mobile-bar {
    direction: ltr !important;
}
body.dut-ltr .mobile-bar .nav-btn {
    text-align: left !important;
}
body.dut-ltr .mobile-bar .mobile-search-button {
    text-align: right !important;
}
body.dut-ltr .mobile-menu .main-menu li {
    text-align: left !important;
}
body.dut-ltr .mobile-menu .main-menu .sub-menu li {
    text-align: left !important;
    padding-left: 20px;
    padding-right: 0;
}

body.dut-rtl .mobile-menu .main-menu li {
    text-align: right !important;
}
body.dut-rtl .mobile-menu .main-menu .sub-menu li {
    padding-right: 20px;
    padding-left: 0;
}

/* ============================================
   6. NEWS TICKER — .news-ticker, .breaking_head, .breaking_body
   Theme: template-parts/news-ticker.php
   ============================================ */

body.dut-ltr .breaking_head {
    float: left !important;
}
body.dut-ltr .breaking_body {
    float: left !important;
    margin-left: 25px !important;
    margin-right: 0 !important;
}
body.dut-ltr .ticker-column {
    direction: ltr !important;
}
body.dut-ltr .TickerNews {
    direction: ltr !important;
}

body.dut-rtl .breaking_head {
    float: right !important;
}
body.dut-rtl .breaking_body {
    float: right !important;
    margin-right: 25px !important;
    margin-left: 0 !important;
}

/* ============================================
   7. CONTENT AREA — #primary.content-area
   Theme: .content-area { direction: rtl; }
   Single: #main.col-lg-11.pull-right + .main-sidebar.col-lg-5
   ============================================ */

body.dut-ltr .content-area,
body.dut-ltr #primary {
    direction: ltr !important;
}

/* Single post: main content pulls left, sidebar goes right */
body.dut-ltr #main.post-view {
    float: left !important;
}
body.dut-ltr .main-sidebar {
    float: right !important;
}

body.dut-rtl #main.post-view {
    float: right !important;
}
body.dut-rtl .main-sidebar {
    float: left !important;
}

/* Mini sidebar in single post */
body.dut-ltr .mini-sidebar-single {
    float: right !important;
}
body.dut-rtl .mini-sidebar-single {
    float: left !important;
}

/* Entry content */
body.dut-ltr .entry-content,
body.dut-ltr .entry-header,
body.dut-ltr .entry-meta,
body.dut-ltr .entry-title {
    text-align: left !important;
    direction: ltr !important;
}

body.dut-rtl .entry-content,
body.dut-rtl .entry-header,
body.dut-rtl .entry-meta,
body.dut-rtl .entry-title {
    text-align: right !important;
    direction: rtl !important;
}

/* Post meta (date, views, comments) */
body.dut-ltr .posted-on,
body.dut-ltr .post-views,
body.dut-ltr .post-meta {
    direction: ltr !important;
}

/* ============================================
   8. ARCHIVE & SEARCH PAGES
   Theme: .archive-posts-grid (CSS grid)
   .default-posts-grid (CSS grid for search)
   .archive-header { flex-direction: row; }
   ============================================ */

body.dut-ltr .archive-header {
    border-right: none !important;
    border-left: 5px solid var(--accent-color) !important;
    direction: ltr !important;
}
body.dut-rtl .archive-header {
    border-left: none !important;
    border-right: 5px solid var(--accent-color) !important;
    direction: rtl !important;
}

body.dut-ltr .archive-posts-grid,
body.dut-ltr .default-posts-grid,
body.dut-ltr .related-posts-grid {
    direction: ltr !important;
}
body.dut-rtl .archive-posts-grid,
body.dut-rtl .default-posts-grid,
body.dut-rtl .related-posts-grid {
    direction: rtl !important;
}

body.dut-ltr .archive-post-title-row {
    text-align: left !important;
}
body.dut-rtl .archive-post-title-row {
    text-align: right !important;
}

/* Archive layout with sidebar */
body.dut-ltr .arcchive-content-layout .main-sidebar {
    float: right !important;
}
body.dut-rtl .arcchive-content-layout .main-sidebar {
    float: left !important;
}

/* Search results page */
body.dut-ltr .content-search .page-header {
    text-align: left !important;
}

/* ============================================
   9. POST BLOCKS & GRIDS
   Theme: .posts-blocks, .block-post-grid, .block-post-smallrow
   ============================================ */

body.dut-ltr .posts-blocks .block-head {
    flex-direction: row !important;
}
body.dut-rtl .posts-blocks .block-head {
    flex-direction: row-reverse !important;
}

body.dut-ltr .block-post-grid {
    float: left !important;
    margin-right: 8px !important;
    margin-left: 0 !important;
}
body.dut-rtl .block-post-grid {
    float: right !important;
    margin-left: 8px !important;
    margin-right: 0 !important;
}

body.dut-ltr .block-post-smallrow {
    direction: ltr !important;
    text-align: left !important;
}
body.dut-rtl .block-post-smallrow {
    direction: rtl !important;
    text-align: right !important;
}

body.dut-ltr .classic-block .block-post-first {
    padding-right: 10px !important;
    padding-left: 0 !important;
}
body.dut-rtl .classic-block .block-post-first {
    padding-left: 10px !important;
    padding-right: 0 !important;
}

/* Home category posts */
body.dut-ltr .home-cat-title {
    text-align: left !important;
}
body.dut-rtl .home-cat-title {
    text-align: right !important;
}

/* Featured section grid */
body.dut-ltr .featured-section {
    direction: ltr !important;
}
body.dut-rtl .featured-section {
    direction: rtl !important;
}

/* ============================================
   10. SIDEBAR & WIDGETS
   Theme: #secondary.sidebar, .widget, .widget-title
   Widget posts: .upress-cat-posts .upress-widget-post-row { flex-direction: row-reverse; }
   ============================================ */

body.dut-ltr #secondary.sidebar,
body.dut-ltr .widget {
    direction: ltr !important;
    text-align: left !important;
}
body.dut-ltr .widget-title {
    text-align: left !important;
}

body.dut-rtl #secondary.sidebar,
body.dut-rtl .widget {
    direction: rtl !important;
    text-align: right !important;
}
body.dut-rtl .widget-title {
    text-align: right !important;
}

/* Widget post rows (category posts widget) */
body.dut-ltr .upress-cat-posts .upress-widget-post-row {
    flex-direction: row !important;
}
body.dut-rtl .upress-cat-posts .upress-widget-post-row {
    flex-direction: row-reverse !important;
}

body.dut-ltr .widget ul {
    padding-left: 16px !important;
    padding-right: 0 !important;
}
body.dut-rtl .widget ul {
    padding-right: 16px !important;
    padding-left: 0 !important;
}

/* ============================================
   11. FOOTER — #footer.footer-main
   Theme: .footer-widgets (grid 4-col), .footer-copyrights (flex row-reverse)
   .footer-socil-icons li { float: left; }
   ============================================ */

body.dut-ltr #footer,
body.dut-ltr .footer-main {
    direction: ltr !important;
}
body.dut-ltr .footer-copyrights {
    flex-direction: row !important;
    text-align: left !important;
}
body.dut-ltr .footer-copyrights p {
    text-align: left !important;
}
body.dut-ltr .footer-widget {
    direction: ltr !important;
    text-align: left !important;
}
body.dut-ltr .footer-socil-icons li {
    float: left !important;
}

body.dut-rtl #footer,
body.dut-rtl .footer-main {
    direction: rtl !important;
}
body.dut-rtl .footer-copyrights {
    flex-direction: row-reverse !important;
    text-align: right !important;
}
body.dut-rtl .footer-widget {
    direction: rtl !important;
    text-align: right !important;
}
body.dut-rtl .footer-socil-icons li {
    float: left !important;
}

/* ============================================
   12. COMMENTS
   Theme: #comments.comments-area
   .comment-body { display: flex; }
   ============================================ */

body.dut-ltr .comments-area,
body.dut-ltr .comment-list,
body.dut-ltr .comment-body,
body.dut-ltr .comment-content,
body.dut-ltr .comment-reply-title,
body.dut-ltr .comment-form-field {
    direction: ltr !important;
    text-align: left !important;
}

body.dut-ltr .comment-list .children {
    margin-left: 24px !important;
    margin-right: 0 !important;
}

body.dut-rtl .comment-list .children {
    margin-right: 24px !important;
    margin-left: 0 !important;
}

/* Comment form textarea — override inline style */
body.dut-ltr #comment {
    font-family: 'Roboto', sans-serif !important;
    direction: ltr !important;
    text-align: left !important;
}

/* ============================================
   13. PAGINATION
   Theme: .pagination (from upress_page_navi in extras.php)
   Uses &rarr; for prev, &larr; for next (RTL arrows)
   ============================================ */

body.dut-ltr .pagination,
body.dut-ltr .posts-navigation .nav-links {
    direction: ltr !important;
    text-align: left !important;
}

body.dut-ltr .nav-previous {
    float: left !important;
}
body.dut-ltr .nav-next {
    float: right !important;
}

body.dut-rtl .nav-previous {
    float: right !important;
}
body.dut-rtl .nav-next {
    float: left !important;
}

/* ============================================
   14. SHARING / SOCIAL BAR
   Theme: .social-bar ul li { float: right; }
   ============================================ */

body.dut-ltr .social-bar ul li,
body.dut-ltr .sharing-row {
    direction: ltr !important;
}
body.dut-ltr .social-bar ul li {
    float: left !important;
}
body.dut-rtl .social-bar ul li {
    float: right !important;
}

/* ============================================
   15. RELATED POSTS
   Theme: .related-posts, .related-posts-header
   ============================================ */

body.dut-ltr .related-posts,
body.dut-ltr .related-posts-header {
    direction: ltr !important;
    text-align: left !important;
}
body.dut-rtl .related-posts,
body.dut-rtl .related-posts-header {
    direction: rtl !important;
    text-align: right !important;
}

/* ============================================
   16. SEARCH FORM
   Theme: searchform.php — .search-form
   ============================================ */

body.dut-ltr .search-form {
    direction: ltr !important;
}
body.dut-ltr .search-field {
    text-align: left !important;
}
body.dut-ltr .search_form,
body.dut-ltr .search-form-inner {
    direction: ltr !important;
}

/* ============================================
   17. PRELOADER
   ============================================ */

body.dut-ltr #loader-message h2 {
    font-family: 'Roboto', sans-serif !important;
}

/* ============================================
   18. BOOTSTRAP PULL CLASSES FLIP
   Theme uses pull-right for main content float
   ============================================ */

body.dut-ltr .pull-right {
    float: left !important;
}
body.dut-ltr .pull-left {
    float: right !important;
}

body.dut-rtl .pull-right {
    float: right !important;
}
body.dut-rtl .pull-left {
    float: left !important;
}

/* ============================================
   19. VIDEO LAYOUTS
   Theme: .vid-cat-block-posts, .related-videos-grid
   ============================================ */

body.dut-ltr .vid-cat-block-posts,
body.dut-ltr .related-videos-grid,
body.dut-ltr .popular-videos {
    direction: ltr !important;
}

body.dut-ltr .video-meta,
body.dut-ltr .video-item {
    text-align: left !important;
    direction: ltr !important;
}

/* ============================================
   20. STICKY NAV
   Theme: #main-nav.sticknav { position: fixed; top: 0; }
   ============================================ */

body.dut-ltr #main-nav.sticknav {
    direction: ltr !important;
}
body.dut-ltr #main-nav.sticknav ul {
    flex-direction: row !important;
}

/* ============================================
   21. RESPONSIVE OVERRIDES
   ============================================ */

@media screen and (max-width: 768px) {
    body.dut-ltr .header-normal {
        display: none;
    }

    body.dut-ltr .main-menu li {
        float: none !important;
        text-align: left !important;
    }

    body.dut-ltr .main-menu .sub-menu {
        text-align: left !important;
    }

    body.dut-ltr .main-sidebar,
    body.dut-ltr #main.post-view {
        float: none !important;
        width: 100% !important;
    }
}
