/* ═══════════════════════════════════════
   header.css — Clawer static header
   Pure CSS dropdown + multi-level flyout
   ═══════════════════════════════════════ */

/* === Bar === */
.ch-bar {
  background: #fff;
  box-shadow: 3px 3px 12px 4px rgba(0,0,0,.1);
  position: sticky; top: 0; z-index: 1000;
}
.ch-inner {
  max-width: 1400px; height: 90px; margin: 0 auto;
  display: flex; align-items: center; padding: 0 40px;
}

/* === Logo === */
.ch-logo { flex-shrink: 0; padding-right: 50px; }
.ch-logo img { width: 135px; height: auto; display: block; }

/* === Mobile toggle === */
.ch-toggle {
  display: none; background: none; border: none;
  font-size: 26px; cursor: pointer; color: #333; padding: 4px 8px;
}

/* === Nav === */
.ch-nav { flex: 1; min-width: 0; }
.ch-menu {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; justify-content: space-between;
}
.ch-item { position: relative; }
.ch-item > a {
  display: block; padding: 12px 14px;
  color: #4a4a4a; font-size: 16px; font-family: Arial; font-weight: bold;
  text-decoration: none; white-space: nowrap;
}
.ch-item:hover > a { color: #0085d5; }

/* ══════════════════════════════════════════
   L1 DROPDOWN
   ══════════════════════════════════════════ */

/* Bridge: invisible strip below nav label */
.ch-drop::after {
  content: ''; display: block; position: absolute;
  top: 100%; left: 0; width: 100%; height: 8px; z-index: 999;
}

/* Dropdown panel */
.ch-sub {
  display: none; position: absolute; top: calc(100% + 8px); left: 0;
  background: #fff; border-radius: 10px; padding: 6px 0;
  box-shadow: 0 4px 16px rgba(0,0,0,.12); min-width: 200px; z-index: 1001;
}
.ch-sub a {
  display: block; padding: 17px 20px;
  color: #666; font-size: 14px; font-family: Arial; font-weight: bold;
  text-decoration: none; white-space: nowrap;
}
.ch-sub a:hover { color: #0085d5; background: #fff; }

/* Show on hover */
.ch-drop:hover > .ch-sub,
.ch-sub:hover { display: block; }

/* ══════════════════════════════════════════
   L2+ FLYOUT (right side)
   ══════════════════════════════════════════ */

.ch-flyout { position: relative; }

/* Right arrow for flyout items only */
.ch-flyout > a::after { content: '\25B8'; font-weight: bold; font-size: 12px; margin-left: 4px; }

/* Bridge: invisible strip between link and flyout panel */
.ch-flyout::before {
  content: ''; position: absolute;
  top: 0; left: 100%; width: 12px; height: 100%; z-index: 1001;
}

/* Flyout panel */
.ch-flyout-panel {
  display: none; position: absolute; left: calc(100% + 12px); top: 0;
  background: #fff; border-radius: 10px; padding: 6px 0;
  box-shadow: 0 4px 16px rgba(0,0,0,.12); min-width: 220px; z-index: 1002;
}
.ch-flyout-panel a {
  display: block; padding: 17px 20px;
  color: #666; font-size: 14px; font-family: Arial; font-weight: bold;
  text-decoration: none; white-space: nowrap;
}
.ch-flyout-panel a:hover { color: #0085d5; background: #fff; }

/* Show on hover */
.ch-flyout:hover > .ch-flyout-panel,
.ch-flyout-panel:hover { display: block; }

/* ══════════════════════════════════════════
   LANGUAGE
   ══════════════════════════════════════════ */
.ch-lang {
  flex-shrink: 0; display: flex; align-items: center; gap: 6px;
  cursor: pointer; padding: 0 10px 0 50px;
}
.ch-lang-flag { width: 28px; height: 28px; border-radius: 50%; display: block; }
.ch-lang-text { font-size: 16px; color: #333; }

/* ══════════════════════════════════════════
   MOBILE
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
  .ch-inner { height: auto; padding: 8px 12px; flex-wrap: wrap; }
  .ch-logo   { order: 1; }
  .ch-toggle { order: 2; display: block; margin-left: auto; }
  .ch-lang   { order: 3; }
  .ch-nav    { order: 4; flex-basis: 100%; display: none; }
  .ch-nav.open { display: block; }
  .ch-menu { flex-direction: column; align-items: stretch; padding: 8px 0; }
  .ch-item > a { padding: 10px 0; border-bottom: 1px solid #eee; }
  .ch-sub, .ch-flyout-panel {
    position: static; box-shadow: none; border-radius: 0;
    padding-left: 16px; min-width: auto;
  }
  .ch-flyout::before { display: none; }
  .ch-drop:hover > .ch-sub { display: none; }
  .ch-item.open > .ch-sub { display: block; }
  .ch-flyout:hover > .ch-flyout-panel { display: none; }
  .ch-flyout.open > .ch-flyout-panel { display: block; }
}
