/* Image Library Styles */

.image-library {
    padding: 60px 20px;
    background-color: #f9fafb;
    min-height: 80vh;
}

.image-library h1 {
    text-align: center;
    color: #2e7d32;
    margin-bottom: 40px;
    font-size: 2.8rem;
    font-weight: 700;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .image-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 15px;
    }

    .container {
        padding: 0px;
    }
    .image-library h1 {
        font-size: 30px;
    }
}

@media (max-width: 480px) {
    .image-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .image-library h1 {
        font-size: 25px;
        margin-bottom: 0px;
    }
    .image-library {
        padding: 30px 10px;
    }
}

.image-item {
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.image-item:hover {
    transform: scale(1.05);
}

.library-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Lightbox Modal */

.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 1500;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.7);
}

.lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 15px 0;
    font-size: 1.2rem;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
}

/* Lightbox Navigation Buttons */
.lightbox-nav {
    position: absolute;
    top: 50%;
    color: white;
    font-size: 15px;
    font-weight: bold;
    background: rgba(0,0,0,0.3);
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    user-select: none;
    border-radius: 5px;
    transform: translateY(-50%);
    transition: background 0.3s ease;
    z-index: 1600;
}

.lightbox-nav:hover {
    background: rgba(0,0,0,0.6);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}
