@charset "UTF-8";

.utility_h_firstview {
  background: #fff;
  color: #000;

  position: relative;
  width: 100%;
  line-height: 1.5;
  --js-firstview-form-bg-height: 260px;
}

.utility_h_firstview .h_firstview_bg {
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
  z-index: 0;
}

.utility_h_firstview .h_firstview_bg img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
  position: relative;
}

.utility_h_firstview_inner {
  margin-inline: auto;
  display: flex;
  z-index: 1;
  position: relative;
  padding-inline: 14px;
}

.utility_h_firstview .h_catch {
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  font-weight: 500;
  word-wrap: break-word;
}

.utility_h_firstview .h_ttl {
  font-size: clamp(3.2rem, 7vw, 5.4rem);
  font-weight: 700;
  margin-top: 0.5em;
  word-wrap: break-word;
}

.utility_h_firstview .h_sub {
  font-size: 1.6rem;
  font-weight: 400;
  margin-top: 0.7em;
  word-wrap: break-word;
}

.utility_h_firstview .h_firstview_img img {
  display: block;
  height: auto;
  width: 100%;
  margin-top: 40px;
}

.utility_h_firstview .h_keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 1.2em;
}

.utility_h_firstview .h_keywords li {
  background-color: #fff;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.08);
  font-size: 1.3rem;
  line-height: 1.3;
  padding: 0.5em 1em;
  font-weight: 400;
}

.utility_h_firstview .h_keywords li a:hover {
  text-decoration: none;
  cursor: pointer;
}

@media screen and (max-width: 767px) {
  .utility_h_firstview {
    margin-top: 40px;
    padding-block: 36px 0;
    background: #fff;
  }

  .utility_h_firstview_inner {
    flex-direction: column;
    gap: 40px;
    padding-inline: 0;
  }

  .utility_h_firstview .h_ttlarea,
  .utility_h_firstview .h_form {
    padding-inline: 20px;
  }

  .utility_h_firstview .h_form {
    background: transparent;
    border-radius: 4px;
    padding-bottom: 36px;
    position: relative;
    width: 100%;
  }

  .utility_h_firstview .h_form::before {
    background: #fff;
    bottom: 0;
    content: "";
    left: 0;
    position: absolute;
    right: 0;
    top: var(--js-firstview-form-bg-height);
    z-index: 0;
  }

  .utility_h_firstview .h_form > * {
    position: relative;
    z-index: 1;
  }

  .utility_h_firstview .h_firstview_bg {
    inset: 0 auto auto 0;
  }

  .utility_h_firstview .h_catch,
  .utility_h_firstview .h_ttl,
  .utility_h_firstview .h_sub {
    text-align: center;
  }

  .utility_h_firstview .btn_h_form-show{
    background:#5cb2fc;
    border-radius:35px;
    color:#fff;
    display:inline-block;
    padding:14px 32px;
    text-align:center;
    height:auto;
    font-size:1.8rem;
    margin:0 auto 40px auto;
    min-width:280px;
    box-sizing: border-box;
  }


}

@media screen and (min-width: 768px) {
  .utility_h_firstview {
    min-width: 1260px;
  }

  .utility_h_firstview_inner {
    justify-content: space-between;
    width: 1260px;
    padding: 40px 30px;
    align-items: center;
    padding-block: 40px;
  }

  .utility_h_firstview .h_ttlarea {
    width: 750px;
    margin-top: 40px;
  }

  .utility_h_firstview .h_form {
    width: 400px;
  }

  .utility_h_firstview .h_catch {
    font-size: 3rem;
  }

  .utility_h_firstview .h_ttl {
    font-size: 4.8rem;
    margin-top: 0.3em;
  }

  .utility_h_firstview .h_sub {
    font-size: 2.1rem;
    margin-top: 1em;
  }

  .utility_h_firstview .h_keywords {
    gap: 10px;
    margin-top: 1.8em;
  }
}





/* ==============================================
   共通設定（PC用 / デフォルト状態）
============================================== */
/* 開くボタン・閉じるボタン・オーバーレイはPCでは非表示 */
.btn_h_form-show,
.btn_h_form-close{
  display: none;
}

/* ==============================================
   スマートフォン用設定（768px以下）
============================================== */
@media screen and (max-width: 768px) {
  
  /* フォームを開くボタンを表示 */
  .btn_h_form-show {
    display: block; /* ※サイトのデザインに合わせて margin 等を調整してください */
  }

  /* 1. ポップアップのベーススタイル（非表示状態） */
  #h_form.h_form-sppos-popup {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s ease;
    
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -45%);
    width: 90%;
    max-width: 450px;
    max-height: 85vh;
    overflow-y: auto;
    background: #ffffff;
    z-index: 10000;
    padding: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
  }

  /* 2. ポップアップ表示時のスタイル */
  #h_form.h_form-sppos-popup.is-popup-active {
    visibility: visible;
    opacity: 1;
  }

  /* 3. 背景暗転（オーバーレイ）のベーススタイル（非表示状態） */
  .h_form-overlay {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 0;
  }

  /* 4. オーバーレイ表示時のスタイル */
  .h_form-overlay.is-active {
    visibility: visible;
    opacity: 1;
  }

  /* 5. 閉じるボタン（枠外・右上固定）のベーススタイル */
  .btn_h_form-close {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s ease;
    
    /* 画面を基準に配置（スクロールに追従） */
    position: fixed !important;
    top: 57px !important;    /* 画面上端からの距離 */
    right:6px !important;  /* 画面右端からの距離 */
    
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 40px !important;
    height: 40px !important;
    background: #333333 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 50% !important;
    font-size: 28px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    z-index: 10002 !important; /* ポップアップやオーバーレイより上に表示 */
    padding: 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
  }

  /* 6. 閉じるボタン アクティブ時のスタイル */
  .btn_h_form-close.is-active {
    visibility: visible;
    opacity: 1;
  }
}