/*
Theme Name: CCT Japan 2026
Theme URI: https://cctjapan.co.jp/
Description: cctjapan.co.jp リニューアル用 自作軽量テーマ（ペラ1 + ブログ）。docs/RENEWAL_DESIGN.md 準拠。
Author: CCT Japan
Version: 1.0.0
Requires PHP: 7.4
License: proprietary
Text Domain: cctjapan2026
*/

:root {
  --navy: #17303f;
  --ink: #2a3b45;
  --aqua: #0e7490;
  --aqua-light: #e8f4f6;
  --sand: #f7f5f0;
  --white: #ffffff;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium", "Noto Sans JP", sans-serif;
  color: var(--ink);
  line-height: 1.9;
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--aqua); text-decoration: none; }

/* ===== header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.94); backdrop-filter: blur(6px);
  border-bottom: 1px solid #e5e9ec;
}
.header-inner {
  max-width: 1080px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.header-inner .site-logo img { height: 34px; width: auto; }
.global-nav { display: flex; gap: 26px; font-size: 14px; }
.global-nav a { color: var(--navy); font-weight: 600; }
.global-nav a:hover { color: var(--aqua); }
@media (max-width: 720px) { .global-nav { display: none; } }

/* ログイン中は WP 管理バー(高さ32px/モバイル46px)の分だけ sticky 位置を下げる */
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }

/* WP が出力する視覚隠しテキスト（「投稿ナビゲーション」等）。
   これが無いと生テキストとして画面に出てしまう */
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); border: 0; word-wrap: normal;
}

/* ===== hero ===== */
.hero {
  position: relative; height: 66vh; min-height: 400px;
  background-position: center; background-size: cover; background-repeat: no-repeat;
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.hero::after { content:""; position:absolute; inset:0; background: linear-gradient(rgba(13,38,52,.35), rgba(13,38,52,.45)); }
.hero-text { position: relative; z-index: 1; color: var(--white); padding: 0 20px; }
.hero-text .en {
  font-size: 13px; letter-spacing: .35em; text-transform: uppercase; opacity: .9; margin-bottom: 18px;
}
.hero-text h1 {
  font-size: clamp(26px, 4.6vw, 46px); font-weight: 700; letter-spacing: .08em; line-height: 1.6;
  text-shadow: 0 2px 14px rgba(0,0,0,.35);
}

/* ===== sections ===== */
.front-section { padding: 88px 20px; }
.inner { max-width: 1000px; margin: 0 auto; }
.sec-label { font-size: 12px; letter-spacing: .3em; color: var(--aqua); text-transform: uppercase; font-weight: 700; }
.front-section h2 { font-size: clamp(22px, 3vw, 30px); color: var(--navy); margin: 8px 0 36px; letter-spacing: .06em; }

/* blog（目玉・Hero直後） */
.blog-section { background: var(--white); }
.blog-lead { max-width: 680px; margin: -18px 0 34px; font-size: 15px; }
/* auto-fill: 記事が1〜2件のページでもカードが横いっぱいに伸びない */
.blog-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 26px; }
.blog-card {
  display: block; border-radius: 12px; overflow: hidden; background: var(--white);
  border: 1px solid #e2e8ec; color: var(--ink);
  transition: box-shadow .2s, transform .2s;
}
.blog-card:hover { box-shadow: 0 8px 26px rgba(23,48,63,.14); transform: translateY(-2px); }
.blog-card .thumb { height: 200px; width: 100%; object-fit: cover; }
.blog-card .body { padding: 18px 20px 22px; }
.blog-card time { font-size: 12px; color: #7b8b94; letter-spacing: .06em; }
.blog-card .title { display: block; font-weight: 700; color: var(--navy); margin-top: 6px; font-size: 16px; line-height: 1.6; }
.blog-more { margin-top: 34px; text-align: center; }
.blog-more a {
  display: inline-block; padding: 12px 44px; border: 2px solid var(--aqua); border-radius: 999px;
  font-weight: 700; font-size: 14px; letter-spacing: .1em;
}
.blog-more a:hover { background: var(--aqua); color: var(--white); }

/* about */
.about-section { background: var(--sand); }
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center; }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; } }
.about-grid p { margin-bottom: 1.2em; }
.about-photo { border-radius: 12px; overflow: hidden; }
.about-photo img { width: 100%; height: 320px; object-fit: cover; }
.about-photo figcaption { font-size: 12px; color: #7b8b94; padding: 8px 4px 0; text-align: right; }

/* business */
.biz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.biz-card { background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: 0 2px 14px rgba(23,48,63,.07); border: 1px solid #eef1f3; }
.biz-card img { height: 190px; width: 100%; object-fit: cover; }
.biz-card .body { padding: 22px 24px 26px; }
.biz-card h3 { color: var(--navy); font-size: 17px; margin-bottom: 10px; letter-spacing: .04em; }
.biz-card p { font-size: 14px; }

/* recruit */
.recruit-section { background: var(--aqua-light); }
.recruit-section p { max-width: 680px; }
/* 文単位で折り返す（PCで文中の変な位置に改行が入るのを防ぐ）。
   コンテナより長い文は inline-block 内で通常どおり折り返される */
.sentence { display: inline-block; }

/* company + contact */
.company-table { width: 100%; max-width: 680px; border-collapse: collapse; font-size: 15px; }
.company-table th, .company-table td { text-align: left; padding: 14px 8px; border-bottom: 1px solid #e2e8ec; vertical-align: top; }
.company-table th { width: 9em; color: var(--navy); font-weight: 600; white-space: nowrap; }

.contact-box {
  margin-top: 44px; padding: 34px 30px; background: var(--navy); border-radius: 10px;
  color: var(--white); max-width: 680px;
}
.contact-box .sec-label { color: #7fd4e4; }
.contact-box > p { margin-top: 8px; font-size: 15px; }

/* お問い合わせフォーム（§3.2.1） */
.contact-form { margin-top: 22px; }
.contact-form .field { margin-bottom: 16px; }
.contact-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; letter-spacing: .04em; }
.contact-form label .req { color: #ffb3a7; font-size: 11px; margin-left: 6px; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%; padding: 11px 13px; border: 1px solid #3d5566; border-radius: 6px;
  background: #ffffff; color: var(--ink); font-size: 15px; font-family: inherit; line-height: 1.7;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid #7fd4e4; border-color: #7fd4e4; }
.contact-form textarea { min-height: 160px; resize: vertical; }
.contact-form .submit-row { margin-top: 20px; }
.contact-form button {
  display: inline-block; padding: 13px 52px; border: none; border-radius: 999px; cursor: pointer;
  background: var(--aqua); color: var(--white); font-weight: 700; font-size: 15px; letter-spacing: .1em;
  font-family: inherit; transition: opacity .2s;
}
.contact-form button:hover { opacity: .88; }
.contact-form button:disabled { opacity: .5; cursor: default; }
/* honeypot: 人間には見せない（display:none だと埋めない bot もいるため画面外へ） */
.contact-form .hp-field {
  position: absolute !important; left: -9999px !important; width: 1px; height: 1px;
  overflow: hidden; opacity: 0;
}
.form-message { margin-top: 16px; font-size: 14px; padding: 12px 14px; border-radius: 6px; display: none; }
.form-message.is-visible { display: block; }
.form-message.success { background: #e6f6ec; color: #14532d; }
.form-message.error { background: #fdecea; color: #8a1f11; }

/* ===== footer ===== */
.site-footer { padding: 34px 20px; text-align: center; font-size: 12px; color: #7b8b94; border-top: 1px solid #e5e9ec; }
.site-footer a { color: inherit; }

/* ===== blog 一覧（home.php） ===== */
.archive-header { padding: 56px 20px 0; }
.archive-title { font-size: clamp(22px, 3vw, 30px); color: var(--navy); margin: 8px 0 0; letter-spacing: .06em; }
.archive-body { padding: 40px 20px 88px; }
.pagination { margin-top: 44px; text-align: center; }
.pagination .nav-links { display: inline-flex; gap: 8px; align-items: center; }
.pagination .page-numbers {
  display: inline-block; min-width: 38px; padding: 7px 10px; border: 1px solid #e2e8ec;
  border-radius: 8px; color: var(--navy); font-size: 14px; font-weight: 600;
}
.pagination .page-numbers.current { background: var(--aqua); border-color: var(--aqua); color: var(--white); }
.pagination .page-numbers:hover:not(.current) { border-color: var(--aqua); }

/* ===== 記事個別（single.php）・固定ページ（page.php） ===== */
.entry { padding: 64px 20px 88px; }
.entry .inner { max-width: 760px; }
.entry-header time { font-size: 13px; color: #7b8b94; letter-spacing: .06em; }
.entry-header h1 { font-size: clamp(22px, 3.4vw, 32px); color: var(--navy); line-height: 1.6; margin: 8px 0 36px; letter-spacing: .04em; }
.entry-content p { margin-bottom: 1.4em; }
.entry-content h2 { font-size: 22px; color: var(--navy); margin: 2em 0 .8em; padding-bottom: .3em; border-bottom: 2px solid var(--aqua-light); }
.entry-content h3 { font-size: 18px; color: var(--navy); margin: 1.8em 0 .7em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.4em 1.6em; }
.entry-content h4 { font-size: 16px; color: var(--navy); margin: 1.6em 0 .6em; }
.entry-content img { border-radius: 8px; margin: 1.2em 0; }
.entry-content a { text-decoration: underline; }
.entry-content blockquote { border-left: 4px solid var(--aqua-light); padding-left: 16px; color: #55676f; margin: 1.4em 0; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content::after { content: ""; display: block; clear: both; }

/* 記事本文のブロック/クラシック両対応（画像・キャプション・回り込み・表・埋め込み） */
.entry-content figure { margin: 1.6em 0; }
.entry-content figure img { margin: 0; }
.entry-content figcaption,
.entry-content .wp-caption-text { font-size: 12px; color: #7b8b94; margin-top: 8px; text-align: center; }
.entry-content .wp-caption { max-width: 100%; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }
.entry-content img.aligncenter { display: block; }
.entry-content .alignleft { float: left; margin: .4em 1.6em 1em 0; max-width: 50%; }
.entry-content .alignright { float: right; margin: .4em 0 1em 1.6em; max-width: 50%; }
@media (max-width: 600px) {
  .entry-content .alignleft, .entry-content .alignright { float: none; max-width: 100%; margin: 1.2em 0; }
}
.entry-content iframe { max-width: 100%; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 15px; }
.entry-content th, .entry-content td { border: 1px solid #e2e8ec; padding: 8px 12px; text-align: left; }
.entry-content th { background: var(--sand); color: var(--navy); }
.entry-content hr { border: none; border-top: 1px solid #e2e8ec; margin: 2.4em 0; }

/* 「最新の投稿」ブロック（旧固定ページ blog の中身）。
   本来は表示設定「投稿ページ」→ home.php のカード一覧に置き換わるが、
   設定はテーマ切替当日に行うため、それまでの暫定表示を整える */
.entry-content .wp-block-latest-posts { margin: 0 0 1.4em; padding: 0; list-style: none; }
.entry-content .wp-block-latest-posts li { margin-bottom: 24px; }
.entry-content .wp-block-latest-posts__featured-image { margin: 0 0 10px; }
.entry-content .wp-block-latest-posts__featured-image img {
  width: 100%; height: 180px; object-fit: cover; border-radius: 8px; margin: 0;
}
/* snow-monkey-blocks の box ブロック互換（プラグイン削除後も見た目を維持）。
   実使用は全 210 記事中 archives/4553 の 1 箇所のみ（2026-07-16 全数確認）。
   色・角丸・不透明度は本文側の CSS 変数（--smb-box--*）が持っている */
.entry-content .smb-box { position: relative; padding: 1em 1.5em; margin: 1.4em 0; border-radius: var(--smb-box--border-radius, 6px); color: var(--smb-box--color, inherit); }
.entry-content .smb-box__background { position: absolute; inset: 0; background-color: var(--smb-box--background-color, transparent); opacity: var(--smb-box--background-opacity, 1); border-radius: inherit; pointer-events: none; }
.entry-content .smb-box__body { position: relative; }

.entry-footer { margin-top: 56px; padding-top: 24px; border-top: 1px solid #e2e8ec; }
.post-nav { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.post-nav .nav-prev, .post-nav .nav-next { max-width: 46%; }
.back-to-list { margin-top: 28px; text-align: center; }
.back-to-list a {
  display: inline-block; padding: 11px 40px; border: 2px solid var(--aqua); border-radius: 999px;
  font-weight: 700; font-size: 13px; letter-spacing: .1em;
}
.back-to-list a:hover { background: var(--aqua); color: var(--white); }

/* ===== 404 ===== */
.error-404 { padding: 120px 20px; text-align: center; }
.error-404 h1 { color: var(--navy); font-size: 28px; margin-bottom: 16px; }
.error-404 p { margin-bottom: 32px; }
