:root {
  /* Theme */
  --theme-color: #ff683d;          /* 메인 테마 색상, 버튼, 링크 hover 색상 */
  --text-color-primary: #333333;   /* 기본 텍스트 */
  --text-color-secondary: #666666; /* 부가 텍스트 */
  --text-color-tertiary: #8c8c8c;  /* 연한 텍스트 */
  --text-color-heading: #222222;   /* 제목 텍스트 */
  --text-color-theme: #f5562a;     /* 테마 텍스트 */
  --bg-color: #ffffff;             /* 배경 */
  --border-color: #eaecef;         /* 경계선 */
  --box-border-color: #e6e7ea;     /* 경계선 */
  --code-bg-color: #f5f7f9;        /* 코드 블록 배경 */
  --callout-bg-color: #f8f9fa;     /* 콜아웃 배경 */
  --callout-border-color: #e3e6e8; /* 콜아웃 테두리 */

  /* Layout */
  --sidebar-width: 18%;/* Docsify 기본 사이드바 폭 (테마 250~300px) */
  --sidebar-min: 200px;
  --sidebar-max: 260px;
  --content-max: 920px;    /* 본문 최대 폭 */
  --content-gap: 150px;    /* 사이드바 본문 간격 */
  --container-width: calc(var(--sidebar-width) + var(--content-max) + var(--content-gap));
  
  /* 전환 효과 */
  --transition-duration: 0.2s;
  --transition-timing: ease-in-out;
}

/* ========== 기본 스타일 ========== */
body, .markdown-section p {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif !important;
  color: var(--text-color-primary);
  line-height: 1.8;
  font-size: 16px;
  margin-top: 2px;
  margin-bottom: 2px;
}

/* ========== 제목 스타일 ==========*/
/* 제목 공통 스타일 */
.markdown-section h1,
.markdown-section h2,
.markdown-section h3,
.markdown-section h4,
.markdown-section h5 {
  color: var(--text-color-heading);
  margin-bottom: 3px
}

/* 제목 안의 span도 heading 색상 따르도록 */
.markdown-section h1 span,
.markdown-section h2 span,
.markdown-section h3 span,
.markdown-section h4 span,
.markdown-section h5 span {
  color: var(--text-color-heading) !important;
}

/* 제목 개별 스타일 */
.markdown-section h1 {
  margin-top: 0rem;
  font-size: 2.2rem;
  font-weight: 700;
  font-variation-settings: "wght" 700;
}

.markdown-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  font-variation-settings: "wght" 700;
  margin-top: 2.2rem;
}

.markdown-section h3 {
  font-size: 1.45rem;
  font-weight: 650;
  font-variation-settings: "wght" 650;
  margin-top: 1.8rem;
}

.markdown-section h4 {
  font-size: 1.2rem;
  font-weight: 650;
  font-variation-settings: "wght" 650;
  margin-top: 1.8rem;
}

.markdown-section h5 {
  font-size: 1rem;
  font-weight: 650;
  font-variation-settings: "wght" 650;
  margin-top: 1.6rem;
}

/* 앵커 링크 스타일 */
.markdown-section h1 > .anchor,
.markdown-section h2 > .anchor,
.markdown-section h3 > .anchor,
.markdown-section h4 > .anchor,
.markdown-section h5 > .anchor,
.markdown-section h6 > .anchor {
  text-decoration: none;
  border-bottom: none;
}

/* 리드 문단 스타일 */
.markdown-section .lead {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.7;
  margin: 0.5rem 0 0.5rem;
}

/* 보조 제목(eyebrow) 스타일 */
.eyebrow {
  display: block;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--theme-color);
  line-height: 1.2;
  letter-spacing: 0.02em;
}

/* 링크 스타일 */
.markdown-section a {
  color: var(--theme-color);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-duration) var(--transition-timing);
}

/* ========== 여백 ==========*/

/* 중간 여백 */
.medium-gap {
  display: block;
  margin-top: 30px;
}

/* 작은 여백 */
.small-gap {
  display: block;
  margin-top: 2px;
}

/* ========== 이미지 스타일 ========== */
/* 기본 이미지 (가이드용 UI 이미지) */
.markdown-section img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 12px auto;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* 스타일이 적용된 이미지 (기타 이미지, 썸네일 등) */
.markdown-section img.styled-img {
  border-radius: 10px;
  border: 2.5px solid #F2F4F6;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* gif 이미지 */
.markdown-section img.gif-img {
  border-radius: 10px; /* 모서리 둥글게 */
  border: 1.3px solid #e6e8eb; /* 연한 회색 테두리 */
  display: block;
  margin: 16px auto;
}

/* 목록 스타일 */
.markdown-section li {
  margin-bottom: 0.5em;
}

.markdown-section ul li::marker {
  color: var(--text-color-primary);
}

/* 텍스트 강조 */
.markdown-section strong {
  font-weight: 600;
  color: var(--text-color-primary);
}

.markdown-section em {
  font-style: italic;
}

/* 사이드바 토글 버튼 */
.sidebar-toggle-button span {
  background-color: var(--theme-color);
}

/* 구분선 */
.markdown-section hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 2rem 0;
}

/* 체크리스트 */
.markdown-section li.task-list-item {
  list-style-type: none;
  padding-left: 0.5em;
}

.markdown-section li.task-list-item input[type="checkbox"] {
  margin-right: 0.5em;
}

/* 버튼 스타일 */
.markdown-section a.button {
  display: inline-block;
  background-color: var(--theme-color);
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  margin: 10px 0;
  font-weight: 500;
  transition: 
  background-color var(--transition-duration) var(--transition-timing),
  text-decoration var(--transition-duration) var(--transition-timing),
  opacity var(--transition-duration) var(--transition-timing);
}

.markdown-section a.button:hover {
  text-decoration: none;
  opacity: 0.9;
}

/* 알림/콜아웃 박스 */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-color-primary);
  margin-top: 5px;
}

.alert .icon {
  font-size: 18px;
  flex-shrink: 0;
}

.alert.info {
  background: #f0f7ff;
}

.alert.warning {
  background: #fff4ec;
}

.alert.success {
  background: #f0fdf4;
}

.alert.error {
  background: #fff5f5;
}

/* 코드 블록 (``` 로 감싼 전체 코드) */
.markdown-section pre {
  background-color: var(--code-bg-color);
  border-radius: 5px;
  padding: 1rem;
  margin: 1.5rem 0;
  overflow-x: auto; /* 긴 코드 줄바꿈 방지 */
}

/* 공통 코드 스타일 (인라인 + 블록 안의 코드 텍스트) */
.markdown-section code {
  font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.9em;
  line-height: 1.5;
  color: #2c3e50;
}

/* 인라인 코드 (메뉴, 버튼용) */
.markdown-section code:not([class*="lang-"]) {
  padding: 2px 6px;
  margin: 0 2px;
  background-color: #fff3ef;
  border-radius: 6px;
  border: 1px solid #ff683d33;
  color: var(--text-color-theme);
  font-weight: 600;
  line-height: 1.4;
  vertical-align: baseline;
  position: relative;
  top: -1px;
}

.inline-code {
  padding: 2px 6px;
  margin: 0 2px;
  background-color: #fff3ef;
  border-radius: 6px;
  border: 1px solid #ff683d33;
  color: var(--text-color-theme);
  font-weight: 600;
  line-height: 1.4;
  vertical-align: baseline;
  position: relative;
  top: -1px;
}

/* 설명용 인라인 코드 (예, 참고 등) */
.markdown-section code.etc {
  background-color: #F3F4F6 !important;  /* 은은한 회색 배경 */
  color: #374151 !important;             /* 짙은 회색 글자 */
  border: 1px solid #D1D5DB !important;  /* 옅은 테두리 */
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.9em;                      /* 살짝 작게 */
}

/* 리스트 버튼 스타일 */
.list-button {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}

.list-button a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border: 1px solid #cbcdd1;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 15px;
  color: var(--text-color-primary);
  text-decoration: none;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.list-button a:hover {
  background-color: #f9f9f9;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.list-button a::after {
  content: "›";
  font-size: 18px;
  color: var(--text-color-tertiary);
}

/* ========== 기본 테이블 ========== */
/* 테이블 공통 스타일 */
.markdown-section table {
  display: table;
  width: 100%;       /* 컨테이너 폭 채우기 */
  table-layout: auto;
  border-collapse: collapse;
  margin: 1rem 0;
  border-left: none;
  border-right: none;
}

.markdown-section table th,
.markdown-section table td {
  word-wrap: break-word;        /* 긴 텍스트 자동 줄바꿈 */
  padding: 4px 10px;
}

/* 열 비율 지정 */
.markdown-section table th:first-child,
.markdown-section table td:first-child {
  min-width: 80px;
}

/* 헤더 스타일 */
.markdown-section thead th {
  background-color: #f5f6f8;  /* 연회색 배경 */
  color: var(--text-color-primary);
  text-align: left;
  border-top: none;
  border-left: none;
  border-right: none;
  border-bottom: 1px solid #E6E7EA; /* 하단 구분선만 */
  font-weight: 600;
  font-variation-settings: "wght" 600

}

/* 본문 스타일 */
.markdown-section tbody tr {
  border-bottom: 1px solid #E6E7EA;      /* 행 구분선 */
}

/* 본문 셀 */
.markdown-section tbody td {
  background-color: var(--bg-color) !important; /* 흰색 배경 */
  border-left: none;
  border-right: none;
}

/* 필수 입력 항목 스타일*/
.required {
  color: var(--theme-color);
  margin-left: 4px;
}

/* 테이블 제목 h3 스타일 */
.table-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  margin-bottom: 8px;
}

.table-title h3 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 650;
  font-variation-settings: "wght" 650;
  color: var(--text-color-heading);
}

.table-title h4 {
  margin: 0;
  font-size: 1.2rem !important;
  font-weight: 650;
  font-variation-settings: "wght" 650;
  color: var(--text-color-heading);
}

.table-title .note {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-color-secondary);
  white-space: nowrap;
  align-self: flex-end;
  margin-right: 5px;
}

.table-title .note .star {
  color: var(--theme-color);
}

/* ========== 내용 적은 테이블 ==========*/
.markdown-section table.table-compact {
  width: auto !important;
  max-width: none;
  table-layout: auto;
  margin: 10px;
}

.markdown-section table.table-compact th:nth-child(1),
.markdown-section table.table-compact td:nth-child(1) {
  min-width: 120px;
}

.markdown-section table.table-compact th:nth-child(2),
.markdown-section table.table-compact td:nth-child(2) {
  min-width: 170px;
}

/* ========== 카드 스타일 ==========*/
/* 함께 보면 좋은 글(블로그) 섹션 */
.recommend-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.recommend-item .text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
}
.recommend-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  background: var(--bg-color);
  border: 1px solid var(--box-border-color);
  border-radius: 10px;
  padding: 15px 20px 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}
.recommend-item a {
  display: flex;
  flex-direction: row; /* 왼쪽 텍스트, 오른쪽 이미지 */
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-decoration: none;
  color: inherit;
  padding: 0 !important;
  box-sizing: border-box;
  gap: 40px;
}

.recommend-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.recommend-item img {
  width: 160px;
  height: 100px;
  border-radius: 8px;
  object-fit: cover;
  margin: 0;
  flex-shrink: 0;
}
.recommend-item .text h3 {
  font-size: 18px;
  margin: 0 0 12px;
  color: var(--text-color-primary);
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
}

.recommend-item .text h3 a {
  color: var(--text-color-primary);
  text-decoration: none;
}
.recommend-item .text h3 a:hover {
  color: var(--text-color-primary);
}
.recommend-item .text p {
  font-size: 15px;
  color: var(--text-color-tertiary);
  margin: 0;
  line-height: 1.5;
  text-align: left;
  text-decoration: none;
}

/* 서비스 소개 2열 카드 섹션 */
.feature-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 20px 0;
}

@media (min-width: 768px) {
  .feature-cards {
    grid-template-columns: 1fr 1fr;
  }
}

.feature-cards .card {
  background: #fff;
  border: 1px solid #e6e8eb;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08); /* 고정 그림자(더 선명하게) */
}

/* 카드 타이틀 텍스트 굵기 */
.feature-cards .card h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  line-height: 1.4;
  color: #2c3e50;
  font-weight: 630;
}

.feature-cards .card p {
  margin: 0;
  color: #555;
  line-height: 1.6;
}

/* 타이틀 왼쪽 아이콘 배치 */
.feature-cards .card h3.card__title {
  display: inline-flex;
  align-items: center;
  gap: 8px; /* 아이콘-타이틀 간격 */
  margin: 0 0 8px 0;
}

.feature-cards .card .card__icon {
  width: 20px;  /* 아이콘 크기 20px */
  height: 20px;
  border-radius: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;  /* 아이콘 크기 20px */
  line-height: 1;
  color: #2c3e50;
}

/* 고정 그림자: 호버 변화 없음 */
.feature-cards .card.card--hover {
  transition: box-shadow .2s ease, transform .2s ease;
  will-change: transform, box-shadow;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* ========== 아코디언 ========== */
/* 브라우저 기본 summary 아이콘 숨기기 */
.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion details {
  border: 1px solid var(--box-border-color);
  border-radius: 6px;
  margin-top: 8px;
  margin-bottom: 8px;
  padding: 10px 20px;
  background: var(--bg-color);
}

.accordion summary {
  cursor: pointer;
  font-weight: 400;
  font-variation-settings: "wght" 400;
  list-style: none;
}

.accordion details[open] summary {
  font-weight: 500;
  font-variation-settings: "wght" 500;
}

.accordion summary::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 5px;
  background-image: url("/assets/chevron_right.svg");
  background-size: contain;
  background-repeat: no-repeat;
  transform: rotate(0deg);
  transition: transform 0.2s;
  vertical-align: middle;
  color: var(--text-color-primary);
}

.accordion details[open] summary::before {
  background-image: url("/assets/chevron_down.svg");
  transform: none;
}

.accordion ul {
  margin: 10px 0 0 20px;
  padding: 0;
}

/* ========== 본문용 아이콘 + 텍스트 ========== */
.menu-icon {
  display: inline-block !important;
  width: 18px;
  height: 18px;
  margin: 0 6px 0 0 !important;   /* 오른쪽만 살짝 띄우기 */
  vertical-align: middle; /* 텍스트랑 같은 줄 */
  fill: currentColor;
}

/* ========== 헤딩용 아이콘 + 텍스트 ========== */
.heading-icon {
  display: inline-block !important;
  width: 23px;
  height: 23px;
  stroke-width: 1.8;
  margin: 0 8px 0 0 !important;   /* 오른쪽만 살짝 띄우기 */
  vertical-align: middle; /* 텍스트랑 같은 줄 */
  fill: currentColor;
  opacity: 0.9;
}

/* ========== 사이드바 ========== */
/* 사이드바 : Theme */
.sidebar {
  background-color: var(--bg-color);
  border-right: 1px solid var(--border-color);
}

/* 사이드바 : Layout */
body .sidebar {
  top: 70px;
  height: calc(100% - 70px);
  padding-top: 20px;
  width: var(--sidebar-width);
  padding-left: 25px;
  max-width: 260px;  /* 사이드바 최대 폭 제한 */
  min-width: 200px;  /* 사이드바 최소 폭 제한 */
}

/* 사이드바 : 상단 여백 최소화 */
.sidebar .search,
.sidebar .app-name {
  margin-top: 0 !important;
  padding-top: 5px !important;
  margin-bottom: 5px !important;
}

/* 사이드바 네비게이션 */
.sidebar-nav li { margin: 6px 0; }

/* 기본 링크 */
.sidebar-nav a {
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s;
  color: var(--text-color-secondary);
}

/* 최상위 카테고리 */
.sidebar .sidebar-nav > ul > li > a {
  font-weight: 600;
  color: var(--theme-color);
  font-size: 1rem; /* 16px */
}

/* 하위 메뉴 */
.sidebar .sidebar-nav > ul > li > ul > li > a {
  font-weight: 400;
  color: var(--text-color-secondary);
}

/* Hover (상위/하위 모두 적용) */
.sidebar .sidebar-nav a:hover {
  color: var(--theme-color);
}

/* Active */
.sidebar .sidebar-nav li.active > a {
  color: var(--theme-color);
  font-weight: 600;
}

/* 버튼 스타일의 링크 */
.markdown-section a[href^="http"] {
  position: relative;
  padding-left: 1.8em;
  font-weight: 500;
}

/* 배경색을 명시해 hover-out 때 흰색 번쩍임 방지 */
html, body, #app, .content, .markdown-section {
  background-color: #fff;
}

/* 외부 문법 보정/도우미 확장(Grammarly/LanguageTool 등) 위젯 숨김: 위젯 영역 내에서는 비노출 */
.contact-widget__body [class*="gramm"],
.contact-widget__body [id*="gramm"],
.contact-widget__body [class*="lt-"],
.contact-widget__body [id*="lt-"] {
  display: none !important;
}

/* 상단 네비게이션 바 스타일 */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: #fff;
    border-bottom: 1px solid #e1e5e9;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.top-nav .logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.top-nav .logo-image {
  height: 38px;
  width: auto;
  max-width: 180px;
  margin-right: 10px;
}

.top-nav .service-btn {
  background: var(--theme-color);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.top-nav .service-btn:hover {
  background: #e55a2e;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255, 104, 61, 0.3);
}

.top-nav .service-btn svg {
  width: 16px;
  height: 16px;
}

        /* 언어 전환 버튼 스타일 */
        .language-switcher {
          display: flex;
          gap: 8px;
          align-items: center;
          margin: 0 20px;
        }

/* 검색 결과를 오른쪽 사이드바로 이동 */
.search .results-panel {
  position: fixed !important;
  top: 70px;
  right: 0;
  left: auto;
  width: 350px;
  height: calc(100vh - 70px);
  background: #fff;
  border-left: 1px solid #e1e5e9;
  box-shadow: -2px 0 8px rgba(0,0,0,0.1);
  overflow-y: auto;
  z-index: 1000 !important;
  transform: translateX(100%) !important;
  transition: transform 0.3s ease;
}

.search .results-panel.show {
  transform: translateX(0) !important;
}

.search .results-panel .matching-post {
  border-bottom: 1px solid #f5f5f5 !important;
  padding: 15px 20px !important;
  margin: 0 !important;
}

.search .results-panel .matching-post:hover {
  background-color: #f8f9fa !important;
}

.search .results-panel .matching-post h2 {
  font-size: 16px !important;
  margin: 0 0 8px 0 !important;
  color: #2c3e50 !important;
}

v

/* 검색 결과 패널 헤더 */
.search .results-panel::before {
    content: "검색 결과";
    display: block;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
    font-weight: 600;
    color: #2c3e50;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* 영어일 때 검색 결과 헤더 */
.search .results-panel.en::before {
    content: "Search Results";
}

.lang-btn {
    background: transparent;
    border: 1px solid #e1e5e9;
    color: #666;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

        .lang-btn:hover {
          border-color: var(--theme-color);
          color: var(--theme-color);
        }

.lang-btn.active {
    background: var(--theme-color);
    border-color: var(--theme-color);
    color: white;
}

/* 언어 변경 로딩 인디케이터 */
.language-loading {
    position: fixed;
    top: 70px; /* 상단 네비게이션 바 아래부터 시작 */
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none; /* 기본적으로 숨김 */
    opacity: 0; /* 기본적으로 투명 */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: white;
  transition: opacity 0.3s ease;
}

.language-loading .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid var(--theme-color);
  border-radius: 50%;
  -webkit-animation: spin 1s linear infinite;
  -moz-animation: spin 1s linear infinite;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.language-loading .text {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.language-loading .subtext {
  font-size: 14px;
  opacity: 0.8;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 초기 로딩 동안 앱 숨김 처리 */
#app.hidden {
  visibility: hidden;
}

body.loading .sidebar,
body.loading .markdown-section {
  visibility: hidden;
}

/* 기존 컨텐츠를 상단 네비게이션 바 아래로 이동 */
#app {
    margin-top: 70px;
}

/* 초록색(border) 인라인 스타일을 브랜드 주황색으로 오버라이드 */
[style*="border-bottom: 4px solid #00C48C"],
[style*="border-left: 4px solid #00C48C"],
[style*="border-bottom:4px solid #00C48C"],
[style*="border-left:4px solid #00C48C"],
[style*="#00C48C" i],
[style*="#00c48c" i],
[style*="#2ecc71" i],
[style*="#27ae60" i],
[style*="#009966" i],
[style*="green" i],
[style*="rgb(0,196,140)" i] {
  border-bottom: 4px solid #ff683d !important;
  border-left: 4px solid #ff683d !important;
}


/* 플로팅 문의 위젯 */
.contact-widget {
  position: fixed;
  right: 40px;   /* 더 왼쪽으로 이동 */
  bottom: 32px;  /* 더 위로 (여백 증가) */
  z-index: 1100; /* 상단 네비보다 위 */
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
}

.contact-widget__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  /* 원래 버튼색(브랜드 컬러)로 복구 */
  background: linear-gradient(135deg, #FF7A55 0%, #FF683D 100%);
  color: #fff;
  border: none;
  border-radius: 28px;
  padding: 14px 18px; /* 버튼 내부 패딩 증가 */
  box-shadow: 0 6px 20px rgba(255,104,61,0.35);
  cursor: pointer;
  font-weight: 800; /* 문의하기 텍스트 더 굵게 */
  /* background-color 대신 background(gradient)를 포함하지 않도록 전환 속성 최소화 */
  transition: transform .2s ease, box-shadow .2s ease;
  will-change: transform, box-shadow;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.contact-widget__btn .icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  transition: transform .2s ease;
}

.contact-widget__btn:hover {
  transform: translateY(-3px) scale(1.06);
  /* 배경은 동일 gradient 유지 */
  box-shadow: 0 12px 30px rgba(255,104,61,0.55), 0 0 0 4px rgba(255,104,61,0.18);
}

.contact-widget__btn:hover .icon {
  transform: scale(1.15) rotate(-6deg);
}

.contact-widget__btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 6px 18px rgba(255,104,61,0.32);
}

.contact-widget__btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,104,61,0.35);
}

.contact-widget__panel {
  position: fixed;
  right: 40px;
  bottom: 100px;
  width: 360px;
  max-width: calc(100vw - 40px);
  background: #fff;
  border: 1px solid #e6e8eb;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
  overflow: hidden;
  transform: translateY(10px) translateZ(0);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  will-change: transform, opacity;
  backface-visibility: hidden;
  z-index: 999999; /* 매우 높은 z-index로 설정 */
  display: block !important; /* 강제로 표시 */
}

.contact-widget__panel.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  display: block !important; /* 강제로 표시 */
}

.contact-widget__header {
  background: linear-gradient(180deg, #FF8A65 0%, #FF683D 100%); /* 브랜드 컬러 톤 */
  color: #fff;
  padding: 20px 18px; /* 패널 상단 패딩 증가 */
  text-align: center;
}

.contact-widget__header h4 {
  margin: 6px 0 2px;
  font-size: 18px;
}

.contact-widget__header p {
  margin: 0;
  opacity: 0.95;
  font-size: 13px;
}

.contact-widget__body {
  padding: 18px 22px;
  background: #fafbfc;
} /* 바디 좌우 패딩 증가 */

.contact-widget__field {
  margin-bottom: 14px;
} /* 항목 간 여백 증가 */

.contact-widget__field label {
  display: block;
  font-size: 14px;
  color: #334155;
  margin-bottom: 8px;
  font-weight: 600;
} /* 라벨 볼드 살짝 약하게 */

.contact-widget__field input,
.contact-widget__field textarea {
  width: 100%;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  padding: 12px 14px; /* 인풋 패딩 증가 */
  font-size: 15px;    /* 인풋 글자 크기 소폭 증가 */
  background: #fff;
  box-sizing: border-box;
}

.contact-widget__field input:focus,
.contact-widget__field textarea:focus {
  outline: none;
  border-color: #FFA07A; /* 연한 주황색으로 변경 */
  box-shadow: 0 0 0 3px rgba(255, 160, 122, 0.2); /* 연한 주황색으로 변경 및 투명도 조정 */
}

/* 검색창 focus 시 테두리/컬러 모두 제거 */
.search input[type="search"]:focus {
  outline: none;
  box-shadow: none;
  border-color: transparent; /* 아예 테두리색 투명 처리 */
}

.contact-widget__field textarea {
  resize: vertical;
  min-height: 110px; /* 텍스트 영역 높이 증가 */
}

.contact-widget__submit {
  width: 100%;
  background: #FF683D; /* 브랜드 컬러 */
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px 16px; /* 버튼 패딩 증가 */
  font-weight: 700;
  cursor: pointer;
}

/* 첨부 UI */
.contact-widget__attachments {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 10px; /* 문의 내용과 여백을 더 붙임 */
}

.attach-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px dashed #e1e5e9;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  color: #2c3e50;
  cursor: pointer;
  font-size: 13px;
}

.attach-btn:hover {
  background: #f6f7f9;
}

.thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.thumb {
  width: 44px;
  height: 44px;
  border: 1px solid #e6e8eb;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

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

/* 모바일에서는 플로팅 버튼 텍스트 숨김 */
@media (max-width: 767.98px) {
  .contact-widget__btn .label {
    display: none;
  }
          .contact-widget__btn { padding: 12px; border-radius: 50%; }
        }

/* 사이드바 로딩 상태 표시 */
.sidebar-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: #666;
  font-style: italic;
}

.sidebar-loading::before {
  content: "사이드바를 로딩 중...";
}

/* 콘텐츠 최대 폭 고정: 모니터 크기와 무관하게 본문 폭을 일정하게 유지 */
.markdown-section {
  max-width: 860px !important;
  margin: 20px 0 !important;     /* 위아래 여백만 */
  padding: 20px 32px 40px;               /* 상 좌우 하 여백 */
}

/* 콘텐츠 컨테이너 */
main {
    display: flex;
    justify-content: center;
}

/* 본문: 사이드바 옆에 배치 */
.content {

  width: calc(100% - var(--sidebar-width));
  max-width: 1080px;
  position: relative;
  left: 0;
  transform: translateX(var(--sidebar-width));
}

/* Microsoft Edge 호환성을 위한 추가 스타일 */
@supports (-ms-ime-align: auto) {
  .sidebar {
    -ms-overflow-style: auto;
  }
  .markdown-section img {
    -ms-interpolation-mode: bicubic;
  }
}

/*=====Mobile=====*/
@media (max-width: 768px) {

  /* Fix: prevent headings being hidden under top nav */
  #app {
    margin-top: 70px !important;
  }
  .markdown-section {
    padding-top: 90px;
  }
  .markdown-section h1,
  .markdown-section h2,
  .markdown-section h3 {
    scroll-margin-top: 100px;
  }

  /* 1) Global layout */
  .content {
    left: 0;
    transform: none;
    margin-left: 0;
    max-width: 100%;
    margin-top: 40px !important;
    margin: 0 auto !important;
    padding: 0 6px;
    max-width: 100% !important;
  }
  .markdown-section {
    max-width: 100% !important;
    padding: 0 6px;
    padding-top: 70px;
    margin: 0 auto !important;
    box-sizing: border-box;
  }

  /* 2) Top nav */
  .top-nav { padding: 0 15px; }
  .top-nav .logo-image { height: 32px; max-width: 150px; }
  .top-nav .service-btn { padding: 8px 16px; font-size: 13px; }
  .top-nav .service-btn span { display: none; }
  .language-switcher { gap: 4px; margin: 0 10px; }
  .lang-btn { padding: 4px 8px; font-size: 12px; }

  /* 3) Sidebar : mobile drawer */
  .sidebar {
    position: fixed !important;
    top: 70px !important; /* align with top nav */
    left: 0 !important;
    width: min(80vw, 320px) !important;
    height: calc(100% - 70px) !important;
    overflow-y: auto;
    background-color: var(--bg-color);
    border-right: 1px solid var(--border-color);
    transform: translateX(-100%) !important;
    transition: transform .25s ease;
    z-index: 1100;
  }
  /* Default closed; open when body does NOT have .close (covers ready/sticky states) */
  body .sidebar { transform: translateX(-100%) !important; }
  body:not(.close) .sidebar,
  body.ready:not(.close) .sidebar,
  body.sticky:not(.close) .sidebar {
    transform: translateX(0) !important;
  }

  /* Prevent content from shifting when sidebar drawer opens */
  .content {
    margin-left: 0 !important;
    transform: none !important;
    left: 0 !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 6px;
  }
  body:not(.close) .content,
  body.ready:not(.close) .content,
  body.sticky:not(.close) .content {
    margin-left: 0 !important;
    transform: none !important;
    left: 0 !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 6px;
  }

  /* 3-b) Show the mobile drawer toggle */
  .sidebar-toggle,
  .sidebar-toggle-button {
    display: block !important;
  }
  .sidebar-toggle {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 1200;
  }

  .sidebar ul li ul { padding-left: .75em; }

  /* 4) Markdown headings scale */
  .markdown-section h1 { font-size: 1.7rem; }

  .markdown-section h2 {
    font-size: 1.4rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.3rem;
  }
  .markdown-section h3 { font-size: 1.3em; }

  /* 5) Search panel */
  .search .results-panel {
    width: 100% !important;
    right: 0 !important;
    left: 0 !important;
  }
  .search-active .content {
    margin-right: 0 !important;
  }
}

/* 반응형 비율 조정 */
@media screen and (max-width: 1600px) and (min-width: 1201px) {
  :root { --sidebar-width: 18%; }
}
@media screen and (max-width: 1440px) and (min-width: 1201px) {
  :root { --sidebar-width: 20%; }
}
@media screen and (max-width: 1200px) and (min-width: 993px) {
  :root { --sidebar-width: 22%; }
}

/* 769px ~ 992px 구간에서는 사이드바 숨김 */
@media screen and (max-width: 992px) and (min-width: 769px) {
  body .sidebar {
    display: none !important;
  }

  /* 모바일 전용 햄버거 버튼 스타일 */
  .sidebar-toggle.mobile-only {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
  }
/*
  .sidebar-toggle-button {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
  }

  .sidebar-toggle-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 3px 0;
    background-color: var(--text-color-primary);
    border-radius: 2px;
  }*/

}