/**
 * RTL (Right-to-Left) стили для арабской версии сайта
 * Применяются автоматически при выборе арабского языка через GTranslate
 */

/* Базовые RTL настройки */
html[dir="rtl"],
html.translated-rtl,
body.translated-rtl {
    direction: rtl;
    text-align: right;
}

/* ============================================
   HEADER
   ============================================ */
html[dir="rtl"] .site-header,
html.translated-rtl .site-header {
    direction: rtl;
}

html[dir="rtl"] .header-main-container,
html.translated-rtl .header-main-container {
    flex-direction: row-reverse;
}

html[dir="rtl"] .header-nav,
html.translated-rtl .header-nav {
    margin-right: auto;
    margin-left: 0;
}

html[dir="rtl"] .nav-links,
html.translated-rtl .nav-links {
    flex-direction: row-reverse;
}

html[dir="rtl"] .header-actions,
html.translated-rtl .header-actions {
    flex-direction: row-reverse;
}

html[dir="rtl"] .gtranslate-wrapper,
html.translated-rtl .gtranslate-wrapper {
    margin-right: 0;
    margin-left: 10px;
}

/* ============================================
   MOBILE MENU
   ============================================ */
html[dir="rtl"] .mobile-menu,
html.translated-rtl .mobile-menu {
    right: auto;
    left: 0;
    transform: translateX(-100%);
}

html[dir="rtl"] .mobile-menu.active,
html.translated-rtl .mobile-menu.active {
    transform: translateX(0);
}

html[dir="rtl"] .mobile-menu-header,
html.translated-rtl .mobile-menu-header {
    flex-direction: row-reverse;
}

html[dir="rtl"] .mobile-menu-close,
html.translated-rtl .mobile-menu-close {
    left: 15px;
    right: auto;
}

html[dir="rtl"] .mobile-menu-links,
html.translated-rtl .mobile-menu-links {
    text-align: right;
}

/* ============================================
   HERO SECTION
   ============================================ */
html[dir="rtl"] .hero-grid,
html.translated-rtl .hero-grid {
    direction: rtl;
}

html[dir="rtl"] .hero-sidebar,
html.translated-rtl .hero-sidebar {
    border-left: none;
    border-right: 1px solid #e0e0e0;
}

html[dir="rtl"] .sidebar-article,
html.translated-rtl .sidebar-article {
    flex-direction: row-reverse;
}

html[dir="rtl"] .sidebar-article-content,
html.translated-rtl .sidebar-article-content {
    text-align: right;
    padding-left: 0;
    padding-right: 1rem;
}

/* ============================================
   NEWS CARDS
   ============================================ */
html[dir="rtl"] .news-card,
html.translated-rtl .news-card {
    text-align: right;
}

html[dir="rtl"] .news-card-body,
html.translated-rtl .news-card-body {
    text-align: right;
}

html[dir="rtl"] .news-card-meta,
html.translated-rtl .news-card-meta {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

html[dir="rtl"] .news-card-meta svg,
html.translated-rtl .news-card-meta svg {
    margin-left: 5px;
    margin-right: 0;
}

/* ============================================
   BREADCRUMBS
   ============================================ */
html[dir="rtl"] .breadcrumb,
html.translated-rtl .breadcrumb {
    flex-direction: row-reverse;
}

html[dir="rtl"] .breadcrumb-separator,
html.translated-rtl .breadcrumb-separator {
    transform: scaleX(-1);
}

/* ============================================
   NEWS DETAIL PAGE
   ============================================ */
html[dir="rtl"] .news-container,
html.translated-rtl .news-container {
    direction: rtl;
}

html[dir="rtl"] .news-meta-primary,
html.translated-rtl .news-meta-primary {
    flex-direction: row-reverse;
}

html[dir="rtl"] .news-meta span,
html.translated-rtl .news-meta span {
    flex-direction: row-reverse;
}

html[dir="rtl"] .news-meta svg,
html.translated-rtl .news-meta svg {
    margin-left: 5px;
    margin-right: 0;
}

html[dir="rtl"] .news-content,
html.translated-rtl .news-content {
    text-align: right;
}

html[dir="rtl"] .news-content p,
html.translated-rtl .news-content p {
    text-align: right;
}

html[dir="rtl"] .news-content ul,
html[dir="rtl"] .news-content ol,
html.translated-rtl .news-content ul,
html.translated-rtl .news-content ol {
    padding-right: 1.5em;
    padding-left: 0;
}

html[dir="rtl"] .news-content blockquote,
html.translated-rtl .news-content blockquote {
    border-left: none;
    border-right: 4px solid #c62828;
    padding-left: 0;
    padding-right: 1rem;
}

/* ============================================
   SOURCES & TAGS
   ============================================ */
html[dir="rtl"] .news-sources,
html.translated-rtl .news-sources {
    flex-direction: row-reverse;
}

html[dir="rtl"] .news-source-link i,
html.translated-rtl .news-source-link i {
    margin-left: 0;
    margin-right: 5px;
    transform: scaleX(-1);
}

html[dir="rtl"] .news-tags,
html.translated-rtl .news-tags {
    flex-direction: row-reverse;
}

html[dir="rtl"] .news-tag,
html.translated-rtl .news-tag {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* ============================================
   SHARE BUTTONS
   ============================================ */
html[dir="rtl"] .share-buttons,
html.translated-rtl .share-buttons {
    flex-direction: row-reverse;
}

html[dir="rtl"] .share-label,
html.translated-rtl .share-label {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* ============================================
   SIDEBAR
   ============================================ */
html[dir="rtl"] .sidebar,
html.translated-rtl .sidebar {
    text-align: right;
}

html[dir="rtl"] .sidebar-widget-title,
html.translated-rtl .sidebar-widget-title {
    text-align: right;
}

html[dir="rtl"] .sidebar-news-item,
html.translated-rtl .sidebar-news-item {
    flex-direction: row-reverse;
}

html[dir="rtl"] .sidebar-news-content,
html.translated-rtl .sidebar-news-content {
    padding-left: 0;
    padding-right: 12px;
    text-align: right;
}

/* ============================================
   FOOTER
   ============================================ */
html[dir="rtl"] .footer-new,
html.translated-rtl .footer-new {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .footer-new__grid,
html.translated-rtl .footer-new__grid {
    direction: rtl;
}

html[dir="rtl"] .footer-new__col,
html.translated-rtl .footer-new__col {
    text-align: right;
}

html[dir="rtl"] .footer-sections-columns,
html.translated-rtl .footer-sections-columns {
    flex-direction: row-reverse;
}

html[dir="rtl"] .footer-new__bottom,
html.translated-rtl .footer-new__bottom {
    text-align: right;
}

/* ============================================
   SEARCH PANEL
   ============================================ */
html[dir="rtl"] .search-panel-form,
html.translated-rtl .search-panel-form {
    flex-direction: row-reverse;
}

html[dir="rtl"] .search-panel-input,
html.translated-rtl .search-panel-input {
    text-align: right;
    padding-left: 10px;
    padding-right: 15px;
}

html[dir="rtl"] .search-panel-close,
html.translated-rtl .search-panel-close {
    left: 15px;
    right: auto;
}

/* ============================================
   FORMS
   ============================================ */
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select,
html.translated-rtl input,
html.translated-rtl textarea,
html.translated-rtl select {
    text-align: right;
}

html[dir="rtl"] .subscribe-form__row,
html.translated-rtl .subscribe-form__row {
    flex-direction: row-reverse;
}

/* ============================================
   PAGINATION
   ============================================ */
html[dir="rtl"] .pagination,
html.translated-rtl .pagination {
    flex-direction: row-reverse;
}

html[dir="rtl"] .pagination .page-link[aria-label="Previous"] svg,
html[dir="rtl"] .pagination .page-link[aria-label="Next"] svg,
html.translated-rtl .pagination .page-link[aria-label="Previous"] svg,
html.translated-rtl .pagination .page-link[aria-label="Next"] svg {
    transform: scaleX(-1);
}

/* ============================================
   CATEGORY PAGE
   ============================================ */
html[dir="rtl"] .category-header,
html.translated-rtl .category-header {
    text-align: right;
}

html[dir="rtl"] .news-grid,
html.translated-rtl .news-grid {
    direction: rtl;
}

/* ============================================
   TICKER / BREAKING NEWS
   ============================================ */
html[dir="rtl"] .ticker-wrapper,
html.translated-rtl .ticker-wrapper {
    direction: ltr; /* Тикер оставляем LTR для правильной анимации */
}

/* ============================================
   COMMENTS
   ============================================ */
html[dir="rtl"] .comments-section,
html.translated-rtl .comments-section {
    text-align: right;
}

html[dir="rtl"] .comment,
html.translated-rtl .comment {
    text-align: right;
}

html[dir="rtl"] .comment-avatar,
html.translated-rtl .comment-avatar {
    margin-right: 0;
    margin-left: 1rem;
}

html[dir="rtl"] .comment-header,
html.translated-rtl .comment-header {
    flex-direction: row-reverse;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
html[dir="rtl"] .text-left,
html.translated-rtl .text-left {
    text-align: right !important;
}

html[dir="rtl"] .text-right,
html.translated-rtl .text-right {
    text-align: left !important;
}

html[dir="rtl"] .float-left,
html.translated-rtl .float-left {
    float: right !important;
}

html[dir="rtl"] .float-right,
html.translated-rtl .float-right {
    float: left !important;
}

html[dir="rtl"] .ml-auto,
html.translated-rtl .ml-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

html[dir="rtl"] .mr-auto,
html.translated-rtl .mr-auto {
    margin-right: 0 !important;
    margin-left: auto !important;
}

/* ============================================
   ICONS (flip horizontal arrows)
   ============================================ */
html[dir="rtl"] .bi-chevron-left,
html[dir="rtl"] .bi-chevron-right,
html[dir="rtl"] .bi-arrow-left,
html[dir="rtl"] .bi-arrow-right,
html[dir="rtl"] .bi-box-arrow-up-right,
html.translated-rtl .bi-chevron-left,
html.translated-rtl .bi-chevron-right,
html.translated-rtl .bi-arrow-left,
html.translated-rtl .bi-arrow-right,
html.translated-rtl .bi-box-arrow-up-right {
    transform: scaleX(-1);
}

/* ============================================
   SPONSOR CAROUSEL
   ============================================ */
html[dir="rtl"] .sponsors-carousel,
html.translated-rtl .sponsors-carousel {
    direction: rtl;
}

/* ============================================
   SPECIAL FIXES
   ============================================ */

/* Исправление для чисел и дат - оставляем LTR */
html[dir="rtl"] .news-date,
html[dir="rtl"] .news-time,
html[dir="rtl"] .news-views,
html.translated-rtl .news-date,
html.translated-rtl .news-time,
html.translated-rtl .news-views {
    direction: ltr;
    display: inline-block;
}

/* Телефонные номера и email - LTR */
html[dir="rtl"] a[href^="tel:"],
html[dir="rtl"] a[href^="mailto:"],
html.translated-rtl a[href^="tel:"],
html.translated-rtl a[href^="mailto:"] {
    direction: ltr;
    unicode-bidi: embed;
}

