/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: transparent;
    z-index: 1000;
}

@media screen and (max-width: 1200px) {
    .header {
        background-color: var(--color-white);
    }
}
@media screen and (max-width: 1024px) {
    .header {
        height: 5rem;
    }
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 6rem;
}
@media screen and (min-width: 1900px) {
    .header-container {
        height: 7.3rem;
    }
}
@media screen and (max-width: 1500px) {     
    .header-container {
        height: 5rem;
    }
}
@media screen and (max-width: 1200px) {
    .header-container {
        padding: 1.22rem 3rem 1.22rem 1.53rem;
    }
}
@media screen and (max-width: 1024px) {
    .header-container {
        height: 5rem;
        padding: 1.22rem 1.5rem 1.22rem 1rem;
    }
}

/* Logo Styles */
.logo-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 5vw;
    position: relative;
}
@media screen and (max-width: 1600px) {
    .logo-container {
        padding: 0 4vw;
    }
}
@media screen and (max-width: 1200px) {
    .logo-container {
        padding: 15px 0;
    }
}

.logo {
    position: relative;
    display: block;
}

.logo img {
    width: 19rem;
    height: auto;
    transition: opacity 0.3s ease;
}

.logo-white {
    opacity: 1;
    position: relative;
}

.logo-color {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
}

/* ロゴ切り替え時のスタイル */
.header.scrolled .logo-white {
    opacity: 0;
}

.header.scrolled .nav-cta-container{
  box-shadow: none;
}

.header.scrolled .header-container {
  background-color: var(--color-white);
}

.header.scrolled .logo-white {
  opacity: 0;
}

@media screen and (max-width: 1600px) {
    .logo img {
        width: 11rem;
    }
}
@media screen and (max-width: 1024px) {
    .logo img {
        width: 9rem;
    }
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-menu span {
    width: 100%;
    height: 2px;
    background-color: var(--color-lightblue);
    transition: all var(--transition-medium);
}

/* ハンバーガーメニューのアクティブ状態 */
.hamburger-menu.is-active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger-menu.is-active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.is-active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media screen and (max-width: 1200px) {
    .hamburger-menu {
        display: flex;
    }
}

/* Navigation Styles */
.nav {
    display: flex;
    align-items: center;
    align-content: center;
    justify-content: center;
    height: 100%;
}

.nav-list {
    display: flex;
    gap: 3.75vw;
    width: 100%;
    height: 100%;
}

.nav-item {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    height: auto;
    width: 100%;
    color: var(--color-black-navy);
    font-family: var(--font-family-en);
    font-weight: 500;
    font-size: var(--font-size-text);
    transition: color var(--transition-slow);
    justify-content: center;
}
.nav-title-with-arrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    right: 50%;
    height: 0.625rem;
    background: linear-gradient(90deg, #00547D 0%, #0297E0 100%);
    transition: left var(--transition-slow) ease, right var(--transition-slow) ease, opacity 0s var(--transition-slow);
    opacity: 0;
}
@media (hover: hover) and (pointer: fine) {
.nav-title-with-arrow:hover::after {
    opacity: 1;
}

.nav-item:hover {
    color: var(--color-navy);
}
}

.nav-link {
    color: inherit;
    display: flex;
    align-items: center;
    }

.nav-title-with-arrow {
    display: flex;
    align-items: center;
    align-content: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
  }
  .nav-title-with-arrow .nav-link {
    flex: 1;
    display: block;
    text-align: center;
  }
  .header-arrow {
    margin-left: 0rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
    transition: transform 0.3s;
  }
  
  .nav-item.open .header-arrow {
    transform: rotate(180deg);
  }
  .submenu {
    display: none;
    flex-direction: column;
    margin-top: 1.56rem;
  }
  .nav-item.open > .submenu {
    display: flex;
    width: 100%;
    color: var(--color-contents-description);
    gap: 1.2rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.35rem;
    max-height: 500px;
    opacity: 1;
    margin-bottom: 0;
  }
  .submenu-txt-en {
    font-weight: 600;
  }
  .submenu-arrow {
    display: inline-block;
    width: 1rem;
    height: 0.5rem;
    margin-left: 0.5rem;
    vertical-align: middle;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="15" height="9" viewBox="0 0 15 9" fill="none"><path d="M1 1L7.5 7L14 1" stroke="%2300547D" stroke-width="2" stroke-linecap="round"/></svg>') no-repeat center/contain;
    transition: transform 0.3s;
  }
  .nav-item.open .submenu-arrow {
    transform: rotate(180deg);
  }

  .nav-title-with-arrow {
    height: 100%;
  }
  .nav-title-with-arrow::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        right: 50%;
        height: 0.625rem;
        background: linear-gradient(90deg, #00547D 0%, #0297E0 100%);
        transition: left var(--transition-slow) ease, right var(--transition-slow) ease, opacity 0s var(--transition-slow);
        opacity: 0;
    }
    .nav-title-with-arrow:hover::after {
        opacity: 1;
    }
  
  .submenu li {
    position: relative;
    padding-left: 1.5rem;
  }
  .submenu li::before {
    content: '-';
    position: absolute;
    left: 0;
    top: 0;
    color: #80A9BE;
    font-size: 1.3rem;
    font-weight: 500;
    line-height: 1;
  }
    

  .nav-item.open > .nav-title-with-arrow > .submenu-arrow {
    transform: rotate(180deg);
  }
  .submenu-icon {
    margin-left: 0.94rem;
    display: inline-flex;
    vertical-align: middle;
  }
  .submenu-icon svg {
    display: block;
  }
  
@media screen and (max-width: 1200px) {
    .nav {
      height: auto;
        width: 100%;
        justify-content: flex-start;
        align-items: flex-start;
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 1.875rem;
    }


    .nav-item {
        font-size: 1.5rem;
        font-family: var(--font-family-en);
        font-weight: 600;
        letter-spacing: -0.01375rem;
    }
}

@media screen and (max-width: 768px) {
  .nav-item {
    font-size: 1.37rem;
}
}

/* PC用ナビのホバーアニメーション */
.pc-nav .nav-item {
  position: relative;
  width: 100%;
  height: 100%;
}
.pc-nav .nav-item::after {
  content: '';
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 0;
  height: 0.625rem;
  background: linear-gradient(90deg, #00547D 0%, #0297E0 100%);
  opacity: 0;
  transition: left 0.4s cubic-bezier(0.4,0,0.2,1), right 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.2s;
  z-index: 1;
}
.pc-nav .nav-item:hover::after {
  left: 0;
  right: 0;
  opacity: 1;
}

@media screen and (max-width: 1200px) {
  .pc-nav .nav-item::after {
    display: none !important;
  }
}

/* PC用ナビの.nav-title-with-arrowホバーアニメーション */
.pc-nav .nav-title-with-arrow {
  position: relative;
  display: inline-block;
  padding: 0 0.5em;
  line-height: 1.8;
}

.pc-nav .nav-title-with-arrow::after {
  content: '';
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, #00547D 0%, #0297E0 100%);
  opacity: 0;
  transition: left 0.4s cubic-bezier(0.4,0,0.2,1), right 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.2s;
  z-index: 1;
  pointer-events: none;
}

.pc-nav .nav-title-with-arrow:hover::after,
.pc-nav .nav-title-with-arrow:focus::after {
  left: 0;
  right: 0;
  opacity: 1;
}

.pc-nav .nav-title-with-arrow:not(:hover):not(:focus)::after {
  left: 50%;
  right: 50%;
  opacity: 0;
}

@media screen and (max-width: 1200px) {
  .pc-nav .nav-title-with-arrow::after {
    display: none !important;
  }
}

/* Dropdown Menu Styles */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  border-radius: 8px;
  box-shadow: 0px 0px 15px 0px rgba(0, 132, 206, 0.20);
  border: 1px solid rgba(0, 0, 0, 0.05);
  min-width: 220px;
  padding: 1.3rem 1.87rem;
  margin-top: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-10px);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1001;
}


.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dropdown-menu li {
  margin: 0;
  width: 100%;
}

.dropdown-menu a {
  display: block;
  padding: 1.08rem .5rem;
  font-size: var(--fontSize-pcS);
  font-style: normal;
  font-weight: 500;
  line-height: 1.875rem; /* 166.667% */
  letter-spacing: 0.09rem;
  transition: all 0.3s ease;
  border-radius: 0;
  border-bottom: 1px solid var(--grayLight);
  text-align: left;
  color: var(--color-black-navy);
}

.dropdown-menu ul > li:first-child a {
  padding-top: 0;
}

.dropdown-menu ul > li:last-child a {
  border-bottom: none;
  padding-bottom: 0;
}


.dropdown-menu a:hover {
  color: var(--color-navy);
}

/* Ensure dropdown stays visible when hovering over it */
.nav-item:hover .dropdown-menu,
.dropdown-menu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-list > li > a {
  min-width: 70px;
  display: inline-flex;
  text-align: center;
  justify-content: center;
}