@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. テーブル（表）のデザイン
   --------------------------------------------------- */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.95em;
    background: #fff;
}
.entry-content th {
    background: #eef2f6;
    color: #333;
    font-weight: 700;
    padding: 14px;
    border: 1px solid #dcdcdc;
    text-align: center;
    white-space: nowrap;
}
.entry-content td {
    padding: 14px;
    border: 1px solid #dcdcdc;
    vertical-align: top;
}
/* スマホで横スクロール対応 */
.entry-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
}
/* ただし、短い表は画面幅いっぱいにしない（微調整） */
@media(min-width: 768px) {
    .entry-content table {
        display: table;
        white-space: normal;
    }
}

/* ---------------------------------------------------
   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;
}