/*
 Theme Name:   Hancom Blog
 Theme URI:    https://blog.hancom.com
 Description:  한컴 공식 블로그 - GeneratePress 자식 테마. 깔끔하고 프로페셔널한 기업 블로그 디자인.
 Author:       Hancom Inc.
 Author URI:   https://www.hancom.com
 Template:     generatepress
 Version:      1.3.12
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  hancom-blog
 Tags:         blog, corporate, korean, clean, minimal
*/

/* ========================================
   CSS Custom Properties
   ======================================== */
:root {
  /* Colors */
  --hancom-primary: #0066FF;
  --hancom-primary-dark: #0052CC;
  --hancom-primary-light: #3385FF;
  --hancom-primary-bg: #F0F6FF;
  --hancom-text: #1A1A1A;
  --hancom-text-secondary: #666666;
  --hancom-text-light: #999999;
  --hancom-border: #E5E5E5;
  --hancom-border-light: #F0F0F0;
  --hancom-bg: #FFFFFF;
  --hancom-bg-gray: #F8F9FA;
  --hancom-footer-bg: #202020;
  --hancom-footer-text: #CCCCCC;

  /* Typography */
  --hancom-font: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --hancom-line-height: 1.8;
  --hancom-letter-spacing: -0.02em;

  /* Spacing */
  --hancom-section-gap: 80px;
  --hancom-card-gap: 24px;
  --hancom-container-max: 1200px;
  --hancom-content-max: 800px;

  /* Radius */
  --hancom-radius: 0;
  --hancom-radius-lg: 0;

  /* Shadow */
  --hancom-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --hancom-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.1);

  /* Transition */
  --hancom-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Reset & Base
   ======================================== */
html {
  min-height: 100%;
}

body {
  font-family: var(--hancom-font);
  color: var(--hancom-text);
  letter-spacing: var(--hancom-letter-spacing);
  line-height: var(--hancom-line-height);
  background-color: var(--hancom-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#main-content {
  flex: 1 0 auto;
}

.hancom-footer {
  flex-shrink: 0;
  margin-top: auto;
}

/* GP 기본 스타일 오버라이드 */
.site-content {
  padding: 0 !important;
}

/* ========================================
   Header / GNB
   ======================================== */
.hancom-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--hancom-bg);
  border-bottom: 1px solid var(--hancom-border);
}

.hancom-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--hancom-container-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
}

.hancom-header__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--hancom-text);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.hancom-header__logo img {
  height: 30px;
  width: auto;
  display: block;
}

.hancom-header__logo span {
  color: var(--hancom-primary);
}

.hancom-header__nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.hancom-header__nav li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hancom-header__nav a {
  text-decoration: none;
  color: var(--hancom-text-secondary);
  font-size: 15px;
  font-weight: 500;
  transition: color var(--hancom-transition);
  position: relative;
}

.hancom-header__nav a:hover,
.hancom-header__nav a.current-menu-item,
.hancom-header__nav a.current-cat,
.hancom-header__nav .current-menu-item > a,
.hancom-header__nav .current-menu-ancestor > a,
.hancom-header__nav .current-menu-parent > a,
.hancom-header__nav .current_page_item > a,
.hancom-header__nav .current-cat > a,
.hancom-header__nav .current-cat-ancestor > a,
.hancom-header__nav li.current-menu-item a,
.hancom-header__nav li.current-menu-ancestor a {
  color: var(--hancom-primary);
  font-weight: 600;
}

.hancom-header__nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--hancom-primary);
  transition: width var(--hancom-transition);
}

.hancom-header__nav a:hover::after,
.hancom-header__nav a.current-menu-item::after,
.hancom-header__nav a.current-cat::after,
.hancom-header__nav .current-menu-item > a::after,
.hancom-header__nav .current-menu-ancestor > a::after,
.hancom-header__nav .current_page_item > a::after,
.hancom-header__nav .current-cat > a::after,
.hancom-header__nav .current-cat-ancestor > a::after {
  width: 100%;
}

.hancom-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.hancom-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 0;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--hancom-transition);
  cursor: pointer;
  border: none;
  font-family: var(--hancom-font);
}

/* Icon button (search, hamburger) */
.hancom-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  color: #202020;
  cursor: pointer;
  transition: color var(--hancom-transition);
  font-family: var(--hancom-font);
}

.hancom-icon-btn:hover,
.hancom-icon-btn:active,
.hancom-icon-btn:focus {
  color: var(--hancom-primary);
  background: transparent;
  outline: none;
}

.hancom-icon-btn svg {
  display: block;
}

.hancom-btn--primary {
  background: var(--hancom-primary);
  color: #fff;
}

.hancom-btn--primary:hover {
  background: var(--hancom-primary-dark);
  color: #fff;
}

/* GNB 한컴 홈페이지 버튼 (#202020) */
.hancom-header__actions .hancom-btn--primary {
  background: #202020;
  color: #fff;
}

.hancom-header__actions .hancom-btn--primary:hover {
  background: #333;
  color: #fff;
}

/* 검색 오버레이 검색 버튼 (#202020) */
.hancom-search-overlay__form .hancom-btn--primary {
  background: #202020;
  color: #fff;
}

.hancom-search-overlay__form .hancom-btn--primary:hover {
  background: #333;
  color: #fff;
}

.hancom-btn--ghost {
  background: transparent;
  color: var(--hancom-text-secondary);
  padding: 8px;
}

.hancom-btn--ghost:hover {
  color: var(--hancom-primary);
  background: var(--hancom-primary-bg);
}

.hancom-btn--outline {
  background: transparent;
  border: none;
  color: var(--hancom-text);
}

.hancom-btn--outline:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--hancom-primary);
}

/* Mobile Menu Toggle */
.hancom-header__mobile-toggle {
  display: none;
  background: transparent !important;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--hancom-text);
}

.hancom-header__mobile-toggle:hover,
.hancom-header__mobile-toggle:active,
.hancom-header__mobile-toggle:focus,
.hancom-header__mobile-toggle[aria-expanded="true"] {
  background: transparent !important;
  color: var(--hancom-primary);
  outline: none;
}

.hancom-header__mobile-toggle svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* Search Overlay */
.hancom-search-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
}

.hancom-search-overlay.is-active {
  display: flex;
}

.hancom-search-overlay__inner {
  background: var(--hancom-bg);
  border-radius: 0;
  padding: 32px;
  width: 100%;
  max-width: 640px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.hancom-search-overlay__form {
  display: flex;
  gap: 12px;
}

.hancom-search-overlay__input {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-bottom: 2px solid var(--hancom-border);
  border-radius: 0;
  font-size: 16px;
  font-family: var(--hancom-font);
  outline: none;
  transition: border-color var(--hancom-transition);
}

.hancom-search-overlay__input:focus {
  border-color: var(--hancom-primary);
}

.hancom-search-overlay__close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
}

/* ========================================
   Featured Post (홈 섹션 1)
   ======================================== */
.hancom-featured {
  max-width: var(--hancom-container-max);
  margin: 48px auto 0;
  padding: 0 24px;
}

.hancom-featured__link {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 40px;
  text-decoration: none;
  color: inherit;
  border-radius: 0;
  overflow: hidden;
  transition: transform var(--hancom-transition);
}

.hancom-featured__link:hover {
  transform: translateY(-2px);
}

.hancom-featured__link:hover .hancom-featured__image img {
  transform: scale(1.03);
}

.hancom-featured__image {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #1a1a1a;
}

.hancom-featured__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform var(--hancom-transition);
}

.hancom-featured__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 0;
}

.hancom-category-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--hancom-primary);
  margin-bottom: 12px;
  letter-spacing: 0;
}

.hancom-featured__title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 16px;
  color: var(--hancom-text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hancom-featured__excerpt {
  font-size: 15px;
  color: var(--hancom-text-secondary);
  line-height: 1.7;
  margin: 0 0 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hancom-featured__date {
  font-size: 13px;
  color: var(--hancom-text-light);
}

/* ========================================
   Post Card Grid
   ======================================== */
.hancom-section {
  max-width: var(--hancom-container-max);
  margin: 0 auto;
  padding: var(--hancom-section-gap) 24px;
}

.hancom-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.hancom-section__title {
  font-size: 24px;
  font-weight: 700;
  color: var(--hancom-text);
  margin: 0;
}

.hancom-section__more {
  font-size: 14px;
  color: var(--hancom-text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--hancom-transition);
}

.hancom-section__more:hover {
  color: var(--hancom-primary);
}

.hancom-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--hancom-card-gap);
}

.hancom-card {
  background: var(--hancom-bg);
  border-radius: 0;
  overflow: hidden;
  transition: transform var(--hancom-transition), box-shadow var(--hancom-transition);
  border: none;
}

.hancom-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--hancom-shadow-hover);
}

.hancom-card__link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.hancom-card__image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1a1a1a;
}

.hancom-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform var(--hancom-transition);
}

.hancom-card:hover .hancom-card__image img {
  transform: scale(1.05);
}

/* Placeholder for posts without thumbnail */
.hancom-card__image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--hancom-primary-bg) 0%, #E8F0FE 100%);
}

.hancom-card__image--placeholder svg {
  width: 48px;
  height: 48px;
  color: var(--hancom-primary-light);
  opacity: 0.5;
}

.hancom-card__body {
  padding: 20px;
}

.hancom-card__category {
  font-size: 12px;
  font-weight: 600;
  color: var(--hancom-primary);
  margin-bottom: 8px;
  display: block;
}

.hancom-card__title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 8px;
  color: var(--hancom-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hancom-card__excerpt {
  font-size: 14px;
  color: var(--hancom-text-secondary);
  line-height: 1.6;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hancom-card__date {
  font-size: 12px;
  color: var(--hancom-text-light);
}

/* ========================================
   Load More Button
   ======================================== */
.hancom-load-more-wrap {
  text-align: center;
  margin-top: 48px;
}

.hancom-load-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  border: none;
  border-radius: 0;
  background: var(--hancom-bg-gray);
  color: var(--hancom-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--hancom-transition);
  font-family: var(--hancom-font);
}

.hancom-load-more:hover {
  color: var(--hancom-primary);
  background: var(--hancom-primary-bg);
}

.hancom-load-more.is-loading {
  pointer-events: none;
  opacity: 0.6;
}

.hancom-load-more__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--hancom-border);
  border-top-color: var(--hancom-primary);
  border-radius: 50%;
  animation: hancom-spin 0.6s linear infinite;
}

.hancom-load-more.is-loading .hancom-load-more__spinner {
  display: block;
}

@keyframes hancom-spin {
  to { transform: rotate(360deg); }
}

/* ========================================
   Archive / Category Page
   ======================================== */
.hancom-archive-header {
  position: relative;
  background: linear-gradient(135deg, var(--hancom-primary) 0%, var(--hancom-primary-dark) 100%);
  padding: 60px 24px;
  text-align: center;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

/* 카테고리별 배경 이미지 적용 */
.hancom-archive-header--bg {
  background: #1a1a1a;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 300px;
  padding: 80px 24px;
  overflow: hidden;
}

.hancom-archive-header__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  pointer-events: none;
  z-index: 1;
}

.hancom-archive-header__inner {
  position: relative;
  z-index: 2;
  max-width: var(--hancom-container-max);
  width: 100%;
}

.hancom-archive-header__title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #fff;
}

.hancom-archive-header--bg .hancom-archive-header__title {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-shadow:
    0 4px 16px rgba(0, 0, 0, 0.7),
    0 2px 4px rgba(0, 0, 0, 0.6),
    0 0 2px rgba(0, 0, 0, 0.4);
}

.hancom-archive-header__desc {
  font-size: 15px;
  opacity: 0.9;
  margin: 0;
  color: #fff;
}

.hancom-archive-header--bg .hancom-archive-header__desc {
  font-size: 16px;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.7),
    0 1px 2px rgba(0, 0, 0, 0.5);
}

.hancom-filter-bar {
  max-width: var(--hancom-container-max);
  margin: 0 auto;
  padding: 24px 24px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hancom-filter-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 0;
  background: var(--hancom-bg-gray);
  color: var(--hancom-text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--hancom-transition);
  font-family: var(--hancom-font);
}

.hancom-filter-btn:hover,
.hancom-filter-btn.is-active {
  background: var(--hancom-primary);
  color: #fff;
}

/* ========================================
   Single Post
   ======================================== */
.hancom-single-header {
  max-width: var(--hancom-content-max);
  margin: 48px auto 0;
  padding: 0 24px;
  text-align: center;
}

.hancom-single-header__category {
  font-size: 14px;
  font-weight: 600;
  color: var(--hancom-primary);
  margin-bottom: 16px;
  display: inline-block;
}

.hancom-single-header__title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 20px;
  color: var(--hancom-text);
  word-break: keep-all;
}

.hancom-single-header__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 14px;
  color: var(--hancom-text-light);
  margin-bottom: 24px;
}

.hancom-single-header__meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hancom-share-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
}

.hancom-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 0;
  border: none;
  background: var(--hancom-bg-gray);
  color: var(--hancom-text-secondary);
  text-decoration: none;
  transition: all var(--hancom-transition);
  cursor: pointer;
}

.hancom-share-btn:hover {
  color: var(--hancom-primary);
  background: var(--hancom-primary-bg);
}

.hancom-share-btn svg {
  width: 16px;
  height: 16px;
}

/* Featured Image */
.hancom-single-featured {
  max-width: var(--hancom-container-max);
  margin: 0 auto 48px;
  padding: 0 24px;
}

.hancom-single-featured img {
  width: 100%;
  height: auto;
  border-radius: 0;
}

/* Content */
.hancom-single-content {
  max-width: var(--hancom-content-max);
  margin: 0 auto;
  padding: 0 24px;
}

.hancom-single-content h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 48px 0 16px;
  padding-top: 16px;
  color: var(--hancom-text);
}

.hancom-single-content h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 36px 0 12px;
  color: var(--hancom-text);
}

.hancom-single-content p {
  font-size: 16px;
  line-height: 1.85;
  margin: 0 0 24px;
  color: var(--hancom-text);
  word-break: keep-all;
}

.hancom-single-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0;
  margin: 24px 0;
}

.hancom-single-content blockquote {
  border-left: 3px solid var(--hancom-primary);
  margin: 32px 0;
  padding: 16px 24px;
  background: var(--hancom-primary-bg);
  border-radius: 0;
}

.hancom-single-content blockquote p {
  margin: 0;
  color: var(--hancom-text);
  font-size: 15px;
}

.hancom-single-content ul,
.hancom-single-content ol {
  margin: 0 0 24px;
  padding-left: 24px;
}

.hancom-single-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.hancom-single-content a {
  color: var(--hancom-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hancom-single-content a:hover {
  color: var(--hancom-primary-dark);
}

/* Related Product Link */
.hancom-related-product {
  max-width: var(--hancom-content-max);
  margin: 48px auto;
  padding: 32px;
  background: var(--hancom-bg-gray);
  border-radius: 0;
  border: none;
}

.hancom-related-product__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--hancom-text);
}

.hancom-related-product__text {
  font-size: 14px;
  color: var(--hancom-text-secondary);
  line-height: 1.7;
  margin: 0 0 16px;
}

.hancom-related-product__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hancom-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--hancom-primary-bg);
  color: var(--hancom-primary);
  border-radius: 0;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}

.hancom-tag:hover {
  background: var(--hancom-primary);
  color: #fff;
}

/* Related Posts */
.hancom-related-posts {
  max-width: var(--hancom-container-max);
  margin: 0 auto;
  padding: var(--hancom-section-gap) 24px;
  border-top: 1px solid var(--hancom-border-light);
}

.hancom-related-posts__title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 32px;
  color: var(--hancom-text);
}

/* ========================================
   Notice (404 등)
   ======================================== */
.hancom-notice {
  max-width: 560px;
  margin: 80px auto;
  padding: 0 24px;
  text-align: center;
}

.hancom-notice__icon {
  width: 64px;
  height: 64px;
  background: var(--hancom-primary-bg);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.hancom-notice__icon svg {
  width: 28px;
  height: 28px;
  color: var(--hancom-primary);
}

.hancom-notice__title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 12px;
}

.hancom-notice__desc {
  font-size: 15px;
  color: var(--hancom-text-secondary);
  line-height: 1.7;
  margin: 0 0 40px;
}

/* ========================================
   Footer
   ======================================== */
.hancom-footer {
  background: var(--hancom-footer-bg);
  color: var(--hancom-footer-text);
  padding: 48px 24px 32px;
}

.hancom-footer__inner {
  max-width: var(--hancom-container-max);
  margin: 0 auto;
}

.hancom-footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hancom-footer__logo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hancom-footer__logo-text {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.hancom-footer__logo img,
.hancom-footer__logo .hancom-footer__logo-img {
  height: 24px;
  width: auto;
  filter: brightness(0) invert(1);
}

.hancom-footer__logo .hancom-btn {
  font-size: 13px;
}

/* 푸터 한컴 제품 호버 메뉴 (드롭업) */
.hancom-product-menu {
  position: relative;
  display: inline-block;
}

.hancom-product-menu__trigger {
  color: #fff !important;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--hancom-font);
  transition: background var(--hancom-transition);
}

.hancom-product-menu__trigger:hover,
.hancom-product-menu:hover .hancom-product-menu__trigger,
.hancom-product-menu:focus-within .hancom-product-menu__trigger {
  background: rgba(255, 255, 255, 0.08);
  color: #fff !important;
}

.hancom-product-menu__trigger svg {
  transition: transform var(--hancom-transition);
}

.hancom-product-menu:hover .hancom-product-menu__trigger svg,
.hancom-product-menu:focus-within .hancom-product-menu__trigger svg {
  transform: rotate(180deg);
}

.hancom-product-menu__dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  min-width: 240px;
  background: #333;
  color: #fff;
  padding: 8px 0;
  margin-bottom: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--hancom-transition), transform var(--hancom-transition), visibility var(--hancom-transition);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 100;
}

.hancom-product-menu:hover .hancom-product-menu__dropdown,
.hancom-product-menu:focus-within .hancom-product-menu__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 호버 갭 제거용 가상 영역 */
.hancom-product-menu__dropdown::before {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

.hancom-product-menu__dropdown a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 20px;
  color: #ddd;
  text-decoration: none;
  font-size: 13px;
  transition: background var(--hancom-transition), color var(--hancom-transition);
}

.hancom-product-menu__dropdown a:hover {
  background: #444;
  color: #fff;
}

.hancom-product-menu__name {
  font-weight: 600;
  color: #fff;
  font-size: 14px;
}

.hancom-product-menu__url {
  color: #aaa;
  font-size: 12px;
}

.hancom-product-menu__dropdown a:hover .hancom-product-menu__url {
  color: #ddd;
}

.hancom-footer__links {
  display: flex;
  gap: 24px;
}

.hancom-footer__links a {
  color: var(--hancom-footer-text);
  text-decoration: none;
  font-size: 13px;
  transition: color var(--hancom-transition);
}

.hancom-footer__links a:hover {
  color: #fff;
}

.hancom-footer__links a.is-bold {
  font-weight: 700;
  color: #fff;
}

.hancom-footer__bottom {
  padding-top: 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

/* 사업자정보 */
.hancom-footer__company {
  padding-top: 24px;
  font-size: 12px;
  color: #999;
  line-height: 1.7;
}

.hancom-footer__company-name {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #bbb;
}

.hancom-footer__company-info {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.hancom-footer__company-info li {
  position: relative;
  margin: 0;
  padding: 0;
  font-size: 12px;
  color: #999;
}

.hancom-footer__company-info li:not(:last-child)::after {
  content: '|';
  margin-left: 12px;
  color: #555;
}

/* ========================================
   Pagination
   ======================================== */
.hancom-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 48px;
}

.hancom-pagination a,
.hancom-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 0;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--hancom-transition);
}

.hancom-pagination a {
  color: var(--hancom-text-secondary);
  border: none;
  background: var(--hancom-bg-gray);
}

.hancom-pagination a:hover {
  color: var(--hancom-primary);
  background: var(--hancom-primary-bg);
}

.hancom-pagination span.current {
  background: var(--hancom-primary);
  color: #fff;
  border: none;
}

/* ========================================
   Responsive
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --hancom-section-gap: 60px;
  }

  .hancom-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hancom-featured__link {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .hancom-featured__title {
    font-size: 24px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --hancom-section-gap: 48px;
    --hancom-card-gap: 16px;
  }

  .hancom-header__inner {
    height: 56px;
    padding: 0 16px;
  }

  .hancom-header__nav {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--hancom-bg);
    flex-direction: column;
    padding: 24px;
    gap: 0;
    z-index: 999;
    overflow-y: auto;
  }

  .hancom-header__nav.is-open {
    display: flex;
  }

  .hancom-header__nav a {
    display: block;
    padding: 15px 0;
    font-size: 16px;
    line-height: 1.4;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    border-bottom: none;
    width: 100%;
    color: var(--hancom-text);
  }

  .hancom-header__nav a::after {
    display: none;
  }

  .hancom-header__nav .current-menu-item > a,
  .hancom-header__nav .current-menu-ancestor > a,
  .hancom-header__nav .current_page_item > a,
  .hancom-header__nav .current-cat > a {
    color: var(--hancom-primary);
    font-weight: 600;
  }

  .hancom-header__mobile-toggle {
    display: inline-flex;
  }

  .hancom-header__actions .hancom-btn--primary {
    display: none;
  }

  .hancom-header__actions {
    gap: 4px;
  }

  .hancom-icon-btn {
    width: 40px;
    height: 40px;
  }

  .hancom-icon-btn:hover,
  .hancom-icon-btn:active {
    color: var(--hancom-primary);
  }

  /* Featured */
  .hancom-featured {
    margin-top: 24px;
    padding: 0 16px;
  }

  .hancom-featured__link {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hancom-featured__title {
    font-size: 22px;
  }

  .hancom-featured__content {
    padding: 0;
  }

  /* Sections */
  .hancom-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hancom-card-grid {
    grid-template-columns: 1fr;
  }

  /* Single */
  .hancom-single-header {
    margin-top: 24px;
    padding: 0 16px;
  }

  .hancom-single-header__title {
    font-size: 26px;
  }

  .hancom-single-featured {
    padding: 0 16px;
  }

  .hancom-single-content {
    padding: 0 16px;
  }

  .hancom-single-content h2 {
    font-size: 20px;
  }

  .hancom-single-content p {
    font-size: 15px;
  }

  /* Archive */
  .hancom-archive-header {
    padding: 40px 16px;
    min-height: 180px;
  }

  .hancom-archive-header--bg {
    min-height: 200px;
    padding: 48px 16px;
  }

  .hancom-archive-header__title {
    font-size: 24px;
  }

  .hancom-archive-header--bg .hancom-archive-header__title {
    font-size: 30px;
  }

  .hancom-archive-header--bg .hancom-archive-header__desc {
    font-size: 14px;
  }

  /* Notice */
  .hancom-notice {
    margin: 48px auto;
    padding: 0 16px;
  }

  .hancom-notice__title {
    font-size: 24px;
  }

  /* Footer - 모바일에서도 데스크탑과 동일한 row 레이아웃 */
  .hancom-footer {
    padding: 32px 16px 24px;
  }

  .hancom-footer__top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    text-align: left;
    flex-wrap: wrap;
  }

  .hancom-footer__logo {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  .hancom-footer__logo img,
  .hancom-footer__logo .hancom-footer__logo-img {
    height: 20px;
  }

  .hancom-footer__logo .hancom-btn,
  .hancom-product-menu__trigger {
    font-size: 11px;
    padding: 6px 10px;
  }

  .hancom-footer__links {
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 16px;
  }

  .hancom-footer__links a {
    font-size: 11px;
  }

  .hancom-footer__bottom {
    font-size: 11px;
  }

  /* 사업자정보 모바일: 세로 스택 */
  .hancom-footer__company {
    padding-top: 20px;
    font-size: 11px;
  }

  .hancom-footer__company-name {
    font-size: 12px;
  }

  .hancom-footer__company-info {
    flex-direction: column;
    gap: 2px;
  }

  .hancom-footer__company-info li {
    font-size: 11px;
  }

  .hancom-footer__company-info li:not(:last-child)::after {
    content: '';
    margin: 0;
  }

  /* 모바일 한컴 제품 메뉴: 드롭업 위치 조정 */
  .hancom-product-menu__dropdown {
    min-width: 200px;
    left: 0;
  }

  /* Related Posts */
  .hancom-related-posts {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ========================================
   Utility
   ======================================== */
.hancom-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Toast notification for copy link */
.hancom-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--hancom-text);
  color: #fff;
  padding: 12px 24px;
  border-radius: 0;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  transition: transform 0.3s ease;
  pointer-events: none;
}

.hancom-toast.is-visible {
  transform: translateX(-50%) translateY(0);
}

/* ========================================
   Modal (이용약관 등)
   ======================================== */
.hancom-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.hancom-modal[hidden] {
  display: none;
}

.hancom-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.hancom-modal__box {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.hancom-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--hancom-border-light);
  flex-shrink: 0;
}

.hancom-modal__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--hancom-text);
}

.hancom-modal__close {
  background: transparent;
  border: none;
  color: var(--hancom-text-secondary);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--hancom-transition);
}

.hancom-modal__close:hover {
  color: var(--hancom-primary);
}

.hancom-modal__body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  font-size: 14px;
  line-height: 1.7;
  color: var(--hancom-text);
}

.hancom-modal__body h2,
.hancom-modal__body h3,
.hancom-modal__body h4 {
  margin-top: 24px;
  margin-bottom: 12px;
  font-weight: 700;
  color: var(--hancom-text);
}

.hancom-modal__body h2 { font-size: 18px; }
.hancom-modal__body h3 { font-size: 16px; }
.hancom-modal__body h4 { font-size: 15px; }

.hancom-modal__body p {
  margin: 0 0 12px;
}

.hancom-modal__body ul,
.hancom-modal__body ol {
  margin: 0 0 12px;
  padding-left: 20px;
}

body.hancom-modal-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .hancom-modal {
    padding: 12px;
  }
  .hancom-modal__box {
    max-height: 92vh;
  }
  .hancom-modal__header {
    padding: 16px 20px;
  }
  .hancom-modal__title {
    font-size: 17px;
  }
  .hancom-modal__body {
    padding: 20px;
    font-size: 13px;
  }
}

/* ============================================================
   Single Post — 본문 폭 / 헤딩 위계 / 표 스타일 (v1.3.5)
   운영 클래스 매핑: .entry-content → .hancom-single-content,
                    .post-thumbnail → .hancom-single-featured
   ============================================================ */

/* 1. 본문 폭 정렬 + 썸네일 크기 제어 */
.single-post .hancom-single-content,
.single-post .hancom-single-featured {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.single-post .hancom-single-featured img,
.single-post .hancom-single-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.single-post .hancom-single-content img {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 6px;
}

.single-post .hancom-single-featured img {
  border-radius: 6px;
}

/* 썸네일 원본 비율 유지 안전망 (v1.3.6) — base의 강제 21/9 cover 무력화 */
.single-post .hancom-single-featured,
.single-post .hancom-single-featured img {
  aspect-ratio: auto !important;
  height: auto !important;
  max-height: none !important;
}

.single-post .hancom-single-featured {
  overflow: visible;
}

.single-post .hancom-single-featured img {
  width: 100%;
  object-fit: contain !important;
  object-position: center;
}

/* 2. 본문 헤딩 H1~H4 위계 정리
       H1: 큼지막한 메인 타이틀
       H2: 하단 한컴 파랑 보더 (큰 섹션 구분)
       H3: 좌측 한컴 파랑 액센트 바 (중간 섹션)
       H4: 작은 사이즈 + 한컴 파랑 컬러 (소제목) */
.single-post .hancom-single-content h1 {
  font-size: 2.25rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 3rem 0 1.25rem;
  color: var(--hancom-text);
}

.single-post .hancom-single-content h2 {
  font-size: 1.75rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 3rem 0 1.25rem;
  padding-top: 0;
  padding-bottom: 0.625rem;
  border-bottom: 2px solid #FC5E1F;
  color: var(--hancom-text);
}

.single-post .hancom-single-content h3 {
  font-size: 1.375rem;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 2.25rem 0 1rem;
  padding-left: 0.75rem;
  border-left: 4px solid #FC5E1F;
  color: var(--hancom-text);
}

.single-post .hancom-single-content h4 {
  font-size: 1.125rem;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 1.75rem 0 0.625rem;
  color: #FC5E1F;
}

.single-post .hancom-single-content p,
.single-post .hancom-single-content li {
  font-size: 1rem;
  line-height: 1.75;
}

/* 3. 본문 표 스타일 (어두운 헤더 + 흰 글씨)
       <thead> 또는 첫 행을 자동으로 다크 헤더 처리 (블록 에디터 헤더 토글 미사용 표 대응) */
.single-post .hancom-single-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.75rem 0;
  font-size: 0.95rem;
  background: #fff;
  border: 1px solid #888;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* 헤더: 다크 + 흰 글씨, 셀 사이는 회색 구분선, 외곽은 wrapper border가 처리 */
.single-post .hancom-single-content table thead th,
.single-post .hancom-single-content table tr:first-child th,
.single-post .hancom-single-content table tr:first-child td {
  background-color: #1a1a1a;
  color: #fff;
  font-weight: 700;
  padding: 14px 16px;
  text-align: left;
  border: none;
  border-right: 1px solid #888;
  border-bottom: 1px solid #888;
  letter-spacing: -0.01em;
  transition: background-color 0.2s ease;
}
.single-post .hancom-single-content table thead th:last-child,
.single-post .hancom-single-content table tr:first-child th:last-child,
.single-post .hancom-single-content table tr:first-child td:last-child {
  border-right: none;
}

/* 본문 셀: 우측·하단만 구분선, 마지막 열·마지막 행은 wrapper border가 처리 */
.single-post .hancom-single-content table td,
.single-post .hancom-single-content table tbody th {
  padding: 12px 16px;
  border: none;
  border-right: 1px solid #888;
  border-bottom: 1px solid #888;
  color: #333;
  vertical-align: middle;
  line-height: 1.6;
}
.single-post .hancom-single-content table td:last-child,
.single-post .hancom-single-content table tbody th:last-child {
  border-right: none;
}
.single-post .hancom-single-content table tbody tr:last-child td,
.single-post .hancom-single-content table tbody tr:last-child th {
  border-bottom: none;
}

.single-post .hancom-single-content table tbody tr:nth-child(even) td {
  background-color: #fafafa;
}

.single-post .hancom-single-content table tbody tr:hover td {
  background-color: #f0f0f0;
  transition: background-color 0.2s ease;
}

/* 헤더 호버: 다크 톤이 살짝 연해지는 정도 */
.single-post .hancom-single-content table thead tr:hover th,
.single-post .hancom-single-content table tr:first-child:hover th,
.single-post .hancom-single-content table tr:first-child:hover td {
  background-color: #2a2a2a;
}

/* 4. 모바일 대응 (표) */
@media (max-width: 640px) {
  .single-post .hancom-single-content table {
    font-size: 0.875rem;
  }
  .single-post .hancom-single-content table td,
  .single-post .hancom-single-content table th {
    padding: 10px 12px;
  }
}

/* ============================================
   다국어 언어 스위처 (헤더 우측)
   ============================================ */
.hancom-lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 16px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}

.hancom-lang-switcher .lang-item {
    color: #666;
    text-decoration: none;
    padding: 4px 6px;
    transition: color 0.2s ease;
    letter-spacing: 0.02em;
}

.hancom-lang-switcher .lang-item.active {
    color: #FC5E1F;
}

.hancom-lang-switcher .lang-item:hover:not(.active) {
    color: #FC5E1F;
}

.hancom-lang-switcher .lang-divider {
    color: #ccc;
    user-select: none;
    font-weight: 400;
}

@media (max-width: 768px) {
    .hancom-lang-switcher {
        margin-right: 8px;
        font-size: 13px;
    }
    .hancom-lang-switcher .lang-item {
        padding: 4px;
    }
}
