﻿/*
Theme Name: 技術白書 Child
Template: arkhe
Author: 技術白書 Yuriko.S
Description: 
Version: 1.0
*/

/* グローバルナビ全体のラップ */
.c-gnavWrap {
  background: linear-gradient(to bottom, #1f5c94 0%, #2a6fa8 100%);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 1000;
}

/* ul全体 */
.c-gnav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
}

/* li要素 */
.c-gnav__li {
  margin: 0 10px;
}

/* リンク（基本状態） */
.c-gnav__a {
  display: inline-block;
  padding: 14px 22px;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.05em;
  border-radius: 6px;
  transition: all 0.25s ease;
}

/* ホバーで「ぽこっ」と浮く */
.c-gnav__a:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

/* 現在ページ（current）表示用 */
.c-gnav__li.current-menu-item .c-gnav__a {
  background: rgba(255, 255, 255, 0.25);
  font-weight: 600;
}

/* 帯の色 */
.l-headerUnder{
  --the-color--bg: #2a6fa8;
}
/* スマホ時は縦並び or 折り返し対応 */
@media (max-width: 768px) {
  .c-gnav {
    flex-wrap: wrap;
  }
  .c-gnav__a {
    padding: 12px 14px;
    font-size: 14px;
  }
}


/* Coverブロック：スマホで“切らない”版 */
@media (max-width: 599px){
  /* 本体は高さ固定をやめ、比率で枠を作る */
  .image-size-fix.wp-block-cover{
    min-height: 0 !important;
    aspect-ratio: 2005 / 1307; /* 元画像の縦横比に合わせる */
  }
  /* 画像は全部見せる（上下に余白が出てもOK） */
  .image-size-fix .wp-block-cover__image-background{
    object-fit: contain !important;
    background-color: #fff;    /* 余白色（任意で変更） */
  }
  /* 文字は枠の中で中央寄せに */
  .image-size-fix .wp-block-cover__inner-container{
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    padding: 0 16px;
  }
}

/* ===== NEWS ===== */
:root { --news-accent: #2e6ea6; } /* 旧サイトの水色 */

.news-section{
  background:#fff; padding:20px 30px; margin:40px auto;
  border-top:4px solid var(--news-accent);
  border-bottom:4px solid var(--news-accent);
  max-width:1000px; /* 任意 */
}
.news-section h2{ text-align:center; font-size:1.6rem; margin:0 0 1em; font-weight:700; }

/* リスト本体（Latest Posts ブロックに news-list を付与） */
.news-list{ margin:0; padding:0; list-style:none; }
.news-list li{
  display:flex; align-items:baseline; gap:1em;
  padding:.5em 0; border-bottom:1px solid #eee;
}
.news-list li:last-child{ border-bottom:none; }
.news-list time{
  order:1; min-width:6em; text-align:right;
  color:#666; font-size:.9em; display:inline-block;
}
.news-list a{
  order:2; color:#222; text-decoration:none;
}
.news-list a:hover{ color:var(--news-accent); text-decoration:underline; }

/* モバイル微調整 */
@media (max-width: 599px){
  .news-section{ padding:16px 16px; }
  .news-list time{ min-width:5.5em; font-size:.85em; }
}


/* ==== Content Views（4大人気商品）カード整形 ==== */
/* ==== Content Views：サムネイル比率と高さを完全統一 ==== */
.pt-cv-wrapper .pt-cv-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3; /* ← 比率を固定（正方形にしたければ 1 / 1） */
  background: #f6f6f6;
  overflow: hidden;
  border-bottom: 1px solid #eee;
}

/* 中の画像を枠いっぱいにフィットさせる */
.pt-cv-wrapper .pt-cv-thumbnail img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;     /* ← ここでトリミングして比率維持 */
  object-position: center;
  display: block;
}

/* カード全体の整列も微調整 */
.pt-cv-wrapper .pt-cv-content-item {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  transition: transform .15s ease, box-shadow .15s ease;
}
.pt-cv-wrapper .pt-cv-content-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

/* 下のテキストエリア */
.pt-cv-wrapper .pt-cv-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
}
.pt-cv-wrapper .pt-cv-readmore {
  margin-top: auto;
  padding-top: 10px;
}

/* グリッドの隙間をそろえる */
.pt-cv-wrapper .pt-cv-row {
  row-gap: 24px;
}






/* Category Cards */
.gh-catcards {
  display: grid;
  gap: 20px;
  margin: 20px 0 40px;
}
.gh-cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.gh-cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.gh-cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

/* 各カード全体 */
.gh-catcard {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  transition: transform .12s ease, box-shadow .12s ease;
}
.gh-catcard:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

/* サムネイル部分を統一サイズに固定 */
.gh-catcard__thumb {
  aspect-ratio: 3 / 2; /* ← ここで比率統一（例：横3：縦2） */
  margin: 0;
  background: #f6f6f6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.gh-catcard__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* トリミングしてぴったりに見せる */
  display: block;
}

/* テキスト部分 */
.gh-catcard__body {
  padding: 12px 14px;
}
.gh-catcard__title {
  font-weight: 600;
  line-height: 1.4;
  font-size: 1rem;
}
.gh-catcard__desc {
  font-size: 0.85rem;
  line-height: 1.4;
  color: #555;
}

/* タブレットまでは2列 */
@media (max-width: 980px) {
  .gh-catcards { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* スマホでも2列維持 */
@media (max-width: 599px) {
  .gh-catcards { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .gh-catcard__body { padding: 10px; }
  .gh-catcard__title { font-size: 0.95rem; }
  .gh-catcard__desc { font-size: 0.8rem; }
}




/* h2 */
:root{
  --accent: #2e6ea6;    /* 旧サイトの水色 */
  --accent-lite: #e3effa;
}

h2.h2-tab{
  border-left:8px solid var(--accent);
  padding:.25em .75em .25em .85em; background:var(--accent-lite);
  border-radius:4px; margin:2rem 0 1rem; font-weight:700;
}

h2.h2-double{
  margin:2rem 0 1.1rem; padding-bottom:.55rem; position:relative;
  border-bottom:1px solid #cfd8e3;
}
h2.h2-double::after{
  content:""; position:absolute; left:0; right:0; bottom:-6px;
  height:4px; background:var(--accent);
}

h2.h2-bracket{
  position:relative; padding:.35em .9em; margin:2rem 0 1.2rem;
}
h2.h2-bracket::before,
h2.h2-bracket::after{
  content:""; position:absolute; top:50%; width:16px; height:16px; border:2px solid var(--accent);
  transform:translateY(-50%);
}
h2.h2-bracket::before{ left:-6px; border-right:none; border-radius:6px 0 0 6px; }
h2.h2-bracket::after { right:-6px; border-left:none;  border-radius:0 6px 6px 0; }

h2.h2-ribbon {
  position: relative;
  display: inline-block;        /* テキスト幅にする */
  margin: 2rem auto 1.25rem;    /* 左右autoで中央寄せ */
  padding: .45em 1.1em;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  line-height: 1.2;
  text-align: center;
}

h2.h2-ribbon::after {
  content: "";
  position: absolute;
  right: -12px;
  top: 50%;
  border: 6px solid transparent;
  border-left-color: var(--accent);
  transform: translateY(-50%);
}

/* h3 */
h3 {
  padding: 0.25em 0.5em;/*上下 左右の余白*/
  color: #494949;/*文字色*/
  background: transparent;/*背景透明に*/
  border-left: solid 5px #7db4e6;/*左線*/
}





/* ヘッダー右 会社情報 */
/* 切れ防止 + 右端に余白 */
.l-header__right{ overflow: visible; }            /* 念のためクリップ無効 */
.gh-headerContact{
  text-align: right;
  padding-right: 12px;                            /* 右端に内側余白を確保 */
  max-width: 100%;
}

/* 1行目：TEL / FAX は折り返し可能にしておく */
.gh-contact-main{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex-wrap: wrap;                                /* 狭い時には下に回ってOK */
  row-gap: 2px;
}

/* 数字サイズは画面幅に合わせて自動縮小 */
.gh-tel, .gh-fax{
  white-space: nowrap;
  font-weight: 700;
  color: var(--gh-accent, #2e6ea6);
  font-size: clamp(16px, 2.1vw, 22px);           /* 16px〜22pxの間で可変 */
  text-decoration: none;
}

/* 補足行（営業時間・住所） */
.gh-sub{
  font-size: clamp(11px, 1.2vw, 13px);
  color: #555;
}

/* 中くらいの幅：行間と余白を少し詰める */
@media (max-width: 1200px){
  .gh-contact-main{ gap: 12px; }
}

/* さらに狭い幅：TELとFAXを縦に並べる（見切れ防止） */
@media (max-width: 1060px){
  .gh-contact-main{
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }
}

/* スマホは非表示のままでOK（表示したいならこのブロックを削除） */
@media (max-width: 959px){
  .gh-headerContact{ display: none; }
}

/* 共通の装飾 */
.gh-tel::before,
.gh-fax::before {
  content: "";
  display: inline-block;
  width: 20px;      /* アイコンの幅 */
  height: 20px;     /* アイコンの高さ */
  margin-right: 6px;
  vertical-align: middle;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* ===== ヘッダーQRエリア（右側全体） ===== */
/* ==== ヘッダー右側のレイアウト（QR + 下段情報） ==== */
.l-header__right{
  display: flex;
  flex-direction: column;   /* 上:QR群 / 下:営業時間住所 */
  align-items: flex-end;    /* PCは右寄せ */
}

/* QRを横並びにする */
.gh-headerQR{
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 6px;
}

/* QR 1枚のブロック */
.gh-headerQR .qr{
  text-align: center;
}

/* QR画像のサイズと見た目を固定 */
.gh-headerQR .qr img{
  width: 80px;           /* 必要に応じて 70〜90px などに調整 */
  height: 80px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 4px;
}

/* ラベル */
.gh-headerQR .lbl{
  display: block;
  margin-top: 4px;
  font-size: .8rem;
  font-weight: 600;
  color: #2e6ea6;
}

/* 下段（営業時間・住所） */
.gh-headerInfo{
  text-align: right;     /* PCでは右寄せ */
  font-size: .82rem;
  line-height: 1.4;
  color: #444;
}

/* スマホ時はヘッダーのQRエリアを非表示 */
@media (max-width: 599px){
  .l-header__right {
    display: none;
  }
}


/* ====== お問い合わせフォーム全体 ====== */
.wpcf7-form {
  max-width: 600px; /* 横幅を制限 */
  margin: 0 auto;   /* 中央寄せ */
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

/* ====== ラベル ====== */
.wpcf7-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
}

/* ====== テキストボックス ====== */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
  background: #fff;
}

/* ====== フォーカス時の縁色 ====== */
.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
  border-color: #2f9e44; /* ロゴ系の緑 */
  box-shadow: 0 0 4px rgba(47,158,68,0.3);
  outline: none;
}

/* ====== テキストエリア ====== */
.wpcf7-form textarea {
  min-height: 140px;
  resize: vertical;
}

/* ====== 送信ボタン ====== */
.wpcf7-form input[type="submit"] {
  display: inline-block;
  padding: 10px 28px;
  background: #2f9e44; /* 緑に変更 */
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: background .2s, transform .2s;
}

.wpcf7-form input[type="submit"]:hover {
  background: #237a34; /* 濃い緑に */
  transform: translateY(-2px);
}

/* 必須マーク */
.attention_red {
  color: #d32f2f;        /* 赤色 */
  font-size: 0.85em;     /* 少し小さめ */
  font-weight: bold;     /* 太字 */
  margin-left: 4px;      /* ラベルとの余白 */
  vertical-align: middle;/* テキストと高さ揃え */
}



/* カテゴリで探す */
.catcards{
  display:grid; gap:16px;
}
.catcards--cols2{ grid-template-columns:repeat(2,1fr);}
.catcards--cols3{ grid-template-columns:repeat(3,1fr);}
.catcards--cols4{ grid-template-columns:repeat(4,1fr);}
.catcards--cols5{ grid-template-columns:repeat(5,1fr);}
.catcards--cols6{ grid-template-columns:repeat(6,1fr);}

.catcards__item{
  display:block; text-decoration:none; color:inherit;
  border:1px solid #e8e8e8; border-radius:10px; overflow:hidden;
  background:#fff; transition:transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.catcards__item:hover{
  transform:translateY(-2px);
  box-shadow:0 6px 18px rgba(0,0,0,.06);
}
.catcards__thumb{ aspect-ratio: 4/3; margin:0; background:#f6f6f6; display:flex; align-items:center; justify-content:center; overflow:hidden;}
.catcards__thumb img{ width:100%; height:100%; object-fit:cover; display:block;}
.catcards__noimg{ width:40%; height:40%; background:#ddd; border-radius:8px; display:inline-block;}
.catcards__meta{ padding:12px 14px;}
.catcards__name{ font-weight:600; line-height:1.4;}
@media (max-width:768px){
  .catcards--cols4, .catcards--cols5, .catcards--cols6{ grid-template-columns:repeat(2,1fr);}
}

