@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;600&display=swap');

body {
    font-family: "Public Sans", "Noto Sans TC", "Segoe UI", sans-serif;
    background: #ffffff;
    color: #000000;
}

.red-underline {
    display: inline-block;
    position: relative;
    padding-bottom: 10px;
}

.red-underline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    margin-top: 10px;
    width: 55%;
    height: 3px;
    background: #ff0000;
}

/* ------------------- 導覽列- ------------------- */
/* .navbar {
    border: 3px solid purple;
}

.navbar-fluid-container {
    border: 1px solid red;
}

.navbar-brandlogo {
    border: 1px solid rgb(255, 132, 0);
}

.navbar-nav {
    border: 1px solid rgb(16, 241, 0);
}

.nav-item {
    border: 1px solid rgb(0, 8, 241);
}

.navbar-menu {
    border: 1px solid rgb(28, 0, 241);
} */

.navbar {
    flex-wrap: nowrap;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 11vh;
    padding-top: 10px;
    background-color: #ffffff;
    transition: all 0.3s ease-in;
    z-index: 1000;
}

.navbar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 10px;
    width: 100%;
    background: linear-gradient(45deg, #ca0202, #ff9a02, #ff5100);
    z-index: 1001;
}

.navbar .navbar-fluid-container {
    display: flex;
    align-items: center;
    justify-content: space-between !important;
    width: 100%;
    padding: 0 1rem;
}


.navbar-fluid-container .navbar-logo-container {
    flex: 0.86;
}

.navbar-logo-container .navbar-brandlogo img {
    height: 6vh;
}

/* 大桌機螢幕 */
@media (min-width: 1441px) {}

/* 筆電 */
@media (min-width: 1024px) and (max-width: 1440px) {}

/*手機&平板 */
@media (max-width: 1024px) {
    .navbar {
        height: 10vh;
    }

    .navbar-fluid-container {
        padding: 0 1rem;
    }

    .navbar-logo-container .navbar-brandlogo img {
        height: 6vh;
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 0 15px;
    }
}

/* ------------------- 導覽列-內容 ------------------- */
.navbar-fluid-container .navbar-menu {
    display: flex;
    justify-content: start;
    flex: 2;
}

.navbar-menu .navbar-nav {
    display: flex;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-item:not(:last-child)::after {
    content: "|";
    color: #aaa;
    vertical-align: middle;
}

.nav-link {
    display: inline-block;
    position: relative;
    padding: 0 20px;
    margin: 0 10px;
    color: #363636;
    font-size: 1.3rem;
    font-weight: 500;
    text-decoration: none;
    letter-spacing: 1px;
    white-space: nowrap;
}

.nav-link span {
    display: inline-block;
    position: relative;
}

.nav-link span::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: red;
    transform-origin: right;
    /* 右邊始*/
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-link:hover span::after {
    transform: scaleX(1);
    transform-origin: left;
    /* 右邊收 */
}

/* 大桌機螢幕 */
@media (min-width: 1441px) {}

/* 筆電 */
@media (min-width: 1024px) and (max-width: 1440px) {
    .nav-link {
        font-size: 1.05rem;
    }
}

/* ------------------- 導覽列-下拉式 ------------------- */
.dropdown .dropdown-content {
    display: flex;
    align-items: flex-start;
    position: absolute;
    top: 100%;
    left: 5%;
    width: 450px;
    height: 200px;
    padding: 0;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 400;
    background-color: #383838;
    opacity: 0;
    list-style: none;
    visibility: hidden;
    pointer-events: none;
    overflow: hidden;
    transform: translateY(-10px);
    transition: transform 0.2s ease;
    z-index: 1000;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(5px);
}

.dropdown-content .dropdown-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    flex: 1;
    padding: 10px;
    overflow: hidden;
}

.dropdown-content .dropdown-left li {
    margin: 8px 8px;
}

.dropdown-content .dropdown-left a {
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.dropdown-content .dropdown-left a:hover {
    border: none;
    color: rgb(251, 126, 67);
}

.dropdown-content .dropdown-right {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 3;
    position: relative;
    overflow: hidden;
}

.dropdown-content .dropdown-right img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ------------------- 導覽列-搜尋 ------------------- */
.navbar-search-container {
    position: relative;
    width: fit-content;
    height: fit-content;
    display: flex;
    justify-content: flex-end;
    flex: 1;
}

.btn-search {
    position: absolute;
    right: 0px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border-style: none;
    color: #000000;
    background-color: transparent;
    font-size: 20px;
    font-weight: bold;
    outline: none;
    cursor: pointer;
    pointer-events: painted;
}

.btn-search i {
    color: #000000;
    font-weight: bold;
}

.input-search {
    width: 300px;
    padding: 10px;
    padding-right: 40px;
    border: 0px;
    border-bottom: #000000 1px solid;
    font-size: 18px;
    letter-spacing: 2px;
    background-color: transparent;
    outline: none;
    transition: all 500ms cubic-bezier(0, 0.110, 0.35, 2);
}

.input-search::placeholder {
    color: rgba(0, 0, 0, 0.3);
    font-size: 18px;
    letter-spacing: 2px;
    font-weight: 400;
}

/* .input-search:focus {
    width: 300px;
    border-radius: 0px;
    border-bottom: 1px solid rgba(0, 0, 0, 1);
    color: #000000;
    background-color: transparent;
    transition: all 500ms cubic-bezier(0, 0.110, 0.35, 2);
} */

input:focus::placeholder {
    color: transparent;
}

@media (min-width: 1024px) and (max-width: 1440px) {
    .input-search {
        width: 220px;
    }
}

/* ------------------- 導覽列-漢堡菜單 ------------------- */
.hamburger {
    display: none;
    flex: 0 0 auto !important;
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
}

@media (max-width: 1200px) {
    .hamburger {
        display: block;
        color: #333;
        z-index: 1100;
    }

    #hamburger-overlay {
        position: fixed;
        display: none;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }

    #hamburger-overlay.nav-active {
        display: block;
    }
}

/* ------------------- 全域-每頁標題 ------------------- */
.chapter-title {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
    margin-top: 10vh;
}

.chapter-title::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.7),
            rgba(0, 0, 0, 0.5));
    z-index: 1
}

.chapter-title-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 2rem;
    z-index: 1;
}

.chapter-title-content h1 {
    display: inline-block;
    padding: 0.5rem 1.4rem;
    color: #ffffff;
    font-weight: 700;
    font-size: 3.5rem;
    border-top: 3px solid #ffffff;
    border-bottom: 3px solid #ffffff;
    border-radius: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

@media (min-width: 1024px) and (max-width: 1440px) {
    .chapter-title {
        margin-top: 70px;
        height: 250px;
    }

    .chapter-title-content h1 {
        font-size: 2.5rem;
    }
}

/* ------------------- 全域-麵包屑 ------------------- */
.chapter-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 0.3rem 1rem;
    margin-top: 1rem;
    border-radius: 1rem;
    background-color: rgba(92, 92, 92, 0.3);
    list-style: none;
}

.chapter-breadcrumb li {
    display: flex;
    align-items: center;
}

.chapter-breadcrumb li+li::before {
    margin: 0 8px;
    font-family: "Font Awesome 7 Free";
    content: "\f105";
    color: #a9a9a9;
    font-weight: 600;
    font-size: 0.8em;
}

.chapter-breadcrumb a {
    font-size: 1em;
    font-weight: 600;
    text-decoration: none;
    color: #ffffffe7;
    letter-spacing: 1px;
}

/* .chapter-breadcrumb a:hover {
    text-decoration: none;
    color: rgb(224, 224, 224);
} */

.chapter-breadcrumb .nav-active {
    color: #e6e6e6;
    font-size: 1em;
    font-weight: 450;
    pointer-events: none;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* ------------------- 全域-TOP按鈕 ------------------- */
#back-to-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    background-color: rgb(32, 32, 32);
    color: white;
    font-size: 12px;
    text-align: center;
    cursor: pointer;
    transition: opacity 1s linear;
    z-index: 999;
}

#back-to-top i {
    margin-bottom: 3px;
    font-size: 16px;
}

#back-to-top p {
    margin: 0;
    font-size: 10px;
}

#back-to-top:hover {
    background-color: #555;
}

@media (min-width: 767px) and (max-width: 1025px) {
    #back-to-top {
        width: 60px;
        height: 60px;
        font-size: 14px;
    }

    #back-to-top i {
        font-size: 20px;
    }
}

@media (min-width: 430px) and (max-width: 767px) {
    #back-to-top {
        width: 40px;
        height: 40px;
        font-size: 8px;
    }

    #back-to-top i {
        font-size: 14px;
    }

    #back-to-top p {
        display: none;
    }
}