/* レイアウト系 */
.container {
  width: 100%;
  margin: 0 auto;
}
@media screen and (min-width: 576px) {
  .container {
    max-width: var(--container-max-width-tablet);
  }
}
@media screen and (min-width: 1200px) {
  .container {
    max-width: var(--container-max-width-normal);
  }
}

/* ヘッダーとかボタンとか、色々なページで使い回すコンポーネント */
/* ヘッダー */
.header {
  background-color: transparent;
  transition: background 0.3s, color 0.3s;
  color: var(--white);
  left: 0;
  padding: 16px 24px 12px 24px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: var(--z-index-header);
  line-height: 1.7;
}
.header .container {
  align-items: center;
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 95%;
}
/*
@media screen and (min-width: 576px) {
  .header {
    padding-top: 24px;
  }
}
*/
.header .logo__img {
  transition: filter 0.3s;
}
.logo__img {
  height: 32px;
}
@media screen and (min-width: 1200px) {
  .logo__img {
    height: 40px;
  }
}

/* ナビゲーション */
.gnav {
  position: relative;
}

.gnav__button {
  --button-size: 32px;
  background-color: var(--primary-color);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  height: var(--button-size);
  width: var(--button-size);
}
@media screen and (min-width: 576px) {
  .gnav__button {
    --button-size: 36px;
  }
}
.gnav__button .line {
  --icon-width: 18px;
  --icon-line-height: 2px;
  display: block;
  width: var(--icon-width);
  height: var(--icon-line-height);
  background-color: var(--white);
  border-radius: 2px;
  position: relative;
  top: calc(50% - var(--icon-line-height));
  left: calc(50% - var(--icon-width) / 2);
}
.gnav__button .line:first-child {
  top: calc(50% - var(--icon-line-height) - 4px);
}
.gnav__button .line:last-child {
  top: calc(50% - var(--icon-line-height) + 4px);
}

@media screen and (min-width: 1024px) {
  .gnav__button {
    display: none;
  }
}

.gnav__menu {
  display: none;
  opacity: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
}
.gnav__menu.sp.open {
  background-color: var(--white);
  display: block;
  font-size: var(--font-size-base);
  height: 100vh;
  left: 0;
  opacity: 1;
  position: fixed;
  top: 0;
  width: 100vw;
}
.gnav__menu.sp.open .sp-menu__head {
  padding: 24px;
}
.gnav__menu.sp.open .sp-menu__close-btn {
  --icon-width: 32;
  --icon-height: 24;
  --bar-height: 2px;
  position: relative;
  margin-left: auto;
  display: block;
  width: calc(var(--icon-width) * 1px);
  height: calc(var(--icon-height) * 1px);
}
.gnav__menu.sp.open .sp-menu__close-btn .line {
  --rotate-deg: (var(--icon-height) / var(--icon-width)) * 180;
  display: block;
  width: calc(var(--icon-width) * 1px);
  height: var(--bar-height);
  background-color: var(--primary-color);
  border-radius: 2px;
}
.gnav__menu.sp.open .sp-menu__close-btn .line:first-child {
  position: absolute;
  top: calc(50% - var(--bar-height) / 2);
  left: 0;
  transform: rotate(calc(var(--rotate-deg) * 1deg));
}
.gnav__menu.sp.open .sp-menu__close-btn .line:last-child {
  transform: rotate(calc(var(--rotate-deg) * -1deg));
  position: absolute;
  top: calc(50% - var(--bar-height) / 2);
  left: 0;
}
.gnav__menu.sp.open .list .list__item {
  --list-item-btn-width: 120px;
}
.gnav__menu.sp.open .list .list__item .link {
  display: inline-block;
  width: 100%;
  padding: 16px 24px;
  text-align: center;
}
.gnav__menu.sp.open .list .list__item .link:active,
.gnav__menu.sp.open .list .list__item .link:touch {
  background-color: var(--imas-blue-1);
  font-weight: bold;
  opacity: 0.8;
}
.gnav__menu.sp.open .list .list__item:last-child {
  display: flex;
  justify-content: center;
  line-height: 1;
  padding-top: 24px;
}
.gnav__menu.sp.open .list .list__item:last-child .link {
  background-color: var(--primary-color);
  border-radius: 24px;
  max-width: 160px;
  color: var(--white);
}

@media screen and (min-width: 1024px) {
  .gnav__menu:not(.sp) .list__item:last-child .contact-link {
    color: var(--white);
  }
}
@media screen and (min-width: 1024px) {
  .gnav__menu:not(.sp) {
    display: block;
    opacity: 1;
  }
  .gnav__menu:not(.sp) .list {
    display: flex;
    gap: 8px;
    align-items: center;
  }
  .gnav__menu:not(.sp) .list .list__item {
    --list-item-btn-width: 132px;
    text-align: center;
    display: inline-block;
    padding: 4px 8px;
    width: var(--list-item-btn-width);
    vertical-align: 2px; /* TODO: マジックナンバー */
  }
  .gnav__menu:not(.sp) .list .list__item:last-child {
    background-color: var(--primary-color);
    border-radius: 24px;
  }
  @media screen and (min-width: 1200px) {
    .gnav__menu:not(.sp) .list .list__item:last-child {
      display: inline-block;
      padding: 4px 8px;
    }
  }
  .gnav__menu:not(.sp) .list .list__item:last-child:hover {
    background-color: var(--primary-color);
    opacity: 0.8;
  }
  .gnav__menu:not(.sp) .list .list__item:not(:last-child) {
    position: relative;
  }
  .gnav__menu:not(.sp) .list .list__item:not(:last-child)::before {
    --underline-width: 60px;
    content: "";
    position: absolute;
    bottom: 0;
    left: calc(50% - var(--underline-width) / 2);
    height: 2px;
    width: 0px;
    background-color: var(--imas-blue-4);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .gnav__menu:not(.sp) .list .list__item:not(:last-child):hover::before {
    width: var(--underline-width);
  }
  .gnav__menu:not(.sp) .list .list__item a {
    color: var(--imas-blue-4);
    font-size: var(--font-size-sm);
    font-weight: bold;
    text-decoration: none;
  }
  @media screen and (min-width: 1200px) {
    .gnav__menu:not(.sp) .list .list__item a {
      font-size: var(--font-size-base);
    }
  }
}

.gnav__menu.show {
  display: block;
}

/* ======== sectionパターン ======== */

.section--blue {
  background: linear-gradient(90deg, #eaf3fa 0%, #f7fafc 100%);
}
.section--bg {
	background: linear-gradient(120deg, var(--imas-blue-4) 0%, var(--imas-blue-3) 100%);
}


/* ======== hoverパターン ======== */

/* 1:hover-underline：下線が左→右にアニメーション */
.hover-underline {
  position: relative;
  transition: color 0.2s;
}
.hover-underline::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--imas-blue-3); 
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(.77,0,.175,1);
}
.hover-underline:hover::after,
.hover-underline:focus::after {
  transform: scaleX(1);
}
.hover-underline:hover,
.hover-underline:focus {
  color: var(--imas-blue-3);
}



/* 2:hover-bg-fade：背景がなめらかに変化 */
.hover-bg-fade {
  transition: background 0.3s, color 0.2s;
  border-radius: 8px; /* 丸みはお好みで */
}
.hover-bg-fade:hover,
.hover-bg-fade:focus {
  background: var(--background-color);  /* 薄いグレー推奨。ブルー系なら#eaf3faなども */
}


/* 3:hover-btn：ボタンのホバー */
.hover-btn:hover {
	background-color: var(--imas-blue-1);
	color: var(--imas-blue-4);
}


/* 
見出し （周年ページ）
h2,
.h2 {
  align-items: center;
  display: flex;
  flex-direction: column;
  font-family: var(--serif);
  line-height: 1.2;
  margin-bottom: 24px;
  text-align: center;
  width: 100%;

  @media screen and (min-width: 1200px) {
    align-items: baseline;
    flex-direction: row;
    gap: 12px;
    margin-bottom: 56px;
  }
}

h2 .ja,
.h2 .ja {
  color: var(--primary-color);
  display: inline-block;
  font-size: var(--font-size-xxl);
  font-weight: bold;
  @media screen and (min-width: 1200px) {
    font-size: calc(48 / 16 * 1rem);
  }
}

h2 .en,
.h2 .en {
  color: var(--accent-color);
  display: inline-block;
  font-size: var(--font-size-md);
  font-weight: lighter;
  @media screen and (min-width: 1200px) {
    font-size: calc(24 / 16 * 1rem);
  }
}

h3,
.h3 {
  color: var(--text-color);
  font-family: var(--serif);
  font-size: var(--font-size-md);
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 18px;
  @media screen and (min-width: 576px) {
    font-size: var(--font-size-xl);
  }
}

h4,
.h4 {
  color: var(--text-color);
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 9px;
}
*/
/* お問い合わせ  ------------------------- */
.contact {
  .content {
    --gap-for-shadow: 20px;
    position: relative;
    .image__outer {
      position: relative;
      width: 100%;
      height: auto;
      margin-bottom: calc(24px + var(--gap-for-shadow));

      .image {
        width: calc(100% - var(--gap-for-shadow));
        height: auto;
        position: relative;
        right: calc(var(--gap-for-shadow) / -1);
        top: 0;
      }
    }
    .image__outer::before {
      position: absolute;
      top: var(--gap-for-shadow);
      left: 0;
      content: "";
      display: block;
      width: calc(100% - var(--gap-for-shadow));
      height: 100%;
      background-color: var(--imas-blue-1);
    }

    @media screen and (min-width: 576px) {
      .image__outer {
        width: 100%;
        max-width: 464px;
        margin: 0 auto calc(48px + var(--gap-for-shadow));
      }
      .image__outer::before {
        top: var(--gap-for-shadow);
      }
    }

    .body {
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 24px;
      .text {
        text-align: center;
      }
    }

    @media screen and (min-width: 576px) {
      .body {
        gap: 48px;
      }
    }
  }
}

/* 問い合わせボタン */
a.btn.conversion {
  display: block;
  margin: 0 auto;
  background-color: var(--white);
  border: 1px solid var(--primary-color);
  width: 80%;
  padding: 12px 16px;
  position: relative;
  text-align: center;
}
a.btn.conversion:before {
  --btn-bg-height: 6px;
  --btn-bg-width: 32px;
  content: "";
  background-color: var(--white);
  display: inline-block;
  width: var(--btn-bg-width);
  height: var(--btn-bg-height);
  position: absolute;
  top: calc(50% - var(--btn-bg-height) / 2);
  right: calc((var(--btn-bg-width) / 2) * -1);
}
a.btn.conversion:after {
  --btn-bg-height: 1px;
  --btn-bg-width: 32px;
  content: "";
  background-color: var(--primary-color);
  display: inline-block;
  width: var(--btn-bg-width);
  height: var(--btn-bg-height);
  position: absolute;
  top: calc(50% - var(--btn-bg-height) / 2);
  right: calc((var(--btn-bg-width) / 2) * -1);
}
a.btn.conversion:hover {
  font-weight: bold;
  opacity: 0.8;
}
a.btn.conversion:hover::after {
  animation: conversion-btn-back-animation 1s ease-in-out;
}
@media screen and (min-width: 576px) {
  a.btn.conversion {
    max-width: 290px;
  }
}
@keyframes conversion-btn-back-animation {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(10px);
  }
  100% {
    transform: translateX(0);
  }
}

/* ヘッダースクロール切り替え */
/* ======== 1. 初期（MV時）は白文字 ======== */
.header .gnav__menu:not(.sp) .list__item a {
  color: #fff !important;
  transition: color 0.3s;
}
.header .gnav__menu:not(.sp) .list__item:last-child {
  background-color: var(--primary-color);
}
.header .gnav__menu:not(.sp) .list__item:last-child a.contact-link {
  color: #fff !important;
}
.header .gnav__menu:not(.sp) .list__item:not(:last-child)::before {
  background-color: #fff !important;
}

/* ======== 2. スクロール後は青文字に ======== */
.header.scrolled .gnav__menu:not(.sp) .list__item a {
  color: var(--imas-blue-4) !important;
}
.header.scrolled .gnav__menu:not(.sp) .list__item:last-child a.contact-link {
  color: #fff !important;
}
/* 下線をブルーに */
.header.scrolled .gnav__menu:not(.sp) .list__item:not(:last-child)::before {
  background-color: var(--imas-blue-4) !important;
}
/* スクロールで背景登場 */
.header.scrolled {
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/*  フッター  */
.footer {
  background: #0a1a3c;
  color: #fff;
  padding: 4rem 5rem;
  line-height: 1.7;
}
.footer-main {
  display: flex;
  width: 80%;
  margin: auto;
}
.footer-left {
  width: 70%;
  font-size: 1.4rem;
  font-weight: bold;
  letter-spacing: .2rem;
  margin-bottom: 20px;
}
.footer-left p {
  margin-top: 0;
}
.footer-right {
  width: 30%;
  margin-top: 8px;
}
.footer-links {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
  justify-content: space-around;
}
@media (max-width: 834px) {
	.footer-links {
		justify-content: unset;
		gap: 0;
	}
}
@media (max-width: 480px) {
	.footer-links {
		justify-content: space-between;
	}
	.footer {
		padding: 30px 20px;
	}
	.footer-main {
		display: block;
	}
	.footer-right {
		width: auto;
		line-height: 30px;
		margin: 0;
	}
}
.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links ul li {
  margin-bottom: 8px;
}
.footer-links_site {
  font-size: .8rem;
  color: #fff;
}
.footer-links_page {
  color: #fff;
  text-decoration: none;
  font-size: .9rem;
}
.footer-bottom {
  width: 80%;
  margin: 30px auto 0;
  font-size: 12px;
  border-top: 0.5px solid #fff;
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom a {
  color: #ccc;
}
