@charset "utf-8";

/* ===== 공통 오버라이드 ===== */
body { overflow: auto !important; }
.wrap { overflow: visible; }

/* 신청 폼 전용: full-container scroll-snap/height 해제 */
main#main {
    height: auto !important;
    overflow-y: auto !important;
    scroll-snap-type: none !important;
}

/* ===== 페이지 래퍼 ===== */
.apply-page-wrap {
    max-width: 1000px;
    margin: 0 auto;
    padding: 6rem 2.4rem 10rem;
}

/* ===== 제목 박스 ===== */
.apply-title-box {
    border: 1px solid #e3e3e3;
    text-align: center;
    padding: 2.4rem 2rem;
    margin-bottom: 5rem;
    background: #fff;
    border-radius: 8px;
}
.apply-title-box h1 {
    font-size: var(--fs-24);
    font-weight: var(--fw-700);
    color: #2f2f2f;
    letter-spacing: -0.03em;
    line-height: 1.4;
}

/* ===== 섹션 공통 ===== */
.apply-section {
    margin-bottom: 5rem;
}
.apply-section-title {
    font-size: var(--fs-18);
    font-weight: var(--fw-700);
    color: var(--text-color);
    margin-bottom: 1.6rem;
    padding-left: 1.2rem;
    border-left: 4px solid var(--main-color);
    line-height: 1.4;
}

/* ===== 1. 신청 과정 선택 ===== */
.apply-course-box {
    background-color: #f8faff;
    border: 1px solid #d6e4ff;
    border-radius: 8px;
    padding: 2.4rem 3rem;
}
.apply-course-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(300px, 1fr));
    gap: 1.2rem 2rem;
}
.apply-course-options label {
    display: flex;
    align-items: flex-start;  /* 텍스트 첫 줄 기준 정렬 (줄바꿈 시 체크박스가 중앙으로 밀리지 않도록) */
    gap: 0.8rem;
    font-size: var(--fs-16);
    font-weight: var(--fw-500);
    color: var(--text-color);
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
}
.apply-course-options label:hover { color: var(--main-color); }
.apply-course-options input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--main-color);
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 3px;  /* 첫 줄 라인 높이와 체크박스 높이 차이 광학 보정 */
}

/* ===== 2. 지원 신청서 ===== */
.apply-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.6rem;
}
.apply-section-header .apply-section-title { margin-bottom: 0; }
.required-note {
    font-size: var(--fs-14);
    color: #e53e3e;
    font-weight: var(--fw-500);
}

.apply-field-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #dde3ec;
    border-top: 2px solid var(--main-color);
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 69, 159, 0.06);
}
.apply-field-table tr {
    transition: background 0.15s;
}
.apply-field-table tr:hover .apply-field-input {
    background: #f5f8ff;
}
.apply-field-table td {
    border-right: 1px solid #dde3ec;
    border-bottom: 1px solid #dde3ec;
    vertical-align: middle;
    padding: 2;
}
.apply-field-table tr:last-child td {
    border-bottom: none;
}
.apply-field-label {
    background: linear-gradient(135deg, #f0f4fb 0%, #e8eef8 100%);
    padding: 1.5rem 1.8rem;
    font-size: var(--fs-14);
    font-weight: var(--fw-600);
    color: #3a4a6b;
    white-space: nowrap;
    width: 120px;
    letter-spacing: -0.01em;
    border-right: 1px solid #dde3ec;
}
.apply-field-label .required {
    color: #e53e3e;
    margin-left: 2px;
    font-weight: var(--fw-700);
}
.apply-title-required {
    color: #e53e3e;
    font-weight: var(--fw-900);
    font-size: var(--fs-14);
}
.apply-field-input {
    padding: 0.8rem 1.4rem;
    background: #fff;
    transition: background 0.15s;
}
.apply-field-input:focus-within {
    background: #f0f6ff;
}
.apply-field-input input[type="text"],
.apply-field-input input[type="email"] {
    width: 100%;
    border: none;
    outline: none;
    font-size: var(--fs-14);
    color: var(--text-color);
    background: transparent;
    padding: 0.6rem 0.2rem;
    font-family: 'Pretendard', sans-serif;
    line-height: 1.5;
}
.apply-field-input input::placeholder { color: #b8c2d0; }
 textarea {
    width: 100%;
    border: none;
    outline: none;
    font-size: var(--fs-14);
    color: var(--text-color);
    background: transparent;
    resize: vertical;
    min-height: 130px;
    padding: 1rem 0.2rem;
    line-height: 1.7;
    font-family: 'Pretendard', sans-serif;
}
.apply-field-input textarea::placeholder { color: #b8c2d0; }
.apply-field-input hr { border: 1px solid #dde3ec;}

/* 성별 라디오 */
.gender-radio-group {
    display: flex;
    flex-wrap: wrap;        /* 항목 수가 많을 때 자연스럽게 줄바꿈 */
    align-items: center;
    gap: 1rem 2rem;
    padding: 0.4rem 0;
}
.gender-radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--fs-14);
    font-weight: var(--fw-400);
    cursor: pointer;
    color: var(--text-color);
    user-select: none;
    white-space: nowrap;    /* 라벨 텍스트 중간 줄바꿈 방지 */
}
.gender-radio-group input[type="radio"],
.gender-radio-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--main-color);
    cursor: pointer;
}
.gender-radio-group input[type="text"] {
    accent-color: var(--main-color);
    border: 1px solid #b8c2d0;
    border-radius: 5px;
    width: 200px;
    height: 30px;
    margin-left: 5px;
    padding-left: 5px;
}

/* ===== 3. 자기소개서 ===== */
.apply-notice-box {
    background: #fafbff;
    border: 1px solid #d6e4ff;
    border-radius: 6px;
    padding: 1.4rem 2rem;
    margin-bottom: 1.2rem;
    font-size: var(--fs-14);
    color: var(--text-color);
    font-weight: var(--fw-500);
    line-height: 1.7;
}
.intro-textarea {
    width: 100%;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: var(--fs-14);
    color: var(--text-color);
    padding: 1.6rem 1.8rem;
    min-height: 220px;
    resize: vertical;
    line-height: 1.7;
    font-family: 'Pretendard', sans-serif;
    display: block;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}
.intro-textarea::placeholder { color: #b0b8c1; }
.intro-textarea:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 3px rgba(0, 69, 159, 0.08);
    outline: none;
}

/* ===== 4. 개인정보 동의 ===== */
.privacy-desc-box {
    background: #fafbff;
    border: 1px solid #d6e4ff;
    border-radius: 6px;
    padding: 1.6rem 2rem;
    margin-bottom: 1.4rem;
    font-size: var(--fs-14);
    color: var(--text-color);
    line-height: 1.7;
}
.privacy-check-list { border-radius: 6px; overflow: hidden; border: 1px solid #d0d0d0; }
.privacy-check-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.4rem 2rem;
    background: #fff;
    border-bottom: 1px solid #ececec;
    transition: background 0.15s;
}
.privacy-check-item:last-child { border-bottom: none; }
.privacy-check-item:hover { background: #f8faff; }
.privacy-check-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--main-color);
    cursor: pointer;
    flex-shrink: 0;
}
.required-badge {
    color: #e53e3e;
    font-size: var(--fs-14);
    font-weight: var(--fw-600);
    white-space: nowrap;
    flex-shrink: 0;
}
.privacy-check-label {
    font-size: var(--fs-14);
    color: var(--text-color);
    flex: 1;
    font-weight: var(--fw-400);
}
.btn-view-policy {
    font-size: var(--fs-13, 1.3rem);
    color: var(--main-color);
    cursor: pointer;
    background: none;
    border: 1px solid var(--main-color);
    border-radius: 4px;
    padding: 0.4rem 1rem;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: var(--fw-500);
    transition: background 0.18s, color 0.18s;
    line-height: 1.4;
}
.btn-view-policy:hover {
    background: var(--main-color);
    color: #fff;
}

/* ===== 개인정보 모달 오버레이 ===== */
.policy-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.policy-modal-overlay.open {
    display: flex;
    animation: fadeInOverlay 0.2s ease;
}
@keyframes fadeInOverlay {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.policy-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    max-width: 560px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUpModal 0.22s ease;
    overflow: hidden;
}
@keyframes slideUpModal {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.policy-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2.4rem 1.6rem;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}
.policy-modal-header h3 {
    font-size: var(--fs-16);
    font-weight: var(--fw-700);
    color: var(--text-color);
    line-height: 1.4;
    padding-right: 2rem;
}
.btn-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f0f0f0;
    color: #666;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.18s;
    line-height: 1;
}
.btn-modal-close:hover { background: #e0e0e0; color: #333; }
.policy-modal-body {
    padding: 2rem 2.4rem;
    overflow-y: auto;
    flex: 1;
}
.policy-modal-body ul {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.policy-modal-body ul li {
    font-size: var(--fs-14);
    color: var(--dgray-color);
    line-height: 1.7;
    padding: 1.2rem 1.4rem;
    background: #f8faff;
    border-radius: 6px;
    border-left: 3px solid var(--main-color);
}
.policy-label {
    color: var(--main-color);
    font-weight: var(--fw-600);
    display: block;
    margin-bottom: 0.4rem;
}
.policy-modal-footer {
    padding: 1.6rem 2.4rem 2.4rem;
    flex-shrink: 0;
}
.btn-policy-confirm {
    display: block;
    width: 100%;
    padding: 1.3rem;
    background: var(--main-color);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: var(--fs-16);
    font-weight: var(--fw-600);
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background 0.2s, transform 0.15s;
}
.btn-policy-confirm:hover {
    background: var(--main-d-color);
    transform: translateY(-1px);
}
.btn-policy-confirm:active { transform: translateY(0); }

/* ===== 5. 전자서명 ===== */
.signature-oath-box {
    background: #f0f6ff;
    border: 1px solid #bdd4f5;
    border-radius: 8px;
    padding: 2.4rem 2rem;
    text-align: center;
    margin-bottom: 1.4rem;
}
.signature-oath-box p {
    font-size: var(--fs-16);
    font-weight: var(--fw-600);
    color: var(--text-color);
    line-height: 1.8;
}
.sign-date {
    font-size: var(--fs-16);
    font-weight: var(--fw-600);
    color: var(--text-color);
    margin-top: 1rem !important;
}
.signature-canvas-wrap {
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    background: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.04);
    transition: border-color 0.2s;
}
.signature-canvas-wrap:hover { border-color: #aac4e8; }
.sign-hint {
    font-size: var(--fs-14);
    color: #c0c8d0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    white-space: nowrap;
}
#signatureCanvas {
    display: block;
    width: 100%;
    height: 220px;
    cursor: crosshair;
    touch-action: none;
}
.sign-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.4rem;
    gap: 1rem;
}
.sign-note {
    font-size: var(--fs-14);
    color: var(--main-color);
    font-weight: var(--fw-500);
    line-height: 1.5;
}
.btn-clear-sign {
    font-size: var(--fs-14);
    padding: 0.7rem 2rem;
    border: 1px solid #c0c8d0;
    border-radius: 6px;
    cursor: pointer;
    background: #fff;
    color: var(--dgray-color);
    white-space: nowrap;
    font-weight: var(--fw-500);
    transition: border-color 0.18s, background 0.18s, color 0.18s;
    flex-shrink: 0;
}
.btn-clear-sign:hover {
    border-color: var(--text-color);
    background: #f5f5f5;
    color: var(--text-color);
}

/* ===== 하단 버튼 그룹 ===== */
.apply-btn-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 3rem;
}
.btn-preview {
    display: block;
    width: 100%;
    padding: 1.9rem;
    background: #7a8899;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: var(--fs-20);
    font-weight: var(--fw-700);
    text-align: center;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: background 0.2s, transform 0.15s;
    font-family: 'Pretendard', sans-serif;
}
.btn-preview:hover {
    background: #5e6d7e;
    transform: translateY(-2px);
}
.btn-preview:active { transform: translateY(0); }

.btn-submit-apply {
    display: block;
    width: 100%;
    padding: 1.9rem;
    background: var(--main-color);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: var(--fs-20);
    font-weight: var(--fw-700);
    text-align: center;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    font-family: 'Pretendard', sans-serif;
}
.btn-submit-apply:hover {
    background: var(--main-d-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 69, 159, 0.25);
}
.btn-submit-apply:active { transform: translateY(0); box-shadow: none; }

/* ===== 반응형: 768px — 테이블 여백 축소 ===== */
@media screen and (max-width: 768px) {
    .apply-page-wrap { padding: 4rem 1.6rem 7rem; }
    .apply-title-box { padding: 2rem 1.4rem; margin-bottom: 3.5rem; }
    .apply-title-box h1 { font-size: var(--fs-18); }
    .apply-section { margin-bottom: 3.5rem; }
    .apply-course-box { padding: 2rem; }
    .apply-course-options { gap: 2.4rem; }

    /* 테이블: 2열 유지, 셀 여백만 축소 */
    .apply-field-label { width: 96px; padding: 1.2rem; font-size: 1.3rem; }
    .apply-field-input { padding: 0.6rem 1rem; }
    .apply-field-input input[type="text"],
    .apply-field-input input[type="email"] { font-size: 1.3rem; }
    .apply-field-input textarea { font-size: 1.3rem; }

    .sign-footer { flex-direction: column; align-items: flex-start; }
    .btn-preview, .btn-submit-apply { font-size: var(--fs-18); padding: 1.6rem; }
    .policy-modal { max-height: 85vh; }
}

/* ===== 반응형: 600px — 테이블 세로 스택 전환 ===== */
@media screen and (max-width: 600px) {

    /* table 요소 전체를 block으로 해제 */
    .apply-field-table,
    .apply-field-table tbody,
    .apply-field-table tr,
    .apply-field-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    /* colgroup 무력화 */
    .apply-field-table colgroup,
    .apply-field-table col { display: none; }

    /* 행(tr): 필드 그룹 사이 구분선 역할 */
    .apply-field-table tr {
        border-bottom: 6px solid #f0f4fb;
    }
    .apply-field-table tr:last-child {
        border-bottom: none;
    }

    /* 라벨 셀: 상단 헤더처럼 */
    .apply-field-label {
        width: 100%;
        padding: 1rem 1.4rem 0.7rem;
        border-right: none;
        border-bottom: 1px solid #e8eef5;
        font-size: 1.3rem;
        background: linear-gradient(135deg, #eef2fb 0%, #e4ecf6 100%);
        color: #3a4a6b;
        letter-spacing: -0.01em;
    }

    /* 입력 셀: 라벨 바로 아래 */
    .apply-field-input {
        width: 100%;
        padding: 1rem 1.4rem 1.2rem;
        border-bottom: none;
        background: #fff;
    }
    .apply-field-input:focus-within {
        background: #f5f9ff;
    }

    /* input · email */
    .apply-field-input input[type="text"],
    .apply-field-input input[type="email"] {
        width: 100%;
        font-size: 1.45rem;
        padding: 0.5rem 0;
    }

    /* textarea */
    .apply-field-input textarea {
        width: 100%;
        font-size: 1.45rem;
        min-height: 110px;
        padding: 0.6rem 0;
    }

    /* 라디오·체크박스 그룹 */
    .gender-radio-group {
        gap: 0.8rem 1.6rem;
    }
    .gender-radio-group label { font-size: 1.45rem; }

    /* 부가 입력창(inq_detail)이 있는 라벨 → 한 줄 전체 차지 */
    .gender-radio-group label:has(input.inq_detail) {
        width: 100%;
    }
    /* 부가 입력창 → 남은 공간 모두 채우기 (고정 너비 해제) */
    .gender-radio-group input[type="text"].inq_detail {
        width: auto;
        flex: 1;
        min-width: 0;
        font-size: 1.3rem;
    }

    /* hover 효과는 모바일에서 비활성화 */
    .apply-field-table tr:hover .apply-field-input {
        background: #fff;
    }

    /* 과정 선택 그리드: 1칸으로 전환 */
    .apply-course-options {
        grid-template-columns: 1fr;
    }
}

/* ===== 반응형: 480px ===== */
@media screen and (max-width: 480px) {
    .apply-page-wrap { padding: 3rem 1.2rem 6rem; }
    .apply-title-box { padding: 1.6rem 1rem; margin-bottom: 2.8rem; }
    .apply-title-box h1 { font-size: var(--fs-16); }
    .apply-section { margin-bottom: 2.8rem; }
    .apply-section-title { font-size: var(--fs-16); }
    .apply-course-options { gap: 1.8rem; grid-template-columns: 1fr; }

    /* 라디오·체크박스 그룹 */
    .gender-radio-group { gap: 0.7rem 1.2rem; }
    .gender-radio-group label { font-size: 1.35rem; }
    .gender-radio-group input[type="text"].inq_detail {
        font-size: 1.2rem;
    }

    /* 라벨 패딩 추가 축소 */
    .apply-field-label { padding: 0.9rem 1.2rem 0.6rem; font-size: 1.25rem; }
    .apply-field-input { padding: 0.8rem 1.2rem 1rem; }
    .apply-field-input input[type="text"],
    .apply-field-input input[type="email"],
    .apply-field-input textarea { font-size: 1.35rem; }

    .privacy-check-item { padding: 1.2rem 1.2rem; gap: 0.8rem; flex-wrap: wrap; }
    .privacy-check-label { font-size: 1.3rem; }
    .policy-modal-body ul li { font-size: 1.3rem; padding: 1rem 1.2rem; }
    .policy-modal-header { padding: 1.6rem 1.6rem 1.2rem; }
    .policy-modal-body { padding: 1.4rem 1.6rem; }
    .policy-modal-footer { padding: 1.2rem 1.6rem 1.8rem; }
    #signatureCanvas { height: 180px; }
    .sign-note { font-size: 1.25rem; }
}



/* ===== 완료 페이지 전체 레이아웃 ===== */
.complete-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: #fff;
}

/* ===== 카드 ===== */
.complete-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-align: center;
    width: 100%;
    max-width: 480px;
}

/* ===== 체크 아이콘 ===== */
.complete-icon-wrap {
    margin-bottom: 3.6rem;
}
.complete-icon {
    width: 90px;
    height: 90px;
    animation: popIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.complete-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}
@keyframes popIn {
    0%   { transform: scale(0.4); opacity: 0; }
    100% { transform: scale(1);   opacity: 1; }
}

/* ===== 완료 텍스트 ===== */
.complete-title {
    font-size: var(--fs-18);
    font-weight: var(--fw-700);
    color: #2f2f2f;
    line-height: 1.75;
    letter-spacing: -0.02em;
    margin-bottom: 3.6rem;
    animation: fadeUp 0.4s 0.2s ease both;
}
@keyframes fadeUp {
    0%   { transform: translateY(10px); opacity: 0; }
    100% { transform: translateY(0);    opacity: 1; }
}

/* ===== 이동 버튼 ===== */
.complete-btn {
    display: block;
    width: 100%;
    max-width: 360px;
    padding: 1.6rem 2rem;
    background: #3173c9;
    color: #fff;
    font-size: var(--fs-18);
    font-weight: var(--fw-700);
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    animation: fadeUp 0.4s 0.35s ease both;
}
.complete-btn:hover {
    background: var(--main-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(117, 119, 205, 0.35);
}
.complete-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ===== 반응형 ===== */
@media screen and (max-width: 480px) {
    .complete-icon { width: 74px; height: 74px; }
    .complete-title { font-size: var(--fs-16); margin-bottom: 3rem; }
    .complete-btn { font-size: var(--fs-16); padding: 1.4rem 1.6rem; }
}
