/* ============================================
   common.css - ヘッダー・フッター共通スタイル
   株式会社NDC コーポレートサイト
   ============================================ */

/* ----------------------------------------
   カラー変数
   ---------------------------------------- */
:root {
  /* --- ベースカラー --- */
  --color-black: #000000;
  /* 背景・ボタン・見出し */
  --color-white: #ffffff;
  /* 背景・テキスト反転 */
  --color-bg-light: #f8f8f8;
  /* ページ背景・SPナビ背景 */
  --color-bg-cream: #feffee;
  /* ホームセクション背景 */

  /* --- テキストカラー --- */
  --color-text: #333333;
  /* 本文 */
  --color-text-dark: #1f1f1f;
  /* 見出し・強調テキスト */
  --color-text-muted: #494e42;
  /* フッターコピーライト */

  /* --- ボーダー・ライン --- */
  --color-border: #dedede;
  /* 区切り線 */

  /* --- アクセントカラー --- */
  --color-accent: #0098db;
  /* ボタンアクセント */
  --color-green: #57a353;
  /* NDCロゴ グリーン / ナビhoverカラー */
  --color-recruitment-green: #70CE0C;
  /* NDCロゴ グリーン / ナビhoverカラー */

  /* --- タイトル --- */
  --color-title-green: #80A353;
  /* 見出し2 green*/
  --color-title-umi: #5391A3;
  /* 見出し2::after umi*/

  /* --- ボックスシャドウ --- */
  --color-shadow: #8ABDB0;
  /* 事業内容 */

  /* テーブルセル背景 */
  --color-cell-bg: #edfcff;

  /* 警告色 */
  --color-red: #eb4747;

}

/* ----------------------------------------
   リセット・基本設定
   ---------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  color: var(--color-text);
  background-color: var(--color-white);
  line-height: 1.7;
  overflow-x: hidden;
  width: 100%;
}

main {
  width: 100%;
  display: block;
  overflow-x: hidden;
}

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

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

ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bg-default {
  background-color: var(--color-bg-cream);
}

.bg-white {
  background-color: var(--color-bg-light);
}

.sign {
  font-family: "Yuji Syuku", serif;
  font-weight: 400;
  font-style: normal;
  color: var(--color-text-dark);
  font-size: 26px;
}

.sp-only {
  display: none;
}

.pc-only {
  display: block;
}

p a,
td a,
address a {
  font-weight: 500;
  text-decoration: underline;
  color: var(--color-title-umi);
}

p a:hover,
p a:active,
p a:focus,
td a:hover,
td a:active,
td a:focus,
address a:hover,
address a:active,
address a:focus {
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text-muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 64px;
}

table th,
table td {
  padding: 16px;
  font-size: 16px;
  line-height: 1.6;
  border-bottom: 1px solid var(--color-border);
  border-left: 1px solid var(--color-border);
  vertical-align: top;
  text-align: left;
}

table th {
  width: 15em;
  font-weight: 500;
  color: var(--color-text-dark);
  background-color: var(--color-bg-light);
  vertical-align: middle;
}

table td {
  color: var(--color-text);
  border-right: 1px solid var(--color-border);
  background-color: var(--color-white);

  ul {
    list-style-type: disc;
    margin-left: 24px;
    margin-bottom: 4px;
  }
}

table tr:first-child th,
table tr:first-child td {
  border-top: 1px solid var(--color-border);
}


@media (max-width: 540px) {
  table th {
    width: auto;
    white-space: normal;
    border-bottom: none;
  }

  table th,
  table td {
    display: block;
    width: 100%;
    padding: 12px 16px;
  }

  table tr:first-child th {
    border-top: 1px solid var(--color-border);
  }

  table tr:first-child td {
    border-top: none;
  }

  table th {
    border-right: 1px solid var(--color-border);
    background-color: var(--color-bg-light);
  }
}

::placeholder {
  color: #ccc;
}


/* ----------------------------------------
   ヘッダー
   ---------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 68px;
  z-index: 100;
  background-color: transparent;
  transition: background-color 0.3s ease;
}

/* スクロール後のヘッダー（JSでクラス付与） */
.site-header.is-scrolled {
  height: 61px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ロゴ */
.site-logo {
  margin: 0;
  line-height: 1;
}

.site-logo a {
  display: block;
}

.logo-default {
  display: none;
  height: 36px;
  width: auto;
}

.logo-white {
  display: block;
  height: 36px;
  width: auto;
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.3));
}

.site-header.logo-is-default .logo-white {
  display: none;
}

.site-header.logo-is-default .logo-default {
  display: block;
}

/* グローバルナビ */
.gnav {
  margin-left: auto;
}

.gnav-list {
  display: flex;
  align-items: center;
  gap: 24px;
}

.gnav-link {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-white);
  letter-spacing: 0.05em;
  transition: color 0.2s ease;
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.3));
}

.logo-is-default .gnav-link {
  filter: none;
}

.gnav-link:hover,
.gnav-link.is-current {
  color: var(--color-green);
  transition: color 0.2s ease;
  filter: none;
}

.site-header.logo-is-default .gnav-link,
.site-header.is-scrolled.logo-is-default .gnav-link {
  color: var(--color-black);
  transition: color 0.2s ease;
}

.site-header.logo-is-default .gnav-link:hover,
.site-header.is-scrolled.logo-is-default .gnav-link:hover,
.site-header.logo-is-default .gnav-link.is-current,
.site-header.is-scrolled.logo-is-default .gnav-link.is-current {
  color: var(--color-green);
  transition: color 0.2s ease;
}


/* ハンバーガーボタン（SP用） */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  width: 28px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background-color: var(--color-white);
  transition: transform 0.3s ease, opacity 0.3s ease;
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.3));
}

.hamburger span:nth-child(1) {
  width: 80%;
}

.hamburger span:nth-child(3) {
  width: 60%;
}


.site-header.is-scrolled.logo-is-default .hamburger span,
.site-header.logo-is-default .hamburger span {
  background-color: var(--color-text-muted);
}

/* ----------------------------------------
   フッター
   ---------------------------------------- */
.site-footer {
  padding: 20px 0;
  background-color: var(--color-bg-cream);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 65px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px;
}

.copyright {
  font-size: 15px;
  font-weight: 350;
  color: var(--color-black);
  letter-spacing: 0.03em;
}

/* ----------------------------------------
   共通ユーティリティ
   ---------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ----------------------------------------
   レスポンシブ
   ---------------------------------------- */
@media (max-width: 768px) {
  .site-header {
    height: 76px;
  }

  .site-header.is-scrolled {
    height: 76px;
  }

  .header-inner {
    padding: 0 20px;
  }

  .gnav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .logo-default {
    height: 36px;
  }

  .logo-white {
    height: 36px;
  }

  .footer-inner {
    padding: 0 20px;
  }

  .copyright {
    font-size: 13px;
  }

  .sp-only {
    display: inline-block;
  }

  .pc-only {
    display: none;
  }

  .sign {
    font-size: 22px;
  }


}

/* ----------------------------------------
   SP ナビゲーション (offcanvas)
   ---------------------------------------- */

/* Bootstrap offcanvas の上書き */
#spNav.offcanvas {
  background-color: var(--color-bg-cream);
  width: 100%;
  max-width: 390px;
  border-left: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  background-image: url(../img/bg_sp_nav.webp);
  background-position: 93% bottom;
  background-size: auto 242px;
  background-repeat: no-repeat;
}

/* ヘッダー: ロゴ + 閉じるボタン */
.sp-nav-header {
  height: 80px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  flex-shrink: 0;
}

.sp-nav-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.sp-nav-logo img {
  height: 32px;
  width: auto;
}

.sp-nav-close {
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  margin-top: -4px;
}

/* ナビリスト */
.sp-nav-body {
  padding: 0 24px;
  flex: 0 1 auto;
  margin-bottom: 20px;
}

.sp-nav-list {
  position: relative;
  padding-left: 74px;
}

.sp-nav-item {
  position: relative;
}

/* 各アイテムの左横線マーク（Figma: li-mark の Line 要素） */
.sp-nav-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 2px;
  background-color: var(--color-green);
}

.sp-nav-link {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-muted);
  padding: 14px 0;
  letter-spacing: 0.02em;
  transition: opacity 0.2s ease;
  margin-left: 8px;
}

.sp-nav-link:hover,
.sp-nav-link:focus,
.sp-nav-link:active,
.sp-nav-link.is-current {
  color: var(--color-green);
  opacity: 0.6;
}

/* 採用サイトエリア */
.sp-nav-recruit {
  position: relative;
  margin: 24px;
  height: auto;
  overflow: hidden;
  flex-shrink: 0;
  display: grid;
  place-content: center;
}

.sp-nav-recruit-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sp-nav-recruit-btn {
  display: block;
  width: 274px;
  margin: 0 auto;
}

.sp-nav-recruit-btn:hover {
  color: var(--color-white);
  opacity: 0.8;
}

/* ハンバーガーアニメーション: offcanvas open時 */
.hamburger.is-open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.hamburger.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.is-open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* キラッとエフェクト */
.kirara {
  margin: 0;
  padding: 0;
  background: #fff;
  overflow: hidden;
  position: relative;
}

.kirara::before {
  position: absolute;
  top: 0;
  left: -75%;
  z-index: 2;
  display: block;
  content: '';
  width: 50%;
  height: 100%;
  background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .3) 100%);
  background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .3) 100%);
  -webkit-transform: skewX(-25deg);
  transform: skewX(-25deg);
}

.kirara:hover::before,
.kirara:active::before,
.kirara:focus::before {
  -webkit-animation: shine .75s;
  animation: shine .75s;
}

@-webkit-keyframes shine {
  100% {
    left: 125%;
  }
}

@keyframes shine {
  100% {
    left: 125%;
  }
}