/* =========================
   Responsive Overrides
   (기존 CSS 맨 아래에 추가)
========================= */

/* 공통: 모바일에서 컨테이너 폭/패딩 안정화 */
@media (max-width: 1280px) {
  :root {
    --x-padding: 30px;
    --y-padding: 80px;

    /* 폰트도 너무 크면 모바일에서 깨지니 살짝 축소 */
    --font-h1: 28px;
    --font-h2: 22px;
    --font-h3: 18px;
    --font-p: 15px;
  }

  .max-width,
  .container_sub,
  .main_wrap {
    width: 100%;
    max-width: 100%;
    padding-left: var(--x-padding);
    padding-right: var(--x-padding);
  }

  .main_wrap {
    padding: 90px 0;
  }

  /* 100vw 남발하면 가로 스크롤 생길 수 있어서 방지 */
  header,
  footer,
  #jennybunny,
  #category_portfolio,
  #about .service_about {
    width: 100%;
  }

  header nav {
    max-width: 100vw;
    padding: 0 30px;
  }

  #map_notice .main_wrap {
    padding: 50px 30px;
  }

  #map_notice .main_wrap .right_info {
    padding-left: 30px;
    margin-left: 30px;
    width: 60%;
  }

  #category_portfolio {
    padding: 100px 30px;
  }

  .featureItem p br {
    display: none;
  }

  .featureBar__grid {
    gap: 50px;
  }

  header .hambuger_view .hambuger_inner {
    width: 100%;
    padding: 0 30px;
  }

  header .hambuger_view .hambuger_inner .full_menu_box {
    padding: 0 18px;
  }

  .portfolio_cate,
  .gallery-list-category_euqi {
    font-size: 12px;
  }

  .list_desc_subject_euqi {
    font-size: 14px;
  }

  .gallery-list-title_euqi,
  #portfolioLatest .pic_lt > ul > li div.portfolio_subject_title {
    font-size: 18px;
  }
}

/* =========================
     Tablet ~ Mobile
  ========================= */
@media (max-width: 991px) {
  /* 헤더: 중앙 메뉴 숨기고 햄버거 중심 */

  .cautionList {
    width: 100%;
    padding: 0 30px;
  }

  header .hambuger_view .hambuger_inner,
  .under_sns_link {
    max-width: 100vw;
    padding: 0 30px;
  }

  .right_layout_sns,
  .sns_link {
    justify-content: space-between;
  }

  .under_sns_link {
    padding: 20px 16px 20px 40px;
  }

  header nav {
    padding: 0 16px;
  }

  header
    .hambuger_view
    .hambuger_inner
    .full_menu_box
    .category_title
    svg.feather {
    display: inline-block;
  }

  header nav .center_nav {
    display: none;
  }

  /* header nav .right_menu .icon_menu {
    display: none; 
  } */

  header nav .logo {
    height: 44px;
    background-size: contain;
  }

  /* 햄버거 전체 메뉴: 5열 -> 2열 */
  header .hambuger_view {
    padding: 110px 0 24px;
    overflow-y: auto;
  }

  header .hambuger_view .hambuger_inner {
    padding: 0 40px 0 40px;
  }

  header .hambuger_view .hambuger_inner .full_menu_box {
    width: 100%;
    height: auto;
    margin-bottom: 20px;
    border-right: none;
    padding: 0 0px;
  }

  header .hambuger_view .hambuger_inner .full_menu_box .category_title {
    display: flex;
    align-items: center;
    justify-content: left;
    gap: 5px;
    cursor: pointer;
  }

  header
    .hambuger_view
    .hambuger_inner
    .full_menu_box
    .category_title
    svg.feather {
    stroke: #e49dac;
    width: 18px;
    height: 18px;
  }

  header .hambuger_view .hambuger_inner .full_menu_box .category_title > h4 {
    font-size: 18px;
    margin-bottom: 0;
  }

  header .hambuger_view .hambuger_inner .full_menu_box ul {
    display: none;
  }

  header .hambuger_view .hambuger_inner .full_menu_box ul li a {
    font-size: 16px;
    margin: 10px 0;
  }

  .under_sns_link {
    padding: 20px 16px;
  }
  .sns_link {
    margin-left: 0;
    gap: 10px;
  }

  .sns_link > div {
    width: fit-content;
    height: fit-content;
    margin: 0 0;
    text-align: center;
    line-height: 50px;
  }
  /* .sns_link > div {
    width: 40px;
    height: 40px;
    line-height: 40px;
    margin: 0;
  } */

  /* 메인 서비스(1000px 고정 제거) */
  #main_service .block_menu {
    width: 100%;
    flex-direction: column;
    gap: 14px;
    padding: 0 16px;
  }

  #main_service .block_menu .menu_box {
    width: 100%;
    height: 220px;
    padding: 24px 18px;
  }

  #main_service .slide_menu {
    width: 100%;
    padding: 0 16px;
  }

  /* jenny swiper 높이 줄이기 */
  #jenny_view #swiper_img .jennySwiper {
    height: fit-content;
    min-height: 200px;
  }

  /* care: 좌우 50% -> 세로 */
  .care_flex .care_flex_wrap {
    flex-direction: column;
    height: auto;
    margin-bottom: 50px;
  }
  .care_flex .care_flex_wrap .care_img,
  .care_flex .care_flex_wrap .care_text {
    width: 55%;
    margin: 15px 0;
  }

  .care_flex_wrap .care_img {
    order: 2;
  }

  /* map notice: 좌우 -> 세로 + border 제거 */
  #map_notice .main_wrap {
    flex-direction: column;
    padding: 16px 16px 60px;
    gap: 22px;
  }

  #map_notice .main_wrap .map_img {
    width: 100%;
    height: fit-content;
    margin-right: 0;
  }

  #map_notice .main_wrap .right_info {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    width: 100%;
  }

  /* 서브페이지 헤더 높이 고정 줄이기 */
  .sub_page_header,
  .head_section_layout {
    height: 450px;
    background-size: cover;
    background-position: 68% center;
  }

  .sub_page_header h2 {
    font-size: 32px !important;
  }
  .sub_page_header p {
    font-size: 16px !important;
  }

  /* about 상단(800px/200px padding) 줄이기 */
  .about_top_layout {
    height: auto;
    padding: 120px 16px 80px;
  }
  .about_top_layout h2 {
    font-size: 34px;
  }
  .about_top_layout p {
    font-size: 16px;
  }

  /* 440px 카드 2개씩 -> 1개씩 */
  .service_box_layout {
    justify-content: center;
    gap: 12px;
  }
  .service_box_layout > .service_box_wrap {
    width: 100%;
    max-width: 420px;
    height: 200px;
  }

  /* service_flex(700px) -> 2열 */
  .service_flex {
    width: 100%;
    margin: 60px auto 0;
    padding: 0 16px;
  }
  .service_flex .service_box {
    width: 50%;
  }

  /* staff 영역: 이미지 absolute 때문에 깨지기 쉬움 -> 스택으로 */
  .staff_info .staff_list {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }

  .staff_img {
    position: static;
    width: 100%;
    height: auto;
    margin-bottom: 16px;
  }
  .staff_img img {
    width: 100%;
    height: auto;
  }

  .staff_info .staff_list .width_right {
    width: 100%;
  }

  .staff_info .staff_list .staff_name,
  .staff_info .staff_list .width_right > p,
  .staff_info .staff_list .staff_info_ul {
    padding-left: 0;
  }

  .staff_info .staff_list .staff_info_ul {
    flex-direction: column;
    gap: 12px;
  }
  .staff_info .staff_list .staff_info_ul ul:nth-child(2) {
    margin-left: 0;
  }

  #event_wrap_index {
    margin: 80px 0;
  }

  #event_wrap_index .flex_wrap {
    display: block;
  }

  #event_wrap_index .flex_wrap .left_title {
    margin-bottom: 30px;
  }

  .clinic_hour_layout:nth-child(2) {
    margin: 30px 0;
  }

  #map_notice .main_wrap .right_info .clinic_hour table tr td:nth-child(1),
  #map_notice .main_wrap .right_info .hour_title,
  #map_notice .main_wrap .right_info .clinic_hour {
    font-size: 16px;
  }

  .background_fixed_att {
    height: 80px;
  }

  .metrics,
  .recommend,
  .caution {
    padding: 80px 0;
  }

  .intro__featureBar {
    display: block;
    position: relative;
  }

  .featureBar__grid {
    display: block;
  }
  .featureNote {
    font-size: clamp(14px, 2.2vw, 18px);
  }

  .sub_row_thumb {
    width: auto;
    height: fit-content;
  }

  .thumbRow {
    margin-top: 35px;
  }

  .eyebrow,
  .intro_desc,
  .benefit_cap,
  .split_body {
    font-size: clamp(14px, 2.2vw, 16px);
  }

  .title,
  .intro_title,
  .split_title,
  .latest_title_wrap h2,
  .featureBar__heading {
    font-size: clamp(18px, 2.2vw, 21px);
  }

  .recommend__head {
    text-align: center;
  }

  #about .sub_page_contents {
    padding: 30px;
  }

  #about .sub_page_contents > .flex_wrap {
    flex-wrap: wrap;
  }

  #about .sub_page_contents .flex_wrap .img_area {
    width: 100%;
    margin: 30px 0;
    order: 1;
  }

  #about .total_solution {
    height: fit-content;
    padding: 80px 0;
  }

  .inner_900 {
    margin: 0 auto 50px;
    max-width: 100vw;
  }

  #about .sub_page_contents > div.inner_900:nth-child(1) {
    margin-top: 30px;
  }

  #about .sub_page_contents br {
    display: none;
  }

  .service_about > div > .text_area > p {
    margin: 0 auto;
    width: 80%;
  }

  .under_banner {
    height: 320px;
  }

  .under_banner .text_area {
    padding: 0 20px;
  }

  .under_banner .text_area > span {
    font-size: 10px;
  }

  .intro_visual {
    width: 100vw;
    max-width: 100%;
    padding: 0 20px;
    aspect-ratio: 0;
    background-color: #fff;
  }

  .intro_visual img {
    width: 100%;
  }

  .benefit {
    padding: 45px 0;
  }

  .benefit_grid {
    gap: 10px;
  }

  .split_media {
    height: 240px;
  }

  .split_media img {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }

  .split_body::before {
    margin: 20px 0 10px;
  }

  /* .split_reverse .split_inner {
    flex-direction: column;
  } */

  .split_inner {
    display: block;
  }

  .split_inner > .split_media {
    margin: 0 auto;
  }

  .split_text {
    margin: 30px auto;
  }

  #intro_wrap .flex_wrap {
    /* padding: 30px 0; */
    justify-content: center;
  }

  #intro_wrap .flex_wrap .left_img {
    width: 50%;
    margin-right: 0;
  }

  #intro_wrap .flex_wrap .right_contents {
    width: 45%;
    padding: 40px 20px;
  }

  .featureItem p br {
    display: block;
  }

  .metric__label {
    font-size: clamp(18px, 2.2vw, 21px);
    margin-top: 16px;
  }

  .intro__grid {
    padding: 0 30px;
  }

  .intro__left {
    padding-top: 50px;
  }

  .desc {
    font-size: clamp(12px, 2vw, 16px);
  }

  #portfolioLatest .pic_lt > ul {
    gap: 10px;
  }

  #portfolioLatest .pic_lt > ul > li {
    width: 45%;
  }

  #portfolioLatest .pic_lt > ul > li .lt_img {
    height: fit-content;
  }
}

/* =========================
     Mobile
  ========================= */
@media (max-width: 640px) {
  :root {
    --font-h1: 24px;
    --font-h2: 20px;
    --font-h3: 17px;
    --font-p: 14px;
  }

  .pc-block {
    display: none;
  }

  .mo-block {
    display: block;
  }

  .desc,
  .card__text {
    font-size: clamp(14px, 2vw, 18px);
  }

  #portfolioLatest .pic_lt > ul > li .lt_img {
    height: fit-content;
  }

  /* 배너 100vh는 모바일 주소창 때문에 덜컥거림 → 최소높이로 */

  /* intro 영역: 좌우 -> 세로 */
  #intro_wrap .flex_wrap {
    flex-direction: column;
    align-items: stretch;
    padding-top: 30px;
  }

  #intro_wrap .flex_wrap .left_img {
    width: 100%;
    margin-right: 0;
  }

  #intro_wrap .flex_wrap .right_contents {
    width: 100%;
    padding: 24px 16px;
  }

  /* metrics 4열 -> 2열 */
  .metrics__list {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .metric:not(:last-child)::after {
    display: none;
  }
  .metric__dot {
    width: 82px;
    height: 82px;
  }
  .metric__label {
    font-size: clamp(18px, 2.2vw, 21px);
    margin-top: 16px;
  }
  .metric__value {
    font-size: clamp(14px, 2vw, 18px);
  }

  /* intro (왼쪽/오른쪽) -> 세로 */
  .intro {
    height: auto;
  }
  .intro__grid {
    flex-direction: column;
  }
  .intro__left {
    padding: 60px 0 20px;
  }
  .intro__right {
    width: 100%;
    height: fit-content;
    min-height: 300px;
  }

  /* 하단 feature bar: 2열 -> 1열 */
  .featureBar__grid {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 0 16px;
  }
  .featureItem,
  .featureItem p {
    font-size: clamp(14px, 2vw, 18px);
  }

  .featureItem p br {
    display: none;
  }
  .badge {
    width: 24px;
    height: 24px;
    font-size: clamp(14px, 2vw, 18px);
  }

  /* recommend 3열 -> 1열 */
  .recommend__grid {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 0 30px;
  }
  .card__img {
    height: 180px;
  }

  /* caution 폭 800px 고정 제거 */
  .cautionList {
    width: 100%;
    padding: 0 30px;
  }
  .cautionBox {
    padding: 24px 0;
  }
  .cautionItem p {
    font-size: clamp(14px, 2vw, 18px);
  }

  /* split 교차 레이아웃 -> 세로 */
  .split_inner {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
  .split_media,
  .split_text {
    width: 100%;
  }

  /* 서비스 아이콘 4열 -> 2열 */
  .service_flex .service_box {
    width: 50%;
    margin-bottom: 28px;
  }

  /* 포트폴리오 3열 -> 1열 */
  #portfolioLatest .pic_lt > ul > li {
    width: 100%;
    margin-right: 0;
  }

  /* fixed background 모바일에서 끊김 방지 */
  .background_fixed_att {
    width: 100%;
    background-attachment: scroll;
    background-size: cover;
  }

  /* footer: 좌우 -> 세로 */
  footer > div.max-width {
    flex-direction: column;
    gap: 14px;
  }

  .right_layout_sns {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .sns_title {
    width: 100%;
  }

  .sns_link {
    width: auto;
    margin-top: 10px;
    justify-content: right;
    gap: 5px;
  }

  .sns_link > div > a {
    width: 40px;
    height: 40px;
    border-radius: 50px;
    display: grid;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    border: solid 1px #ccc;
  }

  .care_flex .care_flex_wrap:nth-child(2) {
    margin-top: 60px;
  }

  .service_flex .service_box {
    width: 25%;
  }

  .service_flex .service_box > div {
    width: 70px;
    height: 70px;
  }

  .sub_page_header .sub_border {
    font-size: clamp(12px, 2.2vw, 16px);
    padding: 7px 10px;
  }

  .sub_page_header p {
    margin-bottom: 10px;
  }

  .metrics,
  .recommend,
  .caution {
    padding: 50px 0;
  }

  .intro__featureBar {
    padding: 34px 30px;
  }

  #category_portfolio {
    padding: 50px 30px;
  }

  .intro__grid {
    padding: 0 0;
    max-height: 500px;
  }

  .intro__left {
    margin: 0 0 0 30px;
  }

  .care_flex .care_flex_wrap .care_img,
  .care_flex .care_flex_wrap .care_text {
    width: 100%;
    margin: 15px 0;
  }

  .hd_pops_con {
    width: 300px !important;
    height: 300px !important;
  }

  .hd_pops {
    left: 5vw !important;
  }

  footer {
    padding: 20px 0 30px;
  }
}
