@charset "utf-8";
/***************************************
    copyright by MakeWeb.com.tw 
***************************************/

.subject a {
    color: black;
    font-size: var(--fs-xl);
    font-weight: var(--fw-bold);

}
.subject a:hover {
    opacity: 0.7;
}
.listgroup_advance_news figure {
    border-bottom: 1px solid #e5e5e5;
    margin: 0;
}
.listgroup_advance_news figure:nth-child(1) {
    border-top: 1px solid #e5e5e5;
}
.listgroup_advance_news span.date {
    color: #424242;
    width: 100%;
    font-size: var(--fs-xl);
}
.listgroup_advance_news .news_month {
    margin: unset;
    max-width: none;
}
.listgroup_advance_news span.subject {
    margin: 0;
}

/*-------------------------------------------- 
	Media Queries 
---------------------------------------------*/
/* Portrait and Landscape */
/*@media only screen and (min-device-width: 320px) and (max-device-width: 568px) and (-webkit-min-device-pixel-ratio: 2) {
}*/

/*iPad Pro*/
@media screen and (max-width: 1279px) {
}

/*iPad*/
@media screen and (max-width: 1023px) {
}
/*iPhone*/
@media screen and (max-width: 767px) {
}

/* ============================================
   News Cards Grid Layout
   ============================================ */

/* Grid Container */
.news-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Card Link Wrapper */
.news-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.news-card-link:hover {
    transform: translateY(-8px);
}

.news-card-link:hover .news-card {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Card Container */
.news-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: 420px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease;
}

/* Card Image */
.news-image {
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

/* Card Content */
.news-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.news-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px; /* Slightly breathing room between tag and date */
    margin-bottom: 15px; /* More space before the title */
}

.news-date {
    color: #999;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    letter-spacing: 0.5px;
}

.news-tag-badge {
    display: inline-block;
    background: rgba(143, 195, 31, 0.12); /* Subtle green tint */
    color: #6a9416; /* Darker green for contrast */
    padding: 4px 12px;
    border-radius: 20px; /* Pill shape */
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    white-space: nowrap;
    border: 1px solid rgba(143, 195, 31, 0.2);
    margin-left: -4px; /* 光學微調：圓角視覺會被吃掉，給一點點負距讓肉眼看起來是齊的 */
}

.news-card-title {
    font-size: var(--fs-md);
    font-weight: var(--fw-bold);
    color: #2c3e50;
    line-height: 1.4;
    margin-bottom: 15px;
    min-height: 50px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-link {
    display: block;
    color: #8fc31f;
    text-decoration: none;
    font-size: var(--fs-sm);
    text-align: right;
    transition: color 0.3s ease;
    font-weight: var(--fw-bold);
}

.news-link:hover {
    color: #333;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet */
@media screen and (max-width: 1024px) {
    .news-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        padding: 30px 20px;
    }
}

/* Mobile */
@media screen and (max-width: 768px) {
    .news-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 15px;
    }
    
    .news-card {
        height: auto;
        min-height: 380px;
    }
    
    .news-image {
        height: 180px;
    }
    
    .news-card-title {
        min-height: auto;
    }
}

/* ============================================
   News Article Detail Page Styles
   ============================================ */

.news-article {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* Featured Image */
.news-article-hero {
    width: 66%;
    margin-left: auto;
    margin-right: auto;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.news-article-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Article Meta (Tag + Date) */
.news-article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.news-article-tag {
    display: inline-block;
    background: rgba(143, 195, 31, 0.12);
    color: #6a9416;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    white-space: nowrap;
    border: 1px solid rgba(143, 195, 31, 0.2);
}

.news-article-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: var(--fs-sm);
}

.news-article-date svg {
    color: #999;
}

/* Article Title */
.news-article-title {
    font-size: var(--fs-2xl);
    font-weight: var(--fw-bold);
    color: #1a1a2e;
    line-height: 1.3;
    margin: 0 0 35px 0;
    letter-spacing: -0.5px;
}

/* Article Content */
.news-article-content {
    font-size: var(--fs-md);
    line-height: 1.9;
    color: #333;
}

.news-article-content p {
    margin-bottom: 1.5em;
}

.news-article-content h2,
.news-article-content h3 {
    color: #1a1a2e;
    margin-top: 2em;
    margin-bottom: 0.8em;
    font-weight: var(--fw-bold);
}

.news-article-content h2 {
    font-size: var(--fs-xl);
}

.news-article-content h3 {
    font-size: var(--fs-lg);
}

.news-article-content ul,
.news-article-content ol {
    margin: 1.5em 0;
    padding-left: 2em;
}

.news-article-content li {
    margin-bottom: 0.8em;
    line-height: 1.7;
}

.news-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2em auto;
    display: block;
}

.news-article-content a {
    color: #8fc31f;
    text-decoration: none;
    font-weight: var(--fw-medium);
    transition: color 0.2s ease;
}

.news-article-content a:hover {
    color: #6a9416;
    text-decoration: underline;
}

.news-article-content strong {
    color: #1a1a2e;
    font-weight: var(--fw-bold);
}

.news-article-content a strong {
    color: inherit;
}

/* Share Section */
.news-article-share {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 30px 0;
    margin-top: 40px;
    border-top: 1px solid #e5e5e5;
    flex-wrap: wrap;
}

.share-label {
    color: #666;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f5f5f5;
    color: #555;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.share-linkedin:hover {
    background: #0077b5;
    color: white;
}

.share-facebook:hover {
    background: #1877f2;
    color: white;
}

.share-twitter:hover {
    background: #1a1a2e;
    color: white;
}

.share-copy:hover {
    background: #8fc31f;
    color: white;
}

.share-copy.copied {
    background: #4caf50;
    color: white;
}

.share-copy.copied::after {
    content: '✓';
    position: absolute;
    font-size: 10px;
}

/* Back to News Navigation */
.news-article-nav {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e5e5e5;
}

.back-to-list {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #666;
    text-decoration: none;
    font-size: var(--fs-base);
    font-weight: var(--fw-medium);
    padding: 12px 20px;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.25s ease;
}

.back-to-list:hover {
    background: #8fc31f;
    color: white;
    transform: translateX(-5px);
}

.back-to-list svg {
    transition: transform 0.25s ease;
}

.back-to-list:hover svg {
    transform: translateX(-3px);
}

/* Empty State */
.news-article-empty {
    text-align: center;
    padding: 80px 20px;
    color: #666;
}

/* ============================================
   News Article Responsive Design
   ============================================ */

@media screen and (max-width: 768px) {
    .news-article {
        padding: 20px 15px 40px;
    }
    
    .news-article-hero {
        border-radius: 12px;
        margin-bottom: 20px;
    }
    
    .news-article-meta {
        gap: 12px;
        margin-bottom: 15px;
    }
    
    .news-article-tag {
        padding: 4px 12px;
    }
    
    .news-article-title {
        margin-bottom: 25px;
    }
    
    .news-article-content {
        line-height: 1.8;
    }
    
    
    .news-article-share {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .share-btn {
        width: 40px;
        height: 40px;
    }
    
    .back-to-list {
        padding: 10px 16px;
    }
}

@media screen and (max-width: 480px) {
    .news-article-hero {
        width: 100%;
        border-radius: 8px;
    }
}

/*--------------------------------------------
    Whitepaper Download Button
----------------------------------------------*/
.whitepaper-download-section {
    text-align: left;
    margin: 40px 0;
}

.whitepaper-download-btn {
    display: inline-block;
    background: #8fc31f;
    color: #fff;
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.whitepaper-download-btn:hover {
    background: #7aa61a;
    color: #fff;
    text-decoration: none;
}
