.gallery,
.gallery *{
    margin: 0; padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
    text-transform: capitalize;
    transition:all .2s cubic-bezier(.34,1.12,.68,1.31);
}

.gallery{
    min-height: 100vh;
    background:#eee;
    padding-bottom: 100px;
}

.gallery .controls{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0.4rem;
    max-width: 1100px;
    margin: 2.4rem auto 1.2rem;
    padding: 0 1.6rem;
    border-bottom: 2px solid #800000;
}

.gallery .controls .buttons{
    min-height: 48px;
    flex: 0 0 auto;
    padding: 0.9rem 1.6rem;
    border: 1px solid transparent;
    border-bottom: 2px solid transparent;
    border-radius: 4px 4px 0 0;
    margin-bottom: -2px;
    background: transparent;
    color: #5a1010;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.35;
    text-align: center;
    white-space: nowrap;
    transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.gallery .controls .buttons[aria-selected="true"] {
    border-color: #800000;
    border-bottom-color: #fffdd0;
    background: #fffdd0;
    color: #5a1010;
}

.gallery .controls .buttons:hover {
    background: rgba(128, 0, 0, 0.08);
}

.gallery .controls .buttons:focus-visible {
    position: relative;
    z-index: 1;
    outline: 3px solid #5b4300;
    outline-offset: -3px;
}

.gallery-status {
    min-height: 2.4rem;
    margin: 0 1.6rem 1.2rem;
    color: #333;
    font-size: 14px;
    text-align: center;
}

.gallery .image-container{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.gallery .image-container .image{
    aspect-ratio: 7 / 5;
    width: min(350px, 100%);
    height: auto;
    overflow: hidden;
    border:15px solid #fff;
    box-shadow: 0 3px 5px rgba(0,0,0,.3);
    margin: 20px;
}

@media (max-width: 600px) {
    .gallery .controls {
        justify-content: stretch;
        gap: 0;
        margin-top: 1.6rem;
        padding: 0 1rem;
    }

    .gallery .controls .buttons {
        flex: 1 1 0;
        min-width: 0;
        padding: 0.7rem 0.4rem;
        font-size: 13px;
        white-space: normal;
    }

    .gallery .image-container {
        padding: 0 12px;
    }

    .gallery .image-container .image {
        margin: 10px 0;
        border-width: 8px;
    }
}

.gallery .image-container .image img{
    height: 100%;
    width:100%;
    object-fit: cover;
}

.gallery .image-container .image:hover img{
    transform: scale(1.4);
}