* {
    box-sizing: border-box;
}

body {
    background: url('bg.png') repeat;
    padding: 0;
    margin: 0;
    font-size: 16px;
    overscroll-behavior: none;
    font-family: Georgia, 'Times New Roman', Times, serif;
}

h1 {
    font-size: 2rem;
    line-height: 2.2rem;
    margin: .5rem;
    font-family: "Nothing You Could Do", cursive;
    font-weight: 400;
    font-style: normal;
    text-align: center;
}

h2 {
    font-size: 1.4rem;
    line-height: 1.6rem;
    margin: .5rem;
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-weight: 400;
}

.open {
    background: #000000;
}

.open .wrap {
    position: relative;
    height: 100dvh;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity 2000ms, height 10000s;
}

.open .wrap.visible {
    opacity: 1;
}

.down {
    position: absolute;
    bottom: 18px;
    left: calc(50% - 16px);
    width: 32px;
    height: 32px;
    filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(253deg) brightness(103%) contrast(101%);
    animation: pointdown 1000ms infinite;
}

.zoom {
    color: #333333;
    font-size: .9rem;
    padding: 30px;
    text-align: center;
    letter-spacing: 2px;
}

.items {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    padding: 10vh 0;
    gap: 10vh;
}

.item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    opacity: 1;
    position: relative;
}

.item .wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-sizing: border-box; /* Ensure padding/borders are included in size calculations */
}

.item img {
    border: 3px solid #ffffff; /* White border around image */
    padding: 3px;
    background-color: #000000;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.5);
    object-fit: contain; /* Maintain aspect ratio */
    max-height: 100%;
    max-width: 100%;
}

.item .card {
    margin-top: 24px;
    padding: 12px 12px 24px;
    font-size: .7rem;
    font-style: italic;
    background: #ffffff;
    box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.2);
    letter-spacing: 2px;
    line-height: 1.2rem;
    color: #333333;
    max-width: 50%;
}

.item .card .name {
    font-size: .9rem;
}

/* Size classes with max-width and max-height */
.vertical .size-300 {
    height: 220px;
}

.vertical .size-400 {
    height: 280px;
}

.vertical .size-500 {
    height: 320px;
}

.vertical .size-600 {
    height: 360px;
}

.horizontal .size-300 {
    width: 220px;
}

.horizontal .size-400 {
    width: 280px;
}

.horizontal .size-500 {
    width: 320px;
}

.horizontal .size-600 {
    width: 360px;
}

/* Orientation classes */
.horizontal .image {
    flex-direction: row; /* Ensure horizontal images align properly */
}

.vertical .image {
    flex-direction: column; /* Ensure vertical images align properly */
}

.position-left {
    align-items: start;
}

.position-center {
    align-items: center;
}

.position-right {
    align-items: end;
}

.close {
    min-height: 100vh;
    background: #000000;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes pointdown {
    0% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(8px);
    }
    100% {
        transform: translateY(0);
    }
}
