/* ===============================
   共通
=============================== */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ===============================
   ヒーロー
=============================== */
.gallery-hero {
  padding: 110px 0 120px;
  background: linear-gradient(90deg, #5f5f5f 0%, #bdbdbd 100%);
  color: #fff;
}

.gallery-hero-inner {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
}

.gallery-hero-sub {
  margin: 0 0 18px;
  font-size: 14px;
  letter-spacing: 0.18em;
  line-height: 1;
  color: #f3f4f6;
}

.gallery-hero-title {
  margin: 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.2;
  font-weight: 700;
  color: #fff;
}

.gallery-hero-text {
  margin: 28px 0 0;
  max-width: 760px;
  font-size: 16px;
  line-height: 2;
  color: rgba(255, 255, 255, 0.92);
}

/* ===============================
   ギャラリー本体
=============================== */
.gallery-section {
  padding: 70px 0 90px;
  background: #f8fafc;
}

.gallery-inner {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
}

/* ===============================
   グリッド
=============================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.gallery-card {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
  transition: 0.3s;
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0,0,0,0.12);
}

.gallery-thumb {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

/* ===============================
   ページネーション
=============================== */
.gallery-pagination {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.pagination-btn {
  padding: 8px 14px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
}

.pagination-btn:hover {
  opacity: 0.8;
}

.pagination-numbers {
  display: flex;
  gap: 8px;
}

.pagination-number {
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
  background: #e5e7eb;
  color: #111827;
  font-size: 13px;
}

.pagination-number:hover {
  background: #d1d5db;
}

.pagination-number.is-current {
  background: #111827;
  color: #fff;
}

.pagination-dots {
  padding: 6px;
  color: #6b7280;
}

/* ===============================
   モーダル（ライトボックス）
=============================== */
.gallery-modal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
}

.gallery-modal.is-open {
  display: flex;
}

.gallery-modal-overlay {
  position: absolute;
  inset: 0;
}

.gallery-modal-dialog {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.gallery-modal-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 10px;
}

/* ボタン */
.gallery-modal-close,
.gallery-modal-prev,
.gallery-modal-next {
  position: absolute;
  background: rgba(0,0,0,0.6);
  border: none;
  color: #fff;
  cursor: pointer;
}

/* 閉じる */
.gallery-modal-close {
  top: -50px;
  right: 0;
  font-size: 28px;
}

/* 前後 */
.gallery-modal-prev,
.gallery-modal-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.gallery-modal-prev {
  left: -60px;
}

.gallery-modal-next {
  right: -60px;
}

/* ===============================
   レスポンシブ
=============================== */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .gallery-hero {
    padding: 80px 0 90px;
  }

  .gallery-hero-sub {
    margin-bottom: 14px;
    font-size: 12px;
  }

  .gallery-hero-title {
    font-size: clamp(34px, 9vw, 48px);
  }

  .gallery-hero-text {
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.9;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}