[class*='swiper']:focus {
  outline: none;
}

/* Swiperのコンテナ */
.swiper {
  width: 100%;
  height: auto;
  position: relative;
  z-index: 0;
}

.mainimage-inner .swiper {
  overflow: visible;
  z-index: 0;
}

.main-image-swiper .swiper-slide {
  width: 100%;
  height: 100vh;
}

@media only screen and (max-width: 599px) {
  .main-image-swiper .swiper-slide {
    width: 100%;
    height: 360px;
  }
}

.main-image-swiper .swiper-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
  opacity: 0.4;
}

.main-image-swiper .swiper-slide-visible img {
  opacity: 1;
}

/* .swiper-button-prev,
.swiper-button-next {
  display: grid;
  place-content: center;
  width: 6.4rem;
  height: 6.4rem;
  cursor: pointer;
  -webkit-transition: var(--transition);
  transition: var(--transition);
}

@media only screen and (max-width: 599px) {
  .swiper-button-prev,
  .swiper-button-next {
    width: 4rem;
    height: 4rem;
  }
} */

/* .swiper-button-prev::before,
.swiper-button-next::before {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  content: '';
}
.swiper-button-prev::after,
.swiper-button-next::after {
  width: 1.2rem;
  height: 1.2rem;
  content: '';
  border: solid var(--color-gray);
  border-width: 3px 3px 0 0;
}
.swiper-button-prev::after {
  margin-left: 0.4rem;
  -webkit-transform: rotate(-135deg);
  transform: rotate(-135deg);
}
.swiper-button-next::after {
  margin-right: 0.4rem;
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
} */
/* .swiper-button-disabled {
  pointer-events: none;
  opacity: 0;
}*/

/* メイン画像スライダーのナビゲーション */
.mainimage {
  position: relative;
}

.main-image-navigation {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4rem;
  z-index: 10;
}

.main-image-prev,
.main-image-next {
  position: relative !important;
  width: 50px !important;
  height: 50px !important;
  margin-top: 0 !important;
  background-color: #404040;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.main-image-prev::after,
.main-image-next::after {
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 1.4rem !important;
  color: #fff;
}

.main-image-prev::after {
  content: '\f053'; /* fa-chevron-left */
}

.main-image-next::after {
  content: '\f054'; /* fa-chevron-right */
}

.main-image-prev:hover,
.main-image-next:hover {
  background-color: #2a2a2a;
  transform: scale(1.1);
}

.main-image-prev:hover::after,
.main-image-next:hover::after {
  color: #fff;
}

.main-image-prev.swiper-button-disabled,
.main-image-next.swiper-button-disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

@media only screen and (max-width: 599px) {
  .main-image-navigation {
    bottom: 1rem;
  }

  .main-image-prev,
  .main-image-next {
    width: 40px;
    height: 40px;
  }

  .main-image-prev::after,
  .main-image-next::after {
    font-size: 1.2rem;
  }
}

/* 事例（jirei）のサムネイル付きスライダー */
.works-gallery {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
  align-items: flex-start;
}

.works-gallery-main {
  flex: 1;
  min-width: 0;
}

.works-gallery-thumbs {
  width: 150px;
  flex-shrink: 0;
  max-height: 600px;
  overflow: hidden;
}

.works-main-swiper {
  width: 100%;
  height: auto;
}

.works-main-swiper .swiper-slide {
  width: 100%;
}

.works-slide-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.works-slide-content img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.works-slide-text {
  padding: 15px;
  background-color: #f5f5f5;
  border-radius: 4px;
  font-size: 1.4rem;
  line-height: 1.8;
}

.works-thumbs-swiper {
  width: 100%;
  height: 100%;
  max-height: 600px;
}

.works-thumbs-swiper .swiper-wrapper {
  flex-direction: column;
}

.works-thumbs-swiper .swiper-slide {
  width: 100% !important;
  margin-bottom: 10px;
  cursor: pointer;
  opacity: 0.6;
  transition:
    opacity 0.3s,
    transform 0.3s;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
}

.works-thumbs-swiper .swiper-slide:hover {
  opacity: 0.8;
  transform: scale(1.05);
}

.works-thumbs-swiper .swiper-slide-thumb-active {
  opacity: 1;
  border-color: var(--color-theme);
}

.works-thumbs-swiper .swiper-slide img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

@media only screen and (max-width: 768px) {
  .works-gallery {
    flex-direction: column;
    gap: 15px;
  }

  .works-gallery-thumbs {
    width: 100%;
  }

  .works-thumbs-swiper .swiper-wrapper {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .works-thumbs-swiper .swiper-slide {
    width: calc(25% - 7.5px) !important;
    margin-right: 10px;
    margin-bottom: 10px;
  }

  .works-thumbs-swiper .swiper-slide:nth-child(4n) {
    margin-right: 0;
  }

  .works-thumbs-swiper .swiper-slide img {
    height: 80px;
  }
}

@media only screen and (max-width: 599px) {
  .works-gallery {
    margin-bottom: 20px;
    gap: 10px;
  }

  .works-gallery-main {
    width: 100%;
  }

  .works-gallery-thumbs {
    width: 100%;
    max-height: none;
  }

  .works-thumbs-swiper {
    width: 100%;
    max-height: none;
  }

  .works-thumbs-swiper .swiper-wrapper {
    flex-direction: row !important;
    flex-wrap: wrap;
    display: flex !important;
  }

  .works-thumbs-swiper .swiper-slide {
    width: calc(25% - 7.5px) !important;
    margin-right: 10px;
    margin-bottom: 10px;
    flex-shrink: 0;
  }

  .works-thumbs-swiper .swiper-slide:nth-child(4n) {
    margin-right: 0 !important;
  }

  .works-thumbs-swiper .swiper-slide img {
    height: 60px;
    width: 100%;
  }

  .works-slide-content {
    gap: 10px;
  }

  .works-slide-text {
    padding: 10px;
    font-size: 1.2rem;
    line-height: 1.6;
  }
}

/* ギャラリー（portfolio）スライダーのスタイル */
.gallery-swiper-wrapper {
  position: relative;
  margin-top: 4rem;
  opacity: 0;
  transform: translateX(-50px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.gallery-swiper-wrapper.animate {
  opacity: 1;
  transform: translateX(0);
}

.gallery-swiper {
  overflow: hidden;
  position: relative;
}

.gallery-swiper .swiper-wrapper {
  display: flex;
}

.gallery-swiper .swiper-slide {
  width: 100%;
  height: auto;
  flex-shrink: 0;
}

/* グループ化されたスライド内のグリッド */
.gallery-group-slide {
  width: 100%;
}

.gallery-group-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, auto);
  width: 100%;
}

.gallery-group-grid .gallery-grid-item {
  width: 100%;
  height: 100%;
}

/* ナビゲーションボタン */
.gallery-navigation {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 10;
}

.gallery-swiper-wrapper .gallery-prev,
.gallery-swiper-wrapper .gallery-next {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 42px !important;
  height: 42px !important;
  background: var(--color-theme) !important;
  text-decoration: none !important;
  color: #fff !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: var(--transition) !important;
  pointer-events: auto !important;
  z-index: 11 !important;
  border: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
}

.gallery-swiper-wrapper .gallery-prev {
  left: 0px !important;
  right: auto !important;
}

.gallery-swiper-wrapper .gallery-next {
  right: 0px !important;
  left: auto !important;
}

@media only screen and (min-width: 1281px) {
  .gallery-swiper-wrapper .gallery-prev:hover,
  .gallery-swiper-wrapper .gallery-next:hover {
    text-decoration: none !important;
    background: var(--color-theme-light) !important;
  }
}

.gallery-swiper-wrapper .gallery-prev::after,
.gallery-swiper-wrapper .gallery-next::after {
  font-size: 1.2rem !important;
  font-weight: 900 !important;
  font-family: 'Font Awesome 5 Free' !important;
  color: #fff !important;
  margin: 0 !important;
}

.gallery-swiper-wrapper .gallery-prev::after {
  content: '\f053' !important; /* fa-chevron-left */
}

.gallery-swiper-wrapper .gallery-next::after {
  content: '\f054' !important; /* fa-chevron-right */
}

/* スマホ用：通常のグリッド表示 */
.gallery-swiper-mobile .swiper-wrapper {
  display: grid !important;
  grid-template-columns: repeat(1, 1fr);
  grid-template-rows: repeat(1, auto);
}

.gallery-swiper-mobile .swiper-slide {
  width: 100% !important;
  height: auto !important;
}

/* レスポンシブ対応 */
@media only screen and (max-width: 1024px) {
  .gallery-group-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
  }

  .gallery-swiper-wrapper .gallery-prev {
    left: 10px !important;
  }

  .gallery-swiper-wrapper .gallery-next {
    right: 10px !important;
  }
}

@media only screen and (max-width: 767px) {
  .gallery-group-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .gallery-swiper-wrapper .gallery-navigation {
    display: none !important;
  }

  .gallery-swiper-wrapper .gallery-prev,
  .gallery-swiper-wrapper .gallery-next {
    display: none !important;
  }
}
