@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 明るい暮らし カスタムデザイン
** テーマカラー: グリーン × ホワイト × ダークグレー
************************************/

/* ===== CSS変数 ===== */
:root {
  --primary: #2ecc71;
  --primary-dark: #27ae60;
  --primary-light: #a8e6cf;
  --accent: #f39c12;
  --text-dark: #2c3e50;
  --text-light: #7f8c8d;
  --bg-light: #f8fffe;
  --bg-card: #ffffff;
  --shadow-sm: 0 2px 8px rgba(46,204,113,0.08);
  --shadow-md: 0 4px 20px rgba(46,204,113,0.12);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== 全体 ===== */
body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-dark);
  background: var(--bg-light);
  -webkit-font-smoothing: antialiased;
}

/* ===== ヘッダー ===== */
.header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: 0 4px 20px rgba(39,174,96,0.3);
  position: relative;
  overflow: hidden;
}

.header::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  pointer-events: none;
}

.header .header-in {
  max-width: 1100px;
}

.site-name-text,
.site-name-text a {
  color: #fff !important;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tagline {
  color: rgba(255,255,255,0.9) !important;
  font-size: 0.85em;
}

/* ===== ナビ ===== */
.navi {
  background: #fff;
  border-bottom: 2px solid var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.navi a {
  color: var(--text-dark) !important;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
}

.navi a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
  transform: translateX(-50%);
}

.navi a:hover::after {
  width: 80%;
}

.navi a:hover {
  color: var(--primary-dark) !important;
}

/* ===== コンテンツエリア ===== */
.main,
.content {
  max-width: 1100px;
}

/* ===== 記事カード ===== */
.entry-card-wrap {
  border-radius: var(--radius) !important;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  background: var(--bg-card);
  border: none !important;
}

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

.entry-card-thumb img {
  transition: var(--transition);
}

.entry-card-wrap:hover .entry-card-thumb img {
  transform: scale(1.05);
}

.entry-card-thumb {
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
}

.entry-card-content {
  padding: 1.2em 1.5em !important;
}

.entry-card-title {
  font-weight: 700;
  font-size: 1.05em;
  line-height: 1.6;
  color: var(--text-dark);
}

.entry-card-snippet {
  color: var(--text-light);
  font-size: 0.88em;
  line-height: 1.7;
}

/* ===== 記事本文 ===== */
.article {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 2.5em !important;
  border: none !important;
}

.article h1,
.entry-title {
  font-weight: 800;
  font-size: 1.6em;
  line-height: 1.5;
  color: var(--text-dark);
  border: none;
}

.article h2 {
  font-weight: 700;
  font-size: 1.35em;
  color: var(--text-dark);
  border-left: 4px solid var(--primary);
  border-bottom: none;
  padding: 0.6em 0 0.6em 1em;
  margin: 2.5em 0 1.2em;
  background: linear-gradient(90deg, rgba(46,204,113,0.06) 0%, transparent 100%);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.article h3 {
  font-weight: 700;
  font-size: 1.15em;
  color: var(--primary-dark);
  border: none;
  padding: 0.4em 0;
  margin: 2em 0 0.8em;
  position: relative;
  padding-left: 1.2em;
}

.article h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
}

.article p {
  line-height: 1.9;
  margin-bottom: 1.4em;
}

/* ===== リスト ===== */
.article ul {
  list-style: none;
  padding-left: 0;
}

.article ul li {
  position: relative;
  padding-left: 1.6em;
  margin-bottom: 0.6em;
  line-height: 1.8;
}

.article ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* ===== テーブル ===== */
.wp-block-table table,
.article table {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  width: 100%;
  border: none !important;
}

.wp-block-table table thead th,
.article table thead th {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  font-weight: 600;
  padding: 0.9em 1.2em;
  border: none;
  text-align: left;
}

.wp-block-table table tbody td,
.article table tbody td {
  padding: 0.8em 1.2em;
  border-bottom: 1px solid #eef5f0;
  border-right: none;
  border-left: none;
}

.wp-block-table table tbody tr:last-child td {
  border-bottom: none;
}

.wp-block-table table tbody tr:nth-child(even) {
  background: #f7fdf9;
}

.wp-block-table table tbody tr:hover {
  background: #eaf7ef;
  transition: var(--transition);
}

/* ===== アフィリエイトリンク ===== */
.affiliate-link {
  background: linear-gradient(135deg, #fff9e6 0%, #fff3cc 100%);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.2em 1.5em !important;
  margin: 1.5em 0 !important;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.affiliate-link::before {
  content: '＼ おすすめ ／';
  display: block;
  font-size: 0.75em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.5em;
  letter-spacing: 0.1em;
}

.affiliate-link a {
  color: var(--accent) !important;
  font-weight: 700;
  font-size: 1.1em;
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
}

.affiliate-link a:hover {
  color: #e67e22 !important;
  transform: scale(1.03);
}

/* ===== サイドバー ===== */
.sidebar {
  border-radius: var(--radius-lg);
}

.widget {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5em;
  margin-bottom: 1.5em;
  border: none !important;
}

.widget-title {
  font-weight: 700;
  color: var(--text-dark);
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 0.5em;
  margin-bottom: 1em;
}

/* ===== フッター ===== */
.footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.8);
}

.footer a {
  color: var(--primary-light) !important;
  transition: var(--transition);
}

.footer a:hover {
  color: var(--primary) !important;
}

/* ===== 画像 ===== */
.article img {
  border-radius: var(--radius);
  transition: var(--transition);
}

.wp-block-image {
  margin: 2em 0;
}

.wp-block-image img:hover {
  box-shadow: var(--shadow-md);
}

/* ===== 目次 ===== */
.toc {
  background: #f0faf4 !important;
  border: 2px solid var(--primary-light) !important;
  border-radius: var(--radius) !important;
  padding: 1.5em 2em !important;
}

.toc-title {
  color: var(--primary-dark) !important;
  font-weight: 700;
}

/* ===== パンくずリスト ===== */
.breadcrumb {
  font-size: 0.85em;
  color: var(--text-light);
  padding: 0.8em 0;
}

.breadcrumb a {
  color: var(--primary-dark);
  text-decoration: none;
}

/* ===== ページネーション ===== */
.pagination a,
.pagination span {
  border-radius: 8px !important;
  transition: var(--transition);
}

.pagination a:hover {
  background: var(--primary) !important;
  color: #fff !important;
}

.page-numbers.current {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
}

/* ===== スクロールで表示するアニメーション用 ===== */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== ボタン風リンク ===== */
.btn-link {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff !important;
  padding: 0.8em 2em;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(46,204,113,0.3);
}

.btn-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(46,204,113,0.4);
}

/* ===== スムーズスクロール ===== */
html {
  scroll-behavior: smooth;
}

/* ===== 選択テキスト ===== */
::selection {
  background: var(--primary-light);
  color: var(--text-dark);
}

/************************************
** レスポンシブデザイン
************************************/

/*1023px以下*/
@media screen and (max-width: 1023px) {
  .article {
    padding: 1.5em !important;
    border-radius: var(--radius);
  }
}

/*834px以下*/
@media screen and (max-width: 834px) {
  .article h1, .entry-title {
    font-size: 1.3em;
  }
  .article h2 {
    font-size: 1.15em;
  }
}

/*480px以下*/
@media screen and (max-width: 480px) {
  .article {
    padding: 1em !important;
    border-radius: 8px;
  }
  .article h1, .entry-title {
    font-size: 1.15em;
  }
  .article h2 {
    font-size: 1.05em;
    padding: 0.5em 0 0.5em 0.8em;
  }
  .affiliate-link {
    padding: 1em !important;
  }
  .affiliate-link a {
    font-size: 1em;
  }
}
