/*
Theme Name: AFFINGER Child
Template: affinger
Description: AFFINGER6 対応
Version: 20210719
*/

/* =====================================================
   テクラボ デザイン設定 v4（バランス改善版）
   カラーパレット:
   - ヘッダー: #3B7DD8（クリアブルー）
   - ナビ背景: #FFFFFF（白）/ ナビ文字: #2C5F9E
   - アクセント: #E88C3A (あたたかオレンジ)
   - ベース背景: #FAFBFD (ほぼ白)
   - 本文: #3D3D3D (落ち着きグレー)
   - 枠線・区切り: #D4DDE8 (くすみ青グレー)
   - 差し色: #5DB888 (グリーン)
   - 見出し濃: #1E4C7A (しっかり紺)
   - 見出し中: #3571B8 (バランス青)
   - カード背景: #F5F7FA
   ===================================================== */

/* ----- ベースフォント・テキスト ----- */
body {
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif !important;
    font-size: 17px !important;
    line-height: 1.8 !important;
    color: #3D3D3D !important;
    background-color: #FAFBFD !important;
    -webkit-font-smoothing: antialiased;
}
.post, .st-main, article, .entry-content,
#the-content, .st-post-content {
    font-size: 17px !important;
    line-height: 1.8 !important;
    color: #3D3D3D !important;
}

/* ----- リンク ----- */
a { color: #3571B8; text-decoration: none; }
a:hover { color: #1E4C7A; text-decoration: underline; }

/* ----- ヘッダー ----- */
#headbox-bg, header#header-area, .header-wrap, #st-header-area {
    background: linear-gradient(135deg, #2C5F9E 0%, #3B7DD8 60%, #5A9BE6 100%) !important;
}
header .sitename a, header .descr, #st-header .sitename a {
    color: #FFFFFF !important;
}
.site-description, header .descr {
    color: rgba(255,255,255,0.85) !important;
}
header .sitename a, .sitename a, header h1 a {
    font-family: "Noto Sans JP", sans-serif !important;
    font-weight: 700 !important;
    font-size: 1.5em !important;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* ----- ヘッダー右ウィジェット ----- */
#header-r a, #header-r .textwidget a {
    color: #FFFFFF !important;
    opacity: 0.9;
}
#header-r a:hover {
    opacity: 1;
}

/* ----- グローバルナビ（白背景＋青文字で視認性UP） ----- */
#st-menubox {
    background-color: #FFFFFF !important;
    border-bottom: 2px solid #D4DDE8 !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
}
#st-menubox nav ul li a,
#st-menubox .menu > li > a,
#st-menubox a {
    color: #2C5F9E !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    padding: 12px 18px !important;
    transition: all 0.2s ease !important;
    border-bottom: 3px solid transparent !important;
}
#st-menubox nav ul li a:hover,
#st-menubox .menu > li > a:hover,
#st-menubox a:hover {
    color: #1E4C7A !important;
    background-color: #F0F4FA !important;
    border-bottom: 3px solid #3B7DD8 !important;
}
/* 現在のページ */
#st-menubox .current-menu-item > a,
#st-menubox .current_page_item > a {
    color: #1E4C7A !important;
    border-bottom: 3px solid #E88C3A !important;
    font-weight: 700 !important;
}

/* ----- スマホナビ（モバイル用） ----- */
nav#s-navi {
    background-color: #2C5F9E !important;
    border-bottom: none !important;
}
#s-navi a, #s-navi dl.acordion a {
    color: #FFFFFF !important;
    font-weight: 500 !important;
    font-size: 14px !important;
}
#s-navi a:hover {
    background-color: rgba(255,255,255,0.15) !important;
}
#s-navi .acordion_button {
    color: #FFFFFF !important;
}

/* ----- 見出し H2 ----- */
.entry-content h2, .post h2, article h2,
.st-post-content h2, #the-content h2,
h2.wp-block-heading {
    background: linear-gradient(135deg, #1E4C7A, #2C5F9E) !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    font-size: 1.4em !important;
    padding: 15px 20px !important;
    margin: 50px 0 25px 0 !important;
    border: none !important;
    border-radius: 6px !important;
    line-height: 1.5 !important;
}

/* ----- 見出し H3 ----- */
.entry-content h3, .post h3, article h3,
.st-post-content h3, #the-content h3,
h3.wp-block-heading {
    color: #1E4C7A !important;
    font-weight: 700 !important;
    font-size: 1.25em !important;
    padding: 10px 15px !important;
    margin: 40px 0 20px 0 !important;
    border-left: 4px solid #3B7DD8 !important;
    border-bottom: 1px solid #D4DDE8 !important;
    background: transparent !important;
}

/* ----- 見出し H4 ----- */
.entry-content h4, .post h4, article h4,
h4.wp-block-heading {
    color: #2C5F9E !important;
    font-weight: 700 !important;
    font-size: 1.1em !important;
    padding: 8px 0 !important;
    border-bottom: 2px dotted #3B7DD8 !important;
}

/* ----- CTAボタン ----- */
.st-btn-open a, .rankstlink-r2 a,
.btn-wrap a, a.st-btn-open,
.st-mybtn, .st-mybtn-mini,
input[type="submit"], .wpcf7-submit {
    background-color: #E88C3A !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    min-height: 44px !important;
    min-width: 44px !important;
    padding: 12px 30px !important;
    text-align: center !important;
    text-decoration: none !important;
    box-shadow: 0 3px 8px rgba(232,140,58,0.25) !important;
    transition: all 0.3s ease !important;
}
.st-btn-open a:hover, .rankstlink-r2 a:hover,
.btn-wrap a:hover, a.st-btn-open:hover,
.st-mybtn:hover, input[type="submit"]:hover,
.wpcf7-submit:hover {
    background-color: #D47A2E !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 12px rgba(232,140,58,0.35) !important;
}

/* ----- ボックス・引用 ----- */
.st-kaiwa-box, .st-box, .kanren,
blockquote, .wp-block-table, .st-catgroup {
    background-color: #F5F7FA !important;
    border-radius: 8px !important;
}
blockquote {
    border-left: 4px solid #5DB888 !important;
    font-style: normal !important;
}

/* ----- チェックマーク・補足 ----- */
.st-check, .st-point {
    border-color: #5DB888 !important;
}
.st-check::before, .st-point::before {
    color: #5DB888 !important;
}

/* ----- サイドバー ----- */
.st-widgets-title, #side .st-widgets-title,
aside h4.menu_underh2, #side h4 {
    background: #1E4C7A !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    padding: 10px 15px !important;
    border-radius: 6px 6px 0 0 !important;
    border: none !important;
    font-size: 15px !important;
}
#side aside, .st-side {
    border: 1px solid #D4DDE8 !important;
    border-radius: 0 0 6px 6px !important;
    margin-bottom: 20px !important;
    background: #FFFFFF !important;
}

/* ----- フッター -----
   ※ AFFINGER6 動的CSS(st-themecss-loader.php)が #footer .footerlogo 等に
     color:#0f0f0f !important を設定しており、子テーマCSSより後に読み込まれる。
     対策: footer #footer (要素+ID) で詳細度を上げてAFFINGER6に勝つ。
   ----- */
footer, footer #footer {
    background: #2C4A6E !important;
    color: rgba(255,255,255,0.92) !important;
}
/* フッター内全テキスト — AFFINGER6の #footer .XXX !important を上書き */
footer #footer .footerlogo,
footer #footer .footerlogo a,
footer #footer .footer-description,
footer #footer .footer-description a,
footer #footer .head-telno,
footer #footer .head-telno a,
footer #footer .copyr,
footer #footer .copyr a,
footer #footer .copyr small,
footer #footer .copy,
footer #footer .copy a,
footer #footer .menu-item a,
footer #footer .footermenust a,
footer #footer #st-footer-logo-wrapper,
footer #footer .st-footer-tel,
footer #footer .st-footer-tel a,
footer #footer .headbox .textwidget,
footer #footer .headbox .textwidget a,
footer #footer .widget_custom_html a,
footer .footer-l *,
footer .footer-l a,
footer #footer li a,
footer #footer p,
footer #footer span,
footer #footer small {
    color: rgba(255,255,255,0.88) !important;
}
footer #footer .footerlogo {
    font-size: 1.1em !important;
    font-weight: 700 !important;
}
footer #footer .footer-description,
footer #footer .footer-description a {
    color: rgba(255,255,255,0.7) !important;
}
footer #footer .copyr,
footer #footer .copyr small {
    color: rgba(255,255,255,0.5) !important;
    font-size: 12px !important;
}
footer #footer a:hover,
footer #footer .footermenust a:hover,
footer #footer .menu-item a:hover {
    color: #FFFFFF !important;
    opacity: 1 !important;
}
/* フッターメニュー */
footer #footer .footermenubox,
footer .footermenubox {
    background: #2C4A6E !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    padding: 12px 0 !important;
}
footer #footer .footermenubox a,
footer #footer .footermenubox .footermenust a,
footer .footermenubox a {
    color: rgba(255,255,255,0.82) !important;
    font-size: 13px !important;
}

/* ----- カテゴリラベル ----- */
.st-catgroup-tag a, .catname, .st-catgroup a {
    background-color: #3B7DD8 !important;
    color: #FFFFFF !important;
    font-size: 11px !important;
    border-radius: 4px !important;
    padding: 2px 8px !important;
}

/* ----- ぱんくずリスト ----- */
#st-breadcrumb, .st-breadcrumb {
    background-color: #F5F7FA !important;
    font-size: 12px !important;
    padding: 8px 15px !important;
    border-bottom: 1px solid #D4DDE8 !important;
}

/* ----- 記事カード ----- */
.kanren .clearfix dd h5 {
    font-weight: 700 !important;
    color: #3D3D3D !important;
    line-height: 1.5 !important;
}
.kanren .clearfix dd h5 a:hover {
    color: #3B7DD8 !important;
}

/* ----- 角丸 ----- */
.st-cardbox, .kanren, img.wp-post-image {
    border-radius: 8px !important;
}

/* ----- テーブル ----- */
table, .wp-block-table table {
    border-collapse: collapse !important;
}
table th {
    background-color: #2C5F9E !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
}
table td {
    border: 1px solid #D4DDE8 !important;
}
table tr:nth-child(even) td {
    background-color: #F5F7FA !important;
}

/* ----- スマホ最適化（599px以下） ----- */
@media only screen and (max-width: 599px) {
    body { font-size: 16px !important; }
    .entry-content h2, .post h2, article h2,
    .st-post-content h2, h2.wp-block-heading {
        font-size: 1.2em !important;
        padding: 12px 15px !important;
        margin: 35px 0 20px 0 !important;
    }
    .entry-content h3, .post h3, article h3,
    h3.wp-block-heading {
        font-size: 1.1em !important;
    }
    a, button, input[type="submit"] {
        min-height: 44px;
        min-width: 44px;
    }
    header .sitename a, .sitename a { font-size: 1.2em !important; }
}

/* ----- タブレット最適化 ----- */
@media only screen and (min-width: 600px) and (max-width: 959px) {
    body { font-size: 16px !important; }
}


/* =====================================================
   AFFINGER6動的CSS対策：詳細度強化オーバーライド（応急処置 v1 / 2026-06）
   st-themecss が  h2:not(...):not(...):not(.st-css-no)  等
   （クラス級3＋!important）でデフォルト装飾を強制するため、
   同等以上の詳細度（クラス級3＋要素2）で上書きする。
   パターン: body .entry-content X:not(.st-css-no):not(.tk)
   ※ .tk は存在しないダミークラス（詳細度を1段上げる目的）
   ※ 後日「標準機能で対応」へ置き換える前提の暫定対応
   ===================================================== */

/* ----- H2（青グラデ帯） ----- */
body .entry-content h2:not(.st-css-no):not(.tk),
body .post h2:not(.st-css-no):not(.tk),
body article h2:not(.st-css-no):not(.tk) {
    background: linear-gradient(135deg, #1E4C7A, #2C5F9E) !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    font-size: 1.4em !important;
    padding: 15px 20px !important;
    margin: 50px 0 25px 0 !important;
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    border-radius: 6px !important;
    line-height: 1.5 !important;
}

/* ----- H3（左ボーダー） ----- */
body .entry-content h3:not(.st-css-no):not(.tk),
body .post h3:not(.st-css-no):not(.tk),
body article h3:not(.st-css-no):not(.tk) {
    color: #1E4C7A !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    font-weight: 700 !important;
    font-size: 1.25em !important;
    padding: 10px 15px !important;
    margin: 40px 0 20px 0 !important;
    border: none !important;
    border-left: 4px solid #3B7DD8 !important;
    border-bottom: 1px solid #D4DDE8 !important;
}

/* ----- H4（ドット下線） ----- */
body .entry-content h4:not(.st-css-no):not(.tk),
body .post h4:not(.st-css-no):not(.tk),
body article h4:not(.st-css-no):not(.tk) {
    color: #2C5F9E !important;
    background: transparent !important;
    background-image: none !important;
    font-weight: 700 !important;
    font-size: 1.1em !important;
    padding: 8px 0 !important;
    border: none !important;
    border-bottom: 2px dotted #3B7DD8 !important;
}

/* ----- テーブル（青ヘッダー＋ストライプ） ----- */
body .entry-content table th:not(.tk),
body .entry-content .wp-block-table th:not(.tk) {
    background-color: #2C5F9E !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    border: 1px solid #2C5F9E !important;
}
body .entry-content table td:not(.tk),
body .entry-content .wp-block-table td:not(.tk) {
    border: 1px solid #D4DDE8 !important;
}
body .entry-content table tr:nth-child(even) td:not(.tk),
body .entry-content .wp-block-table tr:nth-child(even) td:not(.tk) {
    background-color: #F5F7FA !important;
}
