/*
 * SFJ NEXT Column theme — additional rules on top of the main site's
 * own css/reset.css + css/style.css (loaded first, see functions.php).
 *
 * Namespacing:
 *   .column_archive_*  -> post archive / list (index.php, 404.php)
 *   .column_single_*   -> single article (single.php, page.php)
 *   .column_badge       -> category badge, shared by both
 *
 * The archive grid intentionally mirrors the "Column" block on the
 * corporate TOP page (.top_column / .top_column_content in
 * https://sfj-next.com/css/style.css) — same black background, same
 * blue gradient title treatment, same card proportions — per the
 * request to keep the list looking like the TOP page's column list.
 */

/* ------------------------------------------------------------------ */
/* Archive (post list)                                                 */
/* ------------------------------------------------------------------ */

.column_archive {
    display: block;
    width: 100%;
    margin: 0 auto;
    padding: 14vw 0 8rem;
    background: #1e1e1e;
    min-height: 60vh;
}

.column_archive_title {
    width: 90%;
    max-width: 1180px;
    margin: 0 auto;
    text-align: center;
}

.column_archive_title span {
    display: inline-block;
    animation: AnimationTitle 15s ease infinite;
    background: linear-gradient(to right, #33b5ff, #0072b4, #6dbbe6);
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    font-size: 7rem;
    font-family: "neue-haas-grotesk-text", sans-serif;
    font-weight: 500;
    font-style: normal;
    letter-spacing: .2rem;
}

.column_archive_title h1 {
    display: block;
    margin-top: 1rem;
    font-size: 2.6rem;
    font-family: "source-han-sans-japanese", sans-serif;
    font-weight: 700;
    font-style: normal;
    color: #fff;
    letter-spacing: .1rem;
}

.column_archive_list {
    width: 90%;
    max-width: 1180px;
    margin: 4rem auto 0;
}

.column_archive_list ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 0 auto;
}

.column_archive_list ul li {
    width: 31%;
    margin: 0 0 4rem;
}

.column_archive_list ul li a {
    display: block;
    width: 100%;
}

.column_archive_list ul li a:hover .column_archive_list_img img {
    transform: scale(1.08);
}

.column_archive_list ul li a:hover h2 {
    opacity: .75;
}

.column_archive_list_img {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 6px;
    background: #333;
}

.column_archive_list_img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.column_badge {
    display: inline-block;
    margin-top: 1rem;
    padding: .3rem 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: .05rem;
    color: #fff;
    background: #0080CB;
    border-radius: 100px;
}

.column_badge a {
    color: #fff;
}

.column_archive_list_date {
    display: block;
    margin-top: .8rem;
    margin-bottom: .3rem;
    color: #9fa3a8;
    font-size: 1.4rem;
    letter-spacing: .05rem;
}

.column_archive_list h2 {
    font-family: "source-han-sans-japanese", sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 1.5rem;
    color: #fff;
    letter-spacing: .05rem;
    line-height: 150%;
    transition: opacity .3s;
}

.column_archive_none {
    width: 90%;
    max-width: 1180px;
    margin: 4rem auto 0;
    text-align: center;
    color: #fff;
    font-size: 1.6rem;
}

.column_archive_none a {
    color: #6dbbe6;
    text-decoration: underline;
}

/* Pagination */
.column_archive_pagination {
    width: 90%;
    max-width: 1180px;
    margin: 5rem auto 0;
    text-align: center;
}

.column_archive_pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4rem;
    height: 4rem;
    margin: 0 .4rem;
    padding: 0 1rem;
    font-size: 1.4rem;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 100px;
    transition: .3s;
}

.column_archive_pagination a.page-numbers:hover,
.column_archive_pagination .page-numbers.current {
    color: #fff;
    background: #0080CB;
    border-color: #0080CB;
}

/* ------------------------------------------------------------------ */
/* Single article                                                      */
/* ------------------------------------------------------------------ */

.column_single_wrap {
    background: #fff;
}

.column_single {
    display: block;
    width: 90%;
    max-width: 840px;
    margin: 0 auto;
    padding: 14vw 0 8rem;
}

.column_single_head h1 {
    margin-top: 1rem;
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 150%;
    letter-spacing: .05rem;
    color: #001D2F;
}

.column_single_date {
    display: inline-block;
    margin-left: 1rem;
    font-size: 1.4rem;
    color: #888;
    vertical-align: middle;
}

.column_single_thumb {
    margin: 2.5rem 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
}

.column_single_thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.column_single_body {
    font-size: 1.6rem;
    line-height: 1.9;
    color: #333;
    word-break: break-word;
}

.column_single_body p {
    margin-bottom: 1.8em;
}

.column_single_body h2 {
    margin: 3.5rem 0 1.5rem;
    padding-bottom: .8rem;
    font-size: 2.2rem;
    font-weight: 700;
    color: #001D2F;
    border-bottom: 3px solid #0080CB;
}

.column_single_body h3 {
    margin: 3rem 0 1.2rem;
    font-size: 1.9rem;
    font-weight: 700;
    color: #001D2F;
    border-left: 6px solid #0080CB;
    padding-left: 1rem;
}

.column_single_body h4 {
    margin: 2.5rem 0 1rem;
    font-size: 1.7rem;
    font-weight: 700;
    color: #0082CD;
}

.column_single_body ul,
.column_single_body ol {
    margin: 0 0 1.8em 2em;
}

.column_single_body ul {
    list-style: disc;
}

.column_single_body ol {
    list-style: decimal;
}

.column_single_body li {
    margin-bottom: .6em;
}

.column_single_body a {
    color: #0080CB;
    text-decoration: underline;
}

.column_single_body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.column_single_body figure {
    margin: 2rem 0;
}

.column_single_body figcaption {
    margin-top: .6rem;
    font-size: 1.3rem;
    color: #888;
    text-align: center;
}

.column_single_body blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: #f4f8fb;
    border-left: 4px solid #0080CB;
    color: #555;
}

.column_single_body table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
    font-size: 1.4rem;
}

.column_single_body table th,
.column_single_body table td {
    padding: 1rem;
    border: 1px solid #d8e8f2;
    text-align: left;
}

.column_single_body table th {
    background: #eaf4fb;
    color: #001D2F;
}

.column_single_pages {
    margin-top: 2rem;
    font-size: 1.4rem;
}

/* Table of contents (auto-generated, see sfjnext_column_inject_toc()) */
.column_toc {
    margin: 0 0 3rem;
    padding: 2rem 2.4rem;
    background: #f4f8fb;
    border: 1px solid #d8e8f2;
    border-radius: 8px;
}

.column_toc_title {
    margin: 0 0 1.2rem;
    font-size: 1.6rem;
    font-weight: 700;
    color: #001D2F;
    letter-spacing: .05rem;
}

.column_toc_list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.column_toc_list li {
    margin-bottom: .7rem;
    font-size: 1.4rem;
    line-height: 1.6;
}

.column_toc_list li:last-child {
    margin-bottom: 0;
}

.column_toc_level-2 a::before {
    content: '●';
    display: inline-block;
    margin-right: .7rem;
    font-size: .8rem;
    color: #0080CB;
    vertical-align: middle;
}

.column_toc_level-3 {
    margin-left: 2.5rem;
    font-size: 1.3rem;
}

.column_toc_level-3 a::before {
    content: '–';
    display: inline-block;
    margin-right: .6rem;
    color: #0080CB;
}

.column_toc_list a {
    color: #333;
    text-decoration: none;
}

.column_toc_list a:hover {
    color: #0080CB;
    text-decoration: underline;
}

/*
 * "Profile" author box — output by the previous theme's block plugin
 * as raw HTML inside post_content (.wp-block-luxe-blocks-profile /
 * .luxe-pf-*). That plugin's own stylesheet isn't loaded by this
 * theme, so the box loses its layout; these rules restore it:
 *  - pencil icon vertically centred against the "Profile" label
 *  - a real gap between the photo and the bio text (previously 0)
 */
.wp-block-luxe-blocks-profile .luxe-pf-title-wrap {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.wp-block-luxe-blocks-profile .luxe-pf-icon {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.wp-block-luxe-blocks-profile .luxe-pf-icon svg {
    display: block;
    width: 16px;
    height: 16px;
}

.wp-block-luxe-blocks-profile .luxe-pf-title {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: .05rem;
    line-height: 1;
}

.wp-block-luxe-blocks-profile .luxe-pf-main {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 24px;
}

.wp-block-luxe-blocks-profile .luxe-pf-main figure {
    flex: 0 0 160px;
    max-width: 160px !important;
    margin: 0;
}

.wp-block-luxe-blocks-profile .luxe-pf-main figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.wp-block-luxe-blocks-profile .luxe-pf-main figure figcaption {
    margin-top: .8rem;
    font-size: 1.3rem;
    line-height: 1.6;
    color: #555;
    text-align: center;
}

.wp-block-luxe-blocks-profile .luxe-pf-text-wrap {
    flex: 1 1 260px;
}

.wp-block-luxe-blocks-profile .luxe-pf-text-wrap p {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.85;
    color: #333;
}

.wp-block-luxe-blocks-profile .luxe-pf-text-wrap a {
    color: #0080CB;
}

/*
 * "Profile" author box for NEW articles — appended automatically by
 * single.php via sfjnext_column_author_profile_box() in functions.php.
 * Per article, its content comes from either a registered "コラム執筆者"
 * entry (custom post type) or manual fields, chosen in a meta box on
 * the post editor screen — see sfjnext_column_profile_meta_box_html().
 * Same visual language as the .wp-block-luxe-blocks-profile box above,
 * so old and new articles look the same.
 */
.column-profile {
    margin: 3rem 0;
    padding: 20px 16px 16px;
    border: 4px double #999;
    border-radius: 4px;
}

.column-profile__label {
    display: inline-flex;
    align-items: center;
    margin: -20px 0 16px -16px;
    padding: 3px 12px;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: .05rem;
    line-height: 1.6;
    color: #fff;
    background: #333;
    border-radius: 0 0 4px 0;
}

.column-profile__body {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 24px;
}

.column-profile__photo {
    flex: 0 0 160px;
    max-width: 160px;
    margin: 0;
}

.column-profile__photo img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.column-profile__photo figcaption {
    margin-top: .8rem;
    font-size: 1.3rem;
    line-height: 1.6;
    color: #555;
    text-align: center;
}

.column-profile__text {
    flex: 1 1 260px;
}

.column-profile__text p {
    margin: 0 0 1em;
    font-size: 1.5rem;
    line-height: 1.85;
    color: #333;
}

.column-profile__text p:last-child {
    margin-bottom: 0;
}

.column-profile__text a {
    color: #0080CB;
}

.column_single_nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid #e2e2e2;
    font-size: 1.4rem;
}

.column_single_nav a {
    color: #0080CB;
}

.column_single_nav_prev {
    width: 32%;
    text-align: left;
}

.column_single_nav_list {
    width: 36%;
    text-align: center;
}

.column_single_nav_list a {
    display: inline-block;
    padding: .8rem 2rem;
    border: 1px solid #0080CB;
    border-radius: 100px;
    transition: .3s;
}

.column_single_nav_list a:hover {
    color: #fff;
    background: #0080CB;
}

.column_single_nav_next {
    width: 32%;
    text-align: right;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

@media screen and (max-width: 1280px) and (min-width: 780px) {
    .column_archive_list ul li {
        width: 48%;
    }
}

@media screen and (max-width: 779px) {
    .column_archive {
        padding-top: 28vw;
    }

    .column_archive_title span {
        font-size: 4.5rem;
    }

    .column_archive_title h1 {
        font-size: 2rem;
    }

    .column_archive_list ul li {
        width: 100%;
    }

    .column_single {
        padding-top: 28vw;
    }

    .column_single_head h1 {
        font-size: 2rem;
    }

    .column_single_body h2 {
        font-size: 1.9rem;
    }

    .column_single_body h3 {
        font-size: 1.7rem;
    }

    .column_single_nav {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .column_single_nav_prev,
    .column_single_nav_list,
    .column_single_nav_next {
        width: 100%;
        text-align: center;
    }

    .wp-block-luxe-blocks-profile .luxe-pf-main {
        justify-content: center;
        text-align: center;
    }

    .wp-block-luxe-blocks-profile .luxe-pf-main figure {
        flex-basis: 120px;
        max-width: 120px !important;
        margin: 0 auto;
    }

    .column-profile__body {
        justify-content: center;
        text-align: center;
    }

    .column-profile__photo {
        flex-basis: 120px;
        max-width: 120px;
        margin: 0 auto;
    }

    .column_toc {
        padding: 1.6rem 1.8rem;
    }

    .column_toc_level-3 {
        margin-left: 1.5rem;
    }
}
