/* ==========================================================================
   article_list.css
   Useful articles list page styles
   ========================================================================== */

/* ---------- Reset / Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #333333;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
}

/* ==========================================================================
   Article Main
   ========================================================================== */
.article_main {

    /* ---------- Hero ---------- */
    & .article_hero_section {
        background: linear-gradient(180deg, #0486b1 0%, #02536e 100%);
        padding: 60px 20px;
        text-align: center;
        color: #ffffff;

        @media screen and (max-width: 768px) {
            padding: 40px 16px;
        }

        & .article_hero_inner {
            max-width: 1100px;
            margin: 0 auto;
        }

        & .article_hero_title {
            margin: 0;
            font-size: 2.5rem;
            font-weight: 700;
            letter-spacing: 0.05em;
            line-height: 1.2;

            @media screen and (max-width: 768px) {
                font-size: 1.75rem;
            }
        }

        & .article_hero_subtitle {
            margin: 16px auto 0;
            max-width: 800px;
            font-size: 1rem;
            font-weight: 400;
            line-height: 1.8;

            @media screen and (max-width: 768px) {
                font-size: 0.85rem;
                line-height: 1.7;
            }
        }
    }

    /* ---------- Article List Section ---------- */
    & .article_list_section {
        padding: 80px 20px;
        background-color: #ffffff;

        @media screen and (max-width: 768px) {
            padding: 56px 16px;
        }

        & .article_list_inner {
            max-width: 1100px;
            margin: 0 auto;
        }

        & .article_list_heading {
            position: relative;
            margin-bottom: 48px;
            padding-bottom: 20px;
            text-align: center;

            @media screen and (max-width: 768px) {
                margin-bottom: 32px;
            }

            & h2 {
                margin: 0;
                font-size: 1.6rem;
                font-weight: 700;
                color: #333333;

                @media screen and (max-width: 768px) {
                    font-size: 1.25rem;
                }
            }

            & .article_list_heading_bar {
                position: absolute;
                left: 50%;
                bottom: 0;
                display: block;
                width: 60px;
                height: 4px;
                margin-left: -30px;
                background-color: #0486b1;
                border-radius: 2px;
            }
        }
    }

    /* ---------- Article Card List ---------- */
    & .article_card_list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
        margin: 0;
        padding: 0;
        list-style: none;

        @media screen and (max-width: 1024px) {
            grid-template-columns: repeat(2, 1fr);
            gap: 24px;
        }

        @media screen and (max-width: 600px) {
            grid-template-columns: 1fr;
            gap: 20px;
        }
    }

    & .article_card {
        display: flex;
        flex-direction: column;
        background-color: #ffffff;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        transition: transform 0.25s ease, box-shadow 0.25s ease;

        &:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
        }

        & .article_card_image {
            width: 100%;
            aspect-ratio: 5 / 3;
            overflow: hidden;

            & img {
                width: 100%;
                height: 100%;
                object-fit: cover;
                display: block;
            }
        }

        & .article_card_body {
            display: flex;
            flex-direction: column;
            flex: 1;
            padding: 24px 22px 22px;
        }

        & .article_card_meta {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 16px;
        }

        & .article_card_tag {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 4px 12px;
            font-size: 0.78rem;
            font-weight: 500;
            line-height: 1.4;
            color: #ffffff;
            background-color: #0486b1;
            border-radius: 4px;
        }

        & .article_card_no {
            font-family: 'Inter', sans-serif;
            font-size: 0.85rem;
            font-weight: 500;
            color: #666666;
            letter-spacing: 0.04em;
        }

        & .article_card_title {
            margin: 0 0 14px;
            font-size: 1rem;
            font-weight: 700;
            line-height: 1.6;
            color: #333333;

            @media screen and (max-width: 768px) {
                font-size: 0.95rem;
            }
        }

        & .article_card_desc {
            margin: 0 0 24px;
            font-size: 0.85rem;
            line-height: 1.8;
            color: #666666;
            display: -webkit-box;
            -webkit-line-clamp: 4;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        & .article_card_link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-top: auto;
            align-self: stretch;
            height: 44px;
            border: 1px solid #0486b1;
            border-radius: 22px;
            color: #0486b1;
            font-size: 0.9rem;
            font-weight: 700;
            text-decoration: none;
            transition: background-color 0.2s ease, color 0.2s ease;

            &:hover {
                background-color: #0486b1;
                color: #ffffff;
            }
        }
    }

    /* ---------- Middle CTA ---------- */
    & .article_middle_cta_section {
        padding: 56px 20px;
        background-color: #f4f7fa;
        text-align: center;

        @media screen and (max-width: 768px) {
            padding: 40px 16px;
        }

        & .article_middle_cta_inner {
            max-width: 1100px;
            margin: 0 auto;
        }

        & .article_middle_cta_title {
            margin: 0 0 12px;
            font-size: 1.4rem;
            font-weight: 700;
            line-height: 1.5;
            color: #333333;

            @media screen and (max-width: 768px) {
                font-size: 1.05rem;
            }
        }

        & .article_middle_cta_lead {
            margin: 0 0 24px;
            font-size: 0.95rem;
            color: #333333;

            @media screen and (max-width: 768px) {
                font-size: 0.85rem;
            }
        }

        & .article_middle_cta_actions {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 16px;
            flex-wrap: wrap;
        }

        & .article_middle_cta_btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 240px;
            height: 54px;
            padding: 0 28px;
            border-radius: 27px;
            font-size: 0.95rem;
            font-weight: 700;
            text-decoration: none;
            transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;

            @media screen and (max-width: 480px) {
                min-width: 100%;
            }

            &:hover {
                opacity: 0.9;
            }

            &.article_middle_cta_btn_primary {
                background-color: #ff9800;
                color: #ffffff;
                border: 1px solid #ff9800;
            }

            &.article_middle_cta_btn_outline {
                background-color: #ffffff;
                color: #0486b1;
                border: 1px solid #0486b1;
            }
        }
    }

    /* ---------- Bottom CTA ---------- */
    & .article_cta_section {
        padding: 64px 20px;
        background-color: #0486b1;
        color: #ffffff;
        text-align: center;

        @media screen and (max-width: 768px) {
            padding: 48px 16px;
        }

        & .article_cta_inner {
            max-width: 1100px;
            margin: 0 auto;
        }

        & .article_cta_title {
            margin: 0 0 16px;
            font-size: 1.6rem;
            font-weight: 700;
            line-height: 1.5;

            @media screen and (max-width: 768px) {
                font-size: 1.2rem;
            }
        }

        & .article_cta_lead {
            margin: 0 0 32px;
            font-size: 0.95rem;
            opacity: 0.95;

            @media screen and (max-width: 768px) {
                font-size: 0.85rem;
            }
        }

        & .article_cta_actions {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 20px;
            flex-wrap: wrap;
        }

        & .article_cta_btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 240px;
            height: 60px;
            padding: 0 32px;
            border-radius: 30px;
            font-size: 1rem;
            font-weight: 700;
            text-decoration: none;
            transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;

            @media screen and (max-width: 480px) {
                min-width: 100%;
            }

            &:hover {
                opacity: 0.9;
            }

            &.article_cta_btn_primary {
                background-color: #ff9800;
                color: #ffffff;
            }

            &.article_cta_btn_outline {
                background-color: #ffffff;
                color: #0486b1;
                border: 1px solid #ffffff;
            }
        }
    }
}
