/**
 * Custom CSS
 *
 * This file is for your custom styles.
 * You can add any CSS rules here to customize the Ghost theme.
 *
 * Note: Changes made directly to this file may be overwritten during theme updates.
 * It's recommended to use the Code Injection feature in Ghost for persistent customizations.
 */

/* ==================== BASE TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--color-contrast);
  font-weight: var(--font-weight-semibold);
  font-family: var(--font-family-headings);
}

/* ==================== UTILITY CLASSES ==================== */
.w-full { width: 100%; }
.h-full { height: 100%; }

/* Margin Utilities */
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mt-8 { margin-top: 32px; }
.mt-10 { margin-top: 40px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-10 { margin-bottom: 40px; }

/* Layout Utilities */
.flex { display: flex; }
.grid { display: grid; }
.items-start { align-items: start; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Divider */
.divider-vertical {
  background-color: #E6E6E6;
  height: 1px;
  width: 100%;
  margin: 32px 0;
}

/* List Reset */
ul.list-none {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ==================== NAVIGATION & SIDEBAR ==================== */
/* 모바일 navbar 스크롤 애니메이션 */
@media (max-width: 767px) {
  .navbar {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-sizing: border-box;
    height: var(--navbar--min-height, 58px);
    min-height: var(--navbar--min-height, 58px);
    max-height: var(--navbar--min-height, 58px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /*
   * 하단 구분선: inset/absolute ::after 는 backdrop-filter 합성에서
   * 사라짐. viewport 기준 fixed 1px + navbar-hidden 시 함께 숨김.
   */
  .navbar::after {
    background-color: #dddddd;
    content: "";
    display: block;
    height: 1px;
    left: 0;
    pointer-events: none;
    position: fixed;
    right: 0;
    top: calc(var(--navbar--min-height, 58px) - 1px);
    z-index: 1001;
  }

  .navbar.navbar-hidden::after {
    display: none;
  }
  
  .navbar.navbar-hidden {
    transform: translateY(-100%);
  }
  
  /* navbar 아래 컨텐츠 여백 — navbar--min-height 와 동일 */
  .main {
    padding-top: var(--navbar--min-height, 58px) !important;
  }
}

.mobile-tab-bar {
  display: none;
}

/* 포스트 상세에서만 모바일 탭바 숨김(Ghost page-template은 about 등 네비 필요) */
.post-template .mobile-tab-bar {
  display: none !important;
}

/* ==================== MOBILE STICKY TAG TABS ==================== */
@media (max-width: 767px) {
  /* 태그 탭 placeholder (fixed 시 공간 유지) */
  .tag-tabs-placeholder {
    display: none;
  }
  .tag-tabs-placeholder.is-active {
    display: block;
  }
  
  /* 태그 탭 fixed 스타일 (스크롤 방향 무관, 항상 고정) */
  .section-tag-filter .tag-tabs.is-fixed {
    position: fixed !important;
    top: var(--navbar--min-height, 58px);
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--color-background, #fff);
    padding: 12px 16px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: top 0.3s ease;
  }
}

:where([data-sidebar-collapsed=true]) :where(.navigation-sidebar) + .navigation-tags {
  display: none;
}

@media (max-width: 1199px) {
  .navigation.navigation-sidebar.navigation-tags {
    display: none;
  }
} 

/* ==================== MOBILE TAB BAR ==================== */
:root {
  --mobile-tab-bar-background: var(--color-background);
  --mobile-tab-bar-border-top-color: var(--color-border);
}

/* ==================== TAG BUTTON ==================== */

.tag-btn,
.tag-nav-link {
  padding: 6px 12px;
  border: none;
  background: #e6e6e6;
  color: #000;
  border-radius: 8px;
  cursor: pointer !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  transition: all 0.3s ease !important;
}

.tag-btn:hover,
.tag-nav-link:hover {
  background: #000 !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.tag-btn.active,
.tag-nav-link.current {
  background: #000 !important;
  color: #fff !important;
  font-weight: 700 !important;
}


/* 모바일 탭바 (767px 이하) */
@media (max-width: 767px) {
  /* main.main {
    overflow: hidden;
    padding-bottom: 92px !important;
  } */

  .mobile-tab-bar {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-background);
    border-top: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    height: 72px;
    z-index: 10000;
    justify-content: space-around;
    align-items: center;
    padding: 0 var(--spacing-4);
  }

  .tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-decoration: none;
    color: var(--color-secondary);
    transition: all 0.2s ease;
    padding: var(--spacing-3) var(--spacing-2);
    border-radius: var(--radius-2);
    min-height: 60px;
    position: relative;
  }

  .tab-item:hover,
  .tab-item.tab-active {
    color: var(--ghost-accent-color);
    background: rgba(255, 97, 0, 0.08);
    transform: translateY(-1px);
  }

  .tab-item.tab-active::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--ghost-accent-color);
    border-radius: 0 0 var(--radius-1) var(--radius-1);
  }

  .tab-icon {
    width: 24px;
    height: 24px;
    margin-bottom: var(--spacing-2);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .tab-label {
    font-size: var(--font-x-small);
    font-weight: var(--font-weight-medium);
    line-height: 1.2;
    text-align: center;
  }

  .layout-footer {
    margin-bottom: var(--spacing-8) !important;
  }

  .search-toggle {
    background-color: white;
  }
  .search-toggle>.icon-search {
    height: 1.25rem;
    width: 1.25rem;
  }

  button.toggle-popup {
		display: none !important;
	} 
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
  .mobile-tab-bar {
    background: var(--color-background);
    border-top-color: var(--color-border);
  }
}

/* 태블릿 이상 (768px 이상) */
@media (min-width: 768px) {
  .mobile-tab-bar {
    display: none !important;
  }
  
  .main {
    padding-bottom: 0 !important;
  }
  
  .layout-footer {
    margin-bottom: 0 !important;
  }
}

/* 탭바 스크롤 애니메이션 - 포스트에서만 적용 */
.post-template.tab-bar-hidden .mobile-tab-bar {
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.post-template.tab-bar-visible .mobile-tab-bar {
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* 포스트 외 페이지에서 탭바 항상 고정 */
body:not(.post-template):not(.page-template) .mobile-tab-bar {
  transform: translateY(0) !important;
}


/* ==================== BADGES & CONTENT LAYOUT ==================== */
.v-badge.v-badge--verified {
  color:#000;
  font-size: 14px;
  line-height: 18px; 
  display: inline-flex;
  align-items: center;

  svg {
    margin-left: 4px;
  }
}

div.card-post-meta {
  color:#555;
}

:where(.card-post-classic).card-has-author .card-post-content {
  padding: 0;
  gap: 6px;
}

:where(.card-post-classic) .card-post-title {
  margin-bottom: 0;
}

.content,
.content.content {
  max-width: 1280px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding-left: 16px;
  padding-right: 16px;
  gap: 20px;
}

/*
 * hospital-list URL (언어 접두 포함): 모바일 #content 패딩 제거
 * - Ghost body의 post-template-* 클래스가 기대와 다를 수 있어 default.hbs에서 html.hi-path-hospital-list 부여
 * - #content + longhand: built/index.css 의 .post-template-default .content { padding-top: … } 등보다 우선
 */
@media (max-width: 767px) {
  html.hi-path-hospital-list #content.content,
  html.hi-path-hospital-list #content.content.post,
  html.hi-path-hospital-list article#content.content {
    padding: 0 !important;
    padding-top: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
  }
}

.posts-container {
  width: 100%;
}

/* ==================== POST SIDEBAR ==================== */

.post-has-sidebar .post-content-grid .post-sidebar .post-card-author,
form.form-subscribe {
  display: none !important;
}

.post-has-sidebar .post-content-grid aside.sidebar {
  display: none !important;
}


.post-has-sidebar section.section-subscription {
  display: none;
}

.post-content-grid {
  position: relative;
}

@media (min-width: 1900px) {
  .section-posts-grid {
    --grid--columns: 4 !important;
  }
}

/* ==================== UNIFIED BANNER STYLES ==================== */
.unified-banner {
  display: block;
  position: relative;
  border-radius: 16px;
  padding: 0 32px;
  color: #000;
  text-decoration: none;
  overflow: hidden;
  background-size: contain;
  background-position: right center;
  background-repeat: no-repeat;
  background-color: #F1F1F1;
}

.unified-banner.about-banner {
  padding: 24px 80px;
  height: 360px;
  background-size: cover;
  background-position: center;
  background-color: transparent;
}

.unified-banner.about-banner .banner-button {
  color: black;
}

.unified-banner.about-banner h3,
.unified-banner.about-banner p {
  color: white;
}

.slide-banner .unified-banner-content {
  gap: 8px;
}

.unified-banner-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 0;
}

.unified-banner h3 {
  color: #361607;
  font-size: 24px;
  font-weight: 700;
  line-height: 28px;
  margin-bottom: 14px;
}

.unified-banner p {
  color: #361607;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  margin-bottom: 14px;
}


.slide-banner .banner-button ,
.unified-banner .banner-button {
  background: #FF6100;
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  gap: 8px;
  width: fit-content;
  line-height: 22px;
  border: none;
  cursor: pointer;
}

/* Banner 반응형 */
@media (min-width: 508px) and (max-width: 735px) {
  .unified-banner {
    background-size: 200px;
    background-position: right bottom;
  }

  .unified-banner h3 {
    font-size: 20px;
    line-height: 24px;
  }

  .unified-banner p {
    font-size: 14px;
    line-height: 20px;
  }
}

@media (max-width: 507px) {
  .unified-banner {
    background-size: 124px;
    background-position: right bottom;
  }

  .unified-banner h3 {
    font-size: 20px;
    line-height: 24px;
  }

  .unified-banner p {
    font-size: 14px;
    line-height: 20px;
  }
}

@media (max-width: 735px) {
  .unified-banner.about-banner {
    background-size: cover;
    padding: 0 24px;
    height: 240px;
  }
}


.slide-banner h3 {
  color: #000;
  font-size: 34px;
  font-weight: 700;
  line-height: 42px;
  margin-bottom: 0;
}

.slide-banner p {
  color: #555;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px; 
  margin-bottom: 12px;
}

/* slide-banner 배경 이미지 반응형 */
@media (max-width: 1079px) {
  .slide-banner {
    padding: 0 20px;
    background-size: 332px 180px;
    background-position: right bottom;

    .home-hero-lang {
      margin: 0;
    }

    .unified-banner-content {
      padding: 20px 0;
      justify-content: flex-start;
      gap: 6px;
    }

    h3 { 
      font-size: 24px;
      font-weight: 600;
      line-height: 120%;
    }

    p {
      font-size: 14px;
      line-height: 18px;
      margin-bottom: 6px;
    }


  }
}

@media (max-width: 751px) {
  .slide-banner {
    background-size: 240px 130px;
  }
}


/* ==================== PROFILE INFO STYLES ==================== */
.profile-info {
  position: relative;
  max-width: 700px;
  padding: 20px;
  margin: 16px auto 0;
  border-radius: 10px;
}

.profile-info:after {
  position: absolute;
  top: 0;
  left: 56px;
  color: #FFF;
  font-size: 15px;
  font-weight: 400;
  padding: 4px 8px;
  justify-content: center;
  align-items: center;
  border-radius: 0 0 4px 4px;
}

.profile-info-card {
  display: flex;
  align-items: center;
  padding: 20px 0;
}

.profile-info-details {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.mobile-medical-review {
    margin: 16px auto;
}

.profile-info.member-info {
  margin-bottom: 24px;
}


/* Profile 반응형 */
@media (max-width: 539px) {

  .profile-info:after {
    left: 12px;
  }

  .profile-info.reviewer-info {
    padding: 20px 12px 0;
  }

  .profile-info.reviewer-info .reviewer-info-badge {
    margin-bottom: 12px;
  }

  .profile-info.reviewer-info .reviewer-info-description {
    padding-bottom: 20px;
  }

  .profile-info.member-info {
    max-width: 100%;
  }

  .profile-info.member-info:after {
    left: 12px;
  }

  .profile-info-details h3 {
    font-size: 22px;
  }

  .member-info-card {
    padding: 20px 0;
  }

  .member-info-description p {
    font-size: 16px;
  }

  /* 의료진 이미지 반응형 */
  .reviewer-img {
      width: 100px;
      height: 132px;
      margin-right: 12px;
      background-size: 400px 132px;
  }

  .profile-info-details span {
    font-size: 12px;
  }

  .medical-kimdohoon .reviewer-img {
    background-position: -100px 0;
  }

  .medical-imjongwoo .reviewer-img {
    background-position: -200px 0;
  }

  .medical-hongjungi .reviewer-img {
    background-position: -300px 0;
  } 

  .reviewer-info-description ul {
    gap: 6px;
  }
}

/* ==================== POST CTA & MISC ==================== */
section.mh-cta {
  margin: 32px auto;
}

.section.section-read-next {
  z-index: 4;
}

.post-content div.kg-toggle-card h4.kg-toggle-heading-text {
  font-size: 18px;
}

div.post-content-grid:first-child {
  padding-top: 0;
}

/* ==================== CTA 버튼 공통 스타일 ==================== */
.post-cta-button {
  display: none;
}

/* 건강정보 병원찾기 CTA: 모바일·웹 모두 노출 */
.post-hospital-find-cta.post-cta-button {
  display: block;
}

.post-hospital-find-cta.post-cta-button ~ .post-hospital-find-cta.post-cta-button {
  display: none !important;
}

.post-hospital-find-cta.post-cta-button a {
  display: block;
  width: 100%;
  text-align: center;
  background: #ff6100;
  color: #fff;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 18px;
  font-weight: 700;
  line-height: 28px;
  text-decoration: none;
  box-sizing: border-box;
}

.post-hospital-find-cta.post-cta-button .cta-button-wrapper-div {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

/* 웹(992px+): 하단 fixed, .post-content-wrapper 너비에 맞춤(JS로 left/width 동기화) */
@media (min-width: 992px) {
  .post-hospital-find-cta.post-cta-button {
    position: fixed;
    bottom: 0;
    left: var(--hf-cta-left, 0);
    width: var(--hf-cta-width, 100%);
    right: auto;
    margin: 0;
    padding: 6px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid var(--color-border);
    z-index: 999;
    box-sizing: border-box;
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
  }

  body.post-template:has(#post-hospital-find-cta) main.main {
    padding-bottom: 92px !important;
  }
}

/* 모바일/태블릿 (991px 이하) - 하단 고정 */
@media (max-width: 991px) {
  .post-hospital-find-cta.post-cta-button {
    left: 0 !important;
    width: 100% !important;
    right: 0 !important;
  }

  .post-cta-button {
    /* display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, 1fr); */
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    padding: 6px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
    background: white;
    border-top: 1px solid var(--color-border);
    z-index: 999;
    width: 100%;
    transition: bottom 0.3s cubic-bezier(0.4, 0.0, 0.2, 1), 
                opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1), 
                transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
  }

  .post-cta-button a {
    display: block;
    width: 100%;
    text-align: center;
    background: #FF6100;
    color: #FFFFFF;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 18px;
    font-weight: 700;
    line-height: 28px;
    text-decoration: none;
  }

  .custom-button.toc-button-contact {
    display: none;
  }

  .post-template .footer {
    display: none;
  }
  
  main.main {
    overflow: hidden;
    padding-bottom: 92px !important;
  }

  .post-content-wrapper > section.hi-nearby-section {
    max-width: 700px;
    margin: 0 auto;
  }

}

/* 모바일 (767px 이하) - 탭바 위 */
@media (max-width: 767px) {
  .post-cta-button {
    padding-bottom: 6px;
  }
  
  /* 탭바 숨김 시 CTA 버튼 하단으로 이동 */
  .tab-bar-hidden .post-cta-button {
    bottom: 0;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .post-content-wrapper > section.hi-nearby-section {
    max-width: 100vw;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 0 8px;
  }
}

/* ==================== CUSTOM BUTTONS ==================== */
.custom-button {
  align-items: center;
  background-color: var(--button--background-color);
  border: 0;
  border-radius: var(--button--border-radius);
  color: var(--button--color);
  cursor: pointer;
  display: flex;
  font-family: var(--font-family-button);
  font-size: var(--button--font-size);
  font-weight: var(--button--font-weight);
  justify-content: center;
  line-height: var(--button--line-height);
  min-height: var(--button--min-height);
  outline-offset: 2px;
  padding: var(--button--padding-v) var(--button--padding-h);
  position: relative;
  text-align: center;
  text-decoration: none;
}

.toc-button.hidden {
  display: none;
  flex: 0 0 auto;
}

/* 진료 문의하기 버튼 - 데스크톱 */
.custom-button.toc-button-contact {
  display: block;
  border-radius: 8px;
  padding: 12px;
  font-size: 18px;
  font-weight: 600;
  line-height: 28px;
  width: 100%;
}

.custom-button.toc-button-contact:hover {
  background: #FF6100;
  color: #FFF;
}

/* ==================== HOSPITAL INFO TAGS ==================== */
.hospital-info-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 24px;
}

.hospital-info-tags .hospital-tag {
  border-radius: 4px;
  background: #ECF9F5;
  padding: 4px 8px;
  font-size: 14px;
  color: #004D3C;
}

/* ==================== LANGUAGE SELECTOR ==================== */
.language-selector-text {
  display: none;
}
.language-selector-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.language-selector-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 7px 14px;
  border-radius: 10px;
  border: 1px solid #DDD;
  background-color: #fff;
  color: #000;
  font-size: 12px;
  cursor: pointer;
}

.language-selector-button[aria-expanded="true"] .language-selector-arrow {
  transform: rotate(180deg);
}

.language-selector-arrow {
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
  color: var(--color-secondary);
}

/* 드롭다운 메뉴 */
.language-selector-dropdown {
  position: absolute;
  width: 140px;
  top: calc(100% + 8px);
  right: 0;
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
  overflow: hidden;
}

.language-selector-wrapper.active .language-selector-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-option {
  width: 100%;
  padding: 14px;
  border: none;
  background: transparent;
  color: var(--color-contrast);
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
}

.language-option.active {
  background-color: rgba(255, 97, 0, 0.08);
  color: var(--ghost-accent-color);
}

.language-flag {
  font-size: 16px;
  line-height: 1;
}

.language-selector-icon {
  font-size: 16px;
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
  .language-selector-dropdown {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
}

/* 상세 페이지에서 언어 선택기 숨기기 (포스트, 페이지 상세, 설문 결과) */
/* K-Medical 페이지에서 언어 선택기 숨김 */
.k-medical-template .language-selector-wrapper,
.post-template .language-selector-wrapper,
.page-template .language-selector-wrapper,
.survey-result-page .language-selector-wrapper {
  display: none;
}

/* 전역: 다국어 선택박스 미노출 정책 */
.language-selector-wrapper {
  display: none !important;
}

/* ==================== MOBILE DETAIL HEADER ==================== */
/* 기본: 숨김 */
.mobile-detail-header {
  display: none;
}

/* 모바일에서 상세 페이지일 때만 표시 */
@media (max-width: 767px) {
  /* 상세 페이지(post, page, custom template)에서 기존 navbar 숨김 */
  .post-template .navbar {
    display: none !important;
  }

  /* 모바일 상세 헤더 표시 */
  .post-template .mobile-detail-header,
  .page-template .mobile-detail-header {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar--min-height, 58px);
    background: var(--color-background, #fff);
    border-bottom: 1px solid var(--color-border, #e6e6e6);
    align-items: center;
    padding: 0 12px;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* 스크롤 시 숨김 */
  .post-template .mobile-detail-header.header-hidden,
  .page-template .mobile-detail-header.header-hidden {
    transform: translateY(-100%);
  }

  .mobile-back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--color-contrast, #000);
    border-radius: 8px;
    flex-shrink: 0;
    cursor: pointer;
    padding: 5px;
  }

  .mobile-detail-title {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-contrast, #000);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 8px;
  }

  .navbar>div {
      margin-left: 0 !important;
  }

  /* 상세 페이지 컨텐츠 상단 여백 */
  /* .post-template .content,
  .page-template .content {
    padding-top: 56px !important;
  } */
}

/* ==================== LANGUAGE-SPECIFIC MENU VISIBILITY ==================== */
/* K-Medical: ko에서만 숨김 (en·ja에서 표시) */
html[lang="ko"] .nav-item:has(.nav-link-k-medical),
html[lang="ko"] .nav-link-k-medical,
html[lang="ko"] .tab-k-medical {
  display: none !important;
}

/* program·care-start: Ghost Admin 네비에서 제거 권장 (모바일 탭은 default.hbs에서 삭제됨) */
html[lang="ko"] .navigation li.nav-item:has(.nav-link-program),
html[lang="ko"] .navigation li.nav-item:has(.nav-link-care-start),
html[lang="en"] .navigation li.nav-item:has(.nav-link-program),
html[lang="en"] .navigation li.nav-item:has(.nav-link-care-start),
html[lang="ja"] .navigation li.nav-item:has(.nav-link-program),
html[lang="ja"] .navigation li.nav-item:has(.nav-link-care-start),
html[data-locale="ko_KR"] .navigation li.nav-item:has(.nav-link-program),
html[data-locale="ko_KR"] .navigation li.nav-item:has(.nav-link-care-start),
html[data-locale="en_US"] .navigation li.nav-item:has(.nav-link-program),
html[data-locale="en_US"] .navigation li.nav-item:has(.nav-link-care-start),
html[data-locale="ja_JP"] .navigation li.nav-item:has(.nav-link-program),
html[data-locale="ja_JP"] .navigation li.nav-item:has(.nav-link-care-start),
html[lang="ko"] .navigation-sidebar li.nav-item:has(.nav-link-program),
html[lang="ko"] .navigation-sidebar li.nav-item:has(.nav-link-care-start),
html[lang="en"] .navigation-sidebar li.nav-item:has(.nav-link-program),
html[lang="en"] .navigation-sidebar li.nav-item:has(.nav-link-care-start),
html[lang="ja"] .navigation-sidebar li.nav-item:has(.nav-link-program),
html[lang="ja"] .navigation-sidebar li.nav-item:has(.nav-link-care-start) {
  display: none !important;
}

/*
  메디하이 소개: ko 네비에만 표시.
  Admin 메뉴 slug가 about이 아닐 수 있어 nav-link-about 대신 URL에 /about/ 포함 여부로 판별.
  html lang + data-locale(헤더 초기화 스크립트) 병행 — 언어 전환 직후에도 동작하도록.
*/
html[lang="en"] .navigation li.nav-item:has(a.nav-link[href*="/about/"]),
html[lang="ja"] .navigation li.nav-item:has(a.nav-link[href*="/about/"]),
html[data-locale="en_US"] .navigation li.nav-item:has(a.nav-link[href*="/about/"]),
html[data-locale="ja_JP"] .navigation li.nav-item:has(a.nav-link[href*="/about/"]) {
  display: none !important;
}

.mh-hospital-find-ko-only {
  display: none !important;
}

html[lang="ko"] ul.mh-hospital-find-ko-only,
html[data-locale="ko_KR"] ul.mh-hospital-find-ko-only {
  display: flex !important;
  flex-direction: column;
}

html[lang="ko"] nav.mh-hospital-find-ko-only,
html[data-locale="ko_KR"] nav.mh-hospital-find-ko-only {
  display: block !important;
}

/* 병원 찾기는 Ghost Admin Primary Navigation만 사용한다. */
.navigation .hf-sidebar-hospital-find.mh-hospital-find-ko-only,
html[lang="ko"] .hf-sidebar-hospital-find.mh-hospital-find-ko-only,
html[data-locale="ko_KR"] .hf-sidebar-hospital-find.mh-hospital-find-ko-only {
  display: none !important;
}

/* Ghost Admin Primary 네비에 병원 찾기 링크가 있을 때: en/ja 에서만 숨김 */
html[lang="en"] .navigation li.nav-item:has(a.nav-link[href*="/hospital-list"]),
html[lang="ja"] .navigation li.nav-item:has(a.nav-link[href*="/hospital-list"]),
html[data-locale="en_US"] .navigation li.nav-item:has(a.nav-link[href*="/hospital-list"]),
html[data-locale="ja_JP"] .navigation li.nav-item:has(a.nav-link[href*="/hospital-list"]) {
  display: none !important;
}

/* 서비스 이용약관: ko 에서만 표시 */
html[lang="en"] .navigation li.nav-item:has(a.nav-link[href*="/terms/"]),
html[lang="ja"] .navigation li.nav-item:has(a.nav-link[href*="/terms/"]),
html[data-locale="en_US"] .navigation li.nav-item:has(a.nav-link[href*="/terms/"]),
html[data-locale="ja_JP"] .navigation li.nav-item:has(a.nav-link[href*="/terms/"]) {
  display: none !important;
}

/* Footer partner/contact links: ko 에서만 표시 */
html[lang="en"] .navigation-secondary li.nav-item:has(.nav-link-muryo-pateuneo-sinceong),
html[lang="en"] .navigation-secondary li.nav-item:has(.nav-link-jehyu-hyeobryeog-munyi),
html[lang="ja"] .navigation-secondary li.nav-item:has(.nav-link-muryo-pateuneo-sinceong),
html[lang="ja"] .navigation-secondary li.nav-item:has(.nav-link-jehyu-hyeobryeog-munyi),
html[data-locale="en_US"] .navigation-secondary li.nav-item:has(.nav-link-muryo-pateuneo-sinceong),
html[data-locale="en_US"] .navigation-secondary li.nav-item:has(.nav-link-jehyu-hyeobryeog-munyi),
html[data-locale="ja_JP"] .navigation-secondary li.nav-item:has(.nav-link-muryo-pateuneo-sinceong),
html[data-locale="ja_JP"] .navigation-secondary li.nav-item:has(.nav-link-jehyu-hyeobryeog-munyi),
html[lang="en"] .ko-renewal-footer-links li.nav-item:has(.nav-link-muryo-pateuneo-sinceong),
html[lang="en"] .ko-renewal-footer-links li.nav-item:has(.nav-link-jehyu-hyeobryeog-munyi),
html[lang="ja"] .ko-renewal-footer-links li.nav-item:has(.nav-link-muryo-pateuneo-sinceong),
html[lang="ja"] .ko-renewal-footer-links li.nav-item:has(.nav-link-jehyu-hyeobryeog-munyi),
html[data-locale="en_US"] .ko-renewal-footer-links li.nav-item:has(.nav-link-muryo-pateuneo-sinceong),
html[data-locale="en_US"] .ko-renewal-footer-links li.nav-item:has(.nav-link-jehyu-hyeobryeog-munyi),
html[data-locale="ja_JP"] .ko-renewal-footer-links li.nav-item:has(.nav-link-muryo-pateuneo-sinceong),
html[data-locale="ja_JP"] .ko-renewal-footer-links li.nav-item:has(.nav-link-jehyu-hyeobryeog-munyi) {
  display: none !important;
}

/* ==================== MOBILE TAB BAR ==================== */
.mobile-tab-bar {
  display: none;
}

@media (max-width: 767px) {
  html[lang="en"] .mobile-tab-bar li.nav-item:has(a[href*="/hospital-list"]),
  html[lang="en"] .mobile-tab-bar li.nav-item:has(a[href*="/about/"]),
  html[lang="ja"] .mobile-tab-bar li.nav-item:has(a[href*="/hospital-list"]),
  html[lang="ja"] .mobile-tab-bar li.nav-item:has(a[href*="/about/"]),
  html[data-locale="en_US"] .mobile-tab-bar li.nav-item:has(a[href*="/hospital-list"]),
  html[data-locale="en_US"] .mobile-tab-bar li.nav-item:has(a[href*="/about/"]),
  html[data-locale="ja_JP"] .mobile-tab-bar li.nav-item:has(a[href*="/hospital-list"]),
  html[data-locale="ja_JP"] .mobile-tab-bar li.nav-item:has(a[href*="/about/"]) {
    display: none !important;
  }

  .mobile-tab-bar {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-background);
    border-top: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    height: 72px;
    z-index: 10000;
    justify-content: space-around;
    align-items: center;
    padding: 0 var(--spacing-4);
  }

  .tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-decoration: none;
    color: var(--color-secondary);
    transition: all 0.2s ease;
    padding: var(--spacing-3) var(--spacing-2);
    border-radius: var(--radius-2);
    min-height: 60px;
    position: relative;
  }

  .tab-item:hover {
    color: var(--ghost-accent-color);
    transform: translateY(-1px);
  }

  .tab-item.tab-active {
    color: var(--ghost-accent-color) !important;
    background: transparent !important;
  }

  .tab-item.tab-active .tab-icon svg {
    stroke: var(--ghost-accent-color) !important;
  }

  .tab-item.tab-active .tab-label {
    color: var(--ghost-accent-color) !important;
  }

  .tab-item.tab-active::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--ghost-accent-color);
    border-radius: 0 0 var(--radius-1) var(--radius-1);
  }

  .tab-icon {
    width: 24px;
    height: 24px;
    margin-bottom: var(--spacing-2);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .tab-label {
    font-size: var(--font-x-small);
    font-weight: var(--font-weight-medium);
    line-height: 1.2;
    text-align: center;
  }

  .mobile-tab-list {
    display: flex;
    align-items: center;
    justify-content: space-around;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .mobile-tab-list .nav-item {
    flex: 1;
    height: 100%;
  }

  .mobile-tab-list .tab-item {
    height: 100%;
  }

  .main {
    padding-bottom: 92px !important;
  }

  .layout-footer {
    margin-bottom: var(--spacing-8) !important;
  }
}

@media (min-width: 768px) {
  .mobile-tab-bar {
    display: none !important;
  }

  .main {
    padding-bottom: 0 !important;
  }

  .layout-footer {
    margin-bottom: 0 !important;
  }
}

.tab-bar-hidden .mobile-tab-bar {
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.tab-bar-visible .mobile-tab-bar {
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* ==================== CUSTOM SEARCH MODAL ==================== */
.custom-search-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
}

.custom-search-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.custom-search-container {
  position: relative;
  max-width: 95vw;
  width: 100%;
  margin: 8rem auto 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  .custom-search-container {
    max-width: 600px;
  }
}

.custom-search-header {
  display: flex;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #e5e5e5;
  gap: 12px;
}

.custom-search-icon-wrapper {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.custom-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 18px;
  padding: 8px 0;
  background: transparent;
}

.custom-search-input::placeholder {
  color: #999;
}

.custom-search-clear {
  position: absolute;
  top: 0;
  left: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-search-clear:hover {
  color: #666;
}

.custom-search-results {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.custom-search-empty,
.custom-search-loading {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.custom-search-loading {
  color: #666;
}

.custom-search-item {
  display: block;
  padding: 16px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}

.custom-search-item:hover,
.custom-search-item.selected {
  background: #f5f5f5;
}

.custom-search-item-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.custom-search-item-excerpt {
  font-size: 14px;
  color: #666;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.custom-search-no-results {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

/* --- page-home (home.hbs) --- */
.page-home .section-home-hero {
  background-color: white !important;
  padding: 0 !important;
}

.page-home .section-tag-filter .tag-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0;
}

html[lang="ko"] .info-tag-filter .tag-tabs,
html[data-locale="ko_KR"] .info-tag-filter .tag-tabs {
  align-items: center;
  gap: 8px !important;
}

html[lang="ko"] .info-tag-filter .tag-btn,
html[data-locale="ko_KR"] .info-tag-filter .tag-btn {
  background: #ffffff !important;
  border: 1px solid #e6e6e6 !important;
  border-radius: 8px;
  color: #111111 !important;
  flex: 0 0 auto;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "system-ui", "Segoe UI", sans-serif;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 18px;
  padding: 8px 12px;
  transform: none !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
}

html[lang="ko"] .info-tag-filter .tag-btn:hover,
html[data-locale="ko_KR"] .info-tag-filter .tag-btn:hover {
  background: #ffffff !important;
  border-color: #e6e6e6 !important;
  color: #111111 !important;
  transform: none !important;
}

html[lang="ko"] .info-tag-filter .tag-btn.active,
html[lang="ko"] .info-tag-filter .tag-btn.active:hover,
html[data-locale="ko_KR"] .info-tag-filter .tag-btn.active,
html[data-locale="ko_KR"] .info-tag-filter .tag-btn.active:hover {
  background: #111111 !important;
  border-color: #111111 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

@media (max-width: 767px) {
  html[lang="ko"] .info-tag-filter .tag-tabs,
  html[data-locale="ko_KR"] .info-tag-filter .tag-tabs {
    box-sizing: border-box;
    flex-wrap: nowrap !important;
    max-width: calc(100vw - 32px);
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px !important;
    scrollbar-width: none;
    width: calc(100vw - 32px) !important;
    -webkit-overflow-scrolling: touch;
  }

  html[lang="ko"] .info-tag-filter .tag-tabs::after,
  html[data-locale="ko_KR"] .info-tag-filter .tag-tabs::after {
    content: "";
    flex: 0 0 16px;
  }

  html[lang="ko"] .info-tag-filter .tag-tabs::-webkit-scrollbar,
  html[data-locale="ko_KR"] .info-tag-filter .tag-tabs::-webkit-scrollbar {
    display: none;
  }

  html[lang="ko"] .info-tag-filter .tag-tabs.is-fixed,
  html[data-locale="ko_KR"] .info-tag-filter .tag-tabs.is-fixed {
    max-width: 100vw;
    padding-bottom: 12px !important;
    width: 100vw !important;
  }
}

.home-svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.home-info-posts-more-wrap {
  text-align: center;
  margin-top: 24px;
}

.home-hero-container {
  position: relative;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
}

.home-hero-inner {
  width: 100%;
  height: 300px;
  min-height: 300px;
}

.home-hero-lang {
  margin: auto 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.badge-text {
  color: #0064ff;
  font-size: 16px;
  font-weight: 700;
  margin-left: 4px;
}

.home-banner,
.slide-content {
  width: 100%;
  height: 100%;
}

.section-home-hero a.banner-button {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
}

.slide-image {
  flex: 0 0 auto;
  max-width: 500px;
}

.slide-image img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.banner-cta-button {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  background: #ff6b35;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
}

.banner-cta-button:hover {
  background: #ff5722;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.section-popular-latest {
  margin: 28px 0;
}

.section-popular-latest > .grid-cols-2 {
  gap: 32px;
}

.loading {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 16px;
}

.home-info-posts-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
  width: 100%;
  height: 56px;
  padding: 12px 16px;
  color: #333;
  font-size: 18px;
  font-weight: 700;
  line-height: 28px;
  cursor: pointer;
  margin-bottom: 28px;
}

.home-info-posts-more-icon {
  flex-shrink: 0;
  display: block;
}

@media (max-width: 539px) {
  .section-popular-latest .grid-cols-2 {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 991px) {
  .section-popular-latest > .grid-cols-2 {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* 포스트: 근처 병원 카드(SSR)가 있을 때 main 하단 패딩 제거(모바일 탭바용 92px 등) */
body.post-template main.main:has(.hi-nearby-section .phl-posts-list li),
.content.content:has(.hi-nearby-section .phl-posts-list li) {
  padding-bottom: 0 !important;
}

/* 건강정보 본문: 근처 병원 — .post-content-wrapper 너비에 맞춤(항상 100%) */
.post-content-wrapper > .hi-nearby-section {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  background-color: #f7f7f7;
  border-top: 1px solid #e6e6e6;
  box-sizing: border-box;
  position: relative;
  left: auto; 
}

.post-content-wrapper > .hi-nearby-section .hi-nearby-section__inner {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding: 24px 16px;
  box-sizing: border-box;
}

@media (max-width: 991px) {
  body.post-template:has(#post-hospital-find-cta) .post-content-wrapper > .hi-nearby-section:has(.phl-posts-list li) .hi-nearby-section__inner {
    padding-bottom: calc(24px + 56px + env(safe-area-inset-bottom, 0px));
  }
}

.post-content-wrapper > .hi-nearby-section .hi-nearby-header {
  margin: 0 0 20px;
  padding: 0;
}

.post-content-wrapper > .hi-nearby-section .hi-nearby-title {
  margin: 0;
  color: #000;
  font-size: 20px;
  font-weight: 600;
  line-height: 32px;
}

.post-content-wrapper > .hi-nearby-section .hi-nearby-notice {
  margin-top: 28px;
  color: #8c8c8c;
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
}

.post-content-wrapper > .hi-nearby-section .hi-nearby-notice p {
  margin: 0;
}

.post-content-wrapper > .hi-nearby-section .hi-nearby-notice p + p {
  margin-top: 16px;
}

.post-content-wrapper > .hi-nearby-section .hi-nearby-list.hf-list--loading {
  display: none !important;
}

/* 병원찾기·병원 상세와 동일 스켈레톤 (hf-skeleton-cards partial) */
.post-content-wrapper > .hi-nearby-section .hf-result-skeleton {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 0;
}
.post-content-wrapper > .hi-nearby-section .hf-result-skeleton[hidden] {
  display: none !important;
}
.post-content-wrapper > .hi-nearby-section .hf-skel-card {
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 12px;
  padding: 14px;
}
.post-content-wrapper > .hi-nearby-section .hf-skel-row {
  display: flex;
  gap: 14px;
}
.post-content-wrapper > .hi-nearby-section .hf-skel-thumb {
  width: 112px;
  height: 112px;
  border-radius: 8px;
  flex: 0 0 112px;
}
.post-content-wrapper > .hi-nearby-section .hf-skel-body {
  flex: 1;
  min-width: 0;
}
.post-content-wrapper > .hi-nearby-section .hf-skel-line {
  height: 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.post-content-wrapper > .hi-nearby-section .hf-skel-line--lg { width: 72%; }
.post-content-wrapper > .hi-nearby-section .hf-skel-line--md { width: 44%; }
.post-content-wrapper > .hi-nearby-section .hf-skel-line--sm { width: 88%; margin-bottom: 0; }
.post-content-wrapper > .hi-nearby-section .hf-skel-tags {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.post-content-wrapper > .hi-nearby-section .hf-skel-tag {
  width: 72px;
  height: 20px;
  border-radius: 999px;
}
.post-content-wrapper > .hi-nearby-section .hf-skel-shimmer {
  background: linear-gradient(100deg, #f0f0f0 25%, #e7e7e7 37%, #f1f1f1 63%);
  background-size: 400% 100%;
  animation: hf-skel-shimmer 1.15s ease-in-out infinite;
}
@keyframes hf-skel-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .post-content-wrapper > .hi-nearby-section .hf-skel-shimmer { animation: none; }
}

/* ==================== HOME RENEWAL (KO) ==================== */
/* 기획서(medihi-plan.vercel.app) CSS 변수 기반 전면 반영 */

html[data-home-ui="renewal"] [data-home-legacy] {
  display: none !important;
}

html[data-home-ui="legacy"] [data-home-renewal] {
  display: none !important;
}

.home-legacy .home-tag-filter.is-home-filter-pending .tag-tabs {
  min-height: 40px;
  opacity: 0;
  visibility: hidden;
}

/* ── 리뉴얼 루트 컨테이너 ── */
.home-renewal-ko {
  display: flex;
  flex-direction: column;
}

/* ── 공통 섹션 (기획서 .section-block 동일) ── */
.ko-section {
  background: #ffffff;
  border-bottom: 0;
  padding: 24px 16px;
}

.ko-section__title {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 600;
  line-height: 32px;
  color: #111111;
}

/* ── 히어로 ── */
.ko-hero {
  background: #f7f7f7;
  display: flex;
  flex-direction: column;
  padding: 32px 16px;
}

@media (max-width: 699px) {
  /*
   * 홈 리뉴얼: .content 기본 padding-top(16px) 때문에 구분선이 navbar(58px)보다
   * 2px 아래(60px)로 보이던 문제 — 병원찾기와 동일하게 콘텐츠를 58px에서 시작.
   * 하단 구분선은 전역 .navbar::after(fixed 1px) 한 곳에서만 처리.
   */
  html[data-home-ui="renewal"] .main > .content {
    padding-top: 0 !important;
  }

  /* .content padding 을 상쇄해 히어로·하위 섹션 좌우 16px 기준 통일 */
  html[data-home-ui="renewal"] .home-renewal-ko {
    box-sizing: border-box;
    margin-left: calc(var(--layout--padding, 16px) * -1);
    margin-right: calc(var(--layout--padding, 16px) * -1);
    width: calc(100% + (var(--layout--padding, 16px) * 2));
  }

  .page-home-renewal .ko-hero {
    box-sizing: border-box;
  }

  /* 기획서 모바일 홈 타이포그래피 */
  html[data-home-ui="renewal"] .home-renewal-ko .ko-hero__title strong {
    font-weight: 700;
  }

  html[data-home-ui="renewal"] .home-renewal-ko .ko-hero__quick-label {
    color: #000000;
    font-weight: 400;
    line-height: 24px;
  }

  html[data-home-ui="renewal"] .home-renewal-ko .ko-hero__quick-tag {
    color: #000000;
    font-weight: 400;
  }

  html[data-home-ui="renewal"] .home-renewal-ko .ko-section__title {
    margin-bottom: 10px;
  }

  html[data-home-ui="renewal"] .home-renewal-ko .ko-category-grid {
    gap: 0;
  }

  html[data-home-ui="renewal"] .home-renewal-ko .ko-guide-tabs {
    gap: 10px;
    margin-bottom: var(--ko-guide-stack-gap, 8px);
    padding-bottom: 0;
  }

  html[data-home-ui="renewal"] .home-renewal-ko .ko-guide-tab {
    border-color: #e6e6e6;
    font-weight: 400;
  }

  html[data-home-ui="renewal"] .home-renewal-ko .ko-guide-tab.is-selected {
    font-weight: 700;
  }

  html[data-home-ui="renewal"] .home-renewal-ko .ko-guide-doctor,
  html[data-home-ui="renewal"] .home-renewal-ko .ko-guide-doctor .v-badge.v-badge--verified {
    color: #111111;
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;
  }

  html[data-home-ui="renewal"] .home-renewal-ko .ko-verified-icon {
    height: 13px;
    width: 13px;
  }
}

@media (max-width: 360px) {
  html[data-home-ui="renewal"] .home-renewal-ko .ko-hero__title {
    font-size: 22px;
    line-height: 31px;
  }

  html[data-home-ui="renewal"] .home-renewal-ko .ko-section__title {
    font-size: 20px;
    line-height: 29px;
  }

  html[data-home-ui="renewal"] .home-renewal-ko .ko-category-card span {
    font-size: 11px;
  }
}

/* 기획서 .web-hero-copy: 텍스트 묶음 컬럼 */
.ko-hero__copy {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  gap: 0;
  max-width: 100%;
  min-width: 0;
}

.ko-hero__title {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 700;
  line-height: 34px;
  color: #333333;
}

.ko-hero__title strong {
  color: #ff6100;
  font-weight: 900;
}

.ko-hero__quick-label {
  margin: 0 0 8px;
  font-size: 16px;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "system-ui", "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 24px;
  color: #000000;
}

/* 검색 카드 (기획서 .search-card) */
.ko-hero__search-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #111111;
  border-radius: 16px;
  display: flex;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  padding: 12px 10px;
}

.ko-hero__search-icon {
  flex: 0 0 auto;
  height: 20px;
  width: 20px;
}

/* 추천 태그 (기획서 .quick-tags) */
.ko-hero__quick-tags {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  gap: 4px;
  min-width: 0;
  overflow: auto hidden;
  scrollbar-width: none;
}

.ko-hero__quick-tags::-webkit-scrollbar {
  display: none;
}

.ko-hero__quick-tag {
  background: #f7f7f7;
  border: 1px solid #dddddd;
  border-radius: 8px;
  color: #111111;
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 14px;
  line-height: 18px;
  overflow: hidden;
  padding: 6px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* PC 히어로 비주얼 (700px+) */
.ko-hero__art {
  display: none;
}

@media (min-width: 700px) {
  html[data-home-ui="renewal"] .main > .content {
    padding-top: 0;
  }

  /* 컨텐츠 최대 너비 700px 제한 (기획서 .web-home) */
  .home-renewal-ko {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }

  .ko-hero {
    border-radius: 16px;
    box-sizing: border-box;
    height: 264px;
    overflow: hidden;
    position: relative;
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
    justify-content: space-between;
    min-height: 264px;
    padding: 32px 0 32px 32px;
  }

  .ko-hero__copy {
    flex: 0 0 min(360px, calc(100% - 312px));
  }

  .ko-hero__art {
    display: flex;
    flex: 0 0 280px;
    height: 264px;
    justify-content: center;
    position: absolute;
    right: 0;
    top: 0;
    width: 280px;
  }

  .ko-hero__art-img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
  }
}

/* ── 진료분야 (기획서 .home-category-section) ── */
.ko-section--category {
  background: #ffffff;
}

@media (max-width: 699px) {
  /*
   * 기획서 .section-block / .home-category-section:
   * 홈 리뉴얼에서만 진료분야↔건강가이드 사이 1px 구분선 + 12px surface-soft 밴드 (총 13px)
   * 병원찾기(.hf-ko-domains) 등 동일 클래스 재사용 영역에는 적용하지 않음
   */
  html[data-home-ui="renewal"] .home-renewal-ko .ko-section--category {
    background: #ffffff;
    border-bottom: 0;
    padding-bottom: 0;
  }

  html[data-home-ui="renewal"] .home-renewal-ko .ko-section--category::after {
    background: #f7f7f7;
    border-top: 1px solid #dddddd;
    content: "";
    display: block;
    height: 12px;
    margin-left: -16px;
    margin-right: -16px;
    margin-top: 24px;
    width: calc(100% + 32px);
  }
}

.ko-category-grid {
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.ko-category-card {
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: #111111;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 66px;
  padding: 4px;
  width: 82px;
}

.ko-category-card:focus-visible {
  box-shadow: rgba(255, 97, 0, 0.42) 0px 0px 0px 1px inset, rgba(255, 97, 0, 0.16) 0px 0px 0px 1px;
  outline: none;
}

.ko-category-icon {
  display: block;
  flex: 0 0 auto;
  height: 42px;
  object-fit: contain;
  width: 48px;
}

.ko-category-card span {
  font-size: 12px;
  line-height: 16px;
  text-align: center;
  white-space: nowrap;
}

/* ── 건강 가이드 (기획서 .guide-section) ── */
.ko-section--guide {
  --ko-guide-stack-gap: 8px;
  border-bottom: 0;
  background: #ffffff;
}

/* 탭 (기획서 .segment-tabs / .web-guide-tabs) */
.ko-guide-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 var(--ko-guide-stack-gap);
  overflow-x: auto;
  padding-bottom: 0;
  scrollbar-width: none;
}

.ko-guide-tabs::-webkit-scrollbar {
  display: none;
}

.ko-guide-tab {
  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  color: #111111;
  cursor: pointer;
  flex: 0 0 auto;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "system-ui", "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 18px;
  padding: 8px 12px;
}

.ko-guide-tab.is-selected {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
  font-weight: 700;
}

/* 패널 */
.ko-guide-panels {
  margin: 0;
  padding: 0;
}

.ko-guide-panels .ko-guide-panel {
  display: block;
  margin: 0;
  padding: 0;
}

.ko-guide-panels .ko-guide-panel[hidden] {
  display: none;
}

/* 가이드 목록 (기획서 .guide-list / .web-guide-list) */
.ko-guide-list {
  display: flex;
  flex-direction: column;
  gap: var(--ko-guide-stack-gap);
  margin: 0;
  width: 100%;
}

/* 가이드 아이템 (기획서 .guide-item) */
.ko-guide-item {
  align-items: center;
  display: flex;
  gap: 10px;
  margin: 0;
  min-height: 88px;
  padding: 8px 0;
}

/* 썸네일 (기획서 .guide-thumb) */
.ko-guide-thumb {
  border-radius: 8px;
  flex: 0 0 auto;
  height: 72px;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  width: 93px;
  background: #f7f7f7;
  border: 1px solid #eeeeee;
  display: block;
}

.ko-guide-thumb.is-empty {
  background: #f7f7f7;
  border: 1px solid #eeeeee;
}

.ko-guide-thumb img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

/* 가이드 본문 */
.ko-guide-body {
  flex: 1 1 auto;
  min-width: 0;
}

/* 감수자 (기획서 .doctor) */
.ko-guide-doctor {
  align-items: center;
  color: #555555;
  display: flex;
  font-size: 14px;
  gap: 4px;
  line-height: 18px;
  margin: 0 0 4px;
}

.ko-guide-doctor .v-badge--verified {
  gap: 4px;
}

.ko-verified-icon {
  flex: 0 0 auto;
  height: 14px;
  width: 14px;
}

/* 가이드 제목 (기획서 .guide-item h3) */
.ko-guide-item h3 {
  display: -webkit-box;
  flex: 1 1 auto;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ko-guide-item h3 a {
  color: #111111;
  text-decoration: none;
}

.ko-guide-item h3 a:hover {
  color: #ff6100;
}

/* PC 가이드 (기획서 동일하게 리스트 형태, 700px+) */
@media (min-width: 700px) {
  .ko-category-grid {
    gap: 48px;
    justify-content: flex-start;
  }

  .ko-guide-list {
    flex-direction: column;
    gap: var(--ko-guide-stack-gap, 8px);
  }

  .ko-guide-item {
    flex-direction: row;
    min-height: 88px;
    align-items: center;
    padding: 8px 0;
  }

  .ko-guide-thumb {
    width: 93px;
    height: 72px;
    flex: 0 0 auto;
  }

  .ko-guide-item h3 {
    font-size: 16px;
    line-height: 24px;
  }
}

/* ── 배너/프로모 (기획서 .promo-area) ── */
.ko-promo-area {
  background: #ffffff;
  border-bottom: 0;
  display: grid;
  gap: 10px;
  padding: 10px 16px;
}

@media (min-width: 700px) {
  .ko-promo-area {
    padding-bottom: 40px;
  }
}

/* 캠페인 카드 (기획서 .campaign-card) */
.ko-campaign-card {
  align-items: center;
  background: #f7f7f7;
  border-radius: 8px;
  color: #111111;
  display: flex;
  justify-content: space-between;
  min-height: 92px;
  overflow: hidden;
  padding: 0 16px;
  text-decoration: none;
}

.ko-campaign-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ko-campaign-card__title {
  color: #111111;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  margin: 0;
}

.ko-campaign-card__img {
  display: block;
  flex: 0 0 auto;
  height: 92px;
  object-fit: contain;
  width: auto;
}

/* 미니카드 행 (기획서 .mini-card-row) */
.ko-mini-card-row {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

/* 미니카드 (기획서 .mini-card) */
.ko-mini-card {
  align-items: flex-start;
  border-radius: 8px;
  color: #111111;
  display: flex;
  flex-direction: column;
  font-size: 16px;
  font-weight: 700;
  justify-content: space-between;
  line-height: 24px;
  min-height: 108px;
  padding: 16px;
  text-align: left;
  text-decoration: none;
}

.ko-mini-card:hover,
.ko-mini-card:focus-visible,
.ko-mini-card:visited,
.ko-mini-card:hover span,
.ko-mini-card:focus-visible span,
.ko-mini-card:visited span {
  color: #111111;
}

.ko-mini-card--service {
  background: #fff5ee;
}

.ko-mini-card--partner {
  background: #eff4ff;
}

.ko-mini-card__icon {
  align-self: flex-end;
  height: 24px;
  object-fit: contain;
  width: 24px;
}

/* ── 바텀시트 (기획서 동일) ── */
.home-domain-sheet {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: block;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 180ms ease-in, visibility 180ms ease-in;
}

.home-domain-sheet.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.home-domain-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
}

.home-domain-sheet__panel {
  position: absolute;
  left: var(--home-domain-sheet-left, 0px);
  right: auto;
  bottom: -296px;
  box-sizing: border-box;
  height: 296px;
  max-height: 70vh;
  overflow: auto;
  border-radius: 16px 16px 0 0;
  background: #fff;
  margin: 0 auto;
  padding: 0 0 64px;
  transform: none;
  transition: bottom 300ms ease-in;
  width: var(--home-domain-sheet-width, 100vw);
}

.home-domain-sheet.is-open .home-domain-sheet__panel {
  bottom: 0;
  transform: none !important;
}

@media (max-width: 991px) {
  .home-domain-sheet__panel {
    left: 0;
    width: 100vw;
  }
}

.home-domain-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  min-height: 64px;
  padding: 16px;
}

.home-domain-sheet__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

#home-domain-sheet .home-domain-sheet__title,
#hf-domain-sheet .home-domain-sheet__title {
  color: #111111;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "system-ui", "Segoe UI", sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 32px;
}

.home-domain-sheet__close {
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #666;
}

.home-domain-sheet__items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-domain-sheet__item {
  display: block;
  width: 100%;
  border: none;
  background: #fff;
  padding: 16px 20px;
  text-align: left;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  color: #111;
  cursor: pointer;
}

body.home-domain-sheet-open {
  overflow: hidden;
}

@media (min-width: 700px) {
  html[data-home-ui="renewal"] {
    scrollbar-gutter: stable;
  }

  @supports not (scrollbar-gutter: stable) {
    html[data-home-ui="renewal"] body.home-domain-sheet-open {
      padding-right: var(--home-domain-sheet-scrollbar-width, 0px);
    }
  }
}

/* ── 모바일 footer 서브 메뉴 상단 배치 ── */
@media (max-width: 991px) {
  .main > .footer {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 16px;
  }

  .main > .footer > .footer-copyright {
    margin-right: 0;
  }
}

@media (max-width: 767px) {
  /*
   * 병원찾기: 모바일 navbar 높이와 main padding-top 을 전 페이지와 동일하게 유지.
   * 패널 상단 구분선은 .hf-main-panel border-top 으로 처리.
   */
  html.hi-path-hospital-list .main {
    padding-top: var(--navbar--min-height, 58px) !important;
  }

  html.hi-path-hospital-list .main > footer.footer {
    margin-top: calc(var(--layout--padding) * -1 + var(--layout--gap) - 25px);
  }
}

/* ── ko 리뉴얼 전용 footer 링크 그룹 ── */
.ko-renewal-footer-links {
  display: none;
}

html[data-home-ui="renewal"] .main > footer.footer {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

html[data-home-ui="renewal"] .main > footer.footer .ko-renewal-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  order: -1;
  width: 100%;
}

/* ko-renewal-footer-links 내 ghost secondary_navigation ul 스타일 */
html[data-home-ui="renewal"] .main > footer.footer .ko-renewal-footer-links > ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

html[data-home-ui="renewal"] .main > footer.footer .ko-renewal-footer-links > ul > li {
  display: flex;
  align-items: center;
}

html[data-home-ui="renewal"] .main > footer.footer .ko-renewal-footer-links > ul > li + li {
  margin-left: 16px;
}

html[data-home-ui="renewal"] .main > footer.footer .ko-renewal-footer-links > ul > li:nth-child(4) {
  flex-basis: 100%;
  margin-left: 0;
}

/* ko 리뉴얼 footer에서는 기존 secondary nav 숨김 */
html[data-home-ui="renewal"] .main > footer.footer .ko-legacy-footer-nav {
  display: none;
}

.sidebar-footer .navigation-sidebar-footer > ul {
  flex-direction: column;
  align-items: flex-start;
}

.sidebar-footer .navigation-sidebar-footer > ul > li {
  flex-basis: auto;
  margin-left: 0;
}

html[data-home-ui="renewal"] .main > footer.footer .ko-renewal-footer-links .nav-link,
html[data-home-ui="renewal"] .main > footer.footer .ko-renewal-footer-links .nav-link .label {
  color: #333333;
  font-size: 14px;
  line-height: 21px;
  text-decoration: none;
  white-space: nowrap;
}

html[data-home-ui="renewal"] .main > footer.footer .ko-renewal-footer-links .nav-link:hover {
  color: #ff6100;
}

@media (max-width: 991px) {
  html[data-home-ui="renewal"] .main > .content {
    padding-bottom: 0;
  }

  html[data-home-ui="renewal"] .main > footer.footer {
    margin-top: 0;
    padding-top: 40px;
  }

  html[data-home-ui="renewal"] .main > footer.footer .ko-renewal-footer-links {
    margin-bottom: 12px;
  }
}
