/* ==========================================================================
   Team Energy — WordPress で追加したページ（お知らせ・お問い合わせ・汎用ページ）
   ベースの変数・見出し・ボタンは style.css を使う
   ========================================================================== */

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

/* ---------- 下層ページの見出し帯（小さめ） ---------- */
.page-hero-sm { padding: 160px 0 56px; }
.page-hero-sub { display: inline-block; margin-left: 20px; font-size: .6em; letter-spacing: .16em; color: var(--magma); vertical-align: .15em; }
.page-title { font-size: clamp(26px, 3vw, 36px); font-weight: 500; line-height: 1.6; letter-spacing: .08em; }
.page-hero-404 { min-height: 70vh; }
.thanks-btn { margin-top: 44px; }
@media (max-width: 767px) { .page-hero-sm { padding: 128px 0 44px; } }

/* ---------- お知らせ（トップ・一覧共通） ---------- */
.news-more { margin-top: 36px; }
.news-list .is-ext .news-title { position: relative; }
.news-ext {
  display: inline-block; width: 9px; height: 9px; margin-left: 10px;
  border-top: 1px solid currentColor; border-right: 1px solid currentColor;
  vertical-align: .15em; opacity: .55;
}
.news-empty { margin-top: 32px; padding: 32px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink-faint); font-size: 15px; }

/* 一覧ページ */
.news-archive { padding-top: 64px; }
.news-filter { display: flex; flex-wrap: wrap; gap: 8px 32px; }
.news-filter a {
  position: relative; padding: 6px 0;
  font-family: var(--en); font-size: 15px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-faint); transition: color .3s;
}
.news-filter a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 1px; background: var(--magma); transition: width .3s; }
.news-filter a:hover { color: var(--ink); }
.news-filter a[aria-current="page"] { color: var(--ink); }
.news-filter a[aria-current="page"]::after, .news-filter a:hover::after { width: 100%; }
.news-filter + .news-list { margin-top: 28px; }

/* ページ送り */
.news-pager { margin-top: 56px; }
.news-pager .nav-links { display: flex; justify-content: center; align-items: center; gap: 6px; }
.news-pager .page-numbers {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 6px;
  font-family: var(--en); font-size: 17px; font-weight: 500; letter-spacing: .06em; color: var(--ink-soft);
  border: 1px solid transparent; transition: color .3s, border-color .3s;
}
.news-pager a.page-numbers:hover { color: var(--magma); border-color: var(--line); }
.news-pager .page-numbers.current { color: var(--ink); border-color: var(--ink); }
.news-pager .dots { border: 0; }

/* ---------- お知らせ詳細 ---------- */
.news-single-meta { display: flex; align-items: center; gap: 20px; }
.news-cat-link {
  font-family: var(--en); font-size: 14px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  border: 1px solid var(--line); padding: 3px 10px; color: var(--ink-soft); background: var(--white); transition: color .3s, border-color .3s;
}
.news-cat-link:hover { color: var(--magma); border-color: var(--magma); }
.news-single-title { word-break: auto-phrase; margin-top: 24px; max-width: 900px; font-size: clamp(22px, 2.6vw, 32px); font-weight: 500; line-height: 1.7; letter-spacing: .08em; }
.article { padding: 72px 0 104px; }
.news-single-eyecatch { max-width: 960px; margin: 0 0 56px; }
.news-single-eyecatch img { width: 100%; height: auto; display: block; }
@media (max-width: 767px) { .article { padding: 48px 0 72px; } .news-single-eyecatch { margin-bottom: 36px; } }

/* 本文（ブロックエディターの出力） */
.entry-content { max-width: 760px; font-size: 16px; line-height: 2.05; letter-spacing: .06em; }
.entry-content > * + * { margin-top: 1.6em; }
.entry-content h2, .entry-content h3, .entry-content li { word-break: auto-phrase; }
.entry-content h2 {
  position: relative; margin-top: 2.8em; padding-top: 20px;
  font-size: 22px; font-weight: 500; line-height: 1.7; letter-spacing: .08em;
}
.entry-content h2::before { content: ""; position: absolute; top: 0; left: 0; width: 28px; height: 2px; background: var(--magma); }
.entry-content h3 { margin-top: 2.4em; font-size: 18px; font-weight: 500; line-height: 1.7; letter-spacing: .08em; padding-left: 16px; border-left: 2px solid var(--ink); }
.entry-content h4 { margin-top: 2em; font-size: 16px; font-weight: 700; }
.entry-content h2:first-child, .entry-content h3:first-child { margin-top: 0; }
.entry-content a { color: var(--magma); text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px; }
.entry-content a:hover { color: var(--magma-deep); }
.entry-content strong { font-weight: 700; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content ul { list-style: none; padding-left: 0; }
.entry-content ul > li { position: relative; padding-left: 20px; }
.entry-content ul > li::before { content: ""; position: absolute; left: 0; top: 1.02em; width: 8px; height: 1px; background: var(--magma); }
.entry-content ol { list-style: decimal; }
.entry-content ol > li::marker { font-family: var(--en); color: var(--magma); font-weight: 600; }
.entry-content li + li { margin-top: .4em; }
.entry-content img { max-width: 100%; height: auto; }
.entry-content figure { margin-left: 0; margin-right: 0; }
.entry-content figcaption, .entry-content .wp-element-caption { margin-top: 10px; font-size: 13px; color: var(--ink-faint); line-height: 1.8; }
.entry-content blockquote, .entry-content .wp-block-quote {
  margin-left: 0; padding: 24px 28px; background: var(--paper); border-left: 2px solid var(--magma); color: var(--ink-soft);
}
.entry-content blockquote cite { display: block; margin-top: 12px; font-size: 13px; font-style: normal; color: var(--ink-faint); }
.entry-content hr, .entry-content .wp-block-separator { border: 0; border-top: 1px solid var(--line); margin: 3em 0; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.8; }
.entry-content th, .entry-content td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry-content th { width: 28%; color: var(--ink-faint); font-weight: 400; background: transparent; }
.entry-content table { border-top: 1px solid var(--line); }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content .wp-block-button__link {
  display: inline-flex; align-items: center; gap: 18px; padding: 14px 0; background: none; color: var(--ink);
  border-radius: 0; border-bottom: 1px solid var(--ink); text-decoration: none;
  font-family: var(--en); font-size: 15px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
}
.entry-content .wp-block-button__link::after { content: ""; width: 28px; height: 1px; background: currentColor; transition: width .3s; }
.entry-content .wp-block-button__link:hover { color: var(--magma); border-color: var(--magma); }
.entry-content .wp-block-button__link:hover::after { width: 44px; }
.entry-content .wp-block-embed iframe { max-width: 100%; }
@media (max-width: 767px) {
  .entry-content { font-size: 15px; line-height: 1.95; }
  .entry-content h2 { font-size: 19px; }
  .entry-content h3 { font-size: 17px; }
}

/* 前後の記事 */
.news-single-nav {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  margin-top: 88px; padding-top: 40px; border-top: 1px solid var(--line);
}
.news-single-nav .next { text-align: right; }
.news-single-nav a:not(.btn) { display: inline-flex; flex-direction: column; gap: 6px; max-width: 360px; transition: color .3s; }
.news-single-nav a:not(.btn) .en { font-size: 14px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--magma); }
.news-single-nav a:not(.btn) .t { font-size: 14px; line-height: 1.8; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-single-nav a:not(.btn):hover .t { color: var(--ink); }
@media (max-width: 767px) {
  .news-single-nav { grid-template-columns: 1fr 1fr; margin-top: 64px; }
  .news-single-nav .back { grid-column: 1 / -1; grid-row: 2; text-align: center; margin-top: 8px; }
}

/* ---------- お問い合わせ ---------- */
.contact { padding: 88px 0 120px; }
.contact-grid { display: grid; grid-template-columns: 260px 1fr; gap: 80px; align-items: start; }
.contact-aside { position: sticky; top: 120px; }
.contact-aside-title { font-size: 14px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--magma); }
.contact-aside-title + * { margin-top: 16px; }
.contact-flow { counter-reset: none; border-top: 1px solid var(--line); margin-bottom: 44px; }
.contact-flow li { display: flex; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.contact-flow .num { font-size: 17px; font-weight: 500; letter-spacing: .08em; color: var(--ink-faint); min-width: 22px; }
.contact-mail a { font-size: 19px; letter-spacing: .04em; border-bottom: 1px solid var(--ink); padding-bottom: 4px; transition: color .3s, border-color .3s; word-break: break-all; }
.contact-mail a:hover { color: var(--magma); border-color: var(--magma); }
.contact-note { margin-top: 14px; font-size: 13px; color: var(--ink-faint); line-height: 1.9; }
.contact-note a { text-decoration: underline; text-underline-offset: .2em; }
.contact-form-lead { font-size: 14px; color: var(--ink-soft); margin-bottom: 28px; }
.contact-form-lead .cf-req { margin: 0 6px 0 0; }
@media (max-width: 1023px) {
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .contact-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
  .contact-aside .contact-flow { margin-bottom: 0; }
}
@media (max-width: 767px) {
  .contact { padding: 56px 0 88px; }
  .contact-aside { grid-template-columns: 1fr; }
  .contact-aside .contact-flow { margin-bottom: 36px; }
}

/* フォーム本体（Contact Form 7） */
.cf { border-top: 1px solid var(--ink); }
.cf-row { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.cf-label { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding-top: 12px; font-size: 15px; font-weight: 500; letter-spacing: .06em; line-height: 1.6; align-self: start; }
.cf-req, .cf-opt {
  display: inline-block; padding: 1px 8px; font-size: 11px; font-weight: 500; letter-spacing: .12em; line-height: 1.8;
}
.cf-req { color: var(--magma); border: 1px solid var(--magma); }
.cf-opt { color: var(--ink-faint); border: 1px solid var(--line); }
.cf-field { min-width: 0; }
.cf .wpcf7-form-control-wrap { display: block; }
.cf input[type="text"], .cf input[type="email"], .cf input[type="tel"], .cf textarea {
  width: 100%; padding: 14px 16px; font: inherit; font-size: 16px; letter-spacing: .04em; color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-radius: 0; -webkit-appearance: none; appearance: none;
  transition: border-color .25s, box-shadow .25s;
}
.cf textarea { min-height: 220px; line-height: 1.9; resize: vertical; }
.cf input:focus, .cf textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(210, 70, 28, .12); }
.cf input::placeholder, .cf textarea::placeholder { color: #c4b7ad; }

/* ラジオボタン */
.cf .wpcf7-radio { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; }
.cf .wpcf7-list-item { margin: 0; }
.cf .wpcf7-list-item label { display: inline-flex; align-items: center; gap: 12px; padding: 6px 0; cursor: pointer; font-size: 15px; letter-spacing: .04em; }
.cf input[type="radio"], .cf input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; flex: 0 0 auto; width: 20px; height: 20px; margin: 0;
  border: 1px solid var(--ink-faint); background: var(--white); cursor: pointer; display: inline-grid; place-content: center;
  transition: border-color .25s;
}
.cf input[type="radio"] { border-radius: 50%; }
.cf input[type="radio"]::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--magma); transform: scale(0); transition: transform .2s; }
.cf input[type="radio"]:checked { border-color: var(--magma); }
.cf input[type="radio"]:checked::before { transform: scale(1); }
.cf input[type="checkbox"]::before { content: ""; width: 10px; height: 6px; border-left: 2px solid var(--white); border-bottom: 2px solid var(--white); transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .2s; }
.cf input[type="checkbox"]:checked { background: var(--magma); border-color: var(--magma); }
.cf input[type="checkbox"]:checked::before { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.cf input[type="radio"]:focus-visible, .cf input[type="checkbox"]:focus-visible { outline: 2px solid var(--magma); outline-offset: 2px; }

/* 同意・送信 */
.cf-agree { margin-top: 44px; text-align: center; font-size: 15px; }
.cf-agree .wpcf7-list-item label { justify-content: center; }
.cf-agree a { color: var(--ink); text-decoration: underline; text-underline-offset: .25em; }
.cf-agree a:hover { color: var(--magma); }
.cf-submit { margin-top: 28px; text-align: center; position: relative; }
.cf .cf-btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 320px; padding: 22px 48px;
  font-family: var(--jp); font-size: 16px; font-weight: 500; letter-spacing: .24em; color: var(--white);
  background: var(--ink); border: 1px solid var(--ink); border-radius: 0; cursor: pointer;
  -webkit-appearance: none; appearance: none; transition: background .3s, border-color .3s, opacity .3s;
}
.cf .cf-btn:hover { background: var(--magma); border-color: var(--magma); }
.cf .cf-btn:disabled { opacity: .35; cursor: not-allowed; background: var(--ink); border-color: var(--ink); }
.cf .wpcf7-spinner { position: absolute; left: 50%; top: 100%; margin: 14px 0 0 -12px; }
.cf-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* エラー・送信結果 */
.cf .wpcf7-not-valid { border-color: var(--magma) !important; background: #fff8f5; }
.cf .wpcf7-not-valid-tip { display: block; margin-top: 8px; font-size: 13px; color: var(--magma); letter-spacing: .04em; }
.cf .wpcf7-response-output {
  margin: 36px 0 0 !important; padding: 18px 22px !important; font-size: 14px; line-height: 1.9; text-align: center;
  border: 1px solid var(--line) !important; background: var(--paper);
}
.cf.invalid .wpcf7-response-output, .cf.unaccepted .wpcf7-response-output, .cf.failed .wpcf7-response-output, .cf.spam .wpcf7-response-output, .cf.aborted .wpcf7-response-output {
  border-color: var(--magma) !important; color: var(--magma-deep); background: #fff8f5;
}
.cf.sent .wpcf7-response-output { border-color: var(--ink) !important; }
.wpcf7 .screen-reader-response, .cf .screen-reader-response { position: absolute; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); height: 1px; width: 1px; margin: -1px; padding: 0; border: 0; }
.cf-fallback { padding: 28px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); font-size: 15px; }
.cf-fallback a { text-decoration: underline; }

@media (max-width: 767px) {
  .cf-row { grid-template-columns: 1fr; gap: 12px; padding: 22px 0; }
  .cf-label { padding-top: 0; }
  .cf .cf-btn { width: 100%; min-width: 0; }
}

/* M&A ページのフッター：フォームへのボタン */
.footer-btn + .footer-mail { margin-top: 28px; }
.footer-mail a { font-size: 18px; }
.cf .wpcf7-response-output:empty { display: none; }

/* Contact Form 7 の標準CSSは読み込まないため、動作に必要な分だけここで定義 */
.wpcf7 .hidden-fields-container { display: none; }
.wpcf7 form.init .wpcf7-response-output,
.wpcf7 form.resetting .wpcf7-response-output,
.wpcf7 form.submitting .wpcf7-response-output { display: none; }
.wpcf7-form-control-wrap { position: relative; }
.wpcf7-list-item-label::before, .wpcf7-list-item-label::after { content: none; }
.wpcf7-spinner {
  visibility: hidden; display: inline-block; width: 24px; height: 24px; border-radius: 50%;
  background: var(--ink); opacity: .75;
}
form.submitting .wpcf7-spinner { visibility: visible; }
.wpcf7-spinner::before {
  content: ""; position: absolute; top: 4px; left: 4px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--white); transform-origin: 8px 8px; animation: te-spin 1s linear infinite;
}
@keyframes te-spin { to { transform: rotate(360deg); } }
.wpcf7 [inert] { opacity: .5; }

/* 元記事へのリンク */
.news-source { max-width: 760px; margin-top: 56px; }
.news-source a {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px;
  padding: 26px 32px; border: 1px solid var(--line); background: var(--white, #fff);
  transition: border-color .3s, background-color .3s;
}
.news-source-label {
  font-family: var(--en); font-size: 13px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--magma);
  padding-right: 28px; border-right: 1px solid var(--line); line-height: 2.4;
}
.news-source-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.news-source-name { font-size: 15px; letter-spacing: .08em; color: var(--ink); overflow-wrap: anywhere; }
.news-source-text { font-size: 13px; letter-spacing: .1em; color: var(--ink-faint); }
.news-source-arrow { position: relative; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; transition: border-color .3s, background-color .3s; }
.news-source-arrow::before {
  content: ""; position: absolute; left: 15px; top: 15px; width: 9px; height: 9px;
  border-top: 1px solid var(--ink); border-right: 1px solid var(--ink); transition: border-color .3s;
}
.news-source-arrow::after {
  content: ""; position: absolute; left: 13px; top: 19.5px; width: 13px; height: 1px;
  background: var(--ink); transform: rotate(-45deg); transition: background-color .3s;
}
.news-source a:hover .news-source-arrow::after { background: #fff; }
.news-source a:hover { border-color: var(--ink); }
.news-source a:hover .news-source-arrow { background: var(--magma); border-color: var(--magma); }
.news-source a:hover .news-source-arrow::before { border-color: #fff; }
@media (max-width: 767px) {
  .news-source { margin-top: 44px; }
  .news-source a { gap: 18px; padding: 20px; }
  .news-source-label { padding-right: 18px; font-size: 12px; }
}

.cf-captcha:empty { display: none; }
.cf-captcha { margin-top: 32px; display: flex; justify-content: center; }
