/* Premium Dark ViK Últimos Artigos stylesheet */

.vik-artigos-section {
    background-color: #111111;
    font-family: 'Poppins', sans-serif;
    color: #ffffff;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    box-sizing: border-box;
}

.vik-artigos-container {
    width: 100%;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
}

/* Header & action link alignment */
.vik-artigos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
}

.vik-section-title {
    font-size: 38px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    color: #ffffff;
}

.vik-section-link {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
    cursor: pointer;
}

.vik-section-link:hover {
    color: #ED4F00;
}

/* Post grid */
.vik-artigos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 50px;
    align-items: stretch;
}

/* Premium Card Item */
.vik-card-item {
    background-color: #181818;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.3s ease, 
                box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    height: 100%;
}

/* Hover effects matching Linear/Stripe glow */
.vik-card-item:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 
                0 0 15px rgba(237, 79, 0, 0.08);
}

/* Image container */
.vik-card-image-box {
    width: 100%;
    height: 220px;
    position: relative;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    background-color: #121212;
}

.vik-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.vik-card-item:hover .vik-card-img {
    transform: scale(1.04);
}

.vik-card-img-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #141414;
}

.fallback-logo {
    width: 48px;
    height: 48px;
    opacity: 0.8;
}

/* Content wrappers */
.vik-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.vik-card-header-meta {
    margin-bottom: 12px;
}

.vik-card-category {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #ED4F00;
    letter-spacing: 0.1em;
}

.vik-card-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.vik-card-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

/* Excerpt limiting to 3 lines */
.vik-card-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #BDBDBD;
    margin: 0 0 20px 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    flex-grow: 1;
}

/* Metadatas */
.vik-card-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #888888;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
}

.vik-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.vik-card-meta i {
    font-size: 14px;
}

/* Read more link styling */
.vik-card-link-wrapper {
    margin-top: auto;
}

.vik-card-link {
    color: #ED4F00;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;
}

.vik-card-link .arrow {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.vik-card-item:hover .vik-card-link .arrow {
    transform: translateX(4px);
}

/* Pagination wrappers */
.vik-pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.vik-load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 30px;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.vik-load-more-btn:hover {
    border-color: #ED4F00;
    color: #ED4F00;
    transform: translateY(-2px);
}

.vik-load-more-btn .btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ED4F00;
    border-radius: 50%;
    animation: vik-spin 0.8s linear infinite;
    margin-left: 10px;
}

.vik-load-more-btn.loading .btn-spinner {
    display: inline-block;
}

/* Empty State */
.vik-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #141414;
    border-radius: 18px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.vik-empty-state p {
    color: #888888;
    font-size: 16px;
    margin: 0;
}

@keyframes vik-spin {
    to { transform: rotate(360deg); }
}

/* Prefers Reduced Motion settings */
@media (prefers-reduced-motion: reduce) {
    .vik-card-item, 
    .vik-card-img, 
    .vik-card-link .arrow,\n    .vik-load-more-btn {
        transition: none !important;
        transform: none !important;
        animation: none !important;
    }
}

/* Responsive Overrides */
@media screen and (max-width: 1024px) {
    .vik-artigos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 767px) {
    .vik-artigos-grid {
        grid-template-columns: 1fr;
    }
    
    .vik-artigos-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 32px;
    }

    .vik-section-link {
        margin-top: 8px;
    }

    .vik-load-more-btn {
        width: 100%;
    }
}
