.page-cover {
  background-size: auto 100%;
  background-image: url(../images/contact/cover-contact.webp);
  background-position: 38% center;
}

.cover-title::before {
  content: "";
  display: block;
  background-image: url(../images/contact/title-contact.png);
  width: 220px;
}

.wrapper {
  padding-top: 80px;
}

.contact {
  margin: 0 auto;
  padding-top: 0;
}

.contact__selector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.contact__input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-top: 4px;
}

.contact-option {
  position: relative;
  width: 100%;
  max-width: 315px;
  padding: 20px 0;
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a52c34;
  border: 1px solid #a52c34;
  background-color: white;
  box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.2);
}

.contact-option.active {
  background: #a52c34;
  color: white;
  opacity: 1;
}

.contact-content {
  display: none;
  width: 100%;

  position: relative;
  margin-top: 50px;
}

.contact__title {
  font-size: 16px;
  line-height: 1;
}

.contact__title {
  line-height: 28px;
}

.contact-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.contact-content.active {
  animation: fadeIn 0.3s ease-in;
}

.contact-breadcrumb {
  display: none;
}

.contact-breadcrumb.active {
  display: inline-block;
}

.form-container {
  max-width: 450px;
  width: 100%;
  margin: 50px auto 0;
}

.form-group {
  margin-bottom: 30px;
  padding-bottom: 10px;
  border-bottom: 1px solid #d9d9d9;
}

.form-container label {
  font-size: 16px;
  font-weight: 700;
  display: block;
  margin-bottom: 10px;
  color: #303030;
}

.group-label {
  font-size: 16px;
  font-weight: 700;
  position: relative;
  top: 3px;
}

label.group-label {
  font-size: 16px;
  line-height: 28px;
}

.form-group--optional label {
  display: flex;
  flex-direction: row;
}
.form-group--optional .group-label {
  display: block;
  width: calc(100% - 48px);
}

.form-container label .required {
  display: inline-block;
  color: #fff;
  background: #ce000e;
  text-align: center;
  line-height: 20px;
  font-size: 11px;
  font-weight: 700;
  margin-right: 7px;
  min-width: 38px;
  height: 22px;
  padding: 0 5px;
}

.form-container label .optional {
  display: inline-block;
  color: #fff;
  background: #949494;
  text-align: center;
  line-height: 22px;
  font-size: 11px;
  font-weight: 700;
  margin-right: 10px;
  width: 38px;
  height: 22px;
}

.form-container input[type="text"],
.form-container input[type="email"],
.form-container input[type="tel"],
.form-container textarea {
  width: 100%;
  padding: 4px 20px 3px;
  font-size: 16px;
  line-height: 28px;
  outline: none;
  background-color: #d9d9d9;
}

.form-container input[type="file"] {
  display: block;
  font-size: 14px;
  margin-top: 10px;
}

.form-container textarea {
  width: 100%;
  resize: none;
  min-height: 170px;
}

.form-container input[type="text"]:focus,
.form-container input[type="email"]:focus,
.form-container input[type="tel"]:focus,
.form-container textarea:focus {
  border-color: #3498db;
}

.form-container input::placeholder,
.form-container textarea::placeholder {
  color: #fff;
}

.form-actions {
  text-align: center;
}

.back-link {
  display: block;
  width: fit-content;
  margin: 20px auto;
  font-size: 16px;
  color: #303030;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.back-link::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 11px;
  background-image: url(../images/common/back-arrow.png);
  background-size: contain;
  background-repeat: no-repeat;
  position: relative;
  top: 2px;
}

.file-input {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.file-input input[type="file"] {
  display: none;
}

.file-input label {
  display: inline-block;
  border: 1px solid #949494;
  background-color: #fff;
  color: #303030;
  padding: 7px;
  border-radius: 0px;
  font-size: 11px;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin: 0;
  font-weight: 400;
}

.file-input label:hover {
  opacity: 0.8;
}

.file-input .file-name {
  font-size: 11px;
}

label.checkbox-group {
  text-align: center;
  font-weight: 400;
}

.checkbox-group {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 16px;
  user-select: none;
}

.checkbox-group input {
  display: none;
}

.checkbox-group .checkmark {
  position: relative;
  top: 3px;
  width: 16px;
  height: 16px;
  border: 1px solid #303030;
  border-radius: 2px;
  margin-right: 2px;
  display: inline-block;
  position: relative;
  background-color: white;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.checkbox-group .checkmark::after {
  content: "";
  position: absolute;
  left: 4px;
  top: -1px;
  width: 6px;
  height: 12px;
  border: solid transparent;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.2s ease;
}

.checkbox-group input:checked + .checkmark {
  background-color: white;
  border-color: #303030;
}

.checkbox-group input:checked + .checkmark::after {
  border-color: #303030;
  transform: rotate(45deg) scale(1);
}

.checkbox-group span:last-child {
  font-size: 16px;
}

.prev-link span {
  color: var(--primary-text);
}

.contact-finish {
  margin-top: 60px;
}

.contact-finish img {
  display: block;
  width: 35px;
  height: 35px;
  object-fit: cover;
  margin: 0 auto;
}

.contact-finish h2 {
  color: #a52c34;
  font-size: 18px;
  line-height: 27px;
  margin-top: 20px;
  text-align: center;
}

.contact-finish p {
  margin-top: 20px;
  text-align: center;
  font-size: 15px;
  line-height: 24px;
}

.privacy-link {
  color: #a52c34;
  text-decoration: underline;
  text-underline-offset: 6px;
  transition: color 0.3s ease;
  font-size: 16px;
  line-height: 1;
}

.privacy-link:hover {
  opacity: 0.7;
}

.link-button {
  margin-top: 20px;
}

.form-group--policy {
  display: flex;
  border-bottom: none;
  justify-content: center;
  position: relative;
  margin-bottom: 0 !important;
}

.form-group--policy .mwform-checkbox-field input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-right: 7px;
  border-radius: 2px;
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.form-group--policy .mwform-checkbox-field input::after {
  content: "";
  position: absolute;
  left: 3px;
  top: -1px;
  width: 7px;
  height: 12px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.2s ease;
}
.form-group--policy .mwform-checkbox-field input:checked::after {
  transform: rotate(45deg) scale(0.8);
}

.contact__item-error {
  margin-top: 3px;
}

.privacy-error {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.form-container input[type="file"] {
  display: block;
  font-size: 14px;
  margin-top: 10px;
  display: inline-block;
  background-color: #fff !important;
  color: var(--primary-text);
  border-radius: 0px;
  font-size: 11px;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin: 0;
  font-weight: 400;
}

.file-input {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.file-input input[type="file"] {
  display: none;
}

.file-input label {
  display: inline-block;
  border: 1px solid #949494;
  background-color: #fff;
  color: var(--primary-text);
  padding: 7px;
  border-radius: 0px;
  font-size: 11px;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin: 0;
  font-weight: 400;
}

.file-input label:hover {
  opacity: 0.8;
}

.file-input .file-name {
  font-size: 11px;
}

.custom-file-label {
  display: inline-block;
  border: 1px solid #949494;
  background-color: #fff;
  color: var(--primary-text);
  padding: 7px 12px;
  border-radius: 0px;
  font-size: 11px;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-weight: 400;
}

.custom-file-label:hover {
  background-color: #d9d9d9;
  color: #000000;
}

.imgattached {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  align-items: center;
}

.imgattached input[type="file"] {
  display: none !important;
}

.imgattached label {
  display: inline-block;
  border: 1px solid #949494;
  background-color: #fff;
  color: var(--primary-text);
  padding: 7px;
  border-radius: 0px;
  font-size: 11px;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin: 0 !important;
  font-weight: 400;
}

.file-input label {
}

.imgattached label .mwform-file-delete {
  display: none;
}

.mw-wp-form_file {
  display: none;
}

.imgattached__status {
  font-size: 11px;
}

.imgattached__delete {
  position: absolute;
  right: 0;
  display: block;
  width: 74px;
  height: 42px;
  line-height: 42px;
  font-size: 14px;
  color: white;
  text-align: center;
  border-radius: 2px;
  background-color: #d9d9d9;
  display: none;
  cursor: pointer;
}

.imgattached__status {
  word-break: break-word;
  overflow-wrap: break-word;
  width: calc(100% - 176px);
  display: inline-block;
}

.imgattached {
  position: relative;
}

.imgattached .error {
  position: absolute;
  left: 0;
  bottom: -26px;
}

@media (min-width: 768px) {
  .wrapper {
    padding-top: 100px;
  }

  @media (min-width: 926px) {
    .page-cover {
      background-size: 100% auto;
      background-position: center top;
    }
  }

  .cover-title::before {
    background-size: auto 100%;
    background-image: url(../images/contact/title-contact-pc.png);
    width: 436px;
    height: 76px;
  }

  .contact__selector {
    display: flex;
    flex-direction: row;
    gap: 25px;
    margin-top: 70px;
    justify-content: center;
    position: relative;
  }

  .contact__selector::after {
    position: absolute;
    content: "";
    width: 698px;
    height: 2px;
    background-color: #a52c34;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
  }

  .contact-option {
    max-width: 300px;
    height: 50px;
    font-size: 20px;
    line-height: 1;
    padding-bottom: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-width: 2px;
    box-shadow: none;
  }

  .form-container {
    width: 100%;
    margin: 70px auto 0;
  }

  .contact-content[data-contact="2"] .contact__title {
    font-size: 16px;
    line-height: 28px;
  }

  .form-group {
    margin-bottom: 60px;
  }

  .form-group--naiyou {
    margin-bottom: 30px;
  }

  .form-container label {
    margin-bottom: 10px;
  }

  .file-input label {
    margin: 0;
  }

  .form-group:nth-last-child(3) > label {
    margin-bottom: 20px;
  }

  .form-group:nth-last-child(2) {
    margin-bottom: 26px;
  }

  .back-link {
    margin: 20px auto 0;
    transition: color 0.3s ease;
  }

  .back-link::before {
    transition: all 0.3s ease;
  }

  .back-link:hover {
    opacity: 0.8;
  }

  .contact__phone {
    margin-top: 0px;
  }

  .contact__intro p {
    display: flex;
    align-items: flex-end;
  }

  .contact-finish {
    margin-top: 75px;
  }

  .contact-finish img {
    width: 65px;
    height: 65px;
  }

  .contact-finish h2 {
    font-size: 27px;
    margin-top: 23px;
  }

  .contact-finish p {
    margin-top: 44px;
    font-size: 16px;
    line-height: 28px;
    margin-bottom: 100px;
  }

  .form-container textarea {
    min-height: 240px;
  }
}
