@charset "UTF-8";
/*==============================================================================
1.共通事項
2.検索
3.カテゴリ
4.新着情報
5.アーカイブ
==============================================================================*/


/*============================================================================================================================================================
==============================================================================================================================================================

	1.共通事項

==============================================================================================================================================================
============================================================================================================================================================*/
#sidebar {
    margin-top: 50px;
    width: 100%;

    & section + section {
        margin-top: 40px;
    }

    /* ========== h2 ========== */
    & h2 {
        margin-bottom: 15px;
        padding: 0 20px 20px 30px;
        position: relative;
        font-size: 1.8rem;
        font-family: var(--font-en);
        font-weight: var(--weight-bold);
        color: var(--color-main);
        letter-spacing: 0.15em;
        line-height: 1;
        border-bottom: 1px solid var(--color-main);

        &::before{
            content: "";
            width: 13px;
            height: 18px;
            position: absolute;
            top: 0;
            left: 0;
            background: url(../1_img/base/deco-star_black.svg) no-repeat center / 100% auto;
        }
    }
}
/*==============================================================================

	共通事項 PC

==============================================================================*/
@media all and (min-width: 769px){
    #sidebar{
        margin-top: 0;
        width: 300px;
        position: sticky;
        top: 110px;

        & section + section {margin-top: 60px;}

        /* ========== h2 ========== */
        & h2 {
            padding-bottom: 15px;
            font-size: 2rem;
        }
    }
}

/*============================================================================================================================================================
==============================================================================================================================================================

	2.検索

==============================================================================================================================================================
============================================================================================================================================================*/
.side-search{
    margin-bottom: 30px;

    & form {
        position: relative;
        border: 2px solid var(--color-main);
        border-radius: 5px;
        display: flex;
        overflow: hidden;
        
        & input {
            margin: 0;
            width: calc(100% - 40px);
            height: auto;
            padding: 10px 15px;
            border: none;
            font-size: 1.2rem;
            background-color: #fff;
            box-shadow: none;

            &[type="text"]:focus {
                outline: none;
                background-color: #fff;
                border: none!important;
            }
        }

        & button {
            width: 40px;
            font-size: 0;
            border: none;
            background-image: url(../1_img/base/icon_search.svg);
            background-repeat: no-repeat;
            background-position: center;
            background-color: var(--color-main);
            background-size: 18px;
            cursor: pointer;
            opacity: 1;
            transition: opacity 500ms;
        }
    }
}
@media all and (min-width: 769px){
    .side-search{margin-bottom: 60px;}
}




/*============================================================================================================================================================
==============================================================================================================================================================

	3.カテゴリ

==============================================================================================================================================================
============================================================================================================================================================*/
.sidebar-cate{

    /* ========== リスト ========== */
    & .sidebar-cate-list{
        display: flex;
        flex-direction: column;
        gap: 10px;

        & li a{
            padding: 3px 10px;
            display: inline-block;
            min-width: 130px;
            text-align: center;
            font-weight: var(--weight-bold);
        }

        /* ========== topic & news ========== */
        &.tn li a{
            background-color: var(--color-font);
            color: #fff;
        }

        /* ========== blog ========== */
        &.blog li a{
            background-color: var(--color-accent);
            color: var(--color-font);
        }
    }

}



/*============================================================================================================================================================
==============================================================================================================================================================

	4.新着情報

==============================================================================================================================================================
============================================================================================================================================================*/
.sidebar-new-list{
    display: flex;
    flex-direction: column;
    gap: 20px;

    /* ==================== 記事 ==================== */
    & article{
        width: 100%;
        position: relative;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        
        /*======= テキスト領域 =======*/
        & .text_area{
            width: calc(50% - 5px);
            order: 2;

            /*======= カテゴリ&日付 =======*/
            & .cate-date{display: none;}

            /*======= タイトル =======*/
            & h3{
                margin-top: 5px;
                display: -webkit-box;
                -webkit-box-orient: vertical;
                -webkit-line-clamp: 2;
                overflow: hidden;
                
                & a{
                    font-size: 1.2rem;
                    font-weight: var(--weight-bold);
                    line-height: 1.6;
                    color: var(--color-font);
                }
            }
        }

        /*======= 画像 =======*/
        & .img_wrap {
            width: calc(50% - 5px);
            display: block;
            aspect-ratio: 16 / 10.5;
            transition: 500ms;
            order: 1;
            
            & img {
                width: 100%;
                height: 100%;
                object-fit: cover;
                object-position: center;
            }
        }
    }
}




/*============================================================================================================================================================
==============================================================================================================================================================

	5.アーカイブ

==============================================================================================================================================================
============================================================================================================================================================*/
.sidebar-archive{
    & .sidebar-archive-list{
        display: flex;
        flex-direction: column;
        gap: 5px;

        /* ========== 年 ========== */
        & > li{
            margin: 0;
            padding: 0 10px 5px;
            position: relative;

            &::after {
                content: "";
                width: 100%;
                height: 4px;
                position: absolute;
                bottom: 0;
                left: 0;
                z-index: 1;
                background-color: var(--color-main);/* 色はここで管理 */
                /* SVGは「形」として使う */
                -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='6' height='2'><circle cx='1' cy='1' r='1' fill='black'/></svg>") repeat-x center;
                mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='6' height='2'><circle cx='1' cy='1' r='1' fill='black'/></svg>") repeat-x center;
            }
        }

        /* ========== 年のボタン ========== */
        & button{
            width: 100%;
            display: block;
            padding: 10px 40px 10px 0px;
            position: relative;
            text-align: left;
            border: none;
            background: none;
            font-size: 1.4rem;
            font-weight: var(--weight-bold);
            letter-spacing: 0.15em;
            outline: none;

            &::after{
                margin-top: 0px;
                content:"";
                width: 10px;
                height: 10px;
                position: absolute;
                right: 0;
                top: 50%;
                border-top: 2px solid var(--color-font);
                border-left: 2px solid var(--color-font);
                transform: translateY(-50%) rotate(225deg);
                transition: transform 500ms;
            }
            
            &.on::after{
                margin-top: 4px;
                transform: translateY(-50%) rotate(45deg);
            }
        }
        
        /* ========== 月 ========== */
        & .sidebar-archive-list-month{
            padding-bottom: 15px;
            display: none;

            & li{
                & + li{margin-top: 5px;}
                &.month{
                    padding-left: 15px;
                    position: relative;

                    &::before{
                        content: "";
                        width: 7px;
                        height: 1px;
                        background-color: var(--color-font);
                        position: absolute;
                        left: 0;
                        top: 50%;
                    }
                    
                    & a{
                        display: flex;
                        justify-content: space-between;
                        font-size: 1.2rem;
                        color: var(--color-font);
                        letter-spacing: 0.15em;
                    }
                }
            }
        }
    }
}
/*==============================================================================

	アーカイブ スマホ

==============================================================================*/
@media all and (max-width: 768px){
    #sidebar .sidebar-archive-list > li a{
        display: inline-block;
    }
}





#sidebar .new_badge {
    width: 1.5em;
    height: 1.5em;
    position: absolute;
    top: -5px;
    left: -5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 100%;
    background: #ea5550;
    color: #fff;
    font-family: var(--font-en);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
}