.gallery {  
    display: grid;  
    justify-content: center;
    align-items: center;

    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));

    gap: 20px;  
    padding: 20px;  
    list-style: none;
}

.gallery-item {  
    border-radius: 8px;  
    overflow: hidden;  
    max-width: 200px;
    height: 250px;
    box-sizing: border-box;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);  
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.gallery-image{  
    width: 100%;  
    object-fit: cover;  
    transition: transform 0.3s ease;  
}
.title-gal {
    text-align: center; 
    font-size: 20px; 
    width: 180px;
    margin-top: 2px; 
    color: #550505;
}
.descr-gal {
    text-align: center; 
    font-size: 16px; 
    margin-top: 2px; 
    color: #333333;
}
.gallery-image {  
    max-width:90vw; 
    max-height:80vh; 
    display:block; 
    margin: 0 auto;
}

/* Контейнер модалки */
.basicLightbox__placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.95); /* білий фон з легким прозорим ефектом */
  padding: 20px;
}

/* Вміст всередині модалки */
.basicLightbox__placeholder div {
  text-align: center;
  justify-content: center;
  max-width: 80vw;
}

.title-modal-gal {
    width: 100%; 
    text-align: center; 
    color: #550505;
    font-size: 24px;
}

.modal-container {
  text-align: center;
  background-color: #ffffff;
  padding: 20px;
  max-width: 800px; 
  width: 100%;      
  overflow-x: auto; 
}
.modal-photos-wrapper {
  display: flex;
  gap: 10px;
  overflow-x: auto;        
  scroll-snap-type: x mandatory;
  flex-wrap: nowrap;       
  justify-content: flex-start;
}

.modal-photo {
  flex: 0 0 auto;         
  width: auto;            
  height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  scroll-snap-align: start; /* фото "прилипає" по лівому краю */
}

.modal-photos-wrapper::-webkit-scrollbar {
  height: 8px;
}

.modal-photos-wrapper::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 4px;
}

