@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
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/

/* ==================================================
 * 1. ヒーロービュー（中央白グラデーション＆特大ロゴ対応）
 * ================================================== */
.custom-hero-view {
  position: relative;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  height: 65vh;
  overflow: hidden;
  margin-top: -20px;
  margin-bottom: 40px;
}

.hero-slider {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.hero-slide {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: heroFadeAnimation 15s infinite ease-in-out;
}

.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 5s; }
.hero-slide:nth-child(3) { animation-delay: 10s; }

@keyframes heroFadeAnimation {
  0% { opacity: 0; transform: scale(1); }
  10% { opacity: 1; }
  33% { opacity: 1; }
  43% { opacity: 0; transform: scale(1.04); }
  100% { opacity: 0; }
}

.hero-overlay-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.6) 40%, rgba(255, 255, 255, 0.2) 90%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  padding: 20px;
}

.hero-text-area {
  text-align: center;
  max-width: 1000px;
  width: 100%;
}

.hero-logo-img {
  max-width: 960px;
  width: 90%;
  height: auto;
  margin-bottom: 20px;
  filter: drop-shadow(0px 2px 8px rgba(255,255,255,0.9));
}

.hero-subtext {
  font-size: 1.3rem;
  font-weight: bold;
  color: #222;
  line-height: 1.6;
  margin: 0;
  text-shadow: 0 0 10px rgba(255, 255, 255, 1);
}

@media screen and (max-width: 768px) {
  .custom-hero-view { height: 55vh; }
  .hero-logo-img { max-width: 480px; width: 85%; margin-bottom: 15px; }
  .hero-subtext { font-size: 1rem; padding: 0 10px; }
}


/* ==================================================
 * 2. 独自カスタム記事一覧エリア（Flexboxベース・安全設計）
 * ================================================== */
.custom-archive-wrapper {
  max-width: 1140px;
  margin: 0 auto 60px auto;
  padding: 0 20px;
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
  box-sizing: border-box;
}

.custom-posts-container {
  width: 100%;
}

.custom-section-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  border-left: 4px solid #ff5a5f;
  padding-left: 12px;
  margin: 0 0 30px 0;
}

/* 共通リンクの文字色・装飾リセット */
.hero-post-link, .sub-post-link-flex {
  display: block;
  text-decoration: none !important;
  color: inherit !important;
}

/* --- ① 1件目の最新記事（大カード） --- */
.hero-post-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  margin-bottom: 30px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
}

@media screen and (min-width: 769px) {
  .hero-post-link {
    display: flex;
    align-items: stretch;
  }
  .hero-post-thumb {
    width: 55%;
    flex-shrink: 0;
  }
  .hero-post-content {
    width: 45%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

.hero-post-thumb img {
  width: 100%;
  height: 100%;
  min-height: 350px;
  max-height: 400px;
  object-fit: cover;
  display: block;
}

.hero-post-title {
  font-size: 1.7rem;
  font-weight: bold;
  line-height: 1.4;
  color: #111;
  margin: 10px 0 15px 0;
}

.hero-post-excerpt {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
}


/* --- ② 2記事目以降（2列グリッド） --- */
.sub-posts-grid-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  width: 100%;
}

.sub-post-card-flex {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  width: calc(50% - 15px); /* きっちり1行に2つ配置 */
  box-sizing: border-box;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sub-post-thumb-flex img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.sub-post-content-flex {
  padding: 25px;
}

.sub-post-title-flex {
  font-size: 1.2rem;
  font-weight: bold;
  line-height: 1.4;
  color: #222;
  margin: 10px 0 12px 0;
  height: 2.8em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.hero-post-date, .sub-post-date-flex {
  font-size: 0.85rem;
  color: #999;
}


/* --- ③ カテゴリー＆タグの新デザイン --- */

/* カテゴリー：塗りつぶしタブ */
.custom-cat-label {
  display: inline-block;
  background-color: #ff5a5f;
  color: #fff;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 4px 14px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

/* タグ全体のコンテナ */
.custom-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px dashed #eee;
}

/* タグ単体：カプセル型の白抜き枠線 */
.tag-item {
  display: inline-block;
  font-size: 0.75rem;
  color: #666;
  background-color: transparent;
  border: 1px solid #ddd;
  padding: 2px 10px;
  border-radius: 20px;
  position: relative;
  top: 0;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}


/* --- ④ ホバー時のアニメーション演出 --- */
.hero-post-card:hover, .sub-post-card-flex:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.hero-post-card:hover .tag-item, .sub-post-card-flex:hover .tag-item {
  color: #ff5a5f;
  border-color: #ff5a5f;
  background-color: #fff8f8;
  top: -4px; /* ピョコッと上に浮き上がる */
}

/* タグの順番ディレイ（時間差）効果 */
.hero-post-card:hover .tag-item:nth-child(1), .sub-post-card-flex:hover .tag-item:nth-child(1) { transition-delay: 0s; }
.hero-post-card:hover .tag-item:nth-child(2), .sub-post-card-flex:hover .tag-item:nth-child(2) { transition-delay: 0.04s; }
.hero-post-card:hover .tag-item:nth-child(3), .sub-post-card-flex:hover .tag-item:nth-child(3) { transition-delay: 0.08s; }
.hero-post-card:hover .tag-item:nth-child(4), .sub-post-card-flex:hover .tag-item:nth-child(4) { transition-delay: 0.12s; }


/* --- ⑤ スマホ・タブレット用の完全レスポンシブ --- */
@media screen and (max-width: 768px) {
  .hero-post-thumb img { min-height: 200px; height: 220px; }
  .hero-post-content { padding: 20px; }
  .hero-post-title { font-size: 1.3rem; }
  
  /* スマホでは2列を縦1列に */
  .sub-post-card-flex { width: 100%; }
  .sub-post-thumb-flex img { height: 200px; }
  .sub-post-content-flex { padding: 20px; }
}

/* ==================================================
 * Cocoon標準の記事一覧（インデックス）を強制的に非表示にする
 * ================================================== */
.home.front-page .main .list_card,
.home.front-page .main .entry-card-wrap,
.home.front-page .main .pagination {
  display: none !important;
}