@charset "UTF-8";

/* ==========================================================================
   PCヘッダー追従（スクロール時にヘッダーを固定表示）
   - 既存の main.css は変更せず、本ファイルを後読みで追加する想定
   - SP（max-width:768px）は既存の .header.fixed 処理に任せ、一切干渉しない
   - クラス名は aid- プレフィックスで名前空間化
   ========================================================================== */

/* ヘッダーが fixed になった分の高さを埋めるスペーサー（JSで高さを設定） */
.aid-hd-spacer {
  height: 0;
}

@media (max-width: 768px) {
  .aid-hd-spacer {
    display: none;
  }
}

@media (min-width: 769px) {

  .header.aid-hd-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    /* 既存SPの .header.fixed（9999）とグローバルナビのドロップダウンを考慮した値 */
    z-index: 9990;
    -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    -webkit-animation: aid-hd-slide-in 0.25s ease-out;
    animation: aid-hd-slide-in 0.25s ease-out;
  }

  /* ログイン時の管理バー（PCは32px）とぶつからないように */
  body.admin-bar .header.aid-hd-fixed {
    top: 32px;
  }

  /* ----------------------------------------------------------------------
     追従時のコンパクト化（任意：不要なら以下のブロックごと削除してください）
     ヘッダーが高いため、固定時はキャッチコピーを隠してロゴを縮小します
     ---------------------------------------------------------------------- */
  .header.aid-hd-fixed .header__copy {
    display: none;
  }

  .header.aid-hd-fixed .header__head {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .header.aid-hd-fixed .header__vertical .header__head a,
  .header.aid-hd-fixed .header__head a {
    height: auto;
  }

  .header.aid-hd-fixed .header__head a img {
    max-height: 56px;
    width: auto;
  }

  .header.aid-hd-fixed .top-anchor {
    padding: 10px 0 8px;
  }
  /* ----------------------------------------------------------------------
     コンパクト化ここまで
     ---------------------------------------------------------------------- */
}

@-webkit-keyframes aid-hd-slide-in {
  from {
    -webkit-transform: translateY(-100%);
    transform: translateY(-100%);
  }

  to {
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}

@keyframes aid-hd-slide-in {
  from {
    -webkit-transform: translateY(-100%);
    transform: translateY(-100%);
  }

  to {
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}

/* アニメーションを好まないユーザーへの配慮 */
@media (prefers-reduced-motion: reduce) {
  .header.aid-hd-fixed {
    -webkit-animation: none;
    animation: none;
  }
}
