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

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

/* Lightbox Styling */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); /* Dark semi-transparent overlay */
    backdrop-filter: blur(10px); /* Adds a blur effect to the background */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0; /* Start hidden */
    transition: opacity 0.4s ease; /* Smooth fade-in effect */
}

.lightbox.active {
    display: flex;
    opacity: 1; /* Fade-in on activation */
}

.lightbox-content {
    position: relative;
    max-width: 70%; /* Restrict the width */
    max-height: 80%; /* Restrict the height */
    text-align: center;
    background: #9d4444; /* White background for content */
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3); /* Subtle shadow */
    padding: 20px;
    animation: zoomIn 0.4s ease; /* Zoom-in animation */
}

.lightbox-content img {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 5px; /* Rounded corners for the image */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Shadow on the image */
    margin-bottom: 15px;
}

.lightbox-text {
    color: #e7dbdb;
    font-family: "Arial", sans-serif;
}

.lightbox-text h3 {
    margin: 10px 0;
    font-size: 1.8rem;
    font-weight: bold;
    color: #444;
}

.lightbox-text p {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 30px;
    color: #333;
    cursor: pointer;
    background: #fff;
    border: 2px solid #333;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition:
        background 0.3s ease,
        transform 0.2s;
}

.close-btn:hover {
    background: #333;
    color: #fff;
    transform: scale(1.1);
}

/* Previous and Next Buttons */
.lightbox-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.lightbox-controls button {
    background: rgba(51, 51, 51, 0.8); /* Semi-transparent background */
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5); /* Subtle border */
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition:
        background 0.3s ease,
        transform 0.2s,
        border-color 0.3s ease;
}

.lightbox-controls button:hover {
    background: transparent; /* Fully transparent background on hover */
    color: #fff; /* Keep text white */
    border-color: #fff; /* Make the border fully white on hover */
    transform: scale(1.1); /* Slight scaling effect */
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
    }
    to {
        transform: scale(1);
    }
}