/* Gallery Slider Styles */
.gallery-grid {
  display: flex;
  flex-wrap: wrap;
}

.gallery__item {
  padding: 10px;
  display: flex;
}

.gallery-card {
  width: 100%;
  height: 300px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  background: #f8f9fa;
}

.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.gallery__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-thumbnail {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-overlay {
  opacity: 1;
}

.gallery-card:hover .gallery__image {
  transform: scale(1.05);
}

.gallery-play-btn {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #333;
  transition: all 0.3s ease;
}

.gallery-play-btn:hover {
  background: #fff;
  transform: scale(1.1);
}

.gallery-play-btn i {
  margin-left: 2px; /* Play icon için hafif sağa kaydırma */
}

/* Video Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  display: none;
  width: 100%;
  height: 100%;
  overflow: hidden;
  outline: 0;
}

.modal.show {
  display: block !important;
}

.modal-dialog {
  position: relative;
  width: auto;
  margin: 0.5rem;
  pointer-events: none;
  display: flex;
  align-items: center;
  min-height: calc(100% - 1rem);
}

.modal-lg {
  max-width: 800px;
  margin: 1.75rem auto;
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 0.3rem;
  outline: 0;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem 1rem;
  border-bottom: 1px solid #dee2e6;
  border-top-left-radius: calc(0.3rem - 1px);
  border-top-right-radius: calc(0.3rem - 1px);
}

.modal-title {
  margin-bottom: 0;
  line-height: 1.5;
  font-size: 1.25rem;
  font-weight: 500;
}

.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 1rem;
  background-color: var(--base-tint);
}

.close {
  padding: 1rem 1rem;
  margin: -1rem -1rem -1rem auto;
  background-color: transparent;
  border: 0;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 1px 0 #fff;
  opacity: 0.5;
  cursor: pointer;
}

.close:hover {
  opacity: 0.75;
}

.embed-responsive {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
}

.embed-responsive-16by9 {
  padding-bottom: 56.25%;
}

.embed-responsive-item {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  width: 100vw;
  height: 100vh;
  background-color: #000;
}

.modal-backdrop.fade {
  opacity: 0;
}

.modal-backdrop.show {
  opacity: 0.5;
}

body.modal-open {
  overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .gallery-card {
    height: 250px;
  }

  .gallery-overlay {
    opacity: 1;
  }

  .gallery-play-btn {
    width: 50px;
    height: 50px;
    font-size: 18px;
  }

  .modal-dialog {
    margin: 0.5rem;
  }

  .modal-lg {
    max-width: none;
    margin: 0.5rem;
  }
}

@media (max-width: 576px) {
  .gallery-card {
    height: 200px;
  }

  .gallery__item {
    padding: 5px;
  }
}

/* PhotoSwipe custom styles */
.pswp__button--close,
.pswp__button--share,
.pswp__button--fs,
.pswp__button--zoom {
  background-color: rgba(0, 0, 0, 0.5) !important;
}

.pswp__button--arrow--left,
.pswp__button--arrow--right {
  background-color: rgba(0, 0, 0, 0.5) !important;
}

.pswp__counter {
  color: #fff;
  font-size: 14px;
}

/* Video Modal Styles */
#videoModal .modal-content {
  border-radius: 12px;
  overflow: hidden;
}

#videoModal .modal-header {
  background-color: var(--base-tint);
  border-bottom: 1px solid var(--base-tint);
}

#videoModal .embed-responsive {
  border-radius: 8px;
  overflow: hidden;
}

/* Loading animation */
.gallery-card.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
