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

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/

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

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

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/
}
/* =====================================================
   SHIKAKU-MEDIA.COM｜学習最適化デザイン（統合版）
   Target: Cocoon Child (Customizer)
   2025-12 Optimized
===================================================== */

/* ---------------------------------------------------
   1. 基本設定（読みやすさ重視）
   --------------------------------------------------- */
body {
    background: #f7f9fc;
    line-height: 1.8;
    color: #333; /* 真っ黒より目に優しい濃いグレー */
    font-weight: 500;
}

.entry-content {
    font-size: 17px; /* 記事本文を少し大きくして可読性UP */
}

/* 記事内の強調太字（マーカー風） */
.entry-content strong {
    background: linear-gradient(transparent 70%, #fff799 70%); /* 蛍光ペン風 */
    color: #222;
}

/* ---------------------------------------------------
   2. 見出しデザイン（教科書・参考書風）
   --------------------------------------------------- */
/* ---------------------------------------------------
   Title. H1見出し（記事タイトル・カテゴリータイトル）
   --------------------------------------------------- */
.article h1,
.entry-title,
.category-description h1 {
    font-size: 28px;       /* H2より大きく */
    font-weight: 700;
    color: #333;
    margin-top: 10px;
    margin-bottom: 30px;
    padding-bottom: 15px;  /* 文字下の余白 */
    border-bottom: 4px solid #003366; /* H2と同じ濃紺で統一感を出す */
    line-height: 1.4;
}

/* スマホ表示時の調整 */
@media screen and (max-width: 768px) {
    .article h1,
    .entry-title,
    .category-description h1 {
        font-size: 22px;   /* スマホでは少し小さく */
        border-bottom-width: 3px;
    }
}

/* H2見出し：セクション区切り */
.article h2 {
    background: #f0f4f8; /* 薄いグレーブルー */
    padding: 15px 20px;
    border-left: 6px solid #003366; /* 信頼の濃紺 */
    border-bottom: none;
    font-size: 22px;
    color: #003366;
    border-radius: 4px;
    margin-top: 50px;
    margin-bottom: 30px;
}

/* H3見出し：小見出し */
.article h3 {
    border-bottom: 2px solid #dde2e5;
    padding-bottom: 8px;
    font-size: 20px;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #003366;
    position: relative;
}
.article h3:after { /* アクセント下線 */
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: #003366;
}

/* ---------------------------------------------------
   3. 学習用パーツ（補足・ポイントBOX）
   --------------------------------------------------- */
.memo-box {
    background: #f0f9ff; /* 薄い青背景 */
    border: 2px solid #bce0fd; /* 青枠 */
    padding: 20px;
    margin: 30px 0;
    border-radius: 8px;
    position: relative; /* 配置の基準にする */
    overflow: hidden; /* 枠外へのはみ出し防止 */
}

/* 親テーマによる意図しないアイコン（鉛筆など）を強制的に削除 */
.memo-box::before,
.memo-box::after {
    content: none !important;
    display: none !important;
    background: none !important;
}

.memo-title {
    font-weight: 700;
    color: #004085; /* 濃い青文字 */
    display: block;
    margin-bottom: 10px;
    font-size: 1.05em;
    /* CSSでのアイコン指定を削除（HTML側に記述があるため） */
}

/* 念のため、ボックス内のテキストが背面に回らないようにする */
.memo-box p {
    position: relative;
    z-index: 1;
    margin-bottom: 0;
}

/* ---------------------------------------------------
   4. 問題演習BOX（アコーディオン式）
   --------------------------------------------------- */
.exam-box {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    margin: 40px 0;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    overflow: hidden;
}

.exam-box-title {
    background: #003366; /* 濃紺ヘッダー */
    color: #fff;
    padding: 12px 20px;
    font-weight: 700;
    font-size: 1.1em;
}

.exam-q {
    padding: 24px;
    border-bottom: 1px dashed #e5e7eb;
    font-weight: 600;
}

/* 正解を見るボタン */
details.exam-ans summary.exam-btn {
    display: block;
    cursor: pointer;
    padding: 16px;
    background: #f8fafc;
    text-align: center;
    color: #2563eb;
    font-weight: 700;
    transition: background 0.2s;
    outline: none;
    list-style: none; /* デフォルトの三角を消す */
}
details.exam-ans summary.exam-btn:hover {
    background: #edf2f7;
}
details.exam-ans summary.exam-btn::-webkit-details-marker {
    display: none;
}

/* 解説エリア */
.ans-content {
    padding: 24px;
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    font-size: 0.95em;
}
.ans-label {
    background: #ef4444; /* 赤ラベル */
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    margin-right: 8px;
    vertical-align: middle;
}

/* ---------------------------------------------------
   5. テーブル（表）のデザイン（修正版）
   --------------------------------------------------- */
/*
   楽天アフィリエイトなどの外部コード（tableに直接styleが書かれているもの）
   の影響を避けるため、class属性がついていない純粋なtableのみに適用するか、
   特定のクラスをつけたtableのみに適用するのが安全です。
   ここでは、Cocoonが自動で付与するクラスや、よく使う汎用クラスを想定した書き方にします。
*/

/* 記事内の一般的なテキスト比較用テーブル等のデザイン */
.entry-content table:not([style*="border"]) {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.95em;
    background: #fff;
    display: block; /* スマホスクロール用 */
    overflow-x: auto;
    white-space: nowrap;
}

@media(min-width: 768px) {
    .entry-content table:not([style*="border"]) {
        display: table;
        white-space: normal;
    }
}

.entry-content table:not([style*="border"]) th {
    background: #eef2f6;
    color: #333;
    font-weight: 700;
    padding: 14px;
    border: 1px solid #dcdcdc;
    text-align: center;
    white-space: nowrap;
}

.entry-content table:not([style*="border"]) td {
    padding: 14px;
    border: 1px solid #dcdcdc;
    vertical-align: top;
    white-space: normal; /* セル内のテキストは折り返す */
}

/* 楽天アフィリエイトリンクの微調整（余白や配置） */
.entry-content table[style*="border:1px solid #ccc"] {
    margin: 0 auto; /* 中央寄せ */
    max-width: 100%; /* スマホではみ出さないように */
    box-sizing: border-box;
}
.entry-content table[style*="border:1px solid #ccc"] td {
    white-space: normal; /* 文字が切れないように折り返す */
    border: none; /* 楽天コード内のボーダー設定を優先 */
    padding: 10px; /* 楽天のデフォルトパディング */
}

/* ---------------------------------------------------
   6. トップページ科目カード（グリッド表示）
   --------------------------------------------------- */
.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}
.subject-card {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.03);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}
.subject-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}
.subject-card-title {
    font-weight: 700;
    font-size: 1.2em;
    color: #003366;
    margin-bottom: 10px;
    text-align: center;
}
.subject-card-desc {
    font-size: 0.9em;
    color: #666;
    line-height: 1.6;
}

/* ---------------------------------------------------
   7. カテゴリーページ説明文のデザイン
   --------------------------------------------------- */
.category-description {
    background: #fff;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
/* カテゴリーページのリストボックス */
.list-box-icon {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}
.list-box-icon li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    line-height: 1.6;
}
.list-box-icon li:before {
    content: "✔"; /* チェックマーク */
    position: absolute;
    left: 0;
    top: 0;
    color: #2563eb;
    font-weight: bold;
}

/* ---------------------------------------------------
   8. 裏ワザ・ポイントBOX（ウィジェット用）
   --------------------------------------------------- */
.secret-box {
    background: #fffbf0; /* 非常に薄い黄色（目に優しい） */
    border: 2px solid #ffeebb; /* 薄いオレンジの枠線 */
    border-radius: 8px; /* 角丸 */
    padding: 20px; /* 内側の余白 */
    margin: 20px 0; /* 外側の余白 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.03); /* ほんのり影 */
}

.secret-box-title {
    font-weight: 700;
    color: #d97706; /* 濃いオレンジ（タイトルの文字色） */
    font-size: 1.1em;
    margin-bottom: 10px;
    display: block;
}

.secret-box ul {
    margin: 0;
    padding-left: 20px; /* リストのインデント */
}

.secret-box li {
    margin-bottom: 5px;
    font-size: 0.95em;
    color: #444;
}

/* 「実質0円」などの強調部分 */
.secret-box strong {
    background: linear-gradient(transparent 60%, #ffdf7e 60%); /* 黄色の蛍光マーカー */
    font-weight: bold;
    color: #333;
}