.gallery {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.cards {
    position: relative;
    width: 100%;
    padding-bottom: 66.66%; 
    margin: 0;
    border: 1px solid black;
    background-color: transparent;
}

.cards li {
    list-style: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: none; 
}

.cards li.active {
    display: block;
}

.actions {
    margin-top: 15px;
}

button {
    padding: 8px 16px;
    margin: 0 5px;
    cursor: pointer;
    background-color: transparent;
    border: 1px solid black;
}