@charset "utf-8";

/* -----------------------------------------------
* Project: Header Global Navigation (PC)
* ----------------------------------------------- */

@media (min-width: 769px) {
  .p-header-nav {
    --_border-color: #666;
    border-top: 1px solid var(--_border-color);
    border-bottom: 1px solid var(--_border-color);
    max-width: 1300px;
    margin-inline: auto;
    font-feature-settings: 'palt';
    font-family: "Noto Sans JP", sans-serif;
    color: #000;
  }
  
  .p-header-nav__list {
    display: flex;
    list-style: none;
  }

  .p-header-nav__item {
    position: relative;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;

    + .p-header-nav__item::before {
      content: "";
      position: absolute;
      left: 0;
      top: 50%;
      transform: translateY(-50%);
      width: 1px;
      height: 70%;
      background-color: var(--_border-color);
    }
  }

  .p-header-nav__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    padding: 15px 0;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    min-height: 3.5em;
    position: relative;

    @media (width < 1300px) {
      font-size: clamp(12px, 1.2vw, 16px);
    }

    &:hover,
    &:focus-visible {
      color: var(--gaia-color-secondary);
    }

    /* underline */
    &::before {
      content: "";
      position: absolute;
      left: .8em;
      right: .8em;
      bottom: .8em;
      height: 1px;
      background-color: var(--gaia-color-secondary);
      opacity: 0;
      transition: opacity .2s ease;
    }

    &:hover::before {
      opacity: 1;
    }
  }

  .p-header-nav__caret {

    &::before {
      content: "▼";
      display: inline-block;
      margin-left: .4em;
      font-size: .8em;
      vertical-align: middle;
    }
    
  }

  .p-header-nav__drawer {
    position: absolute;
    left: 0;
    top: 100%;
    display: none;
    z-index: 1000;
  }

  .p-header-nav__item:hover>.p-header-nav__drawer,
  .p-header-nav__item:focus-within>.p-header-nav__drawer {
    display: block;
  }

  /* 右端付近の項目は自動で右寄せ表示（末尾から2件） */
  .p-header-nav__item:nth-last-child(-n+2) > .p-header-nav__drawer {
    @media (width < 1360px) {
      left: auto;
      right: 0;
    }
  }

  .p-header-nav__panel {
    width: 276px;
    background-color: #fff;
    padding: 30px 9px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  }

  .p-header-nav__panel-link {
    display: grid;
    grid-template-columns: auto 1fr auto; /* dash | text | arrow */
    align-items: center;
    gap: 12px;
    padding: 12px;
    min-height: 36px;
    text-decoration: none;
    color: var(--gaia-color-neutral-dark);
    font-size: 16px;
    line-height: 1.4;
    background: #fff;
    font-weight: 700;

    @media (width < 1300px) {
      font-size: clamp(12px, 1.2vw, 16px);
    }

    + .p-header-nav__panel-link {
      margin-top: .5em;
    }

    &:hover {
      background: var(--gaia-color-neutral-white);
      color: var(--gaia-color-primary);
    }

    /* ダッシュ */
    &::before {
      content: "";
      display: inline-block;
      width: 12px;
      height: 1px;
      background-color: var(--gaia-color-primary);
      grid-column: 1;
    }

    /* 右矢印 */
    &::after {
      content: "";
      width: 8px;
      height: 8px;
      border-top: 2px solid var(--gaia-color-secondary);
      border-right: 2px solid var(--gaia-color-secondary);
      transform: rotate(45deg);
      grid-column: 3;
      justify-self: end;
    }
  }
}