:root {
    --scrollbar: 0;
}
#related-article {
    margin: 0 calc(50% - 50vw + var(--scrollbar) / 2);
    padding: 80px 0;
    width: calc(100vw - var(--scrollbar));
    background: #f8f8f8;
}
#related-article h2 {
    position: relative;
    text-align: center;
    border-bottom: none !important;
    margin-bottom: 60px;
    margin-top: 0 !important;
}
#related-article h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: #fdb813;
    position: absolute;
    bottom: -20px;
    right: 0;
    left: 0;
    margin: 0 auto;
    border-radius: 2px;
}
#related-article > ul {
    margin-top: 60px;
    display: flex;
    gap: 40px 0;
    flex-wrap: wrap;
    justify-content: center;
    /* margin-right: -25px; */
}

#related-article > ul > li {
    position: relative;
    width: 300px;
    margin-right: 25px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 8px 16px -2px rgba(10, 10, 10, 0.1), 0px -3px 16px 0px rgba(10, 10, 10, 0.01);
    background-color: #fff;
}

#related-article > ul > li:last-child {
    margin-right: 0;
}
#related-article li a {
    color: #000000;
    text-decoration: none;
    display: block;
    box-sizing: border-box;
    opacity: 1;
    transition: 0.3s ease-in-out;
}
#related-article li a:hover {
    text-decoration: none;
    opacity: 0.7;
    transition: 0.3s ease-in-out;
}
#related-article li a img {
    width: 100%;
}
#related-article li a > div {
    position: relative;
}
#related-article li a > div img {
    width: 100%;
    max-height: 184.6px;
}
@media screen and (max-width: 769px) {
    #related-article li a > div img {
        max-height: inherit;
    }
}
#related-article li a > div p {
    position: absolute;
    display: block;
    right: 0;
    bottom: 0;
    margin-top: 0;
    padding: 5px 10px 0;
    font-size: 14px;
    background-color: #fff;
    line-height: inherit !important;
    opacity: 0.7;
    border-top-left-radius: 10px;
    font-size: 14px !important;
}
#related-article li a span {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 1px;
    width: 124px;
    height: 30px;
    position: absolute;
    left: 0;
    top: 10px;
    border-radius: 0 50px 50px 0;
    z-index: 1;
    box-sizing: border-box;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
}
#related-article li a span.saving {
    background-color: #fdb813;
}
#related-article li a span.knowledge {
    background-color: #fcea05;
}
#related-article li a span.other {
    background-color: #fff49c;
}
#related-article li a > p {
    overflow: hidden;
    padding: 0 20px;
    font-weight: bold;
    line-height: 1.5 !important;
    margin: 19.8px 0 0.2px !important;
    height: 50px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    transition: 0.3s ease-in-out;
}
#related-article li a:hover > p {
    color: #006499;
    transition: 0.3s ease-in-out;
}
#related-article li a > p br {
    display: none;
}

ul.related-tag-list {
    display: flex;
    flex-wrap: wrap;
    padding: 10px 20px 20px;
    gap: 5px;
}
ul.related-tag-list li {
    border-radius: 20px;
}
ul.related-tag-list li a {
    display: block;
    border: 1px solid #404040;
    padding: 2px 15px 0;
    font-size: 12px;
    color: #404040 !important;
    border-radius: 17px;
    min-width: 50px;
    height: 22px;
    box-sizing: border-box;
    background-color: #fff;
}
ul.related-tag-list li a:hover {
    color: #fff !important;
    background-color: #006499;
    border-color: #006499 !important;
    opacity: .7;
    transition: 0.3s ease-in-out;
}
@media screen and (max-width: 769px) {
    #related-article {
        padding: 40px 20px;
        width: inherit;
        background: #f8f8f8;
    }
    #related-article h2 {
        font-weight: bold;
        font-size: 2.2rem;
        margin-bottom: 20px;
    }
    #related-article h2::after {
        width: 30px;
        height: 2px;
        bottom: -15px;
    }
    #related-article > ul {
        margin-top: 32px;
        margin-right: 0;
    }
    :not(.prof-wada-card) + #related-article {
        margin-top: 60px;
    }
    #related-article ul.related-tag-list {
        padding: 1.5rem 2rem 2rem;
    }
    #related-article li a > div p:last-of-type {
        font-size: calc((24 / 750)*100vw);
    }
    #related-article li a > div p {
        font-size: calc((24 / 750)* 100vw) !important;
        position: absolute;
        right: 0;
        bottom: 0;
        margin-top: 0;
        padding: 0.5rem 1rem 0.4rem;
        line-height: 1 !important;
        background-color: #fff;
        opacity: 0.7;
        border-top-left-radius: 0.7rem;
    }
    #related-article li a span {
        position: absolute;
        left: 0;
        top: 4vw;
        border-radius: 0 50px 50px 0;
        z-index: 1;
        display: inline-block;
        font-size: calc((28 / 750)* 100vw);
        font-weight: bold;
        line-height: 8vw;
        padding: 0 4vw;
        width: inherit;
    }
    #related-article h2 {
        margin-top: 0 !important;
    }
    #related-article > ul > li {
        width: 100%;
        margin-right: 0;
    }
    #related-article li a > p {
        padding: 0 20px;
        font-weight: bold;
        line-height: 1.42857em !important;
        height: inherit;
        margin: 20px 0 0 !important;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        transition: 0.3s ease-in-out;
    }
}