/* ================ Gallery Styles ================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  padding: 30px;
  max-width: 1600px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  aspect-ratio: 4/3;
  background: #f5f5f5;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: white;
}

.gallery-caption h5 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 5px;
  color: #fff;
}

.gallery-caption p {
  font-size: 0.85rem;
  opacity: 0.9;
  margin: 0;
}

/* ================ Full Screen Modal Styles ================ */
.gallery-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.98);
  z-index: 9999;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 0;
  margin: 0;
}

.gallery-modal.show {
  opacity: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  width: auto;
  height: auto;
}

.gallery-close {
  position: fixed;
  top: 30px;
  right: 30px;
  color: white;
  font-size: 40px;
  font-weight: 300;
  cursor: pointer;
  z-index: 10001;
  background: rgba(0,0,0,0.5);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  border: 2px solid rgba(255,255,255,0.3);
}

.gallery-close:hover {
  background: rgba(43, 43, 43, 0.2);
  transform: scale(1.1);
  border-color: rgba(0, 0, 0, 0.5);
}

/* Hide caption in modal */
.modal-caption {
  display: none;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 992px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px;
  }
  
  .gallery-close {
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 30px;
  }
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
  }
  
  .gallery-close {
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    font-size: 25px;
  }
}

@media (max-width: 576px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    padding: 15px;
  }
  
  .gallery-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}