/*
Theme Name: FenDi Pharma Molecular Glue CRO
Theme URI: https://www.fendipharma.com/
Author: FenDi Pharma CRO
Description: 分迪药业分子胶 / 靶向蛋白降解 CRO 转型官网主题。使用 WordPress 原生页面、文章、分类目录和标签，不包含自定义文章类型或额外内容模块。
Version: 1.0.2
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: fendi-mg-cro
*/

:root {
  --ink: #0b1220;
  --muted: #5c667a;
  --muted-2: #7a8495;
  --line: #dbe4ef;
  --line-soft: rgba(219, 228, 239, .7);
  --paper: #ffffff;
  --paper-soft: #f7fafc;
  --paper-blue: #eef7ff;
  --brand: #0d6e7a;
  --brand-dark: #07505a;
  --brand-2: #174ea6;
  --accent: #c5852a;
  --accent-soft: #fff3df;
  --success: #138a62;
  --danger: #a64242;
  --radius-lg: 8px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --shadow-sm: 0 10px 25px rgba(16, 24, 40, .07);
  --shadow-md: 0 24px 70px rgba(16, 24, 40, .12);
  --container: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand-2); text-decoration: none; transition: color .18s ease, background .18s ease, border .18s ease, transform .18s ease; }
a:hover { color: var(--brand); }
img { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
.container { width: min(var(--container), calc(100% - 40px)); margin-inline: auto; }
.screen-reader-text, .skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  left: 20px; top: 20px; z-index: 9999; width: auto; height: auto; padding: 10px 14px; background: var(--ink); color: #fff; border-radius: 10px;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(219,228,239,.8);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 78px; gap: 18px; }
.site-branding { display: flex; align-items: center; gap: 14px; min-width: 220px; flex: 0 0 auto; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 8px;
  background: radial-gradient(circle at 35% 30%, #f6d59e 0 16%, transparent 17%), linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 14px 35px rgba(13,110,122,.25);
  position: relative; flex: 0 0 auto;
}
.brand-mark:before, .brand-mark:after { content:""; position: absolute; border-radius: 999px; background: rgba(255,255,255,.85); }
.brand-mark:before { width: 18px; height: 4px; left: 11px; top: 22px; transform: rotate(35deg); }
.brand-mark:after { width: 6px; height: 6px; right: 10px; bottom: 11px; }
.site-title { margin: 0; font-size: 18px; line-height: 1.15; font-weight: 760; letter-spacing: 0; }
.site-title a { color: var(--ink); }
.site-tagline { margin: 2px 0 0; font-size: 12px; color: var(--muted); letter-spacing: 0; text-transform: uppercase; }
.custom-logo { max-height: 44px; width: auto; }
.nav-toggle { display: none; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 9px 12px; border-radius: 8px; white-space: nowrap; flex: 0 0 auto; }
.primary-navigation { flex: 1 1 auto; min-width: 0; display: flex; justify-content: flex-end; }
.primary-navigation ul { list-style: none; padding: 0; margin: 0; }
.primary-navigation .menu { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.primary-navigation .menu > li { position: relative; flex: 0 0 auto; }
.primary-navigation a { display: block; color: #233044; padding: 10px 11px; border-radius: 999px; font-size: 13px; font-weight: 680; line-height: 1.2; white-space: nowrap; }
.primary-navigation .menu-item-has-children > a { padding-right: 27px; position: relative; }
.primary-navigation .menu-item-has-children > a:after {
  content: ""; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-62%) rotate(45deg); opacity: .72;
}
.primary-navigation a:hover, .primary-navigation .current-menu-item > a, .primary-navigation .current-menu-ancestor > a { background: var(--paper-blue); color: var(--brand-dark); }
.primary-navigation .sub-menu {
  position: absolute; top: calc(100% + 12px); left: 0; z-index: 1200;
  display: grid; grid-template-columns: repeat(2, minmax(210px, 1fr)); gap: 4px;
  width: 470px; padding: 12px; background: rgba(255,255,255,.98);
  border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}
.primary-navigation .sub-menu:before {
  content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px;
}
.primary-navigation .menu-item-has-children:hover > .sub-menu,
.primary-navigation .menu-item-has-children:focus-within > .sub-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.primary-navigation .sub-menu a {
  border-radius: 10px; padding: 10px 11px; font-size: 13px; line-height: 1.3;
  white-space: normal;
}
.header-cta { display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; box-shadow: var(--shadow-sm); white-space: nowrap; }
.header-cta:hover { color: #fff; background: var(--brand-dark); transform: translateY(-1px); }

/* Reusable */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--brand-dark); background: rgba(13,110,122,.09); border: 1px solid rgba(13,110,122,.16); padding: 7px 12px; border-radius: 999px; font-weight: 760; font-size: 13px; letter-spacing: 0; }
.eyebrow:before { content:""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(197,133,42,.16); }
.section { padding: 80px 0; }
.section.compact { padding: 56px 0; }
.section-soft { background: linear-gradient(180deg, #f7fafc 0%, #fff 100%); }
.section-blue { background: linear-gradient(180deg, #f2f8ff, #fff); }
.section-header { max-width: 760px; margin-bottom: 34px; }
.section-header.center { text-align: center; margin-inline: auto; }
.section-header h2 { margin: 12px 0 10px; font-size: clamp(28px, 4vw, 44px); line-height: 1.17; letter-spacing: 0; }
.section-header p { margin: 0; color: var(--muted); font-size: 18px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 12px 18px; border-radius: 999px; font-weight: 760; border: 1px solid transparent; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 16px 36px rgba(13,110,122,.22); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; transform: translateY(-1px); }
.btn-secondary { color: var(--brand-dark); background: #fff; border-color: rgba(13,110,122,.22); }
.btn-secondary:hover { border-color: var(--brand); background: var(--paper-blue); }
.btn-ghost { color: var(--ink); background: var(--paper-soft); border-color: var(--line); }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.card-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.card {
  background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--radius-md);
  padding: 24px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.card:after { display: none; }
.card-kicker { color: var(--accent); font-weight: 820; font-size: 13px; letter-spacing: 0; text-transform: uppercase; }
.card h3 { margin: 8px 0 8px; font-size: 22px; line-height: 1.25; }
.card p { margin: 0 0 16px; color: var(--muted); }
.card-link { font-weight: 760; color: var(--brand-dark); }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 14px 0 0; list-style: none; }
.pill-list li { background: #f2f6fb; color: #334155; border: 1px solid var(--line-soft); padding: 6px 10px; border-radius: 999px; font-size: 13px; }

/* Home */
.hero-section { padding: 84px 0 62px; background: linear-gradient(180deg, #f8fbff 0%, #fff 78%); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); gap: 44px; align-items: center; }
.hero-copy h1 { margin: 16px 0 18px; font-size: clamp(42px, 6.2vw, 72px); line-height: 1.03; letter-spacing: 0; }
.hero-copy .lead { font-size: 20px; color: #3b4658; max-width: 740px; margin: 0 0 28px; }
.hero-actions { margin: 0 0 28px; }
.hero-metrics { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.metric { background: rgba(255,255,255,.75); border: 1px solid rgba(219,228,239,.9); border-radius: 8px; padding: 16px; box-shadow: 0 14px 35px rgba(16,24,40,.05); }
.metric strong { display: block; font-size: 18px; line-height: 1.2; }
.metric span { display: block; color: var(--muted); font-size: 13px; margin-top: 5px; line-height: 1.55; }
.hero-visual { position: relative; }
.visual-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 26px; box-shadow: var(--shadow-md); }
.visual-card img { display: block; width: 100%; }
.visual-badge { position: absolute; left: -18px; bottom: 26px; max-width: 230px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-md); border-radius: 8px; padding: 16px; }
.visual-badge strong { display: block; color: var(--brand-dark); }
.visual-badge span { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.architecture-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.service-card { min-height: 255px; display: flex; flex-direction: column; }
.service-card .card-link { margin-top: auto; }
.product-table { width: 100%; border-collapse: collapse; overflow: hidden; border-radius: 8px; background: #fff; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.product-table th, .product-table td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.product-table th { background: #f2f6fb; color: #263247; font-size: 14px; }
.product-table tr:last-child td { border-bottom: 0; }
.product-code { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; padding: 4px 8px; border-radius: 999px; color: var(--brand-dark); background: rgba(13,110,122,.1); font-weight: 820; font-size: 13px; }
.process { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; counter-reset: step; }
.process-step { position: relative; padding: 22px; border-radius: 8px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.process-step:before { counter-increment: step; content: counter(step); display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; margin-bottom: 12px; }
.process-step h3 { margin: 0 0 6px; font-size: 18px; }
.process-step p { margin: 0; color: var(--muted); font-size: 14px; }
.dual-track { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.dual-card { border-radius: var(--radius-md); padding: 26px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-sm); }
.dual-card strong { display: inline-block; color: var(--accent); font-size: 14px; letter-spacing: 0; text-transform: uppercase; }
.dual-card h3 { margin: 10px 0; font-size: 24px; }
.dual-card p { margin: 0; color: var(--muted); }
.dual-card .card-link { display: inline-flex; margin-top: 16px; font-weight: 780; color: var(--brand-dark); }
.evidence-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.evidence-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #fff, #f8fbff);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.evidence-item span { color: var(--accent); font-size: 12px; font-weight: 820; text-transform: uppercase; letter-spacing: 0; }
.evidence-item h3 { margin: 9px 0 8px; font-size: 21px; line-height: 1.25; }
.evidence-item p { margin: 0; color: var(--muted); font-size: 14px; }

/* Pages and posts */
.page-hero, .archive-hero { padding: 64px 0 40px; background: linear-gradient(180deg, #f7fbff, #fff); border-bottom: 1px solid var(--line-soft); }
.page-hero h1, .archive-hero h1 { margin: 10px 0 10px; font-size: clamp(34px, 5vw, 58px); line-height: 1.08; letter-spacing: 0; }
.page-hero p, .archive-hero p { max-width: 800px; margin: 0; color: var(--muted); font-size: 18px; }
.entry-shell { padding: 56px 0 82px; }
.entry-content { max-width: 900px; margin: 0 auto; }
.entry-content.wide { max-width: 1120px; }
.fendi-content h2 { margin-top: 46px; margin-bottom: 14px; font-size: clamp(26px, 3.2vw, 38px); line-height: 1.2; letter-spacing: 0; }
.fendi-content h3 { margin-top: 28px; margin-bottom: 10px; font-size: 22px; line-height: 1.28; }
.fendi-content p { color: #3e4a5d; }
.fendi-content ul, .fendi-content ol { color: #3e4a5d; padding-left: 1.25em; }
.fendi-content li { margin: 6px 0; }
.fendi-content .lead { font-size: 20px; color: #2f3b4f; }
.fendi-content .section-block { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 28px; margin: 24px 0; box-shadow: var(--shadow-sm); }
.fendi-content .note { background: var(--paper-blue); border-left: 4px solid var(--brand); padding: 18px 20px; border-radius: 0 14px 14px 0; color: #27384f; }
.fendi-content .warning { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: 18px 20px; border-radius: 0 14px 14px 0; }
.fendi-content .service-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin: 24px 0; }
.fendi-content .service-mini { border: 1px solid var(--line); border-radius: 8px; padding: 20px; background: #fff; }
.fendi-content .service-mini h3 { margin-top: 0; }
.fendi-content .package-table, .fendi-content table { width: 100%; border-collapse: collapse; margin: 20px 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: table; }
.fendi-content th, .fendi-content td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.fendi-content th { background: #f2f6fb; color: #263247; }
.post-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 14px; margin-top: 8px; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.post-card { display: flex; flex-direction: column; min-height: 260px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 22px; box-shadow: var(--shadow-sm); }
.post-card .post-card-title { margin: 8px 0 10px; font-size: 21px; line-height: 1.28; }
.post-card .post-card-title a { color: var(--ink); }
.post-card .post-card-title a:hover { color: var(--brand-dark); }
.post-card .excerpt { color: var(--muted); margin: 0 0 16px; }
.post-card .read-more { margin-top: auto; font-weight: 760; color: var(--brand-dark); }
.cat-badge { display: inline-flex; width: fit-content; background: rgba(23,78,166,.09); color: var(--brand-2); border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 780; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.tag-list a { padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 13px; }
.nav-links { display: flex; justify-content: space-between; gap: 18px; margin-top: 40px; }
.nav-links a { flex: 1; background: var(--paper-soft); border: 1px solid var(--line); border-radius: 8px; padding: 14px; color: var(--ink); font-weight: 700; }
.pagination { margin-top: 34px; }
.pagination .nav-links { justify-content: center; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 999px; padding: 0 12px; color: var(--ink); }
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }
.search-form { display: flex; gap: 10px; margin-top: 18px; }
.search-form label { flex: 1; }
.search-field { width: 100%; border: 1px solid var(--line); border-radius: 999px; padding: 12px 16px; }
.search-submit { border: 0; background: var(--brand); color: #fff; border-radius: 999px; padding: 12px 18px; font-weight: 760; }
.project-inquiry-form {
  display: grid;
  gap: 18px;
  margin: 24px 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.project-inquiry-form .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.project-inquiry-form label { display: grid; gap: 7px; color: #27384f; font-weight: 720; }
.project-inquiry-form input,
.project-inquiry-form select,
.project-inquiry-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #f8fbff;
  color: var(--ink);
}
.project-inquiry-form textarea { resize: vertical; min-height: 150px; }
.project-inquiry-form fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin: 0;
}
.project-inquiry-form legend { padding: 0 8px; font-weight: 780; color: var(--brand-dark); }
.project-inquiry-form fieldset label { display: inline-flex; align-items: center; gap: 7px; font-weight: 620; color: #3e4a5d; }
.project-inquiry-form fieldset input { width: auto; }
.form-note { margin: 0; color: var(--muted); font-size: 14px; }
.form-success {
  display: grid;
  gap: 4px;
  margin: 20px 0;
  padding: 16px 18px;
  border: 1px solid rgba(19, 138, 98, .25);
  border-left: 4px solid var(--success);
  border-radius: 8px;
  background: rgba(19, 138, 98, .08);
  color: #184d3b;
}
.footer-icp { margin-left: 12px; color: rgba(255,255,255,.48); }

/* Footer */
.site-footer { background: #08111f; color: rgba(255,255,255,.82); }
.footer-cta { padding: 56px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-cta-inner { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.footer-cta h2 { color: #fff; margin: 0 0 8px; font-size: clamp(28px, 4vw, 42px); line-height: 1.15; }
.footer-cta p { margin: 0; color: rgba(255,255,255,.68); }
.footer-cta .btn-primary { background: #fff; color: var(--ink); box-shadow: none; }
.footer-main { padding: 42px 0; display: grid; grid-template-columns: 1.1fr .9fr .9fr; gap: 28px; }
.footer-main h3 { color: #fff; margin: 0 0 12px; font-size: 16px; }
.footer-main p, .footer-main li { color: rgba(255,255,255,.68); }
.footer-main ul { list-style: none; padding: 0; margin: 0; }
.footer-main li + li { margin-top: 8px; }
.footer-main a { color: rgba(255,255,255,.82); }
.footer-main a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; color: rgba(255,255,255,.56); font-size: 13px; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 620px; }
  .hero-metrics, .card-grid, .post-grid, .dual-track, .evidence-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .process { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .header-cta { display: none; }
}
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .primary-navigation { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 12px 20px 20px; display: none; }
  .primary-navigation.is-open { display: block; }
  .primary-navigation .menu { flex-direction: column; align-items: stretch; gap: 2px; }
  .primary-navigation .menu > li { width: 100%; }
  .primary-navigation a { border-radius: 8px; padding: 12px; font-size: 14px; }
  .primary-navigation .menu-item-has-children > a { padding-right: 34px; }
  .primary-navigation .sub-menu {
    position: static; display: grid; width: auto; padding: 2px 0 8px 14px; margin: 0 0 4px 10px;
    grid-template-columns: 1fr; gap: 1px; border: 0; border-left: 1px solid var(--line);
    border-radius: 0; box-shadow: none; background: transparent;
    opacity: 1; visibility: visible; transform: none;
  }
  .primary-navigation .sub-menu:before { display: none; }
  .primary-navigation .sub-menu a { padding: 9px 12px; color: var(--muted); }
  .header-inner { min-height: 72px; }
  .fendi-content .service-grid, .card-grid.two, .project-inquiry-form .form-grid { grid-template-columns: 1fr; }
  .footer-cta-inner, .footer-main { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container { width: min(var(--container), calc(100% - 28px)); }
  .site-branding { min-width: 0; flex: 1 1 auto; }
  .site-title { font-size: 15px; }
  .site-tagline { font-size: 11px; letter-spacing: 0; }
  .nav-toggle { min-width: 54px; justify-content: center; }
  .hero-section { padding: 54px 0 44px; }
  .hero-copy h1 { font-size: 40px; }
  .hero-metrics, .card-grid, .post-grid, .process, .dual-track, .evidence-grid { grid-template-columns: 1fr; }
  .visual-badge { position: static; margin-top: 16px; max-width: none; }
  .section { padding: 56px 0; }
  .product-table { display: block; overflow-x: auto; white-space: nowrap; }
  .site-branding { min-width: 0; }
  .site-tagline { display: none; }
}
