/* ブレークポイント
(pc-1024px)(tablet-768px - 1023px)(SP-767px)
 */

/*.FVの高さ指定 */
*{
  --fv-pc:58vh;
  --fv-sp:55vh;
}

 /*.header.php */
header{
  position: relative;
  overflow: hidden;

  background-image: url(../img/sa3_fv_sp.webp);
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% auto;
  width: 100%;
  height: var(--fv-sp);
  max-height: 587px;
  text-align: center;

  @media screen and (min-width: 768px) {
    background-image: url(../img/sa3_fv_pc.webp);
    height: var(--fv-pc);
    background-position: center bottom;
    background-size: 100% auto;
  }
}

/*ディスクリプション背景グレーぼかし入れ*/
.desc-box{
  position: absolute;
  top: 80px;
  left: 0;
  width: 100%;
  height: 80%;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  text-align: center;
  color: var(--base-color);

  background-image: linear-gradient(rgba(205, 213, 219, 0) 50%, rgba(205, 213, 219, 1));

  @media screen and (min-width: 768px) {
    background-image: linear-gradient(rgba(205, 213, 219, 0) 80%, rgba(205, 213, 219, 1));
    top: 0;
    width: 100%;
    height: var(--fv-pc);
    justify-content: flex-end;
  }
}
.desc-box h1{  
  margin:0 auto;
  padding: 0 15px;
  font-size: 1.5rem;
  letter-spacing: -0.05em;
  line-height: 2.0rem;
  font-weight: 800;
  @media screen and (min-width: 1023px) {
    font-size: 2rem;
  }
}
p.description{
  margin: 0 auto;
  padding: 0 20px 15px;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.1rem;
  text-align: left;
  letter-spacing: -0.05em;

  @media screen and (min-width: 1023px) {
    font-size: 1.2rem;
    font-weight: 300;
    margin-top: 20px;
    text-align: center;
  }
}

.toplink{
  position: relative;
  z-index: 10;
  width:100%;
  text-align: center;
  background-color: var(--toplink01);
  padding:10px 80px 30px;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  margin: 0 auto;
}
.toplink-box {
  background-color: var(--white-color);
  max-width: 450px;
  height: auto;
  padding:20px 10px 0;
  margin: 0 auto;
}
.toplink-box:nth-of-type(2){
  margin: 0 15px;
}
.toplink-box img{
  width: 90%;
  height: auto;
}
.toplink-box h3{
  font-size: 0.9rem;
  padding: 10px 0;
  margin: 0;
  @media screen and (min-width: 768px) {
    font-size: 0.7rem;
    padding: 10px 0 0 0;
  }
}
.carousel-btn {
  display: none;
}

/* SPカルーセル用スタイルの追加 */
@media (max-width: 767px) {
  /* ボタンとカルーセルを重ねるための親要素 */
  .carousel-container {
    position: relative;
    width: 100%;
  }
  .toplink {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-left: 5%;
    padding-right: 5%;
    gap: 3px;
    scroll-behavior: smooth; /* ←ボタン移動をスムーズにするために追加 */
  }
  .toplink .toplink-box {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    scroll-snap-align: center; 
    text-align: center;
    box-sizing: border-box;
  }
  .toplink::-webkit-scrollbar {
    display: none;
  }
  /* ボタンの共通デザイン */
  .carousel-btn {
    display: flex;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: color-mix(in srgb, var(--base-color) 50%, transparent);
    color: var(--white-color);
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    z-index: 30;
  }
  /* 左ボタンの位置 */
  .prev-btn { left: 10px; }
  /* 右ボタンの位置 */
  .next-btn { right: 10px; }
}


/*.ヘッダーメニュー */
/*template-parts_hamburger.php menug.php*/
div.menu{
  padding-top: 10px;
  position: relative;
  z-index: 80;
  text-align: left;

  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.menu > div{
  display: flex;
  align-items: center;
  margin-left: 10px;
}
.menu img{
  width: 80px;
  height: auto;
  margin: 10px;
}
.menu a, .menu p{
  margin: 5px 0 0 10px;
  font-size: 90%;
  font-weight: 600;
}
.gnav__list{
  display: flex;
  width: 100%;
}
header div.gnav__list{
    background-color: rgba(255,255,255, 0.9);
    padding: 10px;
}
.gnav__item{
  margin-right: 12px;
}

.gnav__item::before{
  content: "｜";
}
.gnav__item:nth-of-type(4)::after{
  content: "｜";
  margin-left: 12px;
}
.gnav__item a{
}

/* SP時PC用非表示 */
@media (max-width: 767px) {
  .gnav__item { 
      display: none; 
  }
  header div.gnav__list{
    background-color: transparent;
  }
}
/* PC時SP用非表示 */
@media (min-width: 1024px) {
  .hamburger-btn {
      display: none;
  }
  .sp-nav {
      display: none;
  }
}

@media (max-width: 767px) {
  /* ボタン自体のサイズと位置を指定 */
  .hamburger-btn {
    display: block;
    position: absolute; /* 画面に固定（お好みに合わせて absolute でも可） */
    top: 10px;       /* 上からの位置 */
    right: 10px;     /* 右からの位置 */
    width: 44px;     /* ボタンの横幅 */
    height: 44px;    /* ボタンの縦幅（押し accommodation のための余白を含む） */
    cursor: pointer;
    z-index: 100;  /* 一番前 */
    background: none;
    border: none;
    padding: 0;
    background-color: var(--white-color);
    border-radius: 10px;
  }

  /* 3本線共通スタイル */
  .hamburger-btn .line {
    display: block;
    position: absolute;
    left: 10%;        /* ボタン内での左右の余白 */
    width: 80%;       /* 線の長さ */
    height: 4px;      /* 線の太さ */
    transition: all 0.3s ease;
    background-color: var(--base-color);
  }
  /* 位置をずらして3本線 */
  .hamburger-btn .line:nth-child(1) {
    top: 12px;
  }
  .hamburger-btn .line:nth-child(2) {
    top: 20px; /* 中央 */
  }
  .hamburger-btn .line:nth-child(3) {
    top: 28px;
  }

  /* --- クリック時（.is-active）のアニメーション --- */
  /* 1本目を右に45度回転、中央へ移動 */
  .hamburger-btn.is-active .line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  /* 2本目を透明にする */
  .hamburger-btn.is-active .line:nth-child(2) {
    opacity: 0;
  }
  /* 3本目を左に45度回転、中央へ移動 */
  .hamburger-btn.is-active .line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /*.SP用メニュー背景 */
  .sp-nav {
      position: fixed; 
      
      /* 画面の右上を基準にする（fixedにするためtopも調整） */
      top: 20px;
      right: 5%; 
      width: 90%;
      
      text-align: center;
      height: 42vh;
      cursor: pointer;
      z-index: 90;
      border: 2px solid var(--dgray01-color);
      background-color: var(--shadow-color);
      border-radius: 6px;
      padding: 6px;
      transition: all 0.3s;

      display: flex;
      align-items: center;
      justify-content: center;

      /* 「自分自身の横幅＋余白分」だけ右に飛ばす*/
      transform: translateX(120%); 
  }

  /* メニュー開時 */
  .sp-nav.is-open {
      transform: translateX(0); 
  }
  .sp-nav__inner {
    width: 95%;
    background-color: var(--white-color);
    border-radius: 8px;
    margin: auto;
  }
  .sp-nav__item a {
    display: grid;
    place-items: center;

    color: var(--base-color);
    text-decoration: none;
    margin: 0;
  
    width: 100%;
    height: 8vh;
    border-bottom: 1px solid var(--dgray01-color);
  }
  .sp-nav__item:last-child a {
    border-bottom: none;
  }
}
