/*
Theme Name: ANTHEM Child
Template: anthem_tcd083
Description: ANTHEMテーマの子テーマ
Author: あなたの名前
Version: 1.0
*/

/* =========================
   レイアウト全体
========================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================
   素材一覧（カード型レイアウト）
========================= */
.freematerial-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 4rem;
}

.freematerial-card {
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: 0.3s;
}

.freematerial-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.card-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

.card-body {
  padding: 1rem;
}

.card-title {
  font-size: 16px;
  margin: 0 0 0.5rem;
}

.card-excerpt {
  font-size: 0.95rem;
  color: #555;
}

@media (max-width: 1024px) {
  .container {
    max-width: 900px;
    padding: 0 15px;
  }
  .freematerial-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .container {
    max-width: 100%;
    padding: 0 10px;
  }
  .freematerial-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

/* =========================
   素材詳細ページ（全体）
========================= */
.freematerial-detail {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.freematerial-thumbnail img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 20px;
}

.freematerial-title {
  font-size: 2rem;
  font-weight: bold;
  margin: 30px 0 20px;
  color: #333;
  padding-bottom: 10px;
  border-bottom: none;
}

@media screen and (max-width: 767px) {
  .freematerial-title {
    font-size: 24px; /* ✅ お好みに応じて調整（1.4rem〜1.6rem） */
  }
}

.freematerial-excerpt {
  font-size: 14px;
  color: #555;
  margin-top: 10px;
  margin-bottom: 30px;
  line-height: 1.7;
  text-align: left;
}

.freematerial-content {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

/* =========================
   カラーバリエーション（差分一覧）
========================= */
.freematerial-variations {
  margin-top: 40px;
  padding: 20px 0;
}

.variation-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 960px;
  justify-content: center;
}

.variation-gallery li img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  cursor: pointer; /* クリックできるように */
  transition: transform 0.2s;
}

.variation-gallery li img:hover {
  transform: scale(1.03);
}

/* 画質改善用：画像リンクで大きいサイズ表示できるように */
.variation-gallery li a {
  display: block;
  text-decoration: none;
}

@media (max-width: 768px) {
  .variation-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .variation-gallery {
    grid-template-columns: repeat(1, 1fr);
  }
}

/* =========================
   素材情報（表）
========================= */
.freematerial-info {
  margin-top: 40px;
  padding: 20px 0;
}

.freematerial-info-table {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  border-collapse: collapse;
}

.freematerial-info-table th,
.freematerial-info-table td {
  padding: 10px 15px;
  border: 1px solid #ddd;
  text-align: left;
}

.freematerial-info-table th {
  background-color: #f5f5f5;
  width: 30%;
}

/* =========================
   動画（YouTube埋め込み）
========================= */
.freematerial-videos {
  margin-top: 40px;
  padding: 20px 0;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 700px;
  margin: 0 auto;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* =========================
   利用規約（自由文＋箇条書き）
========================= */
.freematerial-terms {
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
}

.terms-content,
.terms-content p,
.terms-content li {
  font-size: 1rem;
  line-height: 1.8 !important;
  text-align: left;
  word-break: break-word;
  -webkit-font-smoothing: antialiased;
  margin-bottom: 1em;
}

.terms-content ul {
  padding-left: 1.5em;
  margin-top: 1em;
  margin-bottom: 1em;
  list-style: disc;
}

.terms-content li {
  margin-bottom: 0.6em;
}

/* =========================
   ダウンロードエリア
========================= */
.freematerial-download {
  text-align: center;
  margin: 40px 0 60px;
  padding: 20px 0;
}

@media screen and (max-width: 767px) {
  .freematerial-download p {
    font-size: 14px;
    margin-bottom: 1.5em; /* ✅ テキストとボタンの間に余白 */
    line-height: 1.8; /* 念のため行間も再指定 */
  }
}

.download-button {
  display: inline-block;
  background-color: #008a9a;
  color: #fff;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.download-button:hover {
  background-color: #005f8d;
}

/* =========================
   セクション見出し共通
========================= */
.section-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  padding-bottom: 0.5em;
  border-bottom: 1px solid #ccc;
  margin-bottom: 1.5em;
  text-align: left;
  line-height: 1.4;
}

/* =========================
   Safariスマホ表示対策
========================= */
@media screen and (max-width: 767px) {
  .freematerial-excerpt,
  .terms-content,
  .terms-content p,
  .terms-content li {
    font-size: 1rem;
    line-height: 1.8 !important;
  }
}
