/* ヘッダーメインコンテナ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  z-index: 1000;
}

.header-container {
  width: 100vw;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: absolute;
  z-index: 1000;
  background-color: transparent;
  transition: background-color 0.4s ease;

  &.is-active {
    background-color: var(--color-white);
  }
}

/* ロゴ */
.header-logo {
  flex-shrink: 0;
  padding: 10px 20px;
  background-color: var(--color-white);
}

.header-logo a {
  display: block;
  text-decoration: none;
}

.header-logo-img {
  height: 50px;
  width: auto;
  max-width: 100%;
}

/* デスクトップナビゲーション */
.header-nav {
  display: flex;
  align-items: center;
  margin-inline: 30px;
}

.header-nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 30px;
}

.header-nav-item {
  margin: 0;
}

.header-nav-link {
  color: var(--color-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  padding: 10px 0;
  transition: color 0.3s ease;
  position: relative;
}

.header-nav-link:hover {
  /* color: var(--color-primary); */
}

.header-nav-link::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 0;
  width: 0;
  height: 2px;
  opacity: 0;
  background-color: rgb(120, 197, 156);
  transition: width 0.1s ease-out, opacity 0.5s ease;
}

.header-nav-link:hover::after {
  width: 100%;
  opacity: 1;
}

/* ハンバーガーメニューボタン */
.header-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 60px;
  background-color: #000;
  border: none;
  cursor: pointer;
  gap: 6px;
  transition: background-color 0.3s ease;
}

.header-hamburger span {
  width: 24px;
  height: 2px;
  background-color: #fff;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* ハンバーガーボタンが開いている状態のアニメーション */
.header-hamburger.is-active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.header-hamburger.is-active span:nth-child(2) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* モバイルナビゲーション */
.header-nav-mobile {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-100%);
  transition: all 0.3s ease;
  background-color: var(--color-primary);
  z-index: 999;
}

.header-nav-mobile.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* モバイルメニューコンテンツ（緑背景） */
.header-nav-mobile-content {
  height: 100%;
  overflow-y: auto;
  padding: 40px 20px 20px;
  /*IE(Internet Explorer)・Microsoft Edgeへの対応*/
  -ms-overflow-style: none;
  /*Firefoxへの対応*/
  scrollbar-width: none;
  /*Chrome・Safari・Operaへの対応*/
  &::-webkit-scrollbar {
    display: none;
  }
}

.header-nav-mobile-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-nav-mobile-item {
  margin-bottom: 30px;
}

/* ナビゲーション項目のヘッダー */
.nav-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);

  p {
    display: grid;
    gap: 4px;
  }
}

.nav-item-en {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 300;
  margin-right: 10px;
}

.header-nav-mobile-link {
  color: var(--color-white);
  text-decoration: none;
  font-size: 18px;
  font-weight: 400;
  flex: 1;
}

.nav-item-arrow {
  color: var(--color-white);
  font-size: 18px;
  font-weight: bold;
}

/* 学科ボタン */
.course-item {
  margin-bottom: 40px;
}

.course-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: flex-start;

  .course-button-full {
    display: grid;
    width: 100%;
    justify-content: flex-start;
  }
}

.course-button {
  background-color: var(--color-white);
  color: var(--color-primary);
  text-decoration: none;
  padding: 15px 20px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
}

.course-button:hover {
  background-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

/* モバイルメニューフッター */
.header-nav-mobile-footer {
  margin-top: 40px;
}

/* 画像セクション */
.mobile-image-section {
  position: relative;
  margin-bottom: 30px;
  border-radius: 8px;
  overflow: hidden;
}

.mobile-image-placeholder {
  width: 100%;
  height: 120px;
  background: linear-gradient(135deg, #333 0%, #666 100%);
  position: relative;
}

.mobile-image-text {
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
}

.image-tag {
  display: block;
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 5px;
  width: fit-content;
}

.image-question {
  color: var(--color-white);
  font-size: 16px;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* モバイルボタン */
.mobile-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.mobile-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
  border-radius: 8px;
}

.phone-button {
  background-color: #000;
  color: var(--color-white);
}

.contact-button {
  background-color: #B8860B;
  color: var(--color-white);
  background-image: url('/wp-content/themes/aichi_gakuin_univ_business/images/header/img_siryou.webp');
  background-repeat: no-repeat;
  background-size: cover;
  height: 80px;
}

.mobile-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.button-icon {
  font-size: 18px;
  width: 20px;
  text-align: center;
}

/* バナーボタン */
.mobile-banner {
  margin-top: 20px;
  width: 50%;
}

.banner-button {
  display: block;
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--color-white);
  text-decoration: none;
  padding: 20px;
  text-align: center;
  font-weight: 600;
  line-height: 1.4;
  transition: all 0.3s ease;
}

.banner-button:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* メニューが開いているときのボディのスクロール防止 */
body.menu-open {
  overflow: hidden;
}

/* コンテンツのパディングトップ（ヘッダーの高さ分） */
.content {
  padding-top: 80px;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
  .header-container {
    height: 60px;
  }
  
  .header-logo-img {
    height: 40px;
  }
  
  .header-nav {
    display: none;
  }
  
  .header-hamburger {
    display: flex;
    width: 60px;
    height: 60px;
  }
  
  .header-hamburger span {
    width: 20px;
  }
  
  .header-hamburger.is-active span:nth-child(1) {
    width: 26px;
    transform: rotate(35deg) translate(0px, 4px);
  }
  
  .header-hamburger.is-active span:nth-child(2) {
    width: 26px;
    transform: rotate(-35deg) translate(0px, -4px);
  }
  
  .header-nav-mobile {
    top: 0;
    height: 100vh;
    padding-top: 60px;
  }
  
  .header-nav-mobile-content {
    padding: 30px 35px 15px;
  }
  
  .content {
    padding-top: 60px;
  }
}

@media (max-width: 480px) {
  .header-container {
    width: 100%;
  }

  .header-nav-mobile.is-active {
    height: 100%;
  }
  .header-logo-img {
    height: 40px;
  }
  
  .header-hamburger {
    width: 60px;
    height: 60px;
    position: relative;
  }
  
  .header-hamburger span {
    width: 18px;
  }
  
  .header-hamburger.is-active span:nth-child(1) {
    width: 24px;
    margin-left: 5px;
    transform: rotate(35deg) translate(0px, 4.5px);
  }
  
  .header-hamburger.is-active span:nth-child(2) {
    width: 24px;
    margin-left: 5px;
    transform: rotate(-35deg) translate(0px, -4.5px);
  }
  
  .mobile-buttons {
    flex-direction: column;
  }
  
  .course-button {
    font-size: 13px;
    padding: 12px 15px;
  }
}