/**
 * subpage.css — Surprise, Again
 * 通常固定ページ、制作実績一覧・詳細など下層ページ専用スタイル
 */

/* ============================================================
   1. 下層共通レイアウト (Subpage Hero / Breadcrumb)
   ============================================================ */
.sa-subpage-header {
  position: relative;
  overflow: hidden;
  background: var(--sa-bg-cream);
  padding-top: clamp(120px, 14vh, 160px);
  padding-bottom: clamp(60px, 8vh, 100px);
  text-align: center;
  border-bottom: 1px solid rgba(123, 90, 74, 0.08);
}

.sa-subpage-header__orb {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(195, 164, 107, 0.15), rgba(195, 164, 107, 0) 70%);
  filter: blur(10px);
  pointer-events: none;
}

.sa-subpage-header__inner {
  position: relative;
  z-index: 2;
  max-width: var(--sa-max-width);
  margin-inline: auto;
  padding-inline: var(--sa-section-px);
}

.sa-subpage-header__title {
  font-family: var(--sa-font-jp);
  font-weight: 700;
  font-size: clamp(28px, 4.5vw, 48px);
  line-height: 1.3;
  color: var(--sa-text-dark);
  margin: 0 0 12px;
}

/* パンくずリスト */
.sa-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--sa-text-light);
  margin-top: 24px;
}

.sa-breadcrumb a {
  color: var(--sa-text-mid);
  transition: color 0.2s;
}

.sa-breadcrumb a:hover {
  color: var(--sa-brown);
}

.sa-breadcrumb__separator {
  font-family: var(--sa-font-en);
}

/* ============================================================
   2. 固定ページ (page.php) 用スタイル
   ============================================================ */
.sa-page-content {
  background: var(--sa-bg-white);
  border-radius: var(--sa-radius-card);
  border: 1px solid rgba(123, 90, 74, 0.06);
  padding: clamp(32px, 5vw, 64px);
  margin-block: clamp(48px, 8vh, 80px);
}

/* Gutenberg本文のスタイリング */
.sa-entry-content {
  line-height: 1.95;
  color: var(--sa-text-dark);
}

.sa-entry-content h2 {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  border-bottom: 2px solid var(--sa-bg-cream);
  padding-bottom: 12px;
  margin-top: 48px;
  margin-bottom: 24px;
}

.sa-entry-content h3 {
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 700;
  margin-top: 36px;
  margin-bottom: 18px;
  position: relative;
  padding-left: 14px;
}

.sa-entry-content h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 4px;
  background: var(--sa-brown);
  border-radius: 2px;
}

.sa-entry-content p {
  margin-bottom: 24px;
}

.sa-entry-content ul,
.sa-entry-content ol {
  margin-bottom: 28px;
  padding-left: 24px;
}

.sa-entry-content li {
  margin-bottom: 8px;
}

.sa-entry-content blockquote {
  border-left: 4px solid var(--sa-gold);
  background: var(--sa-bg-warm);
  padding: 20px 24px;
  margin-inline: 0;
  margin-bottom: 28px;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--sa-text-mid);
}

/* ============================================================
   3. 実績一覧ページ (archive-sa_works.php) 用スタイル
   ============================================================ */
.sa-archive-wrap {
  padding-block: clamp(48px, 8vh, 80px);
}

/* タクソノミー・カテゴリーフィルター */
.sa-archive-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: clamp(40px, 6vh, 60px);
}

.sa-filter-btn {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 24px;
  border-radius: var(--sa-radius-tag);
  background: var(--sa-bg-white);
  border: 1px solid rgba(123, 90, 74, 0.15);
  color: var(--sa-text-mid);
  transition: all 0.25s;
}

.sa-filter-btn:hover,
.sa-filter-btn.is-active {
  background: var(--sa-brown);
  color: #fff;
  border-color: var(--sa-brown);
  transform: translateY(-1px);
  filter: drop-shadow(0 8px 16px rgba(123, 90, 74, 0.25));
}

/* 実績一覧のグリッド（3カラム） */
.sa-works-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 36px);
}

/* ページネーション */
.sa-pagination-sub {
  margin-top: clamp(48px, 8vh, 80px);
  display: flex;
  justify-content: center;
}

.sa-pagination-sub .navigation {
  display: flex;
  gap: 8px;
}

.sa-pagination-sub .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sa-bg-white);
  border: 1px solid rgba(123, 90, 74, 0.15);
  font-family: var(--sa-font-en);
  font-weight: 500;
  font-size: 15px;
  color: var(--sa-text-mid);
  transition: all 0.2s;
}

.sa-pagination-sub .page-numbers.current,
.sa-pagination-sub .page-numbers:hover {
  background: var(--sa-brown);
  color: #fff;
  border-color: var(--sa-brown);
  box-shadow: 0 8px 16px rgba(123, 90, 74, 0.2);
}

/* ============================================================
   4. 実績詳細ページ (single-sa_works.php) 用スタイル
   ============================================================ */
.sa-works-detail {
  padding-block: clamp(48px, 8vh, 80px);
}

.sa-works-detail-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

/* メイン画像・解説 */
.sa-works-detail-main__img {
  width: 100%;
  border-radius: var(--sa-radius-card);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(80, 60, 50, 0.15);
  margin-bottom: clamp(32px, 5vh, 48px);
}

.sa-works-detail-main__img img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.sa-works-detail-main__placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--sa-radius-card);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: clamp(32px, 5vh, 48px);
  box-shadow: 0 30px 60px rgba(80, 60, 50, 0.15);
}

.sa-works-detail-main__desc {
  background: var(--sa-bg-white);
  border-radius: var(--sa-radius-card);
  border: 1px solid rgba(123, 90, 74, 0.06);
  padding: clamp(24px, 4vw, 48px);
}

.sa-works-detail-main__desc h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--sa-text-dark);
  margin-top: 0;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(123, 90, 74, 0.1);
}

/* サイドバー：スペック情報 */
.sa-works-spec {
  background: var(--sa-bg-white);
  border-radius: var(--sa-radius-card);
  border: 1px solid rgba(123, 90, 74, 0.06);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: 0 24px 50px rgba(80, 60, 50, 0.08);
}

.sa-works-spec__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--sa-text-dark);
  margin-top: 0;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--sa-bg-cream);
}

.sa-spec-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(123, 90, 74, 0.08);
}

.sa-spec-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sa-spec-item__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--sa-brown);
}

.sa-spec-item__value {
  font-size: 15px;
  color: var(--sa-text-dark);
}

/* 前後の記事ナビゲーション */
.sa-works-nav {
  margin-top: clamp(48px, 8vh, 80px);
  border-top: 1px solid rgba(123, 90, 74, 0.1);
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.sa-works-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--sa-text-mid);
  transition: color 0.2s;
  max-width: 45%;
}

.sa-works-nav-btn:hover {
  color: var(--sa-brown);
}

.sa-works-nav-btn--next {
  text-align: right;
  justify-content: flex-end;
}

.sa-works-nav-btn__title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   5. レスポンシブ
   ============================================================ */
@media (max-width: 880px) {
  /* 実績一覧 */
  .sa-works-archive-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* 実績詳細 */
  .sa-works-detail-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 560px) {
  /* 実績一覧 */
  .sa-works-archive-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   6. 制作の流れ (FLOW タイムライン)
   ============================================================ */
.sa-flow-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 24px 80px;
  position: relative;
}

.sa-flow-step-pad {
  position: relative;
  padding-left: 96px;
  padding-bottom: 64px;
}

.sa-flow-step-pad:last-child {
  padding-bottom: 0;
}

/* タイムラインの縦線 */
.sa-flow-rail {
  position: absolute;
  left: 27px;
  top: 56px;
  bottom: -64px;
  width: 2px;
  background: linear-gradient(180deg, rgba(123,90,74,0.35), rgba(195,164,107,0.35));
}

.sa-flow-step-pad:last-child .sa-flow-rail {
  display: none;
}

/* 丸数字マーカー */
.sa-flow-marker-col {
  position: absolute;
  left: 0;
  top: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--sa-brown);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sa-font-en);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 6px 18px rgba(123, 90, 74, 0.28);
  z-index: 2;
}

/* 横並びの行 */
.sa-flow-row {
  display: flex;
  gap: 32px;
  align-items: stretch;
}

/* イラストブロック */
.sa-flow-illust {
  flex: 0 0 180px;
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 24px;
  background: #FFFFFF;
  border: 1px solid rgba(45,42,40,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(45,42,40,0.03);
}

.sa-flow-illust svg {
  width: 72px;
  height: 72px;
  position: relative;
  z-index: 2;
}

/* テキストカード */
.sa-flow-card {
  flex: 1;
  background: #FFFFFF;
  border: 1px solid rgba(45,42,40,0.07);
  border-radius: 24px;
  padding: 36px 40px;
  box-shadow: 0 10px 30px rgba(45,42,40,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sa-flow-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(45,42,40,0.09);
}

.sa-flow-card-step {
  font-family: var(--sa-font-en);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--sa-gold);
  margin-bottom: 10px;
}

.sa-flow-card-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--sa-text-dark);
}

.sa-flow-card-desc {
  font-size: 15px;
  line-height: 1.9;
  color: var(--sa-text-mid);
  margin: 0;
}

/* モバイル用矢印 */
.sa-flow-arrow-mobile {
  display: none;
}

@media (max-width: 880px) {
  .sa-flow-step-pad {
    padding-left: 0;
    padding-bottom: 32px;
  }

  .sa-flow-rail,
  .sa-flow-marker-col {
    display: none;
  }

  .sa-flow-row {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .sa-flow-illust {
    width: 160px;
    height: 160px;
    flex: 0 0 160px;
  }

  .sa-flow-card {
    width: 100%;
    padding: 24px 30px;
    text-align: center;
  }

  .sa-flow-arrow-mobile {
    display: flex;
    justify-content: center;
    padding-bottom: 24px;
  }
}
