/* ===================================================================
   NEWS AND BLOG PAGES RTL STYLES - Updated for Figma Design
   ================================================================== */

/* ===================================================================
   1. NEWS HERO SECTION RTL STYLES
   ================================================================== */

/* News hero content alignment */
html[dir="rtl"] .news-hero-section {
    text-align: right !important;
}

html[dir="rtl"] .news-hero-title,
html[dir="rtl"] .news-hero-subtitle {
    text-align: right !important;
}

/* News hero text container */
html[dir="rtl"] .news-hero-content {
    padding: 0 100px 50px 100px !important;
}

html[dir="rtl"] .news-hero-text-container {
    text-align: right !important;
}

/* ===================================================================
   2. NEWS LISTING RTL STYLES
   ================================================================== */

/* News section title */
html[dir="rtl"] .news-section-title {
    text-align: right !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    font-size: 32px !important;
    line-height: 54px !important;
    color: #172154 !important;
}

/* Filter and sort options */
html[dir="rtl"] .news-filter-container {
    flex-direction: row-reverse !important;
}

html[dir="rtl"] .news-filter-btn {
    border-right: none !important;
    border-left: 2px solid #172154 !important;
    transform: skewX(12deg) !important;
    padding-right: 0 !important;
    padding-left: 1rem !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    font-size: 18px !important;
    line-height: 21.94px !important;
}

html[dir="rtl"] .news-filter-btn.active {
    color: #172154 !important;
}

html[dir="rtl"] .news-filter-btn:not(.active) {
    color: #69737d !important;
}

html[dir="rtl"] .news-filter-btn .skew-x-12 {
    transform: skewX(-12deg) !important;
}

/* Sort dropdown RTL */
html[dir="rtl"] .sort-dropdown {
    flex-direction: row-reverse !important;
    font-family: 'Lexend', sans-serif !important;
    font-weight: 500 !important;
    font-size: 16px !important;
    line-height: 40px !important;
    color: #69737d !important;
}

html[dir="rtl"] .sort-dropdown span {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

/* News grid layout */
html[dir="rtl"] .news-grid {
    direction: rtl !important;
}

/* ===================================================================
   3. NEWS CARD RTL STYLES
   ================================================================== */

/* Featured news card */
html[dir="rtl"] .news-featured-card {
    flex-direction: row-reverse !important;
}

html[dir="rtl"] .news-featured-card .lg\\:flex-row {
    flex-direction: row-reverse !important;
}

/* News card content alignment */
html[dir="rtl"] .news-card {
    text-align: right !important;
}

html[dir="rtl"] .news-card h3,
html[dir="rtl"] .news-card p {
    text-align: right !important;
}

html[dir="rtl"] .news-card .text-\\[\\#878787\\] {
    text-align: right !important;
}

/* News card date */
html[dir="rtl"] .news-card-date {
    text-align: right !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 400 !important;
    font-size: 20px !important;
    line-height: 34px !important;
    color: #878787 !important;
}

/* News card title */
html[dir="rtl"] .news-card-title {
    text-align: right !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    font-size: 28px !important;
    line-height: 54px !important;
    color: #172154 !important;
}

/* News card description */
html[dir="rtl"] .news-card-description {
    text-align: right !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 400 !important;
    font-size: 20px !important;
    line-height: 34px !important;
    color: #878787 !important;
}

/* News card button */
html[dir="rtl"] .news-btn {
    transform: skewX(12deg) !important;
    border-right: none !important;
    border-left: 2px solid #172154 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    font-size: 18px !important;
    line-height: 21.94px !important;
    color: #172154 !important;
}

html[dir="rtl"] .news-btn .skew-x-12 {
    transform: skewX(-12deg) !important;
}

html[dir="rtl"] .news-btn:hover {
    transform: translateY(-1px) scale(1.02) skewX(12deg) !important;
    background-color: #172154 !important;
    color: white !important;
}

html[dir="rtl"] .news-btn svg {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
    transform: scaleX(-1) !important;
}

/* Featured news title */
html[dir="rtl"] .news-featured-title {
    text-align: right !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    font-size: 32px !important;
    line-height: 54px !important;
    color: #172154 !important;
}

/* ===================================================================
   4. PAGINATION RTL STYLES
   ================================================================== */

/* Pagination container */
html[dir="rtl"] .news-pagination {
    flex-direction: row-reverse !important;
}

/* Pagination buttons */
html[dir="rtl"] .pagination-btn {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 500 !important;
    font-size: 16px !important;
    line-height: 19.5px !important;
    color: #69737d !important;
    background: white !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
}

html[dir="rtl"] .pagination-btn:hover {
    background: #172154 !important;
    color: white !important;
    border-color: #172154 !important;
}

html[dir="rtl"] .pagination-btn.active {
    background: #172154 !important;
    color: white !important;
    border-color: #172154 !important;
    font-weight: 600 !important;
}

/* ===================================================================
   5. RESPONSIVE RTL ADJUSTMENTS
   ================================================================== */

/* Mobile RTL adjustments */
@media (max-width: 768px) {
    html[dir="rtl"] .news-hero-content {
        padding: 0 20px 40px 20px !important;
    }
    
    html[dir="rtl"] .news-hero-title {
        font-size: 32px !important;
        line-height: 40px !important;
        text-align: right !important;
    }
    
    html[dir="rtl"] .news-hero-subtitle {
        font-size: 16px !important;
        line-height: 24px !important;
        text-align: right !important;
    }
    
    html[dir="rtl"] .news-section-title {
        font-size: 24px !important;
        line-height: 32px !important;
        text-align: right !important;
    }
    
    html[dir="rtl"] .news-card-title {
        font-size: 20px !important;
        line-height: 28px !important;
        text-align: right !important;
    }
    
    html[dir="rtl"] .news-featured-title {
        font-size: 24px !important;
        line-height: 32px !important;
        text-align: right !important;
    }
    
    html[dir="rtl"] .news-btn {
        font-size: 16px !important;
        padding: 8px 16px 4px 16px !important;
    }
    
    html[dir="rtl"] .news-filter-btn {
        font-size: 16px !important;
        padding: 8px 12px 4px 12px !important;
    }
    
    html[dir="rtl"] .news-card-date {
        font-size: 16px !important;
        line-height: 20px !important;
        text-align: right !important;
    }
    
    html[dir="rtl"] .news-card-description {
        font-size: 16px !important;
        line-height: 28px !important;
        text-align: right !important;
    }
}

@media (max-width: 480px) {
    html[dir="rtl"] .news-hero-content {
        padding: 0 16px 20px 16px !important;
    }
    
    html[dir="rtl"] .news-hero-title {
        font-size: 28px !important;
        line-height: 36px !important;
    }
    
    html[dir="rtl"] .news-hero-subtitle {
        font-size: 14px !important;
        line-height: 20px !important;
    }
    
    html[dir="rtl"] .news-section-title {
        font-size: 20px !important;
        line-height: 28px !important;
    }
    
    html[dir="rtl"] .news-card-title {
        font-size: 18px !important;
        line-height: 24px !important;
    }
    
    html[dir="rtl"] .news-featured-title {
        font-size: 20px !important;
        line-height: 28px !important;
    }
    
    html[dir="rtl"] .news-btn {
        font-size: 14px !important;
        padding: 6px 12px 2px 12px !important;
    }
    
    html[dir="rtl"] .news-filter-btn {
        font-size: 14px !important;
        padding: 6px 10px 2px 10px !important;
    }
    
    html[dir="rtl"] .news-card-date {
        font-size: 14px !important;
        line-height: 18px !important;
    }
    
    html[dir="rtl"] .news-card-description {
        font-size: 14px !important;
        line-height: 20px !important;
    }
}

/* Desktop RTL adjustments */
@media (min-width: 769px) {
    html[dir="rtl"] .news-desktop-layout {
        flex-direction: row-reverse !important;
    }
    
    html[dir="rtl"] .news-desktop-content {
        text-align: right !important;
    }
    
    html[dir="rtl"] .news-btn {
        font-size: 18px !important;
        padding: 14px 24px 10px 24px !important;
    }
    
    html[dir="rtl"] .news-filter-btn {
        font-size: 18px !important;
        padding: 12px 18px 8px 18px !important;
    }
}

/* ===================================================================
   6. CONTAINER AND LAYOUT RTL ADJUSTMENTS
   ================================================================== */

/* Container styles */
html[dir="rtl"] .news-container {
    max-width: 1720px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

/* Grid layouts */
html[dir="rtl"] .news-grid {
    direction: rtl !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
}

@media (max-width: 1024px) {
    html[dir="rtl"] .news-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    html[dir="rtl"] .news-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ===================================================================
   7. ANIMATION RTL ADJUSTMENTS
   ================================================================== */

/* Button hover effects */
html[dir="rtl"] .news-btn-hover:hover {
    transform: translateX(-2px) skewX(12deg) !important;
}

/* Button icons */
html[dir="rtl"] .news-btn-icon {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
    transform: scaleX(-1) !important;
}

/* ===================================================================
   8. TYPOGRAPHY RTL ADJUSTMENTS
   ================================================================== */

/* Headings */
html[dir="rtl"] .news-heading {
    text-align: right !important;
}

/* Paragraphs */
html[dir="rtl"] .news-paragraph {
    text-align: right !important;
}

/* Lists */
html[dir="rtl"] .news-list {
    text-align: right !important;
    padding-right: 1.5rem !important;
    padding-left: 0 !important;
}

/* ===================================================================
   9. IMAGE AND MEDIA RTL HANDLING
   ================================================================== */

/* Image positioning */
html[dir="rtl"] .news-image {
    order: 2 !important;
}

html[dir="rtl"] .news-text {
    order: 1 !important;
}

/* Image captions */
html[dir="rtl"] .news-image-caption {
    text-align: right !important;
}

/* ===================================================================
   10. ACCESSIBILITY RTL IMPROVEMENTS
   ================================================================== */

/* Focus indicators */
html[dir="rtl"] .news-focus:focus {
    border-right: 2px solid #172154 !important;
    border-left: none !important;
}

/* Screen reader text */
html[dir="rtl"] .news-sr-only {
    direction: rtl !important;
}

/* ===================================================================
   11. PRINT STYLES RTL
   ================================================================== */

@media print {
    html[dir="rtl"] .news-print {
        direction: rtl !important;
        text-align: right !important;
    }
}
