@charset "utf-8";

/* =========================================================
   제주창암재활원 통합 반응형 보완
   - 기존 PC 디자인은 유지하고 고정폭만 유동폭으로 전환
   - 1180px 이하에서 모바일 전체메뉴와 단일 콘텐츠 열 사용
   - 이 파일은 default.css / footer_custom.css 뒤에 로드됨
========================================================= */

:root {
    --changam-wide: 1500px;
    --changam-content: 1117px;
    --changam-sub-content: 1280px;
    --changam-gutter: clamp(20px, 4vw, 70px);
    --changam-mobile-gutter: 16px;
    --changam-primary: #153f97;
    --changam-accent: #3a8afd;
}

html {
    min-width: 320px;
    overflow-x: hidden;
}

body {
    min-width: 0;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body.menu-open {
    overflow: hidden;
}

#hd,
#wrapper,
#ft {
    width: 100%;
    min-width: 0 !important;
}

img,
picture,
video,
canvas,
svg {
    max-width: 100%;
    height: auto;
}

iframe,
object,
embed {
    max-width: 100%;
}

input,
select,
textarea,
button {
    max-width: 100%;
}

/* ---------- Header: fluid desktop shell ---------- */
.hd-util-shell,
.hd-main-shell {
    width: 100% !important;
    max-width: var(--changam-wide);
    margin: 0 auto !important;
    padding-right: var(--changam-gutter);
    padding-left: var(--changam-gutter);
    position: relative;
}

.hd-util-shell #hd_wrapper {
    width: 100% !important;
    max-width: 1180px;
}

.hd-main-shell {
    min-height: 80px;
    display: flex;
    align-items: center;
}

#logo {
    float: none !important;
    flex: 0 0 auto;
    margin-left: 0 !important;
}

#logo a,
#logo img {
    display: block;
}

#logo img {
    width: auto;
    max-width: min(260px, 32vw);
    max-height: 62px;
}

#gnb {
    float: none !important;
    margin-left: auto;
}

#gnb .gnb_wrap {
    margin-right: 0 !important;
}

#gnb #gnb_1dul {
    display: flex;
    align-items: center;
}

#gnb .gnb_1dli {
    float: none !important;
}

.gnb_1da {
    padding: 12px clamp(18px, 2.35vw, 45px) !important;
    white-space: nowrap;
}

#gnb .gnb_menu_btn,
.gnb_mobile_util {
    display: none;
}

#submenu {
    width: 100% !important;
    max-width: 1300px;
    padding-right: 20px;
    padding-left: 20px;
}

#submenu > div:first-child {
    width: 27.6923% !important;
}

#submenu > div:nth-child(2) {
    width: 72.3077% !important;
}

/* ---------- Main/sub content fluid widths ---------- */
body.is-index #container_wr {
    width: 100% !important;
    max-width: none;
}

body.is-subpage #container_wr {
    width: calc(100% - 40px) !important;
    max-width: var(--changam-sub-content);
}

body.is-subpage #leftArea {
    width: 282px;
}

body.is-subpage #container {
    width: calc(100% - 340px) !important;
    max-width: 940px;
}

#container,
#content,
.content {
    max-width: 100%;
}

.content {
    width: 100% !important;
    display: flow-root;
}

/* ---------- Main visual and institutional cards ---------- */
#mainBg {
    width: 100%;
    min-width: 0 !important;
    height: clamp(500px, 41.9vw, 628px);
}

#mainBg .txt {
    position: absolute !important;
    left: 50% !important;
    bottom: clamp(38px, 6vw, 90px) !important;
    width: min(calc(100% - 40px), var(--changam-content));
    margin: 0 !important;
    transform: translateX(-50%);
}

.main_visual {
    width: 100%;
    height: clamp(480px, 40vw, 600px);
}

.main_cards {
    padding-right: 20px;
    padding-left: 20px;
}

.main_cards ul,
.main_notice {
    width: 100% !important;
    max-width: var(--changam-content);
}

.main_cards li,
.quick_wrap > *,
.stats > * {
    min-width: 0;
}

.quick_wrap,
.stats,
.btn-wrap {
    flex-wrap: wrap;
}

.mid_banner {
    width: 100%;
}

/* ---------- Footer fluid width ---------- */
#ft_copy {
    width: 100% !important;
    max-width: 1200px;
    padding-right: 20px;
    padding-left: 20px;
}

#iris_footer .iris_footer_inner {
    width: calc(100% - 40px) !important;
    max-width: var(--changam-content);
}

#iris_footer .iris_footer_info {
    width: min(820px, 100%) !important;
}

/* ---------- Fixed-width content elements ---------- */
.status-table,
.asset-table,
.asset-table2,
.asset-table3,
.board-table,
.table_st1,
.siseol_img {
    max-width: 100%;
}

.status-table {
    width: calc(100% - 20px) !important;
}

.hd_pops {
    max-width: calc(100vw - 32px);
}

/* =========================================================
   Tablet / mobile navigation
========================================================= */
@media (max-width: 1180px) {
    .hd-util-shell {
        display: none;
    }

    #hd {
        position: relative;
        border-bottom: 1px solid #e8e8e8;
        z-index: 100;
    }

    .hd-main-shell {
        min-height: 72px;
        padding-right: 20px;
        padding-left: 20px;
    }

    #logo img {
        max-width: min(240px, calc(100vw - 96px));
        max-height: 54px;
    }

    #gnb,
    #gnb .gnb_wrap {
        position: static;
    }

    #gnb #gnb_1dul,
    .submenu_bg {
        display: none !important;
    }

    #gnb .gnb_menu_btn {
        display: inline-flex !important;
        width: 48px;
        height: 48px;
        padding: 0;
        border: 0;
        border-radius: 4px;
        background: var(--changam-primary);
        align-items: center;
        justify-content: center;
    }

    .gnb_menu_icon,
    .gnb_menu_icon::before,
    .gnb_menu_icon::after {
        display: block;
        width: 24px;
        height: 2px;
        border-radius: 2px;
        background: #fff;
    }

    .gnb_menu_icon {
        position: relative;
    }

    .gnb_menu_icon::before,
    .gnb_menu_icon::after {
        content: '';
        position: absolute;
        left: 0;
    }

    .gnb_menu_icon::before {
        top: -7px;
    }

    .gnb_menu_icon::after {
        top: 7px;
    }

    #gnb_all {
        display: none;
        position: fixed !important;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        width: min(88vw, 430px) !important;
        height: 100vh;
        height: 100dvh;
        border: 0 !important;
        background: #fff;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        z-index: 10001 !important;
        box-shadow: -12px 0 28px rgba(0, 0, 0, .2) !important;
    }

    #gnb_all h2 {
        min-height: 68px;
        padding: 22px 70px 18px 22px;
        border-bottom: 1px solid #e6e9ed;
        color: #1d2634;
        font-size: 20px;
        line-height: 1.35;
    }

    #gnb .gnb_close_btn {
        top: 9px;
        right: 10px;
        width: 50px;
        height: 50px;
        color: #333;
        font-size: 22px;
        z-index: 2;
    }

    #gnb_all_bg {
        display: none;
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, .5);
        z-index: 10000;
    }

    .gnb_mobile_util {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 14px;
        padding: 14px 22px;
        border-bottom: 1px solid #e6e9ed;
        background: #f7f9fc;
    }

    .gnb_mobile_util li {
        position: relative;
        padding-right: 14px;
    }

    .gnb_mobile_util li:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 50%;
        right: 0;
        width: 1px;
        height: 11px;
        background: #c8cdd5;
        transform: translateY(-50%);
    }

    .gnb_mobile_util a {
        color: #4c5563;
        font-size: 13px;
        line-height: 1.5;
    }

    #gnb_all .gnb_al_ul {
        display: block;
        width: 100%;
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }

    #gnb_all .gnb_al_ul::after {
        display: none;
    }

    #gnb_all .gnb_al_ul > li:nth-child(5n+1),
    #gnb_all .gnb_al_li {
        float: none;
        width: 100%;
        min-height: 0;
        padding: 0;
        border: 0;
        border-bottom: 1px solid #e6e9ed;
    }

    #gnb_all .gnb_al_li .gnb_al_a {
        display: block;
        margin: 0;
        padding: 17px 22px;
        background: #fff;
        color: #1d2634;
        font-size: 17px;
        font-weight: 700;
    }

    #gnb_all .gnb_al_li > ul {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
        padding: 5px 14px 13px;
        background: #f7f9fc;
    }

    #gnb_all .gnb_al_li li {
        min-width: 0;
        line-height: 1.45;
    }

    #gnb_all .gnb_al_li li a {
        display: block;
        min-height: 44px;
        padding: 11px 8px;
        color: #4e5867;
        font-size: 14px;
        word-break: keep-all;
    }

    body.menu-open #top_btn {
        visibility: hidden;
    }

    /* Subpages become a single readable column. */
    body.is-subpage #container_wr {
        width: calc(100% - 40px) !important;
        max-width: 940px;
        margin-top: 36px !important;
    }

    body.is-subpage #leftArea {
        display: none;
    }

    body.is-subpage #container {
        float: none !important;
        width: 100% !important;
        max-width: none;
        min-height: 0;
        margin-bottom: 44px;
    }

    #wrapper img.sub-bg {
        width: 100% !important;
        height: clamp(190px, 25vw, 270px) !important;
        object-fit: cover !important;
        object-position: center !important;
    }

    #container_title {
        padding-bottom: 8px;
    }

    #container_title span.sub_title {
        font-size: clamp(24px, 3.2vw, 30px);
    }

    /* Main page blocks */
    #mainBg {
        height: clamp(430px, 58vw, 570px);
    }

    .controls .prev {
        left: 20px;
    }

    .controls .next {
        right: 20px;
    }

    .main_cards {
        margin-top: -70px;
    }

    .main_cards ul {
        flex-wrap: wrap;
        gap: 16px;
    }

    .main_cards li {
        flex: 1 1 calc(50% - 8px);
        min-height: 175px;
        height: auto;
        padding: 20px;
    }

    .main_notice {
        margin-top: 46px;
        margin-bottom: 46px;
        padding-right: 20px;
        padding-left: 20px;
    }

    .quick_wrap {
        gap: 20px;
        padding-right: 20px;
        padding-left: 20px;
    }

    .stats {
        gap: clamp(30px, 8vw, 80px);
        padding: 60px 20px;
    }

    /* Long-form custom content */
    .ceo-image,
    .ceo-image2 {
        position: static;
        float: right;
        width: min(38%, 320px);
        margin: 0 0 24px 32px;
    }

    .history-wrap2 {
        gap: 28px;
    }

    .history-image {
        flex: 0 0 320px;
        width: 320px;
    }

    .circle-photo {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .status-table {
        width: 100% !important;
        margin-left: 0;
    }

    .title_guide h3 {
        font-size: clamp(30px, 4vw, 40px);
    }
}

/* =========================================================
   Phone / small tablet
========================================================= */
@media (max-width: 768px) {
    body {
        font-size: .875em;
    }

    .hd-main-shell {
        min-height: 66px;
        padding-right: var(--changam-mobile-gutter);
        padding-left: var(--changam-mobile-gutter);
    }

    #logo img {
        max-width: min(220px, calc(100vw - 84px));
        max-height: 48px;
    }

    #gnb .gnb_menu_btn {
        width: 44px;
        height: 44px;
    }

    #gnb_all {
        width: min(92vw, 410px) !important;
    }

    #gnb_all .gnb_al_li > ul {
        grid-template-columns: 1fr;
    }

    #gnb_all .gnb_al_li li a {
        min-height: 42px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    body.is-subpage #container_wr {
        width: calc(100% - 32px) !important;
        margin-top: 28px !important;
    }

    #wrapper img.sub-bg {
        height: clamp(145px, 39vw, 210px) !important;
    }

    #container_title span.sub_title {
        margin-bottom: 4px;
        font-size: clamp(22px, 6vw, 28px);
    }

    #container_title span.sub_bu_title {
        display: block;
        padding-left: 0;
        font-size: 13px;
    }

    #mainBg {
        height: clamp(340px, 86vw, 480px);
    }

    #mainBg .txt {
        bottom: 32px !important;
        width: calc(100% - 32px);
    }

    .main_visual {
        height: clamp(340px, 82vw, 460px);
    }

    .visual_text {
        bottom: 75px;
        width: calc(100% - 32px);
        font-size: clamp(24px, 7vw, 34px);
        text-align: center;
        word-break: keep-all;
    }

    .controls span {
        font-size: 1.6em;
    }

    .controls .prev {
        left: 12px;
    }

    .controls .next {
        right: 12px;
    }

    .main_cards {
        margin-top: -48px;
        padding-right: var(--changam-mobile-gutter);
        padding-left: var(--changam-mobile-gutter);
    }

    .main_cards ul {
        gap: 12px;
    }

    .main_cards li {
        min-height: 145px;
        padding: 16px;
        font-size: 16px;
    }

    .main_notice {
        display: block;
        width: calc(100% - 32px) !important;
        margin: 38px auto;
        padding: 0;
    }

    .main_notice h2 {
        width: 100%;
        margin-bottom: 18px;
        padding-bottom: 12px;
        border-right: 0;
        border-bottom: 2px solid #ccc;
    }

    .main_notice ul {
        padding-left: 0;
    }

    .quick_menu {
        margin-top: 52px;
        padding-right: var(--changam-mobile-gutter);
        padding-left: var(--changam-mobile-gutter);
    }

    .quick_wrap {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
        padding: 0;
    }

    .mid_banner {
        min-height: 210px;
        height: auto;
        padding: 42px 20px;
        font-size: clamp(22px, 6vw, 28px);
        text-align: center;
    }

    .stats {
        gap: 28px;
        padding: 48px 16px;
        font-size: clamp(22px, 6vw, 30px);
    }

    /* Content typography and media */
    .top-eng {
        font-size: 20px;
    }

    .main-title {
        font-size: clamp(21px, 5.7vw, 25px);
        letter-spacing: -1px;
    }

    .content {
        font-size: clamp(16px, 4.4vw, 19px);
        line-height: 1.72;
    }

    .content p {
        margin-bottom: 24px;
    }

    .ceo-image,
    .ceo-image2 {
        float: none;
        width: min(82%, 320px);
        margin: 0 auto 26px;
    }

    .sign {
        margin-top: 42px;
        padding-right: 0;
    }

    .section-title,
    .asset-title,
    .status-title {
        margin-left: 0;
        padding-left: 16px;
        font-size: clamp(19px, 5vw, 22px);
    }

    .info-text,
    .info-text2 {
        padding-left: 0;
        font-size: 16px;
        line-height: 1.7;
        letter-spacing: -.5px;
    }

    .bullet-list {
        margin-left: 0;
    }

    .bullet-list li {
        font-size: 16px;
    }

    .cnt-box {
        padding: 22px 18px;
    }

    .title_guide h3 {
        margin-top: 30px;
        font-size: clamp(26px, 8vw, 34px);
    }

    .app {
        position: static;
        margin-top: 12px;
    }

    .app::after {
        content: '';
        display: block;
        clear: both;
    }

    /* History layout */
    .history-section {
        margin-top: 52px;
    }

    .history-wrap,
    .history-list {
        padding-left: 0;
    }

    .history-wrap2 {
        display: block;
    }

    .history-image {
        width: min(100%, 320px);
        margin: 0 auto 36px;
        padding-top: 0;
    }

    .bg-shape,
    .dot1,
    .dot2 {
        display: none;
    }

    .history-list .history-row,
    .history-wrap .history-row {
        display: grid;
        grid-template-columns: minmax(48px, auto) minmax(62px, auto) minmax(0, 1fr);
        gap: 8px;
    }

    .year,
    .year2,
    .date,
    .date2 {
        width: auto;
        font-size: 16px;
        text-align: left;
    }

    .history-text,
    .history-text2 {
        min-width: 0;
        font-size: 16px;
        line-height: 1.55;
        word-break: keep-all;
    }

    .history-text.small {
        padding-left: 0;
        margin-top: 0;
    }

    /* List/card layouts */
    .board_list .d_flex,
    .board_list.d_flex {
        display: flex !important;
        flex-direction: column;
        gap: 18px;
    }

    .board_list .img_box,
    .board_list .right {
        float: none !important;
        width: 100% !important;
    }

    .board_list .img_box {
        height: clamp(190px, 56vw, 300px);
    }

    .board_list .right {
        height: auto;
    }

    .board_list .btn_st1,
    .board_list .btn_st2,
    .board_list .btn_st3 {
        width: 100%;
        max-width: none;
        min-height: 50px;
        height: auto;
    }

    /* Tabs remain usable without squeezing text. */
    .tabs {
        overflow-x: auto;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }

    .tab {
        flex: 0 0 auto;
        min-width: 145px;
        padding: 13px 12px;
        font-size: 15px;
    }

    .tab_box {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tab_box .tab_btn {
        min-width: 0;
        height: auto;
        min-height: 52px;
        padding: 10px;
        border: 1px solid var(--tab-border);
    }

    /* Tables: preserve all data and allow horizontal swipe. */
    .tbl_wrap {
        max-width: 100%;
        margin-right: 0;
        margin-left: 0;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }

    .tbl_wrap > table,
    .tbl_head01 > table,
    .tbl_head02 > table,
    .tbl_frm01 > table {
        min-width: 640px;
    }

    .asset-table,
    .asset-table2,
    .asset-table3,
    .status-table,
    .board-table,
    .table_st1 {
        display: block;
        width: 100% !important;
        max-width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }

    .asset-table th,
    .asset-table2 th,
    .asset-table3 th,
    .status-table th,
    .asset-table td,
    .asset-table2 td,
    .asset-table3 td,
    .status-table td {
        font-size: 15px;
    }

    /* Forms */
    .twopart_input,
    .half_input,
    .form_01 .frm_label {
        width: 100% !important;
        margin-right: 0;
    }

    .tbl_frm01 th {
        width: 105px;
        padding-right: 10px;
        padding-left: 10px;
    }

    .bbs_search01 {
        padding-right: 12px;
        padding-left: 12px;
    }

    .bbs_search01 select,
    .bbs_search01 .input20f {
        width: 100%;
        max-width: 100%;
        margin-bottom: 8px;
    }

    #captcha {
        max-width: 100%;
    }

    /* Footer */
    #iris_footer .iris_footer_inner {
        width: calc(100% - 32px) !important;
        min-height: 0;
        padding-top: 38px;
        padding-bottom: 38px;
    }

    #iris_footer .iris_footer_logo {
        width: min(240px, 78vw);
    }

    #iris_footer .iris_footer_info {
        margin-top: 20px;
    }

    #iris_footer .iris_footer_address,
    #iris_footer .iris_footer_contact {
        font-size: 14px;
        line-height: 1.75;
        word-break: keep-all;
    }

    #iris_footer .iris_footer_menu {
        position: static;
        margin-top: 24px;
        font-size: 0;
    }

    #iris_footer .iris_footer_menu a {
        margin-top: 8px;
        margin-bottom: 8px;
        font-size: 13px;
    }

    #top_btn {
        right: 14px;
        bottom: 14px;
        width: 46px;
        height: 46px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    #gnb_all {
        width: 100% !important;
    }

    .main_cards li {
        flex-basis: 100%;
        min-height: 130px;
    }

    .quick_wrap {
        grid-template-columns: 1fr;
    }

    .stats {
        flex-direction: column;
        text-align: center;
    }

    .history-list .history-row,
    .history-wrap .history-row {
        grid-template-columns: 52px minmax(0, 1fr);
    }

    .history-list .history-row .history-text2,
    .history-wrap .history-row .history-text {
        grid-column: 2;
    }

    .btn-wrap {
        gap: 14px;
    }

    .btn_new {
        width: 100%;
        max-width: 300px;
        height: 50px;
        font-size: 18px;
    }

    .tab_box {
        grid-template-columns: 1fr;
    }

    #iris_footer .iris_footer_menu span {
        margin-right: 8px;
        margin-left: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
