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

.spotlight-image-container {
    z-index: 1000;
    width: 400px;
    height: auto;
    display: flex;
    position: fixed;
}

.spotlight {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 255, 0.9); 
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}


.spotlight img {
    max-width: 90%;
    max-height: 90%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.spotlight.show {
    display: flex;
    opacity: 1;
}

.spotlight img.show {
    opacity: 1;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px;
    padding-left: 50px;
    padding-right: 50px;
    padding-top: 120px;
    padding-bottom: 80px;
    justify-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    height: auto;
    cursor: pointer; 
    transition: box-shadow 0.3s, transform 0.3s, opacity 1s ease-out; 
}

.item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    transition: filter 0.5s, box-shadow 0.5s;
}

.item:hover img {
    filter: brightness(0.8);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    text-align: center;
    border-radius: 0 0 8px 8px;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.item:hover .title {
    opacity: 1;
    transform: translateY(0);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.item:hover .overlay {
    opacity: 0.5;
}

.placeholder {
    border-radius: 8px;
    height: 0;
    padding-bottom: 100%; 
}

/* Responsive design */
@media (max-width: 1200px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .gallery {
        grid-template-columns: 1fr;
    }
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
