/* Import Google Font */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700;900&display=swap");

/* Import component styles */
@import "global/variables.css";
@import "global/base.css";
@import "global/animations.css";
@import "component/cta.css";
@import "component/social-links.css";

 /* 去除a標籤的底線 */
a:hover {
    text-decoration: none;
    color: #00b69e;
}

/* 導航欄樣式 */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    mix-blend-mode: difference;
}

.logo {
    font-size: 1.8rem;
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.language-switcher {
    display: flex;
    gap: 5px;
    align-items: center;
}

.lang-btn {
    color: #fff;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.lang-btn.active {
    background: var(--primary, #00f5d4);
    color: var(--dark-bg, #0a0f18);
    border-color: var(--primary, #00f5d4);
}

.menu-button {
    color: #fff;
    font-size: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-button span {
    color: #fff;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* 選單樣式 */
.menu-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    background: var(--dark-bg);
    z-index: 2000;
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.7, 0, 0.3, 1);
    overflow-y: auto;
    display: flex;
}

.menu-overlay.active {
    transform: translateX(0);
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1;
}

.menu-close {
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

/* 左側主選單 */
.menu-main {
    width: 25%;
    min-width: 300px;
    height: 100vh;
    padding: 100px 40px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.menu-items {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.menu-item {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    color: #fff;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.menu-item:hover,
.menu-item.active {
    opacity: 1;
    color: var(--primary);
}

.menu-item .number {
    font-size: 1rem;
    color: var(--primary);
}

.menu-item .text {
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 0.1em;
}

/* 右側子選單 */
.menu-sub {
    flex-grow: 1;
    padding: 100px 60px;
    display: none;
}

.menu-sub.active {
    display: block;
}

.submenu-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--primary);
}

.submenu-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.submenu-items a {
    display: block;
    padding: 15px;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    position: relative;
    transition: all 0.3s ease;
}

.submenu-items a:hover {
    color: var(--primary);
    transform: translateX(10px);
}

.contact-info {
    position: absolute;
    bottom: 40px;
    left: 40px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    line-height: 1.8;
}

.contact-info p {
    margin-bottom: 10px;
}

/* Menu 中的語言切換器 */
.menu-language-switcher {
    margin-top: 20px;
}

.menu-language-switcher .lang-btn {
    font-size: 0.85rem;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

.menu-language-switcher .lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.menu-language-switcher .lang-btn.active {
    background: var(--primary, #00f5d4);
    color: var(--dark-bg, #0a0f18);
    border-color: var(--primary, #00f5d4);
}

/* 網站頁尾樣式 - 從home.css移植 */
.site-footer {
    background: var(--dark-bg);
    position: relative;
    overflow: hidden;
    padding: 80px 0 0;
    color: #fff;
    font-family: "Noto Sans TC", "Roboto", "Arial", sans-serif;
}

.footer-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 2;
}

/* 背景效果 */
.footer-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
}

.footer-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, transparent 70%);
    opacity: 0.05;
}

/* 左側資訊 */
.footer-info {
    position: relative;
}

.footer-logo {
    margin-bottom: 30px;
    display: inline-block;
}

.footer-logo img {
    height: 40px;
    width: auto;
}

.footer-info {
    margin-bottom: 40px;
}

.info-group {
    margin-bottom: 25px;
}

.info-group h3 {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.info-group p,
.info-group a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.6;
    text-decoration: none;
    transition: all 0.3s ease;
}

.info-group a:hover {
    color: var(--primary);
}

.map-container {
    width: 100%;
    height: 200px;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 右側導航 */
.footer-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.nav-group h3 {
    color: var(--primary);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.nav-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 15px;
}

.nav-group a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 15px;
}

.nav-group a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 5px;
    height: 1px;
    background: var(--primary);
    transition: all 0.3s ease;
}

.nav-group a:hover {
    color: var(--primary);
    padding-left: 20px;
}

.nav-group a:hover::before {
    width: 10px;
}

/* Footer 中的語言切換器 */
.footer-info .language-switcher {
    margin-top: 10px;
}

.footer-info .lang-btn {
    font-size: 0.8rem;
    padding: 5px 10px;
}

/* 版權區域 */
.copyright {
    margin-top: 60px;
    padding: 20px 40px;
    background: rgba(0, 0, 0, 0.3);
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-nav {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .footer-nav {
        grid-template-columns: 1fr;
    }

    .nav-group ul {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        padding: 0 20px;
    }
}

@media (max-width: 968px) {
    .menu-main {
        width: 100%;
        min-width: 0;
        border-right: none;
    }

    .menu-sub {
        display: none;
        padding: 40px 20px;
    }

    .menu-sub.active {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: var(--dark-bg);
    }

    .contact-info {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-bar {
        padding: 20px;
    }

    .footer-nav {
        grid-template-columns: 1fr;
    }

    .nav-group ul {
        gap: 10px;
    }

    .footer-grid {
        gap: 40px;
    }
}

@media (max-width: 576px) {
    .submenu-items {
        grid-template-columns: 1fr;
    }
}

/* Banner樣式 */
.banner-section {
    height: 400px;
    background: linear-gradient(135deg, #0a0f18, #1a1f2e);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none" stroke="%2300f5d4" stroke-width="0.25" stroke-opacity="0.1"/></svg>');
    background-size: 30px 30px;
    opacity: 0.5;
    z-index: 1;
}

.banner-content {
    text-align: center;
    z-index: 2;
    color: white;
    position: relative;
    max-width: 800px;
    padding: 0 20px;
    animation: fadeIn 1s ease-out;
}

.banner-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #fff, #00f5d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}
.banner-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    animation: fadeInUp 1s ease-out 0.5s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .mobile-only {
        display: flex;
    }

    .desktop-only {
        display: none;
    }
}

/* 通用分頁樣式 */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 60px;
    margin-bottom: 60px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pagination-number:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.pagination-number.active {
    background-color: var(--primary);
    color: var(--dark-bg);
    border-color: var(--primary);
}

.pagination-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: white;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pagination-arrow:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.pagination-arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-ellipsis {
    color: rgba(255, 255, 255, 0.5);
    padding: 0 5px;
}

/* 載入動畫指示器 */
#loading-indicator {
    text-align: center;
    padding: 20px;
}

.spinner {
    margin: 0 auto;
    width: 70px;
    text-align: center;
}

.spinner > div {
    width: 18px;
    height: 18px;
    background-color: var(--primary);
    border-radius: 100%;
    display: inline-block;
    animation: sk-bouncedelay 1.4s infinite ease-in-out both;
}

.spinner .bounce1 {
    animation-delay: -0.32s;
}

.spinner .bounce2 {
    animation-delay: -0.16s;
}

@keyframes sk-bouncedelay {
    0%, 80%, 100% { 
        transform: scale(0);
    } 40% { 
        transform: scale(1.0);
    }
}

/* 新聞卡片共用樣式 */
.news-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.news-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
}

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

.news-card {
    background: var(--dark-bg-2);
    border-radius: 5px;
    overflow: hidden;
    width: 100%;
    position: relative;
    border-top: 3px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 480px;
    display: flex;
    flex-direction: column;
}

.news-card-link:hover .news-card {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 5px 15px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(30, 30, 30, 0.7);
}

.news-image {
    position: relative;
    width: 100%;
    height: 200px;
    min-height: 200px;
    overflow: hidden;
}

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

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

.news-image .category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary);
    color: var(--dark-bg);
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.news-card-link:hover .category {
    background: #fff;
    color: var(--dark-bg);
}

.news-content {
    padding: 20px;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-title {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 10px;
    line-height: 1.4;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.8em;
}

.news-card-link:hover .news-title {
    color: var(--primary);
}

.news-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.news-author, .news-date, .news-views {
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-summary {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 4.8em;
    flex: 1;
}

.news-tags, .article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0;
    margin-top: auto;
    max-height: 76px;
    overflow: hidden;
}

.news-tag, .tag {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-card-link:hover .news-tag, .news-card-link:hover .tag {
    background: rgba(255, 255, 255, 0.2);
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.news-card-link:hover .read-more {
    transform: translateX(5px);
}

.no-articles {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 0;
    color: rgba(255, 255, 255, 0.7);
}

/* 響應式設計 */
@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-card {
        height: 450px;
    }
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .news-card {
        height: auto;
        min-height: 420px;
    }
    
    .news-summary {
        -webkit-line-clamp: 4;
        max-height: 6.4em;
    }
}

/* 相關文章網格 */
.related-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .related-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .related-news-grid {
        grid-template-columns: 1fr;
    }
}

/* 相關文章樣式 */
.related-news {
    margin-bottom: 30px;
}

.related-news h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
    position: relative;
    padding-left: 15px;
}

.related-news h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    height: 20px;
    width: 4px;
    background: var(--primary);
    border-radius: 2px;
}


/* 詳情頁熱門文章側欄 */
.popular-article {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f5f5f5;
}

.popular-article:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-article-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.popular-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-article-content {
    padding-left: 15px;
    flex-grow: 1;
}

.popular-article-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-article-title a {
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.popular-article-title a:hover {
    color: #0087ca;
}

.popular-article-meta {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: #666;
}

.popular-article-date {
    margin-right: 15px;
}

