/* regular styles */
.titlex {
  display: block;
}

/* must come later */
@media (orientation: portrait) {
  .titlex {
    display: none;
  }
}


.tag-list {
    white-space: normal;
}

/* Ensure the images are displayed in a vertical masonry layout using CSS Grid */
.post-images {
    width: 100%;
    display: grid;                           /* Use grid for masonry layout */
    gap: 10px;                               /* Space between images */
}

.post-images-1 {
    grid-template-columns: repeat(1, 1fr);   /* Create 1 column */
}

.post-images-2 {
    grid-template-columns: repeat(2, 1fr);   /* Create 2 columns */
}

.post-images-3 {
    grid-template-columns: repeat(3, 1fr);   /* Create 3 columns */
}

.image-cell a {
    border-bottom: none;
}

/* Photo Gallery Container */
.photo-gallery {
    /* Multi-column layout for masonry effect */
    column-gap: 10px;               /* Space between columns */
    padding: 10px;
}

/* Image Cells */
.image-cell {
    break-inside: avoid;            /* Prevent items from breaking between columns */
    overflow: hidden;               /* Ensure no overflow outside the image container */
    position: relative;             /* Allow for positioning the pseudo-element */
}

/* Image Style */
.image-cell img {
    width: 100%;                    /* Ensure the image fills the width of the column */
    height: auto;                   /* Maintain aspect ratio */
    border-radius: 5px;             /* Rounded corners */
    object-fit: cover;              /* Ensure the image covers the container without distortion */
    box-sizing: border-box;         /* Include border in the element's box model */
}

/* Lightbox styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    overflow: hidden;
    z-index: 1000;
    text-align: center;
}

/* Show lightbox when targeted */
.lightbox:target {
    display: flex;
}

/* Lightbox content (centered) */
.lightbox-content {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    top: 50%;
    transform: translateY(-50%);
}

/* Close button in the top right corner */
.lightbox-close {
    position: fixed;
    top: 10px;
    right: 20px;
    color: white;
    font-size: 30px;
    text-decoration: none;
    z-index: 1001;
    border-bottom: none;
    font-weight: 100;
}

/* Navigation arrows (previous/next) - Positioned at the edge of the screen */
.lightbox-prev,
.lightbox-next {
    font-weight: 100;
    position: fixed;
    top: 50%;
    font-size: 30px;
    color: white;
    text-decoration: none;
    transform: translateY(-50%);
    z-index: 1001;  /* Ensure it's on top of other content */
    border-bottom: none;
    -webkit-user-select: none;
    user-select: none;
}

.lightbox-prev {
    left: 20px;  /* Position at the left edge */
}

.lightbox-next {
    right: 20px;  /* Position at the right edge */
}

/* Image styling */
.lightbox img {
    max-width: 100%;
    max-height: 100vh;
    object-fit: contain;
}

/* Optional: Fade-in effect */
.lightbox-content {
    animation: fadeIn 0.3s ease-in-out;
}

a:hover {
    cursor:pointer;
}

