.contact {
  color: var(--primary-color);
}

@media screen and (min-width: 600px) {
  .contact-grid {
    display: flex;
  }
}

.contact-grid .list {
  text-align: center;
  position: relative;
  overflow-y: hidden;
  color: #827c75;
}

@media screen and (min-width: 600px) {
  .contact-grid > * {
    flex: 1;
  }
  .contact-grid .list {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .contact-grid > a .list {
    height: 100%;
  }
}

.contact-grid .list .contact-grid-1 {
  position: relative;
}

.contact-grid .list .contact-grid-1 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-grid .list .contact-grid-1 .title {
  position: absolute;
  top: calc(50% - 7vw);
  left: 50%;
  transform: translate(-50%, -50%);
  color: #827c75;
  font-size: 7vw;
}

.contact-grid .list .contact-grid-1 .title-en {
  position: absolute;
  top: calc(50% - 9vw);
  left: 50%;
  transform: translate(-50%, -50%);
  color: #827c75;
  font-size: 3vw;
}

@media screen and (min-width: 600px) {
  .contact-grid .list .contact-grid-1 .title {
    top: calc(50% - 2.3rem);
    font-size: 2.3rem;
  }
  .contact-grid .list .contact-grid-1 .title-en {
    top: calc(50% - 3.5rem);
    font-size: 1.4rem;
  }
}

@media screen and (min-width: 850px) {
  .contact-grid .list .contact-grid-1 .title {
    top: calc(50% - 3.5rem);
    font-size: 3.5rem;
  }
  .contact-grid .list .contact-grid-1 .title-en {
    top: calc(50% - 4.5rem);
    font-size: 1.8rem;
  }
}

/* =======================================
   お問合せフォームへ遷移するボタン 
========================================*/
.contact-button {
  position: absolute;
  text-align: right;
  letter-spacing: 0.1em;
  bottom: 10%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.contact-button label {
  display: inline-block;
  text-decoration: none;
  color: #827c75;
  position: relative;
  padding-right: 35px;
}

.contact-button label::after {
  content: "";
  background: url("../images/arrow1.svg") no-repeat right center / 60px; /*アイコン画像の指定。画像の右側を読み込みます。最後の100pxの数字は、widthの２倍で指定すればOK。*/
  display: block;
  position: absolute;
  right: 0;
  top: calc(50% - 15px);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  text-align: center;
  transition: 0.3s;
  border: 1px solid #827c75;
}

.contact-button label:hover::after {
  background-color: var(--primary-color); /*背景色を冒頭のprimary-colorにする*/
  background-position: left center; /*矢印画像の入れ替え。画像の左側を読み込みます。*/
}

@media screen and (min-width: 400px) {
  .contact-button label {
    font-size: 16px;
    padding-right: 40px;
  }
  .contact-button a::after {
    background: url("../images/arrow1.svg") no-repeat right center / 70px;
    top: calc(50% - 20px);
    width: 35px;
    height: 35px;
  }
}

@media screen and (min-width: 800px) {
  .contact-button label {
    font-size: 20px;
    padding-right: 55px;
  }
  .contact-button label::after {
    background: url("../images/arrow1.svg") no-repeat right center / 100px;
    top: calc(50% - 25px);
    width: 50px;
    height: 50px;
  }
}

/* =====================================
   お問い合わせのモーダルウィンドウ
======================================= */
#modal-toggle {
  display: none;
}

/* 開くボタン */
.open-btn {
  display: inline-block;
  padding: 10px 16px;
  background: #007bff;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
}

/* 背景 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);

  display: none;
  justify-content: center;
  align-items: center;

  z-index: 9999;
}

/* モーダル本体 */
.modal {
  position: relative; /* ← ×の基準 */
  width: 80%;
  height: 80%;
  max-height: 90vh; /* ← 小さい画面対策 */

  background: #fff;
  border-radius: 10px;

  display: flex;
  flex-direction: column;

  overflow: hidden; /* ← はみ出し防止 */
}

/* ×ボタン（右上固定） */
.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;

  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;

  color: #333;
  line-height: 1;
  user-select: none;
}

.modal-close:hover {
  color: #000;
}
/* iframeエリア */
.modal-body {
  flex: 1;
  overflow: auto;
}

.modal-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* 表示制御 */
#modal-toggle:checked ~ .modal-overlay {
  display: flex;
}

/* =======================================
   右側ボックス 
========================================*/
.contact-grid .list .contact-grid-2 {
  padding: 5%;
}
.contact-grid .list .contact-grid-2 img {
  width: 30%;
}

@media screen and (min-width: 800px) {
  .contact-grid .list .contact-grid-2 img {
    width: 50%;
    max-width: 300px;
  }
}

.company-name {
  margin-bottom: 0;
}
