/* =======================
   apply page css only
======================= */

.section-title {
  font-size: var(--h1-fz);
}

.apply-contents-box .section-inner {
  padding-top: 100px;
  padding-bottom: 100px;
  padding-left: 240px;
  padding-right: 240px;
}

/* =======================
 Hero part
======================= */
.hero-apply .hero-bg {
  background-image: url(../assets/hero/hero-apply.jpg);
}

.page-content {
  font-family: Arial, sans-serif;
  padding: 20px;
}

.section-inner {
  margin-bottom: 40px;
}

/* =======================
 Form section
======================= */
.form-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.form-section-content {
  display: flex;
  gap: 60px;
}

.form-section-content-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-section-content-info-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-section-content-info-box-title {
  color: #666;
  font-family: Pretendard;
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  line-height: 140%; /* 19.6px */
  letter-spacing: -0.28px;
  margin: 0;
}

.form-section-content-info-box-label {
  color: #111;
  font-family: Pretendard;
  font-size: 20px;
  font-style: normal;
  font-weight: 500;
  line-height: 140%; /* 28px */
  letter-spacing: -0.4px;
  margin: 0;
}

.form-group {
  margin-bottom: 20px;
}

.form-group button {
  padding: 15px 25px;
  width: 240px;
  border-radius: 999px;
}

.terms-group-wrapper {
  display: flex;
  justify-content: space-between;
}

.terms-group {
  display: flex;
  align-items: center;
}

.terms-group label {
  margin-bottom: 0px;
  font-size: 16px;
  line-height: 1;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--gray-700111111, #111);
  font-family: Pretendard;
  font-size: 20px;
  font-style: normal;
  font-weight: 600;
  line-height: 140%; /* 28px */
  letter-spacing: -0.4px;
}

.required-star {
  color: #ff584d;
  margin-left: 3px;
  font-weight: 600;
}

.apply-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.apply-hint {
  color: #ff584d;
  font-size: 14px;
  font-weight: 500;
}

@media (max-width: 768px) {

  .apply-label .apply-hint {
    font-size: 12px;
  }

  .hero-apply .hero-bg {
    height: 470px;
  }

  .hero.hero-apply .hero-title {
    margin-bottom: 0px;
    font-size: 26px;
  }

  .hero-left {
    margin: auto;
  }
}

input[type="text"],
input[type="email"],
input[type="number"],
textarea {
  width: 100%;
  padding: 12px 0px;
  border-width: 0px;
  border-bottom: 1px solid #ebebeb;
  color: #111;
  font-family: Pretendard;
  font-size: 18px;
  font-style: normal;
  font-weight: 500;
  line-height: 140%;
  letter-spacing: -0.36px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
textarea:focus {
  outline: none;
  border: none;
  border-bottom: 1px solid #ebebeb;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

button {
  padding: 10px 20px;
  background-color: #eb212e;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button[disabled] {
  background-color: #ccc;
}

.position-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 items per row */
  gap: 15px;
}

input[type="radio"] {
  margin: 0;
  margin-right: 6px;
  width: 18px;
  height: 18px;
}

input[type="radio"]:checked {
  accent-color: #e3181b;
}

input[type="radio"]:not(:checked) {
  accent-color: #ccc;
}

.error-message {
  color: red;
  font-size: 12px;
  margin-top: 5px;
  display: block;
}

input[type="text"].error,
input[type="email"].error,
input[type="number"].error,
textarea.error {
  border-bottom: 1px solid red;
}

.position-option {
  position: relative;
}

.position-option input[type="radio"] {
  display: none; /* Hide the actual radio */
}

.position-option span {
  display: flex;
  padding: 15px 25px;
  background-color: #ebebeb;
  color: #999;
  border-radius: 4px;
  cursor: pointer;
  transition:
    background-color 0.3s,
    color 0.3s;
  width: 100%;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-radius: 999px;
  border-radius: 999px;
}

.position-option input[type="radio"]:checked + span {
  background-color: #e3181b;
  color: white;
}

.file-label-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.file-label-wrapper .file-label {
  margin-bottom: 0;
}

.resumes-input {
  display: none;
}

.form-group button.add-btn {
  color: #eb212e;
  background-color: #fff;
  border: #eb212e 1px solid;
  padding: 15px 15px;
  width: auto;
  font-size: 18px;
}

.file-name-display {
  margin-top: 8px;
  font-family: Pretendard;
  font-size: 18px;
  font-style: normal;
  font-weight: 500;
  line-height: 140%; /* 19.6px */
  letter-spacing: -0.28px;
  color: #111;
  background-color: #f9f9f9;
  padding: 16px;
}

.error-message {
  color: #ff584d;

  font-family: Pretendard;
  font-size: 13px;
  font-style: normal;
  font-weight: 400;
  line-height: 140%; /* 18.2px */
  letter-spacing: -0.26px;
  margin-top: 8px;
}

.captcha {
  display: flex;
  gap: 30px;
  align-items: center;
}

.captcha-display {
  font-size: 24px;
  font-weight: bold;
  color: #000;
  position: relative;
  width: 210px;
  height: 58px;
  border: 1px solid #ebebeb;
  background: #fff;
}

.captcha-display span {
  color: #111;
  text-align: center;
  font-family: Pretendard;
  font-size: 18px;
  font-style: normal;
  font-weight: 500;
  line-height: 140%; /* 25.2px */
  letter-spacing: -0.36px;
  position: absolute;
}

/* =======================
 Modal section
======================= */

#open-modal-btn {
  color: #666;
  font-family: Pretendard;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 120%; /* 16.8px */
  letter-spacing: -0.28px;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-skip-ink: none;
  text-decoration-thickness: auto;
  text-underline-offset: auto;
  text-underline-position: from-font;
  cursor: pointer;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  z-index: 999;
}

/* Modal active state */
.modal.active {
  display: flex;
}

/* Modal content */
.modal-content {
  background: #fff;
  width: 700px;
  max-height: 620px;
  padding: 0 30px 30px 30px;
  border-radius: 8px;
  overflow-y: auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  position: relative;
}

/* Scrollbar styling */
.modal-content::-webkit-scrollbar {
  width: 8px;
}
.modal-content::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

/* Close button */
.modal-close {
  position: absolute;
  top: 22px;
  right: 28px;
  background: none;
  border: none;
  font-size: 24px;
  padding: 0;
  cursor: pointer;
  color: #000;
}

/* Title styling */
.modal-title {
  color: #e3181b;
  font-size: 24px;
  font-style: normal;
  font-weight: 600;
  line-height: 140%; /* 33.6px */
  letter-spacing: -0.48px;
}

/* Body text */
.modal-body {
  padding: 30px;
  max-height: 487px;
  border: 1px solid #ebebeb;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: auto;
}

.modal-body p,
.modal-typography-list li {
  color: #000;
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 140%; /* 25.2px */
  letter-spacing: -0.36px;
  margin: 0;
}

.modal-body .modal-typography-label {
}

.modal-body .modal-typography-title {
  font-size: 20px;
  font-weight: 600;
}

.modal-body .modal-typography-title:not(:first-child) {
  margin-top: 10px;
}

.modal-body .modal-typography-link {
  text-decoration: underline;
}

.modal-typography-list {
  list-style-type: disc; /* Creates the dot list */
  padding-left: 20px;
  margin: 0;
}

/* =======================
 Responsive small laptop
======================= */
@media (max-width: 1440px) {
  .apply-contents-box .section-inner {
    padding-left: 120px;
    padding-right: 120px;
  }
}

/* =======================
 Responsive tablet
======================= */
@media (max-width: 1024px) and (min-width: 769px) {
  /* Hero */
  .hero-apply {
    /* 높이: 서비스 페이지와 동일한 585px로 명확히 지정 */
    min-height: 585px;
    height: 585px;
    /* 텍스트 수직 중앙 정렬을 위해 플렉스 컨테이너로 설정 */
    display: flex;
    align-items: center; /* 수직 중앙 정렬 */
    justify-content: center; /* 수평 중앙 정렬 (필요하다면) */
  }

  .hero-apply .hero-bg {
    height: 585px;
  }

  /* apply hero에만 적용 (다른 페이지 영향 방지) */
  .hero-apply .hero-left {
    /* 기존 값 유지 */
    padding: 0 40px;
    height: 100%;
    /* 내부 텍스트 수직 중앙 정렬 */
    display: flex;
    /* align-items: center; */
    width: 100%;
  }

  /* hero.css의 margin-top(예: 85px) 덮기 */
  .hero-apply .hero-title {
    margin-top: 0;
    /* margin-bottom: 500px; */
    /* text-align: left; */
  }

  @media (max-width: 1024px) and (min-width: 769px) {
    .hero.hero-apply {
      min-height: 585px;
    }
  }

  /* 섹션 패딩/레이아웃 조정 */
  .apply-contents-box .section-inner {
    padding-top: 80px;
    padding-bottom: 80px;
    padding-left: 40px;
    padding-right: 40px;
    margin-bottom: 40px;
  }

  .form-section {
    gap: 40px;
  }

  /* 2컬럼 → 1컬럼 스택 (서비스 페이지랑 동일 패턴) */
  .form-section-content {
    flex-direction: column;
    gap: 40px;
  }

  .form-section-content-info {
    max-width: 100%;
  }

  #apply-form {
    width: 100%;
  }

  /* 캡차는 태블릿에서는 가로 정렬 유지 */
  .captcha {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .captcha-display {
    min-width: 160px;
  }

  /* 맵 섹션 높이 살짝 줄여서 화면에 덜 답답하게 */
  .map-section {
    height: 600px;
  }

  .hero .hero-title {
    font-size: clamp(28px, 3.5vw, 50px);
    white-space: nowrap;
  }

  .hero-left {
    padding: 0 30px;
    top: 250px;
    bottom: 140px;
  }
  .section-title {
    font-size: clamp(40px, 2.5vw, 90px);
  }
}

/* =======================
 Responsive mobile
======================= */
@media (max-width: 768px) {
  .apply-contents-box .section-inner {
    padding: 60px 20px;
  }

  .section-header {
    margin-bottom: 0px;
  }

  .hero-apply {
    height: 470px;
    min-height: 470px;
  }

  .form-section {
    gap: 30px;
  }

  .form-section-content-info-box-title {
    font-size: 12px;
  }

  .form-section-content-info-box-label {
    font-size: 14px;
  }

  .form-section-content {
    flex-direction: column;
    /* gap: 30px; */
  }

  label {
    font-size: 18px;
  }

  input[type="text"],
  input[type="email"],
  input[type="number"],
  textarea {
    font-size: 14px;
  }

  .position-option span {
    font-size: 14px;
    line-height: 1.2;
  }

  .position-options {
    grid-template-columns: repeat(1, 1fr);
  }

  .captcha {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 10px;
  }

  .form-group.captcha div:nth-child(2) {
    width: 100%;
  }

  .form-group button {
    width: 100%;
  }

  .map-section {
    height: 424px;
  }

  .modal-content {
    width: calc(100dvw - 40px);
    max-height: 80dvh;
  }

  .modal-body {
    max-height: calc(80dvh - 104px);
  }
}
