/* /assets/css/pages/town_home.photos.css */
/* (1) 홈스테이/놀거리 썸네일 그리드  (2) 우리마을 사진관 슬라이더 */

/* =========================
   0) 공통 패널 여백
========================= */
.photo-grid-panel { padding: 0; }
.photo-panel      { padding: 14px; }

/* =========================
   1) 썸네일 그리드
========================= */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.photo-tile {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: var(--card2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateZ(0);
  transition: box-shadow .20s ease;
}
.photo-tile:hover {
  box-shadow: var(--shadow-md);
}

.photo-tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.001);
  transition: transform .35s ease, filter .35s ease;
}
.photo-tile:hover img {
  transform: scale(1.06);
  filter: saturate(1.06) brightness(1.02);
}
.photo-tile:focus-visible {
  outline: 3px solid rgba(37,99,235,.35);
  outline-offset: 3px;
}

/* 태블릿 */
@media (max-width: 1024px) {
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* 모바일 */
@media (max-width: 540px) {
  .photo-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .photo-tile {
    aspect-ratio: 16 / 10;
    border-radius: 14px;
  }
}

/* =========================
   2) 사진관(슬라이더)
========================= */
.photo-slider {
  position: relative;
  width: 100%;
  display: block;
  border-radius: 18px;
}

.ps-stage {
  position: relative;
  width: 100%; max-width: 100%; min-width: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #0b1b33;
  aspect-ratio: 16 / 9;
  min-height: 320px;
  --ps-bg: none;
}

/* blur 배경 */
.ps-stage::before {
  content: "";
  position: absolute; inset: -28px;
  background-image: var(--ps-bg);
  background-size: cover; background-position: center;
  filter: blur(18px) saturate(1.12);
  transform: scale(1.06);
  opacity: .45;
  z-index: 0;
}
.ps-stage::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 50%, rgba(0,0,0,.15), rgba(0,0,0,.50));
  z-index: 1;
  pointer-events: none;
}

.ps-img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important; height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  display: block !important;
  max-width: none !important;
  z-index: 2;
}

/* 좌/우 버튼: 오버레이 */
.ps-btn {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 7;
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(0,0,0,.24);
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  color: #fff; font-size: 24px;
  line-height: 1;
  display: grid; place-items: center;
  cursor: pointer;
  user-select: none;
  transition: background .14s ease, box-shadow .14s ease;
}
#uiPrev { left: 12px; }
#uiNext { right: 12px; }
.ps-btn:hover {
  background: rgba(0,0,0,.38);
  box-shadow: 0 12px 32px rgba(0,0,0,.24);
}

.ps-meta {
  position: absolute; right: 12px; bottom: 12px; z-index: 8;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.92);
  font-size: 12px;
  backdrop-filter: blur(6px);
}

/* 모바일 */
@media (max-width: 640px) {
  .photo-panel { padding: 10px; }
  .photo-slider, .ps-stage { border-radius: 14px; }
  .ps-stage { aspect-ratio: 4 / 3; min-height: 240px; }
  .ps-btn { width: 40px; height: 40px; font-size: 22px; }
  #uiPrev { left: 10px; }
  #uiNext { right: 10px; }
  .ps-meta { right: 8px; bottom: 8px; padding: 5px 9px; }
}
