/* Carousel Gallery - CodePen jackcohle/ZxyjwQ yapısı */
.block-gallery h2,
.block-gallery .display-2,
.block-gallery .opacity-2 {
  color: #07123b !important;
  opacity: 1 !important;
}

/* Galeri başlığı solda, Dış/İç Mekan sekmeleri sağda */
.block-gallery .container > .row:first-child > .col-12 {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.block-gallery .container > .row:first-child > .col-12 > h2 {
  margin-bottom: 0 !important;
}
.carousel-gallery {
  margin: 40px auto;
  padding: 0 clamp(1rem, 3vw, 1.75rem);
  max-width: 1600px;
  width: 100%;
  box-sizing: border-box;
}

.gallery-category-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0;
  margin-left: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex-shrink: 0;
}

.gallery-category-tabs__btn {
  border: 1px solid #b79c80;
  background: #fff;
  color: #7b664f;
  border-radius: 999px;
  padding: 0.44rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gallery-category-tabs__btn:hover,
.gallery-category-tabs__btn.is-active {
  background: #b79c80;
  color: #fff;
  border-color: #b79c80;
}
.carousel-gallery .swiper-slide a {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  min-height: 240px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  box-shadow: 3px 2px 20px 0 rgba(0,0,0,0.2);
}
.carousel-gallery .swiper-slide a:hover .carousel-gallery__image .carousel-gallery__overlay {
  opacity: 1;
}
.carousel-gallery__image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  position: relative;
}
.carousel-gallery__overlay {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(20,20,20,0.8);
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s linear;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-gallery__overlay span {
  color: #fff;
  font-size: 1rem;
}
.carousel-gallery .swiper-pagination {
  position: relative;
  bottom: auto;
  text-align: center;
  margin-top: 25px;
}
.carousel-gallery .swiper-pagination .swiper-pagination-bullet {
  transition: opacity 0.2s linear;
}
.carousel-gallery .swiper-pagination .swiper-pagination-bullet:hover {
  opacity: 0.7;
}
.carousel-gallery .swiper-pagination .swiper-pagination-bullet-active {
  background: #07123b;
  transform: scale(1.1);
}
@media (min-width: 576px) {
  .carousel-gallery .swiper-slide a {
    min-height: 280px;
  }
}
@media (min-width: 768px) {
  .carousel-gallery .swiper-slide a {
    min-height: 300px;
  }
}
@media (min-width: 992px) {
  .carousel-gallery .swiper-slide a {
    min-height: 340px;
  }
}
@media (min-width: 1200px) {
  .carousel-gallery .swiper-slide a {
    min-height: 360px;
  }
}

/* Galeri grid – mouse/touch ile sürükleyerek kaydırma, scrollbar gizli, alan büyük */
.gallery-grid-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  margin: 40px auto;
  padding: 0 clamp(1rem, 3vw, 1.75rem) 1.25rem;
  max-width: 1600px;
  width: 100%;
  min-height: 502px;
  box-sizing: border-box;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  scroll-behavior: smooth;
}
.gallery-grid-scroll::-webkit-scrollbar {
  display: none;
}
.gallery-grid-scroll.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}
.gallery-grid-scroll.is-dragging a {
  pointer-events: none;
}

/* Galeri yön butonları – concept-item__direction ile aynı görünüm */
.gallery-direction {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 1.25rem;
  padding-bottom: 0.5rem;
}
.block-gallery .gallery-direction .btn-swiper,
.block-gallery .gallery-direction .gallery-prev,
.block-gallery .gallery-direction .gallery-next {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  padding: 0 !important;
  margin: 0 6px !important;
  border: 2px solid #b79c80 !important;
  border-radius: 50% !important;
  background-color: transparent !important;
  color: #b79c80 !important;
  cursor: pointer !important;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease !important;
}
.block-gallery .gallery-direction .btn-swiper:hover,
.block-gallery .gallery-direction .gallery-prev:hover,
.block-gallery .gallery-direction .gallery-next:hover {
  background-color: #b79c80 !important;
  color: #fff !important;
  border-color: #b79c80 !important;
}
.block-gallery .gallery-direction .btn-swiper .icon,
.block-gallery .gallery-direction .gallery-prev .icon,
.block-gallery .gallery-direction .gallery-next .icon {
  width: 14px !important;
  height: 14px !important;
  fill: currentColor !important;
}
@media (min-width: 768px) {
  .block-gallery .gallery-direction .btn-swiper,
  .block-gallery .gallery-direction .gallery-prev,
  .block-gallery .gallery-direction .gallery-next {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    min-height: 52px !important;
    margin: 0 8px !important;
  }
  .block-gallery .gallery-direction .btn-swiper .icon,
  .block-gallery .gallery-direction .gallery-prev .icon,
  .block-gallery .gallery-direction .gallery-next .icon {
    width: 16px !important;
    height: 16px !important;
  }
}

/* Büyük görseller, eşit olmayan boyutlar (ek küçültme) */
.gallery-grid {
  display: grid;
  grid-template-rows: 1.2fr 0.8fr;
  grid-auto-flow: column;
  grid-template-columns: 486px 421px 535px 437px 469px 486px;
  gap: 18px;
  margin: 0;
  padding: 0;
  width: max-content;
  min-height: 454px;
}
.gallery-grid__item {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gallery-grid__item:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 28px rgba(0,0,0,0.18);
}
.gallery-grid-scroll.is-dragging .gallery-grid__item:hover {
  transform: none;
}
.gallery-grid__image {
  width: 100%;
  height: 100%;
  min-height: 243px;
  background-size: cover;
  background-position: center center;
}

/* İç mekan: kaydırılabilir ama tüm öğeler lineer sırada */
.gallery-grid.gallery-grid--linear {
  grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
  grid-template-columns: none !important;
  grid-auto-flow: column !important;
  grid-auto-columns: minmax(240px, 300px) !important;
  width: max-content !important;
  min-height: 454px !important;
}
.gallery-grid.gallery-grid--linear .gallery-grid__item[class*="gallery-grid__item--"] {
  grid-column: auto !important;
  grid-row: auto !important;
  aspect-ratio: auto;
  height: auto;
}
.gallery-grid.gallery-grid--linear .gallery-grid__image {
  min-height: 216px !important;
  height: 100% !important;
}
@media (max-width: 991px) {
  .gallery-grid.gallery-grid--linear {
    grid-auto-columns: minmax(210px, 260px) !important;
    min-height: 340px !important;
  }
  .gallery-grid.gallery-grid--linear .gallery-grid__image {
    min-height: 160px !important;
  }
}
@media (max-width: 575px) {
  .gallery-grid.gallery-grid--linear {
    grid-auto-columns: minmax(165px, 210px) !important;
    min-height: 259px !important;
  }
  .gallery-grid.gallery-grid--linear .gallery-grid__image {
    min-height: 120px !important;
  }
}

@media (max-width: 1199px) {
  .gallery-grid-scroll {
    max-width: 100%;
    min-height: 405px;
  }
  .gallery-grid {
    grid-template-columns: 437px 373px 486px 388px 421px 437px;
    min-height: 388px;
  }
}

@media (max-width: 991px) {
  .gallery-grid {
    grid-template-columns: 373px 324px 437px 340px 373px 373px;
    min-height: 340px;
  }
}

@media (max-width: 575px) {
  .gallery-grid-scroll {
    min-height: 307px;
  }
  .gallery-grid {
    grid-template-columns: 324px 275px 373px 292px 307px 324px;
    grid-template-rows: 1.15fr 0.85fr;
    min-height: 259px;
    gap: 13px;
  }
  .gallery-grid__image {
    min-height: 194px;
  }
}

/* İç mekan sekmesinde tüm görseller aynı anda görünsün */
.block-gallery.gallery-show-all .gallery-grid-scroll {
  overflow-x: visible;
  overflow-y: visible;
  min-height: 0;
  cursor: default;
  padding-bottom: 0;
}
.block-gallery.gallery-show-all .gallery-grid {
  width: 100%;
  min-height: 0;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-template-rows: none;
  grid-auto-flow: row;
  gap: 16px;
}
.block-gallery.gallery-show-all .gallery-grid__item {
  aspect-ratio: 3 / 4;
}
.block-gallery.gallery-show-all .gallery-grid__image {
  min-height: 0;
  height: 100%;
}
.block-gallery.gallery-show-all .gallery-direction {
  display: none;
}
