* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1e3a8a;
    --primary-dark: #1e40af;
    --secondary: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --light: #f3f4f6;
    --dark: #111827;
    --text: #374151;
    --border: #e5e7eb;
}

html {
    scroll-behavior: smooth;
    direction: ltr;
    /* Prevent layout shift when changing languages */
    overflow-y: scroll;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: #ffffff;
    direction: ltr;
    text-align: left;
}

/* Ensure header is never affected by body direction changes */
body .header {
    direction: ltr !important;
    text-align: left !important;
}

body .header,
body .header .container,
body .header .logo,
body .header .logo h1,
body .header .logo h1 a,
body .header .logo p,
body .header .nav,
body .header .nav-link {
    direction: ltr !important;
    text-align: left !important;
    flex-direction: row !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header - UNIVERSAL STYLES - DO NOT CHANGE */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    color: white !important;
    padding: 20px 0 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    direction: ltr !important;
    text-align: left !important;
}

.header .container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    direction: ltr !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
    text-align: left !important;
}

/* Header Search Box */
.header-search {
    position: relative;
    flex: 1;
    max-width: 400px;
    min-width: 250px;
}

.header-search input {
    width: 100%;
    padding: 10px 15px;
    border-radius: 25px;
    border: none;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
}

.header-search input:focus {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
}

.header-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1001;
    display: none;
    margin-top: 5px;
}

.header-suggestions.active {
    display: block;
}

.header-suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    color: var(--text);
    transition: background 0.2s;
    text-align: left;
}

.header-suggestion-item:hover {
    background: #f5f5f5;
}

.header-suggestion-item:last-child {
    border-bottom: none;
}

/* RTL Support for Arabic pages */
[dir="rtl"] .header-search input {
    text-align: right;
}

[dir="rtl"] .header-suggestion-item {
    text-align: right;
}

html[lang="ar"] .header-search input {
    text-align: right;
    direction: rtl;
}

html[lang="ar"] .header-suggestion-item {
    text-align: right;
    direction: rtl;
}

.logo {
    direction: ltr !important;
    text-align: left !important;
    flex-shrink: 0 !important;
}

.logo h1 {
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3) !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
    display: inline-block !important;
    letter-spacing: 1px !important;
    direction: ltr !important;
    text-align: left !important;
    background: none !important;
}

.logo h1 a {
    color: #ffffff !important;
    text-decoration: none !important;
}

.logo p {
    font-size: 0.9rem !important;
    opacity: 0.95 !important;
    margin: 5px 0 0 0 !important;
    padding: 0 !important;
    direction: ltr !important;
    color: #f0f0f0 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3) !important;
    white-space: nowrap !important;
    text-align: left !important;
}

.nav {
    display: flex;
    gap: 20px;
    direction: ltr;
    flex-wrap: nowrap;
    align-items: center;
    text-align: left;
    white-space: nowrap;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background-color: var(--secondary);
    font-weight: 600;
}

body[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

body[dir="rtl"] .header,
body[dir="rtl"] .header .container,
body[dir="rtl"] .logo,
body[dir="rtl"] .nav {
    direction: rtl !important;
    text-align: right !important;
}

body[dir="rtl"] .header .container {
    flex-direction: row-reverse !important;
}

body[dir="rtl"] .nav {
    flex-direction: row-reverse !important;
    justify-content: flex-start !important;
}

body[dir="rtl"] .featured-card,
body[dir="rtl"] .article-card,
body[dir="rtl"] .main-content {
    direction: rtl;
    text-align: right;
}

body[dir="rtl"] .article-meta {
    flex-direction: row-reverse;
}

body[dir="rtl"] .article-footer {
    justify-content: flex-end;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.9), rgba(30, 64, 175, 0.9)), 
                url('https://images.unsplash.com/photo-1557821552-17105176677c?w=1200&h=400&fit=crop');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 60px 0;
    text-align: center;
}

.hero h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 20px;
    opacity: 0.95;
}

/* Ad Container */
.ad-container {
    background-color: var(--light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    margin: 20px 0;
    text-align: center;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Content */
.main-content {
    padding: 40px 0;
}

/* Featured Article */
.featured-article {
    margin-bottom: 50px;
}

.featured-article h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--dark);
    border-bottom: 3px solid var(--secondary);
    padding-bottom: 10px;
}

.featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.featured-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.featured-image {
    overflow: hidden;
    height: 100%;
    min-height: 300px;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-card:hover .featured-image img {
    transform: scale(1.05);
}

.featured-info {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-info h2 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.featured-info p {
    color: var(--text);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.read-more-btn {
    align-self: flex-start;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.read-more-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateX(5px);
}

/* Load More Button */
.load-more-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 14px 40px;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.load-more-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.articles-info {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

/* Override grid for date sections container */
#articles-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    grid-template-columns: none !important;
}

/* Ensure sections wrapper shows date sections vertically */
.articles-section #articles-grid {
    display: block !important;
}

/* Date Sections - Stack vertically */
.date-section {
    width: 100%;
    margin-bottom: 30px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.date-section:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.date-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.date-header:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-bottom-color: #667eea;
}

.date-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.date-icon {
    font-size: 1.5rem;
}

.date-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.date-count {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
    background: white;
    padding: 4px 12px;
    border-radius: 20px;
}

.toggle-icon {
    font-size: 1.2rem;
    color: #667eea;
    transition: transform 0.3s ease;
}

.date-articles {
    transition: all 0.3s ease;
}

.date-articles.collapsed {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

.date-articles.expanded {
    max-height: none;
    opacity: 1;
    padding: 20px;
}

.articles-grid-section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 20px;
}

/* Mobile responsive for date sections */
@media (max-width: 768px) {
    .date-header {
        padding: 15px 18px;
    }
    
    .date-title {
        font-size: 1.2rem;
    }
    
    .date-icon {
        font-size: 1.3rem;
    }
    
    .date-count {
        font-size: 0.85rem;
        padding: 3px 10px;
    }
    
    .date-articles.expanded {
        padding: 15px;
    }
    
    .articles-grid-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .show-more-btn {
        padding: 10px 25px;
        font-size: 0.95rem;
    }
}

.show-more-btn {
    display: block;
    margin: 20px auto 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.show-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

/* Articles Section */
.articles-section {
    margin-bottom: 40px;
}

.articles-section h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--dark);
    border-bottom: 3px solid var(--secondary);
    padding-bottom: 10px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    border-left: 4px solid var(--primary);
}

.article-card:hover {
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
    border-left-color: var(--primary-dark);
}

/* Hide article images - only featured has image */
.article-image {
    display: none !important;
}

.article-card .article-image {
    display: none !important;
}

.articles-grid .article-image {
    display: none !important;
}

.article-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: var(--secondary);
}

.article-content h3 {
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 12px;
    line-height: 1.5;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-content p {
    color: var(--text);
    font-size: 0.95rem;
    margin-bottom: 15px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-footer {
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.article-tag {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Footer */
.footer {
    background-color: var(--dark);
    color: #e5e7eb;
    padding: 50px 0 20px;
    margin-top: 60px;
    border-top: 3px solid var(--secondary);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-section p {
    line-height: 1.8;
    font-size: 0.95rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #374151;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--secondary);
    text-decoration: none;
}

/* Mobile Menu Toggle Button - Hidden by default on desktop */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 8px 12px;
    z-index: 1001;
    position: relative;
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.menu-toggle:active {
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive Design - MOBILE FIRST */
@media (max-width: 768px) {
    .header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 15px;
        flex-wrap: nowrap;
    }

    .logo {
        flex: 1;
    }

    .logo h1 {
        font-size: 1.6rem !important;
    }

    .logo p {
        font-size: 0.75rem !important;
    }

    /* Show hamburger button ONLY on mobile */
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    /* Transform nav into mobile slide-in menu */
    .nav {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        height: 100vh !important;
        width: 280px !important;
        background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
        padding: 80px 0 20px 0 !important;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3) !important;
        transition: right 0.3s ease-in-out !important;
        z-index: 1000 !important;
        overflow-y: auto !important;
        gap: 0 !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        pointer-events: auto !important;
    }

    .nav.active {
        right: 0 !important;
    }

    .nav-link {
        display: block !important;
        width: 100% !important;
        text-align: left !important;
        padding: 18px 25px !important;
        border: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 0 !important;
        font-size: 1.05rem !important;
        color: white !important;
        text-decoration: none !important;
        transition: background 0.2s !important;
        box-sizing: border-box !important;
        position: relative !important;
        pointer-events: auto !important;
        cursor: pointer !important;
    }

    .nav-link:hover,
    .nav-link.active {
        background: rgba(255, 255, 255, 0.15) !important;
    }

    /* Close button inside mobile menu */
    .nav::before {
        content: '✕';
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 2.5rem;
        color: white;
        cursor: pointer;
        width: 45px;
        height: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.1);
        pointer-events: auto;
    }

    .nav::before:hover {
        background: rgba(255, 255, 255, 0.25);
    }

    /* Overlay when menu is open - BEHIND the menu */
    body::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
        pointer-events: none;
    }

    body.menu-open::after {
        opacity: 1;
        visibility: visible;
        pointer-events: none;
    }
    
    /* Hide hamburger when menu is open */
    body.menu-open .menu-toggle {
        opacity: 0;
        pointer-events: none;
    }

    body.menu-open {
        overflow: hidden;
    }

    .hero h2 {
        font-size: 1.8rem;
        padding: 0 15px;
    }

    .hero p {
        font-size: 1rem;
        padding: 0 15px;
    }

    .container {
        padding: 0 15px;
    }

    .featured-card {
        grid-template-columns: 1fr;
    }

    .featured-image {
        min-height: 200px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .article-card {
        margin-bottom: 10px;
    }

    .article-content {
        padding: 20px;
    }

    .article-content h3 {
        font-size: 1.15rem;
    }

    /* RTL Mobile Menu Support - INSIDE MOBILE MEDIA QUERY */
    html[dir="rtl"] .nav,
    html[lang="ar"] .nav {
        right: auto !important;
        left: -100% !important;
        direction: rtl !important;
    }

    html[dir="rtl"] .nav.active,
    html[lang="ar"] .nav.active {
        left: 0 !important;
        right: auto !important;
    }

    html[dir="rtl"] .nav::before,
    html[lang="ar"] .nav::before {
        right: auto !important;
        left: 20px !important;
    }

    html[dir="rtl"] .nav-link,
    html[lang="ar"] .nav-link {
        text-align: right !important;
        direction: rtl !important;
    }

    html[dir="rtl"] .menu-toggle,
    html[lang="ar"] .menu-toggle {
        order: -1 !important;
    }

    /* Article Page Responsive */
    .article-header {
        padding: 20px 15px;
    }

    .article-header h1 {
        font-size: 1.6rem;
        line-height: 1.3;
    }

    .article-meta {
        flex-direction: column;
        gap: 10px;
        font-size: 0.9rem;
    }

    .article-body {
        padding: 20px 15px;
        margin: 20px 10px;
    }

    .article-body .excerpt {
        font-size: 1.05rem;
    }

    .article-body .content {
        font-size: 0.95rem;
    }

    .keyword-tag {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .article-header h1 {
        font-size: 1.3rem;
    }

    .article-body {
        padding: 15px 10px;
        margin: 15px 5px;
    }

    .article-body .excerpt {
        font-size: 1rem;
    }

    .article-body .content {
        font-size: 0.9rem;
        line-height: 1.7;
    }
    .logo h1 {
        font-size: 1.4rem !important;
    }

    .logo p {
        font-size: 0.7rem !important;
    }

    .hero h2 {
        font-size: 1.4rem;
        padding: 0 10px;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .hero {
        padding: 40px 0;
    }

    .container {
        padding: 0 10px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .featured-info {
        padding: 20px;
    }

    .featured-info h2 {
        font-size: 1.3rem;
    }

    .featured-info p {
        font-size: 0.95rem;
    }

    .article-content h3 {
        font-size: 1.1rem;
    }

    .nav {
        width: 80%;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-section {
        padding: 0 15px;
    }

    .footer {
        padding: 40px 0 20px;
        margin-top: 40px;
    }
}

/* DESKTOP - Override mobile styles */
@media (min-width: 769px) {
    /* HIDE hamburger menu button on desktop completely */
    .menu-toggle {
        display: none !important;
    }
    
    /* Reset nav to normal desktop layout */
    .nav {
        display: flex !important;
        position: static !important;
        flex-direction: row !important;
        width: auto !important;
        height: auto !important;
        max-width: none !important;
        padding: 0 !important;
        background: none !important;
        box-shadow: none !important;
        gap: 20px !important;
        transition: none !important;
        overflow-y: visible !important;
    }

    /* Reset nav links to desktop style */
    .nav-link {
        width: auto !important;
        padding: 8px 16px !important;
        border-bottom: none !important;
        font-size: 1rem !important;
    }

    /* Hide mobile close button */
    .nav::before {
        display: none !important;
    }
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card {
    animation: fadeIn 0.5s ease-out;
}

/* RTL Support for Arabic */
html[dir="rtl"] .logo h1 {
    background: linear-gradient(315deg, #ffffff, #f3f4f6);
}

html[dir="rtl"] .nav {
    gap: 20px;
}

html[dir="rtl"] .featured-card {
    grid-template-columns: 1fr 1fr;
}

html[dir="rtl"] .article-meta {
    flex-direction: row-reverse;
}

html[dir="rtl"] .article-footer {
    flex-direction: row-reverse;
}

html[dir="rtl"] .read-more-btn:hover {
    transform: translateX(-5px);
}

/* Article Page Styles */
.article-page {
    background: #fafafa;
}

.article-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px 20px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.article-header h1 {
    font-size: 2.8rem;
    line-height: 1.3;
    color: var(--primary);
    margin-bottom: 20px;
    font-weight: 800;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

html[dir="rtl"] .article-header h1 {
    direction: rtl;
}

.article-meta {
    display: flex;
    gap: 30px;
    justify-content: center;
    color: #666;
    font-size: 1rem;
    flex-wrap: wrap;
}

/* Hide article featured image */
.article-featured-image {
    display: none;
}

.article-body {
    max-width: 850px;
    margin: 0 auto;
    padding: 40px 20px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 8px;
}

.article-body .excerpt {
    font-size: 1.2rem;
    color: #333;
    line-height: 1.6;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--secondary);
}

.article-body .content {
    line-height: 1.8;
    color: #555;
}

.article-body p {
    margin-bottom: 15px;
    text-align: justify;
}

.article-footer {
    max-width: 800px;
    margin: 30px auto;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.keywords {
    margin-top: 15px;
}

.keywords strong {
    color: var(--primary);
    margin-right: 10px;
}

html[dir="rtl"] .keywords strong {
    margin-right: 0;
    margin-left: 10px;
}

.keyword-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 8px 16px;
    margin: 5px 5px 5px 0;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}

.keyword-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

html[dir="rtl"] .keyword-tag {
    margin: 5px 0 5px 5px;
}

.btn-back {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateX(-5px);
}

html[dir="rtl"] .btn-back:hover {
    transform: translateX(5px);
}

.back-link {
    text-align: center;
    margin-top: 30px;
}

/* RTL Support for Arabic */
html[dir="rtl"],
html[lang="ar"] {
    direction: rtl;
}

html[dir="rtl"] body,
html[lang="ar"] body {
    direction: rtl;
    text-align: right;
}

/* Keep header always LTR - OVERRIDE RTL */
html[dir="rtl"] .header,
html[lang="ar"] .header {
    direction: ltr !important;
}

html[dir="rtl"] .header .container,
html[lang="ar"] .header .container {
    direction: ltr !important;
    flex-direction: row !important;
}

html[dir="rtl"] .logo,
html[lang="ar"] .logo {
    direction: ltr !important;
    flex: 0 0 auto !important;
}

html[dir="rtl"] .logo h1,
html[lang="ar"] .logo h1 {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3) !important;
    direction: ltr !important;
    white-space: nowrap !important;
}

html[dir="rtl"] .logo p,
html[lang="ar"] .logo p {
    color: #e8e8e8 !important;
    opacity: 1 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3) !important;
    direction: ltr !important;
}

html[dir="rtl"] .nav,
html[lang="ar"] .nav {
    direction: ltr !important;
    flex-direction: row !important;
    flex: 0 0 auto !important;
}

html[dir="rtl"] .container,
html[lang="ar"] .container {
    direction: rtl;
}

html[dir="rtl"] .articles-grid,
html[lang="ar"] .articles-grid {
    direction: rtl;
}

html[dir="rtl"] .feature-card,
html[lang="ar"] .feature-card {
    border-left: none;
    border-right: 4px solid var(--primary);
}

html[dir="rtl"] .contact-card,
html[lang="ar"] .contact-card {
    border-left: none;
    border-right: 4px solid var(--primary);
}

html[dir="rtl"] .policy-section h2,
html[lang="ar"] .policy-section h2 {
    border-bottom: none;
    border-top: 3px solid var(--secondary);
    padding-bottom: 0;
    padding-top: 10px;
}

html[dir="rtl"] .footer-content,
html[lang="ar"] .footer-content {
    direction: rtl;
}