@charset "UTF-8";
/* 갤러리형
---------------------------------------------------------------------------- */
.xet-content__gallery {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 16px;
}

/* 이미지 상자 위에 텍스트가 얹히는 카드 */
.xet-content__gallery > .item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 4 / 3;
  background: #2a2a2a;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}
.xet-content__gallery > .item > div + div {
  margin-top: 6px;
}

/* 썸네일: 카드 전체를 채우는 배경 이미지 (약간 어둡게) */
.xet-content__gallery > .item .item__thumbnail {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
}
.xet-content__gallery > .item .item__thumbnail a,
.xet-content__gallery > .item .item__thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
}
.xet-content__gallery > .item .item__thumbnail img {
  object-fit: cover;
  transition: transform 0.4s ease;
}
/* hover: 카드 영역은 고정, 안의 이미지만 확대(밖으로 안 나감) + 살짝 어둡게 */
.xet-content__gallery > .item:hover .item__thumbnail img {
  transform: scale(1.08);
}
/* 어둡게 + 하단 그라디언트(텍스트 가독성) */
.xet-content__gallery > .item::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.25) 45%,
    rgba(0, 0, 0, 0.8) 100%
  );
  transition: background 0.3s ease;
}
.xet-content__gallery > .item:hover::after {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.45) 45%,
    rgba(0, 0, 0, 0.85) 100%
  );
}

/* 텍스트들은 이미지 위(오버레이)로 */
.xet-content__gallery > .item > *:not(.item__thumbnail) {
  position: relative;
  z-index: 2;
}
.xet-content__gallery > .item .item__category a {
  color: #fff !important;
}
.xet-content__gallery > .item .item__subject .subject {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #fff !important;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.35;
  word-break: keep-all;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.xet-content__gallery > .item .item__meta {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 10px;
}
.xet-content__gallery > .item .item__meta,
.xet-content__gallery > .item .item__meta span,
.xet-content__gallery > .item .item__meta a {
  color: rgba(255, 255, 255, 0.85) !important;
}

.xet-content__gallery > .item .item__meta .author {
  font-weight: 700;
}
/* 모바일 가로 캐러셀 (상단 kiosk 스타일) + 이전/다음 버튼
---------------------------------------------------------------------------- */
.gallery-carousel {
  position: relative;
}
@media (max-width: 767px) {
  .gallery-carousel .xet-content__gallery {
    display: flex;
    grid-template-columns: none;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* 카드 좌우 여백(kiosk처럼 중앙 정렬) */
    padding: 0 32px 2px;
    scroll-padding: 0 32px;
  }
  .gallery-carousel .xet-content__gallery::-webkit-scrollbar {
    display: none;
  }
  .gallery-carousel .xet-content__gallery > .item {
    flex: 0 0 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }
  .gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.92);
    color: #111827;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  }
  .gallery-nav--prev {
    left: 8px;
  }
  .gallery-nav--next {
    right: 8px;
  }
  .gallery-nav:disabled {
    opacity: 0.35;
    cursor: default;
  }
  .gallery-nav[hidden] {
    display: none;
  }
}
/* 데스크톱에서는 버튼 숨김(그리드 유지) */
@media (min-width: 768px) {
  .gallery-nav {
    display: none;
  }
  .xet-content__gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 992px) {
  .xet-content__gallery {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px;
  }
}
