/* ============================================
   Page Header Component
   各ページ共通のページヘッダースタイル
   ============================================ */

.page-header {
  position: relative;
  background: var(--color-bg-light);
  padding: 132.5px 0 40px;
  overflow: hidden;
}
/* ナビがない場合は高さ375px */
.page-header:not(:has(.page-header__nav)) {
  min-height: 375px;
  box-sizing: border-box;
}
.page-header::before {
  content: "";
  position: absolute;
  top: -200px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg-light);
  z-index: -1;
}
@media (min-width: 768px) {
  .page-header {
    padding: 160px 0 50px;
  }
}
@media (min-width: 1024px) {
  .page-header {
    padding: 180px 0 55px;
  }
}

.page-header__inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
  position: relative;
}

/* タイトル */
.page-header__title {
  font-family: var(--font-family-heading);
  font-size: 50px;
  font-weight: var(--font-weight-english-heading);
  color: var(--color-primary);
  line-height: 1.25;
  letter-spacing: 0.05em;
  margin-bottom: 15px;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}
@media (min-width: 768px) {
  .page-header__title {
    font-size: 60px;
  }
}
@media (min-width: 1024px) {
  .page-header__title {
    font-size: 80px;
  }
}

/* サブタイトル */
.page-header__subtitle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-family-accent);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}
/* ナビリンクがある場合のみ margin-bottom を追加 */
.page-header__inner:has(.page-header__nav) .page-header__subtitle {
  margin-bottom: 100px;
}
@media (min-width: 768px) {
  .page-header__subtitle {
    gap: 8px;
    font-size: 22px;
  }
}
.page-header__icon {
  width: 14px;
  height: 14px;
}
@media (min-width: 768px) {
  .page-header__icon {
    width: 18px;
    height: 18px;
  }
}

.page-header__icon {
  display: inline-block;
  background: url("../images/icon-circle-black.svg") no-repeat center;
  background-size: contain;
  flex-shrink: 0;
  position: relative;
  top: 1px;
}

/* ナビゲーション */
.page-header__nav {
  margin-top: 24px;
  position: relative;
  z-index: 1;
}

.page-header__nav-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 16px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: stretch;
}
@media (min-width: 768px) {
  .page-header__nav-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 25px;
  }
}

.page-header__nav-item {
  display: flex;
}

.page-header__nav-item a {
  display: flex;
  align-items: flex-start;
  flex: 1;
  gap: 8px;
  font-family: var(--font-family-accent);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-secondary);
  transition: color 0.3s ease;
  position: relative;
  padding-bottom: 10px;
}
.page-header__nav-item a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 90%;
  height: 1px;
  background: var(--color-border-light);
}
@media (min-width: 768px) {
  .page-header__nav-item a {
    gap: 10px;
    font-size: var(--font-size-xl);
    padding-bottom: 0;
  }
  .page-header__nav-item a::after {
    display: none;
  }
}

.page-header__nav-item a:hover {
  color: var(--color-primary);
}

.page-header__nav-divider {
  display: none;
}
@media (min-width: 768px) {
  .page-header__nav-divider {
    display: block;
    font-family: var(--font-family-accent);
    font-size: var(--font-size-xl);
    font-weight: 500;
    color: var(--color-gray-medium);
  }
}

.page-header__nav-arrow {
  display: inline-block;
  width: 16px;
  height: 16px;
  background: url("../images/icon-arrow-down.svg") no-repeat center;
  background-size: contain;
}
@media (min-width: 768px) {
  .page-header__nav-arrow {
    width: 22px;
    height: 22px;
  }
}

/* 背景装飾（9マーク） - コンテナ基準で配置 */
.page-header__bg {
  position: absolute;
  top: -80px;
  right: -65px;
  width: 362px;
  height: 486px;
  background: url("../images/cloud9-symbol-white.svg") no-repeat right top;
  background-size: contain;
  pointer-events: none;
  z-index: 0;
}
@media (min-width: 768px) {
  .page-header__bg {
    top: -140px;
    bottom: auto;
    right: 0;
    width: 350px;
    height: 470px;
    background-position: right top;
  }
}
@media (min-width: 1024px) {
  .page-header__bg {
    top: -240px;
    right: 65px;
    width: 489px;
    height: 657px;
  }
}

/* ヘッダー背景画像 */
.page-header__image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}
.page-header__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.page-header__image-sp {
  display: none;
}
@media (max-width: 767px) {
  .page-header__image-pc {
    display: none;
  }
  .page-header__image-sp {
    display: block;
  }
}
.page-header--has-image {
  background: transparent;
}
.page-header--has-image::before {
  display: none;
}
.page-header--has-image .page-header__inner {
  position: relative;
  z-index: 1;
}
.page-header--has-image .page-header__title {
  color: var(--color-white);
}
.page-header--has-image .page-header__subtitle {
  color: var(--color-white);
}
.page-header--has-image .page-header__icon {
  background-image: url("../images/icon-circle-white.svg");
}
.page-header--has-image .page-header__nav-item a {
  color: var(--color-white);
}
.page-header--has-image .page-header__nav-item a:hover {
  opacity: 0.7;
}
.page-header--has-image .page-header__nav-divider {
  color: rgba(255, 255, 255, 0.6);
}
.page-header--has-image .page-header__nav-arrow {
  background-image: url("../images/icon-arrow-down-white.png");
}
.page-header--has-image .page-header__nav-item a::after {
  background: rgba(255, 255, 255, 0.3);
}
.page-header--has-image .page-header__bg {
  display: none;
}
