/* ============================================================
   ReLU Robotics Blog —— 明亮极简科技风（参考 Webnode 编辑排版风格）
   ============================================================ */

:root {
    --blue: #2a7de1;
    --blue-hover: #1a5bbf;
    --accent: #2a7de1;
    --text-main: #111318;
    --text-light: #6b7280;
    --text-muted: #9ca3af;
    --bg: #ffffff;
    --bg-soft: #f7f8fa;
    --bg-card: #ffffff;
    --border: #e5e7eb;
    --radius: 12px;
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 32px rgba(0,0,0,0.08);
    --shadow-hover: 0 20px 48px rgba(0,0,0,0.12);
    --transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; display: block; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* ── 按钮 ── */
.btn-primary, .btn-secondary {
    display: inline-block; border: none; cursor: pointer;
    font-size: 15px; font-weight: 600; border-radius: 999px;
    padding: 12px 28px; transition: var(--transition); letter-spacing: 0.01em;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(42,125,225,0.3); }
.btn-secondary { background: var(--text-main); color: #fff; }
.btn-secondary:hover { background: #333; }

/* ── 页头 ── */
.site-header {
    position: sticky; top: 0; z-index: 1000; width: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.nav-container {
    max-width: 1400px; margin: 0 auto; padding: 0 40px;
    height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.site-header .logo { display: flex; align-items: center; }
.site-header .logo img {
    height: 42px; width: auto;
    filter: brightness(0) invert(1); opacity: 0.9;
    transition: opacity 0.3s;
}
.site-header .logo img:hover { opacity: 1; }
.nav-links { display: flex; gap: 40px; }
.nav-links a { color: rgba(255,255,255,0.8); font-size: 0.9rem; font-weight: 400; }
.nav-links a:hover, .nav-links a.active { color: #fff; }
/* 与官网右侧语言下拉框等宽的占位，使导航文字位置对齐官网 */
.nav-lang-spacer { display: block; width: 92px; flex-shrink: 0; }

/* ── flash 提示 ── */
.flash-wrap { max-width: 720px; margin: 18px auto 0; padding: 0 24px; }
.flash { padding: 12px 18px; border-radius: 8px; margin-bottom: 10px; font-size: 15px; }
.flash-success { background: #e7f3ff; color: #1e6bd6; border: 1px solid #b9dcff; }
.flash-error { background: #fdecec; color: #c0392b; border: 1px solid #f5c6cb; }

.site-main { min-height: 60vh; }

/* ── 博客 Hero（亮色大气版） ── */
.blog-hero {
    background: var(--bg-soft);
    padding: 88px 0 72px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

/* 右上角装饰圆 */
.blog-hero::before {
    content: '';
    position: absolute;
    top: -120px; right: -120px;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(42,125,225,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.blog-hero::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -80px;
    width: 280px; height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(42,125,225,0.05) 0%, transparent 70%);
    pointer-events: none;
}

.blog-hero-eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--blue);
    background: rgba(42,125,225,0.08);
    border: 1px solid rgba(42,125,225,0.2);
    padding: 5px 14px; border-radius: 999px;
    margin-bottom: 22px;
    position: relative; z-index: 1;
}

.blog-hero h1 {
    font-size: 56px; font-weight: 800;
    letter-spacing: -0.03em; color: var(--text-main);
    position: relative; z-index: 1;
    line-height: 1.1;
}

.blog-hero .lead {
    color: var(--text-light); font-size: 18px;
    margin: 16px auto 0; max-width: 500px;
    position: relative; z-index: 1;
    line-height: 1.65;
}

/* ── 分类筛选 ── */
.category-filter {
    display: flex; flex-wrap: wrap; gap: 8px;
    justify-content: center; margin: 44px 0 8px;
}
.category-filter a {
    padding: 7px 18px; border-radius: 999px;
    font-size: 13px; font-weight: 500;
    background: transparent; color: var(--text-light);
    border: 1.5px solid var(--border);
    transition: var(--transition); letter-spacing: 0.02em;
}
.category-filter a:hover {
    border-color: var(--blue); color: var(--blue);
    background: rgba(42,125,225,0.05);
}
.category-filter a.active {
    background: var(--blue); color: #fff;
    border-color: var(--blue);
    box-shadow: 0 4px 14px rgba(42,125,225,0.25);
}
.filter-note { text-align: center; color: var(--text-muted); margin: 10px 0; font-size: 14px; }

/* ── 文章卡片网格 ── */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px; margin: 36px 0 80px;
}

.post-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex; flex-direction: column;
}
.post-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.post-card-cover {
    display: block; aspect-ratio: 16 / 9;
    background: var(--bg-soft); overflow: hidden;
}
.post-card-cover .cover-img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}
.post-card:hover .cover-img { transform: scale(1.04); }

.cover-placeholder {
    display: flex; align-items: center; justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #eef2f8 0%, #dce8f8 100%);
    color: rgba(42,125,225,0.25);
    font-weight: 800; font-size: 26px; letter-spacing: 0.12em;
}

.post-card-body {
    padding: 20px 22px 24px;
    display: flex; flex-direction: column; gap: 8px; flex: 1;
}

.post-tag {
    align-self: flex-start; font-size: 11px; font-weight: 600;
    color: var(--blue); background: rgba(42,125,225,0.08);
    border: 1px solid rgba(42,125,225,0.15);
    padding: 3px 10px; border-radius: 6px;
    letter-spacing: 0.04em; text-transform: uppercase;
}

.post-card-body h2 {
    font-size: 18px; font-weight: 700; line-height: 1.35;
    color: var(--text-main); margin-top: 2px;
}
.post-card-body h2 a:hover { color: var(--blue); }

.post-excerpt { color: var(--text-light); font-size: 14px; line-height: 1.6; }
.post-date { color: var(--text-muted); font-size: 12px; margin-top: 4px; letter-spacing: 0.02em; }
.empty-state { grid-column: 1 / -1; text-align: center; color: var(--text-muted); padding: 40px 0; }

/* ── 文章详情 ── */
.article { padding-bottom: 40px; }
.breadcrumb { padding-top: 34px; color: var(--text-muted); font-size: 14px; }
.breadcrumb a:hover { color: var(--blue); }
.article-header { padding-top: 22px; }
.article-header h1 {
    font-size: 42px; font-weight: 800; line-height: 1.15;
    letter-spacing: -0.02em; color: var(--text-main);
}
.article-meta {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 12px; margin-top: 18px; color: var(--text-muted); font-size: 14px;
}
.article-cover { max-width: 1000px; margin: 34px auto 0; padding: 0 24px; }
.article-cover .cover-img {
    width: 100%; aspect-ratio: 2 / 1; height: auto;
    object-fit: cover; border-radius: var(--radius); display: block;
}

.article-body { font-size: 18px; line-height: 1.75; color: var(--text-main); padding-top: 36px; }
.article-body p { margin: 0 0 22px; }
.article-body .body-heading { font-weight: 700; line-height: 1.3; margin: 40px 0 16px; }
.article-body h2.body-heading { font-size: 28px; }
.article-body h3.body-heading { font-size: 22px; }
.article-body a { color: var(--blue); }
.article-body a:hover { text-decoration: underline; }
.article-body ul, .article-body ol { margin: 0 0 22px 22px; }
.article-body li { margin-bottom: 8px; }
.article-body .body-image { margin: 30px 0; }
.article-body .body-img { border-radius: 10px; width: 100%; }
.article-body figcaption { color: var(--text-muted); font-size: 14px; text-align: center; margin-top: 10px; }
.article-body .body-quote {
    border-left: 3px solid var(--blue); padding: 4px 0 4px 22px;
    margin: 28px 0; color: var(--text-light); font-size: 19px;
    font-style: italic;
}
.article-body .body-quote cite { display: block; margin-top: 10px; font-size: 15px; color: var(--text-muted); font-style: normal; }

/* ── 文末 CTA ── */
.cta-block {
    background: var(--bg-soft); border: 1px solid var(--border);
    border-radius: 16px; text-align: center;
    padding: 64px 0; margin-top: 64px;
}
.cta-block h2 { font-size: 28px; font-weight: 700; margin-bottom: 22px; }

/* ── 询盘 & 评论表单 ── */
.inquiry-block { padding: 52px 0; }
.inquiry-block h3, .comments-block h3, .related h3 {
    font-size: 24px; font-weight: 700; margin-bottom: 8px;
}
.inquiry-block > .container-narrow > p { color: var(--text-light); margin-bottom: 22px; }
.inquiry-form, .comment-form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.form-row { display: flex; gap: 14px; }
.form-row > * { flex: 1; }
input[type=text], input[type=email], textarea {
    width: 100%; font-family: inherit; font-size: 15px;
    color: var(--text-main); padding: 12px 16px;
    border: 1.5px solid var(--border); border-radius: 10px; background: #fff;
}
input:focus, textarea:focus {
    outline: none; border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(42,125,225,0.1);
}
textarea { resize: vertical; }
.hp { display: none !important; }
.form-hint { color: var(--text-muted); font-size: 13px; }
.inquiry-form button, .comment-form button { align-self: flex-start; }

/* ── 评论列表 ── */
.comments-block { padding-bottom: 20px; }
.comment-list { margin: 20px 0 30px; display: flex; flex-direction: column; gap: 16px; }
.comment { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.comment-head { display: flex; gap: 12px; align-items: baseline; margin-bottom: 6px; }
.comment-head time { color: var(--text-muted); font-size: 13px; }

/* ── 相关文章 ── */
.related { padding: 30px 0 60px; }
.related .post-grid { margin-bottom: 0; }

/* ── 页脚 ── */
.site-footer {
    background: #0f1318; color: rgba(255,255,255,0.55);
    padding: 56px 0 0; margin-top: 40px;
}
.footer-grid {
    max-width: 1160px; margin: 0 auto; padding: 0 24px 40px;
    display: grid; grid-template-columns: 2fr 1fr 1fr 1.6fr; gap: 40px;
}
.footer-logo { width: 165px; height: auto; margin-bottom: 18px; }
.footer-brand p { font-size: 14px; color: rgba(255,255,255,0.5); margin-bottom: 8px; }
.footer-tagline { color: rgba(255,255,255,0.3); font-size: 14px; }
.footer-col h5 { color: #fff; font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.footer-col a, .footer-col p { display: block; margin-bottom: 9px; font-size: 14px; color: rgba(255,255,255,0.45); }
.footer-col p a { display: inline; color: rgba(255,255,255,0.6); }   /* 联系方式里的邮箱链接同行显示 */
.footer-col a:hover, .footer-col p a:hover { color: var(--blue); }
/* 二维码 */
.footer-qr img { width: 112px; height: 112px; border-radius: 8px; background: #fff; padding: 5px; }
/* 社交图标 */
/* 社交：竖排「图标 + 文字」，与官网页脚一致 */
.footer-social { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.footer-social a {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 14px; color: rgba(255,255,255,0.55); transition: var(--transition);
}
.footer-social svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.footer-social a[aria-label="YouTube"]:hover { color: #FF0000; }
.footer-social a[aria-label="LinkedIn"]:hover { color: #0A66C2; }
.footer-copyright { border-top: 1px solid rgba(255,255,255,0.08); text-align: center; padding: 22px; font-size: 13px; color: rgba(255,255,255,0.25); }

/* ============================================================
   博客首页：大 Banner + 两栏（竖排卡片 + 侧栏）
   ============================================================ */

/* ── 导航下方大 Banner ── */
.blog-banner {
    position: relative;
    background-size: cover;
    background-position: center 40%;
    padding: 96px 0;
    text-align: center;
}
.blog-banner-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(10,16,24,0.72) 0%, rgba(10,16,24,0.62) 60%, rgba(10,16,24,0.78) 100%);
}
.blog-banner-inner { position: relative; z-index: 1; }
.banner-eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase;
    color: #00e6ff; border: 1px solid rgba(0,230,255,0.35);
    padding: 5px 14px; border-radius: 999px; background: rgba(0,230,255,0.08);
    margin-bottom: 20px;
}
.blog-banner h1 {
    color: #fff; font-size: 56px; font-weight: 800;
    letter-spacing: -0.03em; line-height: 1.1;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.banner-breadcrumb {
    margin-top: 18px; font-size: 14px; color: rgba(255,255,255,0.7);
    display: flex; gap: 10px; justify-content: center;
}
.banner-breadcrumb a { color: rgba(255,255,255,0.7); }
.banner-breadcrumb a:hover { color: #fff; }
.banner-breadcrumb .current { color: #00e6ff; }

/* ── 两栏布局 ── */
.blog-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 48px;
    padding-top: 56px; padding-bottom: 80px;
    align-items: start;
}

/* ── 竖排横向卡片 ── */
.post-list { display: flex; flex-direction: column; gap: 28px; }
.post-row {
    display: flex; align-items: stretch;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-sm); transition: var(--transition);
}
.post-row:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); border-color: transparent; }
.post-row-cover {
    flex: 0 0 300px; align-self: stretch;
    position: relative; overflow: hidden;
    background: var(--bg-soft); min-height: 240px;
}
/* 绝对定位铺满整格，object-fit:cover 居中裁剪，任何比例都填满不留白 */
.post-row-cover .cover-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
    transition: transform 0.5s ease;
}
.post-row:hover .cover-img { transform: scale(1.05); }
.post-row-cat {
    position: absolute; top: 14px; left: 14px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
    color: #fff; background: var(--blue); padding: 5px 12px; border-radius: 6px;
    box-shadow: 0 4px 12px rgba(42,125,225,0.35);
}
.post-row-body { flex: 1 1 auto; min-width: 0; padding: 30px 32px; display: flex; flex-direction: column; }
.post-row-meta-top { color: var(--text-muted); font-size: 13px; letter-spacing: 0.02em; display: flex; gap: 8px; align-items: center; }
.post-row-body h2 { font-size: 24px; font-weight: 700; line-height: 1.3; margin: 12px 0; color: var(--text-main); }
.post-row-body h2 a:hover { color: var(--blue); }
.post-row .post-excerpt { color: var(--text-light); font-size: 15px; line-height: 1.7; margin-bottom: 18px; }
.read-more { margin-top: auto; align-self: flex-start; color: var(--blue); font-weight: 600; font-size: 15px; }
.read-more:hover { gap: 10px; letter-spacing: 0.01em; }

/* ── 右侧栏 ── */
.sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 88px; }
.widget {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 22px 22px 24px;
}
.widget h4 {
    font-size: 15px; font-weight: 700; color: var(--text-main);
    margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
    position: relative;
}
.widget h4::after {
    content: ''; position: absolute; left: 0; bottom: -1px;
    width: 36px; height: 2px; background: var(--blue);
}
/* 搜索 */
.search-form { display: flex; gap: 8px; }
.search-form input { flex: 1; padding: 10px 14px; }
.search-form button {
    border: none; cursor: pointer; background: var(--blue); color: #fff;
    width: 42px; border-radius: 10px; font-size: 18px; transition: var(--transition);
}
.search-form button:hover { background: var(--blue-hover); }
/* 分类列表 */
.widget-cats { list-style: none; }
.widget-cats li { margin-bottom: 2px; }
.widget-cats a {
    display: flex; justify-content: space-between; align-items: center;
    padding: 9px 12px; border-radius: 8px; font-size: 14px;
    color: var(--text-light); transition: var(--transition);
}
.widget-cats a:hover { background: var(--bg-soft); color: var(--blue); }
.widget-cats a.active { background: rgba(42,125,225,0.08); color: var(--blue); font-weight: 600; }
.widget-cats .count {
    font-size: 12px; color: var(--text-muted);
    background: var(--bg-soft); border-radius: 999px; padding: 2px 9px; min-width: 24px; text-align: center;
}
/* 最新文章 */
.widget-recent { display: flex; flex-direction: column; gap: 16px; }
.recent-item { display: flex; gap: 12px; align-items: center; }
.recent-thumb { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--bg-soft); }
.recent-thumb .cover-img { width: 100%; height: 100%; object-fit: cover; }
.recent-thumb-ph { display: flex; align-items: center; justify-content: center; height: 100%; color: rgba(42,125,225,0.3); font-weight: 800; }
.recent-title { display: block; font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--text-main); transition: var(--transition); }
.recent-item:hover .recent-title { color: var(--blue); }
.recent-text time { font-size: 12px; color: var(--text-muted); }
/* 标签云 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-chip {
    font-size: 13px; color: var(--text-light);
    border: 1px solid var(--border); padding: 5px 12px; border-radius: 999px;
    transition: var(--transition);
}
.tag-chip:hover { border-color: var(--blue); color: var(--blue); background: rgba(42,125,225,0.05); }
/* 侧栏 CTA */
.widget-cta { background: linear-gradient(150deg, #10233f 0%, #0d1a2e 100%); border: none; color: #fff; }
.widget-cta h4 { color: #fff; border-color: rgba(255,255,255,0.15); }
.widget-cta h4::after { background: #00e6ff; }
.widget-cta p { color: rgba(255,255,255,0.7); font-size: 14px; line-height: 1.6; margin-bottom: 18px; }
.widget-cta .btn-primary { width: 100%; text-align: center; }

/* ============================================================
   搜索结果页
   ============================================================ */
.search-hero {
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    padding: 64px 0 56px;
    text-align: center;
}
.banner-eyebrow.light {
    color: var(--blue); border-color: rgba(42,125,225,0.25);
    background: rgba(42,125,225,0.06);
}
.search-hero h1 {
    font-size: 40px; font-weight: 800; letter-spacing: -0.02em;
    color: var(--text-main); margin: 18px 0 26px;
}
/* 收窄、居中的搜索框 */
.search-hero-form {
    display: flex; gap: 10px;
    max-width: 520px; margin: 0 auto;
}
.search-hero-form input {
    flex: 1; padding: 13px 18px; font-size: 15px;
    border: 1.5px solid var(--border); border-radius: 999px; background: #fff;
}
.search-hero-form input:focus {
    outline: none; border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(42,125,225,0.1);
}
.search-hero-form button {
    border: none; cursor: pointer; background: var(--blue); color: #fff;
    font-size: 15px; font-weight: 600; padding: 0 28px; border-radius: 999px;
    transition: var(--transition);
}
.search-hero-form button:hover { background: var(--blue-hover); }
.search-summary { margin-top: 20px; color: var(--text-light); font-size: 15px; }

.search-results-wrap { padding-top: 48px; padding-bottom: 80px; max-width: 860px; }

/* 分页 */
.pagination {
    display: flex; align-items: center; justify-content: center; gap: 20px;
    margin-top: 44px;
}
.pagination a {
    padding: 9px 20px; border: 1.5px solid var(--border); border-radius: 999px;
    font-size: 14px; font-weight: 600; color: var(--text-light); transition: var(--transition);
}
.pagination a:hover { border-color: var(--blue); color: var(--blue); }
.page-info { color: var(--text-muted); font-size: 14px; }

/* 空状态 */
.search-empty { text-align: center; padding: 60px 20px; }
.search-empty-icon { font-size: 40px; margin-bottom: 12px; }
.search-empty h3 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.search-empty p { color: var(--text-light); margin-bottom: 22px; }

/* ── 响应式 ── */
@media (max-width: 980px) {
    .blog-layout { grid-template-columns: 1fr; gap: 40px; }
    .sidebar { position: static; }
    .post-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .nav-container { padding: 0 20px; }
    .nav-links { gap: 18px; }
    .nav-links a { font-size: 14px; }
    .blog-banner { padding: 64px 0; }
    .blog-banner h1 { font-size: 36px; }
    .blog-hero { padding: 64px 0 52px; }
    .blog-hero h1 { font-size: 36px; }
    .post-row { flex-direction: column; }
    .post-row-cover { flex-basis: auto; width: 100%; min-height: 0; aspect-ratio: 16/9; }
    .post-row-body { padding: 22px 22px 26px; }
    .post-row-body h2 { font-size: 21px; }
    .article-header h1 { font-size: 30px; }
    .article-body { font-size: 17px; }
    .post-grid { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
