.l-header {
  width: 100%;
  z-index: 101;
  position: sticky;
  height: 70px;
}

@media (max-width: 1023px) {
  .l-header {
    background: #fff;
    top: 0;
    left: 0;
  }
}

.p-header {
  width: 100%;
  position: fixed;
  margin: auto;
  background: #fff;
  box-shadow: 0 4px 4px -4px rgba(0, 0, 0, 0.1);
}

.p-header::after {
  content: '';
  display: block;
  width: 100%;
  height: 10px;
  position: absolute;
  left: 0;
  bottom: -4px;
}

@media (max-width: 1023px) {
  .p-header {
    position: static;
    border-radius: 0;
    padding: 0 16px;
  }
}

.p-header__logo {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.p-header__logo a {
  display: block;
  width: 222px;
}

@media (max-width: 1023px) {
  .p-header__logo a {
    width: auto;
    height: 48px;
  }
}

.p-header__logo a img {
  -o-object-fit: contain;
  object-fit: contain;
  width: auto;
  height: 50px;
}

.p-header__container {
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 22px 10px 30px;
}

@media (max-width: 1023px) {
  .p-header__container {
    padding: 10px 8px 10px 0;
    align-items: center;
  }
}

.p-header__menu {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.p-header__menu__item {
  display: inline-block;
  margin-right: 20px;
  list-style-type: none;
}

.p-header__menu__item a {
  text-decoration: none;
  color: #333;
  font-size: 15px;
  font-weight: 600;
}

.p-header__menu__item__button__contact a {
  background: #fff;
  color: #f97316;
  font-weight: 700;
  line-height: 1;
  padding: 12px 22px;
  border-radius: 28px;
  display: inline-block;
  border: 2px solid #f97316;
}

.p-header__menu__item__button a {
  background: #f97316;
  color: #fff;
  font-weight: 700;
  line-height: 1;
  padding: 12px 22px;
  border-radius: 28px;
  display: inline-block;
}

.p-header__menu__item a:hover {
  color: #08a298;
}

.p-header__menu__item__button a:hover {
  color: #fff;
}

.p-header__menu__item__button__contact a:hover {
  color: #f97316;
}

@media (max-width: 768px) {
  .p-header__menu {
    display: block;
    text-align: center;
  }

  .p-header__menu__item {
    display: block;
    margin-right: 0;
    margin-bottom: 10px;
  }
}

.p-header__nav {
  display: none;
}

.p-header__btn {
  display: none;
  /* Initially hide the button */
}

.p-hamburger__item {
  display: block;
  width: 30px;
  height: 20px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.p-hamburger__bar {
  display: block;
  position: absolute;
  width: 100%;
  height: 2px; /* 線の太さ */
  background-color: #333; /* 線の色 */
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

/* 1本目 */
.p-hamburger__bar:nth-child(1) {
  top: 0;
}

/* 2本目 */
.p-hamburger__bar:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

/* 3本目 */
.p-hamburger__bar:nth-child(3) {
  bottom: 0;
}

/* メニューオープン時のアニメーション */

/* 1本目: 45度回転 */
.p-header__btn.is-active .p-hamburger__bar:nth-child(1) {
  transform: translateY(9px) rotate(45deg); /* 10pxは真ん中のバーの位置に移動させるため */
}

/* 2本目: 透明にして非表示 */
.p-header__btn.is-active .p-hamburger__bar:nth-child(2) {
  opacity: 0;
}

/* 3本目: -45度回転 */
.p-header__btn.is-active .p-hamburger__bar:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg); /* -10pxは真ん中のバーの位置に移動させるため */
}

/* --- SPナビゲーションのスタイル (変更なし、開閉JSに依存) --- */
@media (max-width: 1023px) {
  .p-header__nav {
    display: none;
    /* ... 既存のナビゲーションスタイル ... */
  }

  .p-header__nav.is-open {
    display: block;
  }

  /* 他の既存のメディアクエリ内スタイルはそのまま保持してください */
}

.icon-close {
  display: none;
}

.p-header__btn.p-hamburger.is-active .icon-open {
  display: none;
}

.p-header__btn.p-hamburger.is-active .icon-close {
  display: block;
}

@media (max-width: 1023px) {
  .p-header__menu {
    display: none;
  }

  .p-header__nav {
    display: none;
    /* Initially hide the navigation in mobile */
    background-color: #fff;
    /* Same as your header's background */
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
  }

  .p-header__nav.is-open {
    display: block;
    /* Show nav when open */
  }

  .p-header__btn {
    display: block;
    width: 44px; /* タップしやすいサイズに */
    height: 44px;
    background: none;
    border: none;
    padding: 0;
    position: relative;
    z-index: 110; /* メニューより上に配置 */
    cursor: pointer;
  }

  .p-gnav__list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .p-gnav__item {
    border-bottom: 1px solid #e5e5e5;
    /* Optional: adds a line between items */
    text-align: center;
  }

  .p-gnav__link {
    display: block;
    padding: 15px;
    color: #333;
    text-decoration: none;
    /* Adjust to your link style */
  }
  #js-menu {
    display: none;
  }
  #js-menu.is-open {
    display: block;
  }
}

/* フッター */

.l-footer {
  background-color: #fff;
  color: white;
  padding: 20px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: flex-start;
}

.footer-brand,
.footer-social {
  margin-bottom: 20px;
}

.footer-brand a img {
  width: 150px;
  height: auto;
  margin-bottom: 20px;
}

.footer-social a {
  display: inline-block;
  margin-right: 10px;
}

.footer-social a svg {
  width: 24px;
  height: 24px;
  fill: #3b566c;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-links a {
  color: #3b566c;
  text-decoration: none;
  margin-bottom: 10px;
  margin-right: 20px;
}

.p-footer {
  text-align: center;
  margin-top: 20px;
}

.p-footer__copy small {
  color: #3b566c;
}

@media (max-width: 768px) {
  .l-footer {
    padding-top: 30px;
  }

  .footer-brand {
    margin-bottom: 10px;
  }

  .footer-content {
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
    order: 3;
  }

  .footer-links a {
    margin-right: 30px;
  }
}

/* AiBOT */

.medrock-chat-container {
  position: fixed;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.medrock-chat-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.medrock-chat-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: #5a9dd1;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 10000;
}

.medrock-chat-toggle svg {
  width: 30px;
  height: 30px;
  fill: white;
}

.p-single-aibot {
  height: 100%;
  width: 100%;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  position: absolute;
  background: linear-gradient(124deg, #ffffff, #fafafa, #f5f5f5, #f0f0f0, #ebebeb, #e6e6e6, #e1e1e1, #dcdcdc);
  background-size: 1800% 1800%;
  -webkit-animation: softMonoGradient 30s ease infinite;
  -moz-animation: softMonoGradient 30s ease infinite;
  -o-animation: softMonoGradient 30s ease infinite;
  animation: softMonoGradient 30s ease infinite;
}

@-webkit-keyframes softMonoGradient {
  0% {
    background-position: 0% 82%;
  }

  50% {
    background-position: 100% 19%;
  }

  100% {
    background-position: 0% 82%;
  }
}

@-moz-keyframes softMonoGradient {
  0% {
    background-position: 0% 82%;
  }

  50% {
    background-position: 100% 19%;
  }

  100% {
    background-position: 0% 82%;
  }
}

@-o-keyframes softMonoGradient {
  0% {
    background-position: 0% 82%;
  }

  50% {
    background-position: 100% 19%;
  }

  100% {
    background-position: 0% 82%;
  }
}

@keyframes softMonoGradient {
  0% {
    background-position: 0% 82%;
  }

  50% {
    background-position: 100% 19%;
  }

  100% {
    background-position: 0% 82%;
  }
}
