.moudle-news-list {
    background-image: url(../images/bg2.jpg);
    background-size: auto;
    background-repeat: repeat;
    background-position: top center;
}

.inbanner img {
    border-radius: 0;
}

.inbanner-title {
    display: flex;
    align-items: center;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
    display: flex;
    flex-direction: column;
    border: none;
    margin: 10px 0;
}

.card__image {
    position: relative;
    display: block;
    height: 20vw;
    overflow: hidden;
    background: #ddd;
}

.card__image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.card__image:hover img {
    transform: scale(1.1);
    opacity: 0.8;
}

.card__body {
    padding: 16px 24px;
    background-color: #fff;
}

.meta {
    font-size: 15px;
    color: #717171;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.meta .icon img {
    width: 16px;
    height: 16px;
}

.title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 24px;
    color: #3d8984;
}

.actions {
    display: flex;
    justify-content: flex-end;
}

.news-list-btn {
    background: #fff;
    color: #717171;
    font-weight: 600;
    padding: 2px 24px;
    font-size: 15px;
    cursor: pointer;
    border: 2px solid #b3b3b3;
    border-radius: 0;
    transition: background 0.3s ease-in-out, color 0.3s ease-in-out, border-color 0.3s ease-in-out;
}

.news-list-btn:hover {
    background: #f3f3f3;
    color: #333;
}


.moudle-news-list section {
    padding-top: 16px;
}

.news-section {
    text-align: center;
    padding: 20px 10px;
}

.news-title {
    font-size: 30px;
    font-weight: bold;
    color: #155e55;
    margin-bottom: 15px;
}

.news-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.news-nav a {
    font-size: 16px;
    color: #155e55;
    text-decoration: none;
    padding: 5px 8px;
    transition: color 0.3s;
}

.news-nav a::after {
    content: "|";
    color: #155e55;
    margin-left: 16px;
}

.news-nav a:last-child::after {
    content: "";
}

.news-nav a:hover,
.news-nav a.active {
    color: #6aa6a1;
}

.news-detail-infos{
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 0px;
}

.news-detail-infos .news-detail-info{
    display: flex;
    justify-content: center;
    align-items: center;
    width: max-content;
    min-width: 25%;
    max-width: 30%;
    padding: 8px 24px;
    font-size: var(--font-16);
    letter-spacing: 1px;
}

.news-detail-infos .news-detail-info .news-detail-info-title{
    padding: 0px 0;
    padding-right: 8px;
    margin-right: 8px;
    border-right: 5px solid #fff;
}

.share-links{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-left: 8px;
}

.share-links a img{
    width: auto;
    height: 16px;
    position: relative;
    object-fit: contain;
    margin: 0px 3px;
}

/* ===== Share Widget ===== */
.share-widget {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
}

.share-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 50px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    letter-spacing: 1px;
}

.share-toggle-btn:hover {
    background: rgba(255,255,255,0.25);
    border-color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.share-toggle-btn svg {
    flex-shrink: 0;
}

.share-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 998;
}

.share-overlay.active {
    display: block;
}

.share-popup {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 999;
    width: 320px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.96);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.share-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.share-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.share-popup-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}

.share-popup-close:hover {
    background: #e8e8e8;
    color: #333;
}

.share-popup-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 16px 12px;
}

.share-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    border-radius: 12px;
    text-decoration: none;
    color: #555;
    transition: all 0.2s ease;
    cursor: pointer;
}

.share-item:hover {
    background: #f8f8f8;
    color: #333;
    transform: translateY(-2px);
}

.share-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.share-icon svg {
    width: 24px;
    height: 24px;
}

.share-icon-facebook {
    background: #e7f3ff;
    color: #1877F2;
}

.share-item:hover .share-icon-facebook {
    background: #1877F2;
    color: #fff;
}

.share-icon-line {
    background: #e8f5e9;
    color: #06C755;
}

.share-item:hover .share-icon-line {
    background: #06C755;
    color: #fff;
}

.share-icon-threads {
    background: #f3e8ff;
    color: #000;
}

.share-item:hover .share-icon-threads {
    background: #000;
    color: #fff;
}

.share-icon-x {
    background: #f0f0f0;
    color: #000;
}

.share-item:hover .share-icon-x {
    background: #000;
    color: #fff;
}

.share-icon-email {
    background: #fff3e0;
    color: #F4511E;
}

.share-item:hover .share-icon-email {
    background: #F4511E;
    color: #fff;
}

.share-icon-copy {
    background: #e0f2f1;
    color: #3d8984;
}

.share-item:hover .share-icon-copy {
    background: #3d8984;
    color: #fff;
}

.share-label {
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.share-copied-toast {
    text-align: center;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    font-size: 13px;
    color: #3d8984;
    font-weight: 600;
    background: #e0f2f1;
    transition: all 0.3s ease;
}

.share-copied-toast.active {
    padding: 10px 20px;
    max-height: 50px;
}

@media (max-width: 768px) {
    .share-popup {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
        max-height: 80vh;
    }

    .share-popup.active {
        transform: translateY(0);
    }

    .share-overlay.active {
        background: rgba(0,0,0,0.4);
    }

    .share-popup-grid {
        padding: 20px 16px;
        gap: 8px;
    }

    .share-popup-header {
        padding: 20px 20px 14px;
    }
}

.news-detail-top-info{
    background-color: #fff;
    position: relative;
    padding-top: 48px !important;
    padding-bottom: 24px;
}

.news-detail-top-info::before{
    content: "";
    width: 100%;
    height: 450px;
    background-color: #3d8984;
    position: absolute;
    top: 0;
    left: 0;
}

.news-detail-top-info .container{
    position: relative;
    z-index: 1;
    color: #fff;
}

.news-detail-main-title{
    display: flex;
    justify-content: center;
    padding: 16px 0;
    font-size: var(--font-32);
    font-weight: var(--font-bolder-700);
    letter-spacing: 1.5px;
}

.news-main-pic{
   width: 80%;
   margin: auto;
}

.moudle-news-detail section{
    background-color: #fff;
}

.news-text{
    width: 80%;
    padding: 0px 48px;
    margin: auto;
}

.news-content{
    padding-top: 0;

}

.news-content h2{
    margin-bottom: 24px;
    text-align: center;
}

.pic-group{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.pic-group a{
    display: block;
    height: 320px;
    
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.pic-group a img{
    position: relative;
    object-fit: cover;
    height: 100%;
    transition: transform 0.4s;
}

.pic-group a:hover img{
    transform: scale(1.1);
    transition: transform 0.4s;
    opacity: .8;
}   

.more-news{
    background-color: #deedec !important;
    position: relative;
    overflow: hidden;
    padding: 48px 0px;
    padding-top: 80px;
}

.more-news .more-news-dec{
    width: 60%;
    position: absolute;
    top: -5px;
    left: 16px;
}

.swiper-slide a{
    height: 320px;
}

.swiper-slide .card__body a{
    height: max-content;
}

.swiper-slide a img {
    position: relative;
    height: 100%;
    object-fit: cover ;
}

.more-news-title{
    text-align: center;
    position: relative;
    z-index: 2;
    font-size: var(--font-28);
    font-weight: var(--font-bolder-700);
    margin-bottom: 48px;
    color: #3d8984;
}

.more-news-items{
    position: relative;
    padding: 0px 120px;
}

.more-news-swiper-button-next{
    right: 64px !important;
}

.more-news-swiper-button-prev{
    left: 64px !important;
}

.more-news-swiper-button::after{
    font-size: var(--font-24) !important;
    font-weight: var(--font-bolder-600);
    color: #3d8984;
}

@media screen and (max-width: 991px) {
    .pic-group{
        grid-template-columns: repeat(3, 1fr);
    }
}


@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .card__image {
        height: 30vw;
    }

    .pic-group{
        grid-template-columns: repeat(2, 1fr);
    }

    .pic-group a{
        height: 280px;
    }

    .news-detail-infos{
        flex-wrap: wrap;
    }

    .news-detail-infos .news-detail-info{
        max-width: 100%;
        width: 100%;
        padding: 5px 16px;
    }

    .news-main-pic{
        width: 90%;
    }

    .news-text{
        padding: 0;
    }

    .more-news-items{
        padding: 0px 60px;
    }

    .more-news-swiper-button-next{
        right: 24px !important;
    }

    .more-news-swiper-button-prev{
        left: 24px !important;
    }

    .swiper-slide a{
        height: 40vw;
    }

    .more-news .more-news-dec{
        width: 80%;
    }

}

/* ≤ 600px：調整排版與內距 */
@media (max-width: 600px) {
    .card__image {
        height: 50vw;
    }

    .title {
        font-size: 18px;
    }

    .card__body {
        padding: 10px 16px;
    }

    .actions {
        justify-content: center;
    }

    .pic-group a{
        height: 40vw;
    }

    .swiper-slide a{
        height: 40vw;
    }

    .more-news-title{
        margin-bottom: 16px;
    }

}

@media (max-width: 480px) {
    .news-nav a {
        display: block;
        font-size: 18px;
    }

    .more-news-items{
        padding: 0px 48px;
    }

    .more-news-swiper-button-next{
        right: 8px !important;
    }

    .more-news-swiper-button-prev{
        left: 8px !important;
    }

    .swiper-slide a{
        height: 60vw;
    }

}

/* 返回按鈕 */
.back-btn-wrap {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    padding-top: 30px;
}

.btn-back {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    color: #717171;
    font-weight: 600;
    padding: 12px 48px;
    font-size: 15px;
    cursor: pointer;
    border: 2px solid #b3b3b3;
    text-decoration: none;
    transition: background 0.3s ease-in-out, color 0.3s ease-in-out, border-color 0.3s ease-in-out;
}

.btn-back span:first-child {
    font-size: 16px;
}

.btn-back span:last-child {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.btn-back:hover {
    background: #3d8984;
    color: #fff;
    border-color: #3d8984;
}

.btn-back:hover span:last-child {
    color: #fff;
}