.navbar {
    --bs-navbar-padding-y: 1rem;
    --bs-navbar-nav-link-padding-x: 1rem;
}

.nav-item {
    border-radius: 0.5rem;
    margin: 10px;
}

.navhover:hover {
    transition: all 0.5s ease;
}

.navhover:hover {
    background-color: rgba(0, 0, 0, 0.05)
}

#btn_top {
    z-index: 9999;
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 50px;
    height: 50px;
    border-radius: 999em;
    display: none;
}

body {
    min-width: 350px;
    margin: auto;
    font-family: 'Noto Sans TC', sans-serif;
}

main {
    margin: auto;
}

h1 {
    margin: 0px;
    font-size: 24px;
    text-align: justify;
}

.card-container {
    /*min-width: 350px;*/
    max-width: 1024px;
    margin: auto;
}

.section-bg {
    border-radius: 1.5rem;
    padding-top: 1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.section-bg-video {
    background: linear-gradient(to bottom, #ffffff 0%, #f4f7f9 30%, #f4f7f9 70%, #ffffff 100%);
    /*background-color: #f4f7f9;*/
}

.text-subtle {
    color: #888;
}

.decorated-title,
.decorated-title-no-icon {
    position: relative;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    font-size: 0.9rem;
    color: #999;
    font-style: italic;
    margin-bottom: 3rem;
}

.article-title {
    text-align: left;
    font-weight: 600;
    font-size: 1.17rem;
    margin-top: 36px;
    margin-bottom: 36px;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 2rem;
}

.articledes {
    text-align: justify;
    line-height: 2rem;
}

.videoicon {
    position: absolute;
    right: 0;
    top: 0;
    display: flex;
    flex-direction: row-reverse;
    user-select: none;
}

.videoicon img {
    width: 40%;
    height: auto;
    margin-top: 12px;
}

.fade-in-on-scroll {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.8s ease-out;
    will-change: opacity, transform;
}

.fade-in-on-scroll.animate {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-on-scroll-right {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.8s ease-out;
    will-change: opacity, transform;
}

.fade-in-on-scroll-right.animate {
    opacity: 1;
    transform: translateX(0);
}

.sectiontitlearer {
    position: relative;
    user-select: none;
    margin-bottom: 40px;
}

@media (max-width: 767px) {
    .videoicon {
        display: none !important;
    }
}

/*adBanner相關CSS 開頭*/
#adbanner {
    position: fixed;
    bottom: 10%;
    left: 20px;
    display: flex;
    flex-direction: column;
    /* 垂直堆疊 */
    align-items: center;
    justify-content: flex-start;
    /* 使內容從上方開始排列 */
    height: auto;
    /* 讓高度根據內容自適應 */
    width: 250px;
    border-radius: 15px;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    transition: left 0.5s ease-in-out;
}

/* 設置廣告輪播位置與過渡效果 */
#adCarousel {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    display: flex;
    align-items: center;
    /* 垂直居中 */
    justify-content: center;
    /* 水平居中 */
}

/* 當廣告摺疊時移到右側 */
#adbanner.collapsed {
    left: -250px;
}

/* 隱藏摺疊後的箭頭按鈕 */
#toggleAdButton {
    position: absolute;
    bottom: 5%;
    right: -40px;
    font-size: 2rem;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    transition: right 0.5s ease-in-out;
    background: none;
}

/* 當廣告摺疊時，箭頭移動並且隱藏 */
#adbanner.collapsed+#toggleAdButton {
    right: 0;
    visibility: hidden;
}

/* 自訂的 SVG 按鈕樣式 */
#toggleAdButton svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

#currentDateTime {
    color: white;
}

#adbannertext {
    color: white;
}

/*adBanner相關CSS 結尾*/

.video-content a {
    color: black;
    text-decoration: none;
}

.video-content {
    position: relative;
    overflow: hidden;
    transition: height 0.5s ease;
    /* 高度補間 */
}

.videoslide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.videoslide.active {
    opacity: 1;
    z-index: 1;
}

.videoslide .row {
    flex-wrap: wrap;
}

.image-wrapper {
    width: 450px;
    height: 450px;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

@media (max-width: 767px) {
    .videoslide .row {
        flex-direction: column;
        align-items: center;
    }

    .image-wrapper {
        width: 100%;
        height: auto;
    }

    .controls {
        margin-top: 4rem !important;
    }

    .more {
        margin-top: 96px !important;

        .partner-logos {
            margin-bottom: 96px;
        }
    }
}

.controls {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 6rem;
}

.controls .control-btn {
    width: 60px;
    height: 60px;
    font-size: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.controls .control-btn:hover {
    transform: scale(0.8);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.controls .progress-indicator {
    font-size: 0.9rem;
    color: #555;
    margin-left: auto;
}

.more {
    margin-top: 48px;
    text-align: center;
}

.sectiontitlearer hr {
    width: 60px;
    border-top: 1px solid #ddd;
    margin: 1rem auto 0;
}

.partner-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 144px;
    /* 控制「雜誌風」的水平/垂直間距 */
}

.partner-logos .col {
    flex: 0 0 calc(33.333% - 2rem);
    /* 桌機版一列三個 */
    /* flex: 0 0 100%; 行動裝置一列一個 */
}

@media (min-width: 576px) {
    .partner-logos .col {
        flex: 0 0 calc(33.333% - 2rem);
        /* 桌機版一列三個 */
    }
}

.partner-item {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    transition: transform 0.3s ease;
    text-decoration: none;
}

.partner-item:hover {
    transform: scale(1.2);
}

.partner-item img {
    max-width: 120px;
    height: auto;
}

/* 針對 YouTube SVG */
.partner-item.youtube svg {
    width: 50px;
    height: 50px;
    fill: red;
    transition: transform 0.3s ease;
    cursor: pointer;
}

/* SVG 的 hover 也可一起用 */
.partner-item.youtube:hover svg {
    transform: scale(1.2);
}

/* 享影音區域 開頭 */

.titlearea {
    text-align: center;
    margin-top: 3rem;
    margin-bottom: 6rem;
    font-family: "Noto Serif TC", serif;
    font-optical-sizing: auto;
    font-style: normal;
    padding-top: 48px;
    user-select:none;
}

.maintitle {
    font-size: 30px;
    font-weight: bold;
    color: black;
    margin-top: 3rem;
    margin-bottom: 3rem;
    letter-spacing: 0.7rem;
}

.maintitle::before,
.maintitle::after {
    content: '·';
    color: black;
    font-size: 24px;
    vertical-align: middle;
    position: relative;
    top: -1px;
    /* 或 -1px 微調 */
}

.uppercasetitle {
    font-size: 14px;
    font-weight: 500;
    color: gray;
    letter-spacing: 0.2rem;
    font-style: italic;
}

.lowcasetitle {
    font-size: 16px;
    font-weight: 500;
    color: gray;
    letter-spacing: 0.2rem;
}

/* 享食旅區域 結尾 */

/* 電腦版 RWD */
@media (min-width: 768px) {
    .titlearea {
        margin-top: 5rem;
        margin-bottom: 208px;
        padding-top: 96px;
    }

    .videolist {
        margin-bottom: 176px;
    }
}