/* =========================================================
   明るい選挙啓発ポスターコンクール
   Voters一覧と同じ構造：
   HERO（見出し）→ 白背景の紹介文
========================================================= */

body.post-type-archive-poster_contest .akarui-poster-intro {
    width: calc(100% - 48px);
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 0 34px;
    background: #fff;
}

body.post-type-archive-poster_contest .akarui-poster-intro__text {
    margin: 0;
    color: #29465e;
    font-size: 15px;
    line-height: 2;
}

/* 移動前の一瞬の表示を防止 */
body.post-type-archive-poster_contest .akarui-poster-intro:not(.is-positioned) {
    visibility: hidden;
}

@media (max-width: 767px) {

    body.post-type-archive-poster_contest .akarui-poster-intro {
        width: calc(100% - 32px);
        padding: 24px 0 28px;
    }

    body.post-type-archive-poster_contest .akarui-poster-intro__text {
        font-size: 14px;
        line-height: 1.9;
    }
}


/* =========================================================
   v1.0.4
   旧紹介文を非表示
========================================================= */

body.post-type-archive-poster_contest .poster-contest-intro__title {
    display: none !important;
}


/* =========================================================
   v1.1.0
   紹介文の横幅・余白調整
========================================================= */

body.post-type-archive-poster_contest .akarui-poster-intro {
    width: 100% !important;
    max-width: 1200px !important;

    margin: 0 auto 8px !important;
    padding: 24px 0 10px !important;
}

body.post-type-archive-poster_contest .akarui-poster-intro__text {
    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;

    font-size: 15px !important;
    line-height: 1.9 !important;
}


/* =========================================================
   年度別結果：最新6年度
   PC：横2列 × 縦3列
========================================================= */

body.post-type-archive-poster_contest .akarui-poster-years {
    display: block;
    width: 100%;
    margin-top: 26px;
}

body.post-type-archive-poster_contest .akarui-poster-years__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}

body.post-type-archive-poster_contest .akarui-poster-years__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    min-height: 58px;
    padding: 14px 18px;

    border: 1px solid #d7e5ef;
    border-radius: 4px;

    background: #fff;
    color: #18334d !important;

    font-size: 15px;
    font-weight: 700;

    text-decoration: none !important;

    transition:
        border-color .2s ease,
        background-color .2s ease,
        color .2s ease;
}

body.post-type-archive-poster_contest .akarui-poster-years__item:hover {
    border-color: #0875c9;
    background: #f5fbff;
    color: #0875c9 !important;
}

body.post-type-archive-poster_contest .akarui-poster-years__arrow {
    flex: 0 0 auto;
    color: #0875c9;
    font-size: 16px;
    font-weight: 400;
}


/* 過去一覧 */
body.post-type-archive-poster_contest .akarui-poster-years__all {
    display: flex;
    justify-content: center;
    margin-top: 22px;
}

body.post-type-archive-poster_contest .akarui-poster-years__all a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 190px;
    min-height: 44px;

    padding: 10px 18px;

    border: 1px solid #0875c9;
    border-radius: 3px;

    background: #fff;
    color: #0875c9 !important;

    font-size: 14px;
    font-weight: 700;

    text-decoration: none !important;

    transition:
        background-color .2s ease,
        color .2s ease;
}

body.post-type-archive-poster_contest .akarui-poster-years__all a::after {
    content: "→";
    margin-left: 16px;
}

body.post-type-archive-poster_contest .akarui-poster-years__all a:hover {
    background: #0875c9;
    color: #fff !important;
}


/* 年度別結果セクションの下余白を少し圧縮 */
body.post-type-archive-poster_contest .poster-results {
    margin-bottom: 40px !important;
}


/* スマホ */
@media (max-width: 767px) {

    body.post-type-archive-poster_contest .akarui-poster-intro {
        width: calc(100% - 32px) !important;
        padding: 18px 0 8px !important;
        margin-bottom: 4px !important;
    }

    body.post-type-archive-poster_contest .akarui-poster-intro__text {
        font-size: 14px !important;
        line-height: 1.85 !important;
    }

    body.post-type-archive-poster_contest .akarui-poster-years__grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    body.post-type-archive-poster_contest .akarui-poster-years__item {
        min-height: 52px;
        padding: 12px 15px;
        font-size: 14px;
    }

    body.post-type-archive-poster_contest .akarui-poster-years__all {
        margin-top: 18px;
    }
}


/* =========================================================
   v1.1.1
   年度別結果：最新年度から行方向に配置
   左上 → 右上 → 左中段 → 右中段 …
========================================================= */

body.post-type-archive-poster_contest .akarui-poster-years__grid {
    grid-auto-flow: row !important;
}


/* =========================================================
   過去の開催概要一覧ボタン
   コンテンツ幅いっぱい
========================================================= */

body.post-type-archive-poster_contest .akarui-poster-years__all {
    display: block !important;

    width: 100% !important;

    margin-top: 22px !important;
}

body.post-type-archive-poster_contest .akarui-poster-years__all a {
    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    min-width: 0 !important;
    min-height: 54px !important;

    padding: 12px 20px !important;

    box-sizing: border-box !important;
}

@media (max-width: 767px) {

    body.post-type-archive-poster_contest .akarui-poster-years__all a {
        min-height: 52px !important;
        padding: 11px 16px !important;
    }
}


/* =========================================================
   v1.1.2
   開催概要ページ 年度別結果
   過去一覧と同じ表示：
   青ラベル＝第○回 / 右側＝年度＋タイトル
========================================================= */

body.post-type-archive-poster_contest
.akarui-poster-years__item {
    display: grid !important;

    grid-template-columns:
        110px
        minmax(0, 1fr)
        24px !important;

    gap: 18px !important;
    align-items: center !important;

    min-height: 64px !important;
}

body.post-type-archive-poster_contest
.akarui-poster-years__label {
    display: inline-flex !important;

    align-items: center !important;
    justify-content: center !important;

    min-width: 0 !important;
    min-height: 40px !important;

    padding: 8px 12px !important;

    border-radius: 4px !important;

    background: #eef7fc !important;
    color: #0875c9 !important;

    font-size: 14px !important;
    font-weight: 700 !important;

    text-align: center !important;
    white-space: nowrap !important;

    box-sizing: border-box !important;
}

body.post-type-archive-poster_contest
.akarui-poster-years__title {
    min-width: 0 !important;

    color: #073b68 !important;

    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.6 !important;
}

body.post-type-archive-poster_contest
.akarui-poster-years__arrow {
    justify-self: end !important;
}

@media (max-width: 767px) {

    body.post-type-archive-poster_contest
    .akarui-poster-years__item {
        grid-template-columns:
            88px
            minmax(0, 1fr)
            20px !important;

        gap: 12px !important;
    }

    body.post-type-archive-poster_contest
    .akarui-poster-years__label {
        min-height: 36px !important;

        padding: 7px 8px !important;

        font-size: 12px !important;
    }

    body.post-type-archive-poster_contest
    .akarui-poster-years__title {
        font-size: 13px !important;
    }
}
