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

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

/* ==================================================
 * ❌ 【完全限定版】トップページのCocoon標準メイン記事エリアのみを強制消去
 * ================================================== */
.home #content #main {
  display: none !important;
}

.home #my-custom-archive-area ~ #content #main {
  display: none !important;
}


/* ==================================================
 * 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. センターモード・バナーカルーセル（PC表示2分の1コンパクト版）
 * ================================================== */
.custom-banner-carousel-container {
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 0 15px 0; /* 上下の余白もコンパクトに */
  overflow: hidden;
  background-color: #fafafa;
}

.custom-banner-swiper {
  width: 100%;
  padding: 10px 0 35px 0 !important;
}

/* 💡 スライド1枚あたりの横幅を最大1000pxから「500px（約半分）」に変更 */
.custom-banner-swiper .swiper-slide {
  width: 45% !important; /* PC画面でほどよく引き立つサイズ感（約半分） */
  max-width: 500px;      /* 👈 ここで最大横幅を半分に制限しました */
  transition: opacity 0.4s ease, transform 0.4s ease;
  transform: scale(0.92); /* 左右のバナーの縮小率 */
  opacity: 0.35;          /* 左右のバナーの透明度 */
}

/* 中央（アクティブ）のバナーを強調 */
.custom-banner-swiper .swiper-slide-active {
  transform: scale(1) !important;
  opacity: 1 !important;
}

/* バナーコンテナ（2:1の比率を完全に維持） */
.carousel-placeholder-banner {
  width: 100%;
  aspect-ratio: 2 / 1; /* 1000:500 の比率をキープ */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  background: transparent;
}

/* 画像全体表示設定 */
.banner-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}

/* 左右ナビゲーションボタン */
.custom-banner-swiper .swiper-button-next,
.custom-banner-swiper .swiper-button-prev {
  color: #ff5a5f !important;
  background: rgba(255, 255, 255, 0.9);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.custom-banner-swiper .swiper-button-next::after,
.custom-banner-swiper .swiper-button-prev::after {
  font-size: 0.9rem !important;
}

/* 下部インジケーター（ドット） */
.custom-banner-swiper .swiper-pagination-bullet-active {
  background: #ff5a5f !important;
  width: 14px;
  border-radius: 4px;
}

/* スマホ用のレスポンシブ対応（スマホでは縮小されすぎないよう横幅いっぱいに） */
@media screen and (max-width: 768px) {
  .custom-banner-swiper .swiper-slide {
    width: 85% !important; /* スマホでは画面幅の85%でしっかり見せる */
    max-width: 100%;
  }
  .carousel-placeholder-banner {
    aspect-ratio: 2 / 1; /* スマホでも完璧に2:1を維持 */
  }
  .custom-banner-swiper .swiper-button-next,
  .custom-banner-swiper .swiper-button-prev {
    display: none !important;
  }
}


/* ==================================================
 * 3. 独自カスタム記事一覧エリア（Flexboxベース・2列）
 * ================================================== */
.custom-archive-wrapper {
  max-width: 1140px;
  margin: 40px 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);
  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; }
  
  .sub-post-card-flex { width: 100%; }
  .sub-post-thumb-flex img { height: 200px; }
  .sub-post-content-flex { padding: 20px; }
}


/* ==================================================
 * 4. 全体調整
 * ================================================== */
#my-custom-archive-area {
  margin-bottom: 80px !important;
}