body {
    font-family: sans-serif;
    margin: 20px;
}
.container {
    display: flex;
    align-items: center;
    #grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px;
}
.folder-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    width: 256px;
    box-sizing: border-box;
    transition: box-shadow .3s ease;
}
.folder-card:hover {
  box-shadow: 0 0 10px #888;
}
.folder-card img {
    width: 100%;
    height: 200px; /* Fixed height for covers */
    object-fit: cover; /* Ensures images fill the space nicely */
    display: block;
}
.folder-card h3 {
    margin: 10px;
    font-size: 1.2em;
}
.folder-card p {
    margin: 0 10px 10px;
    font-size: 0.9em;
    color: #555;
}
header {
    display: flex;
    gap: 1em;
}
main {
    margin-top: 2em;
}
footer {
    color: #888;
    padding: 1.5em 0.6em 1em 0.6em;
}
.back-link {
    border: 1px solid #bbb;
    border-radius: 5px;
    padding: 4px 8px;
    text-decoration: none;
    color: #222;
    background-color: #CAE5F7;
}
.back-link:hover {
    background-color: #2c96de
}
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}
.image-grid img {
    width: 100%; /* Ensure images take up the full width of the grid cell */
    height: 200px; /* Set a fixed height */
    object-fit: cover; /* Maintain aspect ratio and cover the grid cell */
    cursor: pointer; /* Change cursor to pointer on hover */
    box-sizing: border-box;
    transition: box-shadow .3s ease;
}
.image-grid img:hover {
    box-shadow: 0 0 10px #888;
}
/* Lightbox styles */
#lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}
#lightbox img {
    max-width: 90%;
    max-height: 90%;
}
#lightbox img.landscape {
    min-width: 60%;
}
#lightbox .close, #lightbox .nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 2em;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 50%;
}
#lightbox .close {
    right: 20px;
}
#lightbox .nav.prev {
    left: 20px;
}
#lightbox .nav.next {
    right: 60px;
}