/* =========================================================
   base_v2.css — SAFE GLOBAL (works with your Twig base)
   - Full-width fixed header (always top)
   - Main content offset by header height
   - Drawer menu (mobile)
   - Footer styles
   - Supports page-level body_class:
       .base--full  -> content is full width, NO padding-top
       .base--home  -> same as full (use for landing)
   ========================================================= */

:root{
  --base-border: rgba(0,0,0,0.10);
  --base-text: #2a2623;
  --base-muted: rgba(42,38,35,0.72);
  --base-accent: #c96f2d;

  --base-shadow: 0 18px 40px rgba(0,0,0,0.12);
  --base-shadow-soft: 0 10px 26px rgba(0,0,0,0.10);

  --base-radius: 18px;
  --base-container: 1180px;
  --base-pad: 18px;

  --base-headerH: 76px; /* match your design */
}

/* ===== Must-fix defaults ===== */
html, body{
  margin: 0;
  padding: 0;
  width: 100%;
}
body{
  overflow-x: hidden;
}

/* Avoid global color/typography overrides to prevent conflicts */
*{ box-sizing: border-box; }

/* Page wrapper */
.base-page{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =========================================================
   HEADER (FULL WIDTH, ALWAYS TOP)
   ========================================================= */
.site-header{
  position: fixed; /* critical: unaffected by container/padding */
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--base-headerH);
  z-index: 1000;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(244,239,232,0.86);
  border-bottom: 1px solid var(--base-border);
}

.site-header__inner{
  height: 100%;
  width: min(var(--base-container), calc(100% - 2 * var(--base-pad)));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

/* Brand */
.brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  user-select: none;
  text-decoration: none;
}
.brand__name{
  font-weight: 950;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
  color: var(--base-text);
}
.brand:hover .brand__name{ color: var(--base-accent); }

/* Desktop nav */
.nav--desktop{
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav__link{
  border: 1px solid var(--base-border);
  background: rgba(255,255,255,0.72);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  color: rgba(42,38,35,0.90);
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.nav__link:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.92);
  border-color: rgba(201,111,45,0.25);
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
}
.nav__link:active{ transform: translateY(0); }

/* Right */
.site-header__right{
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Lang select */
.lang{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.70);
  border: 1px solid var(--base-border);
}
.lang__label{
  font-weight: 900;
  color: rgba(42,38,35,0.72);
  font-size: .9rem;
}
.lang__select{
  border: 0;
  background: transparent;
  font-weight: 900;
  color: rgba(42,38,35,0.92);
  outline: none;
  cursor: pointer;
}

/* Burger */
.burger{
  display: none;
  border: 1px solid var(--base-border);
  background: rgba(255,255,255,0.75);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  box-shadow: var(--base-shadow-soft);
  font-size: 22px;
  line-height: 1;
}

/* =========================================================
   MAIN
   - default pages: content starts below fixed header
   ========================================================= */
.base-content{
  width: min(var(--base-container), calc(100% - 2 * var(--base-pad)));
  margin: 0 auto;
  padding: calc(var(--base-headerH) + 18px) 0 26px; /* offset header */
  flex: 1;
}

/* Full-width pages (landing pages) */
.base--full .base-content,
.base--home .base-content{
  width: 100%;
  margin: 0;
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
}

/* =========================================================
   DRAWER (Mobile)
   ========================================================= */
.drawer{
  display: none; /* hidden by default */
}

/* open state controlled by JS */
.drawer.is-open{
  display: block;
}

.drawer__backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.25);
  z-index: 1000; /* same layer as header is ok; panel above */
}

.drawer__panel{
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(420px, 86vw);
  background: rgba(255,255,255,0.92);
  border-left: 1px solid var(--base-border);
  box-shadow: var(--base-shadow);
  padding: 16px;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  gap: 16px;

  transform: translateX(100%);
  transition: transform 0.22s ease;
}

.drawer.is-open .drawer__panel{
  transform: translateX(0);
}

.drawer__top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.drawer__brand{
  font-weight: 950;
  letter-spacing: -0.02em;
  font-size: 1.1rem;
  color: var(--base-text);
}

.drawer__close{
  border: 1px solid var(--base-border);
  background: rgba(255,255,255,0.85);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  font-size: 18px;
}

.nav--mobile{
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nav__link--mobile{
  width: 100%;
  text-align: left;
  padding: 12px 14px;
}

.lang--mobile{
  width: 100%;
  justify-content: space-between;
}

/* Breakpoint */
@media (max-width: 1024px){
  .nav--desktop{ display: none; }
  .burger{ display: inline-flex; align-items: center; justify-content: center; }
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer{
  background: rgba(255,255,255,0.70);
  border-top: 1px solid var(--base-border);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.site-footer__inner{
  width: min(var(--base-container), calc(100% - 2 * var(--base-pad)));
  margin: 0 auto;
  padding: 28px 0;
}

.footerGrid{
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr;
  gap: 18px;
  align-items: start;
}

.footerTitle{
  margin: 0 0 10px;
  font-weight: 950;
  letter-spacing: -0.01em;
  color: var(--base-text);
}

.footerList{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--base-muted);
}

.footerList a{
  color: rgba(42,38,35,0.78);
  font-weight: 800;
  text-decoration: none;
}
.footerList a:hover{
  color: var(--base-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.partnerLogos{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.partnerLogos img{
  width: 64px;
  height: 44px;
  object-fit: contain;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.footerBottom{
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--base-border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: rgba(42,38,35,0.72);
  font-weight: 700;
}

@media (max-width: 900px){
  .footerGrid{ grid-template-columns: 1fr; }
}

.lang__icon{
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(244,239,232,0.9);
  border: 1px solid rgba(0,0,0,0.08);
}

/* label keep for accessibility but optional hide */
.lang__label{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   Lang selector — polished pill + globe + custom arrow
   - Works for both desktop and drawer mobile
   - Keeps accessibility (label hidden)
   ========================================================= */

/* 容器：更像“控件”而不是一坨 select */
.lang{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 8px 12px;
  border-radius: 999px;

  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);

  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.lang:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.95);
  border-color: rgba(201,111,45,0.25);
  box-shadow: 0 14px 28px rgba(0,0,0,0.10);
}

/* focus（键盘可见） */
.lang:focus-within{
  outline: 3px solid rgba(201,111,45,0.28);
  outline-offset: 3px;
}

/* label：保留语义但不占布局 */
.lang__label{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 如果你 Twig 没加 lang__icon，也能显示地球：给容器加伪元素兜底 */
.lang__icon{
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(244,239,232,0.95);
  border: 1px solid rgba(0,0,0,0.08);
}

/* 兜底：没有 .lang__icon 时自动出现地球 */
.lang:not(:has(.lang__icon))::before{
  content: "🌍";
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(244,239,232,0.95);
  border: 1px solid rgba(0,0,0,0.08);
}

/* select：去掉原生样式 + 加粗 + 内边距给箭头留空间 */
.lang__select{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  border: 0;
  background: transparent;
  outline: none;

  font-weight: 950;
  letter-spacing: .02em;
  color: rgba(42,38,35,0.92);

  padding: 6px 34px 6px 2px; /* 右侧空间给自定义箭头 */
  cursor: pointer;

  line-height: 1;
}

/* 自定义箭头 */
.lang::after{
 /* content: "▾";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;

  color: rgba(42,38,35,0.65);
  font-weight: 950;
  font-size: 14px;*/
}

/* 选中时更有质感（可选） */
.lang:hover .lang__select{
  color: rgba(42,38,35,0.98);
}

/* 移动端抽屉里：满宽、更像表单控件 */
.lang--mobile{
  width: 100%;
  justify-content: flex-start;
  padding: 10px 12px;
}

.lang--mobile .lang__select{
  flex: 1;
  padding-left: 0;
  padding-right: 38px;
}

/* 移动端：触控更舒服 */
@media (max-width: 1024px){
  .lang{
    padding: 9px 12px;
  }
  .lang__select{
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

/* =========================================================
   LANG — Ultra polish (CSS-only)
   A) Strong closed-state styling (all browsers)
   B) Real dropdown panel styling with SelectMenu (Chromium modern)
   ========================================================= */

/* ---------- A) Closed state (works everywhere) ---------- */
.lang{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 7px 12px;
  border-radius: 999px;

  background:
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.74));
  border: 1px solid rgba(0,0,0,0.10);

  box-shadow:
    0 14px 30px rgba(0,0,0,0.10),
    inset 0 1px 0 rgba(255,255,255,0.7);

  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
  user-select: none;
}

.lang:hover{
  transform: translateY(-1px);
  border-color: rgba(201,111,45,0.28);
  box-shadow:
    0 18px 36px rgba(0,0,0,0.12),
    inset 0 1px 0 rgba(255,255,255,0.75);
}

.lang:focus-within{
  outline: 3px solid rgba(201,111,45,0.28);
  outline-offset: 3px;
}

.lang__icon{
  width: 30px;
  height: 30px;
  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: rgba(244,239,232,0.92);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);

  font-size: 16px;
  line-height: 1;
}

/* label 永远隐藏（无障碍保留） */
.lang__label{
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Select itself */
.lang__select{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  border: 0;
  background: transparent;
  outline: none;

  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(42,38,35,0.92);

  padding: 7px 40px 7px 2px; /* space for caret */
  cursor: pointer;
  line-height: 1;
  min-height: 32px;
}

/* caret */
.lang::after{
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translateY(-55%) rotate(45deg);

  border-right: 2px solid rgba(42,38,35,0.55);
  border-bottom: 2px solid rgba(42,38,35,0.55);
  pointer-events: none;
  opacity: 0.9;
}

/* make it feel “premium” when active */
.lang:focus-within::after{
  border-right-color: rgba(201,111,45,0.85);
  border-bottom-color: rgba(201,111,45,0.85);
}

/* Mobile drawer */
.lang--mobile{
  width: 100%;
  justify-content: flex-start;
}
.lang--mobile .lang__select{
  flex: 1;
}

/* Try improve popup readability on browsers that respect these (not guaranteed) */
.lang__select option{
  font-weight: 800;
}

/* ---------- B) Real dropdown styling (Chromium SelectMenu) ----------
   If supported, you get a styled dropdown panel with rounded corners + shadow.
   Other browsers simply ignore this block and keep A.
-------------------------------------------------------------------- */
@supports (appearance: base-select) {

  /* turn select into base-select so it can be styled */
  .lang__select{
   /* appearance: base-select;*/
    padding-right: 20px; /* caret handled by our container */
  }

  /* the button part inside selectmenu */
  .lang__select::part(button){
    border: 0;
    background: transparent;
    padding: 0; /* our container already has padding */
    font-weight: 950;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(42,38,35,0.92);
  }

  /* the dropdown listbox (the opened panel) */
  .lang__select::part(listbox){
    margin-top: 10px;
    padding: 6px;
    border-radius: 18px;
    border: 1px solid rgba(0,0,0,0.10);

    background: rgba(255,255,255,0.96);
    box-shadow: 0 22px 60px rgba(0,0,0,0.18);
    backdrop-filter: blur(10px);
  }

  /* each option row */
  .lang__select option{
    padding: 10px 12px;
    border-radius: 14px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(42,38,35,0.92);
  }

  /* hover row */
  .lang__select option:hover{
    background: rgba(201,111,45,0.12);
  }

  /* selected row */
  .lang__select option:checked{
    background: rgba(201,111,45,0.18);
  }
}

/* ---------- Touch comfort ---------- */
@media (max-width: 1024px){
  .lang{ padding: 9px 12px; }
  .lang__select{ padding-top: 9px; padding-bottom: 9px; }
}

.lang__select {
    -webkit-appearance: none; /* Chrome / Safari */
    -moz-appearance: none;    /* Firefox */
    appearance: none;         /* 标准 */

    background: none;         /* 关键：去掉系统背景 */
}
/* === FIX: kill native select arrow (keep our .lang::after caret) === */
.lang__select{
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;

  background: transparent !important;
  background-image: none !important;   /* 关键 */
  border: 0 !important;

  padding-right: 44px !important;      /* 给你自定义 caret 留位置 */
}

/* IE/旧 Edge（如果你不需要可以不写） */
.lang__select::-ms-expand{
  display: none;
}
