/* ============================================================
   Chinglishtogo · Kadence Header/Footer 暖金定制 v2
   加载方式：functions.php enqueue（assets/css/kadence-custom.css）
   或粘贴到「外观 → 自定义 → 额外 CSS」
   ============================================================ */
:root{
  --ctg-bg2:#fdf9f0;--ctg-ink:#2b2117;--ctg-muted:#7c6e5c;
  --ctg-red:#cf3529;--ctg-red-deep:#a8271d;--ctg-gold:#bd7810;--ctg-gold-pale:#eec98b;
  --ctg-line:rgba(189,120,16,.28);--ctg-dark:#2e241a;
}

/* ---------- Header 背景 ---------- */
.site-header, #masthead{
  background:rgba(253,249,240,.9) !important;
  -webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);
  border-bottom:1px solid var(--ctg-line);
  box-shadow:0 2px 20px rgba(120,90,30,.06);
}
.site-header .site-header-row-container-inner{background:transparent !important}

/* ---------- Logo：空白时用文字品牌（上传图片 logo 后自动隐藏） ---------- */
.site-header .site-branding .brand:empty{
  display:inline-flex;align-items:center;gap:10px;
}
.site-header .site-branding .brand:empty::before{
  content:"古";
  width:34px;height:34px;border-radius:8px;display:grid;place-items:center;
  background:linear-gradient(135deg,#df9924,#c0261a);color:#fff;
  font-family:"Noto Serif SC",serif;font-size:19px;font-weight:900;line-height:1;
  box-shadow:0 4px 12px rgba(189,120,16,.4);
}
.site-header .site-branding .brand:empty::after{
  content:"Chinglishtogo";
  font-family:"Merriweather","Noto Serif SC",serif;
  font-size:19px;font-weight:700;color:#2b2117;letter-spacing:.01em;
  white-space:nowrap;
}

/* ---------- 主菜单 ---------- */
#site-navigation .menu-item > a,
.main-navigation .menu-item > a{
  color:var(--ctg-muted) !important;font-weight:500;letter-spacing:.01em;transition:color .2s;
}
#site-navigation .menu-item > a:hover,
#site-navigation .menu-item.current-menu-item > a,
#site-navigation .menu-item.current-menu-ancestor > a{
  color:var(--ctg-red) !important;
}

/* ---------- 下拉子菜单（层级最高，避免遮挡） ---------- */
#site-navigation .sub-menu,
#site-navigation .sub-menu-container,
.main-navigation .sub-menu{
  background:var(--ctg-bg2) !important;
  border:1px solid var(--ctg-line) !important;
  border-radius:12px !important;
  box-shadow:0 18px 40px rgba(120,90,30,.2) !important;
  overflow:hidden;z-index:99999 !important;
}
#site-navigation .sub-menu .menu-item > a{
  color:var(--ctg-muted) !important;padding:12px 18px !important;
}
#site-navigation .sub-menu .menu-item > a:hover{
  background:rgba(189,120,16,.08) !important;color:var(--ctg-red) !important;
}

/* ---------- Header 按钮：紧凑胶囊，精致不笨重 ---------- */
.site-header .header-button-wrap .button.header-button,
.site-header .header-button-wrap .kb-button,
.site-header .kb-button,
.site-header a.button{
  background:linear-gradient(180deg,#e8503a,#cf3529 55%,#a8271d) !important;
  color:#fff !important;border:none !important;
  border-radius:999px !important;
  padding:10px 26px !important;
  font-size:14px !important;font-weight:600 !important;line-height:1.2 !important;
  letter-spacing:.01em;
  box-shadow:0 4px 16px rgba(207,53,41,.32) !important;
  white-space:nowrap;
  transition:transform .18s,box-shadow .25s !important;
}
.site-header .header-button-wrap .button.header-button:hover,
.site-header .header-button-wrap .kb-button:hover,
.site-header .kb-button:hover,
.site-header a.button:hover{
  transform:translateY(-1px) !important;
  box-shadow:0 8px 24px rgba(207,53,41,.48) !important;
}

/* ---------- Footer ---------- */
.site-footer, #colophon{
  background:var(--ctg-dark) !important;color:#f5ede0 !important;
}
.site-footer .site-footer-row-container-inner{background:transparent !important}
.site-footer a, #colophon a{color:rgba(245,237,224,.82) !important;transition:color .2s}
.site-footer a:hover, #colophon a:hover{color:var(--ctg-gold-pale) !important}
.site-footer h1,.site-footer h2,.site-footer h3,.site-footer h4,.site-footer h5,
.site-footer .widget-title,.site-footer .footer-html p{
  color:#f5ede0 !important;
}
.site-footer .widget-title{font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:rgba(245,237,224,.55) !important}
.site-footer .site-footer-row{border-color:rgba(238,201,139,.16) !important}

/* ---------- 多栏页脚（footer_html_content 内） ---------- */
.site-footer .footer-html-inner .ctg-fg{display:grid !important;grid-template-columns:1fr;gap:30px;max-width:1120px;margin:0 auto;text-align:left;padding:8px 0 0}
@media(min-width:768px){.site-footer .footer-html-inner .ctg-fg{grid-template-columns:2fr 1fr 1fr 1fr}}
.site-footer .footer-html-inner .ctg-fg-brand{display:flex;flex-direction:column;gap:12px}
.site-footer .footer-html-inner .ctg-fg-logo{display:inline-flex;align-items:center;gap:10px;font-family:"Merriweather","Noto Serif SC",serif;font-size:19px;font-weight:700;color:#f5ede0}
.site-footer .footer-html-inner .ctg-fg-seal{width:34px;height:34px;border-radius:8px;display:grid;place-items:center;background:linear-gradient(135deg,#df9924,#c0261a);color:#fff;font-family:"Noto Serif SC",serif;font-size:19px;font-weight:900;box-shadow:0 4px 12px rgba(189,120,16,.4)}
.site-footer .footer-html-inner .ctg-fg-brand p{font-size:14px;color:rgba(245,237,224,.62);line-height:1.6;margin:0;max-width:300px}
.site-footer .footer-html-inner .ctg-fg-col h4{font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:rgba(245,237,224,.5);margin:0 0 14px;font-weight:600}
.site-footer .footer-html-inner .ctg-fg-col a{display:block !important;font-size:14px;color:rgba(245,237,224,.82);padding:5px 0;transition:color .2s;text-decoration:none}
.site-footer .footer-html-inner .ctg-fg-col a:hover{color:#eec98b}
.site-footer .footer-html-inner .ctg-fg-col p{margin:0}
.site-footer .footer-html-inner .ctg-fg-copy{max-width:1120px;margin:34px auto 0;padding-top:22px;border-top:1px solid rgba(238,201,139,.16);text-align:center;font-size:13px;color:rgba(245,237,224,.55)}
