/*
Theme Name: Sales Knowledge Lab
Theme URI: https://example.com
Description: NSJAPAN営業支援サービスのWordPressテーマ
Author: Your Name
Author URI: https://example.com
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sales-knowledge-lab
*/

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
  /* Colors */
  --color-primary: #1c2a74;
  --color-primary-light: #1a31ad;
  --color-accent: #c28c19;
  --color-text: #333444;
  --color-text-light: #4a5565;
  --color-white: #ffffff;
  --color-gray: #fafafa;
  --color-gray-light: #f0f6ff;
  --color-border: #e5e7eb;
  --color-border-light: #dddddd;

  /* Gradients */
  --gradient-primary: linear-gradient(
    157.87deg,
    #0020c5 20.598%,
    #3c276d 81.044%
  );
  --gradient-hero: linear-gradient(138deg, #0020c5 20.6%, #3c276d 81.04%);
  --gradient-button: linear-gradient(
    169.383deg,
    #0020c5 20.598%,
    #3f13a7 81.044%
  );
  --gradient-section: linear-gradient(90deg, #f0f6ff 0%, #f0f6ff 100%);
  --gradient-assignment: linear-gradient(90deg, #1c2a74 0%, #1c2a74 100%);

  /* Typography */
  --font-primary: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --font-mincho: "Yu Mincho", "YuMincho", serif;
  --font-gothic: "Yu Gothic Medium", "Yu Gothic", "YuGothic",
    "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;

  /* Spacing */
  --container-width: 1200px;
  --section-padding: 80px;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-full: 9999px;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-primary);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul,
ol {
  list-style: none;
}

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

input,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 24px 60px;
  transition: background-color 0.3s ease;
}

.header.is-scrolled {
  background-color: rgba(255, 255, 255, 0.95);
}

.home .header.is-scrolled {
  background-color: rgba(0, 0, 0, 0.8);
}

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header__logo {
  display: flex;
  align-items: center;
}

.header__logo a {
  display: block;
  line-height: 1;
}

.header__logo img {
  height: 28px;
  width: auto;
}

.header__logo-text {
  font-family: var(--font-primary);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

body.home .header__logo-text {
  color: var(--color-white);
}

/* body.home .header__inner {
  justify-content: flex-end;
} */

.header__nav-list {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* wp_nav_menu が生成するメニューアイテム */
.header__nav-list .menu-item a {
  color: var(--color-white);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.3125px;
  transition: opacity 0.3s ease;
  text-decoration: none;
}

.header__nav-list .menu-item a:hover {
  opacity: 0.8;
}

/* Header on non-front-page */
body:not(.home) .header__nav-list .menu-item a {
  color: #222;
}

/* 現在のページのメニューアイテム */
.header__nav-list .current-menu-item a {
  opacity: 0.7;
}

/* ハンバーガーメニューボタン（デスクトップでは非表示） */
.header__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 101;
}

.header__hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #222;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

body.home .header__hamburger-line {
  background-color: var(--color-white);
}

/* メニュー開いた状態はボタンの色を黒に */
body.home .header__hamburger.is-active .header__hamburger-line {
  background-color: #222;
}

/* ハンバーガーメニュー開いた状態 */
.header__hamburger.is-active .header__hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.header__hamburger.is-active .header__hamburger-line:nth-child(2) {
  opacity: 0;
}

.header__hamburger.is-active .header__hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer__main {
  background: #000;
  padding: 48px 0;
}

.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.footer__logo a {
  display: block;
}

.footer__logo img {
  height: 24px;
  width: auto;
}

.footer__logo-text {
  font-family: var(--font-primary);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-white);
  text-decoration: none;
}

.footer__nav-list {
  display: flex;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__nav-list li a {
  font-family: var(--font-primary);
  font-size: 14px;
  color: var(--color-white);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.footer__nav-list li a:hover {
  opacity: 0.7;
}

.footer__copyright {
  background: #1c2a74;
  padding: 16px 0;
  text-align: center;
}

.footer__copyright p {
  font-family: var(--font-primary);
  font-size: 12px;
  color: var(--color-white);
  margin: 0;
}

/* ==========================================================================
   Responsive - Tablet (1024px)
   ========================================================================== */
@media screen and (max-width: 1024px) {
  .header {
    padding: 20px 30px;
  }

  .header__nav-list {
    gap: 20px;
  }

  .header__nav-link {
    font-size: 14px;
  }
}

/* ==========================================================================
   Responsive - Mobile (767px)
   ========================================================================== */
@media screen and (max-width: 767px) {
  :root {
    --section-padding: 40px;
  }

  .header {
    padding: 16px 20px;
  }

  .header__logo img {
    width: 178px;
    height: auto;
  }

  /* ハンバーガーボタン表示 */
  .header__hamburger {
    display: flex;
  }

  /* モバイルナビゲーション */
  .header__nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--color-white);
    padding: 80px 30px 40px;
    transition: right 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 100;
  }

  .header__nav.is-open {
    right: 0;
  }

  .header__nav-list {
    flex-direction: column;
    gap: 0;
  }

  .header__nav-list .menu-item {
    border-bottom: 1px solid var(--color-border);
  }

  .header__nav-list .menu-item a {
    display: block;
    padding: 16px 0;
    color: #222 !important;
    font-size: 16px;
  }

  /* オーバーレイ */
  body.menu-open::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
  }

  body.menu-open {
    overflow: hidden;
  }

  .footer__main {
    padding: 32px 0;
  }

  .footer__inner {
    gap: 20px;
  }

  .footer__nav-list {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 24px;
  }

  .footer__nav-list li a {
    font-size: 12px;
  }

  .footer__copyright {
    padding: 12px 0;
  }

  .footer__copyright p {
    font-size: 10px;
  }
}
