.sv-latest-news {
    padding: 4rem var(--sv-content-padding);
    position: relative;
}

.sv-latest-news.sv-loading:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 10;
    pointer-events: none;
}

.sv-latest-news.sv-loading:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid var(--sv-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: sv-spin 0.6s linear infinite;
    z-index: 11;
}

@keyframes sv-spin {
    to { transform: rotate(360deg); }
}

.sv-news-item {
    margin-bottom: .5rem;
}

/* Search Form Styles */
.sv-news-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.sv-news-header > div {
    flex: 1;
    min-width: 0;
}

.sv-news-title {
    margin: .75rem 0 1.25rem;
}

.sv-news-filters {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.sv-news-search {
    position: relative;
    width: 300px;
}

.sv-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.sv-search-field {
    padding: .65rem 3rem .65rem 1.5rem !important;
    border: none !important;
    border-radius: 50px !important;
    background: #fff !important;
    color: var(--sv-text) !important;
    height: auto !important;
}

.sv-search-field::placeholder {
    color: #888;
    opacity: 1;
}

.sv-search-submit {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none !important;
    box-shadow: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.sv-search-submit:hover {
    color: #333;
}

.sv-search-icon {
    width: 18px;
    height: 18px;
}

/* Featured Posts */
.sv-featured-posts {
    margin-bottom: 4rem;
}

.sv-featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.sv-featured-post {
    background: #fff;
    border-radius: var(--sv-radius-card);
    overflow: hidden;
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); */
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}

.sv-featured-post:hover {
    /* transform: translateY(-5px); */
    /* box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); */
    background: var(--sv-primary);
}

.sv-featured-post:hover .sv-post-date,
.sv-featured-post:hover .sv-post-title a {
    color: #fff;
}

.sv-featured-image {
    display: block;
    width: 100%;
    padding-top: 60%;
    position: relative;
    overflow: hidden;
    background-color: #f5f7fa;
    color: #cbd5e0;
}

.sv-featured-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e2e8f0 100%);
}

.sv-featured-image-placeholder svg {
    opacity: 0.5;
    width: 30%;
    height: 30%;
    max-width: 60px;
    max-height: 60px;
}

.sv-featured-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.sv-featured-post:hover .sv-featured-image img {
    transform: scale(1.05);
}

.sv-featured-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sv-post-date {
    font-size: var(--sv-font-size-xs);
    font-weight: 700;
    color: var(--sv-primary);
    display: block;
    text-transform: uppercase;
    letter-spacing: .1rem;
}

.sv-post-title {
    font-size: var(--sv-font-size-lg);
    font-weight: 400;
    margin: .75rem 0;
    line-height: 1.4;
}

.sv-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.sv-post-title a:hover {
    color: var(--sv-primary);
}

.sv-post-tags {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sv-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #ebebeb;
    border-radius: 50px;
    font-size: var(--sv-font-size-xs);
    color: var(--sv-text);
    text-decoration: none;
    transition: all 0.2s ease;
}

.sv-tag:hover {
    background: #ddd;
    color: var(--sv-text);
}

/* Recent Posts */
.sv-recent-posts {
    margin-top: 2rem;
}

.sv-recent-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sv-recent-post {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 2rem;
    background: var(--sv-bg);
}

.sv-recent-tags {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 0.5rem;
    max-width: 160px;
}

.sv-recent-image {
    flex: 0 0 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
}

.sv-recent-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sv-recent-post:hover .sv-recent-image img {
    transform: scale(1.05);
}

.sv-recent-content {
    flex: 1;
}

.sv-recent-content .sv-post-title {
    font-size: 1.05rem;
    margin: 0;
}

/* Pagination */
.sv-pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.sv-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sv-pagination .page-numbers.current {
    background: var(--sv-primary);
    color: #fff;
}

.sv-pagination .page-numbers:hover:not(.current) {
    background: #f5f5f5;
}

.sv-pagination .page-numbers.prev,
.sv-pagination .page-numbers.next {
    width: auto;
    padding: 0 15px;
}

/* No Posts Message */
.sv-no-posts {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border-radius: 8px;
    color: #666;
    margin: 30px 0;
}

/* Responsive adjustments */
@media (max-width: 1023px) {
    .sv-featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .sv-latest-news {
        padding: var(--sv-content-padding);
    }

    .sv-news-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
        
    .sv-featured-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 479px) {
    .sv-filter-select {
        font-size: var(--sv-font-size-md);
    }

    .sv-recent-post {
        padding: .75rem 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        border-radius: 4px;
        gap: .5rem;
    }
}
