@media (max-width: 767px) {
    html, body {
        direction: rtl;
        text-align: right;
    }
    .site-main {
        padding: 1rem 0;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .post-item,
    .page-single {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .post-single {
        padding: 1rem 5px !important;
        margin: 0 !important;
    }
    
    .entry-title {
        font-size: 1.25rem;
    }
    
    .post-single .entry-title,
    .page-single .entry-title {
        font-size: 1.5rem;
    }
    
    .entry-content {
        font-size: 0.9375rem;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pagination {
        gap: 0.25rem;
    }
    
    .pagination .page-numbers {
        padding: 0.5rem 0.75rem;
        min-width: 40px;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0.75rem;
    }
    
    .site-title {
        font-size: 1.25rem;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        flex-direction: column;
        align-items: stretch;
    }
    
    .nav-previous,
    .nav-next {
        width: 100%;
    }
    
    .nav-previous a,
    .nav-next a {
        display: block;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --bg-light: #2a2a2a;
        --text-color: #e0e0e0;
        --text-light: #b0b0b0;
        --border-color: #3a3a3a;
    }
    
    .site-header {
        background: #2a2a2a;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .site-title a {
        color: #e0e0e0;
    }
    
    .post-item,
    .post-single,
    .page-single,
    .dashboard-section {
        background: #2a2a2a;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
}

