/*=========================
	GALLERY BLOCK
=========================*/
.block-projects-gallery.boxed .container {
  padding-left: 0;
  padding-right: 0;
}

.block-projects-gallery #gallery-results { 
  width: 100%;
}

.block-projects-gallery .grid {
    margin: 0 auto;
}

.block-projects-gallery .grid-item {
    width: calc(32.35%); /* Adjust based on your columnWidth and desired spacing */
    margin-bottom: 15px; /* Space between rows */
    float: left; 
}

.block-projects-gallery .grid-item img {
    display: block; 
    max-width: 100%;
    height: auto;
    width: 100%;
    min-height: 250px; 
    object-fit: fill;
}

.block-projects-gallery #gallery-filters {
  display: flex;
  padding: 20px 50px;
  align-items: center;
  margin-bottom: var(--space-3);
  justify-content: space-between;
}

.block-projects-gallery #gallery-filters > div {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.block-projects-gallery #gallery-filters select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 8px;
  border: 1px solid var(--color-p);
  border-radius: 5px;

  cursor: pointer;
  min-width: 180px;
  position: relative;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='nav-arrow-down'%3E%3Cpath id='Vector' d='M6 9L12 15L18 9' stroke='%23343434' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  font-size: 14px;
  text-transform: uppercase;
}

.block-projects-gallery .btn-reset {
  border: 0;
  cursor: pointer;
}

.block-projects-gallery .btn-reset:hover {
  background-color: transparent !important;
  color: var(--color-s) !important;
}

.block-projects-gallery .btn-reset:after {
  content: url('../../../img/icons/xmark-dark.svg');
}

.block-projects-gallery .btn-reset:hover:after {
  content: url('../../../img/icons/xmark-dark-s.svg') !important;
}

.block-projects-gallery #gallery-load-more-container {
  display: flex;
  justify-content: center;
}

.block-projects-gallery #gallery-load-more {
  padding: 12px 20px;
  justify-content: center;
  font-size: 18px;
  font-weight: 500;
  background-color: transparent;
  border: 1px solid var(--color-p);
  border-radius: 5px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.block-projects-gallery #gallery-load-more:hover {
  background-color: var(--color-p);
  color: #FFF;
}

.block-projects-gallery #gallery-load-more:after {
  top: 1px;
  position: relative;
  margin-left: var(--space-2);
  content: url('../../../img/icons/plus.svg');
}

.block-projects-gallery #gallery-load-more:hover:after { 
  content: url('../../../img/icons/plus-white.svg');
}

.block-projects-gallery .swiper-button-prev,
.block-projects-gallery .swiper-button-next {
    width: 40px;
}

.block-projects-gallery .swiper-button-prev svg path,
.block-projects-gallery .swiper-button-next svg path {
    stroke: var(--color-p);
}

@media only screen and (max-width: 1415px) {
  .block-projects-gallery #gallery-results {
    padding: 0 20px;
  }
  .block-projects-gallery .grid-item {
    width: calc(33% - 6px);
  }
}

@media only screen and (max-width: 1140px) {
  .block-projects-gallery .grid-item {
    width: calc(33% - 8px);
  }
  .block-projects-gallery #gallery-filters {
    padding: 20px;
  }
  .block-projects-gallery #gallery-filters .title,
  .block-projects-gallery #gallery-filters .btn-reset {
    font-size: 16px !important;
    padding: 0;
  }
  .block-projects-gallery .btn-reset:after {
    top: -1px;
  }
}

@media only screen and (max-width: 991px) {
  .block-projects-gallery .grid-item img { 
    min-height: 200px;
    object-fit: cover;
  }
  .block-projects-gallery #gallery-filters {
    flex-direction: column;
    gap: 15px;
  }
}

@media only screen and (max-width: 850px) {
  .block-projects-gallery #gallery-filters > div {
    flex-direction: column;
    width: 100%;
  }
  .block-projects-gallery #gallery-filters select {
    width: 100%;
  }
}

@media only screen and (max-width: 768px) {
  .block-projects-gallery .grid-item {
    width: calc(50% - 8px);
  }
    .block-projects-gallery .container, .block-projects-gallery .container.boxed {
        padding: var(--space-5) 20px;
    }
}

@media only screen and (max-width: 768px) {
  .block-projects-gallery .grid-item {
    width: calc(50% - 8px);
  }
  .block-projects-gallery #gallery-load-more { 
    font-size: 14px;
    padding: 10px;
    line-height: 1;
  }
}

#project-modal-slider {
  overflow: hidden;
  position: relative;
}
#project-modal-slider img {
  max-height: 600px;
}
#project-modal {
    z-index: 9999;
    opacity: 1;
    overflow: hidden;
    position: fixed !important; /* Keeps the overlay relative to the viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}
.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.modal-content {
  padding: 20px;
}
.modal-dialog {
  max-width: 94%;
  max-height: 90vh;
  overflow-y: auto;
  width: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) !important;
}
.modal-content .content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.modal-content .title {
  margin-bottom: var(--space-4);
}
.custom-close {
    position: absolute;
  top: 20;
  right: 20px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 16px;
  z-index: 999;
}



@media only screen and (max-width: 991px) {
    .modal-dialog { 
        transform: translate(-54%, -54%) !important;
        width: 80%;
        
    }
    .modal-body {
      grid-template-columns: 1fr;
    }
    .modal-dialog {
        max-width: 90%;
    }
}

@media only screen and (max-width: 768px) {
    .modal-body {
        padding: 0;
    }
  .modal-dialog {
    transform: translate(-50%, -50%) !important;
    width: 85%;
  }
  #project-modal-products .item {
      padding: 10px;
  }
  #project-modal-products .item .info .links a {
      font-size: 12px;
  }
}

