@charset "utf-8";

.header.UpMove{
  animation: UpAnime 0.5s forwards;
}

.ham-wrap{
  margin-top:5rem;
}

.header.DownMove{
  animation: DownAnime 0.5s forwards;
}
@keyframes UpAnime{
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-100px);
  }
}
@keyframes DownAnime{
  from {
    opacity: 0;
    transform: translateY(-100px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.header{
  position: fixed;
  z-index:9999;
  top: 1rem;
  left: 5%;
  width: 90%;
  padding:2px 1rem;
  background-color: #FFFFFF;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  transition: 0.3s;
  box-shadow:0px 3px 6px rgba(0,0,0,0.16);
  border-radius:5px;
}

.header-left{
  width: 180px;
}

.header_menu{
  display: flex;
  flex-direction: row;
  gap: 3rem;
  align-items: center;
}

.header-right{
  display: flex;
  align-items: center;
  gap: 3rem;
}

.header-contact{
  color:#fff;
  background:#004EA4;
  border-radius:2rem;
  padding:1rem 3rem;
}

.header-contact:hover{
  color:#fff;
}

.header_menu-item a{
  text-align: center;
}

.header_menu-item strong{
  font-weight: bold;
  font-size: 12px;
  display: block;
  margin-top: 4px;
}

.parent{
  position: relative;
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:bold;
  cursor:pointer;
}

.parent::before{
  content:"";
  display:none;
  width: 150%;
  height: 50px;
  top: 100%;
  left: -25%;
  position:absolute;
}

.parent:hover::before{
  display:block;
}

.parent::after{
  content:"";
  display:block;
  width:17px;
  height:8px;
  background:url(https://j-connect-kyoto.com/system_panel/uploads/images/20260109173331776050.png) no-repeat center/contain;
}

.header-right .parent:hover .sub-menu {
  display: block;
}

.sub-menu{
  display: none;
  position: absolute;
  top: calc(100% + 2rem);
  left: 50%;
  transform: translateX(-50%);
  -webkit-transform: translateX(-50%);
  -ms-transform: translateX(-50%);
  width: -moz-max-content;
  width: max-content;
  text-align: center;
}

.sub-menu a{
  display: block;
  background-color: #fff;
  padding: .5rem;
  color: #004EA4;
  font-size: 14px !important;
  margin-bottom:4px;
}

.sp__menu .parent::after{
  display:none;
}

.sp__menu .parent > p{
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  cursor: pointer;
}

.sp__menu .parent > p::after{
  content: "";
  display: block;
  width: 17px;
  height: 8px;
  transition:0.5s;
  background: url(https://j-connect-kyoto.com/system_panel/uploads/images/20260109173331776050.png) no-repeat center / contain;
}

.sp__menu .parent:has(.open) > p::after{
  transform: scale(-1, -1);
}

.sp__menu .parent{
  flex-direction: column;
}

.sp__menu .sub-menu{
  position: relative;
  left: auto;
  transform: none;
  top:auto;
}

.sp__menu .sub-menu.open{
  display:block;
}

.hamBtn {
  cursor: pointer;
  z-index: 9999;
  transition: all .5s;
  display: flex;
  align-items: center;
  width: 57px;
  height: 33px;
  justify-content: center;
}

.hamBar {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
}

.hamBar>div {
  position: absolute;
  right: 0;
  width: 100%;
  height: 3px;
  background: #004EA4;
  transition: .5s;
}

.hamBar>div:nth-child(1) {
  top: 0; 
}

.hamBar>div:nth-child(2) {
  top: 50%;
  width: 38px;
}

.hamBar>div:nth-child(3) {
  top: 100%;
  width: 29px;
}

.hamBar.active>div:nth-child(1) {
  top: 50%;
  transform: rotate(-30deg);
}

.hamBar.active>div:nth-child(2) {
  opacity: 0;
}

.hamBar.active>div:nth-child(3) {
  top: 50%;
  transform: rotate(30deg);
  width:100%;
}


.sp__menu {
  background: #fff;
  position: fixed;
  top: 0;
  right: -450px;
  opacity: 0;
  width: 100%;
  height: 100vh;
  display:flex;
  flex-direction: column;
  padding-top: 10%;
  align-items:center;
  transition: 1s;
  z-index:-100;
  max-width: 400px;
  gap: 2rem;
}

.sp__menu .header_menu{
  flex-direction: column;
  gap: 2.5rem;
}

.ham-wrap{
  max-width:1080px;
  margin:0 auto;
  width: 90%;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem ;
  flex-direction: column;
  text-align: center;
}

.sp__menu.active {
  opacity: 1;
  visibility: visible;
  z-index:1000;
  right: 0;
}

@media (max-width: 1800px) {
  .header{
    left: 2.5%;
    width: 95%;
  }
  .header_menu{
    gap: 1rem;
  }
  .header-right{
    gap: 1rem;
  }
  .header-contact{
    padding: 0.7rem 1rem;
  }
}

@media (max-width: 1400px) {
  .header-left{
    width: 150px;
  }
  .parent,
  .header_menu-item a{
    font-size: 12px;
  }
  .header_menu-item strong{
    font-size: 10px;
  }
  .sub-menu a{
    font-size: 12px !important;
  }
}

@media (max-width: 1279px) {
  .header-right > .header_menu > .header_menu-item:not(:last-child){
    display:none;
  }
  .sp__menu{
    overflow: scroll;
    min-height: 700px;
    height: 100%;
    max-width: 350px;
    justify-content: center;
    padding: 5rem 0 10rem;
  }
  .header-left{
    width: 180px;
  }
  .parent, .header_menu-item a {
    font-size: 16px;
  }
}

@media (max-width: 1024px) {
  .hamBar>div{
    height: 3px;
  }
  .hamBtn{
    width: 48px;
    height: 32px;
  }
}


@media (max-width: 767px) {
  .sp__menu {
    width:100%;
    padding: 0;
    max-width: none;
  }
  .header {
    top:0;
    left:0;
    width:100%;
    padding: 0 2.5% 0 0;
    border-radius:0;
  }
  .header-left {
    width: 150px;
  }
  .hamBtn {
    width: 46px;
    height: 28px;
  }
  .header-contact {
    padding: 8px 20px;
  }
  .sp__menu .header_menu{
    gap: 2rem;
  }
  .sp__menu .header_menu-item a {
    font-size: 16px;
  }
  @media (max-height: 680px) {
    .sp__menu{
      min-height: auto;
    }
    .sp__menu .header_menu {
      gap: 1rem;
    }
  }
}


#header.UpMove{
  animation: UpAnime 0.5s forwards;
}

@keyframes UpAnime{
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-100px);
  }
}

/*　下に下がる動き　*/

#header.DownMove{
  animation: DownAnime 0.5s forwards;
}
@keyframes DownAnime{
  from {
    opacity: 0;
    transform: translateY(-100px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}