/*
Theme Name: AFFINGER7 Child
Template: affinger
Description: AFFINGER7 対応
Version: 20260410
*/

/*media Queries スマートフォンとタブレットサイズ（959px以下）で適応したいCSS - スマホ・タブレット
---------------------------------------------------------------------------------------------------*/
@media only screen and (max-width: 959px) {


	/*-- ここまで --*/
}
	
/*media Queries タブレットサイズ（600px～959px）のみで適応したいCSS -タブレットのみ
---------------------------------------------------------------------------------------------------*/
@media only screen and (min-width: 600px) and (max-width: 959px) {


	/*-- ここまで --*/
}	
	
/*media Queries タブレット（600px）以上で適応したいCSS -タブレット・PC
---------------------------------------------------------------------------------------------------*/
@media only screen and (min-width: 600px) {


	/*-- ここまで --*/
}

/*media Queries PCサイズ（960px）以上で適応したいCSS - PCのみ
---------------------------------------------------------------------------------------------------*/
@media print, screen and (min-width: 960px) {


	/*-- ここまで --*/
}

/*media Queries スマホサイズ（599px）以下で適応したいCSS - スマホのみ
---------------------------------------------------------------------------------------------------*/
@media print, screen and (max-width: 599px) {

	
	/*-- ここまで --*/
}

/* ==========================================
   左サイドバーの新着記事
   画像を非表示・テキストを全幅表示
   ========================================== */

#side .kanren dl dt {
    display: none !important;
}

#side .kanren dl dd {
    float: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    box-sizing: border-box;
}


/* ==========================================
   AFFINGER7 おすすめ記事をカード型に変更
   PC：2列 / スマホ：1列
   ========================================== */

.kanren.pop-box {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}


/* 見出しは2列分を使用 */
.kanren.pop-box > .p-entry-t {
    grid-column: 1 / -1;
    margin: 0 0 4px;
}


/* 各記事をカード化 */
.kanren.pop-box > dl.clearfix {
    display: block !important;
    float: none !important;
    width: 100% !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 0 14px !important;
    border: none !important;
    background: #fff;
    overflow: hidden;
}


/* ==========================================
   画像
   ========================================== */

.kanren.pop-box > dl > dt.poprank {
    display: block !important;
    position: relative !important;
    float: none !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    overflow: hidden;
}


/* 画像リンク */
.kanren.pop-box > dl > dt.poprank > a {
    display: block !important;
    width: 100% !important;
}


/* サムネイル
   150px固定にはしない
   カード幅いっぱい・16:9 */
.kanren.pop-box > dl > dt.poprank img {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    object-fit: cover !important;
    border-radius: 10px !important;
}


/* ==========================================
   おすすめ記事ランキング番号
   ========================================== */

.kanren.pop-box .poprank-no {
    display: flex !important;
    align-items: center;
    justify-content: center;

    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
    bottom: auto !important;

    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    margin: 0 !important;

    background: #FFBE00 !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 50% !important;

    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.22);

    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    z-index: 5;
}


/* テーマ標準の順位装飾を除去 */
.kanren.pop-box .poprank-no::before,
.kanren.pop-box .poprank-no::after {
    display: none !important;
}


/* ==========================================
   テキスト
   ========================================== */

.kanren.pop-box > dl > dd {
    display: block !important;
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}


/* タイトル */
.kanren.pop-box .popular-t {
    margin: 0 0 8px !important;
    padding: 0 !important;
    font-size: 16px;
    line-height: 1.65;
    font-weight: 700;
}

.kanren.pop-box .popular-t a {
    color: inherit;
    text-decoration: none;
}


/* 抜粋 */
.kanren.pop-box .st-excerpt {
    margin: 0 !important;
    font-size: 13px;
    line-height: 1.7;
    color: #777;
}


/* 抜粋の表示高さ */
.kanren.pop-box > dl > dd .st-excerpt {
    position: relative;
    height: 4.8em;
    line-height: 1.6;
    overflow: hidden;
}

.kanren.pop-box .st-excerpt p {
    margin: 0 !important;
}


/* 下部を白くフェードアウト */
.kanren.pop-box > dl > dd .st-excerpt::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2.5em;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0),
        #fff 95%
    );
    pointer-events: none;
}


/* ==========================================
   タブレット・スマホ
   1列表示
   ========================================== */

@media (max-width: 767px) {

    .kanren.pop-box {
        grid-template-columns: 1fr;
        gap: 22px;
    }

}
