/* ===== Gallery Styles ===== */
.single_gallery {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.single_gallery:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.gallery_image {
  position: relative;
  overflow: hidden;
  height: 300px;
}

.gallery_image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.single_gallery:hover .gallery_image img {
  transform: scale(1.1);
}

.gallery_overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.single_gallery:hover .gallery_overlay {
  opacity: 1;
}

.gallery_icon {
  width: 60px;
  height: 60px;
  line-height: 60px;
  text-align: center;
  background: #fff;
  border-radius: 50%;
  color: #333;
  font-size: 24px;
  transition: all 0.3s ease;
}

.gallery_icon:hover {
  background: #007bff;
  color: #fff;
  transform: rotate(90deg);
}

.gallery_content {
  padding: 20px;
  background: #fff;
}

.gallery_content h5 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}

.gallery_content p {
  font-size: 14px;
  color: #777;
  margin: 0;
}

/* ===== Modal Styles ===== */
.gallery-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.95);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.gallery-modal-content {
  position: relative;
  margin: auto;
  padding: 0;
  width: 90%;
  max-width: 1200px;
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.gallery-modal-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.gallery-modal-caption {
  margin: 20px auto;
  text-align: center;
  color: #fff;
  padding: 15px;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  backdrop-filter: blur(10px);
}

.gallery-close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #fff;
  font-size: 50px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 10000;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.gallery-close:hover,
.gallery-close:focus {
  color: #ff4444;
  transform: rotate(90deg);
}

.gallery-prev,
.gallery-next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  margin-top: -30px;
  padding: 16px 20px;
  color: white;
  font-weight: bold;
  font-size: 30px;
  transition: 0.3s ease;
  border-radius: 0 5px 5px 0;
  user-select: none;
  background: rgba(0, 0, 0, 0.5);
  text-decoration: none;
  z-index: 10000;
}

.gallery-next {
  right: 0;
  border-radius: 5px 0 0 5px;
}

.gallery-prev:hover,
.gallery-next:hover {
  background-color: rgba(0, 0, 0, 0.8);
  color: #007bff;
}

/* ===== Responsive Styles ===== */
@media screen and (max-width: 768px) {
  .gallery-modal-content {
    width: 95%;
    padding-top: 20px;
  }

  .gallery-close {
    top: 10px;
    right: 15px;
    font-size: 35px;
  }

  .gallery-prev,
  .gallery-next {
    font-size: 20px;
    padding: 10px 15px;
  }

  .gallery_image {
    height: 250px;
  }

  .gallery-modal-caption {
    font-size: 14px;
    padding: 10px;
  }
}

@media screen and (max-width: 480px) {
  .gallery_image {
    height: 200px;
  }

  .gallery-modal {
    padding-top: 40px;
  }
}
