/* Bën të gjitha kutitë e projektit të kenë një lartësi minimale */
.project-cell {
  display: flex;
  flex-direction: column;
  margin-bottom: 30px; /* hapësira poshtë */
}

/* Kutia e brendshme e imazhit zgjerohet, dhe mbulon plot hapësirën */
.project-cell img {
  width: 100%;
  height: 240px;       /* fikso një lartësi sipas dëshirës */
  object-fit: cover;   /* mbush me qetësi */
  border-radius: 4px;  /* nëse doni këndë të rrumbullakosur */
}

/* 1. Bëjmë që .line të jetë inline-flex në vend të flex */
.lightbox-gallery .line {
  display: inline-flex !important;
  flex-wrap: wrap;
  justify-content: center;  /* qendërzon fënijët e tij */
}

/* 2. Qendërsojme inline-flex container-in në faqen prind */
.lightbox-gallery {
  text-align: center;
}

/* Rrisim pak gjerësinë e çdo kolone në ~31% për tre kolona */
.lightbox-gallery .project-cell {
  flex: 0 0 calc(31% - 20px);
  margin: 10px;
  box-sizing: border-box;
}

/* Rrisim lartësinë e imazhit */
.lightbox-gallery .project-cell img {
  width: 100%;
  height: 250px;    /* nga 200px në 250px */
  object-fit: cover;
  display: block;
}

.gallery-image-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    color: rgba(255, 255, 255, 0);
    padding: 1em;
    transition: all .2s ease;
    font-weight: 600;
    max-width: calc(100% - 9em);
    line-height: 1.25;
    text-align: center;
    box-sizing: border-box;
}
.gallery-image-caption::before,
.gallery-image-caption::after {
    content: '';
    position: absolute;
    background: rgba(0, 0, 0, .2);
    width: 100%;
    height: 100%;
    padding: 1em;
    transition: all .3s ease-in-out;
    opacity: 0;
    z-index: -1;
    right: 100%;
    bottom: 100%;
}
.gallery-image-caption::after {
    left: 100%;
    top: 100%;
}
.gallery-image-caption-visible {
    color: rgba(255, 255, 255, 1);
    text-shadow: 0 0 1px rgba(0,0,0,.2);
    transition: all .2s ease .3s;
}
.gallery-image-caption-visible::before,
.gallery-image-caption-visible::after {
    opacity: 1;
}
.gallery-image-caption-visible::before {
    right: -1.5em;
    bottom: -1.5em;
}
.gallery-image-caption-visible::after {
    left: -1.5em;
    top: -1.5em;
}

.gallery {
    column-gap: 0;
    margin: 100px;
}

@media (min-width: 480px) {
.gallery {
  column-count: 2;
}
}

@media (min-width: 1260px) {
.gallery {
  column-count: 3;
}
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    /*margin: 0 -15px;  Adjust based on your grid system's gutter */
    margin: 0 auto;
    max-width: 71rem;
}

.gallery > div {
    padding: 15px; /* Adjust based on your grid system's gutter */
    box-sizing: border-box;
}

/* Keep all your existing gallery-image styles */
.gallery-image {
    position: relative;
    margin: 0;
    padding: 0;
    width: 100%; /* Changed from fixed width to 100% */
    height: auto; /* Changed from fixed height to auto */
    overflow: hidden;
}

.gallery-image img {
width: 100%;
height: auto;
display: block;
}

.gallery-image.portrait {
position: relative;
width: 100%;
aspect-ratio: 3 / 4; /* kjo është e mbështetur në shumicën e shfletuesve modernë */
overflow: hidden;
}

.gallery-image.portrait img {
width: 100%;
height: 100%;
object-fit: cover;
}

html:not(.touch) .gallery-image {
overflow: hidden;
}

html:not(.touch) .gallery-image:hover::before {
border-width: 16px;
}

html:not(.touch) .gallery-image:hover::after {
border-width: 32px;
}

html:not(.touch) .gallery-image:hover .gallery-image-caption {
color: rgba(255, 255, 255, 1);
}

.touch .gallery-image .gallery-image-caption {
position: absolute;
top: auto;
bottom: 2em;
color: rgba(255,255,255,1);
}

/* Magnific Popup Styles */
.mfp-with-zoom .mfp-container,
.mfp-with-zoom .mfp-bg {
opacity: 0;
backface-visibility: hidden;
transition: all 0.3s ease-out;
}

.mfp-with-zoom .mfp-bg {
background-color: rgba(0,0,0,.9);
}

.mfp-with-zoom.mfp-ready .mfp-container,
.mfp-with-zoom.mfp-ready .mfp-bg {
opacity: 1;
}

.mfp-with-zoom.mfp-removing .mfp-container,
.mfp-with-zoom.mfp-removing .mfp-bg {
opacity: 0;
}

.mfp-img {
padding: 0;
}

.mfp-figure:after {
top: 0;
bottom: 0;
}

.mfp-container {
padding: 0;
}

.mfp-content {
overflow: hidden;
}

.mfp-bottom-bar {
top: auto;
bottom: 0;
margin-top: 0;
}

.mfp-title {
position: absolute;
top: auto;
bottom: 2em;
color: rgba(255,255,255,1);
text-shadow: 0 0 1px rgba(0,0,0,.2);
}

.mfp-arrow {
opacity: 1;
margin-top: 0 !important;
width: 20%;
height: 30%;
transform: translateY(-50%);
}

.mfp-arrow:before,
.mfp-arrow:after {
margin: 0;
border: none;
width: 2rem;
height: 2rem;
transform: rotate(-45deg) translate(-50%,-100%);
opacity: 1;
top: 50%;
left: 50%;
transition: all .15s;
}

.mfp-arrow-left {
left: 0;
}

.mfp-arrow-left:before,
.mfp-arrow-left:after {
border-top: 2px solid white;
border-left: 2px solid white;
margin-left: 2rem;
}

.mfp-arrow-left:hover:after {
margin-left: 0;
}

.mfp-arrow-right {
right: 0;
}

.mfp-arrow-right:before,
.mfp-arrow-right:after {
border-right: 2px solid white;
border-bottom: 2px solid white;
margin-left: 2rem;
}

.mfp-arrow-right:hover:after {
margin-left: 0;
}

button.mfp-close {
opacity: 1;
margin-top: 0 !important;
width: 20%;
height: 30%;
font: 0/0 serif;
text-shadow: none;
color: transparent;
}

button.mfp-close:before,
button.mfp-close:after {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 2rem;
height: 2rem;
opacity: 1;
transition: all .15s;
transform-origin: 0 0;
border-top: 2px solid white;
border-left: 2px solid white;
}


button.mfp-close:before { transform: rotate(-45deg); }
button.mfp-close:after { transform: rotate(135deg); }
button.mfp-close:hover:before { transform: rotate(135deg); }
button.mfp-close:hover:after { transform: rotate(315deg); }
button.mfp-close:active { transform: scale(.95); }

.image-testimonial-small {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 15px;
}
