:root {
    --bg-color: #f4f4f4;
    --card-bg: #ffffff;
    --border-color: #ddd;
    --nav-bg: #333;
    --nav-text: #fff;
}

body {
    font-family: sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    padding: 20px;
}

h1 {
    text-align: center;
    color: #333;
}

/* --- Navigation Bar --- */
.nav-bar {
    background-color: var(--nav-bg);
    color: var(--nav-text);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-bar a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 20px;
    background-color: #555;
    border-radius: 4px;
}

.nav-bar a:hover {
    background-color: #777;
}

.nav-bar a.disabled {
    opacity: 0.3;
    pointer-events: none;
    cursor: default;
}

/* --- Gallery Grid Layout --- */
.group-container {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.card-pair {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 2px dashed var(--border-color);
    padding-bottom: 30px;
    margin-bottom: 30px;
    justify-content: center;
    gap: 20px;
}

.card-pair:last-child {
    border-bottom: none;
}

.card-item {
    flex: 1;
    min-width: 300px;
    max-width: 45%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.img-wrapper {
    width: 100%;
    height: 400px; /* Keeps layout consistent */
    display: flex;
    align-items: center;
    justify-content: center;
    /* No background or border here, as requested */
}

/* Thumbnail Images */
.img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; 
    display: block;
    cursor: pointer; /* Shows a hand cursor so user knows it's clickable */
    transition: transform 0.2s ease;
}

.img-wrapper img:hover {
    transform: scale(1.02); /* Slight zoom effect on hover */
}

.label {
    margin-bottom: 5px;
    font-weight: bold;
    color: #666;
    text-transform: uppercase;
    font-size: 0.8rem;
}

/* --- Full Screen Modal (Lightbox) --- */
.modal {
    display: none; /* Hidden by default */
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgb(0,0,0); /* Solid Black Background */
    cursor: pointer; /* Click anywhere to close */
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 95%; /* Leave a small margin */
    max-height: 95%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .card-item { max-width: 100%; min-width: 100%; }
    .img-wrapper { height: auto; min-height: 200px; }
    .img-wrapper img { max-height: 500px; }
}