@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-color: #fe619a;
  --primary-bg: #fff2f9;
  --primary-light-bg: #ffddee;
  --text-color: #333;
  --text-light: #666;
  --shadow: 0 3px 6px rgba(0,0,0,0.16);
  --shadow-hover: 0 5px 15px rgba(254,97,154,0.3);
  --border-radius: 4px;
  --border-radius-large: 10px;
}

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
@media screen and (max-width: 1023px) {
  /* 必要に応じてここにコードを追加 */
}

@media screen and (max-width: 834px) {
  /* 必要に応じてここにコードを追加 */
}

@media screen and (max-width: 480px) {
  :root {
    --border-radius: 3px;
    --border-radius-large: 6px;
  }
}

/************************************
** 見出しカスタマイズ（最適化版）
************************************/
.article h1,
.article h2,
.article h3,
.article h4,
.article h5,
.article h6 {
  padding: 0;
  margin: 0;
  font-size: inherit;
  border: none;
  line-height: normal;
  position: relative;
}

.article h1 {
  background: var(--primary-light-bg);
  font-size: 22px;
  letter-spacing: 1px;
  margin: -8px -8px 20px;
  padding: 9px 10px;
  border-left: 10px solid var(--primary-color);
  line-height: 35px;
  border-radius: var(--border-radius);
}

.article h2 {
  background: var(--primary-bg);
  font-size: 20px;
  letter-spacing: 2px;
  margin: 35px -8px 20px;
  padding: 10px 7px 10px 10px;
  border-left: 7px solid var(--primary-color);
  border-bottom: 1px solid var(--primary-color);
  line-height: 27px;
}

.article h3 {
  background: var(--primary-bg);
  font-size: 18px;
  letter-spacing: 2px;
  margin: 35px -8px 20px;
  padding: 9px 7px 9px 10px;
  border-left: 5px solid var(--primary-color);
  line-height: 25px;
}

.article h4 {
  background: var(--primary-bg);
  font-size: 16px;
  letter-spacing: 2px;
  margin: 35px -8px 20px;
  padding: 8px 7px 8px 10px;
  border-left: 2px solid var(--primary-color);
  line-height: 23px;
}

.article h5 {
  background: var(--primary-bg);
  font-size: 16px;
  letter-spacing: 2px;
  margin: 35px 20px 20px;
  padding: 5px;
  border: 1px solid var(--primary-color);
  line-height: 27px;
  text-align: center;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.article h6 {
  font-size: 16px;
  letter-spacing: 2px;
  margin: 35px 0 20px;
  padding: 8px 16px 8px 25px;
  line-height: 25px;
  background: var(--primary-light-bg);
  border-radius: var(--border-radius-large);
  position: relative;
}

.article h6::after {
  position: absolute;
  top: 100%;
  left: 20px;
  content: '';
  width: 0;
  height: 0;
  border: 12px solid transparent;
  border-top: 13px solid var(--primary-light-bg);
}

/************************************
** サイドバータイトル カスタマイズ
************************************/
#sidebar h3 {
  color: var(--text-color);
  background: var(--primary-bg);
  font-size: 16px;
  letter-spacing: 8px;
  text-align: center;
  margin: 10px 0 20px;
  padding: 10px;
  border-left: 6px solid var(--primary-color);
  border-bottom: 1px solid var(--primary-color);
}

/************************************
** 関連記事見出しカスタマイズ
************************************/
.related-entry-heading {
  font-size: 22px;
  text-align: center;
  letter-spacing: 4px;
  margin: 40px 0 8px;
}

/************************************
** 関連記事カスタマイズ（最適化版）
************************************/
.related-entry-card-wrap.a-wrap.cf {
  margin-bottom: 0;
  padding-bottom: 0;
}

.related-entry-card-content.card-content.e-card-content {
  padding-bottom: 16px;
}

.related-entry-card-title.card-title.e-card-title {
  font-size: 16px;
  height: 67px;
  display: flex;
  align-items: center;
}

/************************************
** 行間と改行幅 カスタマイズ
************************************/
.entry-content p {
  line-height: 2.4;
  margin: 0 0 1.2em;
}

/************************************
** 記事一覧（インデックス）のカスタマイズ（最適化版）
************************************/
.main {
  border: 1px solid var(--primary-color);
}

.home main,
.archive main {
  background: transparent;
  margin-top: 0;
  padding-top: 1px;
  border: none;
}

.entry-card-wrap {
  will-change: transform, box-shadow;
  transition: box-shadow 0.3s ease;
  margin-bottom: 1em;
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: 0 0 0 1px var(--primary-color);
}

.entry-card-thumb.card-thumb.e-card-thumb {
  max-width: 376px;
  max-height: 211px;
  text-align: center;
}

.entry-card-thumb-image.card-thumb-image.wp-post-image {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.entry-card-wrap:hover {
  box-shadow: var(--shadow-hover);
  text-decoration: none;
  background: #fff;
}

.entry-card-wrap.a-wrap:hover,
.entry-card:hover {
  background: #fff;
}

.entry-card-snippet.card-snippet.e-card-snippet {
  margin-bottom: 8px;
}

.entry-card-title {
  margin-top: 18px;
  line-height: 1.5;
  color: var(--text-color);
}

.entry-card-title:hover {
  color: var(--text-color);
}

.e-card-info {
  color: var(--text-light);
}

/************************************
** エントリーカードラベル非表示
************************************/
.entry-card .cat-label,
.related-entry-card .cat-label {
  display: none;
}

/************************************
** 人気記事ランキング表示のカスタマイズ（最適化版）
************************************/
.widget-entry-cards.ranking-visible .widget-entry-card-thumb::before {
  background: var(--primary-light-bg);
  color: #f32469;
  top: -4px;
  left: -4px;
  border-radius: 18px;
  border: 2px solid #f32469;
  width: 18px;
  height: 16px;
  line-height: 18px;
  font-weight: bold;
  font-style: oblique;
}

.popular-entry-card-title.widget-entry-card-title.card-title {
  display: flex;
  padding-top: 5px;
}

.popular-entry-card-title {
  font-weight: bold;
  font-size: 14px;
}

.popular-entry-card-link.a-wrap {
  padding: 2px;
  margin: 2px;
}

.attachment-thumb120.size-thumb120.wp-post-image {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

/************************************
** モバイル最適化
************************************/
@media screen and (max-width: 768px) {
  .entry-card-title {
    font-size: 14px;
    line-height: 1.4;
  }
  
  .e-card-info {
    font-size: 12px;
  }
}

@media screen and (max-width: 480px) {
  .related-entry-card-title.card-title.e-card-title {
    font-size: 14px;
  }
  
  .related-entry-card-content.card-content.e-card-content {
    padding-bottom: 0;
  }
  
  .popular-entry-card-title {
    font-size: 12px;
  }
}





/************************************
** ヘッダーカスタマイズ
************************************/
.custom-header {
  background: #fff;
  border-radius: var(--border-radius);
  margin: 20px;
  box-shadow: 0 0 0 1px var(--primary-color);
  border: none;
}

.custom-header-content {
  padding: 24px 32px;
}

.custom-site-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 8px;
  text-align: center;
}

.custom-site-description {
  color: var(--text-light);
  text-align: center;
  font-size: 14px;
  margin-bottom: 24px;
}

.custom-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.custom-nav-item {
  background: var(--primary-bg);
  color: var(--text-color);
  padding: 10px 20px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid var(--primary-color);
}

.custom-nav-item:hover {
  background: var(--primary-light-bg);
  color: var(--text-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}

/* モバイル対応 */
@media screen and (max-width: 768px) {
  .custom-header {
    margin: 16px;
    border-radius: var(--border-radius);
  }
  
  .custom-header-content {
    padding: 20px 24px;
  }
  
  .custom-site-title {
    font-size: 24px;
  }
  
  .custom-nav {
    gap: 6px;
  }
  
  .custom-nav-item {
    padding: 8px 16px;
    font-size: 13px;
  }
}

