/*
 * Mosaic Gallery Layout
 * --------------------------------------------------
 */

/* Gallery container using CSS columns for a mosaic effect */
.my-photo-gallery {
    column-count: 3;           /* Adjust the number of columns as needed */
    column-gap: 16px;          /* Space between the columns */
    padding: 10px;             /* Padding around the gallery */
}

/* Each gallery item flows as an inline block within the columns */
.my-gallery-item {
    display: inline-block;     /* Allows the items to flow within the columns */
    width: 100%;               /* Ensure it takes the full column width */
    margin-bottom: 16px;       /* Spacing between items vertically */
    background: #fff;          /* Optional background color */
}

/* Responsive images within each gallery item */
.my-gallery-item img {
    width: 100%;               /* Scale image to fit container width */
    height: auto;              /* Maintain aspect ratio */
    display: block;
    cursor: pointer;
	border-radius: 8px;
}

/* Responsive adjustments: reduce column count on smaller screens */
@media (max-width: 768px) {
    .my-photo-gallery {
        column-count: 2;
    }
}

@media (max-width: 480px) {
    .my-photo-gallery {
        column-count: 1;
    }
}

/*
 * LIGHTBOX STYLES
 * --------------------------------------------------
 */

/* Lightbox Overlay */
#my-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8); /* Dark overlay background */
    display: none;              /* Hidden by default; shown via JS */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Lightbox Content Container */
.my-lightbox-content {
    position: relative;         /* Establishes positioning context for credit box */
    max-width: 80%;             /* Maximum width of the content */
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
}

/* Lightbox Image Container */
.my-lightbox-image-container {
    max-height: calc(100vh - 40px); /* Adjust to available viewport height (40px for padding) */
    display: flex;
    justify-content: center;        /* Center image horizontally */
    align-items: center;            /* Center image vertically */
    overflow: auto;                 /* Allow scrolling if necessary */
}

/* Lightbox Image */
#my-lightbox-image {
    max-width: 90vw;          /* Image cannot be wider than the viewport */
    max-height: 90vh;         /* Image cannot be taller than the viewport */
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

/* 
 * PHOTO CREDIT BOX - Positioned in bottom-right of the image
 * --------------------------------------------------
 */
#my-lightbox-credit {
    position: absolute;
    bottom: 10px;             /* Adjust as needed for spacing from the bottom */
    right: 10px;              /* Adjust as needed for spacing from the right */
    background-color: #333;   /* Dark background */
    color: #fff;              /* Light text */
    padding: 8px;
    font-size: 1rem;
    margin: 0;                /* Remove default margins */
    width: auto;              /* Let content determine width */
    border-radius: 4px;       /* Optional: Slightly round edges */
    opacity: 0.9;             /* Optional: Slight transparency for a modern feel */
}

/* Ensure links inside the credit box are visible */
#my-lightbox-credit a {
    color: #fff;              /* Match text color */
    font-weight: bold;        /* Make the link text bold */
    text-decoration: none;    /* Remove underline */
}

/* Optional: Add underline on hover */
#my-lightbox-credit a:hover {
    text-decoration: underline;
}
