.cards{ 
    margin: 1rem 0; 
}

.cards-container{
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
    justify-content: center;
    gap: 1rem;
}

.card{
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    border-radius: 5px;
}

.card-box {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
    background: var(--body-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 10px;
}

.scroll-container {
    position: absolute;
    animation: scrollUpList 16s linear infinite;
    animation-play-state: running;
}


.scroll-text {
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    padding: 15px 3px;
    color: #333;
    text-decoration: none;
}

.scroll-text span:nth-child(2){
    padding: 5px;
    font-size: 14px;
}

.scroll-text span:nth-child(3){
    font-size: 10px;
    color: var(--gray);
}

.scroll-container:hover { animation-play-state: paused; }
@keyframes scrollUpList {
    0% {
        top: 100%;
    }
    100% {
        top: -250%;
    }
}


.link-box{
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    gap: 2px;
    padding: 5px;
    width: 100%;
    background: var(--light-gray);
}

.link-box a{
    width: 100%;
    text-decoration: none;
    color: var(--dark-color);
    padding: 5px 1rem;
}

.link-box a:hover{ background: var(--body-color); }



@media (max-width: 970px){
    .cards-container{
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .cards-container>div:nth-child(3){ grid-column: span 2; }
}

@media (max-width: 520px){
    .cards-container{
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    .card{ width: 100%; }
}