.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    aspect-ratio: 16 / 9;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Lightbox Styles */
.gallery-lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
    transform: translateY(-50%);
    pointer-events: none;
}

.lightbox-btn {
    color: #fff;
    font-size: 50px;
    cursor: pointer;
    user-select: none;
    background: none;
    border: none;
    pointer-events: auto;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.lightbox-btn:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.lightbox-caption {
    color: #ccc;
    margin-top: 15px;
    text-align: center;
}

/* Pagination Styles */
.gallery-pagination {
    display: flex;
    justify-content: center;
    gap: 20px;
    /* Generous spacing as requested */
    margin-top: 50px;
    padding-bottom: 30px;
}

.page-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    border-color: #99cc33;
    color: #99cc33;
}

.page-link.active {
    background: #99cc33;
    color: #05070a;
    border-color: #99cc33;
    box-shadow: 0 4px 15px rgba(153, 204, 51, 0.3);
}