body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    background-color: #f0f0f0;
}

.image-gallery {
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.grid-sizer,
.gallery-item {
    width: 16.6666%;
    box-sizing: border-box;
    padding: 0px;
}

.gallery-item {
    height: auto;
    object-fit: contain;
    margin-bottom: 0px;
    display: block;
    background-color: #fff;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease;
    position: relative;
    cursor: pointer;
    z-index: 1;
}

.gallery-item:hover {
    transform: scale(1.15);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

/* Fullscreen Modal */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: hidden; 
    background-color: rgba(0,0,0,0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    width: 85vw;
    height: 85vh;
    object-fit: contain;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 20px rgba(0,0,0,0.5));
}

.modal.show .modal-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

.close-btn:hover,
.close-btn:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}