/*
Theme Name: 智讯前沿
Theme URI: https://ai.perceptleap.com
Author: AI News Editorial
Description: 面向中文 AI 资讯、深度分析与行业观察的轻量资讯主题，兼容 Elementor。
Version: 1.0.0
Text Domain: ai-news
*/

:root {
  --ink: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #f6f8fc;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --navy: #061735;
  --white: #fff;
  --radius: 18px;
  --shadow: 0 14px 40px rgba(15, 23, 42, .08);
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--white); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; line-height: 1.7; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
.wrap { width: min(calc(100% - 40px), var(--wrap)); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.topline { background: #031127; color: #b9c8e3; font-size: 13px; }
.topline .wrap { min-height: 34px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.live-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #34d399; margin-right: 7px; box-shadow: 0 0 0 4px rgba(52,211,153,.13); }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); border-bottom: 1px solid rgba(226,232,240,.85); backdrop-filter: blur(14px); }
.nav-row { min-height: 72px; display: flex; align-items: center; gap: 34px; }
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: white; font-weight: 800; letter-spacing: -2px; background: linear-gradient(135deg,#4f46e5,#0ea5e9); box-shadow: 0 7px 20px rgba(37,99,235,.25); }
.brand-name { display: block; font-size: 20px; font-weight: 800; line-height: 1.1; letter-spacing: -.5px; }
.brand-tag { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; letter-spacing: 1.6px; }
.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; align-items: center; gap: 26px; margin: 0; padding: 0; list-style: none; }
.primary-nav a { font-size: 15px; font-weight: 600; transition: color .2s; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { color: var(--brand); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.search-form { display: flex; height: 38px; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.search-form input { width: 145px; border: 0; outline: 0; padding: 0 4px 0 14px; background: transparent; font: inherit; font-size: 13px; }
.search-form button { border: 0; background: transparent; color: var(--muted); padding: 0 12px; cursor: pointer; }
.menu-toggle { display: none; border: 0; background: #eef2ff; width: 40px; height: 40px; border-radius: 10px; color: var(--navy); font-size: 20px; }

.hero { position: relative; min-height: 520px; display: grid; align-items: center; overflow: hidden; color: #fff; background: #051634 center/cover no-repeat; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg,rgba(2,10,28,.94) 0%,rgba(2,10,28,.72) 43%,rgba(2,10,28,.08) 78%); }
.hero-content { position: relative; z-index: 1; width: min(680px, 62%); padding: 80px 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; color: #a5c7ff; font-size: 13px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: #60a5fa; }
.hero h1 { margin: 0 0 20px; max-width: 650px; font-size: clamp(40px,5vw,68px); line-height: 1.12; letter-spacing: -2.5px; }
.hero p { max-width: 590px; margin: 0 0 32px; color: #cbd7eb; font-size: 18px; line-height: 1.8; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border: 0; border-radius: 11px; color: #fff; background: var(--brand); font-weight: 700; cursor: pointer; transition: transform .2s,background .2s; }
.button:hover { transform: translateY(-2px); background: var(--brand-dark); }
.button.secondary { margin-left: 10px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); }

.channel-strip { border-bottom: 1px solid var(--line); background: #fff; }
.channel-list { display: grid; grid-template-columns: repeat(6,1fr); }
.channel { padding: 22px 16px; border-right: 1px solid var(--line); text-align: center; transition: background .2s; }
.channel:first-child { border-left: 1px solid var(--line); }
.channel:hover { background: #f8faff; }
.channel strong { display: block; font-size: 15px; }
.channel span { color: var(--muted); font-size: 11px; }

.section { padding: 72px 0; }
.section.alt { background: var(--surface); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-head h2 { margin: 0; font-size: 30px; letter-spacing: -1px; }
.section-head p { margin: 6px 0 0; color: var(--muted); }
.section-link { color: var(--brand); font-size: 14px; font-weight: 700; }
.featured-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; }
.lead-card { min-height: 440px; position: relative; display: flex; align-items: end; overflow: hidden; border-radius: var(--radius); color: #fff; background: linear-gradient(135deg,#172554,#312e81); box-shadow: var(--shadow); }
.lead-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lead-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg,rgba(2,6,23,.94),rgba(2,6,23,.05) 78%); }
.lead-content { position: relative; z-index: 1; padding: 32px; }
.lead-content h3 { margin: 8px 0 10px; font-size: 29px; line-height: 1.35; }
.post-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.side-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.post-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; transition: transform .2s, box-shadow .2s; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-visual { aspect-ratio: 16/9; display: grid; place-items: center; overflow: hidden; color: rgba(255,255,255,.9); background: linear-gradient(135deg,#172554,#4f46e5 55%,#0ea5e9); font-weight: 800; font-size: 38px; }
.card-visual img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 20px; }
.side-grid .card-body { padding: 16px; }
.post-card h3 { margin: 7px 0 10px; font-size: 18px; line-height: 1.5; }
.side-grid .post-card h3 { font-size: 15px; }
.post-card p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; color: var(--muted); font-size: 12px; }
.category-pill { display: inline-flex; color: var(--brand); font-size: 12px; font-weight: 700; }
.newsletter { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; padding: 46px; border-radius: 24px; color: #fff; background: linear-gradient(120deg,#071a3b,#1e3a8a 60%,#3730a3); }
.newsletter h2 { margin: 0 0 10px; font-size: 30px; }
.newsletter p { margin: 0; color: #cbd7eb; }
.newsletter-actions { text-align: right; }

.content-header { padding: 64px 0 42px; background: linear-gradient(180deg,#f5f8ff,#fff); border-bottom: 1px solid var(--line); }
.content-header h1 { margin: 0; font-size: clamp(34px,5vw,52px); letter-spacing: -1.5px; }
.content-header p { max-width: 720px; margin: 12px 0 0; color: var(--muted); }
.archive-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 48px; }
.sidebar-box { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.sidebar-box + .sidebar-box { margin-top: 20px; }
.sidebar-box h3 { margin: 0 0 14px; font-size: 16px; }
.sidebar-box ul { margin: 0; padding: 0; list-style: none; }
.sidebar-box li + li { margin-top: 9px; }
.sidebar-box a { color: var(--muted); font-size: 14px; }

.article { width: min(calc(100% - 40px), 820px); margin: 0 auto; padding: 64px 0 80px; }
.article h1 { margin: 10px 0 20px; font-size: clamp(34px,5vw,52px); line-height: 1.25; letter-spacing: -1.6px; }
.article-cover { margin: 34px 0; overflow: hidden; border-radius: 20px; }
.article-content { font-size: 17px; }
.article-content h2 { margin: 2.2em 0 .7em; font-size: 28px; }
.article-content h3 { margin: 1.8em 0 .6em; font-size: 22px; }
.article-content p { margin: 0 0 1.4em; }
.article-content blockquote { margin: 28px 0; padding: 18px 24px; border-left: 4px solid var(--brand); background: #eff6ff; }
.article-content a { color: var(--brand); text-decoration: underline; }
.article-content ul { padding-left: 1.3em; }
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 32px; }
.tag-list a { padding: 5px 10px; border-radius: 999px; color: var(--muted); background: var(--surface); font-size: 12px; }

.page-content { width: min(calc(100% - 40px), 900px); margin: 0 auto; padding: 64px 0 90px; }
.page-content h1 { margin-top: 0; font-size: 44px; }
.submit-form { margin-top: 34px; padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.field { margin-bottom: 19px; }
.field label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 700; }
.field input,.field select,.field textarea { width: 100%; padding: 12px 14px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; font: inherit; }
.field textarea { min-height: 220px; resize: vertical; }
.notice { margin: 20px 0; padding: 13px 16px; border-radius: 10px; background: #dcfce7; color: #166534; }
.pagination { margin-top: 36px; }
.pagination .nav-links { display: flex; gap: 8px; }
.pagination a,.pagination span { min-width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; }
.pagination .current { color: white; border-color: var(--brand); background: var(--brand); }

.site-footer { padding: 54px 0 24px; color: #9fb0ca; background: #031127; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 50px; padding-bottom: 38px; }
.site-footer .brand-name { color: #fff; }
.footer-about { max-width: 430px; margin-top: 16px; }
.site-footer h3 { margin: 0 0 14px; color: #fff; font-size: 15px; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li + li { margin-top: 8px; }
.site-footer a:hover { color: #fff; }
.copyright { padding-top: 22px; border-top: 1px solid rgba(148,163,184,.16); font-size: 12px; }

@media (max-width: 960px) {
  .menu-toggle { display: block; }
  .primary-nav { display: none; position: absolute; top: 106px; left: 0; right: 0; padding: 22px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .primary-nav.open { display: block; }
  .primary-nav ul { align-items: stretch; flex-direction: column; gap: 14px; }
  .nav-actions .search-form { display: none; }
  .hero-content { width: 75%; }
  .channel-list { grid-template-columns: repeat(3,1fr); }
  .featured-grid,.archive-layout { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: repeat(2,1fr); }
  .archive-layout aside { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .sidebar-box + .sidebar-box { margin-top: 0; }
}

@media (max-width: 640px) {
  .wrap { width: min(calc(100% - 28px), var(--wrap)); }
  .topline .wrap span:last-child,.brand-tag { display: none; }
  .nav-row { min-height: 64px; gap: 10px; }
  .nav-actions { margin-left: auto; }
  .hero { min-height: 540px; background-position: 62% center; }
  .hero::after { background: rgba(2,10,28,.72); }
  .hero-content { width: 100%; padding: 64px 0; }
  .hero h1 { font-size: 40px; }
  .hero p { font-size: 16px; }
  .button.secondary { margin: 10px 0 0; }
  .channel-list { grid-template-columns: repeat(2,1fr); }
  .section { padding: 50px 0; }
  .section-head { align-items: start; flex-direction: column; }
  .featured-grid,.post-grid,.side-grid,.newsletter,.footer-grid,.archive-layout aside { grid-template-columns: 1fr; }
  .newsletter { padding: 28px; }
  .newsletter-actions { text-align: left; }
  .lead-card { min-height: 380px; }
  .lead-content { padding: 24px; }
  .lead-content h3 { font-size: 23px; }
  .article { padding-top: 42px; }
  .page-content h1 { font-size: 36px; }
}
