.gallery {
    display: grid;
    gap: .5rem; /* Space between images */
    box-sizing: border-box;
}

.gallery .parent-caption {
    width: 100%;
    height: 100%;
    overflow: hidden; /* Hides any overflow */
    display: block!important;
}

.effect-zoom .parent-caption:hover img {
  transform: scale(1.15); /* Adjust the scale as needed */
}

.gallery p {
    display: block; /* To ensure it's a block-level element */
    margin-block-start: 0; /* Sets the top margin (block-start) to 0 */
    margin-block-end: 0; /* Sets the bottom margin (block-end) to 0 */
    margin-inline-start: 0; /* Sets the left margin (inline-start) to 0 */
    margin-inline-end: 0; /* Sets the right margin (inline-end) to 0 */
    unicode-bidi: normal; /* Sets the bidirectional text algorithm to normal */
  }

.gallery img {
    width: 100%;
    height: 100%; /* Ensures the image fills the container */
    object-fit: cover; /* Crops the image to fit the container while preserving the aspect ratio */
    transition: transform 0.5s ease;
  }

.grid-auto {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Adjust minmax value as needed */
  grid-template-rows: 250px; /* Creates 3 rows of automatic height */
}

.grid-1 {
  grid-template-columns: repeat(1, auto); /* Adjust minmax value as needed */
  grid-template-rows: auto;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(300px, 1fr)); /* Adjust minmax value as needed */
  grid-auto-rows: 350px;
}

/*
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
grid-template-rows: repeat(3, auto);
*/