@import url(common.css);

.section-donate {
  background-color: var(--bg-c-p);
  position: relative;
  z-index: 1;
  .svg1 {
    position: absolute;
    top: -14%;
  }
  .svg2 {
    position: absolute;
    bottom: -14%;
  }
  .donate {
    background-color: #fff;
    margin-top: 50px;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    padding: 3vh 10vh;
    z-index: 100;
    text-align: center;
    .front-section-title {
      position: absolute;
      font-size: 2.5vw;
      left: 0;
      top: 70px;
      font-family: "Century Gothic Paneuropean", sans-serif;
      font-weight: bold;
      writing-mode: vertical-rl;
      letter-spacing: 0.4vw;
      color: var(--bg-c-p);
    }
    h4 {
      color: var(--secondary-c);
      font-size: 1vw;
    }
    h2 {
      color: var(--primary-c);
      font-size: 2vw;
      font-weight: bold;
      margin-bottom: 14px;
    }
    p {
      text-align: center;
      margin-bottom: 14px;
      font-size: 1.3vw;
    }
  }
}

.donate-contents {
  background-color: rgb(255, 254, 238);
  border-radius: 10px;
  padding: 1vw 3vw;
  margin-bottom: 3vw;
  .donate-contents-title {
    color: var(--secondary-c);
    display: flex;
    gap: 1vw;
    align-items: center;
    justify-content: center;
    margin-bottom: 1vw;
    h3 {
      font-size: 1.5vw;
      font-weight: 500;
    }
    p {
      font-size: 0.7vw;
      padding: 0 12px;
      display: block;
      border: 2px solid var(--secondary-c);
      margin-bottom: 0;
    }
  }
  .donate-contents-sub-title {
    background-color: var(--secondary-c);
    color: #fff;
    padding: 0 1vw;
    display: inline-block;
    margin-bottom: 0 !important;
  }

  .donate-button-box {
    display: flex;
    gap: 2vw;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    p {
      font-size: 1.2vw;
      font-weight: 700;
      margin-bottom: 0;
      width: 40%;
      text-align: center;
      height: 4vw;
      background-color: var(--secondary-c);
      border-radius: 100px;
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    a {
      font-size: 1vw;
      font-weight: 400;
      margin-bottom: 0;
      width: 40%;
      height: 4vw;
      background-color: white;
      border: 2px solid var(--secondary-c);
      border-radius: 100px;
      color: var(--secondary-c);
      text-decoration: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 1.5vw;
      color: #000;
      transition: all 0.3s ease;
      &::after {
        content: ">";
        font-weight: bold;
        font-size: 1.2vw;
      }
      &:hover {
        background-color: var(--secondary-c);
        color: #fff;
      }
    }
  }
}

.donate-one-time {
  .donate-one-time-button {
    padding: 2vw 0;
    background-color: rgb(247, 248, 248);
  }
  span {
    display: block;
    font-size: 1vw;
    a {
      color: red;
      border-bottom: 1px solid red;
    }
  }
}

.donate-corporation {
  .donate-corporation-bold-text {
    font-weight: 500;
    font-size: 1.1vw;
  }
}

@media (max-width: 768px) {
  .section-donate {
    padding: 1%;

    .svg1,
    .svg2 {
      display: none; /* SVG波は非表示にしてスッキリさせる */
    }

    .donate {
      padding: 7vw;

      .front-section-title {
        font-size: 1.6rem; /* 縦書きタイトルは少し小さく */
        top: 30px;
        left: 5px;
        letter-spacing: 0.2rem;
      }

      h4 {
        font-size: 5vw;
      }

      h2 {
        font-size: 5vw;
        margin-bottom: 12px;
      }

      p {
        font-size: 3.3vw;
        margin-bottom: 12px;
        padding: 0 1vw;
      }
    }
  }

  .donate-contents {
    padding: 2vw 2vw;
    margin-bottom: 2.5vw;

    .donate-contents-title {
      flex-direction: column;
      gap: 0.3rem;
      h3 {
        font-size: 5vw;
      }
      p {
        font-size: 3.4vw;
        padding: 0 10px;
        border-width: 1.5px;
        width: auto;
      }
    }

    .donate-contents-sub-title {
      font-size: 0.9rem;
      padding: 0 0.8rem;
    }

    .donate-button-box {
      gap: 1rem;
      flex-wrap: wrap;
      justify-content: center;

      p,
      a {
        width: 100%;
        max-width: 300px;
        height: 3.5rem;
        font-size: 1.1rem;
        border-radius: 40px;
        box-sizing: border-box;
      }

      a {
        gap: 1rem;
        &::after {
          font-size: 1rem;
        }
      }
    }
  }

  .donate-one-time {
    .donate-one-time-button {
      padding: 1.5vw 0;
      font-size: 1rem;
    }
    span {
      font-size: 2.2vw;
      margin-top: 10px;
    }
  }

  .donate-corporation {
    .donate-corporation-bold-text {
      font-size: 1rem;
      margin-bottom: 0.8em;
    }
  }
}

/* 寄付フォーム全体 */
.donate-pay-form {
  margin: 0 auto;
  background-color: rgb(253, 255, 231);
  max-width: 100%;
  padding: 5%;
  border-radius: 20px;
  color: #8fc31f;
  font-weight: 700;
}

.donate-pay-form h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* 各ラベルと入力欄 */
.donate-pay-form label {
  display: block;
  font-weight: 600;
  margin-top: 1.2rem;
  margin-bottom: 0.3rem;
  text-align: left;
}

.donate-pay-form input[type="text"],
.donate-pay-form input[type="email"],
.donate-pay-form input[type="number"],
.donate-pay-form select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  background-color: white;
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
}

.donate-pay-form input:focus,
.donate-pay-form select:focus {
  outline: none;
  border-color: #8fc31f;
  box-shadow: 0 0 0 3px rgba(143, 195, 31, 0.3);
}

/* 生年月日 */
.donate-pay-form .birth {
  display: flex;
  gap: 0.5rem;
}
.donate-pay-form .birth select {
  flex: 1;
}

/* クレジットカード入力 */
#card-element {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-top: 0.5rem;
  background-color: #fff;
}
#card-errors {
  color: red;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}
.card-img {
  display: flex;
  gap: 3%;
  img {
    width: 12%;
    object-fit: contain;
  }
}
.card-kome {
  font-size: 0.7vw;
  text-align: left !important;
  display: block;
}

#card-number,
#card-expiry,
#card-cvc {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 1rem;
  background-color: #fff;
}

.card-fields-wrapper {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card-field {
  flex: 1;
}

#card-expiry,
#card-cvc {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
}


/* 送信ボタン */
.donate-pay-form button[type="submit"] {
  display: block;
  width: 100%;
  padding: 0.85rem;
  background-color: #8fc31f;
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  margin-top: 2rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.donate-pay-form button[type="submit"]:hover {
  background-color: rgba(143, 195, 31, 0.3);
}

/* レスポンシブ対応 */
@media (max-width: 480px) {
  .donate-pay-form .birth {
    flex-direction: column;
  }
  .card-img {
    display: flex;
    gap: 0%;
    img {
      width: 13%;
      object-fit: contain;
    }
  }
  .card-kome {
    font-size: 2vw;
    text-align: left !important;
    display: block;
  }
}
