/* ==========================================================================
 * cogito design — 共通コンポーネント
 * ボタン / カード / タグ / CTAバナー / タブフィルター / フォーム
 * ========================================================================== */

/* ===================================
 * ボタン
 * =================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 12px 28px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  font-family: var(--font-base);
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  line-height: 1.4;
  transition:
    background-color var(--transition-base),
    border-color     var(--transition-base),
    box-shadow       var(--transition-base),
    opacity          var(--transition-base),
    transform        var(--transition-fast);
}

.btn:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

/* グラデーション（メインCTA） */
.btn--gradient {
  background: var(--color-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-btn);
}

.btn--gradient:hover {
  box-shadow: var(--shadow-btn-hover);
}

/* アウトライン（サブCTA） */
.btn--outline {
  background: transparent;
  color: var(--color-teal);
  border-color: var(--color-teal);
}

.btn--outline:hover {
  background-color: rgba(78, 197, 193, 0.06);
}

/* ホワイト（ダーク背景上） */
.btn--white {
  background: #fff;
  color: var(--color-teal);
  border-color: transparent;
  box-shadow: var(--shadow-card);
}

.btn--white:hover {
  box-shadow: var(--shadow-hover);
}

/* テキストリンク */
.btn--text {
  background: none;
  color: var(--color-teal);
  padding-inline: 0;
  border-color: transparent;
  box-shadow: none;
  font-size: var(--font-size-sm);
}

.btn--text:hover {
  transform: none;
  opacity: 0.78;
}

.btn--text .btn__arrow {
  display: inline-block;
  transition: transform var(--transition-base);
}

.btn--text:hover .btn__arrow {
  transform: translateX(3px);
}

/* ダーク（黒）メインCTA */
.btn--dark {
  background: #111;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.btn--dark:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
}

/* ダーク（黒）アウトライン */
.btn--dark-outline {
  background: transparent;
  color: #111;
  border-color: #111;
}

.btn--dark-outline:hover {
  background-color: rgba(0, 0, 0, 0.05);
  opacity: 1;
}

/* サイズバリエーション */
.btn--sm {
  padding: 8px 20px;
  font-size: var(--font-size-xs);
}

.btn--lg {
  padding: 16px 40px;
  font-size: var(--font-size-md);
}

/* ===================================
 * カード（基本）
 * =================================== */
.card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow var(--transition-slow), transform var(--transition-slow);
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.card__body {
  padding: var(--space-xl);
}

.card__thumb {
  overflow: hidden;
}

.card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card:hover .card__thumb img {
  transform: scale(1.04);
}

/* ===================================
 * Works カード
 * =================================== */
.card-works {
  display: block;
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition-slow), transform var(--transition-slow);
}

.card-works:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  opacity: 1;
}

.card-works__thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-bg-gray);
  position: relative;
}

.card-works__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card-works:hover .card-works__thumb img {
  transform: scale(1.05);
}

/* サンプルバッジ（左上） */
.card-works__badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-text-sub);
  backdrop-filter: blur(4px);
}

.card-works__body {
  padding: var(--space-lg) var(--space-xl);
}

.card-works__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.card-works__title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-xs);
}

.card-works__excerpt {
  font-size: var(--font-size-sm);
  color: var(--color-text-sub);
  line-height: var(--line-height-base);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* ===================================
 * Note カード
 * =================================== */
.card-notes {
  display: block;
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition-slow), transform var(--transition-slow);
}

.card-notes:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  opacity: 1;
}

.card-notes__thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-bg-gray);
}

.card-notes__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card-notes:hover .card-notes__thumb img {
  transform: scale(1.05);
}

/* アイキャッチなし時のプレースホルダー */
.card-notes__thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-bg-teal-light), var(--color-bg-blue-light));
}

.card-notes__body {
  padding: var(--space-lg) var(--space-xl);
}

.card-notes__cat {
  margin-bottom: var(--space-sm);
}

.card-notes__title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-xs);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-notes__excerpt {
  font-size: var(--font-size-sm);
  color: var(--color-text-sub);
  line-height: var(--line-height-base);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-top: var(--space-xs);
}

.card-notes__date {
  font-size: var(--font-size-xs);
  color: var(--color-text-light);
  margin-top: var(--space-sm);
}

/* ===================================
 * お知らせ行
 * =================================== */
.news-list {
  border-top: 1px solid var(--color-border-light);
}

.news-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--color-border-light);
  text-decoration: none;
  color: inherit;
  transition: opacity var(--transition-base);
}

.news-item:hover {
  opacity: 0.72;
}

.news-item__date {
  flex-shrink: 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-sub);
  padding-top: 2px;
  min-width: 90px;
  font-variant-numeric: tabular-nums;
}

.news-item__cat {
  flex-shrink: 0;
}

.news-item__title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  line-height: var(--line-height-base);
}

/* ===================================
 * タグ / バッジ
 * =================================== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  line-height: 1.4;
  white-space: nowrap;
}

.tag--teal {
  background-color: rgba(78, 197, 193, 0.12);
  color: var(--color-teal);
}

.tag--blue {
  background-color: rgba(59, 130, 246, 0.10);
  color: var(--color-blue);
}

.tag--gray {
  background-color: var(--color-bg-gray);
  color: var(--color-text-sub);
}

.tag--pink {
  background-color: rgba(244, 114, 182, 0.10);
  color: var(--color-pink);
}

.tag--yellow {
  background-color: rgba(251, 191, 36, 0.12);
  color: #B45309;
}

.tag--outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-sub);
}

/* ===================================
 * CTA バナー
 * =================================== */
.cta-banner {
  background: linear-gradient(135deg, #e8f8f7 0%, #e8effd 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-4xl) var(--space-3xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* 装飾サークル */
.cta-banner::before,
.cta-banner::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: var(--color-gradient);
  opacity: 0.06;
  pointer-events: none;
}

.cta-banner::before {
  width: 300px;
  height: 300px;
  top: -100px;
  left: -80px;
}

.cta-banner::after {
  width: 200px;
  height: 200px;
  bottom: -60px;
  right: -40px;
}

/* ダークバリエーション */
.cta-banner--dark {
  background: linear-gradient(135deg, #1e3040 0%, #1a2332 100%);
  color: #fff;
}

.cta-banner__title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
  position: relative;
  z-index: 1;
}

.cta-banner--dark .cta-banner__title {
  color: #fff;
}

.cta-banner__subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-sub);
  line-height: var(--line-height-loose);
  margin-bottom: var(--space-2xl);
  position: relative;
  z-index: 1;
}

.cta-banner--dark .cta-banner__subtitle {
  color: rgba(255, 255, 255, 0.68);
}

.cta-banner__actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.cta-banner__note {
  margin-top: var(--space-lg);
  font-size: var(--font-size-xs);
  color: var(--color-text-sub);
  line-height: var(--line-height-loose);
  position: relative;
  z-index: 1;
}

.cta-banner--dark .cta-banner__note {
  color: rgba(255, 255, 255, 0.44);
}

@media (max-width: 768px) {
  .cta-banner {
    padding: var(--space-2xl) var(--space-xl);
    border-radius: var(--radius-lg);
  }

  .cta-banner__title {
    font-size: var(--font-size-2xl);
  }

  .cta-banner__actions {
    flex-direction: column;
    align-items: center;
  }
}

/* ===================================
 * タブフィルター（Works / Note 一覧）
 * URL リンク型（現在のタームに is-active クラスを付与）
 * =================================== */
.tab-filter {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border-light);
}

.tab-filter__item {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  color: var(--color-text-sub);
  background: var(--color-bg-gray);
  border: 2px solid transparent;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.tab-filter__item:hover {
  color: var(--color-teal);
  border-color: rgba(78, 197, 193, 0.4);
  background: rgba(78, 197, 193, 0.06);
  opacity: 1;
}

.tab-filter__item.is-active {
  color: var(--color-teal);
  border-color: var(--color-teal);
  background: rgba(78, 197, 193, 0.08);
  font-weight: var(--font-weight-bold);
}

/* ===================================
 * フォーム（Contact / CF7 ラッパー）
 * =================================== */
.form-group {
  margin-bottom: var(--space-xl);
}

.form-label {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.form-label .required {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  background: rgba(244, 114, 182, 0.12);
  color: var(--color-pink);
}

.form-input,
.form-textarea,
.form-select {
  display: block;
  width: 100%;
  padding: 12px 16px;
  font-size: var(--font-size-base);
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
  appearance: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-light);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(78, 197, 193, 0.15);
}

.form-textarea {
  min-height: 160px;
  resize: vertical;
  line-height: var(--line-height-loose);
}

/* Contact Form 7 上書き */
.wpcf7 .wpcf7-form-control-wrap {
  display: block;
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea,
.wpcf7 select {
  display: block;
  width: 100%;
  padding: 12px 16px;
  font-size: var(--font-size-base);
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
  appearance: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.wpcf7 input:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus {
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(78, 197, 193, 0.15);
}

.wpcf7 input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 40px;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  font-family: var(--font-base);
  color: #fff;
  background: var(--color-gradient);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: box-shadow var(--transition-base), transform var(--transition-fast);
}

.wpcf7 input[type="submit"]:hover {
  box-shadow: var(--shadow-btn-hover);
  transform: translateY(-2px);
}

/* ===================================
 * アイコン付き情報ボックス（Contact ページ等）
 * =================================== */
.info-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xl);
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.info-box__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-bg-teal-light);
  font-size: 22px;
  flex-shrink: 0;
}

.info-box__title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}

.info-box__text {
  font-size: var(--font-size-sm);
  color: var(--color-text-sub);
  line-height: var(--line-height-loose);
}
