/* ============================================================
   common.css
   ヘッダー・フッター・ボタン・セクション共通スタイル
   ============================================================ */

/* ------------------------------------------------------------
   1. CSS カスタムプロパティ（デザイントークン）
   ------------------------------------------------------------ */
:root {
  /* Colors */
  --color-primary:      #203a5f;   /* ダークネイビー（ヘッダー・フッター） */
  --color-accent:       #4da3ff;   /* アクセントブルー（ボタン等） */
  --color-text:         #1f2933;   /* メインテキスト */
  --color-text-gray:    #6b7280;   /* サブテキスト */
  --color-text-light:   #cbd5e1;   /* フッターテキスト */
  --color-text-date:    #d4cfcf;   /* 日付テキスト */
  --color-title:        #111827;   /* セクション見出し */
  --color-heading-blue: #1e3a8a;   /* ヒーロー見出し */
  --color-bg-white:     #ffffff;
  --color-bg-light:     #f8fafc;   /* サービスセクション背景 */
  --color-bg-card:      #fafafa;   /* カード背景 */
  --color-border:       #e5e7eb;

  /* Typography */
  --font-jp: 'Noto Sans JP', sans-serif;
  --font-en: 'Playfair Display', serif;

  /* Spacing */
  --section-px: clamp(24px, 6vw, 100px);
  --section-py-top:    96px;
  --section-py-bottom: 74px;

  /* Shadows */
  --shadow-card: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);

  /* Border radius */
  --radius-card: 8px;
  --radius-btn:  8px;
}

/* ------------------------------------------------------------
   2. リセット・ベーススタイル
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-jp);
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* ------------------------------------------------------------
   3. ヘッダー
   ------------------------------------------------------------ */
.site-header {
  background-color: var(--color-bg-white);
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px var(--section-px);
  max-width: 1200px;
  margin: 0 auto;
}

/* ロゴ */
.header-logo {
  flex-shrink: 0;
  max-width: 200px;
  width: 100%;
  height: 52px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.header-logo a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.header-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ヘッダー右カラム */
.header-right {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  padding-left: 16px;
}

/* SNS + Contact 行 */
.header-top-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.sns-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sns-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--color-text);
  opacity: 0.7;
  transition: color 0.3s, opacity 0.3s;
}

.sns-link:hover {
  opacity: 1;
}

.sns-link--x:hover {
  color: #000000;
}

.sns-link--instagram:hover {
  color: #E4405F;
}

.sns-link--facebook:hover {
  color: #1877F2;
}

.sns-link svg {
  width: 100%;
  height: 100%;
}

.sns-link img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Contact ボタン */
.btn-contact {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 20px 0 16px;
  background-color: var(--color-accent);
  color: #ffffff;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.2s, opacity 0.2s;
}

.btn-contact:hover {
  opacity: 0.85;
}

.btn-contact svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ナビゲーション */
.header-nav {
  padding: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 2.5vw, 28px);
  height: 36px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding-bottom: 4px;
  position: relative;
}

/* アクティブ下線 */
.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--color-accent);
  border-radius: 1px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--color-accent);
}

.nav-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ------------------------------------------------------------
   4. セクション共通
   ------------------------------------------------------------ */
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--section-py-top) var(--section-px) var(--section-py-bottom);
  overflow: hidden;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  margin-bottom: 32px;
}

.section-title-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.section-title-en {
  font-family: var(--font-en);
  font-size: 26px;
  font-weight: 700;
  color: var(--color-title);
  letter-spacing: 0.014em;
  line-height: 1;
}

.section-title-ja {
  font-family: var(--font-jp);
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-gray);
  line-height: 1;
  margin-bottom: 2px;
}

.section-desc {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-gray);
}

/* 「もっと見る」リンク */
.section-more {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 22px 10px;
}

.btn-more {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  transition: color 0.2s;
}

.btn-more:hover {
  color: var(--color-accent);
}

.btn-more img,
.btn-more svg {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ------------------------------------------------------------
   5. フッター
   ------------------------------------------------------------ */
.site-footer {
  background: linear-gradient(102.45deg, #1f3a5f 0%, rgba(31, 58, 95, 0.96) 100%);
  color: var(--color-text-light);
  padding: 0 var(--section-px);
}

/* フッターロゴは白で表示 */
.footer-left img {
  filter: brightness(0) invert(1) opacity(0.8);
}

/* フッターのインラインSVGアイコンはcurrentColorで色制御 */
.footer-contact-title svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.footer-nav-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* フッター上段 */
.footer-upper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 26px var(--section-px) 0;
  min-height: 207px;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 32px 10px 10px;
}

.footer-logo img {
  width: 193px;
  height: 59px;
  object-fit: contain;
}

.footer-tagline {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-light);
  line-height: 1.43;
}

.footer-center {
  display: flex;
  align-items: center;
  padding: 32px 0 10px;
}

.footer-company-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--color-text-light);
  opacity: 0.8;
  line-height: 1.6;
}

.footer-company-name {
  font-weight: 700;
  font-size: 13px;
}

.footer-company-email a {
  color: var(--color-text-light);
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer-company-email a:hover {
  opacity: 0.7;
}

.footer-right {
  display: flex;
  align-items: center;
}

.footer-contact-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px 24px;
  background-color: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
}

.footer-contact-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 500;
  color: #ffffff;
}


.footer-contact-desc {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-light);
  white-space: nowrap;
  line-height: 1.43;
}

.btn-contact-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 44px;
  background-color: var(--color-accent);
  color: #ffffff;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.btn-contact-footer:hover {
  opacity: 0.85;
}

/* フッターナビ */
.footer-nav-wrap {
  padding: 28px var(--section-px) 24px;
}

.footer-nav-list {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.5vw, 28px);
  flex-wrap: wrap;
}

.footer-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-light);
  transition: color 0.2s;
}

.footer-nav-link:hover {
  color: var(--color-accent);
}


/* フッター下段（コピーライト） */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 10px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.copyright {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-light);
  text-align: center;
  white-space: nowrap;
  width: 100%;
}

/* ------------------------------------------------------------
   6. TOPへ戻るボタン
   ------------------------------------------------------------ */
.back-to-top {
  position: fixed;
  right: 0;
  bottom: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 12px 15px 12px 12px;
  background-color: var(--color-primary);
  color: #ffffff;
  border-radius: 12px 0 0 12px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateX(20px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  z-index: 200;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.back-to-top:hover {
  background-color: #2a4d7a;
}

.back-to-top__arrow {
  font-size: 18px;
  line-height: 1;
  display: block;
}

.back-to-top__label {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-jp);
  line-height: 1;
}

/* ------------------------------------------------------------
   7. ライトボックスオーバーレイ
   ------------------------------------------------------------ */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.lightbox-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  font-size: 40px;
  color: #ffffff;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.lightbox-close:hover {
  opacity: 1;
}

/* ============================================================
   8. 共通コンポーネント（ページ横断で使用）
   ============================================================ */

/* ------------------------------------------------------------
   8-1. アクティブナビゲーション
   （旧: about.css / works.css / blog.css / blog-article.css /
         service.css / work-detail.css / contact.css で重複定義）
   ------------------------------------------------------------ */
.nav-item.active .nav-link--active {
  color: #3995ff;
}

.nav-active-arrow {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
}

.nav-active-arrow img {
  width: 24px;
  height: auto;
  object-fit: contain;
}

/* ------------------------------------------------------------
   8-2. パンくずリスト
   （旧: about.css / works.css / blog.css / blog-article.css /
         service.css / work-detail.css / contact.css で重複定義）
   ------------------------------------------------------------ */
.breadcrumb {
  padding: 10px 0;
  margin-bottom: 32px;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 24px;
  font-weight: 400;
  font-family: var(--font-jp);
}

.breadcrumb-link {
  color: var(--color-text);
  transition: color 0.2s;
}

.breadcrumb-link:hover {
  color: var(--color-accent);
}

.breadcrumb-sep {
  color: var(--color-text-gray);
  padding: 0 4px;
  letter-spacing: -0.5em;
  font-size: 20px;
}

.breadcrumb-item--current {
  color: #3995ff;
}

/* ------------------------------------------------------------
   8-3. ページインナーラッパー（統一クラス）
   （旧: .about-page-inner / .blog-page-inner /
         .article-page-inner / .contact-page-inner /
         .service-page-inner / .detail-page-inner /
         .works-page-inner）
   ------------------------------------------------------------ */
.page-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--section-py-top) var(--section-px) var(--section-py-bottom);
}

/* ------------------------------------------------------------
   8-4. ページタイトルエリア（統一クラス）
   （旧: .blog-title-area / .contact-title-area /
         .service-title-area）
   ------------------------------------------------------------ */
.page-title-area {
  padding: 0 0 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ------------------------------------------------------------
   8-5. フィルターバー・フィルターボタン（統一クラス）
   （旧: works.css .category-filter/.category-btn /
         blog.css .blog-category-filter/.blog-cat-btn /
         blog-article.css .article-category-filter/.article-cat-btn）
   ------------------------------------------------------------ */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2vw, 24px);
  padding: 10px 0;
  margin-bottom: 20px;
  min-height: 44px;
  flex-wrap: wrap;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  background: none;
  border: none;
  padding: 6px 4px 8px;
  position: relative;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s;
  font-family: var(--font-jp);
}

.filter-btn:hover {
  color: var(--color-accent);
}

.filter-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.filter-btn--active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--color-accent);
  border-radius: 2px;
}

/* ------------------------------------------------------------
   8-6. ページネーション（統一クラス）
   （旧: works.css .pagination/.page-btn /
         blog.css .blog-pagination/.blog-page-btn）
   ------------------------------------------------------------ */
.pagination {
  padding: 22px 70px;
}

.pagination__list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  list-style: none;
}

.pagination__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 500;
  color: var(--color-text);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 4px 2px;
  cursor: pointer;
  font-family: var(--font-jp);
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.pagination__btn:hover {
  color: var(--color-accent);
}

.pagination__btn--active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.pagination__btn--next {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom-color: var(--color-text);
  color: var(--color-text);
}

.pagination__btn--next:hover {
  border-bottom-color: var(--color-accent);
  color: var(--color-accent);
}

.pagination__btn--next img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.pagination__ellipsis {
  font-size: 24px;
  font-weight: 500;
  color: var(--color-text);
}

/* ------------------------------------------------------------
   8-7. CTA ボタン（統一クラス）
   （旧: about.css / service.css / contact.css で重複定義）
   ------------------------------------------------------------ */

/* アウトラインボタン（Work を見る） */
.btn-cta-outline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 12px 24px;
  border: 2px solid #1e40af;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 500;
  color: #1e40af;
  background-color: transparent;
  transition: background-color 0.2s, color 0.2s;
}

.btn-cta-outline:hover {
  background-color: #1e40af;
  color: #ffffff;
}

.btn-cta-outline img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.btn-cta-outline:hover img {
  filter: brightness(0) invert(1);
}

/* フィルボタン（お問い合わせ） */
.btn-cta-fill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border: 2px solid #d4cfcf;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  background-color: #2563eb;
  transition: opacity 0.2s;
}

.btn-cta-fill:hover {
  opacity: 0.85;
}

.btn-cta-fill img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
