.news-page .shopMain{
    margin-top: 40px;
}
.news-page .news-item{
    display: block;
}

/* 置頂消息樣式 */
.news-page .sticky-news {
    /* 移除橘色邊框 */
    position: relative;
}

.news-page .sticky-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    color: white;
    padding: 0;
    border-radius: 0;
    font-size: 12px;
    font-weight: 500;
    z-index: 2;
}

.news-page .sticky-indicator::before {
    content: "◆";
    font-size: 12px;
    margin-right: 3px;
    color: white;
    font-weight: normal;
    opacity: 0.8;
}

/* 新聞頁面頁碼置中樣式 */
.news-page .pageNumberbox {
    justify-content: center !important;
    display: flex !important;
}

.news-page .pageNumber {
    justify-content: center !important;
    display: flex !important;
}

/* 載入更多按鈕樣式 */
.load-more-container {
    text-align: center;
    margin: 40px 0;
    padding: 20px;
}

.load-more-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: "Faculty Glyphic", sans-serif;
}

.load-more-btn:hover {
    background: #1a2a4a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 49, 92, 0.3);
}

.load-more-btn:active {
    transform: translateY(0);
}

.loading-spinner {
    display: none;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.load-complete {
    text-align: center;
    margin: 40px 0;
    padding: 20px;
    color: var(--secondary-color);
    font-size: 16px;
    font-style: italic;
}

/* 影片頁面動態載入樣式 */
.video .blocknews-top-imgbox.video.empty,
.video .news-item.video.empty {
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.video .no-video-placeholder {
    color: #999;
    font-size: 14px;
    text-align: center;
    padding: 20px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: white;
}

/* 影片錯誤狀態樣式 */
.video .video-error-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 20px;
    background: #f8f9fa;
    border: 2px dashed #dc3545;
    border-radius: 8px;
    text-align: center;
}

.video .error-icon {
    font-size: 24px;
    margin-bottom: 10px;
    color: #dc3545;
}

.video .error-message {
    color: #dc3545;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

.video .error-details {
    color: #6c757d;
    font-size: 12px;
    margin-bottom: 15px;
    font-style: italic;
}

.video .youtube-link {
    color: #007bff;
    text-decoration: none;
    font-size: 12px;
    padding: 8px 16px;
    border: 1px solid #007bff;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.video .youtube-link:hover {
    background: #007bff;
    color: white;
    text-decoration: none;
}

.video .blocknews-top-imgbox.video.empty::before,
.video .news-item.video.empty::before {
    content: "暫無影片";
}

/* 影片嵌入樣式 */
.video-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* 影片容器樣式 - 允許文字顯示並修正布局 */
.blocknews-top-imgbox.video {
    overflow: visible !important;
    display: flex;
    flex-direction: column;
    height: auto !important;
    aspect-ratio: unset !important;
}

/* 影片覆蓋層 - 移到影片外部 */
.video-overlay {
    position: relative;
    background: transparent;
    padding: 12px 0 0 0;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: auto;
    width: 100%;
    box-sizing: border-box;
}

.video-info {
    color: #333;
    width: 100%;
    box-sizing: border-box;
}

.video-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #333;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.video-description {
    font-size: 14px;
    margin: 0;
    opacity: 0.8;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #666;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

/* 直式影片特殊樣式 */
.blocknews-top-imgbox.video.vertical {
    display: flex;
    flex-direction: column;
    height: auto !important;
    aspect-ratio: unset !important;
}

.video-wrapper.vertical .video-overlay {
    padding: 10px 0 0 0;
}

.video-wrapper.vertical .video-title {
    font-size: 14px;
    margin-bottom: 6px;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.video-wrapper.vertical .video-description {
    font-size: 12px;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

/* 影片載入狀態 */
.video-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
    flex-direction: column;
    gap: 16px;
}

.video-loading::before {
    content: "載入中...";
    animation: pulse 1.5s ease-in-out infinite;
}


@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}


/* 影片錯誤狀態 */
.video-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #e74c3c;
    background: #fdf2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin: 20px 0;
    gap: 16px;
}

.error-icon {
    font-size: 24px;
}

.error-message {
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
}

.retry-button {
    background: #D46B08;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.retry-button:hover {
    background: #b85907;
}

.news-page .blocknews-top-imgbox {
    position: relative;
}
.news-page .stWf:not(.mbl, .pcmenu, .allr){
    max-width: 1510px;
    margin: 0 auto;
    padding: 0;
}
.news-page .stWf.article{
    max-width: 1200px!important;
}
.news-page .banner{
    height: 300px;
    padding-top: 80px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* news page styles */
.leftCategory-wrapper {
    margin-top: 24px;
}
.leftCategory-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
}
.quantity {
    font-size: 14px;
    font-weight: 400;
    color: var(--secondary-color);
    transition: all .25s linear;
}
.leftCategory-title.art {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 24px 0;
    margin: 0;
    text-decoration: none;
    color: inherit;
    transition: all .25s linear;
    color: var(--secondary-color);
}
.leftCategory-title.art:first-child{
    text-decoration: none;
    color: inherit;
}
.leftCategory-title.art:not(.active) {
    border-bottom: dashed 1px #bababa;
}

.leftCategory-title.art svg {
    margin-right: 4px;
    transition: transform 0.3s ease;
}

.leftCategory-title.art svg path {
    transition: stroke 0.3s ease;
    stroke: var(--secondary-color);
}
.leftCategory-title.art.current-page,
.leftCategory-title.art.current-page .quantity {
    color: var(--primary-color);
}
.leftCategory-title.art.current-page svg path {
    stroke: var(--primary-color);
}
.leftCategory-title.art:hover {    
    background-color: var(--background-color-fabric);
}
.leftCategory-title.art:hover,
.leftCategory-title.art:hover .quantity {
    color: var(--primary-color);
}
.leftCategory-title.art:hover svg path {
    stroke: var(--primary-color);
}

.leftCategory-title.art.active svg {
    transform: rotate(180deg);
}
.headart {
    display: flex;
    align-items: center;
    gap: 8px;
}
.leftCategory.art {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    transform-origin: top;
    transform: translateY(-10px);
    margin: 0;
    padding: 0;
    font-size: 14px;
}

.leftCategory.art.show {
    max-height: 1000px;
    opacity: 1;
    transform: translateY(0);
}

.leftCategory.art li::before {
    content: none;
    color: var(--secondary-color);
    margin-right: 4px;
}

.leftCategory.art li {
    transition: all .25s linear;
    padding: 6px 0;
}

.leftCategory.art a {
    margin-top: 20px;
    text-decoration: none;
    color: var(--secondary-color);
    transition: all .25s linear;
}

.leftCategory.art a:hover {
    color: var(--primary-color);
}

.leftCategory.art a:hover li::before {
    color: var(--primary-color);
}

.leftCategory.art a.current-page {
    color: var(--primary-color);
}

.leftCategory.art a.current-page li::before {
    color: var(--primary-color);
}

.leftCategory-btn {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.linex {
    width: 100%;
    height: 0;
    border-top: 1px dashed var(--secondary-color);
    margin-right: 4px;
    transition: border-color 0.25s linear;
}

.leftCategory-btn:hover .linex {
    border-color: var(--primary-color);
}

.leftCategory-btn.show {
    max-height: 50px;
    opacity: 1;
    transform: translateY(0);
}

/* News Grid Styles */
.sMr.main.news .news-grid {
    flex: 1;
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px 40px;
}

.sMr.main.news .news-item a {
    display: flex;
    flex-direction: column;
    background-color: transparent;
    text-decoration: none;
    transition: all .25s linear;
    box-shadow: none;
    gap: 16px;
    padding: 0;
}

.sMr.main.news .news-item a p {
    font-size: 14px;
    color: var(--secondary-color);
    text-decoration: underline 1px solid transparent;
    text-underline-offset: 10px;
    line-height: 1.8;
    margin: 0;
    text-align: left;
}
.sMr.main.news .news-item a:hover, .blocknews-top {
    opacity: 1!important;
}
.sMr.main.news .news-item a:hover p{
    text-decoration: underline 1px solid var(--primary-color);
    text-underline-offset: 6px;
}

.sMr.main.news .news-item .news-item p {
    font-size: 16px;
}

.sMr.main.news .blocknews-top {
    display: flex;
    flex-direction: column;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    gap: 16px;
    overflow: hidden;
    padding: 0 0 20px;
}
.sMr.main.news .blocknews-top-text{
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.news-item-title {
    color: var(--primary-color)!important;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    transition: all .2s linear;
}

.blocknews-top-imgbox {
    width: 100%;
    height: 100%;
    aspect-ratio: 4/5;
    overflow: hidden;
}

.blocknews-top-imgbox img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-item a:hover .blocknews-top-imgbox img {
    transform: scale(1.05);
}

.blocknews-top-imgbox iframe {
    width: 100%;
    height: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border: none;
    pointer-events: auto;
}

.news-tag {
    font-size: 14.5px;
    font-weight: 400;
    color: var(--secondary-color);
}
.news-date {
    font-size: 13px;
    font-weight: 400;
    color: var(--secondary-color);
}
.article-top{
    margin: 10px 0; 
}
.article-title{
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.article-title-decoration{
    width: 450px;
    height: auto;
    margin-bottom: 5px;
    transform: translate(0, 0); /* 置中對齊 */
}
.article-title h1{
    font-size: 32px;
    margin: 0;
    padding-bottom: 20px;
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
}
.heading.art{
    justify-content: flex-start;
    flex-direction: row;
    align-items: center;
    margin: 20px 0;
    gap: 20px;
    
}
.crumb.new a{
    color: var(--secondary-color);
    text-decoration: none;
}
.article-wrap{
    width: 100%;
}
.article-imgbox{
    margin: 0px 0 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
.article-imgbox img {
    min-width: 100%;
    max-width: 100%;
    object-fit: cover;
    padding-bottom: 10px;
}
.article-content{
    margin: 20px 0;
    font-size: 16px;
    font-weight: 400;
    line-height: 2;
}
.article-content a{
    color: var(--primary-color);
}
.article-content ol,
.article-content ul {
    margin-left: 20px;
    padding-left: 20px;
}

.article-content li {
    margin-bottom: 8px;
}
.article-footer-wrap{
    margin: 20px 0 80px 0;
    border-top: 1px solid var(--secondary-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.article-footer{
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}
.article-footer.info-page{
    justify-content: center;
}
.footer-back{
    text-decoration: none;
    color: var(--secondary-color);
    transition: all .25s linear;
}
.footer-back:hover{
    color: var(--primary-color);
}
.footer-nav{
    display: flex;
    gap: 30px;
}
.footer-nav a{
    color: var(--secondary-color);
    text-decoration: none;
    transition: all .25s linear;
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-nav a:hover{
    color: var(--primary-color);
}
.footer-nav a:first-child svg{
    transform: rotate(180deg);
}
.footer-nav a svg path{
    transition: all .25s linear;
}
.footer-nav a:hover svg path{
    stroke: var(--primary-color);
}


.news-page.video .news-grid {
    grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 1240.98px) {
    .sMr.main.news{
        padding: 0 20px;
    }
}
@media (max-width: 767.98px) {
    .news-page .shopMain{
        margin-top: 10px;
    }
    .sMr.main.news .news-grid{
        gap: 40px 20px;
    }
    .news-grid .blocknews-top {
        font-size: 13px;
    }
    .news-item a p {
        font-size: 12px;
    }
    .article-title h1{
        font-size: 20px;
        padding: 0 0 10px;
        margin: 20px 0 0;
    }
    .heading.art{
        margin: 10px 0 0;
    }
    .article-footer {
        flex-wrap: wrap;
        gap: 20px;
    }

    .footer-nav {
        width: 100%;
        justify-content: space-between;
        order: 2;
    }
    h2{
        font-size: 20px;
    }
    h3{
        font-size: 18px;
    }
}

@media (max-width: 450.98px) {
}

/* 移除衝突的 aspect-ratio 設定，使用 flex 布局 */

/* 横向 */
.horizontal .blocknews-top-imgbox {
    width: 100%;
    height: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.horizontal .blocknews-top-imgbox iframe {
    width: 100%;
    height: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border: none;
}

.horizontal .news-item {
    aspect-ratio: 16/9;
}

.horizontal .news-item a {
    padding: 0;
    height: 100%;
}

.horizontal .blocknews-top {
    height: 100%;
    gap: 0;
}

.horizontal .blocknews-top-imgbox {
    width: 100%;
    height: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.horizontal .blocknews-top-imgbox iframe {
    width: 100%;
    height: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border: none;
} 

/* 直向 */
.vertical .blocknews-top-imgbox {
    width: 100%;
    height: 100%;
    aspect-ratio: 9/16;
    overflow: hidden;
}

.vertical .blocknews-top-imgbox iframe {
    width: 100%;
    height: 100%;
    aspect-ratio: 9/16;
    object-fit: cover;
}
.news-item.video a{
    box-shadow: none;
    padding: 0;
}

/* 影片網格布局修正 */
.news-page.video .news-grid {
    display: grid;
    gap: 20px;
    align-items: start;
}

.news-page.video .news-item {
    display: flex;
    flex-direction: column;
    height: auto;
}

.news-page.video .news-item a {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* 橫式影片布局 - 一排2個 */
.news-page.video .news-grid.horizontal{
    grid-template-columns: repeat(3, 1fr) !important;
}

/* 直向4列布局 */
.news-page.video .news-grid.vertical{
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1240.98px) {
    .news-page.video .news-grid.vertical{
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900.98px) {
    .news-page.video .news-grid.vertical{
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 650.98px) {
    .news-page.video .news-grid.vertical{
        grid-template-columns: repeat(1, 1fr);
    }
    .news-page.video .news-grid.horizontal{
        grid-template-columns: 1fr !important;
    }
}
.deco-line.phone{
    display: none;
}
@media (max-width: 767.98px) {
    .deco-line.phone{
        display: block;
    }
    .deco-line.pc{
        display: none;
    }
}
