/* ================================================
   자가진단 공통 스타일
   - 구미문화재단 기존 디자인 시스템 적용
   ================================================ */

/* 메인 래퍼 - ethical_cont 스타일 적용 */
.self-diagnosis-wrap {
    background-color: rgba(209, 178, 217, 0.08);
    border: 1px solid rgba(77, 68, 133, 0.08);
    border-radius: 20px;
    padding: 35px 30px;
}

.diagnosis-intro {
    text-align: center;
    margin-bottom: 40px;
}

.diagnosis-title {
    font-size: 34px;
    font-weight: 700;
    color: var(--g-purple2);
    margin-bottom: 15px;
}

.diagnosis-desc {
    font-size: 18px;
    font-weight: 500;
    color: var(--g-black7);
    line-height: 1.5;
    margin-bottom: 10px;
}

.diagnosis-notice {
    font-size: 14px;
    color: #888;
}

/* 진단 카드 목록 - ethical_box 스타일 적용 */
.diagnosis-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    background-color: #fff;
    border: 1px solid #e4e4e4;
    padding: 25px;
    border-radius: 10px;
}

.diagnosis-card {
    display: flex;
    align-items: center;
    width: calc(33.333% - 14px);
    min-width: 280px;
    padding: 25px 20px;
    background: #fff;
    border: 2px solid #e4e4e4;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.diagnosis-card:hover {
    border-color: var(--g-purple2);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(77, 68, 133, 0.15);
}

.card-icon {
    flex-shrink: 0;
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--g-purple2);
    border-radius: 100%;
    color: #fff;
    font-size: 24px;
    margin-right: 15px;
}

.card-content {
    flex: 1;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.card-info {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
    line-height: 1.5;
}

.card-source {
    font-size: 12px;
    color: #999;
}

.card-arrow {
    font-size: 20px;
    color: #ccc;
    transition: transform 0.3s ease;
}

.diagnosis-card:hover .card-arrow {
    transform: translateX(5px);
    color: var(--g-purple2);
}

/* ================================================
   진단 컨테이너
   ================================================ */
.diagnosis-container {
    background-color: rgba(209, 178, 217, 0.08);
    border: 1px solid rgba(77, 68, 133, 0.08);
    border-radius: 20px;
    padding: 35px 30px;
}

.diagnosis-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e4e4e4;
}

.diagnosis-source {
    font-size: 14px;
    color: #888;
    margin-top: 10px;
}

.diagnosis-guide {
    font-size: 16px;
    color: #666;
    margin-top: 15px;
    line-height: 1.5;
}

/* 척도 범례 */
.scale-legend {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 14px;
    color: #666;
}

/* 문항 리스트 - ethical_box 스타일 */
.question-list {
    margin-bottom: 30px;
    background-color: #fff;
    border: 1px solid #e4e4e4;
    padding: 20px;
    border-radius: 10px;
}

.question-item {
    padding: 15px 0 15px 20px;
    border-bottom: 1px solid #E2DED5;
    position: relative;
    transition: background-color 0.2s ease;
}

.question-item:last-child {
    border-bottom: 0;
}

.question-item:hover {
    background-color: rgba(209, 178, 217, 0.05);
}

/* 체크박스 타입 */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-radius: 6px;
    margin-right: 15px;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--g-purple2);
    border-color: var(--g-purple2);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: "\2713";
    color: #fff;
    font-weight: bold;
}

.question-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--g-purple2);
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 500;
    margin-right: 12px;
    flex-shrink: 0;
}

.question-text {
    font-size: 16px;
    color: #666;
    line-height: 1.5;
    word-break: keep-all;
}

/* 척도 타입 */
.question-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.scale-options {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.scale-options label {
    flex: 1;
    min-width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    border: 2px solid #e4e4e4;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.scale-options label:hover {
    border-color: var(--g-purple2);
    background: rgba(209, 178, 217, 0.1);
}

.scale-options label input[type="radio"] {
    margin-bottom: 6px;
}

.scale-options label input[type="radio"]:checked + span {
    color: var(--g-purple2);
    font-weight: 600;
}

.scale-options label:has(input:checked) {
    border-color: var(--g-purple2);
    background: rgba(209, 178, 217, 0.15);
}

.scale-options span {
    font-size: 13px;
    color: #666;
}

/* 카테고리 섹션 */
.category-section {
    margin-bottom: 40px;
}

.category-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--g-purple2);
    padding: 15px 20px;
    background: rgba(209, 178, 217, 0.15);
    border-radius: 8px;
    margin-bottom: 20px;
}

/* 버튼 영역 */
.btn-area {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.btn-result {
    padding: 16px 50px;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    background: var(--g-purple2);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-result:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(77, 68, 133, 0.4);
}

.btn-retry, .btn-list {
    padding: 14px 35px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-retry {
    color: var(--g-purple2);
    background: #fff;
    border: 2px solid var(--g-purple2);
}

.btn-retry:hover {
    background: var(--g-purple2);
    color: #fff;
}

.btn-list {
    color: #666;
    background: #f5f5f5;
    border: 2px solid #ddd;
}

.btn-list:hover {
    background: #e9ecef;
}

/* ================================================
   결과 영역
   ================================================ */
.result-area {
    padding: 20px 0;
}

.result-box {
    text-align: center;
    padding: 50px 40px;
    border-radius: 20px;
    margin-bottom: 30px;
    color: #fff;
}

/* 결과 레벨별 색상 */
.result-box.level-1 {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.result-box.level-2 {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
}

.result-box.level-3 {
    background: linear-gradient(135deg, #ff512f 0%, #f09819 100%);
}

.result-box.level-4 {
    background: linear-gradient(135deg, #cb2d3e 0%, #ef473a 100%);
}

.result-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.result-level {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}

.result-score {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 15px;
}

.result-message {
    font-size: 16px;
    line-height: 1.6;
}

/* 성인지 감수성 결과 */
.gender-result {
    background: #fff;
    color: #333;
    border: 2px solid #e4e4e4;
}

.result-title {
    font-size: 24px;
    color: var(--g-purple2);
    margin-bottom: 10px;
}

.result-guide {
    color: #888;
    margin-bottom: 30px;
}

.category-results {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.category-result-item {
    text-align: left;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.category-result-item h5 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.score-bar {
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.score-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.8s ease;
}

.avg-score {
    font-size: 18px;
    font-weight: 600;
    color: var(--g-purple2);
    margin-bottom: 5px;
}

.interpretation {
    font-size: 14px;
    color: #666;
}

/* ================================================
   반응형
   ================================================ */
@media (max-width: 768px) {
    .self-diagnosis-wrap,
    .diagnosis-container {
        padding: 25px 20px;
        border-radius: 10px;
    }

    .diagnosis-title {
        font-size: 18px;
        padding-top: 10px;
    }

    .diagnosis-desc {
        font-size: 12px;
    }

    .diagnosis-list {
        gap: 12px;
        padding: 20px 15px;
    }

    .diagnosis-card {
        width: 100%;
        min-width: auto;
        padding: 20px 15px;
    }

    .card-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .card-title {
        font-size: 14px;
    }

    .card-info {
        font-size: 12px;
    }

    .scale-legend {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    .question-list {
        padding: 15px;
    }

    .question-item {
        padding: 10px 0;
    }

    .question-num {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .question-text {
        font-size: 12px;
    }

    .scale-options {
        flex-direction: column;
    }

    .scale-options label {
        flex-direction: row;
        justify-content: flex-start;
        padding: 12px 15px;
    }

    .scale-options label input[type="radio"] {
        margin-bottom: 0;
        margin-right: 10px;
    }

    .btn-area {
        flex-direction: column;
    }

    .btn-result, .btn-retry, .btn-list {
        width: 100%;
        text-align: center;
    }

    .result-icon {
        font-size: 48px;
    }

    .result-level {
        font-size: 20px;
    }

    .result-score {
        font-size: 14px;
    }

    .result-message {
        font-size: 13px;
    }
}
