/* =========================
   Tokens
========================= */
:root{
  --yc-bg: #E4E4DF;          
  --yc-ink: #6F824C; 
  --yc-text: #394A30;         
  --yc-line: rgba(40, 40, 40, .16);
  --yc-maxw: 1195px;      
  --yc-pad-x: 154px;  
  --yc-footer-h: 310px;       
}

/* =========================
   1) 隐藏主题自带汉堡（GeneratePress 常见类）
========================= */
@media (max-width: 768px){
  .main-navigation .menu-toggle,
  .menu-toggle {
    display: none !important;
  }
}

/* 你插入的自定义汉堡：默认隐藏，移动端显示 */
.yc-hamburger{
  display: none;
  border: 0;
  color: var(--yc-ink); 
  background: transparent;
  padding: 0;
  width: 44px;
  height: 44px;
  cursor: pointer;
  position: relative;
}
/* Hover */
.yc-hamburger:hover{
  color: color-mix(in srgb, currentColor 80%, transparent);
}

.yc-hamburger__line{
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

/* 上 */
.yc-hamburger__line:nth-child(1){
  top: 0;
}

/* 中（关键是用 50% + translateY 居中） */
.yc-hamburger__line:nth-child(2){
  top: 50%;
  transform: translateY(-50%);
}

/* 下 */
.yc-hamburger__line:nth-child(3){
  bottom: 0;
}

/* =========================
   Mobile Header: logo + hamburger same row
   (GeneratePress)
========================= */
@media (max-width: 768px){

  /* 1) 先隐藏主题自带汉堡（你原本的 OK） */
  .main-navigation .menu-toggle,
  .menu-toggle{
    display: none !important;
  }

  /* 2) 关键：把 header 内部容器变成一行 flex */
  #masthead .inside-header{
    display: flex;
    align-items: center;
    justify-content: space-between; /* logo 左，导航区右 */
    gap: 16px;
    min-height:60px;
  }

  /* 3) logo 区不要被挤压变形 */
  #masthead .site-logo{
    flex: 0 0 auto;
    height: 60px;
    display: flex;
    align-items: center;
  }

  /* 4) 让 main-navigation 不要占满整行（这是你掉行的常见原因） */
  #masthead .main-navigation{
    flex: 0 0 auto;
    width: auto;
    margin-left: auto;            /* 推到最右 */
    display: flex;
    align-items: center;
  }

  /* 5) inside-navigation 也改成“只包内容”，并右对齐 */
  #masthead .main-navigation .inside-navigation.grid-container,
  #masthead .main-navigation .inside-navigation{
    width: auto;
    padding: 0;                   /* 避免 grid-container 默认 padding 干扰 */
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
  }

  /* 6) 你的自定义汉堡：移动端显示，并保证是正常的 inline-flex（不要用 absolute 去漂） */
  button.yc-hamburger{
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 22px;
    padding: 0;
    border: 0;
    background: transparent !important;
    color: var(--yc-ink); 
    cursor: pointer;
    position: relative; /* 仅用于画两条线 */
  }


  /* 7) 可选：如果你发现 GP 还有一个 mobile-menu-control-wrapper 在抢布局，就直接隐藏它 */
  /* （你截图里确实存在这个 wrapper） */
  #masthead .mobile-menu-control-wrapper{
    display: none;
  }
}


/* =========================
   Home only: hamburger color override
========================= */
.home button.yc-hamburger,
.front-page button.yc-hamburger,
.page-id-4056 button.yc-hamburger,
.page-id-4160 button.yc-hamburger
{
  color: var(--yc-bg);
}


/* =========================
   2) Footer（像素级布局）
========================= */
.yc-footer{
  background: var(--yc-bg);
}

/* Base：先用“桌面大屏”的规则当默认（>=1200） */
.yc-footer__inner{
  /* 1200-1920：content 固定 1195px，居中 */
  max-width: 1195px;
  margin: 0 auto;
  height: var(--yc-footer-h);
  /* 上120 / 下32，左右先给一个安全值，桌面段会被变量覆盖也没关系 */
  padding: 120px var(--yc-pad-x, 64px) 32px var(--yc-pad-x, 64px);
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  grid-template-rows: 1fr auto;
  align-items: start;
  column-gap: 0px;
}

.yc-footer .yc-footer__menu{
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(3, auto);
  column-gap: 120px;
  row-gap: 8px;
}



/* Brand logo image */
.yc-footer__brand{
  display: inline-flex;
  align-items: flex-start;
  text-decoration: none;
}

.yc-footer__brand-img{
  display: block;
  max-width: 165px;     /* 你按设计稿改 */
  height: auto;
}


/* IG icon image */
.yc-footer__ig{
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.yc-footer__ig-img{
  display: block;
  width: 100%;  
  height: 100%;
}

.yc-footer__nav{
  grid-column: 2 / 4;
  grid-row: 1 / 2;
}


.yc-footer .yc-footer__menu,
.yc-footer .yc-footer__menu li{
  margin: 0;
  padding: 0;
  list-style: none;
}

.yc-footer .yc-footer__menu a{
  display: inline-block;        /* 或 block，看你要不要整行可点 */
  padding: 0;                   /* ✅ 清掉主题给 a 的 padding */
  margin: 0;
  line-height: 24px;            /* ✅ 你设计稿的垂直节奏 */
  font-size: 14px;
  letter-spacing: .12em;
  text-decoration: none;
  color: rgba(60, 70, 45, .90);

  border-bottom: 1px solid transparent; /* hover 下划线一致 */
  transition: color .2s ease, border-color .2s ease;
}

.yc-footer .yc-footer__menu a:hover{
  color: rgba(57, 74, 48, 1);
  border-bottom-color: currentColor;
}

/* 如果主题给 li 设置了固定高度/对齐方式，这里也压掉 */
.yc-footer .yc-footer__menu li{
  min-height: 0;
  height: auto;
  line-height: normal;
}

.yc-footer__copyright{
  grid-column: 1 / -1;
  grid-row: 2 / 3;
  justify-self: center;
  color: rgba(80, 90, 60, .55);
  font-size: 12px;
  letter-spacing: .08em;
  margin-top: 2rem;
}

/* 移动端 footer：更紧凑 */
@media (max-width: 768px){
  .yc-footer__inner{
    height: auto;
    padding: 28px 24px 18px 24px;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
    row-gap: 32px;
    align-items: start;
    column-gap: 18px;
  }

  .yc-footer__brand{
    grid-row:1;
  }
  
  .yc-footer__nav{
    grid-row:2;
  }

  .yc-footer__copyright{
    grid-row:3;
  }
  

  .yc-footer__brand{ font-size: 28px; }
  .yc-footer__nav{ grid-column: 1 / -1; }
  .yc-footer .yc-footer__menu{
    grid-auto-flow: row;
    grid-template-rows: none;
    row-gap: 10px;
    column-gap: 20px;
  }
  .yc-footer__ig{
    grid-column: 2 / 3;
    grid-row: 1 / 2;
  }
  .yc-footer__copyright{
    grid-column: 1 / -1;
    justify-self: start;
  }
}


/* 800-1200：两侧固定 64px padding，内容自适应（不再锁 1195） */
@media (min-width: 768px) and (max-width: 1199.98px){
  .yc-footer__inner{
    max-width: none;           /* 取消 1195 */
    width: 100%;
    margin: 0 auto;
    padding-left: 64px;
    padding-right: 64px;
    padding-top: 120px;
    padding-bottom: 32px;
  }
}


/* =========================
   3) Mobile Drawer（像素级结构）
========================= */
html.yc-drawer-open, body.yc-drawer-open{
  overflow: hidden;
}

.yc-drawer{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.yc-drawer[aria-hidden="false"]{
  display: block;
}

.yc-drawer__overlay{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.12);
}

.yc-drawer__panel{
  position: absolute;             
  width: 100%;              
  height: 100%;             
  background: var(--yc-bg);
  padding: 32px;
  display: flex;
  flex-direction: column;
}


.yc-drawer__top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding-bottom: 18px;
}

.yc-drawer__brand{
  display: inline-flex;
  align-items: flex-start;
  text-decoration: none;
}

.yc-drawer__brand-img{
  display: block;
  max-width: 165px; 
  height: auto;
}



.yc-drawer__close{
  border: 0;
  background: transparent;
  width: 34px;
  height: 34px;
  position: relative;
  cursor: pointer;
}
.yc-drawer__close-line{
  position: absolute;
  left: 8px; right: 8px;
  top: 50%;
  height: 2px;
  background: var(--yc-text);
  border-radius: 2px;
}
.yc-drawer__close-line:nth-child(1){ transform: translateY(-50%) rotate(45deg); }
.yc-drawer__close-line:nth-child(2){ transform: translateY(-50%) rotate(-45deg); }

/* 主菜单 + 分割线（像稿） */
.yc-drawer__main{
  flex: 1 1 auto;  
  display: flex;
  border-top: 1px solid var(--yc-line);
  align-items: center;  
  padding-top: 0;  
}

.yc-drawer__menu{
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}
.yc-drawer__menu li a{
  display:block;
  padding: 18px 0;
  border-bottom: 1px solid var(--yc-line);
  text-decoration: none;
  color: rgba(60, 70, 45, .90);
  font-size: 16px;
  letter-spacing: .10em;
}

/* 底部区域：IG + 语言 + Footer Links */
.yc-drawer__bottom{
  margin-top: auto;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto auto;
  column-gap: 16px;
  row-gap: 10px;
  align-items: center;
}


.yc-drawer__bottom .yc-footer__ig{
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  justify-self: start;
  align-self: center;
}

/* =========================
   Drawer Languages (Polylang)
   structure: .yc-drawer__langs > ul > li > a
========================= */

/* 1) 位置：在 drawer bottom 的第一行右侧 */
.yc-drawer__bottom .yc-drawer__langs{
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  justify-self: end;
  align-self: center;
  font-size: 14px;
  letter-spacing: .08em;
  color: rgba(60,70,45,.85);
}

.yc-drawer__langs-list{
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}


/* 2) 清掉列表默认样式 & 全站可能注入的 dot */
.yc-drawer__langs ul,
.yc-drawer__langs li{
  margin: 0;
  padding: 0;
  list-style: none !important;
}
.yc-drawer__langs li::marker{ content: "" !important; }
.yc-drawer__langs li::before{ content: none !important; }
.yc-drawer__langs a::before{ content: none !important; }

/* 3) 横向排列 */
.yc-drawer__langs ul{
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 12px !important;
}

/* 4) 按钮（pill） */
.yc-drawer__langs a{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  background: transparent;
  text-decoration: none;
  color: inherit;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}

/* hover：轻微强调（不改变布局） */
.yc-drawer__langs a:hover{
  color: var(--yc-text);
  border-color: color-mix(in srgb, var(--yc-text) 30%, transparent);
}

/* 5) 选中态（Polylang 会给 li.current-lang） */
.yc-drawer__langs .current-lang a{
  color: var(--yc-text);
  font-weight: 600;
}

/* 底部三链接：Information / Contact / Privacy */
.yc-drawer__footerlinks{
  grid-column: 1 / -1;
  grid-row: 2 / 3;
  padding-top: 6px;
}
.yc-drawer__footer-menu{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  justify-content: space-between;
  gap: 12px;
}
.yc-drawer__footer-menu a{
  text-decoration:none;
  color: rgba(60,70,45,.85);
  font-size: 14px;
  letter-spacing:.10em;
}

.yc-drawer__copyright{
  grid-column: 1 / -1;
  grid-row: 3 / 4;
  justify-self: center;
  color: rgba(80,90,60,.55);
  font-size: 12px;
  letter-spacing:.08em;
}