/*
Theme Name: EC兄弟 虎の巻（GeneratePress Child）
Description: EC兄弟のFAQサイト「EC兄弟 虎の巻」用のGeneratePress子テーマ。FAQカスタム投稿タイプ・アコーディオンUI・FAQ構造化データを含みます。
Author: BROTHERS
Template: generatepress
Version: 1.2.0
Text Domain: gp-child-toranomaki
*/

/* =========================================
   ブランドカラー（EC兄弟LP https://ec.br-others.com/ に準拠）
   ========================================= */
:root {
  --tora-main: #004ba5;      /* EC兄弟メイン（青） */
  --tora-accent: #ff4b00;    /* EC兄弟アクセント（CTA橙赤） */
  --tora-bg: #f0f3fa;        /* 薄青背景 */
  --tora-border: #dbe2ef;    /* 罫線 */
  --tora-text: #323333;      /* テキスト */
  --tora-font: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

/* =========================================
   サイト全体をEC兄弟のトーンに（GeneratePress上書き）
   ========================================= */
body {
  font-family: var(--tora-font);
  color: var(--tora-text);
}

/* リンク */
a { color: var(--tora-main); }
a:hover { color: var(--tora-accent); }

/* ヘッダー */
.site-header {
  background: #fff;
  border-bottom: 3px solid var(--tora-main);
}
.main-title a, .site-branding .main-title a { color: var(--tora-main); }
.site-description { color: #666; }

/* グローバルナビ */
.main-navigation, .main-navigation ul ul { background: #fff; }
.main-navigation .main-nav ul li a { color: var(--tora-main); font-weight: 600; }
.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li[class*="current-menu-"] > a {
  color: var(--tora-accent);
}

/* 見出し（LPのh3＝白抜き青帯に合わせる） */
.entry-content h2 {
  background: var(--tora-main);
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
}
.entry-content h3 {
  color: var(--tora-main);
  border-left: 6px solid var(--tora-accent);
  padding-left: 12px;
}

/* ボタン（CTAはLPと同じ橙赤） */
button, .button, input[type="submit"],
.wp-block-button__link {
  background: var(--tora-accent);
  color: #fff;
  border-radius: 6px;
}
button:hover, .button:hover, input[type="submit"]:hover,
.wp-block-button__link:hover {
  background: var(--tora-main);
  color: #fff;
}

/* フッター */
.site-footer, .site-info {
  background: var(--tora-main);
  color: #fff;
}
.site-info a { color: #fff; }

/* ===== FAQ一覧 ===== */
.tora-faq-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 0 48px;
}

.tora-faq-title {
  font-size: 1.6em;
  color: var(--tora-main);
  border-left: 6px solid var(--tora-accent);
  padding-left: 12px;
  margin-bottom: 24px;
}

/* 検索フォーム */
.tora-faq-search {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.tora-faq-search input[type="search"] {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--tora-border);
  border-radius: 6px;
}
.tora-faq-search button {
  background: var(--tora-main);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  cursor: pointer;
}
.tora-faq-search button:hover { background: var(--tora-accent); }

/* カテゴリ絞り込み */
.tora-faq-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  padding: 0;
  list-style: none;
}
.tora-faq-cats a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--tora-border);
  border-radius: 999px;
  background: #fff;
  color: var(--tora-main);
  font-size: 0.9em;
  text-decoration: none;
}
.tora-faq-cats a:hover,
.tora-faq-cats .current a {
  background: var(--tora-main);
  color: #fff;
  border-color: var(--tora-main);
}

/* アコーディオン */
.tora-faq-item {
  border: 1px solid var(--tora-border);
  border-radius: 8px;
  margin-bottom: 12px;
  background: #fff;
  overflow: hidden;
}
.tora-faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  background: #fff;
  border: none;
  text-align: left;
  font-size: 1em;
  font-weight: 600;
  color: var(--tora-text);
  cursor: pointer;
}
.tora-faq-q::before {
  content: "Q";
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--tora-main);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85em;
}
.tora-faq-q::after {
  content: "";
  margin-left: auto;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--tora-accent);
  border-bottom: 2px solid var(--tora-accent);
  transform: rotate(45deg);
  transition: transform 0.2s;
}
.tora-faq-q[aria-expanded="true"]::after { transform: rotate(-135deg); }
.tora-faq-q:hover { background: var(--tora-bg); color: #323333; }

.tora-faq-a {
  display: none;
  padding: 4px 18px 18px 56px;
  color: var(--tora-text);
  line-height: 1.8;
  border-top: 1px dashed var(--tora-border);
}
.tora-faq-item.is-open .tora-faq-a { display: block; }
.tora-faq-a .tora-more {
  display: inline-block;
  margin-top: 8px;
  color: var(--tora-accent);
  font-weight: 600;
}

/* ===== トップページ ===== */
.tora-hero {
  background: linear-gradient(135deg, var(--tora-main), #0a63c9);
  color: #fff;
  text-align: center;
  padding: 56px 20px;
  border-radius: 0 0 12px 12px;
  margin-bottom: 40px;
}
.tora-hero h1 { color: #fff; margin: 0 0 8px; }
.tora-hero p { margin: 0 0 24px; opacity: 0.92; }
.tora-hero-search { max-width: 560px; margin: 0 auto; }

.tora-section { max-width: 960px; margin: 0 auto 48px; padding: 0 16px; }

.tora-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.tora-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--tora-border);
  border-top: 4px solid var(--tora-main);
  border-radius: 8px;
  text-decoration: none;
  color: var(--tora-text);
  transition: box-shadow 0.2s, transform 0.2s;
}
.tora-card:hover {
  box-shadow: 0 4px 16px rgba(0, 75, 165, 0.15);
  transform: translateY(-2px);
}
.tora-card-name { font-weight: 700; color: var(--tora-main); font-size: 1.05em; }
.tora-card-desc { font-size: 0.85em; line-height: 1.6; }
.tora-card-count { font-size: 0.8em; color: var(--tora-accent); font-weight: 600; margin-top: auto; }

.tora-latest { list-style: none; padding: 0; margin: 0 0 20px; }
.tora-latest li {
  border-bottom: 1px dashed var(--tora-border);
}
.tora-latest a {
  display: block;
  padding: 12px 4px;
  text-decoration: none;
}
.tora-latest a::before { content: "Q. "; color: var(--tora-accent); font-weight: 700; }

.tora-center { text-align: center; }
.tora-btn {
  display: inline-block;
  padding: 12px 28px;
  margin: 4px;
  background: var(--tora-main);
  color: #fff !important;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}
.tora-btn:hover { background: var(--tora-accent); }
.tora-btn-accent { background: var(--tora-accent); }
.tora-btn-accent:hover { background: var(--tora-main); }
.tora-btn-outline {
  background: transparent;
  color: #fff !important;
  border: 2px solid #fff;
}
.tora-btn-outline:hover { background: rgba(255,255,255,0.15); }

.tora-cta {
  background: var(--tora-main);
  color: #fff;
  text-align: center;
  padding: 48px 20px;
  border-radius: 12px;
  max-width: 960px;
  margin: 0 auto 48px;
}
.tora-cta h2 { color: #fff; margin-top: 0; }

/* FAQ個別ページ */
.tora-faq-single .entry-title { color: var(--tora-main); }
.tora-faq-single .tora-faq-meta {
  margin-bottom: 20px;
  font-size: 0.85em;
}
.tora-faq-single .tora-faq-meta a {
  color: var(--tora-accent);
  text-decoration: none;
}
.tora-related {
  margin-top: 40px;
  padding: 20px;
  background: var(--tora-bg);
  border-radius: 8px;
}
.tora-related h2 {
  font-size: 1.1em;
  color: var(--tora-main);
  margin-top: 0;
}


/* ===== お問い合わせ：ご利用状況をボタン風に ===== */
.wpcf7-form .tora-status {
  border: none;
  padding: 0;
  margin: 0 0 20px;
}
.wpcf7-form .tora-status legend {
  font-weight: 600;
  margin-bottom: 10px;
  padding: 0;
}
.wpcf7-form .wpcf7-radio {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.wpcf7-form .wpcf7-radio .wpcf7-list-item {
  margin: 0;
}
.wpcf7-form .wpcf7-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.wpcf7-form .wpcf7-radio .wpcf7-list-item-label {
  display: inline-block;
  padding: 10px 22px;
  border: 2px solid var(--tora-main);
  border-radius: 999px;
  color: var(--tora-main);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.wpcf7-form .wpcf7-radio .wpcf7-list-item-label:hover {
  background: var(--tora-bg);
}
.wpcf7-form .wpcf7-radio input[type="radio"]:checked + .wpcf7-list-item-label {
  background: var(--tora-main);
  color: #fff;
}
.wpcf7-form .wpcf7-radio input[type="radio"]:focus-visible + .wpcf7-list-item-label {
  outline: 2px solid var(--tora-accent);
  outline-offset: 2px;
}


/* ===== ヘッダーロゴ（SVG）のサイズ指定 ===== */
.site-header .custom-logo,
.site-header .header-image,
.site-logo img {
  width: min(280px, 70vw);
  height: auto;
}
.site-logo {
  padding: 10px 0;
}


/* ===== ヒーローの白ロゴ ===== */
.tora-hero-logo {
  margin: 0 0 12px;
}
.tora-hero-logo img {
  width: min(440px, 85vw);
  height: auto;
}


/* ===== ヘッダー内側の余白 ===== */
.inside-header {
  padding: 0 40px;
}
