/* ===== Access Page Styles（3構成対応） ===== */

/* 共通: header直後の余白調整 */
header.wp-block-template-part + .wp-block-post-content {
  margin-block-start: 0 !important;
}
.wp-block-post-content > *:first-child {
  margin-block-start: 0 !important;
}

/* ===== Hero: アクセス =====
 * 【シンプルヒーロー用CSS】アクセスページの静的ヒーロー
 * - 用途: シンプルヒーロー（背景画像1枚＋グラデーションオーバーレイ）
 * - アニメーション: なし（静的表示）
 * - 関連セレクタ:
 *   - .swx-hero.-access: アクセス専用ヒーローコンテナ
 *   - .hero-bg, .hero-bg img: 背景画像
 *   - .overlay: グラデーションオーバーレイ（下部を暗くして可読性確保）
 *   - .hero-inner: コンテンツラッパー（下寄せ配置）
 *   - .hero-title: メインタイトル（白色・テキストシャドウ付き）
 *   - .hero-sub: サブテキスト（白色・透明度95%）
 */
.swx-hero.-access{
  position:relative; min-height:clamp(220px,45vh,420px);
  overflow:clip; display:grid;
}
.swx-hero.-access .hero-bg{
  position:absolute; inset:0;
}
.swx-hero.-access .hero-bg img{
  width:100%; height:100%; display:block;
  object-fit:cover; object-position:center 35%;
}
.swx-hero.-access .overlay{
  position:absolute; inset:0;
  background: linear-gradient(
    to bottom,
    color-mix(in oklab, var(--hero-overlay-color, #000) 0%, transparent) 20%,
    color-mix(in oklab, var(--hero-overlay-color, #000) 30%, transparent) 70%,
    color-mix(in oklab, var(--hero-overlay-color, #000) 45%, transparent) 100%
  );
  pointer-events:none;
}
.swx-hero.-access .hero-inner{
  position:relative; z-index:1; align-self:end;
  width:min(1100px,90%); margin:0 auto clamp(18px,4vw,28px);
  color:#fff; text-shadow:0 2px 16px rgba(0,0,0,.35);
}
.swx-hero.-access .hero-title{
  font-size:clamp(24px,4vw,40px); font-weight:800; color:#fff;
  letter-spacing:.02em; margin:0 0 .3em;
}
.swx-hero.-access .hero-sub{
  margin:0; font-size:clamp(14px,1.6vw,16px); opacity:.95;
}

/* ===== Container ===== */
.swx-access-container {
  /* アクセスページ専用のカラー変数（base.css のトークン由来） */
  --access-primary: var(--swx-c-brand);
  --access-surface: var(--swx-c-surface);
  --access-surface-alt: color-mix(in oklab, var(--swx-c-surface) 96%, var(--swx-c-brand) 4%);
  --access-on-surface: var(--swx-c-text);
  --access-muted: var(--swx-c-muted);
  --access-border: color-mix(in oklab, var(--swx-c-surface) 60%, #0000);
  --access-bg: var(--swx-c-bg);
  
  max-width: var(--container, 1100px);
  margin-inline: auto;
  padding: clamp(24px, 4vw, 48px) clamp(16px, 3vw, 28px);
}

/* ===== Section共通 ===== */
.swx-access-section {
  margin-bottom: clamp(48px, 6vw, 72px);
}
.swx-access-section:last-child {
  margin-bottom: 0;
}

/* Section見出し（アイコン + 下線グラデーション） */
.section-head {
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 700;
  margin: 0 0 clamp(20px, 3vw, 32px);
  padding-bottom: 12px;
  border-bottom: 3px solid;
  border-image: linear-gradient(
    to right,
    var(--access-primary) 0%,
    color-mix(in oklab, var(--access-primary) 50%, transparent) 100%
  ) 1;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--access-on-surface);
}
.section-head .dashicons {
  font-size: 1.2em;
  width: 1.2em;
  height: 1.2em;
  color: var(--access-primary);
}

/* ===== A) ACCESS: 地図 + 住所 ===== */

.access-map-wrapper {
  display: grid;
  gap: clamp(16px, 2.5vw, 24px);
}

.access-map {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--swx-shadow-sm);
  aspect-ratio: 16/9;
}

.access-map iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.access-info {
  padding: clamp(16px, 2.5vw, 24px);
  background: var(--access-surface);
  border-radius: 12px;
  border: 1px solid var(--access-border);
  box-shadow: var(--swx-shadow-sm);
}

.access-address {
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--access-on-surface);
}

.access-actions {
  margin: 0;
}

.swx-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: 10px;
  background: var(--access-primary);
  color: var(--swx-c-ink-on-brand);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.swx-btn .dashicons {
  font-size: 1.2em;
  width: 1.2em;
  height: 1.2em;
}

.swx-btn:hover {
  background: color-mix(in oklab, var(--access-primary) 85%, #000 15%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px color-mix(in oklab, var(--access-primary) 30%, transparent);
}

.swx-btn.-primary {
  background: var(--access-primary);
}

@media (min-width: 768px) {
  .access-map-wrapper {
    grid-template-columns: 2fr 1fr;
  }

  .access-map {
    aspect-ratio: auto;
    min-height: 400px;
  }
}

/* ===== B) NOTE: 補足情報 ===== */

.supplement-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  gap: 12px;
}

.supplement-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--access-surface);
  border: 1px solid var(--access-border);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.supplement-item:hover {
  border-color: var(--access-primary);
  box-shadow: 0 2px 8px color-mix(in oklab, var(--access-primary) 10%, transparent);
}

.supplement-item .dashicons {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  font-size: 24px;
  color: var(--access-primary);
  margin-top: 2px;
}

.supplement-item strong {
  display: block;
  font-weight: 600;
  color: var(--access-on-surface);
  margin-bottom: 4px;
}

.supplement-item span {
  display: block;
  color: var(--access-muted);
}

.supplement-item a {
  text-decoration: none;
  color: inherit;
  flex: 1;
}

.supplement-item a:hover strong {
  color: var(--access-primary);
}

.supplement-note {
  padding: 20px;
  background: color-mix(in oklab, var(--access-primary) 5%, transparent);
  border-left: 4px solid var(--access-primary);
  border-radius: 8px;
  line-height: 1.8;
  color: var(--access-on-surface);
}

@media (min-width: 768px) {
  .supplement-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== C) GALLERY: 外観ギャラリー ===== */

/* 1枚の場合（静的表示） */
.access-gallery.-single {
  max-width: 800px;
  margin-inline: auto;
}

.access-gallery.-single .gallery-item {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--swx-shadow-md);
}

.access-gallery.-single img {
  width: 100%;
  height: auto;
  display: block;
}

.access-gallery.-single figcaption {
  padding: 16px;
  background: var(--access-surface);
  text-align: center;
  font-weight: 600;
  color: var(--access-on-surface);
}

/* スライダー（2枚以上） */
.access-gallery.-slider {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--swx-shadow-md);
}

.gallery-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* reduce-motion対応 */
@media (prefers-reduced-motion: reduce) {
  .gallery-track {
    transition: none;
  }
}

.gallery-slide {
  flex: 0 0 100%;
  margin: 0;
  position: relative;
}

.gallery-slide img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
}

.gallery-slide figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.8) 0%,
    rgba(0,0,0,0.5) 50%,
    transparent 100%
  );
  color: #fff;
  font-weight: 600;
  text-align: center;
}

/* ナビゲーション矢印 */
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: color-mix(in oklab, var(--access-bg) 90%, transparent);
  color: var(--access-on-surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.gallery-nav .dashicons {
  width: 28px;
  height: 28px;
  font-size: 28px;
}

.gallery-nav:hover {
  background: var(--access-bg);
  box-shadow: var(--swx-shadow-md);
  transform: translateY(-50%) scale(1.1);
}

.gallery-nav.-prev {
  left: 16px;
}

.gallery-nav.-next {
  right: 16px;
}

/* ドット */
.gallery-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.gallery-dots .dot {
  width: 10px;
  height: 10px;
  border: none;
  border-radius: 50%;
  background: color-mix(in oklab, var(--access-bg) 50%, transparent);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.gallery-dots .dot:hover {
  background: color-mix(in oklab, var(--access-bg) 80%, transparent);
  transform: scale(1.2);
}

.gallery-dots .dot.active {
  background: var(--access-bg);
  width: 24px;
  border-radius: 5px;
}

@media (max-width: 767px) {
  .gallery-nav {
    width: 40px;
    height: 40px;
  }

  .gallery-nav .dashicons {
    width: 24px;
    height: 24px;
    font-size: 24px;
  }

  .gallery-nav.-prev {
    left: 8px;
  }

  .gallery-nav.-next {
    right: 8px;
  }
}
