* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.gallery-section {
    position: relative;
    width: 100%;
    max-height: 500px;
    height: 100vh;
    overflow: hidden;
}

.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.15s ease;
    mix-blend-mode: difference;
    visibility: hidden;
}

.background-images,
.foreground-images {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: transform 2s ease-out;
}

.bg-image {
    position: absolute;
    width: 280px;
    height: 200px;
    background-size: cover;
    background-position: center;
    filter: blur(8px);
    border-radius: 8px;
}

/*.bg-image:nth-child(1) {
    top: 5%;
    left: 30%;
    width: 250px;
    height: 180px;
}
.bg-image:nth-child(2) {
    top: 60%;
    left: 15%;
    width: 200px;
    height: 150px;
}
.bg-image:nth-child(3) {
    top: 10%;
    right: 0%;
    width: 220px;
    height: 160px;
}
.bg-image:nth-child(4) {
    bottom: 5%;
    right: 20%;
    width: 240px;
    height: 170px;
}*/
.bg-image:nth-child(1) {
    top: 5%;
    left: 5%;
    width: 220px;
    height: 160px;
}
.bg-image:nth-child(2) {
    top: 10%;
    left: 35%;
    width: 250px;
    height: 180px;
}
.bg-image:nth-child(3) {
    top: 8%;
    right: 5%;
    width: 230px;
    height: 170px;
}
.bg-image:nth-child(4) {
    top: 45%;
    left: 10%;
    width: 200px;
    height: 150px;
}
.bg-image:nth-child(5) {
    bottom: 20%;
    left: 40%;
    width: 260px;
    height: 190px;
}
.bg-image:nth-child(6) {
    bottom: 10%;
    right: 25%;
    width: 240px;
    height: 170px;
}
.bg-image:nth-child(7) {
    bottom: 5%;
    right: 5%;
    width: 220px;
    height: 160px;
}

.foreground-images {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 40px;
    transition: transform 2s ease-out;
}

.fg-image {
    width: 320px;
    height: 240px;
    background-size: cover;
    background-position: center;
    border-radius: 7px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: transform 2s ease-out;
    position: relative;
}

.fg-image:nth-child(1) {
    transform: translateY(-100px);
}
.fg-image:nth-child(2) {
    transform: translateY(80px);
}
.fg-image:nth-child(3) {
    transform: translateY(-70px);
}
.fg-image:nth-child(4) {
    transform: translateY(80px);
}

/* Fallback for missing images */
.bg-image:not([style*="background-image"]),
.fg-image:not([style*="background-image"]) {
    background-image: url("https://placehold.co/500x400/png");
}
