/* 日テレHR総合研究所 カスタムCSS */

/* カラー変数 */
:root {
  --primary-color: #ee7901;
  --primary-dark: #d66d01;
  --primary-light: #f93;
  --secondary-color: #002c5a;
  --secondary-light: #004080;
  --text-color: #333;
  --text-light: #666;
  --text-lighter: #999;
  --bg-light: #f8f9fa;
  --white: #fff;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .08);
  --shadow-md: 0 4px 15px rgba(0, 0, 0, .1);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, .15);
  --border-color: #e9ecef;
  --table-bg-color: #EAF0F6;
}

/* ベーススタイル */
/* * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
} */

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

/* body {
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
  color: var(--text-color);
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: all .3s ease;
} */

/* タイポグラフィ */
/* h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.3;
  word-break: auto-phrase;
  color: var(--secondary-color);
}

h1 {
  font-size: 3rem;
  letter-spacing: .02em;
}

h2 {
  font-size: 2.5rem;
  letter-spacing: .01em;
}

h3 {
  font-size: 2rem;
}

h4 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

:target {
  scroll-margin-block-start: 80px;
}

.sr-only {
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  white-space: nowrap;
  border-width: 0;
} */

/* グラデーション背景 */
.gradient-primary {
  background: linear-gradient(135deg, #ee7801 0%, #f93 100%);
}

.gradient-primary-dark {
  background: linear-gradient(135deg, #d66d01 0%, #ee7801 100%);
}

.gradient-secondary {
  background: linear-gradient(135deg, #002c5a 0%, #004080 100%);
}

.gradient-light {
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}

.gradient-warm {
  background: linear-gradient(135deg, #fff8f0 0%, #ffe6cc 100%);
}

.gradient-cool {
  background: linear-gradient(135deg, #e6f2ff 0%, #cce5ff 100%);
}

.gradient-overlay {
  position: relative;
  z-index: 1;
}

.gradient-overlay::before {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  background: linear-gradient(135deg, rgba(0, 44, 90, .9) 0%, rgba(0, 64, 128, .8) 100%);
  content: "";
}

/* ヘッダー */
.header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
  background: rgba(255, 255, 255, .98);
  transition: all .3s ease;
  backdrop-filter: blur(10px);
}

.header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, .1);
}

.header-container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  max-width: 1400px;
  min-height: 80px;
  max-height: fit-content;
  margin: 0 auto;
  padding: .75rem 2rem;
}

.logo {
  flex-shrink: 0;
}

.logo img {
  width: auto;
  height: 45px;
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  column-gap: 1.75rem;
  list-style: none;
}

.nav-link {
  position: relative;
  padding: .5rem 0;
  font-weight: 500;
  font-size: .95rem;
  white-space: nowrap;
  color: var(--text-color);
  transition: color .3s ease;
}

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

.nav-link::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width .3s ease;
  content: "";
}

.nav-link:hover::after {
  width: 100%;
}

.header-cta {
  display: flex;
  flex-shrink: 0;
  justify-content: flex-end;
  gap: .75rem;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: .5rem;
  cursor: pointer;
  border: none;
  background: none;
}

.menu-toggle span {
  width: 25px;
  height: 2px;
  background: var(--secondary-color);
  transition: all .3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6.5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6.5px, -5px);
}

/* ボタンスタイル */
.btn {
  display: inline-block;
  padding: .875rem 2rem;
  font-weight: 600;
  font-size: .95rem;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  border-radius: 50px;
  transition: all .3s ease;
}

.btn-primary {
  color: var(--white);
  box-shadow: 0 4px 15px rgba(238, 120, 1, .3);
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(238, 120, 1, .4);
  transform: translateY(-2px);
}

.btn-secondary {
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
  background: transparent;
}

.btn-secondary:hover {
  color: var(--white);
  background: var(--secondary-color);
}

.btn-white {
  color: var(--primary-color);
  box-shadow: var(--shadow-md);
  background: var(--white);
}

.btn-white:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1.125rem 2.5rem;
  font-size: 1.1rem;
}

.btn-sm {
  padding: .5rem 1.25rem;
  font-size: .8125rem;
}

/* セクション */
.section {
  position: relative;
  padding: 100px 0;
}

.section-sm {
  padding: 60px 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-header {
  max-width: 800px;
  margin: 0 auto 4rem;
  text-align: center;
}

.section-title {
  margin-bottom: 1.5rem;
  font-size: 2.5rem;
  color: var(--secondary-color);
}

.section-subtitle {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-light);
}

.badge {
  display: inline-block;
  margin-bottom: 1rem;
  padding: .5rem 1.25rem;
  font-weight: 600;
  font-size: .875rem;
  color: var(--white);
  border-radius: 50px;
  background: var(--primary-color);
}

/* カード */
@media (min-width: 768px) and (max-width: 1023px) {
  .card-wrapper-1 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) and (max-width: 1280px) {
  .card-wrapper-1 {
    grid-template-columns: repeat(3, 1fr);
  }
  .card-wrapper {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1280px) {
  .card-wrapper-1 {
    grid-template-columns: repeat(3, 1fr);
  }
  .card-wrapper {
    grid-template-columns: repeat(4, 1fr);
  }
}
.card {
  display: grid;
  grid-template-rows: max-content 1fr;
  height: 100%;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  background: var(--white);
  transition: all .3s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-10px);
}

.card-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 16px 16px 0 0;
}

.card-body {
  display: grid;
  align-content: end;
  padding: 2rem;
}

.card-title {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: var(--secondary-color);
}

.card-text {
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

.card-category {
  display: inline-block;
  margin-bottom: .75rem;
  padding: .375rem .875rem;
  font-weight: 500;
  font-size: .875rem;
  color: var(--text-color);
  border-radius: 20px;
  background: var(--bg-light);
}

/* グリッド */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ヒーローセクション */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 600px;
  padding: 150px 2rem 100px;
  text-align: center;
  color: var(--white);
}

.hero-bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -2;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::before {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  background: linear-gradient(135deg, rgba(0, 44, 90, .85) 0%, rgba(0, 64, 128, .75) 100%);
  content: "";
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.hero-title {
  margin-bottom: 1.5rem;
  font-weight: 800;
  font-size: 3.5rem;
  line-height: 1.2;
  color: var(--white);
}

.hero-lead {
  margin-bottom: 2.5rem;
  font-size: 1.25rem;
  line-height: 1.8;
  opacity: .95;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

/* アイコンボックス */
.icon-box {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 3;
  justify-items: center;
  gap: 0;
  height: 100%;
  padding: 2.5rem 2rem;
  text-align: center;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  background: var(--white);
  transition: all .3s ease;
}

.icon-box:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-10px);
}

.icon-box-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80px;
  height: 80px;
  margin-bottom: 1.5rem;
  font-size: 2.5rem;
  color: var(--white);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

.icon-box-title {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  color: var(--secondary-color);
}

.icon-box-text {
  line-height: 1.7;
  word-break: auto-phrase;
  color: var(--text-light);
}

/* テーブル */
.table-responsive {
  overflow-x: auto;
  margin: 2rem 0;
}

.table {
  overflow: hidden;
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  background: var(--white);
  border-collapse: separate;
  border-spacing: 0;
}

.table thead th {
  padding: 1.25rem 1.5rem;
  font-weight: 700;
  text-align: left;
  color: var(--white);
  border-bottom: 2px solid var(--secondary-light);
  background: var(--secondary-color);
}

/* レベルテーブル用：ヘッダーを中央揃え */
.table-level thead th {
  text-align: center;
}

/* レベルテーブル用：最初の3つのthの背景色を変更 */
.table-level thead th:nth-of-type(1),
.table-level thead th:nth-of-type(2),
.table-level thead th:nth-of-type(3) {
  background: var(--table-bg-color);
  color: var(--secondary-color);
  border-bottom: 2px solid var(--border-color);
}

/* レベルテーブル用：tbodyの2列目以降を中央揃え */
.table-level tbody td:nth-of-type(n+2) {
  text-align: center;
}

/* レベルテーブル用：2つ目と3つ目のtdの文字色を薄く */
.table-level tbody td:nth-of-type(2),
.table-level tbody td:nth-of-type(3) {
  color: var(--text-light);
}

/* レベルテーブル用：4つ目のtdを太字、背景色を少し濃く */
.table-level tbody td:nth-of-type(4) {
  font-weight: 700;
  background-color: var(--bg-light);
}

.table tbody td {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.table tbody td:first-of-type {
  font-weight: 700;
  color: var(--secondary-color);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background: var(--bg-light);
}

@media (max-width: 767.98px) {
  .table-responsive {
    border-radius: calc(12 * var(--rem));
  }

  .table {
    inline-size: 240%;
  }

  .table thead th {white-space: nowrap;}
  .table thead th:first-of-type,
  .table tbody td:first-of-type { padding-inline-end: unset; }
  .table tbody td { text-align: justify; }
  .table tbody td:nth-of-type(1) { inline-size: calc(110 * var(--rem)); }
  .table tbody td:nth-of-type(2) { inline-size: calc(347 * var(--rem)); }
  .table tbody td:nth-of-type(3) { inline-size: calc(347 * var(--rem)); }
  
  /* レベルテーブル用：4列対応 */
  .table-level {
    inline-size: 320%;
  }
  .table-level tbody td:nth-of-type(1) { inline-size: calc(110 * var(--rem)); }
  .table-level tbody td:nth-of-type(2),
  .table-level tbody td:nth-of-type(3),
  .table-level tbody td:nth-of-type(4) { inline-size: calc(347 * var(--rem)); }

}

@media (min-width: 768px) {
  .table thead th:nth-of-type(1) { inline-size: 15%; }
  .table thead th:nth-of-type(2) { inline-size: 42.5%; }
  .table thead th:nth-of-type(3) { inline-size: 42.5%; }
  
  /* レベルテーブル用：右3列の幅を同じにする */
  .table-level thead th:nth-of-type(1) { inline-size: 15%; }
  .table-level thead th:nth-of-type(2),
  .table-level thead th:nth-of-type(3),
  .table-level thead th:nth-of-type(4) { inline-size: calc(85% / 3); }
  .table-level tbody td:nth-of-type(1) { inline-size: 15%; }
  .table-level tbody td:nth-of-type(2),
  .table-level tbody td:nth-of-type(3),
  .table-level tbody td:nth-of-type(4) { inline-size: calc(85% / 3); }
}

/* フロー */
.flow {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 3rem;
}

.flow-item {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.flow-item::after {
  position: absolute;
  top: 50%;
  right: -2rem;
  font-weight: bold;
  font-size: 2rem;
  color: var(--primary-color);
  content: "→";
  transform: translateY(-50%);
}

.flow-item:last-child::after {
  display: none;
}

.flow-number {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 1rem;
  font-weight: bold;
  font-size: 1.5rem;
  color: var(--white);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

.flow-title {
  margin-bottom: .5rem;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--secondary-color);
}

.flow-text {
  font-size: .95rem;
  word-break: auto-phrase;
  color: var(--text-light);
}

/* CTA固定ボタン */
.cta-floating {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 999;
  visibility: hidden;
  transition: all .3s ease;
  opacity: 0;
}

.cta-floating.show {
  visibility: visible;
  opacity: 1;
}

.cta-floating-button {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--white);
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(238, 120, 1, .4);
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  transition: all .3s ease;
}

.cta-floating-button:hover {
  box-shadow: 0 6px 25px rgba(238, 120, 1, .5);
  transform: scale(1.05);
}

/* フッター */
.footer {
  padding: 4rem 0 2rem;
  color: var(--white);
  background: var(--secondary-color);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) and (max-width: 1280px) {
  .footer-column:nth-of-type(1) { grid-area: 1 / span 2; }
  .footer-column:nth-of-type(2) { grid-area: 2 / span 2; }
  .footer-column:nth-of-type(3) { grid-area: 2 / span 2; }
  .footer-column:nth-of-type(4) { grid-area: 1 / 3; align-self: end; }
}

.footer-column h4 {
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
  color: var(--white);
}

.footer-logo {
  inline-size: fit-content;
  margin-bottom: 1.5rem;
  padding: .625rem;
  background-color: #fff;
}

.footer-logo img {
  height: 40px;
}

.footer-text {
  margin-bottom: .75rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, .8);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: .75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, .8);
  transition: color .3s ease;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.footer .btn.btn-secondary.btn-sm {
  color: var(--secondary-color);
  background-color: #fff;
}

.footer-bottom {
  padding-top: 2rem;
  font-size: .875rem;
  text-align: center;
  color: rgba(255, 255, 255, .6);
  border-top: 1px solid rgba(255, 255, 255, .1);
}

/* アニメーション */
@keyframes fadeInUp {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.animate-on-scroll {
  transform: translateY(30px);
  opacity: 0;
}

.animate-on-scroll.fade-in-up {
  animation: fadeInUp .6s ease-out forwards;
  animation-fill-mode: forwards;
}

/* アニメーション後の状態を保持 */
/* .fade-in-up {
  transform: translateY(0);
  opacity: 1;
} */

/* ユーティリティ */
.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary-color);
}

.text-secondary {
  color: var(--secondary-color);
}

.mb-1 {
  margin-bottom: .5rem;
}
.mb-2 {
  margin-bottom: 1rem;
}
.mb-3 {
  margin-bottom: 1.5rem;
}
.mb-4 {
  margin-bottom: 2rem;
}
.mb-5 {
  margin-bottom: 3rem;
}

.mt-1 {
  margin-top: .5rem;
}
.mt-2 {
  margin-top: 1rem;
}
.mt-3 {
  margin-top: 1.5rem;
}
.mt-4 {
  margin-top: 2rem;
}
.mt-5 {
  margin-top: 3rem;
}

/* レスポンシブ */
@media (max-width: 1300px) {
  .header-container {
    gap: 1.5rem;
    max-width: 100%;
  }

  .nav-menu {
    column-gap: 1.5rem;
  }

  .nav-link {
    font-size: .9rem;
  }

  .header-cta .btn-sm {
    padding: .5rem 1.15rem;
    font-size: .8rem;
  }
}

@media (max-width: 1200px) {
  .header-container {
    gap: 1.25rem;
  }

  .nav-menu {
    column-gap: 1.25rem;
  }

  .nav-link {
    padding: .4rem 0;
    font-size: .875rem;
  }

  .header-cta {
    gap: .5rem;
  }

  .header-cta .btn-sm {
    padding: .5rem 1rem;
    font-size: .75rem;
  }
}

@media (max-width: 1100px) {
  .nav-menu {
    column-gap: 1rem;
  }

  .nav-link {
    font-size: .8125rem;
  }

  .header-cta .btn-sm {
    padding: .45rem .9rem;
    font-size: .7rem;
  }
}

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .header-container {
    gap: 1rem;
  }

  .nav-menu {
    column-gap: 1rem;
  }

  .nav-link {
    font-size: .8125rem;
  }

  .logo img {
    height: 40px;
  }
}

@media (max-width: 768px) {
  /* html {
    font-size: 14px;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  } */

  .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
  }

  .nav-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    flex-direction: column;
    gap: 0;
    width: 100%;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    background: var(--white);
    transition: left .3s ease;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu li {
    width: 100%;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
  }

  .menu-toggle {
    display: flex;
  }

  .header-cta {
    display: none;
  }

  .section {
    padding: 60px 0;
  }

  .container {
    padding: 0 1rem;
  }

  .hero {
    min-height: 500px;
    padding: 120px 1rem 80px;
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .hero-lead {
    font-size: 1.1rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .hero-cta .btn {
    width: 100%;
    max-width: 300px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .footer-column:nth-of-type(1) { grid-area: 1 / span 2; }
  .footer-column:nth-of-type(2) { grid-area: 2 / 1; }
  .footer-column:nth-of-type(3) { grid-area: 2 / 2; }
  .footer-column:nth-of-type(4) { grid-area: 3 / span 2; }

  .flow {
    flex-direction: column;
  }

  .flow-item::after {
    top: auto;
    right: auto;
    bottom: -3rem;
    left: 50%;
    content: "↓";
    transform: translateX(-50%);
  }

  .cta-floating {
    right: 20px;
    bottom: 20px;
  }

  .cta-floating-button {
    padding: .875rem 1.5rem;
    font-size: .875rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.875rem;
  }

  .section-title {
    font-size: 1.875rem;
  }
}

/* プリント用 */
@media print {
  .header,
  .cta-floating,
  .footer,
  .btn {
    display: none;
  }

  .section {
    padding: 2rem 0;
  }
}
