/*
Theme Name: Suryworks Original
Description: 自作テーマ（SURY WORKS用）
Author: You
Version: 1.2
*/

/* ==============================
   Base / Variables
============================== */
:root {
  --fg: #111;
  --muted: #666;
  --line: #eee;
  --bg: #fff;
  --brand: #0B1F3A;
  --accent: #F2C94C;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  color: var(--fg);
  background: var(--bg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto,
               "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  line-height: 1.7;
}
a { color: var(--brand); text-underline-offset: .15em; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.sec-title { font-size: 28px; margin: 0 0 16px; }

/* ==============================
   Header / Navigation
============================== */
.site-header { padding: 12px 0; border-bottom: 1px solid #eee; background: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; max-width: 1100px; margin: 0 auto; padding: 12px 20px; }

.site-logo svg { display: block; height: auto; max-width: 100%; }

/* PC nav */
.site-nav { display: flex; align-items: center; gap: 0; }
.site-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; align-items: center; }
.site-nav .menu a { text-decoration: none; color: #000; font-weight: 500; font-size: 14px; }
.site-nav .menu a:hover { text-decoration: underline; }

/* CTA in nav */
.site-nav .gnav-btn,
.site-nav .gnav-cta {
  display: inline-block;
  margin-left: 16px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.site-nav .gnav-btn:hover,
.site-nav .gnav-cta:hover { opacity: .9; }

/* Hamburger button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 32px; height: 32px;
  background: transparent; border: none; cursor: pointer; padding: 0;
  z-index: 1001;
}
.nav-toggle-bar { width: 100%; height: 3px; background: #111; margin: 4px 0; transition: .3s; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: rotate(45deg) translateY(8px); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: rotate(-45deg) translateY(-8px); }

/* Mobile nav (slide-in) */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; top: 0; right: -100%;
    width: 70%; max-width: 320px; height: 100%;
    background: #fff; box-shadow: -2px 0 8px rgba(0,0,0,.1);
    padding: 80px 20px; transition: right .3s ease;
    display: flex; flex-direction: column; gap: 16px; z-index: 1000;
  }
  .site-nav.is-open, .site-nav.active { right: 0; }
  .site-nav .menu { flex-direction: column; gap: 12px; }
  body.nav-open { overflow: hidden; }

  .site-nav .gnav-btn,
  .site-nav .gnav-cta {
    display: block; margin: 12px 0 0; width: 100%; text-align: center; padding: 12px 16px;
  }
}

/* ==============================
   Hero
============================== */
.hero { padding: 64px 16px; background: linear-gradient(180deg, #fafafa, #fff); }
.hero__inner { max-width: 1100px; margin: 0 auto; text-align: left; }
.eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 8px; font-size: 12px; }
.hero__title { font-size: 32px; line-height: 1.35; margin: 0 0 8px; }
.hero__sub { color: var(--muted); margin: 0 0 20px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }

.btn { display: inline-block; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--brand); text-decoration: none; color: #fff; background: var(--brand); font-weight: 600; }
.btn--ghost { background: transparent; color: var(--brand); }
.btn--accent { background: var(--accent); color: #000; border-color: var(--accent); }

@media (max-width: 768px) { .hero__title { font-size: 24px; } }

/* ==============================
   Services
============================== */
.services { padding: 40px 0; border-top: 1px solid var(--line); }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: #fff; }
.card h3 { margin: 0 0 8px; }
.card p { margin: 0 0 10px; }
.link { text-decoration: none; }
@media (max-width: 768px) { .cards { grid-template-columns: 1fr; } }

/* ==============================
   Team / CTA
============================== */
.team { padding: 40px 0; border-top: 1px solid var(--line); }
.roles { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.roles li { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; background: #fff; }

.cta { padding: 48px 0; border-top: 1px solid var(--line); text-align: center; }
.cta__title { margin: 0 0 8px; font-size: 24px; }
.cta__sub { margin: 0 0 16px; color: var(--muted); }

/* ==============================
   Page / Blog common
============================== */
.site-main { max-width: 1100px; margin: 32px auto; padding: 0 16px; }

.blog-index .post-item, .archive .post-item { padding: 16px 0; border-bottom: 1px solid #eee; }
.post .meta, .post-item .meta { color: #666; font-size: 14px; margin: 6px 0; }
.post .content img { max-width: 100%; height: auto; }
.pagination { margin: 24px 0; }
.pagination a, .pagination span { margin-right: 8px; text-decoration: none; }

/* Single */
.post { max-width: 720px; margin: 0 auto; padding: 20px; }
.post h1 { font-size: 28px; margin-bottom: 8px; }
.post .meta { font-size: 14px; color: #666; margin-bottom: 24px; }
.post .meta a { color: #0073aa; text-decoration: none; }
.post .meta a:hover { text-decoration: underline; }
.post-thumb { aspect-ratio: 16 / 9; width: 100%; overflow: hidden; border-radius: 8px; margin-bottom: 24px; background: #f6f6f6; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post .content { font-size: 16px; line-height: 1.8; }
.post-nav { display: flex; justify-content: space-between; margin-top: 40px; }

/* 記事ページ：左右の余白を少なく（SP） */
.single .post { padding-left: 2px; padding-right: 2px; }

/* ==============================
   TOP: Column blocks（PC=3列 / SP=横スクロール）
============================== */
.front-columns { padding: 40px 0; border-top: 1px solid var(--line); }
.front-cat-block { margin-bottom: 40px; }

.front-columns .front-cat-block .post-list.grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.post-card { display: block; text-decoration: none; color: inherit; }
.post-card .title { font-size: 16px; margin: 8px 0 0; line-height: 1.5; }
.more-link { margin-top: 14px; }

/* サムネ比率固定（16:9） */
.post-card .thumb {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #f6f6f6;
  display: block;
}
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* SP：横スクロール */
@media (max-width: 768px) {
  .front-columns .front-cat-block .post-list.grid3 {
    display: flex !important;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .front-columns .front-cat-block .post-list.grid3::-webkit-scrollbar { display: none; }
  .front-columns .front-cat-block .post-list.grid3 .post-item { flex: 0 0 60% !important; scroll-snap-align: start; margin: 0; }
}
@media (max-width: 480px) {
  .front-columns .front-cat-block .post-list.grid3 .post-item { flex: 0 0 80% !important; }
}

/* ==============================
   Footer
============================== */
.site-footer { background: #fff; border-top: 1px solid #eee; }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 28px 0;
}
.footer-logo { font-weight: 700; font-size: 18px; text-decoration: none; color: #111; }
.footer-right { margin-left: auto; }
.footer-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; }
.footer-menu a { text-decoration: none; color: #333; font-size: 14px; }
.footer-menu a:hover { text-decoration: underline; }
.footer-copybar { border-top: 1px solid #eee; padding: 12px 0; text-align: center; color: #666; font-size: 13px; }

@media (max-width: 768px) {
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-right { margin-left: 0; }
  .footer-menu { justify-content: center; flex-wrap: wrap; }
}

/* Footer CTA（全ページ共通／トップ以外） */
.cta-global { padding: 56px 0; border-top: 1px solid #eee; text-align: center; background: #f8f9fb; margin-top: 40px; }
.cta-global .cta__inner { max-width: 800px; margin: 0 auto; padding: 0 20px; }
.cta-global h3 { font-size: 20px; margin-bottom: .5rem; }
.cta-global .cta__note { opacity: .7; margin-bottom: 1.2rem; }

/* ==============================
   Glossary（用語）
============================== */
.glossary-chips { display:flex; flex-wrap:wrap; gap:12px; }
.chip { display:inline-block; padding:10px 16px; border:1px solid #e5e7eb; border-radius:999px; text-decoration:none; color:#111; background:#fff; }
.chip:hover { box-shadow:0 1px 0 rgba(0,0,0,.06) inset; }

.glossary-link { text-decoration: underline dotted; }
.glossary-link:hover { text-decoration: underline; }

.glossary-single .gl-ttl { font-size:28px; margin:0 0 18px; }
.glossary-single .gl-sec { margin: 28px 0; }
.glossary-single .gl-h2 {
  all: unset; display:block; font-size:18px; font-weight:700; line-height:1.6; color:#111; margin:0 0 10px;
  border-left: 4px solid #111; padding-left: 10px;
}
.glossary-single .gl-body { line-height:1.9; }
.glossary-single .gl-back { margin-top:24px; }

/* ==============================
   関連記事（本文下）
   - SP：縦並び
   - PC：3カラム
============================== */
@media (min-width: 768px) {
  .related-posts .post-list.grid3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  .related-posts .post-item { margin-bottom: 0; }
  .related-posts .post-card { display: flex; flex-direction: column; height: 100%; }
  .related-posts .post-card .thumb img { width: 100%; height: auto; display: block; }
  .related-posts .title { font-size: 16px; line-height: 1.5; margin-top: 8px; }
}

/* ==============================
   内部リンク ブログカード（テキストのみ／サムネ無）
============================== */
.blogcard {
  margin: 24px 0;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  transition: box-shadow .2s;
}
.blogcard:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

/* サムネ要素は常に非表示（PC/SP共通） */
.blogcard__thumb { display: none !important; }

.blogcard__inner {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 14px 16px;
}
.blogcard__body { margin: 0; }
.blogcard__title {
  font-weight: 700;
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.5;
}
.blogcard__excerpt {
  font-size: 13px;
  color: #555;
  margin: 0;
  line-height: 1.7;
}
.blogcard__url {
  font-size: 12px;
  color: #888;
  margin-top: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==============================
   Contact
============================== */
.contact { max-width: 720px; }
.contact-form { display: grid; gap: 14px; }
.contact-form label { display: grid; gap: 6px; font-weight: 600; }
.contact-form .req { font-weight: 700; color: #c00; font-size: 12px; margin-left: 6px; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  border: 1px solid #ddd; border-radius: 8px; padding: 10px 12px; font: inherit; width: 100%;
}
.contact-form textarea { resize: vertical; }
.contact-msg { padding: 12px 14px; border-radius: 8px; }
.contact-msg.-success { background:#f0fff4; border:1px solid #b7e1c1; color:#1e6e3e; }
.contact-msg.-error   { background:#fff5f5; border:1px solid #f3c0c0; color:#a10; }
.cta-block {
  background: #f8f9fa;
  text-align: center;
  padding: 3rem 1rem;
  margin: 3rem 0;
  border-radius: 8px;
}
.cta-block .cta-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}
.cta-block .cta-text {
  color: #555;
  margin-bottom: 1.5rem;
}
.cta-block .cta-button {
  display: inline-block;
  background: #f2b800;
  color: #000;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
}
.cta-block .cta-button:hover {
  background: #d19f00;
}
/* About page */
.about-page { padding: 32px 0; }
.about-sec { margin: 24px 0; }
.about-h2 {
  font-size: 18px; font-weight: 700; margin: 0 0 8px;
  border-left: 4px solid #111; padding-left: 10px;
}
.about-page p { margin: 0 0 14px; }
.about-cta { margin-top: 24px; }
/* === Post content images: size & alignment (PC/SP) === */
.post .content figure,
.post .content .wp-block-image { 
  margin: 24px 0;
}

/* 画像をコンテナ幅いっぱいに（PCで小さい問題を解消） */
.post .content .wp-block-image img,
.post .content img {
  width: 100% !important;   /* Gutenbergのサイズ指定より強く */
  height: auto;
  display: block;
}

/* 中央寄せ（Gutenbergの .aligncenter を正しく効かせる） */
.post .content .aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* 左右回り込み（必要なら） */
.post .content .alignleft  { float: left;  margin: 0 20px 14px 0; }
.post .content .alignright { float: right; margin: 0 0 14px 20px; }

@media (max-width: 768px) {
  /* SPは回り込みを解除して中央寄せ */
  .post .content .alignleft,
  .post .content .alignright {
    float: none;
    margin: 0 auto 16px;
  }
}
/* ========== 記事本文の見出し（h2 / h3） ========== */
/* 本文ラッパーが .content の場合（あなたのテーマ） */
.single .post .content h2,
.single .content h2,
.single :is(.entry-content,.wp-block-post-content) h2 {
  position: relative;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 3rem 0 1.5rem;
  padding-left: 1rem;
  border-left: 4px solid #0B1F3A; /* 好きな色に */
}
.single .post .content h2::after,
.single .content h2::after,
.single :is(.entry-content,.wp-block-post-content) h2::after {
  content: "";
  display: block;
  width: 42px;
  height: 2px;
  background: #0B1F3A;
  margin-top: .6rem;
}

/* h3 は少し軽め */
.single .post .content h3,
.single .content h3,
.single :is(.entry-content,.wp-block-post-content) h3 {
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.5;
  margin: 2rem 0 1rem;
  padding-left: .75rem;
  border-left: 3px solid #A2BFAF;
}

/* Gutenbergの「見出し」ブロックにも確実に適用（保険） */
.single .post .content h2.wp-block-heading,
.single .post .content h3.wp-block-heading { all: revert-layer; } /* 余計なエディタ上書きを無効化 */
/* ===== Contact Form 7 Styling ===== */
:root{
  --cf-bg:#ffffff;
  --cf-text:#222;
  --cf-muted:#666;
  --cf-border:#e5e7eb;
  --cf-accent:#111827;
  --cf-accent-weak:#374151;
  --cf-ok:#065f46;
  --cf-ok-bg:#ecfdf5;
  --cf-err:#b91c1c;
  --cf-err-bg:#fef2f2;
  --cf-radius:16px;
  --cf-shadow:0 8px 24px rgba(0,0,0,.06);
}

.wpcf7 form .cf-card{
  background:var(--cf-bg);
  border:1px solid var(--cf-border);
  border-radius:var(--cf-radius);
  box-shadow:var(--cf-shadow);
  padding:28px;
  max-width:860px;
  margin:24px auto;
}

.cf-title{
  font-size:clamp(22px,2.6vw,28px);
  margin:0 0 .25rem;
}
.cf-lead{
  color:var(--cf-muted);
  margin:0 0 1.25rem;
}

.cf-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
}
@media (min-width: 840px){
  .cf-grid{ grid-template-columns:1fr 1fr; }
  .cf-field--full{ grid-column:1 / -1; }
}

.cf-field label{
  display:block;
  font-weight:600;
  margin:0 0 .5rem;
}
.req{ color:var(--cf-err); font-size:.85em; margin-left:.25em; }

.wpcf7 form input[type="text"],
.wpcf7 form input[type="email"],
.wpcf7 form input[type="tel"],
.wpcf7 form textarea{
  width:100%;
  padding:12px 14px;
  border:1px solid var(--cf-border);
  border-radius:10px;
  font-size:16px;
  transition:border-color .15s, box-shadow .15s, background-color .15s;
  background:#fff;
}
.wpcf7 form textarea{ min-height:160px; resize:vertical; }

.wpcf7 form input:focus,
.wpcf7 form textarea:focus{
  outline:none;
  border-color:#9ca3af;
  box-shadow:0 0 0 3px rgba(156,163,175,.25);
}

/* エラー表示（CF7標準クラス） */
.wpcf7 form span.wpcf7-not-valid-tip{
  display:block;
  color:var(--cf-err);
  font-size:.9rem;
  margin-top:.4rem;
}
.wpcf7 form .wpcf7-form-control.wpcf7-not-valid{
  border-color:var(--cf-err) !important;
  background: #fff8f8;
}

/* 送信ボタン */
.cf-actions{ margin-top:8px; }
.cf-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  padding:12px 20px;
  border-radius:12px;
  border:0;
  background:linear-gradient(180deg, var(--cf-accent), var(--cf-accent-weak));
  color:#fff;
  font-weight:700;
  letter-spacing:.02em;
  cursor:pointer;
  transition:transform .06s ease, filter .2s ease, opacity .2s ease;
}
.cf-btn:hover{ filter:brightness(1.05); }
.cf-btn:active{ transform:translateY(1px); }
.cf-btn:disabled{ opacity:.6; cursor:not-allowed; }

/* 送信結果メッセージ（CF7標準） */
.wpcf7 form .wpcf7-response-output{
  margin:18px 0 0;
  border-radius:10px;
  padding:12px 14px;
}
.wpcf7 form .wpcf7-mail-sent-ok{
  border-color:transparent;
  background:var(--cf-ok-bg);
  color:var(--cf-ok);
}
.wpcf7 form .wpcf7-validation-errors,
.wpcf7 form .wpcf7-acceptance-missing{
  border-color:transparent;
  background:var(--cf-err-bg);
  color:var(--cf-err);
}

/* プレースホルダの色を少し薄めに */
.wpcf7 ::placeholder{ color:#9ca3af; }

/* Yoast等のフォーム外余白が詰まる場合の調整 */
.wpcf7{ display:block; }
/* 送信成功したフォームは入力エリアとボタンを隠す */
.wpcf7 form.sent .cf-grid,
.wpcf7 form.sent .cf-actions{
  display: none !important;
}
/* 同意チェック */
.wpcf7 form .wpcf7-acceptance {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  line-height: 1.4;
  margin-top: 12px;
}

.wpcf7 form .wpcf7-acceptance input[type="checkbox"] {
  transform: scale(1.2);
  margin-top: 2px;
}

.wpcf7 form .wpcf7-acceptance a {
  color: var(--cf-accent);
  text-decoration: underline;
}
/* 同意ブロックの見た目 */
.cf-privacy { margin-top: 10px; }
.cf-pp-link { margin: 0 0 6px; color: var(--cf-muted); font-size: 14px; }

/* acceptance の並び調整（CF7の生成する構造に合わせる） */
.wpcf7 form .wpcf7-acceptance {
  display:flex; align-items:flex-start; gap:8px;
  font-size:14px; line-height:1.4;
}
.wpcf7 form .wpcf7-acceptance input[type="checkbox"]{
  transform: scale(1.2); margin-top: 2px;
}




