/**
 * 文章列表樣式
 * 1768hy.com 專用
 */

/* 文章列表容器 */
.article-list-container {
    padding: 40px 0;
    background: #222;  /* 與網站主背景一致 */
    min-height: 600px;
}

/* 文章卡片樣式 */
.article-card .card {
    border: 2px solid #333;
    background: rgba(0, 0, 0, 0.9);  /* 幾乎純黑背景，最大化對比度 */
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);  /* 添加基礎陰影 */
}

.article-card .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(34, 214, 238, 0.3) !important;  /* 使用主題色陰影 */
    border-color: #22d6ee;
}

/* 圖片容器 */
.card-img-container {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.card-img-container img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .card-img-container img {
    transform: scale(1.1);
}

/* 圖片覆蓋層 */
.card-img-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 0;
    background: transparent;
}

.card-img-overlay .badge {
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(34, 214, 238, 0.9);  /* 使用主題色 #22d6ee */
    color: #fff;
}

/* 文章標題 */
.article-card .card-title {
    font-size: 1.2rem;
    font-weight: 700;  /* 加粗字體 */
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-card .card-title a {
    color: #22d6ee !important;  /* 直接使用主題色，加 !important 確保覆蓋 */
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);  /* 添加文字陰影提高可讀性 */
    display: block;  /* 確保整個標題都可點擊 */
}

.article-card .card-title a:hover {
    color: #fff !important;  /* 懸停時變為白色 */
    text-decoration: none !important;
    text-shadow: 1px 1px 3px rgba(34, 214, 238, 0.5);  /* 懸停時的發光效果 */
}

/* 文章資訊 */
.article-meta {
    padding: 8px 0;
    border-bottom: 1px solid #333;  /* 深灰色邊框 */
    margin-bottom: 15px;
}

.article-meta i {
    margin-right: 5px;
    color: #22d6ee;  /* 圖標使用主題色 */
}

.article-meta small {
    color: #d5d5d5 !important;  /* 淺灰色文字 */
}

/* 文章摘要 */
.article-card .card-text {
    font-size: 14px;
    line-height: 1.6;
    color: #d5d5d5;  /* 淺灰色文字，確保可讀性 */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 閱讀更多按鈕 */
.article-card .btn-primary {
    background: #22d6ee;  /* 使用主題色 */
    border: 2px solid #22d6ee;
    color: #000;  /* 黑色文字，在亮色背景上更清晰 */
    padding: 10px 20px;
    font-weight: 700;  /* 加粗文字 */
    transition: all 0.3s ease;
    letter-spacing: 0.5px;  /* 字間距 */
    font-size: 15px;
}

.article-card .btn-primary:hover {
    background: transparent;  /* 透明背景 */
    border: 2px solid #22d6ee;
    transform: translateX(5px);
    color: #22d6ee;  /* 主題色文字 */
    box-shadow: 0 0 10px rgba(34, 214, 238, 0.5);  /* 發光效果 */
}

.article-card .btn-primary i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.article-card .btn-primary:hover i {
    transform: translateX(3px);
}

/* 主標題樣式 */
.article-list-container h1 {
    color: #22d6ee;  /* 使用主題色 */
    font-weight: bold;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 40px;
}

.article-list-container h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #22d6ee;  /* 使用主題色 */
}

/* 無文章提示 */
.alert-info {
    background: rgba(34, 214, 238, 0.1);  /* 主題色的半透明背景 */
    border: 1px solid #22d6ee;
    color: #22d6ee;
    padding: 20px;
    font-size: 16px;
}

/* 響應式設計 - 平板 */
@media (max-width: 991px) {
    .article-list-container {
        padding: 30px 0;
    }
    
    .card-img-container {
        height: 180px;
    }
    
    .card-img-container img {
        height: 180px;
    }
    
    .article-card .card-title {
        font-size: 1.1rem;
    }
}

/* 響應式設計 - 手機 */
@media (max-width: 767px) {
    .article-list-container {
        padding: 20px 0;
    }
    
    .article-list-container h1 {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }
    
    .card-img-container {
        height: 200px;
    }
    
    .card-img-container img {
        height: 200px;
    }
    
    .article-card .card-title {
        font-size: 1rem;
    }
    
    .article-meta {
        font-size: 12px;
    }
    
    .article-card .card-text {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    
    .article-card .btn-primary {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* 加載動畫 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card {
    animation: fadeInUp 0.5s ease-out;
}

.article-card:nth-child(1) { animation-delay: 0.1s; }
.article-card:nth-child(2) { animation-delay: 0.2s; }
.article-card:nth-child(3) { animation-delay: 0.3s; }
.article-card:nth-child(4) { animation-delay: 0.4s; }
.article-card:nth-child(5) { animation-delay: 0.5s; }
.article-card:nth-child(6) { animation-delay: 0.6s; }
.article-card:nth-child(7) { animation-delay: 0.7s; }
.article-card:nth-child(8) { animation-delay: 0.8s; }
.article-card:nth-child(9) { animation-delay: 0.9s; }

/* 骨架屏效果（載入中） */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Banner 佔位樣式 */
.banner-placeholder {
    height: 400px !important;
    background: linear-gradient(135deg, #22d6ee 0%, #1a9fb3 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    position: relative !important;
    overflow: hidden !important;
    min-height: 400px;
}

.banner-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.05) 10px,
        rgba(255, 255, 255, 0.05) 20px
    );
    animation: stripes 20s linear infinite;
}

@keyframes stripes {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(50px);
    }
}

.banner-text {
    color: #fff;
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 1;
    position: relative;
    display: block;
    width: 100%;
    text-align: center;
}

/* 文章圖片佔位樣式 */
.img-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #22d6ee;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    gap: 10px;
}

.img-placeholder i {
    font-size: 4rem;
    color: #22d6ee;
    opacity: 1;
    animation: pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(34, 214, 238, 0.5));
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.img-placeholder .placeholder-text {
    color: #22d6ee;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    opacity: 0.9;
    text-transform: uppercase;
    text-shadow: 0 0 5px rgba(34, 214, 238, 0.3);
}

.img-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(34, 214, 238, 0.05) 10px,
        rgba(34, 214, 238, 0.05) 20px
    );
}

.img-placeholder::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 214, 238, 0.1) 0%, transparent 70%);
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(0.8);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* 響應式調整 */
@media (max-width: 767px) {
    .banner-placeholder {
        height: 200px;
    }
    
    .banner-text {
        font-size: 1.5rem;
    }
}