.lightbox-modal {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; 
    background-color: rgba(0, 0, 0, 0.85); 
    justify-content: center;
    align-items: center;
    flex-direction: column; 
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh; 
    object-fit: contain; 
    animation: zoomIn 0.3s ease-out; 
}

.lightbox-caption {
    margin: 0 auto; 
    position: relative;
    top: -5%;
    text-align: center; 
    color: #ccc; 
    font-size: 1.2em; 
    padding: 10px 20px; 
    max-width: 90%; 
    line-height: 1.5; 
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 10px;
    color: #fff;
    opacity: 0.3;
    font-size: 50px;
    font-weight: bold;
    padding: 0px 20px;
    border-radius: 50%;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10000; 
    background-color: var(--color-dark);
}

.lightbox-close:hover,
.lightbox-close:focus {
    text-decoration: none;
    opacity: 1;
    cursor: pointer;
}

.lightbox-prev, .lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 25px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 50px;
    transition: 0.6s ease;
    user-select: none;
    -webkit-user-select: none;
    background-color: var(--color-dark);
    opacity: 0.4;
}

.lightbox-prev {
    left: 0;
    border-radius: 0 30px 30px 0;
}

.lightbox-next {
    right: 0;
    border-radius: 30px 0 0 30px;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background-color: var(--color-dark);
    opacity: 1;
}

@keyframes zoomIn {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.gallery-full-section {
    padding: 40px 20px;
    text-align: center;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 20px; 
}

.photo-grid .gallery-item {
    background-color: var(--color-white); 
    border-radius: 8px;
    box-shadow: var(--shadow-medium); 
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
}

.photo-grid .gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.photo-grid .gallery-item img {
    width: 100%;
    height: 200px; 
    object-fit: cover; 
    display: block;
    flex-grow: 1; 
}

.gallery-item > *
{ 
    animation-name: zoomIn;
    animation-duration: 0.7s; 
}

.photo-grid .gallery-item .gallery-caption-thumbnail {
    padding: 10px 5px; 
    font-size: 1em; 
    color: var(--color-text-dark); 
    background-color: var(--color-white); 
    text-align: center; 
    border-top: 1px solid #eee; 
    word-wrap: break-word; 
    line-height: 1.3; 
}

@media only screen and (max-width: 768px){
    .lightbox-content {
        margin: 125px 0 75px 0;
    }
}