/*
 * SIM比較ラボ 共通ブランドヘッダー
 * Cocoonの既存ロゴ・メニュー構造を維持し、見た目だけを上書きする。
 */

:root {
  --sl-header-green-900: #0b3d2b;
  --sl-header-green-800: #12563c;
  --sl-header-green-700: #166534;
  --sl-header-green-100: #e9f7ef;
  --sl-header-green-50: #f4fbf7;
  --sl-header-border: #dcebe2;
  --sl-header-muted: #64756c;
}

#header {
  position: relative;
  z-index: 20;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--sl-header-border);
}

#header #header-in {
  width: min(calc(100% - 40px), 1180px);
  min-height: 78px;
  margin-inline: auto;
  padding: 0;
  align-items: center;
  justify-content: flex-start;
}

#header .tagline {
  display: none;
}

#header .logo-header {
  width: auto;
  margin: 0;
  padding: 0;
  text-align: left;
}

#header .site-name-text-link {
  display: grid;
  grid-template-columns: 44px auto;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  width: fit-content;
  color: var(--sl-header-green-900);
  text-decoration: none;
}

#header .site-name-text-link::before {
  content: "SIM";
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #198754, var(--sl-header-green-900));
  box-shadow: 0 8px 20px rgba(11, 61, 43, 0.18);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

#header .site-name-text {
  display: block;
  color: var(--sl-header-green-900);
  font-size: 1.48rem;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.015em;
}

#header .site-name-text::after {
  content: "格安SIM・海外eSIMを比較";
  display: block;
  margin-top: 6px;
  color: var(--sl-header-muted);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.055em;
}

#header .site-name-text-link:hover .site-name-text,
#header .site-name-text-link:focus-visible .site-name-text {
  color: var(--sl-header-green-700);
}

#header .site-name-text-link:focus-visible,
#navi .menu-header a:focus-visible {
  outline: 3px solid #f3c96b;
  outline-offset: 3px;
}

#navi {
  position: relative;
  z-index: 19;
  min-height: 54px;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--sl-header-border);
  box-shadow: 0 8px 24px rgba(23, 64, 45, 0.055);
}

#navi #navi-in {
  width: min(calc(100% - 40px), 1180px);
  height: 54px;
  margin-inline: auto;
}

#navi .menu-header {
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  height: 54px;
}

#navi .menu-header > li {
  flex: 0 0 auto;
  height: auto;
}

#navi .menu-header > li > a {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  color: #294638;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.2;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

#navi .menu-header > li > a:hover {
  color: var(--sl-header-green-800);
  background: var(--sl-header-green-50);
  transform: translateY(-1px);
}

#navi .menu-header > li.current-menu-item > a,
#navi .menu-header > li.current_page_item > a {
  color: var(--sl-header-green-800);
  background: var(--sl-header-green-100);
}

#navi #menu-item-276 {
  margin-left: auto;
}

#navi #menu-item-276 > a {
  padding-inline: 20px;
  color: #fff;
  background: var(--sl-header-green-700);
  box-shadow: 0 7px 18px rgba(22, 101, 52, 0.18);
}

#navi #menu-item-276 > a::after {
  content: "→";
  margin-left: 8px;
  font-size: 0.92em;
}

#navi #menu-item-276 > a:hover {
  color: #fff;
  background: var(--sl-header-green-900);
}

@media screen and (max-width: 1023px) {
  #header #header-in {
    width: min(calc(100% - 32px), 1180px);
    min-height: 72px;
    justify-content: center;
  }

  #header .site-name-text-link {
    grid-template-columns: 40px auto;
    column-gap: 10px;
  }

  #header .site-name-text-link::before {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  #header .site-name-text {
    font-size: 1.28rem;
  }

  #header .site-name-text::after {
    margin-top: 5px;
    font-size: 0.6rem;
  }
}

@media screen and (max-width: 480px) {
  #header #header-in {
    width: calc(100% - 24px);
    min-height: 66px;
  }

  #header .site-name-text-link {
    grid-template-columns: 36px auto;
    column-gap: 9px;
  }

  #header .site-name-text-link::before {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: 0.62rem;
  }

  #header .site-name-text {
    font-size: 1.12rem;
  }

  #header .site-name-text::after {
    font-size: 0.55rem;
    letter-spacing: 0.03em;
  }
}

@media (prefers-reduced-motion: reduce) {
  #navi .menu-header > li > a {
    transition: none;
  }
}