@charset "utf-8";
/* =====================================================
   lecture.css - 교육프로그램(수강신청) 독립 스타일시트
   다른 사이트에 적용해도 깨지지 않도록 분리
   ===================================================== */

/* ===== 참여 인원수 +/- 버튼 ===== */
.number-stepper {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
}
.number-stepper .stepper-btn {
    width: 3.4rem;
    height: 3.4rem;
    border: none;
    background: #f5f5f5;
    font-size: 1.6rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.number-stepper .stepper-btn:hover {
    background: #e0e0e0;
}
.number-stepper .stepper-btn:active {
    background: #d0d0d0;
}
.number-stepper #participantCount {
    width: 4.6rem;
    height: 3.4rem !important;
    text-align: center;
    border: none;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    border-radius: 0;
    font-size: 1.4rem;
    font-weight: 600;
    -moz-appearance: textfield;
}
.number-stepper #participantCount::-webkit-inner-spin-button,
.number-stepper #participantCount::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ===== 참가비 표시 ===== */
.payMoney {
    font-size: 1.8rem;
}
.payMoney strong {
    font-size: 1.8rem;
}
.payMoney #payFeeDisplay {
    font-size: 2rem;
    font-weight: 700;
    color: #2d6a4f;
}

/* ===== 단계 표시기 (step-indicator) ===== */
.step-indicator {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 6rem;
    flex-wrap: wrap;
}
.step-indicator .step {
    flex: 1 1 0;
    min-width: 10rem;
    text-align: center;
    padding: 1.5rem 2rem;
    font-size: 1.7rem;
    border-radius: 99.99rem;
    border: 0.1rem solid #d1d5db;
    background: #f9fafb;
    color: #4b5563;
    position: relative;
}
.step-indicator .step::before {
    content: attr(data-step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    margin-right: 0.6rem;
    border-radius: 99.9rem;
    border: 0.1rem solid #d1d5db;
    font-size: 1.4rem;
    background: #fff;
    color: #4b5563;
}
.step-indicator .step.is-active {
    border-color: #2d6a4f;
    background: #e8f5e9;
    color: #1b4332;
    font-weight: 600;
}
.step-indicator .step.is-active::before {
    border-color: #2d6a4f;
    background: #2d6a4f;
    color: #fff;
}

/* ===== 단계 패널 ===== */
.step-panel {
    display: none;
    margin-bottom: 4rem;
}
.step-panel.is-active {
    display: block;
}

/* ===== 상세 섹션 제목 ===== */
.detail-section-title {
    margin: 4rem 0 0.8rem 0;
    color: #111827;
    position: relative;
    padding-left: 1rem;
}
.detail-section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 0.3rem;
    height: 1.8rem;
    transform: translateY(-50%);
    border-radius: 99.9rem;
    background: #2d6a4f;
}

/* ===== 상세 설명 박스 ===== */
.detail-desc {
    border-radius: 1rem;
    background: #f9fafb;
    border: 0.1rem solid #e5e7eb;
    padding: 2rem;
    font-size: 1.6rem;
    color: #374151;
    line-height: 1.5;
    white-space: pre-line;
}

/* ===== 통계 표시 (모집인원 등) ===== */
.stats {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}
.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1.5rem;
    font-size: 1.5rem;
    color: #374151;
    background: #f3f4f6;
    border-radius: 99.9rem;
    border: 1px solid #e5e7eb;
}
.stat-pill strong {
    font-weight: 700;
    color: #111827;
}

/* ===== 폼 그리드 ===== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* ===== 폼 필드 ===== */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 1.6rem;
}
.form-field label {
    font-weight: 600;
    color: #333;
}
.form-field input,
.form-field textarea {
    border-radius: 0.4rem;
    border: 0.1rem solid #d1d5db;
    padding: 0.8rem 1rem;
    font-size: 1.6rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #2d6a4f;
    box-shadow: 0 0 0 0.1rem rgba(45, 106, 79, 0.15);
}
.form-field small {
    font-size: 1.3rem;
    color: #6b7280;
}

/* ===== 성별/작물 라디오 그룹 ===== */
.gender-group,
.crop-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 2rem;
    font-size: 1.6rem;
}
.gender-group label,
.crop-group label {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    color: #374151;
}
.crop-group + #cropOther {
    width: 100%;
    max-width: 28rem;
}
.form-field input.k-radio {
    border-radius: 99.9rem;
}

/* ===== 결과 메시지 ===== */
#resultMessage {
    margin-bottom: 4rem;
    border-left: 0.4rem solid #2d6a4f;
    padding-left: 1rem;
    background: #e8f5e9;
    border-radius: 0.8rem;
}
#resultDetail {
    margin-top: 1rem;
    white-space: pre-line;
}

/* ===== 하단 네비게이션 바 ===== */
.bottom-nav {
    position: relative;
    width: 100%;
    margin-top: 2rem;
    border-top: 0.1rem solid #e5e7eb;
    background: #f9fafb;
    z-index: 100;
}
.bottom-nav.is-fixed {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 999;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.06);
}
.bottom-nav-placeholder {
    height: 0;
}
.bottom-nav-inner {
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem 0;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

/* ===== 폼 메시지 (success / warn / error) ===== */
.form-msg {
    font-size: 1.5rem;
    color: #4b5563;
    padding: 1rem 2rem;
    border-radius: 99.9rem;
    background: #e5e7eb;
}
.form-msg.success {
    background: #e8f5e9;
    color: #1b4332;
    border: 0.1rem solid #e7d6a8;
}
.form-msg.warn {
    background: #e8f5e9;
    color: #1b4332;
    border: 0.1rem solid #d4edda;
}
.form-msg.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 0.1rem solid #fecaca;
}

/* ===== 하단 버튼 ===== */
.bottom-nav-buttons {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.bottom-nav .btn.btn-xs {
    min-width: 7rem;
    padding: 1rem 1.5rem;
    border-radius: 99.9rem;
    border: 0.1rem solid #d1d5db;
    background: #ffffff;
    font-size: 1.5rem;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.bottom-nav .btn.btn-xs:hover {
    background: #f3f4f6;
}
.bottom-nav .btn.btn-xs.btn-primary {
    background: #2d6a4f;
    border-color: #2d6a4f;
    color: #ffffff;
}
.bottom-nav .btn.btn-xs.btn-primary:hover {
    background: #1b4332;
    border-color: #1b4332;
}
.bottom-nav .btn.btn-xs.btn-primary.btn-wait {
    background: #2d6a4f;
    border-color: #2d6a4f;
}
.bottom-nav .btn.btn-xs.btn-primary.btn-wait:hover {
    background: #1b4332;
    border-color: #1b4332;
}

/* ===== 선택된 과목 행 ===== */
.course-row.row-selected {
    background-color: #e8f5e9;
}

/* ===== 과목명 링크 ===== */
.course-name a.course-link {
    color: #111827;
    text-decoration: underline;
    text-underline-offset: 0.2rem;
}
.course-name a.course-link:hover {
    text-decoration: none;
}

/* ===== 검색폼 + 목록 간격 ===== */
#bbsInput + #bbsList {
    margin-top: 8rem;
}
#bbsInput .fieldList + .txtCenter {
    margin-top: 4rem;
}
.fieldList li .con .fields {
    gap: 2rem;
}
.fieldList li .con .field + .field {
    margin-left: 0;
}


/* =============================================================
   반응형 (1023px 이하)
   ============================================================= */
@media (max-width: 1023px) {
    /* number-stepper */
    .number-stepper .stepper-btn {
        width: 3.6rem;
        height: 3.6rem;
        font-size: 1.8rem;
    }
    .number-stepper #participantCount {
        width: 4.8rem;
        height: 3.6rem !important;
        font-size: 1.6rem;
    }
    /* 검색폼 + 목록 간격 */
    #bbsInput + #bbsList {
        margin-top: 4rem;
    }
    /* 단계 표시기 */
    .step-indicator {
        flex-direction: column;
        gap: 0.6rem;
        margin-bottom: 3rem;
    }
    .step-indicator .step {
        padding: 1.2rem 1.6rem;
        font-size: 1.5rem;
        text-align: left;
    }
    .step-panel {
        margin-bottom: 2rem;
    }
    /* 섹션 제목 / 설명 */
    .detail-section-title {
        margin: 2.5rem 0 0.8rem 0;
        font-size: 1.6rem;
    }
    .detail-desc {
        padding: 1.6rem;
        font-size: 1.4rem;
    }
    .stats {
        flex-wrap: wrap;
        gap: 0.6rem;
    }
    .stat-pill {
        padding: 0.8rem 1.2rem;
        font-size: 1.3rem;
    }
    /* 폼 그리드 */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1.4rem;
    }
    .form-field input,
    .form-field textarea {
        font-size: 1.4rem;
        line-height: 1.2;
        padding: 0.5rem 0.8rem;
    }
    /* 하단 네비 */
    .bottom-nav-inner {
        flex-direction: column;
        gap: 1rem;
        padding: 1.2rem 0;
    }
    .bottom-nav-buttons {
        width: 100%;
        justify-content: center;
    }
    .bottom-nav .btn.btn-xs {
        flex: none;
        text-align: center;
        padding: 1rem 2rem;
    }
    /* 3단계 */
    #step3 .bar {
        font-size: 1.8rem;
        padding: 1.2rem;
    }
    #step3 .detail-desc {
        font-size: 1.3rem;
        line-height: 1.8;
        word-break: keep-all;
    }
    #step3 .detail-section-title {
        font-size: 1.5rem;
    }
    /* 성공 메시지 */
    .form-msg.success {
        font-size: 1.4rem;
        padding: 1rem;
        word-break: keep-all;
    }
    /* 참여자 카드 여백 */
    #participantList > div {
        padding: 2rem !important;
    }
    /* 테이블 카드형 변환 */
    #bbsList table,
    .courseTable {
        border-top: none !important;
    }
    .courseTable thead {
        display: none;
    }
    .courseTable tbody tr {
        display: block;
        border: 0.1rem solid #e5e7eb;
        border-radius: 1rem;
        margin-bottom: 1.2rem;
        padding: 1.4rem;
        background: #fff;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    }
    .courseTable tbody td {
        display: flex !important;
        justify-content: flex-start;
        align-items: center;
        padding: 0.5rem 0;
        border: none;
        font-size: 1.4rem;
        color: #444 !important;
        font-weight: 500;
    }
    .courseTable tbody td::before {
        content: attr(data-label);
        font-weight: 400;
        color: #999;
        margin-right: 1rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    /* 교육/모집기간 */
    .courseTable tbody td[data-label="교육/모집기간"] {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    /* 과목명 */
    .courseTable tbody td[data-label="과목명"] {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }
    .courseTable tbody td[data-label="과목명"] .course-name {
        font-size: 1.5rem;
        font-weight: 600;
    }
    .courseTable tbody td[data-label="과목명"] .meta-row {
        margin-top: 0.2rem;
    }
    .courseTable tbody td[data-label="과목명"] .fee-tag {
        font-size: 1.2rem;
        color: #2d6a4f;
    }
    /* 상태 배지 */
    .courseTable tbody td:first-child {
        display: block !important;
        padding: 0 !important;
        border: none !important;
        background: none !important;
        margin-bottom: 0.6rem;
    }
    .courseTable tbody td:first-child::before {
        display: none !important;
    }
    .courseTable tbody td:first-child .badge {
        display: inline-block;
        font-size: 1.2rem;
        font-weight: 700;
        color: #fff;
        padding: 0.4rem 1rem;
        border-radius: 99.9rem;
    }
    .courseTable tbody td:first-child .badge-open {
        background: #2563eb;
    }
    .courseTable tbody td:first-child .badge-wait {
        background: #d97706;
    }
    .courseTable tbody td:first-child .badge-done {
        background: #6b7280;
    }
    /* 신청 버튼 (마지막 td) */
    .courseTable tbody td:last-child {
        padding-bottom: 0;
        border-top: none !important;
        justify-content: flex-end;
    }
    .courseTable tbody td:last-child::before {
        display: none !important;
    }
    .courseTable tbody td.cell-action {
        justify-content: flex-end !important;
    }
    .courseTable tbody td.cell-action::before {
        display: none !important;
    }
    .courseTable tbody td + td {
        border-top: 0.1rem solid #f3f4f6;
    }
}


/* =============================================================
   반응형 (767px 이하 - 소형 모바일)
   ============================================================= */
@media (max-width: 767px) {
    /* 단계 표시기 */
    .step-indicator {
        gap: 0.4rem;
        margin-bottom: 2rem;
    }
    .step-indicator .step {
        padding: 1rem 1.4rem;
        font-size: 1.4rem;
    }
    /* 폼 */
    .form-grid {
        gap: 1.2rem;
    }
    .form-field {
        font-size: 1.4rem;
    }
    .form-field label {
        font-size: 1.4rem;
    }
    .form-field input,
    .form-field textarea {
        font-size: 1.4rem;
        line-height: 1.2;
        padding: 0.5rem 0.8rem;
    }
    .form-field small {
        font-size: 1.2rem;
    }
    .gender-group {
        gap: 1rem;
    }
    /* 섹션 */
    .detail-section-title {
        margin: 2rem 0 0.6rem 0;
        font-size: 1.5rem;
    }
    .detail-desc {
        padding: 1.2rem;
        font-size: 1.3rem;
    }
    .stat-pill {
        padding: 0.6rem 1rem;
        font-size: 1.2rem;
    }
    /* 하단 버튼 */
    .bottom-nav .btn.btn-xs {
        padding: 0.8rem 1rem;
        font-size: 1.3rem;
        min-width: 0;
    }
    /* 테이블 카드형 */
    .courseTable tbody tr {
        padding: 1.2rem;
        margin-bottom: 1rem;
    }
    #bbsList table tbody tr {
        border: none !important;
        background-color: #f7f8fa !important;
        padding: 2rem !important;
    }
    .courseTable tbody td {
        font-size: 1.3rem;
        padding: 0.4rem 0;
    }
    .courseTable tbody td::before {
        font-size: 1.2rem;
    }
}
