/* Articles Listing Container */
.nvm-articles-listing {
    max-width: 1200px;
    margin: 60px auto;
    padding: 40px 20px;
    font-family: 'Assistant', sans-serif;
    direction: rtl;
}

/* Search Bar */
.nvm-articles-search {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 40px;
}

.nvm-articles-search-form {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    max-width: 500px;
}

.nvm-articles-search-input {
    width: 100%;
    padding: 14px 60px 14px 25px !important; /* Space for icon on the right (RTL) */
    background-color: #ffffff;
    border: 2px solid transparent;
    border-radius: 40px;
    font-size: 16px;
    font-family: 'Assistant', sans-serif;
    color: #333;
    outline: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.nvm-articles-search-input::placeholder {
    color: #a0a0a0;
}

.nvm-articles-search-input:focus {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--nvm-dementia-primary, #6f4165);
}

.nvm-articles-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--nvm-dementia-primary, #6f4165);
    border: none;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nvm-articles-search-btn:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nvm-articles-search-title {
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    font-family: 'Heebo', sans-serif;
}

/* Grid Layout */
.nvm-articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* Article Card */
.nvm-articles-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.nvm-articles-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.nvm-articles-card-image {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 1px solid #eee;
}

.nvm-articles-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.nvm-articles-card-title {
    font-family: 'Heebo', sans-serif;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: var(--nvm-dementia-primary, #6f4165);
    line-height: 1.3;
}

.nvm-articles-card-excerpt {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin: 0 0 15px 0;
    flex-grow: 1;
    /* Line clamping for excerpts */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nvm-articles-card-readmore {
    font-size: 14px;
    font-weight: 600;
    color: var(--nvm-dementia-primary, #6f4165);
    text-decoration: underline;
    align-self: flex-start;
    margin-top: auto;
}

/* Pagination */
.nvm-articles-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 50px;
}

.nvm-articles-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 4px;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s, color 0.2s;
}

.nvm-articles-pagination .page-numbers:hover {
    background: #e0e0e0;
}

.nvm-articles-pagination .page-numbers.current {
    background: var(--nvm-dementia-primary, #6f4165);
    color: #fff;
}

.nvm-articles-pagination .next.page-numbers,
.nvm-articles-pagination .prev.page-numbers {
    background: transparent;
    font-size: 18px;
}

.nvm-articles-pagination .next.page-numbers:hover,
.nvm-articles-pagination .prev.page-numbers:hover {
    background: transparent;
    color: var(--nvm-dementia-primary, #6f4165);
}

/* Empty State */
.nvm-articles-empty {
    text-align: center;
    padding: 50px 20px;
    color: #777;
    font-size: 18px;
}

/* Responsive */
@media (max-width: 1024px) {
    .nvm-articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .nvm-articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .nvm-articles-search-form {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .nvm-articles-grid {
        grid-template-columns: 1fr;
    }
    .nvm-articles-card-image {
        height: 200px;
    }
}
