/* css/module5_news.css */

.news-section {
    padding: 120px 0;
    background-color: #030508;
    position: relative;
}

.news-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 标题样式 (统一化) */
.section-header { text-align: center; margin-bottom: 70px; }
.cyan-heading { font-family: 'Courier New', Courier, monospace; color: #00f3ff; font-size: 1rem; letter-spacing: 4px; margin-bottom: 10px; text-shadow: 0 0 10px rgba(0, 243, 255, 0.4); }
.main-title { font-size: 2.5rem; color: #ffffff; letter-spacing: 2px; margin-bottom: 20px; }
.heading-line { width: 60px; height: 3px; background: #00f3ff; margin: 0 auto; box-shadow: 0 0 15px #00f3ff; }

/* 动态网格排版 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
}

/* ==========================================
   终端日志卡片设计
   ========================================== */
.news-card {
    position: relative;
    background: #0a0f1e;
    border: 1px solid rgba(0, 243, 255, 0.15);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
    z-index: 1;
}

.news-card:hover {
    transform: translateY(-5px);
    border-color: #00f3ff;
}

/* 卡片内部发光特效 */
.card-glow {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(0, 243, 255, 0.08) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}
.news-card:hover .card-glow { opacity: 1; }

.news-content {
    padding: 35px 40px;
}

/* 元数据：日期与分类标签 */
.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
}

.news-date { color: #5c6784; }

/* 分类标签配色系统 */
.news-category { font-weight: bold; letter-spacing: 1px; }
.tag-open-source { color: #27c93f; text-shadow: 0 0 5px rgba(39, 201, 63, 0.5); }
.tag-hardware { color: #ffbd2e; text-shadow: 0 0 5px rgba(255, 189, 46, 0.5); }
.tag-web { color: #00f3ff; text-shadow: 0 0 5px rgba(0, 243, 255, 0.5); }
.tag-event { color: #ff00c8; text-shadow: 0 0 5px rgba(255, 0, 200, 0.5); }

/* 标题与摘要 */
.news-title {
    font-size: 1.4rem;
    color: #e0e0e0;
    margin: 0 0 15px 0;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.news-card:hover .news-title { color: #fff; }

.news-excerpt {
    color: #94a3b8;
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0 0 30px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 限制摘要为两行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 终端交互阅读按钮 */
.terminal-link {
    font-family: 'Courier New', Courier, monospace;
    color: #00f3ff;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

.terminal-link::after {
    content: '_';
    position: absolute;
    right: -12px;
    opacity: 0;
    animation: blink 1s step-end infinite;
}

.news-card:hover .terminal-link {
    text-shadow: 0 0 8px rgba(0, 243, 255, 0.8);
}

.news-card:hover .terminal-link::after {
    opacity: 1; /* 鼠标悬停时触发光标闪烁 */
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* 滚动浮现动画 */
.n-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.n-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* 响应式 */
@media (max-width: 768px) {
    .news-grid { grid-template-columns: 1fr; }
    .news-content { padding: 25px; }
    .news-meta { flex-direction: column; align-items: flex-start; gap: 10px; }
}