/* ==========================================================================
   trouble.css — WordPressトラブル対応・お悩み解決ページ専用スタイル
   ts- プレフィックス BEM記法 / アクセントカラー: #ef4444 (red)
   ========================================================================== */

:root {
  --ts-brand: #ef4444;
  --ts-brand-light: #fee2e2;
}

/* ------------------------------------------------------------------
   共通ユーティリティ
   ------------------------------------------------------------------ */
.ts-label {
  display: block;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ts-brand);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.ts-section-title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}

.ts-section-lead {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.ts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 2rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ts-btn--primary {
  background: var(--ts-brand);
  color: #fff;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.ts-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.4);
}

/* ------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------ */
.ts-hero {
  padding: clamp(3rem, 6vw, 5rem) 0;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border-light);
}

.ts-hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 900px) {
  .ts-hero__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.ts-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  background: var(--color-white);
  border: 1px solid var(--ts-brand-light);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ts-brand);
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.ts-eyebrow__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ts-brand);
  flex-shrink: 0;
}

.ts-hero__title {
  font-size: clamp(1.35rem, 3.5vw, 32px);
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin-bottom: 1.25rem;
}

.ts-hero__lead {
  font-size: clamp(0.9rem, 1.6vw, 1rem);
  color: var(--color-text-mid);
  line-height: 1.9;
  margin-bottom: 2rem;
}

.ts-hero__lead strong {
  font-weight: 700;
  background: linear-gradient(transparent 60%, var(--ts-brand-light) 60%);
}

/* Hero カード */
.ts-hero__card {
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

.ts-hero__card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border-light);
}

.ts-trouble-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ts-trouble-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.75em;
  font-size: 0.9rem;
  color: var(--color-text-mid);
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--color-border-light);
}

.ts-trouble-checklist li:last-child {
  border-bottom: none;
}

.ts-trouble-checklist li .fas {
  color: var(--ts-brand);
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 0.2em;
}

@media (max-width: 900px) {
  .ts-hero__card {
    position: static;
  }
}

/* ------------------------------------------------------------------
   Intro
   ------------------------------------------------------------------ */
.ts-intro {
  padding: var(--section-padding) 0;
  background: var(--color-bg-soft);
  border-bottom: 1px solid var(--color-border-light);
}

.ts-checklist-box {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
  max-width: 860px;
  margin: 0 auto;
}

.ts-checklist-box__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 1.25rem;
  text-align: center;
}

.ts-checklist-box__list {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.ts-check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65em;
  font-size: 0.9rem;
  color: var(--color-text-mid);
  line-height: 1.7;
}

.ts-check-item .fas {
  color: var(--ts-brand);
  flex-shrink: 0;
  margin-top: 0.25em;
  font-size: 0.75rem;
}

.ts-checklist-box__note {
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.ts-checklist-box__cta {
  text-align: center;
}

/* ------------------------------------------------------------------
   10 Categories Navigation
   ------------------------------------------------------------------ */
.ts-categories {
  padding: var(--section-padding) 0;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border-light);
}

.ts-category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 640px) {
  .ts-category-grid {
    grid-template-columns: 1fr;
  }
}

.ts-category-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.ts-category-card:hover {
  border-color: var(--ts-brand);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.ts-category-card__icon {
  width: 44px;
  height: 44px;
  background: var(--ts-brand-light);
  color: var(--ts-brand);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.ts-category-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.ts-category-card__desc {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.6;
}

/* ------------------------------------------------------------------
   Details — 10カテゴリー詳細
   ------------------------------------------------------------------ */
.ts-details {
  padding: var(--section-padding) 0;
  background: var(--color-bg-soft);
  border-bottom: 1px solid var(--color-border-light);
}

.ts-detail-headline {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 700;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.6em;
  margin-top: 3rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--color-border-light);
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}

.ts-detail-headline:first-child {
  margin-top: 0;
}

.ts-detail-headline .fas {
  color: var(--ts-brand);
}

.ts-detail-intro {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.ts-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 640px) {
  .ts-card-grid {
    grid-template-columns: 1fr;
  }
}

.ts-trouble-card {
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.ts-trouble-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border-light);
}

.ts-trouble-card__title .fas {
  color: var(--ts-brand);
  font-size: 0.9rem;
}

.ts-trouble-card__note {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 0.85rem;
  line-height: 1.6;
}

.ts-trouble-card__causes {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ts-cause-item {
  font-size: 0.82rem;
  color: var(--color-text-mid);
  line-height: 1.6;
  padding-left: 1.25em;
  position: relative;
}

.ts-cause-item::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.5em;
  width: 5px;
  height: 8px;
  border: solid var(--ts-brand);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -3px;
}

@media (min-width: 769px) {
  .ts-trouble-card__title { font-size: 1.05rem; }
  .ts-trouble-card__note  { font-size: 0.9rem; }
  .ts-cause-item          { font-size: 0.9rem; }
}

/* まとめ */
.ts-summary {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  border: 1px solid var(--color-border-light);
  margin-top: 3rem;
  box-shadow: var(--shadow-sm);
}

.ts-summary__title {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
  margin-bottom: 0.75rem;
}

.ts-summary__lead {
  font-size: 0.9rem;
  color: var(--color-text-mid);
  line-height: 1.8;
  text-align: center;
  margin-bottom: 1.75rem;
}

.ts-summary__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 640px) {
  .ts-summary__grid { grid-template-columns: 1fr; }
}

.ts-summary-item {
  background: var(--color-bg-soft);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--color-border-light);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ts-summary-item__icon {
  width: 36px;
  height: 36px;
  background: var(--ts-brand-light);
  color: var(--ts-brand);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.ts-summary-item h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.ts-summary-item p {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ------------------------------------------------------------------
   Contact Form
   ------------------------------------------------------------------ */
.ts-contact {
  padding: var(--section-padding) 0;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border-light);
}

.ts-contact__form {
  max-width: 760px;
  margin: 0 auto;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
}

/* CF7 */
.ts-contact .required {
  color: #ef4444;
  background: #fee2e2;
  font-size: 11px;
  padding: 4px;
  border-radius: 4px;
}

.ts-contact .wpcf7-form p {
  margin-bottom: 20px;
}

.ts-contact .wpcf7-text,
.ts-contact .wpcf7-textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 16px;
  background: #f8fafc;
  margin-top: 8px;
}

.ts-contact .wpcf7-text:focus,
.ts-contact .wpcf7-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
  outline: none;
  background: #fff;
}

.ts-contact .wpcf7-submit {
  width: 100%;
  padding: 16px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  transition: opacity 0.2s;
  -webkit-appearance: none;
  appearance: none;
  display: block;
  margin: 0 auto;
}

.ts-contact .wpcf7-submit:hover {
  opacity: 0.9;
}

.ts-contact .wpcf7-spinner {
  margin: 10px auto 0;
  display: block;
}

.ts-contact div.wpcf7-response-output {
  border: none !important;
  border-radius: 8px;
  padding: 20px !important;
  margin: 30px 0 0 !important;
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.ts-contact form.sent div.wpcf7-response-output {
  background-color: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0 !important;
}

.ts-contact form.invalid div.wpcf7-response-output,
.ts-contact form.failed div.wpcf7-response-output,
.ts-contact form.spam div.wpcf7-response-output {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca !important;
}

/* ------------------------------------------------------------------
   Footer CTA
   ------------------------------------------------------------------ */
.ts-cta {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  background: var(--color-bg-soft);
}

.ts-cta__card {
  background: linear-gradient(135deg, var(--color-primary-dark, #0369a1) 0%, var(--color-primary, #0284c7) 100%);
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1.5rem, 5vw, 4rem);
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.ts-cta__title {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}

.ts-cta__lead {
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.75rem;
}

.ts-cta__btn {
  display: inline-block;
  background: #fff;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.9rem 2.25rem;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.ts-cta__btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}
