.related-articles {
    font-family: 'Assistant', sans-serif !important;
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
    direction: rtl;
    background: #ffffff;
}

.related-articles h3 {
    font-size: 32px;
    font-weight: 800;
    color: #2d3748;
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 0.5rem;
}

.related-articles h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(45deg, #2196f3, #ec407a);
    border-radius: 2px;
}

.related-articles ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* בדסקטופ - הצג בשורה אחת */
@media (min-width: 769px) {
    .related-articles ul {
        flex-direction: row;
    }
    
    .related-articles li {
        flex: 1;
        min-width: 0;
        margin-bottom: 0;
    }
    
    .related-articles a {
        height: 100%;
        min-height: 120px;
        flex-direction: row;
        text-align: right;
        justify-content: flex-start;
        align-items: center;
    }
    
    .related-articles .text-content {
        padding-right: 15px;
        padding-top: 0;
        flex: 1;
    }
    
    .related-articles img,
    .related-articles .placeholder-image {
        width: 60px;
        height: 60px;
        margin: 0;
        flex-shrink: 0;
    }
}

/* במובייל - הצג בעמודה */
@media (max-width: 768px) {
    .related-articles ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .related-articles li {
        flex: none;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .related-articles a {
        flex-direction: row;
        text-align: right;
        justify-content: flex-start;
        min-height: auto;
    }
    
    .related-articles .text-content {
        padding-right: 15px;
        padding-top: 0;
    }
    
    .related-articles img,
    .related-articles .placeholder-image {
        width: 40px;
        height: 40px;
        margin: 0;
    }
}

.related-articles li {
    margin-bottom: 1rem;
    transition: transform 0.2s ease;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.related-articles li:hover {
    transform: translateX(-5px);
}

/* בדסקטופ - אנימציה שונה */
@media (min-width: 769px) {
    .related-articles li:hover {
        transform: translateY(-3px);
    }
}

/* אנימציות מדורגות */
.related-articles li:nth-child(1) { animation-delay: 0.1s; }
.related-articles li:nth-child(2) { animation-delay: 0.2s; }
.related-articles li:nth-child(3) { animation-delay: 0.3s; }
.related-articles li:nth-child(4) { animation-delay: 0.4s; }
.related-articles li:nth-child(5) { animation-delay: 0.5s; }

/* צבעים ייחודיים לכל קישור */
.related-articles li:nth-child(1) a { border-right-color: #2196f3; }
.related-articles li:nth-child(2) a { border-right-color: #ec407a; }
.related-articles li:nth-child(3) a { border-right-color: #66bb6a; }
.related-articles li:nth-child(4) a { border-right-color: #ffa726; }
.related-articles li:nth-child(5) a { border-right-color: #7e57c2; }

.related-articles a {
    display: flex;
    align-items: center;
    padding: 1rem;
    font-size: 18px;
    font-weight: 500;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-right: 4px solid transparent;
    transition: all 0.25s ease;
    line-height: 1.6;
    text-decoration: none;
    color: #0d1117;    
    width: 100%;
    gap: 0;
}

.related-articles a:hover,
.related-articles a:focus {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    background: #ffffff;
}

.related-articles a:focus {
    outline: 2px solid #2196f3;
    outline-offset: 2px;
}

.related-articles img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.related-articles .placeholder-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    flex-shrink: 0;
    position: relative;
}

.related-articles .placeholder-image::before {
    content: '📄';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    opacity: 0.6;
}

.related-articles .text-content {
    flex: 1;
    padding-right: 15px;
    min-width: 0;
}

/* אנימציות */
@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* טאבלט */
@media (max-width: 768px) and (min-width: 481px) {
    .related-articles {
        padding: 1.5rem;
        margin: 1.5rem 1rem;
    }
    
    .related-articles h3 {
        font-size: 28px;
    }
    
    .related-articles a {
        font-size: 16px;
        padding: 0.8rem;
    }
    
    .related-articles img,
    .related-articles .placeholder-image {
        width: 40px;
        height: 40px;
    }
    
    .related-articles .text-content {
        padding-right: 12px;
    }
    
    /* בטאבלט - הצג בשתי עמודות אם יש 2 קישורים */
    .related-articles ul {
        flex-direction: row;
        gap: 1rem;
    }
    
    .related-articles li {
        flex: 1;
        min-width: 0;
        margin-bottom: 0;
    }
    
    .related-articles a {
        height: 100%;
        min-height: 100px;
        flex-direction: row;
        text-align: right;
        justify-content: flex-start;
        align-items: center;
    }
    
    .related-articles .text-content {
        padding-right: 12px;
        padding-top: 0;
        flex: 1;
    }
    
    .related-articles img,
    .related-articles .placeholder-image {
        width: 50px;
        height: 50px;
        margin: 0;
        flex-shrink: 0;
    }
}

/* מובייל */
@media (max-width: 480px) {
    .related-articles {
        padding: 1.2rem;
        margin: 1rem 0.5rem;
        border-radius: 12px;
    }
    
    .related-articles h3 {
        font-size: 24px;
        margin-bottom: 1rem;
    }
    
    .related-articles a {
        font-size: 15px;
        padding: 0.7rem;
        line-height: 1.4;
    }
    
    .related-articles img,
    .related-articles .placeholder-image {
        width: 35px;
        height: 35px;
    }
    
    .related-articles .text-content {
        padding-right: 10px;
    }
}

/* הנגשה - הפחתת אנימציות */
@media (prefers-reduced-motion: reduce) {
    .related-articles li {
        animation: none;
        opacity: 1;
    }
    
    .related-articles li:hover {
        transform: none;
    }
    
    .related-articles a:hover {
        transform: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .related-articles {
        background: #1a1a1a;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    }
    
    .related-articles h3 {
        color: #e2e8f0;
    }
    
    .related-articles a {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .related-articles a:hover {
        background: #4a5568;
    }
}