/* =========================================================
   IWC Care Service Integrated Tabs
   돌봄사업 통합 탭 페이지 전용 CSS
   hn_layout.css 공통 컴포넌트 기반
========================================================= */

.iwc-care-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-care-page * {
    box-sizing: border-box;
}

.iwc-care-page img,
.iwc-care-page svg {
    max-width: 100%;
}

.iwc-care-lead p,
.iwc-care-info-card p,
.iwc-care-service-card p,
.iwc-care-contact-text,
.iwc-care-step > span:not(.iwc-care-step-num) {
    word-break: keep-all;
    overflow-wrap: normal;
}

/* =========================================================
   탭 구조
========================================================= */

.iwc-care-tabs {
    width: 100%;
}

.iwc-care-tab-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.iwc-care-tab-buttons {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 32px;
    padding: 12px;
    border-radius: 24px;
    border: 1px solid rgba(0, 131, 203, 0.12);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    box-shadow: 0 14px 34px rgba(0, 91, 168, 0.055);
}

.iwc-care-tab-buttons label {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid rgba(0, 131, 203, 0.13);
    background: #fff;
    color: var(--iwc-color-text);
    font-size: 15px;
    font-weight: 850;
    line-height: 1.35;
    letter-spacing: -0.04em;
    text-align: center;
    cursor: pointer;
    transition: all .22s ease;
    overflow: hidden;
}

.iwc-care-tab-buttons label::before {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    top: 0;
    height: 3px;
    border-radius: 0 0 999px 999px;
    background: var(--sd-gradient-brand);
    opacity: .42;
}

.iwc-care-tab-buttons label:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 131, 203, 0.22);
    color: var(--sd-color-primary-dark);
    background:
        linear-gradient(135deg, rgba(234, 246, 251, 0.94), rgba(244, 248, 230, 0.68)),
        #fff;
}

#iwc-care-tab-activity:checked ~ .iwc-care-tab-buttons label[for="iwc-care-tab-activity"],
#iwc-care-tab-housecare:checked ~ .iwc-care-tab-buttons label[for="iwc-care-tab-housecare"],
#iwc-care-tab-daily:checked ~ .iwc-care-tab-buttons label[for="iwc-care-tab-daily"],
#iwc-care-tab-homewelfare:checked ~ .iwc-care-tab-buttons label[for="iwc-care-tab-homewelfare"] {
    border-color: rgba(0, 131, 203, 0.24);
    background: var(--sd-gradient-primary);
    color: #fff;
    box-shadow: 0 14px 28px rgba(0, 91, 168, 0.18);
}

#iwc-care-tab-activity:checked ~ .iwc-care-tab-buttons label[for="iwc-care-tab-activity"]::before,
#iwc-care-tab-housecare:checked ~ .iwc-care-tab-buttons label[for="iwc-care-tab-housecare"]::before,
#iwc-care-tab-daily:checked ~ .iwc-care-tab-buttons label[for="iwc-care-tab-daily"]::before,
#iwc-care-tab-homewelfare:checked ~ .iwc-care-tab-buttons label[for="iwc-care-tab-homewelfare"]::before {
    background: rgba(255, 255, 255, 0.72);
    opacity: 1;
}

.iwc-care-tab-panel {
    display: none;
    animation: iwcCareFade .24s ease;
}

#iwc-care-tab-activity:checked ~ .iwc-care-panels #iwc-care-panel-activity,
#iwc-care-tab-housecare:checked ~ .iwc-care-panels #iwc-care-panel-housecare,
#iwc-care-tab-daily:checked ~ .iwc-care-panels #iwc-care-panel-daily,
#iwc-care-tab-homewelfare:checked ~ .iwc-care-panels #iwc-care-panel-homewelfare {
    display: block;
}

@keyframes iwcCareFade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   히어로
========================================================= */

.iwc-care-hero {
    position: relative;
    min-height: 330px;
    margin-bottom: 34px;
    border-radius: 28px;
    border: 1px solid rgba(0, 131, 203, 0.12);
    background:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, .98) 0%,
            rgba(255, 255, 255, .92) 42%,
            rgba(255, 255, 255, .22) 76%
        ),
        var(--care-hero-image) right center / cover no-repeat;
    box-shadow: 0 16px 38px rgba(0, 91, 168, 0.055);
    overflow: hidden;
}

.iwc-care-hero::after {
    content: "";
    position: absolute;
    right: -72px;
    bottom: -90px;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    background: rgba(113, 183, 46, 0.12);
}

.iwc-care-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    min-height: 330px;
    padding: 44px 46px;
}

.iwc-care-hero-text {
    max-width: 540px;
}

.iwc-care-hero-label {
    display: inline-flex;
    align-items: center;
    height: 30px;
    margin-bottom: 16px;
    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.12em;
}

.iwc-care-hero-title {
    margin: 0;
    font-size: clamp(28px, 3.4vw, 40px);
    font-weight: 900;
    line-height: 1.18;
    letter-spacing: -0.06em;
    color: #24495a;
}

.iwc-care-hero-desc {
    margin: 14px 0 0;
    font-size: clamp(15px, 1.6vw, 18px);
    font-weight: 600;
    line-height: 1.58;
    letter-spacing: -0.035em;
    color: #49616b;
}

/* =========================================================
   대표 설명 박스
========================================================= */

.iwc-care-lead {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    margin-bottom: 46px;
    padding: 32px 34px;
    border-radius: 24px;
    border: 1px solid rgba(0, 131, 203, 0.13);
    background:
        linear-gradient(135deg, rgba(234, 246, 251, 0.82), rgba(255,255,255,0.98)),
        #fff;
    box-shadow: 0 14px 34px rgba(0, 91, 168, 0.055);
}

.iwc-care-lead-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 128px;
    height: 128px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    font-size: 0;
    line-height: 0;
}

.iwc-care-lead-icon img {
    display: block;
    width: 128px;
    height: 128px;
    object-fit: contain;
}

.iwc-care-lead p {
    margin: 0;
    font-size: clamp(16px, 1.8vw, 19px);
    font-weight: 600;
    line-height: 1.82;
    letter-spacing: -0.035em;
    color: var(--iwc-color-emphasis);
}

/* =========================================================
   이용 안내 카드
========================================================= */

.iwc-care-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.iwc-care-info-card {
    padding: 26px 24px;
    border-radius: 22px;
    border: 1px solid rgba(0, 131, 203, 0.13);
    background: #fff;
    box-shadow: 0 12px 28px rgba(0, 91, 168, 0.05);
}

.iwc-care-info-label {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin-bottom: 12px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--sd-color-primary-soft);
    color: var(--sd-color-primary-dark);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: -0.02em;
}

.iwc-care-info-card:nth-child(2n) .iwc-care-info-label {
    background: var(--sd-color-secondary-soft);
    color: var(--sd-color-secondary-dark);
}

.iwc-care-info-card h4 {
    margin: 0 0 10px;
    font-size: 21px;
    font-weight: 850;
    line-height: 1.35;
    letter-spacing: -0.05em;
    color: var(--iwc-color-title);
}

.iwc-care-info-card p {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.78;
    letter-spacing: -0.03em;
    color: var(--iwc-color-muted);
}

.iwc-care-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 16px;
}

.iwc-care-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 13px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(234,246,251,.95), rgba(244,248,230,.75));
    color: var(--iwc-color-emphasis);
    font-size: 14px;
    font-weight: 750;
    letter-spacing: -0.035em;
}

/* =========================================================
   주요 서비스 카드
========================================================= */

.iwc-care-service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.iwc-care-service-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 282px;
    padding: 40px 28px 32px;
    border-radius: 24px;
    border: 1px solid rgba(0, 131, 203, 0.13);
    background: #fff;
    box-shadow: 0 14px 34px rgba(0, 91, 168, 0.055);
    overflow: hidden;
    text-align: center;
}

.iwc-care-service-card::before {
    content: "";
    position: absolute;
    left: 24px;
    right: 24px;
    top: 0;
    height: 4px;
    border-radius: 0 0 999px 999px;
    background: var(--sd-gradient-brand);
}

.iwc-care-service-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 156px;
    height: 156px;
    margin: 0 auto 22px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    font-size: 0;
    line-height: 0;
}

.iwc-care-service-card:nth-child(2) .iwc-care-service-icon,
.iwc-care-service-card:nth-child(3) .iwc-care-service-icon {
    background: transparent;
    color: inherit;
}

.iwc-care-service-icon img {
    display: block;
    width: 156px;
    height: 156px;
    object-fit: contain;
}

.iwc-care-service-card h4 {
    width: 100%;
    margin: 0 0 6px;
    font-size: 21px;
    font-weight: 850;
    line-height: 1.35;
    letter-spacing: -0.05em;
    color: var(--iwc-color-title);
    text-align: center;
}

.iwc-care-service-card p {
    width: 100%;
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.74;
    letter-spacing: -0.03em;
    color: var(--iwc-color-muted);
    text-align: center;
}

/* =========================================================
   신청 절차 카드
========================================================= */

.iwc-care-simple-steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin-top: 22px;
    overflow: visible;
}

.iwc-care-step {
    position: relative;
    z-index: 1;
    min-height: 190px;
    padding: 30px 22px 26px;
    border-radius: 24px;
    border: 1px solid rgba(0, 131, 203, 0.14);
    background:
        linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(248,252,253,.96) 100%),
        #fff;
    box-shadow: 0 14px 32px rgba(0, 91, 168, 0.055);
    overflow: visible;
}

.iwc-care-step::before {
    content: "";
    position: absolute;
    left: 22px;
    right: 22px;
    top: 0;
    height: 4px;
    border-radius: 0 0 999px 999px;
    background: var(--sd-gradient-brand);
}

.iwc-care-step .iwc-care-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin: 0 0 18px;
    padding: 0;
    border-radius: 15px;
    background: var(--sd-gradient-primary);
    color: #fff;
    font-size: 17px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
    box-shadow: 0 10px 22px rgba(0, 91, 168, 0.18);
}

.iwc-care-step strong {
    display: block;
    margin: 0 0 10px;
    font-size: 19px;
    font-weight: 850;
    line-height: 1.35;
    letter-spacing: -0.05em;
    color: var(--iwc-color-title);
}

.iwc-care-step > span:not(.iwc-care-step-num) {
    display: block;
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.72;
    letter-spacing: -0.035em;
    color: var(--iwc-color-muted);
}

.iwc-care-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -28px;
    z-index: 5;
    width: 30px;
    height: 30px;
    transform: translateY(-50%);
}

.iwc-care-step:not(:last-child) strong::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -16px;
    z-index: 6;
    width: 7px;
    height: 7px;
    border-top: 2px solid var(--sd-color-primary-dark);
    border-right: 2px solid var(--sd-color-primary-dark);
    transform: translateY(-50%) rotate(45deg);
}

/* =========================================================
   장기요양 인정 절차 이미지
========================================================= */

.iwc-care-process-image {
    margin: 0;
    padding: 26px;
    border-radius: 26px;
    border: 1px solid rgba(0, 131, 203, 0.12);
    background:
        radial-gradient(circle at 18% 18%, rgba(0, 131, 203, 0.06), transparent 30%),
        radial-gradient(circle at 82% 78%, rgba(113, 183, 46, 0.07), transparent 34%),
        linear-gradient(180deg, #fff, #f8fbfc);
    box-shadow: 0 16px 38px rgba(0, 91, 168, 0.055);
    overflow: hidden;
}

.iwc-care-process-image img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 18px;
}

/* =========================================================
   공통 하단 문의
========================================================= */

.iwc-care-contact-section {
    margin-top: 58px;
}

.iwc-care-contact-section .iwc-section-head {
    margin-bottom: 18px;
}

.iwc-care-contact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    margin-top: 0;
    padding: 30px 34px;
    border-radius: 24px;
    border: 1px solid rgba(0, 131, 203, 0.14);
    background:
        radial-gradient(circle at 92% 18%, rgba(113,183,46,.12), transparent 32%),
        linear-gradient(135deg, rgba(234,246,251,.96), rgba(255,255,255,.98));
    box-shadow: 0 14px 34px rgba(0, 91, 168, 0.055);
}

.iwc-care-contact-title {
    margin: 0 0 6px;
    font-size: 19px;
    font-weight: 850;
    line-height: 1.35;
    letter-spacing: -0.045em;
    color: var(--iwc-color-title);
}

.iwc-care-contact-text {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.75;
    letter-spacing: -0.035em;
    color: var(--iwc-color-muted);
}

.iwc-care-contact-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 0 24px;
    border-radius: 999px;
    background: var(--sd-gradient-primary);
    color: #fff;
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 900;
    letter-spacing: -0.04em;
    white-space: nowrap;
    box-shadow: 0 14px 28px rgba(0, 91, 168, 0.18);
}

/* =========================================================
   관리자 버튼
========================================================= */

.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: 1024px) {
    .iwc-care-tab-buttons {
        position: relative;
        top: auto;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .iwc-care-service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .iwc-care-simple-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .iwc-care-step:not(:last-child)::after,
    .iwc-care-step:not(:last-child) strong::after {
        display: none;
    }
}

@media (max-width: 900px) {
    .iwc-care-info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .iwc-care-tab-buttons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 10px;
        border-radius: 22px;
    }

    .iwc-care-tab-buttons label {
        min-height: 56px;
        padding: 11px 10px;
        border-radius: 16px;
        font-size: 15.5px;
        line-height: 1.32;
        letter-spacing: -0.045em;
    }

    .iwc-care-hero {
        min-height: 280px;
        border-radius: 24px;
    }

    .iwc-care-hero-inner {
        min-height: 280px;
        padding: 34px 28px;
    }

    .iwc-care-hero-title {
        font-size: clamp(27px, 7vw, 34px);
        line-height: 1.2;
    }

    .iwc-care-hero-desc {
        margin-top: 12px;
        font-size: 15px;
        line-height: 1.55;
    }

    .iwc-care-lead {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 28px 24px;
        border-radius: 22px;
        text-align: left;
    }

    .iwc-care-lead-icon {
        justify-self: center;
    }

    .iwc-care-lead-icon,
    .iwc-care-lead-icon img {
        width: 138px;
        height: 138px;
    }

    .iwc-care-service-grid {
        grid-template-columns: 1fr;
    }

    .iwc-care-service-card {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        grid-template-areas:
            "icon title"
            "icon text";
        grid-template-rows: auto auto;
        column-gap: 18px;
        row-gap: 3px;
        align-items: center;
        min-height: auto;
        padding: 28px 22px;
        text-align: left;
    }

    .iwc-care-service-icon {
        grid-area: icon;
        align-self: center;
        justify-self: center;
        width: 112px;
        height: 112px;
        margin: 0;
    }

    .iwc-care-service-icon img {
        width: 112px;
        height: 112px;
    }

    .iwc-care-service-card h4 {
        grid-area: title;
        align-self: end;
        margin: 0;
        text-align: left;
        font-size: 20px;
        line-height: 1.28;
    }

    .iwc-care-service-card p {
        grid-area: text;
        align-self: start;
        margin: 0;
        text-align: left;
        font-size: 15px;
        line-height: 1.62;
    }

    .iwc-care-simple-steps {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .iwc-care-step {
        display: grid;
        grid-template-columns: 54px minmax(0, 1fr);
        grid-template-areas:
            "num title"
            "num desc";
        column-gap: 16px;
        row-gap: 6px;
        align-items: start;
        min-height: auto;
        padding: 22px 20px;
        border-radius: 20px;
    }

    .iwc-care-step::before {
        left: 0;
        right: auto;
        top: 20px;
        bottom: 20px;
        width: 4px;
        height: auto;
        border-radius: 0 999px 999px 0;
    }

    .iwc-care-step .iwc-care-step-num {
        grid-area: num;
        align-self: center;
        width: 46px;
        height: 46px;
        margin: 0;
        border-radius: 16px;
    }

    .iwc-care-step strong {
        grid-area: title;
        margin: 0;
        font-size: 18px;
    }

    .iwc-care-step > span:not(.iwc-care-step-num) {
        grid-area: desc;
        font-size: 14px;
        line-height: 1.65;
    }

    .iwc-care-process-image {
        padding: 16px;
        border-radius: 22px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .iwc-care-process-image img {
        width: auto;
        max-width: none;
        min-width: 760px;
        border-radius: 14px;
    }

    .iwc-care-contact {
        grid-template-columns: 1fr;
        padding: 28px 24px;
    }

    .iwc-care-contact-number {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .iwc-care-tab-buttons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 9px;
        border-radius: 20px;
    }

    .iwc-care-tab-buttons label {
        min-height: 54px;
        padding: 10px 8px;
        border-radius: 15px;
        font-size: 15px;
        line-height: 1.28;
    }

    .iwc-care-tab-buttons label::before {
        left: 14px;
        right: 14px;
    }

    .iwc-care-hero {
        min-height: 250px;
        border-radius: 20px;
        background:
            linear-gradient(
                90deg,
                rgba(255,255,255,.98) 0%,
                rgba(255,255,255,.93) 58%,
                rgba(255,255,255,.34) 100%
            ),
            var(--care-hero-image) right center / cover no-repeat;
    }

    .iwc-care-hero-inner {
        min-height: 250px;
        padding: 28px 22px;
    }

    .iwc-care-hero-title {
        font-size: 28px;
        letter-spacing: -0.055em;
    }

    .iwc-care-hero-desc {
        font-size: 14.5px;
        line-height: 1.52;
    }

    .iwc-care-lead {
        padding: 24px 20px;
        border-radius: 18px;
    }

    .iwc-care-lead-icon,
    .iwc-care-lead-icon img {
        width: 124px;
        height: 124px;
    }

    .iwc-care-service-card {
        grid-template-columns: 96px minmax(0, 1fr);
        column-gap: 14px;
        row-gap: 2px;
        padding: 24px 18px;
        border-radius: 20px;
    }

    .iwc-care-service-icon,
    .iwc-care-service-icon img {
        width: 96px;
        height: 96px;
    }

    .iwc-care-service-card h4 {
        margin: 0;
        font-size: 18px;
        line-height: 1.28;
    }

    .iwc-care-service-card p {
        margin: 0;
        font-size: 14px;
        line-height: 1.58;
    }

    .iwc-care-step {
        grid-template-columns: 48px minmax(0, 1fr);
        column-gap: 14px;
        padding: 20px 18px;
    }

    .iwc-care-step .iwc-care-step-num {
        width: 42px;
        height: 42px;
        font-size: 16px;
        border-radius: 14px;
    }

    .iwc-care-step strong {
        font-size: 17px;
    }

    .iwc-care-contact {
        border-radius: 20px;
    }

    .iwc-care-contact-title {
        font-size: 18px;
    }

    .iwc-care-contact-text {
        font-size: 15px;
        line-height: 1.68;
    }
}

/* =========================================================
   인쇄
========================================================= */

@media print {
    .iwc-care-tab-buttons {
        display: none;
    }

    .iwc-care-tab-panel {
        display: block !important;
        page-break-inside: avoid;
        margin-bottom: 40px;
    }
}