/* ============================================================
   서브 페이지 공통 CSS
   ============================================================ */

/* ── 타이틀 섹션 ── */
.wv-title-container { padding: 80px 20px; text-align: center; }
.wv-title-container .wv-title { font-size: 36px; font-weight: 700; color: #000; letter-spacing: -0.05em; }
.wv-title-container .wv-sub-title { font-size: 16px; font-weight: 500; color: #333; margin-top: 10px; letter-spacing: -0.02em; }
.wv-title-container .wv-title-line { width: 100px; height: 3px; background-color: #102476; margin: 30px auto; }
.wv-title-container .wv-title-desc { font-size: 18px; color: #555; line-height: 1.6; word-break: keep-all; }

/* ── PC/모바일 이미지 전환 ── */
.wv-sub-con .wv-pc-img,
.wv-sub-con .wv-mo-img { width: 100%; height: auto; }
.wv-sub-con .wv-mo-img { display: none; }
.wv-sub-con .wv-pc-img { display: block; }

/* ── 등장 애니메이션 ── */
.sub-fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.sub-fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── 서브 페이지 이미지 블록 ── */
#sub-page-container { width: 100%; overflow: hidden; }
.sub-page-section { width: 100%; }

.sub-img-wrap { width: 100%; line-height: 0; display: block; }
.sub-img-wrap img,
.sub-img-wrap picture { width: 100%; height: auto; display: block; }

/* ── HTML 콘텐츠 블록 ── */
.sub-content-block { width: 100%; padding: 80px 20px; box-sizing: border-box; background: #fff; }
.sub-content-inner { max-width: 1200px; margin: 0 auto; }
.sub-content-title { font-size: 32px; font-weight: 700; color: #222; margin-bottom: 20px; line-height: 1.4; }
.sub-content-text { font-size: 16px; color: #555; line-height: 1.8; }

/* ── 서브 탭 메뉴 ── */
.sub-tab-nav { border-bottom: 1px solid #e2e2e2; background: #fff; }
.tab-list { display: flex; justify-content: center; max-width: 1200px; margin: 0 auto; list-style: none; padding: 0; }
.tab-list li { width: 180px; text-align: center; }
.tab-list li a { display: block; padding: 25px 0; font-size: 18px; color: #999; text-decoration: none; position: relative; transition: 0.3s; }
.tab-list li a.active { color: #102476; font-weight: 700; }
.tab-list li a.active::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 3px; background: #102476; }

/* ── 의료진 소개 ── */
.doctor-intro-section { padding: 60px 0; background: #fff; }
.inner-container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.profile-flex { display: flex; align-items: flex-start; gap: 60px; }
.doctor-photo { flex: 0 0 450px; }
.doctor-photo img { width: 100%; border-radius: 20px; box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.doctor-details { flex: 1; }
.doctor-details .eng-name { font-size: 15px; color: #8a96bc; letter-spacing: 1px; margin-bottom: 5px; }
.doctor-details .intro-title { font-size: 28px; font-weight: 700; color: #333; margin-bottom: 20px; position: relative; }
.doctor-details .intro-title::after { content: ''; display: block; width: 30px; height: 2px; background: #333; margin-top: 10px; }
.name-box { display: inline-block; background: #102476; color: #fff; padding: 8px 25px; font-size: 22px; font-weight: 500; margin-bottom: 25px; }
.name-box .highlight { font-weight: 700; margin-right: 5px; }
.history-list { list-style: none; padding: 0; margin: 0; }
.history-list li { position: relative; padding-left: 20px; margin-bottom: 8px; font-size: 16px; color: #444; line-height: 1.6; }
.history-list li::before { content: '◆'; position: absolute; left: 0; top: 4px; color: #102476; font-size: 12px; }
.history-list li.point { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.history-list li.point::before { content: ''; }
.k-icon { width: 20px; height: auto; }

/* ── 특장점 섹션 ── */
.clinic-features-container { width: 100%; }
.feature-section { padding: 80px 0; background: #fff; }
.feature-section.bg-gray { background: #f8f8f8; }
.feature-row { display: flex; align-items: center; justify-content: center; gap: 70px; }
.feature-row.reverse { flex-direction: row-reverse; }
.feature-img { flex: 0 0 350px; text-align: center; }
.feature-img img { width: 100%; max-width: 350px; border-radius: 50%; box-shadow: 0 15px 30px rgba(0,0,0,0.06); background: #fff; }
.feature-text { flex: 1; max-width: 500px; }
.feature-text .num { font-size: 26px; font-weight: 900; color: #102476; display: block; margin-bottom: 5px; }
.feature-text h4 { font-size: 34px; font-weight: bold; color: #102476; margin-bottom: 20px; letter-spacing: -1px; }
.feature-text p { font-size: 20px; font-weight: 500; color: #444; line-height: 1.7; word-break: keep-all; }

/* ════════════════════════════════════
   반응형
   ════════════════════════════════════ */
@media screen and (max-width: 991px) {
    .profile-flex { flex-direction: column; align-items: center; gap: 40px; }
    .doctor-photo { flex: 0 0 auto; width: 100%; max-width: 400px; }
    .doctor-details { width: 100%; }
}

@media screen and (max-width: 768px) {
    /* 타이틀 */
    .wv-title-container { padding: 50px 20px 0; }
    .wv-title-container .wv-title { font-size: 28px; }
    .wv-title-container .wv-sub-title { font-size: 14px; }
    .wv-title-container .wv-title-desc { font-size: 16px; }
    .br-pc { display: none; }

    /* 이미지 전환 */
    .wv-sub-con .wv-pc-img { display: none !important; }
    .wv-sub-con .wv-mo-img { display: block !important; }

    /* 탭 메뉴 */
    .tab-list li { width: 25%; }
    .tab-list li a { font-size: 14px; padding: 15px 0; }

    /* 콘텐츠 블록 */
    .sub-content-block { padding: 50px 20px; }
    .sub-content-title { font-size: 22px; }
    .sub-content-text { font-size: 14px; }

    /* 특장점 */
    .feature-section { padding: 60px 0; }
    .feature-row,
    .feature-row.reverse { flex-direction: column; text-align: center; gap: 30px; }
    .feature-img { flex: 0 0 auto; width: 280px; }
    .feature-text h4 { font-size: 24px; }
    .feature-text p { font-size: 16px; }
}

/* ============================================================
   서브 이미지 PC/모바일 개별 출력 - 강제 분기
   ============================================================ */
#sub-page-container .sub-img-wrap .sub-img-pc {
    display: block !important;
    width: 100%;
    height: auto;
}

#sub-page-container .sub-img-wrap .sub-img-mo {
    display: none !important;
    width: 100%;
    height: auto;
}

@media screen and (max-width: 768px) {
    #sub-page-container .sub-img-wrap .sub-img-pc {
        display: none !important;
    }

    #sub-page-container .sub-img-wrap .sub-img-mo {
        display: block !important;
    }
}

@media screen and (min-width: 769px) {
    #sub-page-container .sub-img-wrap .sub-img-pc {
        display: block !important;
    }

    #sub-page-container .sub-img-wrap .sub-img-mo {
        display: none !important;
    }
}

/* ============================================================
   현재 1차 메뉴의 2차 메뉴 자동 출력
   PC: 가로 탭 메뉴 / Mobile: 3열 그리드
   ============================================================ */
.sub-depth2-nav{width:100%!important;background:#fff!important;box-sizing:border-box!important;position:relative!important;z-index:5!important;}
.sub-depth2-list{margin:0!important;padding:0!important;list-style:none!important;box-sizing:border-box!important;}
.sub-depth2-item{margin:0!important;padding:0!important;box-sizing:border-box!important;}
.sub-depth2-item a{box-sizing:border-box!important;text-align:center!important;text-decoration:none!important;word-break:keep-all!important;transition:color .25s ease,background-color .25s ease!important;}

/* PC: 가로 한 줄 탭 메뉴 */
.sub-depth2-nav,.sub-depth2-nav.is-pc{border-top:0!important;border-bottom:1px solid #e5e5e5!important;overflow-x:auto!important;overflow-y:hidden!important;-webkit-overflow-scrolling:touch!important;}
.sub-depth2-nav::-webkit-scrollbar,.sub-depth2-nav.is-pc::-webkit-scrollbar{display:none!important;}
.sub-depth2-nav .sub-depth2-list,.sub-depth2-nav.is-pc .sub-depth2-list{display:flex!important;grid-template-columns:none!important;justify-content:center!important;align-items:center!important;width:auto!important;max-width:1200px!important;min-width:max-content!important;margin:0 auto!important;padding:0 20px!important;border:0!important;}
.sub-depth2-nav .sub-depth2-item,.sub-depth2-nav.is-pc .sub-depth2-item,.sub-depth2-nav .sub-depth2-item:nth-child(3n),.sub-depth2-nav.is-pc .sub-depth2-item:nth-child(3n),.sub-depth2-nav .sub-depth2-item:nth-last-child(-n+3),.sub-depth2-nav.is-pc .sub-depth2-item:nth-last-child(-n+3){display:block!important;flex:0 0 auto!important;width:auto!important;min-width:auto!important;border:0!important;}
.sub-depth2-nav .sub-depth2-item a,.sub-depth2-nav.is-pc .sub-depth2-item a{position:relative!important;display:block!important;width:auto!important;min-height:auto!important;padding:42px 32px 32px!important;font-size:20px!important;font-weight:700!important;line-height:1.4!important;letter-spacing:-0.05em!important;color:#888!important;background:transparent!important;white-space:nowrap!important;}
.sub-depth2-nav .sub-depth2-item.active a,.sub-depth2-nav .sub-depth2-item a:hover,.sub-depth2-nav.is-pc .sub-depth2-item.active a,.sub-depth2-nav.is-pc .sub-depth2-item a:hover{color:#074d82!important;background:transparent!important;}
.sub-depth2-nav .sub-depth2-item.active a::after,.sub-depth2-nav.is-pc .sub-depth2-item.active a::after{content:''!important;display:block!important;position:absolute!important;left:18px!important;right:18px!important;bottom:0!important;height:4px!important;background:#074d82!important;}

/* Mobile: 3칸씩 그리드 메뉴 */
.sub-depth2-nav.is-mobile{border-top:1px solid #aaa!important;border-bottom:1px solid #aaa!important;overflow:visible!important;}
.sub-depth2-nav.is-mobile .sub-depth2-list{display:grid!important;grid-template-columns:repeat(3,1fr)!important;width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;padding:0!important;justify-content:stretch!important;align-items:stretch!important;border:0!important;}
.sub-depth2-nav.is-mobile .sub-depth2-item,.sub-depth2-nav.is-mobile .sub-depth2-item:nth-child(3n),.sub-depth2-nav.is-mobile .sub-depth2-item:nth-last-child(-n+3){display:block!important;width:auto!important;min-width:0!important;flex:initial!important;border-right:1px solid #aaa!important;border-bottom:1px solid #aaa!important;}
.sub-depth2-nav.is-mobile .sub-depth2-item:nth-child(3n){border-right:0!important;}
.sub-depth2-nav.is-mobile .sub-depth2-item:nth-last-child(-n+3){border-bottom:0!important;}
.sub-depth2-nav.is-mobile .sub-depth2-item a{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;min-height:50px!important;padding:8px 6px!important;font-size:17px!important;font-weight:700!important;line-height:1.25!important;letter-spacing:-0.06em!important;color:#8a8a8a!important;background:#fff!important;white-space:normal!important;}
.sub-depth2-nav.is-mobile .sub-depth2-item.active a,.sub-depth2-nav.is-mobile .sub-depth2-item a:hover{background:#074d82!important;color:#fff!important;}
.sub-depth2-nav.is-mobile .sub-depth2-item a::after,.sub-depth2-nav.is-mobile .sub-depth2-item.active a::after{display:none!important;}
@media screen and (max-width:430px){.sub-depth2-nav.is-mobile .sub-depth2-item a{min-height:56px!important;padding:10px 6px!important;font-size:16px!important;}}

/* ============================================================
   페이지 하단 CTA 버튼 영역
   배경 이미지: PHP 파일 위치 기준 img/현재파일명_bottom_bg.jpg, 현재파일명_bottom_bg_mo.jpg
   ============================================================ */
.sub-bottom-cta {
    width: 100%;
    min-height: 480px;
    background-image: var(--bottom-cta-pc-bg);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    position: relative;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sub-bottom-cta-inner {
    width: 100%;
    max-width: 1200px;
    min-height: 480px;
    margin: 0 auto;
    position: relative;
    box-sizing: border-box;
}

.sub-bottom-cta-buttons {
    position: absolute;
    left: 50%;
    top: 66%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.sub-bottom-cta-btn {
    width: 200px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    text-decoration: none !important;
    box-sizing: border-box;
    transition: opacity .25s ease, transform .25s ease;
}

.sub-bottom-cta-btn:hover {
    opacity: .88;
    transform: translateY(-1px);
}

.sub-bottom-cta-btn-primary {
    background: #074d82;
    border: 1px solid #074d82;
    color: #fff !important;
}

.sub-bottom-cta-btn-outline {
    background: rgba(255,255,255,.16);
    border: 1px solid #074d82;
    color: #111 !important;
}

@media screen and (max-width: 768px) {
    .sub-bottom-cta {
        min-height: 100vw;
        background-image: var(--bottom-cta-mo-bg);
        background-position: center center;
        background-size: cover;
    }

    .sub-bottom-cta-inner {
        min-height: 100vw;
        max-width: none;
    }

    .sub-bottom-cta-buttons {
        top: 71%;
        gap: 16px;
        padding: 0 11%;
    }

    .sub-bottom-cta-btn {
        width: 100%;
        max-width: 224px;
        height: 78px;
        border-radius: 8px;
        font-size: 28px;
        flex: 1 1 0;
    }
}

@media screen and (max-width: 430px) {
    .sub-bottom-cta-buttons {
        top: 72%;
        gap: 10px;
        padding: 0 10%;
    }

    .sub-bottom-cta-btn {
        height: 56px;
        font-size: 18px;
        border-radius: 6px;
    }
}

