/* ===============================
   Header Styles — Refactored
   Goals:
   - Remove duplicated blocks & most !important
   - Single source of truth for breakpoints
   - Clear structure for PC nav / mobile drawer
   =============================== */

/* --------------------------------
 * 0) Design Tokens
 * -------------------------------- */
:root{
  --bg:#fff;
  --fg:#000;
  --muted:#667085;
  --blue:#1f57a7;
  --accent:#ff9a31;
  --border:#e5e7eb;
  --header-h:64px; /* JS may update */
}

/* --------------------------------
 * 1) Header shell
 * -------------------------------- */
.site-header{
  position:sticky; top:0; z-index:1000;
  background:var(--bg); color:var(--fg);
  box-shadow:0 2px 8px rgba(0,0,0,.06);
}
.header-inner{
  max-width:1440px; margin:0 auto; padding:12px 16px;
  display:flex; align-items:center; gap:20px;height:78px;
}
.site-logo img{ display:block; height:auto; width:auto; }

/* --------------------------------
 * 2) Header tools (right side)
 * -------------------------------- */
.header-tools{ display:flex; align-items:center; gap:18px; margin-left:auto; }

.header-tools .tool{
  display:flex; align-items:center; gap:8px;
  color:var(--fg); text-decoration:none; font-size:14px; line-height:1;
}

@media (max-width:1024px){
.header-tools .hamburger{
  display:flex; align-items:center; gap:8px;
  color:var(--fg); text-decoration:none; font-size:14px; line-height:1;
}
}
.header-tools .tool svg{ width:18px; height:18px; fill:currentColor; }
.header-tools .tel span{ color:var(--blue); font-weight:700; font-size: 24px; }
.header-tools .badge{
  display:inline-grid; place-items:center;
  min-width:16px; height:16px; padding:0 3px; font-size:11px;
  border-radius:8px; background:var(--accent); color:#000;
  transform:translateY(-6px);
}
.header-tools .share{ padding:0; }

/* GTranslate */
.gt-wrapper{ margin-right:8px; }
.gt-mobile{ margin-top:12px; }

/* --------------------------------
 * 3) Hamburger (mobile trigger)
 * -------------------------------- */
.hamburger{
  display:none; background:none; border:0; cursor:pointer; padding:6px;
  flex-direction:column; gap:5px;
}
.hamburger span{ display:block; width:26px; height:2px; background:#111; border-radius:2px; }

/* --------------------------------
 * 4) Primary (PC) Navigation
 * -------------------------------- */
.primary-nav{ border-top:1px solid var(--border); background:#fff; }
.primary-nav .menu{
  max-width:1440px; margin:0 auto; padding:20px 16px;
  display:flex; flex-wrap:wrap; gap:26px; list-style:none;
}
.primary-nav .menu > li{ position:relative; list-style:none; }
.primary-nav .menu a{
  color:#515860; text-decoration:none; font-size:15px; font-weight:600;
}
.primary-nav .menu > li > a:hover{ color:#000; }
.primary-nav .menu > li.menu-item-has-children > a::after{
  content:"▾"; font-size:12px; margin-left:6px; color:var(--muted);
}

/* Dropdown */
.primary-nav .sub-menu{
  position:absolute; left:0; top:calc(100% + 12px); min-width:260px;
  background:#fff; border:1px solid var(--border); border-radius:12px;
  box-shadow:0 12px 30px rgba(0,0,0,.12);
  padding:8px; list-style:none;
  opacity:0; visibility:hidden; transform:translateY(6px);
  transition:opacity .18s ease, transform .18s ease, visibility .18s;
  z-index:1000;
}
.primary-nav .sub-menu::before{
  content:""; position:absolute; top:-8px; left:24px; width:14px; height:14px;
  background:#fff; border-left:1px solid var(--border); border-top:1px solid var(--border);
  transform:rotate(45deg);
}
.primary-nav .menu > li:hover > .sub-menu,
.primary-nav .menu > li:focus-within > .sub-menu{
  opacity:1; visibility:visible; transform:translateY(0);
}
.primary-nav .sub-menu li{ list-style:none; }
.primary-nav .sub-menu a{ display:block; padding:10px 14px; border-radius:8px; color:#111; }
.primary-nav .sub-menu a:hover{ background:#f7f7f9; }

/* --------------------------------
 * 5) Share modal
 * -------------------------------- */
[hidden]{ display:none; }
.share-backdrop{ position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:100; }
.share-panel{
  position:fixed; inset:0; display:grid; place-items:center; padding:24px;
  pointer-events:none; z-index:200;
}
.share-box{
  width:min(92vw, 420px); background:#fff; border-radius:16px;
  box-shadow:0 20px 60px rgba(0,0,0,.35); padding:28px 22px 22px; position:relative;
  pointer-events:auto;
}
.share-close{
  position:absolute; top:10px; right:10px; width:32px; height:32px;
  display:flex; align-items:center; justify-content:center;
  border:0; border-radius:50%; background:#e9edf1; color:#111;
  font-size:18px; line-height:1; padding:0; cursor:pointer;
}
.share-title{ margin:0 0 20px; font-size:18px; color:#18b663; font-weight:700; text-align:left; }
.share-list{ list-style:none; margin:0; padding:0; display:grid; gap:14px; }
.share-row{
  display:flex; align-items:center; gap:14px; width:100%; padding:12px 10px; border-radius:10px;
  background:#fff; border:1px solid #eef0f3; text-decoration:none; color:#111; font-weight:600; cursor:pointer;
}
.share-row:hover{ background:#f7f7f9; }
.ic{ display:inline-grid; place-items:center; width:36px; height:36px; border-radius:50%; font-size:13px; line-height:1; color:#fff; font-weight:800; }
.ic-fb{ background:#1877f2; }
.ic-line{ background:#06c755; font-size:10px; padding-top:1px; }
.ic-svg{ width:22px; height:22px; fill:#111; }
.share-feedback{ margin-top:10px; color:#16a34a; font-size:13px; text-align:left; }

/* --------------------------------
 * 6) Responsive rules
 * -------------------------------- */
/* PC-only trims */
@media (min-width:1025px){
  .hamburger{ display:none; }
  .mobile-drawer{ display:none; }
}

/* Mobile / Tablet */
@media (max-width:1024px){
  .header-tools .tool span{ display:none; } /* icon only */
  .gt-wrapper{ display:none; }
  .gt-mobile{ display:block; }

  .hamburger{ display:flex; margin-left:6px; }
  .primary-nav{ display:none; }

  /* Drawer */
  .mobile-drawer{
    display:none; position:fixed; inset:var(--header-h,64px) 0 0 0;
    background:#111317; color:#fff; overflow-y:auto; padding:16px; z-index:999;
  }
  .mobile-drawer.is-open{ display:block; }

  .mobile-tools{ display:flex; gap:18px; align-items:center; margin-bottom:14px; }
  .mobile-tools .icon-link{ background:none; border:0; color:#fff; text-decoration:none; padding:6px; }
  .mobile-tools svg{ width:22px; height:22px; fill:#fff; }

  .mobile-menu{ list-style:none; padding:6px 0 16px; margin:0; }
  .mobile-menu > li{ border-bottom:1px solid #222; }
  .mobile-menu a{ display:block; padding:14px 2px; color:#fff; text-decoration:none; }
  .mobile-menu .sub-menu{ list-style:none; padding:0 0 8px 14px; margin:0; border-left:1px solid #2b2f36; }
  .mobile-menu .sub-menu a{ padding:10px 2px; }
}

/* --------------------------------
 * 7) Minor utilities / plugin tweaks
 * -------------------------------- */
/* Hide badges when zero */
.header-tools .badge[hidden]{ display:none; }

/* GTranslate (PC) */
.gt-pc{ position:relative; margin:0 140px 0 0px; }
.gt-pc .gtranslate_wrapper{ position:absolute; top:-20px; left:0; width:200px; }
.gt-pc .gt-open{ max-width:140px !important; }
.gt_float_switcher .gt-selected .gt-current-lang {
    padding: 5px 10px !important;
}
.gt_float_switcher {
    font-size: 14px !important;
}