/* =========================================================
   IWC Case Management Content Skin
   자활 사례관리 전용 CSS
   hn_layout.css 공통 컴포넌트 기반
========================================================= */

.iwc-case-page {
    width: 100%;
    max-width: var(--iwc-content-width);
    margin: 0 auto;
    color: var(--iwc-color-title);
    font-family: var(--iwc-font-family);
    line-height: 1.8;
    word-break: keep-all;
}

.iwc-case-page * {
    box-sizing: border-box;
}

.iwc-case-page img,
.iwc-case-page svg {
    max-width: 100%;
}

.iwc-case-page .iwc-card-inner p {
    margin: 0;
    font-size: 16px;
    line-height: 1.82;
    letter-spacing: -0.03em;
    color: var(--iwc-color-text);
}

/* 대상자 */
.iwc-case-target {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.iwc-case-target-item {
    min-height: 118px;
    padding: 24px 18px;
    border-radius: 20px;
    border: 1px solid rgba(0, 131, 203, 0.13);
    background: linear-gradient(135deg, rgba(234, 246, 251, 0.92), rgba(255,255,255,0.98));
    box-shadow: 0 12px 28px rgba(0, 91, 168, 0.045);
    text-align: center;
}

.iwc-case-target-item::before {
    content: "";
    display: block;
    width: 34px;
    height: 3px;
    margin: 0 auto 16px;
    border-radius: 999px;
    background: var(--sd-gradient-brand);
}

.iwc-case-target-item strong {
    display: block;
    font-size: 18px;
    font-weight: 850;
    line-height: 1.42;
    letter-spacing: -0.045em;
    color: var(--sd-color-primary-dark);
}

/* 사업내용 */
.iwc-case-business .iwc-card {
    height: 100%;
}

.iwc-case-business .iwc-card-inner {
    min-height: 210px;
}

.iwc-case-icon {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 18px;
    border-radius: 17px;
    background: var(--sd-color-primary-soft);
    color: var(--sd-color-primary-dark);
    font-size: 18px;
    font-weight: 900;
}

.iwc-case-business p {
    margin: 0;
    color: var(--iwc-color-muted);
}

/* 사례회의 */
.iwc-case-meeting .iwc-card {
    height: 100%;
}

.iwc-case-meeting-label {
    display: inline-flex;
    align-items: center;
    height: 30px;
    margin-bottom: 18px;
    padding: 0 13px;
    border-radius: 999px;
    background: var(--sd-color-primary-soft);
    color: var(--sd-color-primary-dark);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.08em;
}

.iwc-case-meeting-desc {
    margin: 0 0 20px !important;
    padding-left: 16px;
    border-left: 4px solid var(--sd-color-primary);
    font-size: 16px !important;
    font-weight: 600;
    color: var(--iwc-color-emphasis) !important;
}

.iwc-case-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.iwc-case-list li {
    position: relative;
    padding-left: 17px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.72;
    letter-spacing: -0.03em;
    color: var(--iwc-color-text);
}

.iwc-case-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .78em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--sd-color-primary);
}

/* =========================================================
   업무흐름도
========================================================= */

.iwc-case-flow {
    padding: 28px;
    border-radius: 26px;
    border: 1px solid rgba(0, 131, 203, 0.12);
    background:
        radial-gradient(circle at 18% 18%, rgba(0, 131, 203, 0.08), transparent 30%),
        radial-gradient(circle at 82% 78%, rgba(113, 183, 46, 0.10), transparent 34%),
        linear-gradient(180deg, #fff, #f8fbfc);
    box-shadow: 0 16px 38px rgba(0, 91, 168, 0.055);
    overflow: hidden;
}

.iwc-case-flow * {
    box-sizing: border-box;
}

.iwc-case-flow-grid {
    display: grid;
    grid-template-columns: 390px 170px 320px;
    gap: 0 22px;
    justify-content: center;
    align-items: start;
}

/* 좌측 패널 */
.iwc-case-flow-left {
    position: relative;
    min-height: 620px;
    padding: 28px 26px 24px;
    border-radius: 24px;
    border: 1px solid rgba(0, 131, 203, 0.13);
    background: rgba(234, 246, 251, 0.72);
}

.iwc-case-flow-main {
    display: grid;
    place-items: center;
    height: 128px;
    border-radius: 20px;
    background: var(--sd-gradient-primary);
    color: #fff;
    font-size: 28px;
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: -0.06em;
    box-shadow: 0 14px 28px rgba(0, 91, 168, 0.18);
}

.iwc-case-flow-left-text {
    position: absolute;
    left: 28px;
    top: 292px;
    width: 170px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.iwc-case-flow-left-text li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 12px;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.55;
    letter-spacing: -0.04em;
    color: var(--iwc-color-title);
}

.iwc-case-flow-left-text li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .76em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sd-color-primary);
}

/* 좌측 내부 세로 화살표 */
.iwc-case-flow-left::before,
.iwc-case-flow-left::after {
    content: "";
    position: absolute;
    top: 194px;
    width: 4px;
    height: 180px;
    border-radius: 999px;
    background: var(--sd-blue-900);
}

.iwc-case-flow-left::before {
    left: 126px;
}

.iwc-case-flow-left::after {
    right: 126px;
}

.iwc-case-flow-left .arrow-up-1,
.iwc-case-flow-left .arrow-down-1,
.iwc-case-flow-left .arrow-up-2,
.iwc-case-flow-left .arrow-down-2 {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
}

.iwc-case-flow-left .arrow-up-1 {
    left: 116px;
    top: 182px;
    border-bottom: 18px solid var(--sd-blue-900);
}

.iwc-case-flow-left .arrow-down-1 {
    left: 116px;
    top: 356px;
    border-top: 18px solid var(--sd-blue-900);
}

.iwc-case-flow-left .arrow-up-2 {
    right: 116px;
    top: 182px;
    border-bottom: 18px solid var(--sd-blue-900);
}

.iwc-case-flow-left .arrow-down-2 {
    right: 116px;
    top: 356px;
    border-top: 18px solid var(--sd-blue-900);
}

.iwc-case-flow-services {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 28px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.iwc-case-flow-service {
    min-height: 172px;
    padding: 22px 14px 18px;
    border-radius: 20px;
    text-align: center;
    font-size: 19px;
    font-weight: 900;
    line-height: 1.35;
    letter-spacing: -0.05em;
    box-shadow: 0 12px 26px rgba(0, 91, 168, 0.06);
}

.iwc-case-flow-service .symbol {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #fff;
    font-size: 20px;
    font-weight: 900;
    color: #222;
}

.iwc-case-flow-service.green {
    border: 2px solid rgba(113, 183, 46, 0.55);
    background: linear-gradient(135deg, #eef7cc, #cce98d);
}

.iwc-case-flow-service.purple {
    border: 2px solid rgba(130, 93, 196, 0.35);
    background: linear-gradient(135deg, #efe7ff, #d5c2f5);
}

/* 가운데 가로 화살표 */
.iwc-case-flow-transfer {
    padding-top: 118px;
}

.iwc-case-flow-hgroup {
    margin-bottom: 22px;
}

.iwc-case-flow-hlabel {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 850;
    line-height: 1.45;
    letter-spacing: -0.04em;
    color: #111;
}

.iwc-case-flow-hlabel--below {
    margin-top: 10px;
    margin-bottom: 0;
}

.iwc-case-flow-hlabel::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 50%;
    vertical-align: middle;
}

.iwc-case-flow-hlabel.blue::before {
    background: var(--sd-color-primary-dark);
}

.iwc-case-flow-hlabel.orange::before {
    background: #f39a1f;
}

.iwc-case-flow-harrow {
    position: relative;
    height: 4px;
    border-radius: 999px;
}

.iwc-case-flow-harrow.blue {
    background: var(--sd-color-primary-dark);
}

.iwc-case-flow-harrow.orange {
    background: #f39a1f;
}

.iwc-case-flow-harrow.blue::after {
    content: "";
    position: absolute;
    right: -2px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 18px solid var(--sd-color-primary-dark);
}

.iwc-case-flow-harrow.orange::before {
    content: "";
    position: absolute;
    left: -2px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-right: 18px solid #f39a1f;
}

/* 우측 영역 */
.iwc-case-flow-right {
    display: grid;
    grid-template-rows: auto 180px auto;
    align-items: center;
}

.iwc-case-flow-box {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 148px;
    padding: 24px 26px;
    border-radius: 22px;
    box-shadow: 0 14px 30px rgba(0, 91, 168, 0.08);
}

.iwc-case-flow-box .icon-circle {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
}

.iwc-case-flow-box strong {
    font-size: 28px;
    font-weight: 900;
    line-height: 1.34;
    letter-spacing: -0.06em;
    color: #111;
}

.iwc-case-flow-city {
    border: 2px solid #e7a13c;
    background: linear-gradient(135deg, #ffe2a2, #ffc765);
}

.iwc-case-flow-town {
    border: 2px solid #32a992;
    background: linear-gradient(135deg, #83dac8, #58c3af);
}

/* SVG 아이콘 */
.iwc-flow-svg {
    display: block;
    width: 42px;
    height: 42px;
}

.iwc-flow-svg.people {
    color: #d48e12;
}

.iwc-flow-svg.home {
    color: #1c9b87;
}

/* 우측 세로 흐름 */
.iwc-case-flow-vertical {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: center;
    justify-items: center;
}

.iwc-case-flow-vitem {
    display: flex;
    align-items: center;
    gap: 14px;
}

.iwc-case-flow-vitem.right {
    flex-direction: row-reverse;
}

.iwc-case-flow-vlabel {
    font-size: 16px;
    font-weight: 850;
    line-height: 1.6;
    letter-spacing: -0.04em;
    color: #111;
}

.iwc-case-flow-vlabel::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 50%;
    vertical-align: middle;
}

.iwc-case-flow-vitem.teal .iwc-case-flow-vlabel::before {
    background: #159c94;
}

.iwc-case-flow-vitem.purple .iwc-case-flow-vlabel::before {
    background: #7453b6;
}

.iwc-case-flow-vbar {
    position: relative;
    width: 5px;
    height: 140px;
    border-radius: 999px;
}

.iwc-case-flow-vitem.teal .iwc-case-flow-vbar {
    background: #159c94;
}

.iwc-case-flow-vitem.purple .iwc-case-flow-vbar {
    background: #7453b6;
}

.iwc-case-flow-vbar.up::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -2px;
    transform: translate(-50%, -100%);
    border-left: 13px solid transparent;
    border-right: 13px solid transparent;
    border-bottom: 22px solid currentColor;
}

.iwc-case-flow-vbar.down::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -2px;
    transform: translate(-50%, 100%);
    border-left: 13px solid transparent;
    border-right: 13px solid transparent;
    border-top: 22px solid currentColor;
}

.iwc-case-flow-vitem.teal .iwc-case-flow-vbar.up {
    color: #159c94;
}

.iwc-case-flow-vitem.purple .iwc-case-flow-vbar.down {
    color: #7453b6;
}

/* 모바일 요약 */
.iwc-case-flow-mobile {
    display: none;
}

/* 관리자 버튼 */
.iwc-content-admin {
    margin-top: 40px;
    text-align: right;
}

.iwc-content-admin a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    background: #333;
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

/* 반응형 */
@media (max-width: 1100px) {
    .iwc-case-target {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .iwc-case-flow-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .iwc-case-flow-transfer,
    .iwc-case-flow-vertical,
    .iwc-case-flow-left::before,
    .iwc-case-flow-left::after,
    .iwc-case-flow-left .arrow-up-1,
    .iwc-case-flow-left .arrow-down-1,
    .iwc-case-flow-left .arrow-up-2,
    .iwc-case-flow-left .arrow-down-2 {
        display: none;
    }

    .iwc-case-flow-left {
        min-height: auto;
        padding-bottom: 24px;
    }

    .iwc-case-flow-left-text,
    .iwc-case-flow-services {
        position: static;
        width: auto;
        margin-top: 22px;
    }

    .iwc-case-flow-services {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .iwc-case-flow-right {
        grid-template-rows: auto auto;
        gap: 16px;
    }

    .iwc-case-flow-mobile {
        display: grid;
        gap: 10px;
    }

    .iwc-case-flow-mobile div {
        padding: 15px 16px;
        border-radius: 16px;
        border: 1px solid rgba(0, 131, 203, 0.12);
        background: #fff;
        font-size: 15px;
        font-weight: 700;
        line-height: 1.6;
        letter-spacing: -0.03em;
        color: var(--iwc-color-text);
    }
}

@media (max-width: 768px) {
    .iwc-case-page .iwc-grid--2 {
        grid-template-columns: 1fr;
    }

    .iwc-case-target,
    .iwc-case-flow-services {
        grid-template-columns: 1fr;
    }

    .iwc-case-flow {
        padding: 22px;
        border-radius: 22px;
    }

    .iwc-case-flow-main {
        height: auto;
        min-height: 108px;
        padding: 20px;
        font-size: 24px;
    }

    .iwc-case-flow-box {
        min-height: 128px;
        padding: 22px;
    }

    .iwc-case-flow-box strong {
        font-size: 24px;
    }

    .iwc-case-flow-box .icon-circle {
        width: 66px;
        height: 66px;
    }

    .iwc-flow-svg {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .iwc-case-target-item {
        min-height: auto;
        padding: 22px 18px;
    }

    .iwc-case-business .iwc-card-inner {
        min-height: auto;
    }

    .iwc-case-flow {
        padding: 18px;
    }

    .iwc-case-flow-box {
        gap: 14px;
        padding: 18px;
    }

    .iwc-case-flow-box .icon-circle {
        width: 62px;
        height: 62px;
    }

    .iwc-flow-svg {
        width: 34px;
        height: 34px;
    }
}

/* =========================================================
   업무흐름도 이미지형
========================================================= */

.iwc-case-flow-figure {
    margin: 0;
    padding: 28px;
    border-radius: 26px;
    border: 1px solid rgba(0, 131, 203, 0.12);
    background:
        radial-gradient(circle at 18% 18%, rgba(0, 131, 203, 0.07), transparent 30%),
        radial-gradient(circle at 82% 78%, rgba(113, 183, 46, 0.08), transparent 34%),
        linear-gradient(180deg, #fff, #f8fbfc);
    box-shadow: 0 16px 38px rgba(0, 91, 168, 0.055);
}

.iwc-case-flow-figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 20px;
}

.iwc-case-flow-caption {
    margin-top: 14px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    letter-spacing: -0.03em;
    color: var(--iwc-color-muted);
    text-align: center;
}

@media (max-width: 768px) {
    .iwc-case-flow-figure {
        padding: 18px;
        border-radius: 22px;
    }

    .iwc-case-flow-figure img {
        border-radius: 16px;
    }
}

@media (max-width: 480px) {
    .iwc-case-flow-figure {
        padding: 14px;
        border-radius: 18px;
    }

    .iwc-case-flow-caption {
        font-size: 13px;
    }
}