@charset "UTF-8";

html {
  font-size: 10px;
}

body {
  color: #333;
  font-size: 1.4rem;
  line-height: 2.1rem;
  min-height: 100vh;
  position: relative;
}

.wrapper {
  width: 100%;
  max-width: 1360px;
  padding: 0 40px;
  margin: 0 auto;  
  box-sizing: border-box;
}

.top {
  padding-top: 80px;
  padding-bottom: 160px;
}

.pageTitle {
  padding: 40px 0 30px;
  font-weight: bold;
}

/**************************
* ヘッダーのスタイル
**************************/

header {
  width: 100%;
  height: 80px;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  left: 0;
  right: 0;
  z-index: 10;
}

header img {
  width: 180px;
}

#navi {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  padding: 36px 50px;
  transition: all 0.5s;
  z-index: 20;
  opacity: 0;
}

#navi a {
  color: #fff;
}

a:hover {
  opacity: 0.7;
}

a {
  color: #333;
  text-decoration: none;
  transition: all 0.5s;
  background-color: transparent;
}

#navi li {
  padding: 7px 0;
}
/*  ハンバーガーメニュー。メニューが開いている時は、「left: 0;」「opacity: 1;」で、画面左に表示 */
.open #navi {
  top: 14px;
  left: 0;
  opacity: 1;
}

.toggleBtn {
  width: 30px;
  height: 30px;
  position: relative;
  transition: all 0.5s;
  cursor: pointer;
  z-index: 20;
}

/*  ハンバーガーメニューの線（メニューが閉じている時） */
.toggleBtn span {
  display: block;
  position: absolute;
  width: 30px;
  height: 2px;
  background-color: #333;
  border-radius: 4px;
  transition: all 0.5s;
}

/*  1本目の線の位置 */
.toggleBtn span:nth-child(1) {
  top: 10px;
}

/*  2本目の線の位置 */
.toggleBtn span:nth-child(2) {
  bottom: 10px;
}

/*  1本目の線を-45度回転 */
.open .toggleBtn span:nth-child(1) {
  -webkit-transform: translateY(4px) rotate(-45deg);
  transform: translateY(4px) rotate(-45deg);
}

/*  2本目の線を45度回転 */
.open .toggleBtn span:nth-child(2) {
  -webkit-transform: translateY(-4px) rotate(45deg);
  transform: translateY(-4px) rotate(45deg);
}

/*  メニューが閉じてる時は、背景非表示  */
.mask {
  display: none;
  transition: all 0.5s;
}

/*  メニューを開いている時は、全体を黒背景にする  */
.open .mask {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  opacity: .8;
  z-index: 10;
  cursor: pointer;
}

/**************************
* トップページのスタイル
**************************/

.productList {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 2列 */
  gap: 34px; /* 画像間の余白 */
  width: 100%; /* 親幅いっぱい */
  font-size: 1.2rem;
  line-height: 1.8rem;
}

.productList li img {
  width: 100%; /* liの幅に合わせて画像が広がる */
  display: block; /* 下の隙間を消す */
}

.productList li img {
  margin-bottom: 10px;
}

.viewMore {
  display: block;
  text-align: center;
  margin-top: 40px;
}

/**************************
* プロダクトページのスタイル
**************************/


.paginationWrap {
  padding-top: 34px;
}

.page-numbers {
  display: flex;
  justify-content: center;
  gap: 20px;
}

/**************************
* プロダクト詳細ページのスタイル
**************************/

.productDetail {
  max-width: 800px;
  display: flex;
  gap: 64px;
  margin-bottom: 60px;
}

.productDetail img {
  width: 400px;
}

.description {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.description__content {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.spec {
  display: flex;
  flex-direction: column; /* 項目を縦に並べる */
}

.spec-item {
  display: flex;           /* dt と dd を横並びにする */
  gap: 4px;             /* dt と dd の間隔 */
}

.spec-item dt {
  width: 30%;    /* dt の幅を固定して揃える */
}

.spec-item dd {
  width: 70%;
}

.spec-item dt::after {
  content: ":";            /* dt の後にコロン */
}

.spec dt {
  font-weight: normal;
}

.spec-item dd {
  margin: 0;       /* デフォルトマージンをリセット */
}

.backBtn {
  display: block;
  text-align: center;
}

/**************************
* Aboutページのスタイル
**************************/

.about {
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap:30px;
}

/**************************
* Companyページのスタイル
**************************/

.company {
  max-width: 600px;
}

.companyTable {
  display: flex;
  flex-direction: column; /* 項目を縦に並べる */
  margin-bottom: 20px;
}

.companyTable div:last-child {
  border-bottom: none;
}

.companyDetail {
  display: flex;           /* dt と dd を横並びにする */
  gap: 4px;   
  border-bottom: 1px solid #dcdbdb;          /* dt と dd の間隔 */
  padding: 20px 10px;
}

.companyDetail dt {
  width: 100px;    /* dt の幅を固定して揃える */
}

.companyDetail dt::after {
  content: ":";            /* dt の後にコロン */
}

.companyDetail dt {
  font-weight: normal;
}

.companyDetail dd {
  margin: 0;       /* デフォルトマージンをリセット */
}

.map iframe {
  width: 100%;
  height: 300px;
  filter: grayscale(100%);
}

/**************************
* フッターのスタイル
**************************/

#footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2rem;
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
}

#footer a {
  font-size: 1.0rem;
  line-height: 1.5rem;
}

.social ul {
  display: flex;
  gap: 30px;
}

/**************************
* SP
**************************/

@media screen and (max-width: 900px) {
  .productList {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 19px;
    row-gap: 40px;
    }

  .productDetail {
    max-width: 100%;
    flex-direction: column;
    gap: 30px;
  }

  .productDetail img {
    width: 100%;
  }

  .companyDetail {
    flex-direction: column;
    gap: 10px;
  }

  .map iframe {
    width: 100%;
  }

  #footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .social ul {
    margin-bottom: 5px;
  }
  
}

/* 追加 */

/* サブメニュー：通常は非表示（flow内） */
#navi .sub-menu {
  display: none;                /* ← 非表示 */
  position: static;             /* ← 重要：absoluteをやめる（下に押し下げる） */
  margin-left: 15px;
  line-height: 21px;
}
#navi .sub-menu li a {
  display: block;
}

/* クリックで開いた時（.is-open） */
#navi li.is-open > .sub-menu { display: block; }

#navi .is-open {
  padding-bottom: 0;
}

.productFilter {
  margin: 12px 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.productFilter label { font-size: 14px; color: #555; }
.productFilter select {
  min-width: 180px;
  padding: 6px 8px;
  border: 1px solid #ddd; border-radius: 6px;
  background: #fff;
}

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

.page404 {
  margin-top: 40px;
}

.newsWrapper {
  max-width: 600px;
}

.newsList li:first-child {
  border-top: 1px solid #dddddd;
}

.newsList li {
  display: flex;
  gap: 16px;
  align-items: center;                    /* ベースラインのズレを防ぐ */
  padding: 14px 0;
  border-bottom: 1px solid #dddddd;
}
.newsList li:first-child { border-top: 0; }

.newsList time,
.newsList .newsCats {
  flex: 0 0 110px;          /* 日付の固定幅 */
  white-space: nowrap;
}

  .newsList a{
  flex: 1 1 auto;           /* タイトルは残り幅いっぱい */
  min-width: 0;             /* はみ出し防止の重要項目 */
  display: block;
  line-height: 1.7;
  text-decoration: none;
}

.newsList a:hover { text-decoration: underline; }

.entry {
  margin-top: 20px;
  max-width: 600px;
}

.entry img {
  max-width: 100%;
}

.newsBack {
  margin-top: 40px;
}

/* ── News 詳細の本文タイポグラフィ（崩れない版） ───────────────────── */

/* 直下ブロック間の基本マージン：これで「改行＝段落間の余白」が付く */
.entry > * + * {
  margin-top: 1rem;         /* 16px相当。好みで 1.25rem などに */
}

/* 見出しは少し大きく＆上余白を広めに */
.entry h2 { margin-top: 2rem; margin-bottom: 2rem;
            font-size: clamp(20px, 2.2vw, 24px); }
.entry h3 { margin-top: 1.5rem; margin-bottom: 1.5rem;
            font-size: clamp(18px, 2vw, 20px); }
.entry h4 { margin-top: 1.25rem; margin-bottom: 1.25rem; }

/* 段落は上の「> * + *」で十分なので margin:0; でもOK */
.entry p { margin: 0; }

/* リスト・引用・表などの基本 */
.entry ul, .entry ol { padding-left: 1.25em; }
.entry li + li { margin-top: .3em; }
.entry blockquote {
  margin: 1.25rem 0; padding: .75rem 1rem;
  background: #fafafa; border-left: 4px solid #e5e5e5;
}
.entry table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.entry th, .entry td { border: 1px solid #eee; padding: .6rem .8rem; }

/* 画像は必ず縮む＆アライン対応（Gutenberg互換） */
.entry img { max-width: 100%; height: auto; padding: 10px 0;}
.entry:after { content: ""; display: block; clear: both; }  /* floatを受け止める */
.alignleft  { float: left;  margin: 0 1em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1em; }
.aligncenter{ display: block; margin-left: auto; margin-right: auto; }

/* 余白が詰まりやすい要素の微調整（任意） */
.entry .wp-block-image + .wp-block-image { margin-top: 1rem; }
.entry pre { overflow: auto; padding: .75rem 1rem; background:#f6f8fa; border-radius: 6px; }

/* News本文：段落の間隔 */
.single-news .entry p {
  margin: 0 0 1rem;   /* 下だけ余白 */
  line-height: 1.8;
}

.single-news .entry p:last-child { margin-bottom: 0; }  /* 末尾の余白は消す */

@media (max-width: 640px){
  .newsList li{ flex-wrap: wrap; }  /* 折り返しを許可 */
  .newsList time{ order: 1; }
  .newsList .newsCats{ order: 2; }
  .newsList a{
    order: 3;
    flex-basis: 100%;       /* タイトルを2列目（全幅）に配置 */
    margin-top: 4px;        /* 1行目との間隔 */
  }

  .headWrapper {
    flex-direction: column;
  }

  .pageTitle {
    padding: 30px 0 20px;
  }
}

.fd-hero {
  padding: 40px 0 20px;
　max-width: 1260px;
}

.fd-hero-inner {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 16px;
}

.fd-hero-image {
  display: block;
  width: 100%;
  height: auto;
}
