/* 深蓝CMS — default 主题。品牌色取「深蓝」。 */
:root {
    --navy-900: #0b1f3a;
    --navy-800: #112a4d;
    --navy-700: #16386a;
    --navy-600: #1d4e8a;
    --blue-500: #2563eb;
    --blue-400: #3b82f6;
    --blue-100: #dbeafe;
    --ink: #1a2433;
    --muted: #5b6b80;
    --line: #e6ebf2;
    --surface: #ffffff;
    --bg: #f5f7fb;

    --container: 1160px;
    --radius: 12px;
    --shadow-sm: 0 1px 2px rgba(11, 31, 58, .06), 0 1px 3px rgba(11, 31, 58, .08);
    --shadow-md: 0 6px 24px rgba(11, 31, 58, .10);
    --space-section: clamp(2.5rem, 1.5rem + 4vw, 5rem);
    --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: clamp(1rem, .5rem + 2vw, 2rem);
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 2rem; height: 66px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; }
.brand-mark {
    display: grid; place-items: center;
    width: 34px; height: 34px; border-radius: 9px;
    background: linear-gradient(135deg, var(--navy-700), var(--blue-500));
    color: #fff; font-size: .82rem; letter-spacing: .02em;
}
.brand-text { font-size: 1.05rem; color: var(--navy-800); }

.nav-main { display: flex; gap: .35rem; margin-left: auto; }
.nav-item { position: relative; }
.nav-item > a {
    display: block; padding: .5rem .9rem; border-radius: 8px;
    color: var(--muted); font-weight: 500;
    transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-item > a:hover { color: var(--navy-800); background: var(--blue-100); }
.nav-item.is-active > a { color: var(--blue-500); }
.submenu {
    position: absolute; top: 100%; left: 0; min-width: 160px;
    list-style: none; margin: .4rem 0 0; padding: .4rem;
    background: #fff; border: 1px solid var(--line); border-radius: 10px;
    box-shadow: var(--shadow-md);
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: all .2s var(--ease);
}
.nav-item:hover .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu a { display: block; padding: .5rem .7rem; border-radius: 7px; color: var(--muted); }
.submenu a:hover { background: var(--bg); color: var(--navy-800); }
.header-phone { font-weight: 700; color: var(--blue-500); }

/* ---------- Hero ---------- */
.hero { position: relative; height: clamp(280px, 38vw, 520px); background: var(--navy-900); }
.hero-slide {
    position: absolute; inset: 0; display: grid; align-items: end;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity .8s var(--ease);
}
.hero-slide.is-active { opacity: 1; }
.hero-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(11,31,58,.7), transparent 60%); }
.hero-caption {
    position: relative; z-index: 1; color: #fff;
    font-size: clamp(1.4rem, 1rem + 2vw, 2.6rem); font-weight: 700;
    padding: clamp(1.5rem, 4vw, 3.5rem);
    text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}

/* ---------- Sections ---------- */
.section { padding-block: var(--space-section); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.8rem; }
.section-head h2 { margin: 0; font-size: clamp(1.4rem, 1rem + 1.5vw, 2rem); color: var(--navy-800); }
.section-head h2::before {
    content: ""; display: inline-block; width: 4px; height: 1em;
    margin-right: .6rem; vertical-align: -2px;
    background: var(--blue-500); border-radius: 2px;
}
.more { color: var(--blue-500); font-weight: 600; }

/* ---------- Card grid ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.4rem; }
.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow-sm);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card img { aspect-ratio: 16 / 9; object-fit: cover; }
.card-body { padding: 1rem 1.1rem 1.2rem; }
.card-body time { font-size: .8rem; color: var(--blue-500); font-weight: 600; }
.card-body h3 { margin: .35rem 0 .4rem; font-size: 1.05rem; color: var(--navy-800); }
.card-body p { margin: 0; color: var(--muted); font-size: .92rem; }

/* ---------- Breadcrumb / page head ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; gap: .4rem; padding-block: 1.4rem; font-size: .88rem; color: var(--muted); }
.breadcrumb a:not(:last-child)::after { content: "/"; margin-left: .4rem; color: var(--line); }
.breadcrumb a:last-child { color: var(--navy-800); }
.page-head { margin-bottom: 1.6rem; }
.page-head h1 { margin: 0 0 .4rem; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); color: var(--navy-900); }
.lead { color: var(--muted); margin: 0; }

/* ---------- Content list ---------- */
.content-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.content-list-item a {
    display: grid; grid-template-columns: 200px 1fr; gap: 1.2rem;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1rem; box-shadow: var(--shadow-sm);
    transition: box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.content-list-item a:hover { box-shadow: var(--shadow-md); border-color: var(--blue-400); }
.content-list-item img { aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; }
.content-list-text h3 { margin: 0 0 .4rem; color: var(--navy-800); }
.content-list-text p { margin: 0 0 .6rem; color: var(--muted); }
.content-list-text time { font-size: .82rem; color: var(--blue-500); }
.empty { color: var(--muted); padding: 2rem 0; }

/* ---------- Post / prose ---------- */
.post, .page { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 1rem + 2vw, 3rem); margin-bottom: 3rem; box-shadow: var(--shadow-sm); }
.post-head h1 { margin: 0 0 .6rem; color: var(--navy-900); font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); }
.post-meta { display: flex; flex-wrap: wrap; gap: 1rem; color: var(--muted); font-size: .85rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); margin-bottom: 1.6rem; }
.post-cover { width: 100%; border-radius: 10px; margin-bottom: 1.6rem; object-fit: cover; }
.prose { color: #2c3a4f; }
.prose :is(h2, h3) { color: var(--navy-800); margin-top: 1.6em; }
.prose p { margin: 0 0 1em; }
.prose img { border-radius: 8px; margin: 1.2em 0; }
.prose a { color: var(--blue-500); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Pagination ---------- */
.pagination { margin: 2rem 0 3rem; }
.pagination a, .pagination span { display: inline-block; padding: .45rem .8rem; margin: 0 .15rem; border-radius: 8px; color: var(--muted); }
.pagination a:hover { background: var(--blue-100); color: var(--navy-800); }

/* ---------- Contact form ---------- */
.contact-section { margin-top: 2.4rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.contact-form { display: grid; gap: .9rem; max-width: 560px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.contact-form input, .contact-form textarea {
    width: 100%; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 9px;
    font: inherit; background: var(--bg); transition: border-color .2s var(--ease), background .2s var(--ease);
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--blue-400); background: #fff; box-shadow: 0 0 0 3px var(--blue-100); }
.contact-form .hp { position: absolute; left: -9999px; }
.form-error { color: #dc2626; font-size: .85rem; margin: 0; }
.btn { display: inline-block; padding: .7rem 1.5rem; border: none; border-radius: 9px; font: inherit; font-weight: 600; cursor: pointer; }
.btn-primary { background: var(--blue-500); color: #fff; transition: background .2s var(--ease), transform .1s var(--ease); }
.btn-primary:hover { background: var(--navy-700); }
.btn-primary:active { transform: translateY(1px); }

/* ---------- Footer ---------- */
.site-footer { margin-top: var(--space-section); background: var(--navy-900); color: #aebfd6; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; padding-block: 2.6rem; }
.footer-name { display: block; color: #fff; font-size: 1.1rem; margin-bottom: .6rem; }
.footer-brand p { margin: .2rem 0; font-size: .9rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.2rem; align-content: flex-start; }
.footer-nav a { color: #aebfd6; transition: color .2s var(--ease); }
.footer-nav a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); }
.footer-bottom .container { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; padding-block: 1.1rem; font-size: .82rem; }
.footer-bottom a { color: #8aa0c0; }

/* ---------- Toast ---------- */
.toast {
    position: fixed; left: 50%; bottom: 2rem; transform: translateX(-50%);
    background: var(--navy-800); color: #fff; padding: .8rem 1.4rem; border-radius: 10px;
    box-shadow: var(--shadow-md); z-index: 100; animation: toast-in .3s var(--ease);
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .nav-main { display: none; }
    .content-list-item a { grid-template-columns: 1fr; }
    .content-list-item img { aspect-ratio: 16 / 9; }
    .field-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}
