/* ========================
   sub1_4 : 자금상담신청서 폼
   ======================== */
.consult_form {
    margin-bottom: 40px;
}

.cf_row {
    display: flex;
    align-items: center;
    padding: 0;
    border-bottom: 1px solid #eeeeee;
}

.cf_row:first-child {
    border-top: 1px solid var(--blue);
}

.cf_req{
    color: #F58322;
    margin-left: 2.5px;
}

.cf_row_textarea .cf_label {
    padding: 100px 20px;
}
.cf_label {
    width: 20%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 40px 20px;
    color: var(--blue);
    background-color: #f7f8fa;
    border-right: 1px solid #eeeeee;   /* ⚠ 추가: 라벨과 인풋 영역 세로 구분선 */
    box-sizing: border-box;
}

.cf_row > div,
.cf_textarea,
.cf_input {
    flex: 1;
    font-family: 'Pretendard-Regular';
    font-weight: 400;
}

.cf_row_textarea textarea {
    height: 150px !important;
    overflow-y: auto;
    padding: 20px;
}

.cf_textarea::placeholder,
.cf_input::placeholder {
    color: #959595;
}


.cf_textarea,
.cf_input {
    height: 48px;
    padding: 0 16px;
    margin: 0 20px;
    border: 1px solid #D7D7D7;
    border-radius: 4px;
    font-size: 15px;
    color: #222222;
    transition: border-color .2s;
    box-sizing: border-box;
}

.cf_textarea:focus,
.cf_textarea:hover,
.cf_input:hover,
.cf_input:focus {
    border-color: var(--blue);
}

.cf_textarea::placeholder,
.cf_input::placeholder {
    color: #aaaaaa;
}

.cf_hint {
    color: #999999;
    margin-left: 20px;
    margin-top: 8px;
}

/* 개인정보 동의 박스 */
.agree_box {
    margin-top: 40px;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #D7D7D7;
    border-bottom: none;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.agree_title {
    color: #111111;
    margin-bottom: 20px;
}

.agree_required {
    color: var(--blue);
}

.agree_text {
    max-height: 260px;
    overflow-y: auto;
    padding: 50px;
    background-color: #F9F9F9;
    border-radius: 8px;
    color: #222;
    line-height: 1.7;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.agree_text p {
    margin-bottom: 16px;
}

.agree_text p:last-child {
    margin-bottom: 0;
}

.agree_check_row {
    display: flex;
    align-items: center;
    gap: 0 10px;
    padding: 20px;
    background-color: #eef4fb;
    border: 1px solid #D7D7D7;
    border-top: none;
    border-radius: 8px;
    border-top-left-radius: 0px;
    border-top-right-radius: 0;
}

.agree_checkbox {
    width: 15px;
    height: 15px;
    accent-color: var(--blue);
    cursor: pointer;
    flex-shrink: 0;
}

.agree_check_label {
    color: #333333;
    cursor: pointer;
}

.cf_submit_wrap {
    text-align: center;
    margin-top: 40px;
}

.cf_submit_btn {
    width: 100%;
    max-width: 400px;
    height: 56px;
    background-color: var(--blue);
    color: #fff;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}

.sub3_2_content .sub_table{
    margin: 35px 0;
}


.sub3_2_content .sub_cert_bar .period{
    align-items: flex-start;
}
.sub3_2_content .sub_cert_bar .period::before {
    content: "·";
}

.sub3_2_content .grid_table td{
    text-align: left;
}

/* ========================
   sub3_1 : 테이블 보더
   ======================== */
.td_group_sub{
    border: 1px solid #D7D7D7;
}
/* ========================
   sub3_3 : 소개부품장비의 범위 (관련근거 카드 3개 + 불릿리스트)
   ======================== */
.sub3_3_content .scope_label {
    display: flex;
    align-items: center;
    gap: 0 8px;
    color: #111111;
    margin-bottom: 20px;
}

.sub3_3_content .scope_bar {
    width: 4px;
    height: 18px;
    background-color: #F58322;
    border-radius: 2px;
}

.sub3_3_content .scope_card_list {
    gap: 20px;
    margin-bottom: 24px;
}

.sub3_3_content .scope_card {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: flex-start;
    gap: 0 14px;
    padding: 24px;
    background-color: #f8f8f8;
    border-radius: 10px;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.sub3_3_content .scope_badge {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 8px;
    background-color: var(--blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sub3_3_content .scope_card p {
    color: #333333;
    line-height: 1.5;
}

.sub3_3_content .scope_bullet_list {
    display: flex;
    flex-direction: column;
    gap: 8px 0;
}

.sub3_3_content .scope_bullet_list li {
    color: #777777;
    padding-left: 14px;
    position: relative;
}

.sub3_3_content .scope_bullet_list li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: #999999;
}

/* 표 제목 옆 출처 표기 */
.sub_sec_source {
    color: #222222;
    margin-left: 10px;
}

/* ========================
   sub3_3 : 부품소재 전문기업 인증 절차 (5스텝 한줄 + 분기 콜아웃)
   ======================== */
.sub3_3_content .proc_flow {
    position: relative;
    padding-top: 60px;
    margin-bottom: 40px;
}

.sub3_3_content .proc_branch {
    position: absolute;
    top: 0;
    /* left, width는 JS에서 동적으로 계산해서 inline으로 지정함 */
    height: 40px;
    border: 1px solid #d7d7d7;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    box-sizing: border-box;
    transition: left .2s, width .2s;
}

.sub3_3_content .proc_branch::before {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 1px;
    height: 20px;
    background-color: #dddddd;
}

.sub3_3_content .proc_branch::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: 0;
    width: 1px;
    height: 20px;
    background-color: #dddddd;
}

.sub3_3_content .proc_branch_label {
    color: var(--blue);
}

.sub3_3_content .proc_row {
    align-items: flex-start;
    gap: 0;
}

.sub3_3_content .proc_item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.sub3_3_content .proc_item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 40px;
    left: 60%;
    width: 80%;
    border-top: 2px dashed #cccccc;
}

.sub3_3_content .proc_circle {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}


.sub3_3_content .proc_label {
    color: var(--blue);
    margin-bottom: 4px;
}

.sub3_3_content .proc_name {
    color: #111111;
}


.sub3_4_content .sub_sec_title.sub_sec_title_row,
.sub3_3_content .sub_sec_title.sub_sec_title_row{
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sub3_3_content .sub_table td {
    border-right: 1px solid #D7D7D7;
}
.sub3_3_content .sub_table td:last-child {
    border-right: none;
}




/* ========================
   sub3_4 : R&D 지원사업 자금 컨설팅 설명문
   ======================== */
.sub3_4_content .sub_table{
    margin-top: 35px;
}
.sub3_4_content .rd_consult_desc {
    color: #777777;
    line-height: 25px;
    margin-top: 20px;
    margin-bottom: 35px;
}


/* ========================================================
   반응형 - 모바일 (~767px)
======================================================== */
@media screen and (max-width: 767px) {

     .cf_row {
        flex-direction: column;
        align-items: stretch;
    }

     .cf_label {
        width: 100%;
        padding: 16px 16px 12px;
        border-right: none;
        border-bottom: 1px solid #eeeeee;
    }

    .cf_row_textarea .cf_label{
        padding: 16px 16px 12px;
    }
    .cf_row_textarea textarea{
        margin-bottom: 16px;
        margin-top: 16px;
    }

    /* ⚠ flex:1이 세로축(column)에 적용되면서 가로폭 계산이 꼬이던 부분 수정 */
     .cf_row > div,
     .cf_input {
        flex: none;
        width: 100%;
    }

     .cf_input {
        margin: 16px;
        width: calc(100% - 32px);
        box-sizing: border-box;
    }

     .cf_hint {
        margin: 0 16px 16px;
    }

     .cf_row > div .cf_input {
        margin: 16px;
        width: calc(100% - 32px);
        box-sizing: border-box;
    }

     .cf_hint {
        margin: 0 16px 16px;
    }

    /* cf_row 안에 div로 감싸진 인풋(예: 힌트 문구 있는 필드)의 여백 정리 */
     .cf_row > div .cf_input {
        margin: 16px;
        width: calc(100% - 32px);
        height: 48px;
    }

    /* ---- 개인정보 동의 박스 ---- */
     .agree_box {
        padding: 20px;
    }

     .agree_title {
        margin-bottom: 14px;
    }

     .agree_text {
        max-height: 220px;
        padding: 20px;
    }

     .agree_check_row {
        padding: 16px;
        align-items: flex-start;
    }

     .agree_check_label {
        line-height: 1.5;
    }

    /* ---- 제출 버튼 ---- */
     .cf_submit_wrap {
        margin-top: 30px;
    }

     .cf_submit_btn {
        max-width: 100%;
        height: 52px;
    }
    /* ---- sub1_3 : grid_table 정렬은 이미 텍스트 정렬만이라 큰 변경 불필요,
       다만 좁은 화면에서 표 자체가 넘칠 수 있으므로 스크롤 확보 ---- */
    .sub1_3_content .grid_table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sub1_3_content .grid_table td,
    .sub1_3_content .grid_table th {
        white-space: nowrap;
    }


    /* ---- sub3_2 : 표 여백 축소 + 안내바 세로 정렬 ---- */
    .sub3_2_content .sub_table {
        margin: 20px 0;
    }

    .sub3_2_content .sub_cert_bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .sub3_2_content .sub_cert_bar .period {
        margin-top: 8px;
    }

    .sub3_2_content .grid_table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }


    /* ---- sub3_1 : td_group_sub 테두리는 그대로 유지 (변경 불필요) ---- */


    /* ---- sub3_3 : 관련근거 카드 3개 → 1열 세로 스택 ---- */
    .sub3_3_content .scope_label {
        margin-bottom: 14px;
    }

    .sub3_3_content .scope_card_list {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px;
    }

    .sub3_3_content .scope_card {
        min-width: 100%;
        padding: 18px;
    }

    .sub3_3_content .scope_bullet_list {
        gap: 6px 0;
    }

    /* 표 제목 옆 "*출처:" 텍스트가 좁은 화면에서 겹치지 않도록 줄바꿈 허용 */
    .sub3_3_content .sub_sec_title.sub_sec_title_row,
    .sub3_4_content .sub_sec_title.sub_sec_title_row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px 0;
    }

    .sub_sec_source {
        margin-left: 0;
    }

    /* 5스텝 인증절차: 가로 배치 → 세로 스택, 점선 방향 전환 */
    .sub3_3_content .proc_flow {
        padding-top: 50px;
    }

    .sub3_3_content .proc_row {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px 0;
    }

    .sub3_3_content .proc_item {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 0 16px;
        width: 100%;
    }

    .sub3_3_content .proc_circle {
        margin-bottom: 0;
    }

    /* 가로 점선(오른쪽) → 세로 점선(아래쪽)으로 전환 */
    .sub3_3_content .proc_item:not(:last-child)::after {
        top: auto;
        left: 20px;
        bottom: -24px;
        width: 0;
        height: 24px;
        border-top: 0;
        border-left: 2px dashed #cccccc;
    }

    /* proc_branch(서류보완요청 콜아웃)는 JS로 위치 계산되므로,
       좁은 화면에서 원 위치가 어긋나기 쉬워 모바일에서는 숨김 처리 권장 */
    .sub3_3_content .proc_branch {
        display: none;
    }

    .sub3_3_content .proc_branch::before,
    .sub3_3_content .proc_branch::after {
        display: none;
    }


    /* ---- sub3_4 : R&D 컨설팅 설명문 여백 축소 ---- */
    .sub3_4_content .sub_table {
        margin-top: 20px;
    }

    .sub3_4_content .rd_consult_desc {
        margin-top: 14px;
        margin-bottom: 24px;
        line-height: 1.6;
    }
}