/* 享新聞首頁樣式
   基礎（導覽列、字體、標題結構、feature區塊、按鈕、條列文章、FAQ）數值全部沿用 buy-discount.css / life.css，
   只有享新聞獨有的部分（頭條、最新消息列表、分類標籤、◆標題裝飾、冷色背景）另外寫在後面。 */

.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: 400px;
    margin: auto;
    font-family: 'Noto Sans TC', sans-serif;
}

.card-container {
    max-width: 1024px;
    margin: auto;
}

/* 色票：頂部冷灰藍，下方四區依性質配色，刻意避開享食旅／享生活／享好買已用的底色與符號 */
:root {
    --news-steel: #e8eff7;
    --news-stone: #edece8;
    --news-amber: #fcf0d3;
    --news-peach: #fcece2;
    --news-taupe: #e9e5e1;
    --news-navy: #16314f;
    --news-label: #5f86ad;
    --news-line: #ececec;
    --c-eco: #3b5b8c;
    --c-soc: #2a7a8a;
    --c-loc: #3b74bd;
    --c-edu: #a4702c;
}

/* 標題區 開頭 */
.titlearea {
    text-align: center;
    margin-top: 3rem;
    margin-bottom: 6rem;
    font-family: "Noto Serif TC", serif;
    font-optical-sizing: auto;
    font-style: normal;
    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: 16px;
    vertical-align: middle;
    position: relative;
    top: -4px;
}

.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;
}

/* 標題區 結尾 */

/* 分區背景色 開頭 */
.section-top {
    background: linear-gradient(to bottom, #ffffff 0%, var(--news-steel) 38%, var(--news-steel) 62%, #ffffff 100%);
    padding-top: 3rem;
    padding-bottom: 4rem;
}

.section-latest {
    background: #ffffff;
    padding-top: 4rem;
    padding-bottom: 3rem;
}

.section-local {
    background: linear-gradient(to bottom, #ffffff 0%, var(--news-stone) 35%, var(--news-stone) 100%);
    padding-top: 4rem;
    padding-bottom: 3rem;
}

.section-education {
    background: linear-gradient(to bottom, var(--news-stone) 0%, var(--news-amber) 35%, var(--news-amber) 100%);
    padding-top: 4rem;
    padding-bottom: 3rem;
}

.section-society {
    background: linear-gradient(to bottom, var(--news-amber) 0%, var(--news-peach) 35%, var(--news-peach) 100%);
    padding-top: 4rem;
    padding-bottom: 3rem;
}

.section-politics {
    background: linear-gradient(to bottom, var(--news-peach) 0%, var(--news-taupe) 35%, var(--news-taupe) 70%, #ffffff 100%);
    padding-top: 4rem;
    padding-bottom: 4.5rem;
}

/* 分區背景色 結尾 */

/* 分類標籤與日期 開頭 */
.news-cat {
    display: inline-block;
    font-size: 12px;
    font-weight: bold;
    line-height: 1.5;
    padding: 0 10px;
    border-radius: 999px;
    letter-spacing: 0.08rem;
    white-space: nowrap;
    color: var(--cc);
    background: color-mix(in srgb, var(--cc) 13%, #fff);
}

.news-cat.eco {
    --cc: var(--c-eco);
}

.news-cat.soc {
    --cc: var(--c-soc);
}

.news-cat.loc {
    --cc: var(--c-loc);
}

.news-cat.edu {
    --cc: var(--c-edu);
}

.news-date {
    color: gray;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

/* 分類標籤與日期 結尾 */

/* 頭條 開頭 */
.headline-wrap {
    padding-left: 24px;
    padding-right: 24px;
}

.headline-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: stretch;
}

.headline-lead a,
.headline-mini {
    color: black;
    text-decoration: none;
}

/* 滑鼠互動：沿用條列文章（.article-item）的效果——縮小一點＋浮出陰影。
   大圖的頭條縮得比小篇少一點，免得整塊跳動太大；padding給陰影一點空間 */
.headline-lead a {
    display: block;
    padding: 12px;
    border-radius: 24px;
    transition: all 0.3s ease;
}

.headline-lead a:hover {
    transform: scale(0.9);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.headline-mini {
    padding: 12px;
    border-radius: 24px;
    transition: all 0.3s ease;
}

.headline-mini:hover {
    transform: scale(0.9);
    color: #333;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.headline-frame {
    position: relative;
    border-radius: 0.8rem;
    overflow: hidden;
    margin-bottom: 16px;
    aspect-ratio: 16 / 9;
    background-color: #eee;
    line-height: 0;
}

.headline-frame picture,
.headline-frame img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* 招牌標籤：沿用輪播的signboard-label，只換成享新聞的灰藍色 */
.headline-signboard {
    position: absolute;
    top: 0;
    left: 0;
    width: 120px;
    height: 50px;
    background-color: var(--news-label);
    border-bottom-right-radius: 0.8rem;
    border-top-left-radius: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    z-index: 3;
    line-height: 1;
}

.headline-signboard span {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 5px;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    align-items: center;
}

.headline-lead h3 {
    margin: 8px 0;
    font-size: 19px;
    line-height: 1.55;
    font-weight: bold;
    letter-spacing: 0.08rem;
    text-wrap: balance;
}

.headline-lead p {
    margin: 0 0 8px;
    color: gray;
    line-height: 2.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.headline-side {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
}

.headline-mini {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 16px;
    align-items: start;
}

.headline-mini-img {
    aspect-ratio: 4 / 3;
    border-radius: 16px;
    overflow: hidden;
    background-color: #eee;
    line-height: 0;
}

.headline-mini-img picture,
.headline-mini-img img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.headline-mini h4 {
    margin: 6px 0 4px;
    font-size: 16px;
    line-height: 1.6;
    font-weight: bold;
    letter-spacing: 0.05rem;
    /* 標題最多兩行，超過的部分用「...」收尾，4篇的高度才會整齊 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 頭條 結尾 */

/* 分區標語及圖片 開頭（沿用享好買／享生活） */
.content-box {
    display: flex;
    flex-direction: column-reverse;
    gap: 7rem;
    max-width: 1024px;
    margin: 0 auto;
    align-items: center;
    font-family: "Noto Serif TC", serif;
    padding-left: 48px;
    padding-right: 48px;
}

.content-box-solo {
    max-width: 1024px;
    margin: 0 auto;
    font-family: "Noto Serif TC", serif;
    padding-left: 48px;
    padding-right: 48px;
}

.feature-box,
.text-box {
    width: 100%;
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.4rem;
    justify-content: center;
    font-family: "Noto Serif TC", serif;
    user-select: none;
}

.section-title picture {
    display: inline-block;
    vertical-align: baseline;
    user-select: none;
    -webkit-user-drag: none;
}

.section-title picture img {
    width: 40px;
    height: auto;
    vertical-align: baseline;
    margin-left: 4px;
    user-select: none;
    -webkit-user-drag: none;
}

.section-subtitle {
    font-size: 16px;
    color: gray;
    margin-top: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    font-family: "Noto Serif TC", serif;
    user-select: none;
}

.section-eng {
    font-size: 14px;
    letter-spacing: 1px;
    color: gray;
    text-align: center;
    font-style: italic;
    font-family: "Noto Serif TC", serif;
    user-select: none;
}

.feature-img {
    width: 100%;
    max-width: 436px;
    aspect-ratio: 6 / 4;
    overflow: hidden;
    border-radius: 20px;
    background-color: #eee;
    line-height: 0;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

.feature-img picture,
.feature-img img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}

.more-btn {
    background-color: white;
    border-radius: 2rem;
    padding: 0.6rem 2rem;
    border: none;
    font-weight: bold;
    margin: 2rem auto 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    letter-spacing: 0.3rem;
    transition: all 0.3s ease;
    display: none;
    font-size: 14px;
    width: 140px;
    text-decoration: none;
    color: black;
    font-family: "Noto Serif TC", serif;
}

.more-btn:hover {
    transform: scale(0.9);
    background-color: #f2f2f2;
    color: #333;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.more-btn-mobile {
    background-color: white;
    border-radius: 2rem;
    padding: 0.6rem 2rem;
    border: none;
    font-weight: bold;
    margin: auto;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    letter-spacing: 0.3rem;
    transition: all 0.3s ease;
    display: block;
    font-size: 14px;
    width: 140px;
    text-decoration: none;
    color: black;
    font-family: "Noto Serif TC", serif;
}

.more-btn-mobile:hover {
    transform: scale(0.9);
    background-color: #f2f2f2;
    color: #333;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.btn-mobile-border {
    padding-top: 24px;
}

/* 分區標語及圖片 結尾 */

/* 最新消息列表 開頭 */
.latest-list {
    list-style: none;
    margin: 3rem 0 0;
    padding: 0;
}

.latest-list a {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 6px 20px;
    align-items: center;
    padding: 22px 12px;
    border-bottom: 1px solid var(--news-line);
    border-radius: 12px;
    color: black;
    text-decoration: none;
    transition: all 0.3s ease;
}

.latest-list li:last-child a {
    border-bottom-color: transparent;
}

.latest-list a:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    transform: scale(0.9);
}

.latest-list .news-date {
    text-align: left;
}

.latest-list .news-cat {
    justify-self: start;
}

.latest-list .latest-title {
    grid-column: 1 / -1;
    order: 3;
    font-weight: 500;
    letter-spacing: 0.08rem;
    line-height: 1.7;
}

.latest-more {
    padding-top: 36px;
}

/* 最新消息列表 結尾 */

/* 條列式文章 開頭 */
.article-list {
    margin-top: 88px;
    margin-left: 2rem;
    margin-right: 2rem;
}

.article-item {
    margin-bottom: 4rem;
    border-radius: 24px;
    text-align: left;
    transition: all 0.3s ease;
    letter-spacing: 0.1rem;
    padding: 24px;
    line-height: 3rem;
}

.article-item:hover {
    transform: scale(0.9);
    color: #333;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.article-list a {
    color: black;
    text-decoration: none;
}

.article-title {
    font-weight: bold;
    text-align: justify;
}

.article-date {
    color: gray;
    font-size: 14px;
}

/* 條列式文章 結尾 */

/* 電腦版 RWD */
@media (min-width: 768px) {
    .titlearea {
        margin-top: 5rem;
        margin-bottom: 208px;
    }

    .section-top {
        padding-top: 96px;
        padding-bottom: 96px;
    }

    .section-latest {
        padding-top: 96px;
        padding-bottom: 48px;
    }

    .section-local,
    .section-education,
    .section-society {
        padding-top: 96px;
        padding-bottom: 0;
    }

    .section-politics {
        padding-top: 96px;
        padding-bottom: 48px;
    }

    .headline-grid {
        grid-template-columns: 1.5fr 1fr;
        gap: 32px;
    }

    .headline-lead h3 {
        font-size: 22px;
    }

    .headline-signboard {
        width: 160px;
        height: 60px;
    }

    .headline-signboard span {
        font-size: 1rem;
    }

    .headline-side {
        gap: 32px;
    }

    .headline-mini {
        grid-template-columns: 108px 1fr;
    }

    .content-box {
        gap: 5rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .content-box-reverse {
        flex-direction: row-reverse;
    }

    .feature-box,
    .text-box {
        width: 50%;
    }

    .text-box {
        text-align: center;
    }

    .section-subtitle,
    .section-eng {
        text-align: center;
    }

    .latest-list a {
        grid-template-columns: 104px 64px 1fr;
        gap: 16px;
        padding: 24px 8px;
    }

    .latest-list .news-date {
        text-align: center;
    }

    .latest-list .news-cat {
        justify-self: center;
    }

    .latest-list .latest-title {
        grid-column: auto;
        order: 0;
    }

    .article-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 4rem 6rem;
        max-width: 1024px;
        margin: 4rem auto 0;
    }

    .article-item {
        margin-bottom: 0rem;
        text-align: left;
    }

    .more-btn {
        text-align: center;
        display: block;
    }

    .more-btn-mobile {
        text-align: center;
        display: none;
    }

    .more-btn-mobile.always {
        display: block;
    }
}

/* FAQ面板 */
.accordion-button:not(.collapsed) {
    background-color: #ececec57;
    color: #000000;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .125);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0, 0, 0, .125);
}

.accordion-button::after {
    filter: grayscale(1) brightness(0.5);
}

.accordion-body {
    line-height: 1.8;
}

.section-bg {
    border-radius: 1.5rem;
    padding-top: 1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.decorated-title-no-icon {
    position: relative;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.sectiontitlearer {
    position: relative;
    user-select: none;
    margin-bottom: 40px;
}
