/* sub_common.css - TIME Clinic 서브페이지 공통 CSS */
/* head.php에 없는 Hive Design 클래스 및 서브 공통 스타일 */

/* 폰트 클래스 */
.mj22 {
    font-family: 'Gowun Batang', 'KoPub Batang', 'Nanum Myeongjo', serif;
    font-weight: 400;
    letter-spacing: -0.01em;
}
.eng_b2 {
    font-family: 'Cormorant SC', 'Sorts Mill Goudy', Georgia, serif;
    font-weight: 400;
    letter-spacing: 0.06em;
}
.pret { font-family: 'Pretendard', sans-serif; }

/* sub_wid - 서브페이지 기본 컨테이너 */
.sub_wid {
    width: 90%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 60px 0;
}
.sub_wid2 {
    width: 90%;
    max-width: 1300px;
    margin: 0 auto;
}
.index_wds {
    max-width: 1400px;
    margin: 0 auto;
    width: 90%;
}

/* 이미지 */
.img100 { width: 100%; display: block; }

/* 공통 간격 */
.h5 { height: 5px; }
.h10 { height: 10px; }
.h20 { height: 20px; }
.h30 { height: 30px; }
.h50 { height: 50px; }
.h80 { height: 80px; }
.h100 { height: 100px; }
.clear_fix { clear: both; }
.clear_fix::after { content: ''; display: table; clear: both; }

/* 라인 효과 */
.line_eff {
    display: block;
    width: 100%;
    height: 1px;
    background: currentColor;
    opacity: 0.15;
}
.line_eff.horizontal {
    width: 100%;
    height: 1px;
}

/* 서브 텍스트 색상 */
.sub_color { color: var(--main2); }
.c_w { color: #fff !important; }
.c_b { color: #333 !important; }

/* 서브 배경 */
.bg_no { background: none !important; }
.bard_p { padding: 20px; }

/* 태그 */
.tab { display: block; }
.tc_m { text-align: center; }

/* over_hd: 이미지 호버 확대 */
.over_hd { overflow: hidden; }
.over_hd img {
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.over_hd:hover img {
    transform: scale(1.06);
}

/* over_up: 카드 위로 살짝 이동 */
.over_up {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.over_up:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

/* over_line: 텍스트 밑줄 슬라이드 */
.over_line {
    position: relative;
    display: inline-block;
}
.over_line::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
.over_line:hover::after {
    transform: scaleX(1);
}

/* over_fill: 버튼 배경 채우기 */
.over_fill {
    position: relative;
    overflow: hidden;
    z-index: 0;
}
.over_fill::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--fill-color, currentColor);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1;
}
.over_fill:hover::before {
    transform: scaleX(1);
}
.over_fill:hover { color: #fff !important; }

/* 형태 변형 클래스 */
.of_rect  { padding: 13px 30px; border: 1.5px solid var(--fill-color); color: var(--fill-color); border-radius: 4px; }
.of_round { padding: 13px 30px; border: 1.5px solid var(--fill-color); color: var(--fill-color); border-radius: 100px; }
.of_sharp { padding: 14px 36px; border: 1px solid var(--fill-color); color: var(--fill-color); border-radius: 0; letter-spacing: 0.1em; }

/* over_btn: 버튼 기본 호버 */
.over_btn {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.over_btn:hover {
    transform: translateY(-2px);
    opacity: 0.88;
}
.over_btn:active {
    transform: translateY(0);
    transition-duration: 0.08s;
}

/* btn_sf: 슬라이드 플립 */
.btn_sf {
    --sf-color: var(--main, #2C5F8A);
    --sf-w: 180px;
    --sf-h: 50px;
    --sf-radius: 4px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--sf-w);
    height: var(--sf-h);
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    border-radius: var(--sf-radius);
    border: 1.5px solid var(--sf-color);
    flex-shrink: 0;
}
.btn_sf .sf_bg {
    position: absolute; inset: 0;
    background: var(--sf-color);
    border-radius: calc(var(--sf-radius) - 1px);
    transform: translateY(102%);
    transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 0;
}
.btn_sf .sf_front,
.btn_sf .sf_back {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center; gap: 7px;
    font-size: 14px; font-weight: 500; white-space: nowrap;
    transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}
.btn_sf .sf_front { color: var(--sf-color); transform: translateY(0); opacity: 1; }
.btn_sf .sf_back  { color: #fff; transform: translateY(102%); opacity: 0; }
.btn_sf:hover .sf_bg    { transform: translateY(0); }
.btn_sf:hover .sf_front { transform: translateY(-102%); opacity: 0; }
.btn_sf:hover .sf_back  { transform: translateY(0); opacity: 1; }

/* ar_link: 텍스트 링크 + 화살표 */
.ar_link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 4px 0;
    font-size: 14px;
    font-weight: 400;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
    transition: color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.ar_link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
.ar_link .al_ico {
    display: inline-flex;
    align-items: center;
    width: 0;
    overflow: hidden;
    opacity: 0;
    transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                margin 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ar_link:hover::after  { transform: scaleX(1); }
.ar_link:hover .al_ico { width: 18px; opacity: 1; margin-left: 6px; }

/* FAQ 아코디언 */
.faq_wrap {
    max-width: 1300px;
    width: 90%;
    margin: 0 auto;
}
.faq_item {
    border-bottom: 1px solid rgba(0,0,0,0.08);
}
.faq_q {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    cursor: pointer;
    user-select: none;
}
.faq_q span {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.5;
}
.faq_icon {
    width: 24px;
    height: 24px;
    position: relative;
    flex-shrink: 0;
    margin-left: 20px;
}
.faq_icon::before,
.faq_icon::after {
    content: '';
    position: absolute;
    background: currentColor;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.faq_icon::before {
    width: 16px; height: 1.5px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.faq_icon::after {
    width: 1.5px; height: 16px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.faq_item.active .faq_icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}
.faq_a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
}
.faq_item.active .faq_a {
    max-height: 500px;
    opacity: 1;
}
.faq_a_inner {
    padding: 0 0 24px 0;
    font-size: 16px;
    line-height: 1.7;
    color: #666;
}

/* 서브페이지 공통 섹션 스타일 */
.sub_section {
    padding: 80px 0;
}
.sub_section_inner {
    max-width: 1300px;
    width: 90%;
    margin: 0 auto;
}

/* 추천 대상 리스트 */
.recommend_list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.recommend_list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    line-height: 1.7;
}
.recommend_list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 11px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--main, #333);
}

/* 시술정보 그리드 */
.info_grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.info_card {
    flex: 1 1 200px;
    background: #fafafa;
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
}
.info_card_icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--main, #333);
    display: flex;
    align-items: center;
    justify-content: center;
}
.info_card_icon svg {
    width: 28px;
    height: 28px;
    color: #fff;
}

/* 주의사항 */
.notice_text {
    font-size: 14px;
    color: #999;
    line-height: 1.6;
    padding: 20px 0;
}

/* PC/모바일 전용 */
.pc { display: block; }
.mobile { display: none; }
@media (max-width: 900px) {
    .pc { display: none !important; }
    .mobile { display: block !important; }
    .h100 { height: 60px; }
    .h80 { height: 40px; }
    .h50 { height: 30px; }
    .sub_wid { padding: 40px 0; }
    .sub_section { padding: 50px 0; }
    .info_card { flex: 1 1 45%; }
    .faq_q span { font-size: 16px; }
}

/* ================================================
   서브페이지 공통 레이아웃 컴포넌트
   ================================================ */

/* 히어로 인트로 (2단 - 텍스트 + 이미지) */
.sub_hero {
    max-width: 1300px;
    width: 90%;
    margin: 0 auto;
    padding: 80px 0 40px;
    display: flex;
    align-items: center;
    gap: 60px;
}
.sub_hero_text { flex: 1; }
.sub_hero_img {
    flex: 0 0 38%;
    border-radius: 20px;
    overflow: hidden;
}
.sub_hero_img img { width: 100%; height: auto; display: block; }
.sub_hero_sub {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid var(--main2);
    border-radius: 100px;
    font-size: 13px;
    letter-spacing: 0.08em;
    color: var(--main2);
    margin-bottom: 20px;
}

/* 기술 상세 2단 (텍스트 + 이미지, reverse 가능) */
.sub_tech {
    max-width: 1300px;
    width: 90%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 60px;
}
.sub_tech_text { flex: 1; }
.sub_tech_img {
    flex: 0 0 42%;
    border-radius: 16px;
    overflow: hidden;
}
.sub_tech_img img { width: 100%; height: auto; display: block; }
.sub_tech.reverse { flex-direction: row-reverse; }

/* 추천대상 / 차별화 2단 레이아웃 */
.sub_two_col {
    display: flex;
    gap: 60px;
    max-width: 1300px;
    width: 90%;
    margin: 0 auto;
}
.sub_two_col > div { flex: 1; }

/* 포인트 그리드 (3열) */
.sub_card_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1300px;
    width: 90%;
    margin: 0 auto;
}
.sub_card {
    background: #fafafa;
    border-radius: 12px;
    padding: 36px 28px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.sub_card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}
.sub_card_num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--main2);
    border-radius: 50%;
    font-size: 14px;
    color: var(--main2);
    margin-bottom: 20px;
}

/* 시술 정보 4열 카드 */
.sub_info_grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 1300px;
    width: 90%;
    margin: 0 auto;
}
.sub_info_card {
    background: #fafafa;
    border-radius: 10px;
    padding: 30px 16px;
    text-align: center;
}
.sub_info_card div { color: #222 !important; }
.sub_info_icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--main);
    display: flex;
    align-items: center;
    justify-content: center;
}
.sub_info_icon img { width: 60%; display: block; }

/* 시술 과정 스텝 */
.sub_process {
    max-width: 1300px;
    width: 90%;
    margin: 0 auto;
    display: flex;
    gap: 16px;
    counter-reset: step;
}
.sub_step {
    flex: 1;
    background: #fafafa;
    border-radius: 12px;
    padding: 30px 24px;
    position: relative;
}
.sub_step::before {
    counter-increment: step;
    content: "STEP " counter(step);
    display: block;
    font-size: 12px;
    letter-spacing: 0.1em;
    color: var(--main);
    margin-bottom: 12px;
}

/* 전후 비교 갤러리 */
.sub_ba_wrap {
    max-width: 1300px;
    width: 90%;
    margin: 0 auto;
}
.sub_ba_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.sub_ba_card {
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f5;
}
.sub_ba_card img { width: 100%; height: auto; display: block; }
.sub_ba_label {
    padding: 16px;
    text-align: center;
}

/* 함께하면 좋은 시술 */
.sub_related {
    max-width: 1300px;
    width: 90%;
    margin: 0 auto;
}
.sub_related_item {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: 1px var(--main2);
    text-stroke: 1px var(--main2);
    line-height: 1.2;
    text-decoration: none;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.sub_related_item:hover { color: var(--main2); }

/* 기대 결과 2단 (다크 배경) */
.sub_result_wrap {
    max-width: 1300px;
    width: 90%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 60px;
}
.sub_result_wrap > div:first-child { flex: 1; }
.sub_result_img {
    flex: 0 0 35%;
    border-radius: 20px;
    overflow: hidden;
}
.sub_result_img img { width: 100%; height: auto; display: block; }

/* 모바일 반응형 */
@media (max-width: 900px) {
    .sub_hero {
        padding: 50px 0 20px;
        flex-direction: column;
        gap: 30px;
    }
    .sub_hero_img { flex: none; width: 100%; }
    .sub_tech {
        flex-direction: column !important;
        gap: 30px;
    }
    .sub_tech_img { flex: none; width: 100%; }
    .sub_two_col { flex-direction: column; gap: 30px; }
    .sub_card_grid { grid-template-columns: 1fr; gap: 12px; }
    .sub_info_grid { grid-template-columns: repeat(2, 1fr); }
    .sub_process { flex-direction: column; gap: 12px; }
    .sub_ba_grid { grid-template-columns: 1fr; gap: 16px; }
    .sub_result_wrap { flex-direction: column; gap: 30px; }
    .sub_result_img { flex: none; width: 100%; }
    .sub_related_item {
        font-size: clamp(30px, 8vw, 80px) !important;
        word-break: keep-all;
    }
}

/* 접근성 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
