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

/************************************
** 子テーマ用のスタイルを書く
************************************/
/* ================================
   MGS 専用 記事レイアウト
   ================================ */

/* 記事全体のベース */
.mgs-article {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  background: #fff;
}

body.dark-theme .mgs-article {
  background: #1f1f24;
  color: #f5f5f7;
}

/* タイトル */
.mgs-header {
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #eee;
  padding-bottom: 0.75rem;
}

.mgs-title {
  font-size: 1.7rem;
  line-height: 1.4;
  margin: 0;
}

/* ======================================
   ① 作品カード（アイキャッチ + メタ情報）
   ====================================== */

.mgs-work-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0 2rem;
  padding: 1.25rem;
  border-radius: 12px;
  background: #f7f7fb;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

body.dark-theme .mgs-work-card {
  background: #262630;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
}

.mgs-work-card img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}

/* メタ情報列 */
.mgs-card-col.mgs-card-meta {
  font-size: 0.9rem;
}

.mgs-card-meta p {
  margin: 0 0 0.35rem;
  line-height: 1.6;
}

.mgs-card-meta p strong {
  display: inline-block;
  min-width: 6em;
  color: #555;
}

body.dark-theme .mgs-card-meta p strong {
  color: #e0e0e8;
}

/* MGSボタン */
.mgs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.75rem;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  background: #ff3366;
  color: #fff !important;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(255, 51, 102, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.mgs-btn:hover {
  background: #ff1e59;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(255, 51, 102, 0.45);
}

/* ボタン内の▶をアイコンっぽく */
.mgs-btn::before {
  content: "▶";
  font-size: 0.8rem;
  margin-right: 0.4rem;
}

/* ======================================
   ② ギャラリー
   ====================================== */

.mgs-gallery-section {
  margin: 2rem 0 1.5rem;
}

.mgs-gallery-wrap {
  width: 100%;
}

.mgs-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.mgs-gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #111;
}

.mgs-gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mgs-gallery-item:hover img {
  transform: scale(1.04);
  opacity: 0.92;
}

.mgs-gallery-item:hover::after {
  opacity: 1;
}

/* ======================================
   ③ アフィリエイト埋め込みブロック
   ====================================== */

.mgs-affiliate-embed {
  margin: 2rem 0;
  padding: 1rem;
  border-radius: 10px;
  background: #fff7f9;
  border: 1px solid #ffd6e0;
}

body.dark-theme .mgs-affiliate-embed {
  background: #33202c;
  border-color: #ff6a9b;
}

/* ======================================
   ④ 本文（LLM生成 content_html）
   ====================================== */

.mgs-content {
  margin: 2rem 0;
  line-height: 1.9;
  font-size: 0.98rem;
}

.mgs-content h2,
.mgs-content h3 {
  margin: 2rem 0 0.75rem;
  font-weight: 700;
}

.mgs-content h2 {
  font-size: 1.3rem;
  border-left: 4px solid #ff3366;
  padding-left: 0.6rem;
}

.mgs-content h3 {
  font-size: 1.1rem;
}

/* 本文内の画像（LLMが入れたもの）は控えめに */
.mgs-content img {
  max-width: 100%;
  height: auto;
  margin: 1rem auto;
  display: block;
  border-radius: 8px;
}

/* ======================================
   ⑤ 関連記事
   ====================================== */

.mgs-related {
  margin: 3rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

body.dark-theme .mgs-related {
  border-top-color: #444;
}

.mgs-related h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

/* ======================================
   ⑥ レスポンシブ
   ====================================== */

@media (max-width: 880px) {
  .mgs-work-card {
    grid-template-columns: 1fr;
  }

  .mgs-card-col.mgs-card-meta {
    font-size: 0.95rem;
  }
}

@media (max-width: 768px) {
  .mgs-article {
    padding: 1rem 0.75rem 2.5rem;
  }

  .mgs-title {
    font-size: 1.4rem;
  }

  .mgs-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .mgs-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mgs-work-card {
    padding: 1rem;
  }
}

/* ===== MGS 作品カード ===== */
.mgs-card {
  display: flex;
  gap: 24px;
  padding: 24px;
  margin: 24px 0;
  border-radius: 24px;
  background: #f7f8fc;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.mgs-card__thumb img {
  border-radius: 18px;
  max-width: 260px;
  height: auto;
  display: block;
}

.mgs-card__meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mgs-meta-list {
  margin: 0 0 16px;
}

.mgs-meta-row {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 14px;
}
.mgs-meta-row dt {
  width: 80px;
  font-weight: 600;
  color: #4b5563;
}
.mgs-meta-row dd {
  margin: 0;
  color: #111827;
}

.mgs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(234, 88, 12, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.mgs-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(234, 88, 12, 0.35);
  opacity: 0.95;
}

/* SP 縦並び */
@media (max-width: 768px) {
  .mgs-card {
    flex-direction: column;
  }
  .mgs-card__thumb img {
    max-width: 100%;
  }
}

/* ===== ギャラリー ===== */
.mgs-gallery-wrap {
  margin: 32px 0;
}
.mgs-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.mgs-gallery-item img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.mgs-gallery-item img:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
  opacity: 0.95;
}

/* ===== ライトボックス ===== */
.mgs-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.mgs-lightbox.is-active {
  display: flex;
}
.mgs-lightbox__inner {
  position: relative;
  max-width: 96vw;
  max-height: 92vh;
}
.mgs-lightbox__img {
  max-width: 100%;
  max-height: 92vh;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.mgs-lightbox__close {
  position: absolute;
  top: -40px;
  right: 0;
  background: transparent;
  border: none;
  color: #f9fafb;
  font-size: 28px;
  cursor: pointer;
}

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px) {
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px) {
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px) {
  /*必要ならばここにコードを書く*/
}

.mybtn {
  text-align: center;
}
.mybtn-1 a {
  display: inline-block;
  margin: 1em 0;
  padding: 18px 40px 18px 30px;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  line-height: 1.3em;
  text-decoration: none;
  border-radius: 4px;
  box-shadow: 0px 4px 12px -2px #666;
  position: relative;
  transition: 0.4s;
}
.mybtn-1 a:hover {
  color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -5px #777;
  opacity: 1;
}
.mybtn-1 a::after {
  font-family: FontAwesome;
  content: "\f138";
  color: #fff;
  position: absolute;
  right: 10px;
  top: 50%;
  margin: auto;
  margin-top: -10px;
}
.mybtn-red a {
  background: #d43d39;
}
.video-container {
  max-width: none;
}

/* ============================
   MGS記事用：本文見出しデザイン
   （.mgs-content 内だけに限定）
   ============================ */

/* セクション見出し（作品概要／出演者の魅力 など） */
.mgs-article .mgs-content h2 {
  position: relative;
  margin: 2.5em 0 1.5em;
  padding: 0.8em 1.2em 0.8em 1.4em;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.5;
  color: #222;
  background: #f7f8fc;
  border-left: 4px solid #ff7ea8; /* ピンク系のアクセント */
  border-radius: 6px;
}

/* TOC用に<span id="tocX">が入っていても綺麗に見えるように */
.mgs-article .mgs-content h2 span {
  position: relative;
  z-index: 1;
}

/* サブ見出し（注目ポイント1/2/3 など） */
.mgs-article .mgs-content h3 {
  position: relative;
  margin: 2em 0 1em;
  padding: 0.5em 0.4em 0.3em;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.5;
  color: #333;
}

/* 下線にグラデーションアクセント */
.mgs-article .mgs-content h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40%;
  max-width: 220px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff7ea8 0%, #ffcf72 100%);
}

/* 見出し直後の段落に少しゆとり */
.mgs-article .mgs-content h2 + p,
.mgs-article .mgs-content h3 + p {
  margin-top: 0.6em;
}

/* 下部の作品情報セクション */
.mgs-section-bottom-info {
  margin: 3rem 0 0;
}

.mgs-bottom-title {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
}

/* 下部カードのレイアウト */
.mgs-work-card-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start; /* ここで上揃えにする */
  gap: 2.5rem;
  padding: 2.5rem;
  border-radius: 18px;
  background: #f7f7fb;
}

/* カラム */
.mgs-work-card-bottom .mgs-card-col {
  flex: 1 1 50%;
}

/* テキスト側の整え */
.mgs-work-card-bottom .mgs-card-meta p {
  margin: 0 0 0.4em;
  line-height: 1.7;
}

.mgs-btn-bottom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
  padding: 0.9em 2.8em;
  border-radius: 999px;
}

/* スマホ時 */
@media (max-width: 768px) {
  .mgs-work-card-bottom {
    flex-direction: column;
    padding: 1.6rem;
  }

  .mgs-work-card-bottom .mgs-card-col {
    flex: 1 1 100%;
  }
}

/* ── 下部の作品情報カードだけスタイル変更 ───────────── */

.mgs-work-card.mgs-work-card-bottom {
  max-width: 1080px;
  margin: 64px auto 40px;
  padding: 32px 40px 36px;
  background: #f9f9fc;
  border-radius: 24px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.5fr);
  grid-template-areas:
    "title  title"
    "meta   thumb";
  column-gap: 40px;
  row-gap: 24px;
  align-items: center;
}

/* タイトルをカードの上にフラットに置く */
.mgs-work-card-bottom .mgs-bottom-title {
  grid-area: title;
  margin: 0 0 8px;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* 左：テキスト側 */
.mgs-work-card-bottom .mgs-card-col.mgs-card-meta {
  grid-area: meta;
  padding: 8px 0 0;
}

.mgs-work-card-bottom .mgs-card-meta p {
  margin: 4px 0;
  font-size: 0.96rem;
  line-height: 1.7;
}

/* ボタンは少しだけコンパクトに・左寄せ */
.mgs-work-card-bottom .mgs-btn-bottom {
  margin-top: 20px;
  padding: 14px 40px;
  font-size: 0.95rem;
  border-radius: 999px;
}

/* 右：サムネ側 */
.mgs-work-card-bottom .mgs-card-col:first-of-type {
  grid-area: thumb;
  justify-self: end;
}

.mgs-work-card-bottom .mgs-card-col img {
  display: block;
  max-width: 360px;
  width: 100%;
  height: auto;
  border-radius: 18px;
  object-fit: cover;
}

/* スマホ用：縦1カラムで間延びしないように調整 */
@media (max-width: 768px) {
  .mgs-work-card.mgs-work-card-bottom {
    padding: 24px 20px 28px;
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "thumb"
      "meta";
    row-gap: 20px;
  }

  .mgs-work-card-bottom .mgs-card-col:first-of-type {
    justify-self: center;
  }

  .mgs-work-card-bottom .mgs-card-col img {
    max-width: 280px;
  }

  .mgs-work-card-bottom .mgs-btn-bottom {
    width: 100%;
    text-align: center;
    justify-content: center;
    display: inline-flex;
  }
}
