/*
Theme Name: japan-kohaku-ebike
Description: Minimal theme based on Underscores, simplified for a single product list display.
Version: 1.0.1
Text Domain: japan-kohaku-ebike
*/

/*--------------------------------------------------------------
# Base（タイポグラフィ調整）
--------------------------------------------------------------*/

html {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Meiryo", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;        /* 少しゆったりめにして読みやすく */
  font-weight: 400;        /* 軽めにしてボテっと感を削る */
  color: #111;             /* より締まった黒に */
  background: #fff;
  text-rendering: optimizeLegibility;
}

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

/* 見出しの調整：やや細めで洗練された印象に */
h1, h2, h3 {
  font-weight: 600;        /* 重すぎない見出しに */
  margin: 0 0 0.6em;
  letter-spacing: -0.01em; /* 少し詰めて落ち着いた印象 */
  line-height: 1.2;
}

/* 見出しサイズの基準 */
h1 { font-size: 2.0rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

/* リンク（色はモノクロ寄りにして派手さを削る） */
a {
  color: inherit;          /* テキストと同化しつつ下線等で示す */
  text-decoration: underline; /* 下線でクリック可能を明示 */
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #111;
  opacity: 0.85;
}


/*--------------------------------------------------------------
# Header（モダン・シンプル修正版）
--------------------------------------------------------------*/

/* ヘッダー全体 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 10000;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ロゴ部分 */
.site-branding {
  margin-right: 1.5rem;
}

.site-branding img {
  height: 36px;
  width: auto;
  transition: opacity 0.3s ease;
}

.site-branding img:hover {
  opacity: 0.8;
}

/* メニュー基本 */
.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation li {
  position: relative;
}

.main-navigation a {
  display: block;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: #111;
  text-decoration: none;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.main-navigation a:hover {
  color: #000;
  opacity: 0.6;
}

/* サブメニュー */
.sub-menu {
  display: none;
  position: absolute;
  background: #111;
  min-width: 180px;
  padding: 6px 0;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.sub-menu li a {
  color: #fff;
  padding: 10px 15px;
  font-size: 0.9rem;
}

.sub-menu li a:hover {
  background: #222;
}

/* ハンバーガーボタン */
.menu-toggle {
  display: none;
  font-size: 26px;
  background: none;
  border: none;
  cursor: pointer;
  color: #111;
}

/* --- PC --- */
@media (min-width: 768px) {
  #primary-menu {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  #primary-menu li {
    white-space: nowrap;
  }

  #primary-menu li:hover > .sub-menu {
    display: block;
  }
}

/* --- スマホ --- */
@media (max-width: 767px) {
  .menu-toggle {
    display: block !important;
  }

  #primary-menu {
    display: none !important;
    flex-direction: column !important;
    background: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    position: absolute !important;
    top: 60px !important;
    right: 1rem !important;
    width: 220px !important;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  #primary-menu.is-open {
    display: flex !important;
  }

  #primary-menu .sub-menu {
    display: none !important;
    position: static !important;
    background: #111 !important;
    width: 100% !important;
    border-radius: 0;
  }

  #primary-menu .sub-menu.is-open,
  #primary-menu .sub-open > .sub-menu {
    display: block !important;
  }

  #site-navigation,
  .site-header {
    position: relative;
    z-index: 9999 !important;
  }

  #primary-menu .menu-item-has-children > a {
    position: relative !important;
    z-index: 10000 !important;
    pointer-events: auto !important;
  }

  #primary-menu a {
    padding: 12px 16px;
    font-size: 0.95rem;
    color: #111;
  }

  #primary-menu a:hover {
    background: #f7f7f7;
  }
}


/* ============================
   Hero Slider（モダン・シンプル修正版）
============================ */

.hero-slider {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #000; /* ローディング時も黒背景で統一感 */
}

.hero-slider .slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slider .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

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

.hero-slider .slide.active {
  opacity: 1;
  z-index: 1;
}

/* オーバーレイ */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  z-index: 2;
  padding: 0 1.5rem;
}

.hero-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  max-width: 900px;
  line-height: 1.5;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

/* スクロール誘導 */
.hero-slider .scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  text-align: center;
  z-index: 3;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.hero-slider .scroll-indicator:hover {
  opacity: 1;
}

.hero-slider .scroll-indicator .arrow {
  display: block;
  font-size: 22px;
  transform: rotate(90deg);
  animation: bounce 1.5s infinite;
  margin-bottom: 6px;
}

.hero-slider .scroll-indicator .text {
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.9;
}

@keyframes bounce {
  0%, 100% {
    transform: rotate(90deg) translateY(0);
  }
  50% {
    transform: rotate(90deg) translateY(8px);
  }
}

/* スマホ調整 */
@media (max-width: 768px) {
  .hero-slider {
    height: 80vh;
  }

  .hero-title {
    font-size: 1.6rem;
    line-height: 1.6;
  }

  .hero-slider .slide:first-child img {
    object-position: 35% center;
  }
}

/* ============================
   Section Common（統一感）
============================ */

.section-title {
  text-align: center;
  font-size: 1.8em;
  font-weight: 600;
  margin: 2.5em 0 1em;
  color: #111;
  letter-spacing: 0.05em;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 50px;
  height: 2px;
  background: #111;
  margin: 0.5em auto 0;
  opacity: 0.6;
}

/* ============================
   Latest News（最新情報）
============================ */

.latest-news-text {
  padding: 1.5em;
  max-width: 900px;
  margin: auto;
  color: #111;
}

.latest-news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.latest-news-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0.8em 0;
  display: flex;
  align-items: center;
  gap: 1em;
  font-size: 0.95em;
  color: #333;
  transition: background 0.3s ease;
}

.latest-news-item:hover {
  background: rgba(0, 0, 0, 0.02);
}

.news-date {
  color: #777;
  white-space: nowrap;
  font-size: 0.9em;
}

.latest-news-item a {
  color: #111;
  text-decoration: none;
  flex: 1;
}

.latest-news-item a:hover {
  opacity: 0.7;
}


/* ============================
   Topic Banners（黒背景・高級感）
============================ */
.topic-banners {
  max-width: 1200px;
  margin: 4em auto;
  padding: 0 1.5em;
  background-color: #fff;
  color: #000;
}

.banner-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5em;
}

.banner-item img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.4s ease;
  opacity: 0.9;
}

.banner-item img:hover {
  transform: scale(1.03);
  opacity: 1;
}

/* スマホ対応 */
@media (max-width: 768px) {
  .banner-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================
   Instruction Sections（案内・リンクカード）
============================ */
.link-boxes {
  padding: 4em 1.5em;
  background-color: #111;
}

.instruction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2em;
  max-width: 1200px;
  margin: auto;
}

.instruction-card {
  text-align: center;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.instruction-card img {
  width: 100%;
  height: auto;
  opacity: 0.85;
  transition: opacity 0.4s ease;
}

.instruction-card:hover img {
  opacity: 1;
}

.instruction-card h3 {
  font-size: 1.1em;
  padding: 1em;
  color: #fff;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.instruction-card:hover {
  transform: translateY(-6px);
  border-color: #ffcc00; /* ブランドの黄色アクセント */
  box-shadow: 0 6px 16px rgba(255, 255, 255, 0.1);
}

/* ボタン */
.instruction-button {
  display: inline-block;
  background-color: #ffcc00;
  color: #000;
  padding: 0.8em 2em;
  border-radius: 4px;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  margin: 2em auto 0;
  transition: background-color 0.3s ease, transform 0.3s ease;
  display: block;
  width: max-content;
}

.instruction-button:hover {
  background-color: #fff;
  color: #000;
  transform: translateY(-2px);
}

/* ============================
   CTA Section（コールトゥアクション）
============================ */
.cta-section {
  background: #fff;
  color: #000;
  text-align: center;
  padding: 4em 1.5em;
  position: relative;
}

.cta-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  z-index: 0;
}

.cta-section h2 {
  position: relative;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 1em;
  z-index: 1;
}

.cta-button {
  position: relative;
  display: inline-block;
  margin-top: 1em;
  background: #ffcc00;
  color: #000;
  padding: 0.8em 2em;
  border-radius: 4px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
  z-index: 1;
}

.cta-button:hover {
  background: #000;
  color: #fff;
  transform: translateY(-2px);
}

/* ============================
   Page（共通ページデザイン）
============================ */
.page .hero {
  background: url('<?php echo get_template_directory_uri(); ?>/images/hero-bg.jpg') no-repeat center center;
  background-size: cover;
  height: 360px;
  margin-bottom: 3rem;
  position: relative;
}

.page .hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.page .site-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  color: #fff;
}

.page .entry-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  border-left: 4px solid #ffcc00;
  padding-left: 0.8em;
  letter-spacing: 0.03em;
}

.page .entry-content {
  font-size: 1.1rem;
  line-height: 1.9;
  color: #ddd;
}

.page .entry-content a {
  color: #ffcc00;
  text-decoration: none;
}

.page .entry-content a:hover {
  text-decoration: underline;
}


/*--------------------------------------------------------------
# Footer（黒背景×白文字×金アクセント）
--------------------------------------------------------------*/
.site-footer {
  background-color: #0d0d0d;
  color: #fff;
  font-family: "Noto Sans JP", "Hiragino Sans", sans-serif;
  padding-top: 2.5rem;
}

/* コンテナ中央寄せ */
.footer-widgets.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* カラム配置 */
.footer-menu-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

/* カラム共通 */
.footer-menu-column {
  flex: 1;
  min-width: 200px;
}

/* テキスト位置 */
.footer1 {
  text-align: left;
}
.footer2 {
  text-align: center;
}
.footer3 {
  text-align: right;
}

/* メニュー */
.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-menu li {
  margin-bottom: 0.5rem;
}

.footer-menu a {
  text-decoration: none;
  color: #ddd;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.footer-menu a:hover {
  color: #ffcc00;
  opacity: 1;
}

/* SNSアイコン */
.footer-social {
  text-align: center;
  padding: 1rem 0 0.5rem;
}

.footer-social a {
  display: inline-block;
  margin: 0 0.5rem;
  color: #fff;
  font-size: 1.6rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

.footer-social a:hover {
  color: #ffcc00;
  transform: scale(1.1);
}

/* コピーライト */
.site-info {
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
  background-color: #0d0d0d;
  color: #aaa;
  border-top: 1px solid #222;
  letter-spacing: 0.05em;
}

/* スマホ対応 */
@media (max-width: 768px) {
  .footer-menu-wrap {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer1, .footer2, .footer3 {
    text-align: center;
  }
}


/*--------------------------------------------------------------
# 404 Page（黒背景×金アクセント）
--------------------------------------------------------------*/
.error-404 {
  background: #000;
  color: #fff;
  text-align: center;
  padding: 120px 20px;
}

.error-404 .container {
  max-width: 800px;
  margin: 0 auto;
}

.error-title {
  font-size: 6rem;
  font-weight: 700;
  color: #ffcc00;
  letter-spacing: 0.05em;
  margin-bottom: 0.5em;
}

.error-subtitle {
  font-size: 1.8rem;
  color: #ccc;
  margin-bottom: 1rem;
}

.error-message {
  font-size: 1rem;
  color: #aaa;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.btn-home {
  display: inline-block;
  background: #ffcc00;
  color: #000;
  padding: 12px 30px;
  font-weight: 700;
  border-radius: 30px;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-home:hover {
  background: #fff;
  color: #000;
}

/*--------------------------------------------------------------
# Single Post Styles
--------------------------------------------------------------*/

/* コンテナ全体 */
.single .site-main .container {
  max-width: 960px;
  margin: 0 auto;
  padding: 100px 1.5rem 3rem; /* PC: 上100px、左右1.5rem、下3rem */
  font-family: "Noto Sans JP", "Hiragino Sans", sans-serif;
  line-height: 1.9;
  color: #000;
  background: #fff;
}

/* 記事タイトル */
.single .entry-header {
  padding-top: 0; /* containerのpaddingで余白調整 */
}

.single .entry-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #000;
  border-left: 4px solid #ffcc00;
  padding-left: 0.8rem;
  text-align: left;
  letter-spacing: 0.03em;
}

/* アイキャッチ画像 */
.single .post-thumbnail img {
  width: 100%;
  border-radius: 8px;
  margin: 1.5rem 0;
  display: block;
  opacity: 0.95;
  transition: opacity 0.3s ease;
}

.single .post-thumbnail img:hover {
  opacity: 1;
}

/* 記事本文 */
.single .post-content {
  font-size: 1.1rem;
  line-height: 1.9;
  color: #000;
}

.single .post-content h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  border-left: 4px solid #ffcc00;
  padding-left: 0.6rem;
  font-weight: 600;
  color: #fff;
}

.single .post-content h3 {
  font-size: 1.2rem;
  margin: 1.5rem 0 1rem;
  color: #ddd;
}

.single .post-content a {
  color: #ffcc00;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.single .post-content a:hover {
  opacity: 0.8;
}

.single .post-content img {
  max-width: 100%;
  border-radius: 6px;
  margin: 1.5rem auto;
  display: block;
}

/* 前後ナビゲーション */
.single-post-navigation .navigation.post-navigation .nav-links {
  display: flex !important;
  justify-content: space-between;
  align-items: stretch;
  gap: 20px;
  margin-top: 3rem;
}

.single-post-navigation .navigation.post-navigation .nav-previous,
.single-post-navigation .navigation.post-navigation .nav-next {
  flex: 1 1 0;
}

.single-post-navigation a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  color: #ddd;
  padding: 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  text-align: center;
  min-height: 80px;
  border: 1px solid #222;
}

.single-post-navigation a:hover {
  background: #ddd;
  color: #000;
  transform: translateY(-3px);
}

.single-post-navigation .nav-arrow {
  font-size: 1.2rem;
  margin: 0 0.4rem;
  color: #ffcc00;
}

.single-post-navigation .nav-label {
  display: block;
  font-size: 0.8rem;
  opacity: 0.7;
}

/*--------------------------------------------------------------
# Responsive / スマホ用
--------------------------------------------------------------*/
@media (max-width: 768px) {
  .single .site-main .container {
    padding-top: 60px; /* ヘッダー高さに合わせる */
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 2rem;
  }

  .single .entry-title {
    font-size: 1.8rem;
  }

  .single .post-content h2 {
    font-size: 1.3rem;
  }

  .single .post-content h3 {
    font-size: 1.1rem;
  }

  .single-post-navigation .navigation.post-navigation .nav-links {
    flex-direction: column;
    gap: 10px;
  }

  .single-post-navigation a {
    padding: 0.8rem;
    min-height: auto;
  }
}
