body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

h1 {
    text-align: center;
    margin-top: 20px;
}

.menu {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.menu a {
    margin: 0 10px;
    text-decoration: none;
    color: #000;
    font-weight: bold;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 10px;
}

.gallery-item {
    border: 1px solid #ccc;
    padding: 0;
    text-align: center;
    width: 200px;
    height: 200px;
    box-sizing: border-box;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.gallery-item img {
    position: absolute;
    top: 50%;
    left: 50%;
    height: 100%;
    width: auto;
    transform: translate(-50%, -50%);
    cursor: pointer;
}

.gallery-item img.portrait {
    width: 100%;
    height: auto;
}

.gallery-item img.landscape {
    height: 100%;
    width: auto;
}

.gallery-item p {
    margin: 0;
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    background-color: rgba(0, 128, 0, 0.7);
    color: white;
    padding: 5px;
    display: none;
    text-align: center;
    cursor: pointer;
}

.gallery-item:hover p {
    display: block;
}

#popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid #ccc;
    padding: 10px;
    background: #fff;
    z-index: 1000;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    text-align: center;
}

#popup img {
    max-width: 90vw;
    max-height: 90vh;
}

#popup #popupSref {
    background-color: rgba(0, 128, 0, 0.7);
    color: white;
    padding: 5px;
    margin-top: 10px;
    cursor: pointer;
}

#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
}

.pagination {
    display: inline-block;
    margin-top: 10px;
}

.pagination a {
    margin: 0 5px;
    text-decoration: none;
    color: #000;
    font-weight: bold;
}

.pagination a.active {
    text-decoration: underline;
}

.limit-selector {
    margin-top: 10px;
    text-align: center;
}


