/*
 * WNL site-wide header customization.
 */

/* Shared */
.wnl-header-assets {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wnl-language-switcher {
    display: flex;
    align-items: center;
}

.wnl-language-link {
    display: inline-block;
    padding: 0.25rem 0.8rem;
    line-height: 1.4;
    text-decoration: none;
    font-size: 0.8rem;
}

.wnl-language-link--ja {
    background: #fff0f0;
}

.wnl-language-link--en {
    background: #eef7ff;
}

.wnl-atr-logo img {
    display: block;
    width: auto;
    max-width: 84px;
    max-height: 58px;
}

/* Desktop */
@media (min-width: 992px) {

    #site-header-container {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "logo assets"
            "nav  nav";
        align-items: center;
        column-gap: 2rem;
        row-gap: 0;
    }

    #site-header .site-header-logo {
        grid-area: logo;
        width: auto;
        max-width: 100%;
        margin: 0;
        justify-self: start;
    }

    #site-header .site-header-logo img {
        display: block;
        max-width: min(500px, 100%);
        height: auto;
        margin-left: 0;
    }

    #site-header .wnl-header-assets {
        grid-area: assets;
        justify-self: end;
    }

    #site-header #global-nav {
        grid-area: nav;
        position: static;
        float: none;
        width: 100%;
        margin: 0;
    }

    #site-header #global-nav .global-nav-list {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    #site-header #global-nav .global-nav-list > li {
        float: none;
    }

    #site-header #global-nav .global-nav-list > li > a {
        padding-left: 1.4rem;
        padding-right: 1.4rem;
    }

    /*
     * Lightning fixed/scrolled header:
     * keep the WNL logo visible, but make row 1 compact.
     */
    .header_scrolled #site-header-container {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        grid-template-areas:
            "logo assets"
            "nav  nav" !important;
        align-items: center !important;
        column-gap: 1.5rem;
    }

    .header_scrolled #site-header .site-header-logo {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        grid-area: logo;
        width: auto !important;
        height: auto !important;
        max-height: none !important;
        padding-top: 0.35rem;
        margin: 0;
        justify-self: start;
    }

    .header_scrolled #site-header .site-header-logo a {
        display: block;
        width: fit-content;
    }

    .header_scrolled #site-header .site-header-logo img {
        display: block !important;
        width: auto;
        height: auto;
        max-height: 42px;
        max-width: 340px;
        margin: 0;
    }

    .header_scrolled #site-header .wnl-header-assets {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        grid-area: assets;
        justify-self: end;
        margin: 0;
    }

    .header_scrolled #site-header .wnl-atr-logo img {
        max-width: 64px;
        max-height: 44px;
    }

    .header_scrolled #site-header #global-nav {
        grid-area: nav;
        position: static !important;
        float: none !important;
        width: 100% !important;
        margin: 0;
    }
}

/* Mobile / tablet fallback */
@media (max-width: 991.98px) {

    .wnl-header-assets {
        justify-content: flex-end;
        margin-top: 0.5rem;
    }

    .wnl-language-link {
        padding: 0.2rem 0.55rem;
        font-size: 0.75rem;
    }

    .wnl-atr-logo img {
        max-width: 58px;
        max-height: 42px;
    }
}

.wnl-simple-topic
{
    margin-bottom: 1.0rem;
}
.wnl-simple-topic-inner
{
    padding-left: 1.0rem;
    padding-right: 1.0rem;
}
.wnl-blue-div-strong {
    background: #fff;
    color: #222;
    font-weight: bold;
    padding: 1.0rem 1.5rem;
    margin-top: 2rem;
    border-radius: 8px;
}
.wnl-blue-div-txt{
    background: #CDE3F2;
    color: #1f2933;
    padding: 1.5rem 2rem;
    margin: 1.5rem 0;
    border-radius: 8px;
}
.wnl-simple-topic img {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
}
.entry-body ul li::marker {
    color: #164f86;
    font-size: 1.2em;
}

/* これまでの研究用 */
.entry-body .wp-block-image {
    text-align: center;
}
.entry-body .wp-block-image img {
    margin-left: auto;
    margin-right: auto;
}


/* 画像2枚並び */
.wnl-image-pair {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    gap: 32px;
}

.wnl-image-pair > .wp-block-column {
    display: flex;
    justify-content: center;
}

.wnl-image-pair .wp-block-image {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0;
}

.wnl-image-pair .wp-block-image img {
    display: block;
    width: 100% !important;
    max-width: 320px;
    height: auto !important;
    border-radius: 6px;
}

@media (max-width: 767px) {
    .wnl-image-pair {
        flex-direction: column;
        align-items: center;
    }
}

/* Activity list */
.wnl-activity-list .wp-block-columns {
    gap: 1.5rem;
    padding: 0.8rem 0;
}

.wnl-activity-list .wp-block-column:first-child {
    flex-basis: 160px !important;
}

.wnl-activity-list .wp-block-post-date {
    margin: 0;
    font-size: 0.9rem !important;
    color: #667784;
    white-space: nowrap;
}

.wnl-activity-list .wp-block-post-title {
    margin: 0;
    font-size: 1rem !important;
    line-height: 1.6;
    font-weight: 400 !important;
}

.wnl-activity-list .wp-block-post-title a {
    color: #164f86;
    text-decoration: none;
}

.wnl-activity-list .wp-block-post-title a:hover {
    text-decoration: underline;
}

.wnl-activity-list .wp-block-separator {
    margin: 0;
    border-color: #d9e6ef;
}

@media (max-width: 767px) {
    .wnl-activity-list .wp-block-columns {
        gap: 0.25rem;
    }

    .wnl-activity-list .wp-block-column:first-child {
        flex-basis: auto !important;
    }
}

/* 個別投稿：前の記事 / 次の記事を文字だけにする */
.single-post .next-prev .vk_post_imgOuter {
    display: none !important;
}

.single-post .next-prev .card-intext-inner {
    display: block;
    min-height: 0 !important;
    padding: 1rem 1.25rem;
    background: #fff !important;
    border: 1px solid #d9e6ef;
    color: #164f86 !important;
    text-decoration: none;
}

.single-post .next-prev .vk_post_body {
    position: static !important;
    padding: 0 !important;
    background: none !important;
    color: #164f86 !important;
}

.single-post .next-prev-prev .vk_post_body::before {
    content: "← 前の記事";
}

.single-post .next-prev-next .vk_post_body::before {
    content: "次の記事 →";
}

.single-post .next-prev .vk_post_body::before {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    color: #667784 !important;
}

.single-post .next-prev .vk_post_title {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #164f86 !important;
}

.single-post .next-prev .vk_post_date {
    font-size: 0.85rem;
    color: #667784 !important;
}

.single-post .next-prev .card-intext-inner:hover {
    background: #eef6fb !important;
    color: #164f86 !important;
}

.single-post .entry-meta {
    display: none !important;
}
.single-post .entry-meta-data-list {
    display: none !important;
}

/* WHAT'S NEW の位置・余白 */
.wnl-whats-new-header {
    margin-top: 40px;
    margin-bottom: 24px;
}

/* 最新情報一覧 */
.home .wnl-activity-list {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
}
