@charset "utf-8";

/*
** use ctrl+f to find the block if the need manifests
** default / layout / tool
** nav / banner / qa
** booklist / go top / footer
*/

/* default */

* {
    /* outline: 1px solid #ffae00; */
    box-sizing: border-box;
}

html {
    font-family: "Noto Sans TC","黑體-繁","Apple LiGothic Medium","PingFang","微軟正黑體","Microsoft JhengHei","WenQuanYi Zen Hei",helvetica,"Arial",sans-serif;
    -webkit-text-size-adjust: none;
    background-size: 100%;
    letter-spacing: 1px;
}

body {
    background: var(--kv-bg) no-repeat center top/100%, var(--body-bg);
}

@media screen and (max-width: 768px) {
    body {
        background: var(--kv-bg-m) no-repeat center top/100%, var(--body-bg);
    }
}

a {
    text-decoration: none;
    cursor: pointer;
}

ul, ol, li {
    margin: 0;
    padding: 0;
} 

h1, h2, h3, h4, h5, h6, p {
    padding: 0;
    margin: 0;
}

p {
    font-size: 18px;
    line-height: 2;
    color: var(--text-normal-color);
    text-align: justify;
    word-break: break-all;
}

@media screen and (max-width: 768px) {
    p {
        font-size: 16px;
    }
}

button {
    outline: none;
    border: none;
    cursor: pointer;
}

/* layout */

.wrapper {
    max-width: 1200px;
    width: 100%;
    margin: auto;
}

.bg {
    padding-inline: var(--layout-padding);
}

.content {
    position: relative;
    background-color: #f9f8f8;
    border-radius: 20px;
    margin-bottom: 40px;
    padding: 50px min(5.4vw, 105px);
}

@media screen and (max-width: 768px) {
    .content {
        padding-inline: 30px;
    }
}

.title-main {
    position: relative;
    padding-left: 25px;
    font-size: 20px;
    font-weight: 700;
    color: var(--title-main-color);
}

.title-main::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 0;
    width: 8px;
    height: 26px;
    background: var(--title-main-color);
}

.deco-line {
    display: block;
    margin-block: 30px;
    height: 1px;
    border-bottom: 1px dashed var(--deco-line-color);
}

.btn-primary {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-inline: auto;
    background: var(--btn-primary-color);
}

.btn-primary img {
    margin-right: 8px;
}

@media screen and (max-width: 480px) {
    .btn-primary img {
        margin-right: 4px;
        width: 22px;
    }
}

.btn-primary p {
    font-weight: 700;
    line-height: 1;
    color: var(--btn-primary-text-color);
    text-wrap: nowrap;
}


.btn-primary_s {
    padding: 4px 20px;
    border-radius: 18px;
}

.btn-primary_s p {
    font-size: 18px;
}

.btn-primary_l {
    padding: 14px 31px;
    border-radius: 30px;
}

@media screen and (max-width: 480px) {
    .btn-primary_l {
        padding: 10px 16px;
    }
}

.btn-primary_l p {
    font-size: 22px;
}

@media screen and (max-width: 480px) {
    .btn-primary_l p {
        font-size: 16px;
    }
}

.scroll-detector {
    position: absolute;
    top: -60px;
    left: 0;
}

/* tool */

.line-clamp {
    display: inline-block;
    display: -webkit-box;
    overflow: hidden;
    max-height: calc(1em * 1.35 * 2);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.35;
}

/* nav */

.nav {
    display: flex;
    align-items: center;
    padding-inline: var(--layout-padding);
    width: 100%;
    height: 60px;
    position: relative;
    z-index: 9999;
    position: fixed;
    right: 0;
    top: 0;
}

.nav .wrapper {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav.is-bg-show {
    background: var(--nav-bg-color);
}
.nav.is-bg-show .nav-story-logo {
    background-image: url('../img/logo_white1.png');
}

.nav.is-active .nav-list {
    transform: translateX(0);
}

.nav.is-active .nav-menu > *:nth-child(1) {
    transform: rotate(135deg) translate(4px, -2px);
}

.nav.is-active .nav-menu > *:nth-child(2) {
    width: 0;
}

.nav.is-active .nav-menu > *:nth-child(3) {
    transform: rotate(-135deg) translate(3px, 2px);
}

.nav-logo {
    flex:  1 1 0;
}

.nav-story-logo {
    display: block;
    width: 140px;
    height: 39px;
    background: url('../img/logo.svg') no-repeat center center/contain;
}

.nav-story-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nav-list {
    display: flex;
    flex: 0 0 330px;
    align-items: center;
    text-wrap: nowrap;
}

@media screen and (max-width: 960px) {
    .nav-list {
        flex: 0 0 304px;
    }
}

@media screen and (max-width: 768px) {
    .nav-list {
        position: fixed;
        top: 0;
        right: 0;
        flex-direction: column;
        transform: translateX(100%);
        padding: 90px 20px 30px;
        width: 320px;
        border-radius: 0 0 8px 8px;;
        background: var(--menu-color);
        transition: transform .3s ease-out;
    }

    .nav-list::before {
        content: '';
        position: absolute;
        top: 60px;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 40px);
        height: 1px;
        background: var(--nav-hover-color);
    }
}

.nav-link {
    display: inline-block;
    margin-right: 21px;
    padding: 7px;
    text-align: center;
    color: var(--nav-text-color);
    font-size: 20px;
    font-weight: 500;
    text-shadow: 2px 2px 3px rgba(0, 0, 0, .1);
    border-radius: 3px;
}

@media screen and (max-width: 960px) {
    .nav-link {
        font-size: 18px;
    }
}

@media screen and (max-width: 768px) {
    .nav-link {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-right: 0;
        margin-bottom: 8px;
        width: 100%;
        height: 50px;
        font-size: 20px;
        border-radius: 8px;
    }

    .nav-link:last-child {
        margin-bottom: 0;
    }
}

.nav-link:hover,
.nav-link.is-active {
    background: var(--nav-hover-color);
}

.nav-menu {
    position: relative;
    display: none;
    margin-left: 14px;
    width: 30px;
    height: 30px;
    background: var(--btn-primary-color);
    border-radius: 50%;
}

@media screen and (max-width: 768px) {
    .nav-menu {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
}

.nav-menu > * {
    display: block;
    margin-block: 1px;
    width: 15px;
    height: 2px;
    background: #fff;
    transition: all .3s ease-out;
}

.social-btn {
    position: relative;
    display: flex;
    flex: 0 0 74px;
    height: 30px;
}

.social-btn > * {
    display: block;
    width: 30px;
    height: 30px;
}

.social-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.fb-icon {
    margin-right: 14px;
}

/* banner */

.banner {
    width: 100%;
    height: 0;
    padding-bottom: 33.4%;
}

@media screen and (max-width:768px) {
    .banner {
        padding-bottom: 133.4%;
    }
}

/* qa */

.qa > * {
    list-style: none;
    margin-bottom: 40px;
}

@media screen and (max-width: 768px) {
    .qa > * {
        margin-bottom: 35px;
    }
}

.qa > *:last-child {
    margin-bottom: 0;
}

.qa .is-active .qa_cover{
    visibility: hidden;
    opacity: 0;
}

.qa .is-active .qa_answer-text{
    visibility: visible;
    opacity: 1;
}

.qa_title {
    position: relative;
    margin-bottom: 10px;
    padding-left: 30px;
}

.qa_title::before {
    content: 'Q：';
    position: absolute;
    top: 0;
    left: 0;
}

.qa_answer {
    position: relative;
    color: var(--qa-answer-color);
    padding-left: 30px;
}

.qa_answer::before {
    content: 'A：';
    position: absolute;
    top: 0;
    left: 0;
    color: var(--qa-answer-color);
}

.qa_answer-text {
    padding: 4px 0;
    visibility: hidden;
    opacity: 0;
}

.qa_cover {
    position: absolute;
    top: 0;
    left: 0;
    visibility: visible;
    opacity: 1;
    padding: 0 20px;
    color: #fff;
    cursor: pointer;
}

.qa_cover.btn-primary {
    margin: 0;
    width: fit-content;
}

/* booklist */

.bk_list {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.bk_list + .btn-primary {
    margin-top: 15px;
}

.bk_list .list_buffer,
.bk {
    width: calc((100% - 20px * 5) / 6);
}

@media screen and (max-width: 960px) {
    .bk_list .list_buffer,
    .bk {
        width: calc((100% - 20px * 3) / 4);
    }
}

@media screen and (max-width: 640px) {
    .bk_list .list_buffer,
    .bk {
        width: calc((100% - 20px * 1) / 2);
    }
}

.bk {
    margin-bottom: 25px;
}

.bk:hover img {
    transform: scale(1.2, 1.2);
}

.bk:hover .bk_text {
    color: var(--bk-list-hover-color);
}

.bk_list .list_buffer {
    opacity: 0;
    pointer-events: none;
}

.bk_pic {
    position: relative;
    margin-bottom: 8px;
    padding-bottom: 142%;
    width: 100%;
    height: 0;
    overflow: hidden;
    cursor: pointer;
    border-radius: 8px;
}

.bk_pic a {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.bk_pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1, 1);
    transition: transform 1s ease-out;
}

.notice {
    padding-left: 20px;
}

.notice > * {
    position: relative;
}

.notice > *::before {
    content: '．';
    position: absolute;
    top: 0;
    left: -20px;
}

.notice .email {
    color: var(--title-main-color);
}

/* go top */
.gotop {
    position: fixed;
    bottom: 8%;
    right: 2%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--go-top-color);
}

@media screen and (max-width: 768px) {
    .gotop {
        width: 50px;
        height: 50px;
    }
}

/* footer */

footer {
    margin-bottom: 20px;
    padding: 12px var(--layout-padding);
    text-align: center;
    background-color: var(--footer-color);
    color: #FFF;
    letter-spacing: 1px;
    font-size: 12px;
}
