/*
Theme Name: Flex Responsive Theme
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: 반응형 레이아웃 테마 - 레이아웃 옵션 커스터마이징 가능
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: flex-responsive
Domain Path: /languages
*/

/* ==========================================
   RESET & VARIABLES
   ========================================== */

/* 폰트 임포트 - 나눔고딕 우선, Noto Sans KR 대체 */
@import url('https://fonts.googleapis.com/css2?family=Nanum+Gothic:wght@400;700&family=Noto+Sans+KR:wght@400;700&display=swap');

:root {
  /* 기본 색상 - 라이트 모드 */
  --color-primary: #333333;
  --color-secondary: #666666;
  --color-accent: #0066cc;
  --color-background: #ffffff;
  --color-border: #e0e0e0;
  --color-text: #333333;

  /* 기본 간격 */
  --spacing-xs: 5px;
  --spacing-sm: 10px;
  --spacing-md: 15px;
  --spacing-lg: 20px;
  --spacing-xl: 30px;

  /* 기본 치수 (동적으로 업데이트됨) */
  --header-height: 60px;
  --banner-height: 120px;
  --sidebar-width: 250px;
  --sidebar-bg-color: #f5f5f5;
  --sidebar-border-color: #e0e0e0;
  --footer-height: 80px;

  /* 헤더 레이아웃 */
  --header-max-width: 1200px;
  --header-justify-content: center;
  --header-mobile-padding: 10px;

  /* 배너 레이아웃 */
  --banner-max-width: 1200px;
  --banner-text-position: 50;

  /* 헤더 타이포그래피 */
  --site-name-font-size: 24px;

  /* 메뉴 색상 */
  --menu-hover-color: #0066cc;
  --menu-active-color: #0066cc;
  --menu-active-text-color: #ffffff;
  --menu-hover-opacity: 0.1;
  --menu-border-width: 3px;
  --menu-hover-padding-offset: 3px;

  /* 우측 외곽선 */
  --layout-right-border-color: #cccccc;
  --layout-right-border-width: 1px;

  /* 타이포그래피 - 나눔고딕 */
  --font-primary: 'Nanum Gothic', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.6;

  /* 댓글 폼 색상 - 라이트모드 */
  --comment-form-bg: #efefef;
  --comment-password-bg: #fff;
  --comment-password-border: #ddd;
  --comment-privacy-bg: #e7f3ff;
}

/* 다크 모드 */
html[data-theme="dark"] {
  --color-primary: #1a1a1a;
  --color-secondary: #888888;
  --color-accent: #4d94ff;
  --color-background: #121212;
  --color-border: #333333;
  --color-text: #e0e0e0;
  --sidebar-bg-color: #1e1e1e;
  --sidebar-border-color: #333333;

  /* 댓글 폼 다크모드 */
  --comment-form-bg: #2a2a2a;
  --comment-password-bg: #3a3a3a;
  --comment-password-border: #555;
  --comment-privacy-bg: #2a3545;
}

/* 다크모드 사이드바 */
[data-theme="dark"] .site-sidebar {
  background-color: var(--sidebar-bg-color, #1e1e1e) !important;
  color: var(--color-text);
  border-color: var(--sidebar-border-color, #333333) !important;
}

[data-theme="dark"] .site-sidebar a {
  color: var(--color-text);
}

[data-theme="dark"] .site-sidebar a:hover {
  color: var(--color-accent);
}

/* 다크모드 메인 콘텐츠 영역 */
[data-theme="dark"] .site-main,
[data-theme="dark"] .content-wrapper,
[data-theme="dark"] #page {
  background-color: var(--color-background) !important;
  color: var(--color-text) !important;
}

/* 다크모드 게시글 콘텐츠 */
[data-theme="dark"] article,
[data-theme="dark"] .hentry,
[data-theme="dark"] .post,
[data-theme="dark"] .page {
  background-color: transparent;
  color: var(--color-text);
}

/* 다크모드 게시글 제목 */
[data-theme="dark"] .entry-title,
[data-theme="dark"] .entry-title a,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
  color: var(--color-text) !important;
}

/* 다크모드 본문 텍스트 */
[data-theme="dark"] .entry-content,
[data-theme="dark"] .entry-content p,
[data-theme="dark"] .entry-content li,
[data-theme="dark"] .entry-content span,
[data-theme="dark"] .entry-content div {
  color: var(--color-text) !important;
}

/* 다크모드 링크 */
[data-theme="dark"] .entry-content a {
  color: var(--color-accent);
}

/* 테이블 기본 스타일 */
table,
.entry-content table,
.wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--spacing-md) 0;
}

table th,
table td,
.entry-content table th,
.entry-content table td,
.wp-block-table th,
.wp-block-table td {
  padding: 12px 8px;
  border: 1px solid var(--color-border, #ddd);
  text-align: left;
  vertical-align: middle;
}

table th,
.entry-content table th,
.wp-block-table th {
  background-color: #f5f5f5;
  font-weight: 600;
}

table tr:nth-child(even),
.entry-content table tr:nth-child(even),
.wp-block-table tr:nth-child(even) {
  background-color: #fafafa;
}

/* 다크모드 테이블 */
[data-theme="dark"] table,
[data-theme="dark"] .entry-content table,
[data-theme="dark"] .wp-block-table table {
  background-color: #1a1a1a !important;
  border-color: #444 !important;
  color: var(--color-text) !important;
}

[data-theme="dark"] table th,
[data-theme="dark"] table td,
[data-theme="dark"] .entry-content table th,
[data-theme="dark"] .entry-content table td,
[data-theme="dark"] .wp-block-table th,
[data-theme="dark"] .wp-block-table td {
  border-color: #444 !important;
  color: var(--color-text) !important;
  background-color: transparent !important;
}

[data-theme="dark"] table th,
[data-theme="dark"] .entry-content table th,
[data-theme="dark"] .wp-block-table th {
  background-color: #2a2a2a !important;
}

[data-theme="dark"] table tr:nth-child(even),
[data-theme="dark"] .entry-content table tr:nth-child(even),
[data-theme="dark"] .wp-block-table tr:nth-child(even) {
  background-color: #222 !important;
}

[data-theme="dark"] table tr:nth-child(odd),
[data-theme="dark"] .entry-content table tr:nth-child(odd),
[data-theme="dark"] .wp-block-table tr:nth-child(odd) {
  background-color: #1a1a1a !important;
}

[data-theme="dark"] table caption {
  color: var(--color-text) !important;
}

/* 다크모드 인용문 */
[data-theme="dark"] blockquote {
  background-color: #1e1e1e;
  border-left-color: var(--color-accent);
  color: var(--color-text);
}

/* 다크모드 코드 블록 */
[data-theme="dark"] pre,
[data-theme="dark"] code {
  background-color: #1e1e1e;
  color: #e0e0e0;
  border-color: #444;
}

/* 다크모드 입력 필드 */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background-color: #2a2a2a !important;
  color: #e0e0e0 !important;
  border-color: #444 !important;
}

/* 다크모드 버튼 */
[data-theme="dark"] button,
[data-theme="dark"] input[type="submit"],
[data-theme="dark"] input[type="button"] {
  background-color: #333;
  color: #e0e0e0;
  border-color: #555;
}

/* 다크모드 배너 */
[data-theme="dark"] .banner {
  background: #1a1a1a;
}

/* 워드프레스 구매하기 버튼 - 프리미엄 적색 스타일 */
.wp-block-button__link {
  background: linear-gradient(135deg, #8b1a1a 0%, #c0392b 50%, #a83232 100%);
  color: #ffffff !important;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none !important;
  display: inline-block;
  cursor: pointer;
  box-shadow:
    0 4px 15px rgba(139, 26, 26, 0.4),
    0 2px 6px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wp-block-button__link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.2),
      transparent);
  transition: left 0.5s ease;
}

.wp-block-button__link:hover {
  background: linear-gradient(135deg, #a82828 0%, #e74c3c 50%, #c0392b 100%);
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 8px 25px rgba(139, 26, 26, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: #ffffff !important;
}

.wp-block-button__link:hover::before {
  left: 100%;
}

.wp-block-button__link:active {
  transform: translateY(-1px) scale(1.01);
  box-shadow:
    0 4px 15px rgba(139, 26, 26, 0.4),
    0 2px 6px rgba(0, 0, 0, 0.2);
}

/* 다크모드에서 블록 버튼 */
[data-theme="dark"] .wp-block-button__link {
  box-shadow:
    0 4px 20px rgba(139, 26, 26, 0.6),
    0 2px 8px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .wp-block-button__link:hover {
  box-shadow:
    0 8px 30px rgba(231, 76, 60, 0.6),
    0 4px 15px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* 다크모드 그리드/카드 */
[data-theme="dark"] .grid-post-card,
[data-theme="dark"] .post-grid-item,
[data-theme="dark"] .grid-post-content {
  background-color: #1e1e1e;
  color: var(--color-text);
  border: 1px solid #444;
  border-radius: 8px;
}

[data-theme="dark"] .grid-post-card,
[data-theme="dark"] .post-grid-item {
  overflow: hidden;
}

[data-theme="dark"] .grid-post-wrapper {
  background-color: #1e1e1e !important;
  border-color: #444 !important;
}

[data-theme="dark"] .grid-post-image,
[data-theme="dark"] .grid-post-card img,
[data-theme="dark"] .post-grid-item .grid-post-image img {
  border-bottom: 1px solid #444;
}

/* 다크모드 카드 내 텍스트 영역 */
[data-theme="dark"] .grid-post-content,
[data-theme="dark"] .post-grid-item .grid-post-content,
[data-theme="dark"] .grid-post-wrapper .grid-post-content {
  border-top: 1px solid #444 !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom: none !important;
  padding: 15px;
  background-color: #1a1a1a !important;
  border-radius: 0;
}

[data-theme="dark"] .grid-post-content .entry-title,
[data-theme="dark"] .post-grid-item .grid-post-content .entry-title {
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid #444 !important;
}

[data-theme="dark"] .grid-post-content .entry-title a,
[data-theme="dark"] .post-grid-item .grid-post-content .entry-title a {
  color: var(--color-text) !important;
}

[data-theme="dark"] .grid-post-content .entry-meta,
[data-theme="dark"] .grid-post-content .entry-excerpt,
[data-theme="dark"] .post-grid-item .grid-post-content .entry-excerpt {
  color: #aaa !important;
}

[data-theme="dark"] .grid-post-content .entry-excerpt a,
[data-theme="dark"] .post-grid-item .grid-post-content .entry-excerpt a {
  color: #aaa !important;
}

/* 다크모드 일반 카드/아이템 외곽선 */
[data-theme="dark"] article.post,
[data-theme="dark"] article.page,
[data-theme="dark"] .hentry {
  border: 1px solid #444;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

/* 다크모드 카테고리 리스트 아이템 */
[data-theme="dark"] .post-list-item {
  background-color: #1e1e1e;
  border: 1px solid #444;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

[data-theme="dark"] .list-post-wrapper {
  display: flex;
  gap: 15px;
}

[data-theme="dark"] .list-post-image {
  border-right: 1px solid #444;
}

[data-theme="dark"] .list-post-image img {
  border-radius: 0;
}

[data-theme="dark"] .list-post-content {
  padding: 15px;
  background-color: #1a1a1a;
}

[data-theme="dark"] .list-post-content .entry-title {
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid #444;
}

[data-theme="dark"] .list-post-content .entry-title a {
  color: var(--color-text);
}

[data-theme="dark"] .list-post-content .entry-excerpt {
  color: #aaa;
}

[data-theme="dark"] .list-post-content .entry-excerpt a {
  color: #aaa !important;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background-color: var(--color-background);
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  max-width: 100vw;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: var(--spacing-lg) 0 var(--spacing-md) 0;
  font-weight: 600;
  line-height: 1.3;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.1rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin: 0 0 var(--spacing-md) 0;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  opacity: 0.8;
}

/* ==========================================
   LAYOUT STRUCTURE
   ========================================== */

/* 전체 페이지 컨테이너 */
.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 헤더 섹션 */
.site-header {
  background-color: var(--color-primary);
  color: white;
  padding: 0 var(--spacing-md);
  height: var(--header-height);
  width: 100%;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 100;
  flex-shrink: 0;
  box-sizing: border-box;
}

/* 헤더 내부 컨테이너 */
.site-header__container {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: var(--spacing-md);
  width: 100%;
  height: 100%;
  max-width: var(--header-max-width, 1200px);
  margin: 0 auto;
}

/* 헤더 요소 배치 */
.site-header__container .site-logo {
  grid-column: 1;
}

.site-header__container .site-search {
  grid-column: 2;
  justify-self: center;
}

.site-header__container .primary-navigation {
  grid-column: 3;
}

.site-header__container .menu-toggle {
  grid-column: 4;
}

.site-header--hidden {
  display: none;
}

/* 로고 */
.site-logo {
  font-size: var(--site-name-font-size, 24px);
  font-weight: bold;
  margin: 0;
  flex-shrink: 0;
  flex-grow: 0;
}

.site-logo a {
  color: white;
  display: flex;
  align-items: center;
}

/* 검색창 */
.site-search {
  flex: 0 0 auto;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 280px;
}

.site-search form {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  margin: 0;
  padding: 0;
}

.site-search form input,
.site-search form button {
  margin: 0;
  padding: 0;
  font-family: inherit;
}

.site-search .search-field {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 3px 0 0 3px;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  min-width: 150px;
  height: 34px;
  box-sizing: border-box;
}

.site-search .search-field::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.site-search .search-field:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
}

.site-search .search-submit {
  padding: 6px 12px;
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-left: none;
  border-radius: 0 3px 3px 0;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  height: 34px;
  box-sizing: border-box;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.site-search .search-submit:hover {
  background-color: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
}

/* 메인 콘텐츠 영역 */
.site-body {
  display: flex;
  flex: 1;
}

/* 배너 섹션 */
.banner {
  width: 100%;
  height: var(--banner-height);
  background-color: var(--banner-bg-color, #667eea);
  background-size: var(--banner-bg-size, cover);
  background-position: var(--banner-bg-position, center);
  background-repeat: no-repeat;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  text-align: center;
  padding: var(--spacing-lg);
  flex-shrink: 0;
  position: relative;
}

/* 배너 컨테이너 */
.banner__container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: var(--banner-max-width, 1200px);
  margin: 0 auto;
}

/* 배너 텍스트 컨테이너 */
.banner-content {
  z-index: 2;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  /* 동적 위치 설정은 인라인 CSS에서 처리됨 */
  /* position, left, transform, width 등은 동적으로 생성 */
}

.banner-title {
  margin: 0 0 10px 0;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
}

.banner-subtitle {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 400;
  opacity: 0.9;
  line-height: 1.5;
}

.banner--hidden {
  display: none;
}

/* 메인 콘텐츠 + 사이드바 래퍼 */
.content-wrapper {
  display: flex;
  flex: 1;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  flex-wrap: nowrap !important;
  flex-direction: row;
  align-items: flex-start;
}

/* 사이드바 우측 배치 */
.sidebar-right {
  flex-direction: row-reverse;
}

/* 소메뉴 + 메인 콘텐츠 컬럼 */
.content-column {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0 !important;
  max-width: 100%;
  min-height: 0;
  overflow: hidden;
  width: 100%;
}

/* 사이드바 */
.site-sidebar {
  width: var(--sidebar-width);
  background-color: #f5f5f5;
  padding: var(--spacing-lg);
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  overflow-y: auto;
  flex-shrink: 0;
}

/* 사이드바 우측 배치 */
.sidebar-right .site-sidebar {
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
}

.site-sidebar--hidden {
  display: none;
}

.site-sidebar {
  min-width: var(--sidebar-width);
}

.sidebar--empty {
  display: none;
}

/* 메인 콘텐츠 */
.site-main {
  flex: 1;
  /* padding은 functions.php에서 커스터마이저 설정으로 동적 생성됨 */
  min-width: 0 !important;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  border-right: var(--layout-right-border-width, 1px) solid var(--layout-right-border-color, #cccccc);
  overflow-x: auto;
  word-wrap: break-word;
  overflow-wrap: break-word;
  box-sizing: border-box !important;
}

/* ==========================================
   POST LAYOUTS - Featured & Grid
   ========================================== */

/* ==========================================
   HOMEPAGE FEATURED SECTION
   ========================================== */

.homepage-featured-section {
  width: 100%;
  margin-bottom: var(--spacing-xl);
  grid-column: 1 / -1;
  /* 그리드 전체 너비 차지 */
}

/* 홈페이지 그리드 섹션도 전체 너비 */
.homepage-grid-section {
  width: 100%;
  margin-bottom: var(--spacing-xl);
  grid-column: 1 / -1;
  /* 그리드 전체 너비 차지 */
}

.homepage-grid-section .section-title {
  margin: 0 0 var(--spacing-lg) 0;
  font-size: 1.5rem;
  font-weight: 600;
  padding-bottom: var(--spacing-sm);
  border-bottom: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.homepage-grid-section .section-title::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 32px;
  background-image: url('https://hsbox3.mycafe24.com/wp-content/uploads/2026/02/t_img.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}

/* 홈페이지 카테고리 오버뷰 타이틀 아이콘 */
.homepage-category-overview .section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.homepage-category-overview .section-title::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 32px;
  background-image: url('https://hsbox3.mycafe24.com/wp-content/uploads/2026/02/t_img.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}

/* 다크모드 섹션 타이틀 아이콘 */
[data-theme="dark"] .homepage-grid-section .section-title::before,
[data-theme="dark"] .homepage-category-overview .section-title::before {
  background-image: url('https://hsbox3.mycafe24.com/wp-content/uploads/2026/02/tw_img.png');
}

/* 싱글 게시글/페이지 타이틀 아이콘 */
.single .entry-title,
.page .entry-title {
  display: flex;
  align-items: center;
  gap: 15px;
}

.single .entry-title::before,
.page .entry-title::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 32px;
  background-image: url('https://hsbox3.mycafe24.com/wp-content/uploads/2026/02/t_img.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}

/* 다크모드 게시글/페이지 타이틀 아이콘 */
[data-theme="dark"] .single .entry-title::before,
[data-theme="dark"] .page .entry-title::before {
  background-image: url('https://hsbox3.mycafe24.com/wp-content/uploads/2026/02/tw_img.png');
}

.homepage-category-overview {
  width: 100%;
  grid-column: 1 / -1;
  /* 그리드 전체 너비 차지 */
  margin-bottom: var(--spacing-lg);
}

/* 상단 피처드 영역: 좌측 큰 이미지 + 우측 그리드 */
.featured-top-row {
  display: flex;
  flex-direction: row;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  min-height: 500px;
  align-items: stretch;
}

/* 좌측 큰 이미지 카드 - 이미지와 텍스트 분리 */
.featured-card--large {
  flex: 0.8;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background: #fff;
  border: 1px solid var(--color-border, #e0e0e0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-width: 350px;
}

.featured-card--large .featured-card__link {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.featured-card--large .featured-card__image {
  width: 100%;
  height: 350px;
  overflow: hidden;
}

.featured-card--large .featured-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.featured-card--large .featured-card__content {
  flex: 1;
  padding: 24px 28px 28px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 140px;
}

.featured-card--large .featured-card__title {
  font-size: 24px;
  margin: 0 0 14px 0;
  color: var(--color-primary, #333);
  line-height: 1.35;
  font-weight: 700;
}

.featured-card--large:hover .featured-card__title {
  color: var(--color-primary, #333);
}

.featured-card--large .featured-card__excerpt {
  font-size: 15px;
  margin: 0;
  color: #555;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 10;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-card--large:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 우측 그리드 - 기본 3x2 (가로 3개, 세로 2개 = 6개) */
.featured-side-grid {
  flex: 1.5;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: var(--spacing-md);
  align-items: stretch;
}

.featured-side-grid.columns-2 {
  flex: 1.2;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

/* 3열 그리드 (3x2 = 6개) */
.featured-side-grid.columns-3 {
  flex: 1.5;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

/* 4열 그리드 (4x2 = 8개) */
.featured-side-grid.columns-4 {
  flex: 2;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

/* 작은 카드 (우측 그리드) - 이미지 아래에 텍스트 (세로 배열) */
.featured-card--small {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  height: 100%;
  background: #fff;
  border: 1px solid var(--color-border, #e0e0e0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-card--small .featured-card__link {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.featured-card--small .featured-card__image {
  width: 100%;
  flex: 1;
  min-height: 0;
  max-height: 200px;
  overflow: hidden;
}

.featured-card--small .featured-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.featured-card--small .featured-card__content {
  padding: 20px var(--spacing-md) 24px;
  background: #fff;
  border-top: 1px solid #eee;
}

.featured-card--small .featured-card__title {
  font-size: 17px;
  margin: 0 0 var(--spacing-sm) 0;
  color: var(--color-primary, #333);
  line-height: 1.35;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-card--small:hover .featured-card__title {
  color: var(--color-primary, #333);
}

.featured-card--small .featured-card__excerpt {
  font-size: 15px;
  margin: 0;
  color: #666;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-card--small:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 하단 가로 줄 - 5개 고정 */
.featured-bottom-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--spacing-md);
}

/* 그리드 카드 (하단) - 이미지 아래에 텍스트 */
.featured-card--grid {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-card--grid .featured-card__link {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.featured-card--grid .featured-card__image {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.featured-card--grid .featured-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.featured-card--grid .featured-card__content {
  padding: var(--spacing-sm) var(--spacing-md);
  background: #fff;
  border-top: 1px solid #eee;
}

.featured-card--grid .featured-card__title {
  font-size: 15px;
  margin: 0 0 var(--spacing-sm) 0;
  color: var(--color-primary, #333);
  line-height: 1.3;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-card--grid:hover .featured-card__title {
  color: var(--color-primary, #333);
}

.featured-card--grid:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.featured-card--grid .featured-card__excerpt {
  font-size: 14px;
  margin: 0;
  color: #666;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 다크모드 지원 */
[data-theme="dark"] .featured-card--large,
[data-theme="dark"] .featured-card--small,
[data-theme="dark"] .featured-card--grid {
  background: #1e1e1e;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--color-border, #333);
}

[data-theme="dark"] .featured-card--large .featured-card__content,
[data-theme="dark"] .featured-card--small .featured-card__content,
[data-theme="dark"] .featured-card--grid .featured-card__content {
  background: #1e1e1e;
  border-top-color: #333;
}

[data-theme="dark"] .featured-card--large .featured-card__title,
[data-theme="dark"] .featured-card--small .featured-card__title,
[data-theme="dark"] .featured-card--grid .featured-card__title {
  color: var(--color-text, #e0e0e0);
}

[data-theme="dark"] .featured-card--large:hover .featured-card__title,
[data-theme="dark"] .featured-card--small:hover .featured-card__title,
[data-theme="dark"] .featured-card--grid:hover .featured-card__title {
  color: var(--color-accent, #4d94ff);
}

[data-theme="dark"] .featured-card--large .featured-card__excerpt,
[data-theme="dark"] .featured-card--small .featured-card__excerpt,
[data-theme="dark"] .featured-card--grid .featured-card__excerpt {
  color: #aaa;
}

/* 반응형 - 태블릿 (1024px 이하) */
@media (max-width: 1024px) {
  .featured-card--large {
    min-height: 350px;
  }

  .featured-card--small {
    min-height: 165px;
  }

  .featured-side-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .featured-bottom-row {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* 반응형 - 작은 태블릿 (900px 이하) */
@media (max-width: 900px) {
  .featured-top-row {
    flex-direction: column;
    min-height: auto;
  }

  .featured-card--large {
    flex: none;
    min-height: 280px;
    min-width: 0;
    width: 100%;
  }

  .featured-side-grid {
    height: auto;
    grid-template-columns: repeat(2, 1fr) !important;
    grid-template-rows: auto;
  }

  .featured-bottom-row {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* 반응형 - 모바일 (768px 이하) */
@media (max-width: 768px) {
  .featured-card--large {
    min-height: 240px;
  }

  .featured-card--large .featured-card__image {
    height: 280px;
  }

  .featured-side-grid {
    grid-template-columns: 1fr !important;
    gap: var(--spacing-md);
  }

  .featured-card--small {
    height: auto;
    min-height: 180px;
  }

  .featured-card--small .featured-card__link {
    position: relative;
  }

  .featured-card--large .featured-card__title {
    font-size: 1.2rem;
  }

  .featured-bottom-row {
    grid-template-columns: 1fr !important;
    gap: var(--spacing-md);
  }
}

/* 반응형 - 작은 모바일 (600px 이하) */
@media (max-width: 600px) {
  .featured-side-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .featured-card--small {
    min-height: 200px;
  }

  .featured-card--small .featured-card__image {
    max-height: 250px;
  }

  .featured-bottom-row {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
}

/* 반응형 - 초소형 모바일 (480px 이하) */
@media (max-width: 480px) {
  .featured-card--large .featured-card__image {
    height: 200px;
  }

  .featured-side-grid {
    grid-template-columns: 1fr;
  }

  .featured-card--small {
    min-height: 180px;
  }

  .featured-card--small .featured-card__image {
    max-height: 220px;
  }

  .featured-bottom-row {
    grid-template-columns: 1fr;
  }

  .featured-card--grid {
    min-height: 180px;
  }

  .featured-card--grid .featured-card__image {
    aspect-ratio: 16/9;
  }
}

/* ==========================================
   END HOMEPAGE FEATURED SECTION
   ========================================== */

/* Featured Post (큰 이미지 + 텍스트) */
.post-featured {
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-xl);
  border-bottom: 1px solid #eee;
}

.featured-post-wrapper {
  display: flex;
  flex-direction: row;
  gap: var(--spacing-lg);
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.featured-post-main-wrapper {
  display: flex;
  gap: var(--spacing-lg);
  align-items: flex-start;
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid #eee;
}

.featured-post-image {
  flex: 0 0 200px;
  height: 200px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.featured-post-sidebar {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.featured-post-main {
  flex: 1;
}

.featured-small-card {
  display: flex;
  gap: var(--spacing-lg);
  align-items: center;
  padding: var(--spacing-md);
  background: white;
  border: 1px solid #eee;
  border-radius: 4px;
}

.featured-small-card-image {
  flex: 0 0 120px;
  height: 120px;
  overflow: hidden;
  border-radius: 4px;
  background: #f5f5f5;
}

.featured-small-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-small-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-small-card-content .entry-title {
  font-size: 15px;
  margin: 0 0 var(--spacing-sm) 0;
  line-height: 1.3;
  font-weight: 500;
}

.featured-small-card-content .entry-title a {
  color: var(--color-primary, #333);
  text-decoration: none;
}

.featured-small-card-content .entry-title a:hover {
  color: var(--color-accent, #0066cc);
}

.featured-small-card-content .entry-excerpt {
  font-size: 13px;
  line-height: 1.4;
  color: #999;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.featured-post-image .no-image {
  width: 100%;
  height: 300px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
}

.featured-post-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-post-content .entry-header {
  margin-bottom: var(--spacing-md);
}

.featured-post-content .entry-title {
  font-size: 28px;
  margin: 0 0 var(--spacing-sm) 0;
  line-height: 1.3;
}

.featured-post-content .entry-title a {
  color: var(--color-primary, #333);
  text-decoration: none;
}

.featured-post-content .entry-title a:hover {
  color: var(--color-accent, #0066cc);
}

.featured-post-content .entry-meta {
  font-size: 14px;
  color: #999;
  margin-bottom: var(--spacing-md);
}

.featured-post-excerpt {
  font-size: 16px;
  line-height: 1.6;
  color: #666;
  margin-bottom: var(--spacing-md);
}

.featured-post-content .read-more-link {
  display: inline-block;
  color: var(--color-accent, #0066cc);
  text-decoration: none;
  font-weight: 500;
  margin-top: auto;
}

.featured-post-content .read-more-link:hover {
  text-decoration: underline;
}

/* Grid Posts (작은 이미지 + 텍스트 그리드) */
.post-grid-item {
  margin-bottom: var(--spacing-lg);
}

/* 메인 페이지 그리드 레이아웃 */
body.home .site-main {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--spacing-lg);
}

/* 서브 페이지 기본 레이아웃 */
body:not(.home) .site-main {
  display: block;
}

/* 첫 번째 포스트는 그리드에서 제외 */
body.home .post-featured {
  grid-column: 1 / -1;
  display: block;
  margin-bottom: var(--spacing-xl);
}

.grid-post-wrapper {
  background: var(--color-background, white);
  border: 1px solid var(--color-border, #eee);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.grid-post-wrapper:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.grid-post-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
  background: #f5f5f5;
}

.grid-post-image a {
  display: block;
  width: 100%;
  height: 100%;
}

.grid-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.grid-post-wrapper:hover .grid-post-image img {
  transform: scale(1.05);
}

.grid-post-image .no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: 14px;
}

.grid-post-content {
  padding: var(--spacing-md);
  background: var(--color-background, white);
  border-top: 1px solid var(--color-border, #eee);
}

.grid-post-content .entry-title {
  font-size: 15px;
  margin: 0 0 var(--spacing-sm) 0;
  line-height: 1.3;
  font-weight: 600;
}

.grid-post-content .entry-title a {
  color: var(--color-primary, #333);
  text-decoration: none;
}

.grid-post-content .entry-title a:hover {
  color: var(--color-accent, #0066cc);
}

.grid-post-content .entry-meta {
  font-size: 13px;
  color: #999;
  margin-bottom: var(--spacing-sm);
}

.grid-post-content .entry-excerpt {
  font-size: 14px;
  line-height: 1.5;
  color: #666;
  margin-bottom: var(--spacing-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.grid-post-content .entry-excerpt a {
  color: #666;
  text-decoration: none;
}

.grid-post-content .entry-excerpt a:hover {
  color: #333;
}

.grid-post-content .read-more-link {
  display: inline-block;
  color: var(--color-accent, #0066cc);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.grid-post-content .read-more-link:hover {
  text-decoration: underline;
}

/* 모바일 반응형 - 메인 페이지 그리드 */
@media (max-width: 1200px) {
  body.home .site-main {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .featured-post-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    align-items: flex-start;
  }

  .featured-post-image {
    flex: 0 0 auto;
    height: 250px;
  }

  .featured-post-content .entry-title {
    font-size: 22px;
  }

  body.home .site-main {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }

  .grid-post-image {
    height: 200px;
  }
}

@media (max-width: 600px) {
  body.home .site-main {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .grid-post-image {
    height: 220px;
  }

  .grid-post-wrapper {
    margin-bottom: var(--spacing-md);
  }
}

@media (max-width: 480px) {
  body.home .site-main {
    grid-template-columns: 1fr;
  }

  .grid-post-image {
    height: 180px;
  }
}

/* 푸터 */
.site-footer {
  background-color: var(--color-primary);
  color: white;
  padding: var(--spacing-lg);
  text-align: center;
  flex-shrink: 0;
  height: var(--footer-height);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 푸터 컨텐츠 레이아웃 - 한 줄 배치 */
.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  width: 100%;
  padding: 0 var(--spacing-lg);
}

.footer-links {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-link-separator {
  color: rgba(255, 255, 255, 0.5);
  margin: 0 5px;
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  text-align: right;
}

/* 모바일에서 푸터 한 줄 유지 */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 15px;
    padding: 0 var(--spacing-sm);
  }

  .footer-links {
    flex-shrink: 0;
  }

  .footer-links a {
    font-size: 12px;
  }

  .footer-copyright {
    font-size: 11px;
    text-align: right;
    white-space: nowrap;
  }
}

.site-footer--hidden {
  display: none;
}

/* ==========================================
   NAVIGATION MENUS
   ========================================== */

/* 메인 네비게이션 (가로 메뉴) */
.primary-navigation {
  flex: 0 0 auto;
  flex-shrink: 0;
  margin-left: auto;
}

.primary-menu {
  list-style: none;
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.primary-menu>li {
  margin: 0;
  position: relative;
}

.primary-menu>li>a {
  color: white;
  display: block;
  padding: var(--spacing-md) var(--spacing-lg);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  transition: color 0.3s ease;
  z-index: 1;
}

/* 좌측에서 우측으로 슬라이드되는 배경 효과 */
.primary-menu>li>a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: var(--color-accent, #0066cc);
  transition: width 0.3s ease;
  z-index: -1;
}

.primary-menu>li>a:hover::before,
.primary-menu>li.current-menu-item>a::before,
.primary-menu>li.current-menu-ancestor>a::before {
  width: 100%;
}

.primary-menu>li>a:hover,
.primary-menu>li.current-menu-item>a,
.primary-menu>li.current-menu-ancestor>a {
  color: white;
}

/* 드롭다운 서브메뉴 */
.primary-menu>li>.sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background-color: #2a2a2a;
  list-style: none;
  margin: 0;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.primary-menu>li:hover>.sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.primary-menu>li>.sub-menu>li {
  margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.primary-menu>li>.sub-menu>li:last-child {
  border-bottom: none;
}

.primary-menu>li>.sub-menu>li>a {
  color: rgba(255, 255, 255, 0.9);
  display: block;
  padding: var(--spacing-sm) var(--spacing-md);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  transition: color 0.3s ease, background-color 0.3s ease;
}

/* 서브메뉴 호버 효과 - 좌측에서 우측 슬라이드 */
.primary-menu>li>.sub-menu>li>a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: var(--color-accent, #0066cc);
  transition: width 0.25s ease;
  z-index: -1;
}

.primary-menu>li>.sub-menu>li>a:hover::before,
.primary-menu>li>.sub-menu>li.current-menu-item>a::before {
  width: 100%;
}

.primary-menu>li>.sub-menu>li>a:hover,
.primary-menu>li>.sub-menu>li.current-menu-item>a {
  color: white;
}

/* 3뎁스 서브메뉴 */
.primary-menu .sub-menu .sub-menu {
  position: absolute;
  top: 0;
  left: 100%;
  min-width: 180px;
  background-color: #3a3a3a;
  list-style: none;
  margin: 0;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.primary-menu .sub-menu li:hover>.sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.primary-menu .sub-menu .sub-menu li {
  margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.primary-menu .sub-menu .sub-menu li:last-child {
  border-bottom: none;
}

.primary-menu .sub-menu .sub-menu a {
  color: rgba(255, 255, 255, 0.9);
  display: block;
  padding: var(--spacing-sm) var(--spacing-md);
  position: relative;
  overflow: hidden;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.primary-menu .sub-menu .sub-menu a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: var(--color-accent, #0066cc);
  transition: width 0.25s ease;
  z-index: -1;
}

.primary-menu .sub-menu .sub-menu a:hover::before {
  width: 100%;
}

.primary-menu .sub-menu .sub-menu a:hover {
  color: white;
}

/* 하위메뉴가 있는 항목 표시 (화살표) - 서브메뉴만 */
.primary-menu .sub-menu li.menu-item-has-children>a::after {
  content: '▶';
  font-size: 0.6em;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

/* 메뉴 토글 버튼 */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--spacing-sm);
  transition: opacity 0.3s ease;
}

.menu-toggle:hover {
  opacity: 0.8;
}

/* 상단 메뉴 행 (동적 메뉴) */
.top-menu-row {
  background-color: #f9f9f9;
  border-bottom: 1px solid var(--color-border);
  padding: 0 var(--spacing-md);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.top-menu-items {
  list-style: none;
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  width: 100%;
}

.top-menu-items li {
  margin: 0;
  border-right: 1px solid var(--color-border);
}

.top-menu-items li:last-child {
  border-right: none;
}

.top-menu-items a {
  color: var(--color-secondary);
  display: block;
  padding: var(--spacing-md) var(--spacing-lg);
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
}

.top-menu-items a:hover,
.top-menu-items a:active {
  color: var(--color-accent);
  background-color: white;
  border-bottom-color: var(--color-accent);
}

/* 플로팅 버튼 그룹 */
.floating-buttons {
  position: fixed;
  right: 15px;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 1000;
}

.floating-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: background 0.2s, border-color 0.2s;
  box-sizing: border-box;
}

.floating-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: #999;
}

[data-theme="dark"] .floating-btn {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}

[data-theme="dark"] .floating-btn:hover {
  background: rgba(0, 0, 0, 0.35);
}

/* 카카오톡 버튼 */
/* 카카오톡 버튼 (PC 기본) */
.floating-btn.kakao-btn {
  width: 42px;
  min-width: 42px;
  height: 34px;
  padding: 2px;
  background-color: #fee500;
}

@media (max-width: 768px) {

  /* 카카오톡 버튼 (모바일) */
  .floating-btn.kakao-btn {
    width: 36px;
    min-width: 36px;
    height: 30px;
  }
}

.floating-btn.kakao-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 다크모드 카카오톡 버튼 */
[data-theme="dark"] .floating-btn.kakao-btn {
  width: 42px;
  min-width: 42px;
  height: 34px;
  background-color: #fee500;
}

@media (max-width: 768px) {

  /* 다크모드 카카오톡 버튼 (모바일) */
  [data-theme="dark"] .floating-btn.kakao-btn {
    width: 36px;
    min-width: 36px;
    height: 30px;
  }
}

/* 사이드 메뉴 (세로) */
.secondary-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.secondary-menu li {
  margin: 0 0 var(--spacing-sm) 0;
}

.secondary-menu a {
  color: var(--color-secondary);
  display: block;
  padding: var(--spacing-sm);
  border-left: var(--menu-border-width, 3px) solid transparent;
  transition: all 0.3s ease;
  background-color: transparent;
}

.secondary-menu a:hover {
  color: var(--menu-hover-color, #0066cc);
  background-color: rgba(0, 102, 204, var(--menu-hover-opacity, 0.1));
  border-left-color: var(--menu-hover-color, #0066cc);
  padding-left: calc(var(--spacing-sm) + var(--menu-hover-padding-offset, 3px));
}

.secondary-menu a:active,
.secondary-menu a.current,
.secondary-menu .current-menu-item>a,
.secondary-menu .current-menu-ancestor>a,
.secondary-menu .current-menu-parent>a,
.secondary-menu .clicked-active a,
.secondary-menu a.clicked-active {
  color: var(--menu-active-text-color, white);
  background-color: var(--menu-active-color, #0066cc);
  border-left-color: var(--menu-active-color, #0066cc);
  padding-left: calc(var(--spacing-sm) + var(--menu-hover-padding-offset, 3px));
}

/* 메인 콘텐츠 상단 소메뉴 (가로) */
.submenu-horizontal {
  background-color: #f9f9f9;
  border-bottom: 1px solid var(--color-border);
  padding: 0;
  margin: 0;
  order: -1;
  /* 소메뉴를 위에 배치 */
  flex-shrink: 0;
}

.submenu-top-menu {
  list-style: none;
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.submenu-top-menu li {
  margin: 0;
  border-right: 1px solid var(--color-border);
}

.submenu-top-menu li:last-child {
  border-right: none;
}

.submenu-top-menu a {
  color: var(--color-secondary);
  display: block;
  padding: var(--spacing-md) var(--spacing-lg);
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
}

.submenu-top-menu a:hover,
.submenu-top-menu a:active {
  color: var(--color-accent);
  background-color: white;
  border-bottom-color: var(--color-accent);
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

/* 태블릿 (768px 이상 1024px 미만) */
@media (max-width: 1023px) {
  :root {
    --sidebar-width: 200px;
  }

  .site-sidebar {
    padding: var(--spacing-md);
  }

  /* .site-main의 padding은 functions.php에서 커스터마이저 설정으로 동적 생성됨 */
}

/* 모바일 (768px 이하) */
@media (max-width: 768px) {
  :root {
    --header-height: 50px;
    --banner-height: 80px;
    --sidebar-width: 100%;
    --footer-height: auto;
  }

  /* 배너 모바일 레이아웃 */
  :root {
    --banner-text-position: 50;
  }

  .banner {
    padding: var(--spacing-md) !important;
    justify-content: center !important;
  }

  .banner-content {
    position: relative !important;
    left: auto !important;
    transform: none !important;
    text-align: center;
    width: 100% !important;
  }

  .banner-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
  }

  .banner-subtitle {
    font-size: 0.9rem;
  }

  .banner__container {
    max-width: 100%;
  }

  /* 헤더 모바일 레이아웃 */
  .site-header {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 50px;
    /* padding은 functions.php에서 사용자 정의 설정으로 동적 생성됨 */
    box-sizing: border-box;
  }

  /* 헤더 그리드 모바일 레이아웃 */
  .site-header__container {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    max-width: 100%;
    width: 100%;
    padding: 0;
    box-sizing: border-box;
    align-items: center;
    overflow: visible;
  }

  .site-header__container .site-logo {
    grid-column: 1;
    font-size: 0.95rem;
    min-width: 0;
    max-width: 60%;
    flex-shrink: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
  }

  .site-header__container .site-logo a {
    display: flex;
    align-items: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .site-header__container .site-logo img {
    width: 200px !important;
    height: auto !important;
  }

  .site-header__container .primary-navigation {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .site-header__container .menu-toggle {
    grid-column: 3;
    grid-row: 1;
    display: block;
    flex-shrink: 0;
  }

  /* 검색창 모바일 - 숨김 */
  .site-search {
    display: none;
  }

  .site-search form {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .site-search input[type="search"],
  .site-search input[type="text"] {
    min-width: auto;
    width: calc(100% - 60px);
    max-width: 100%;
    flex: 1;
  }

  .site-search button,
  .site-search input[type="submit"] {
    flex-shrink: 0;
    margin-left: var(--spacing-sm);
  }

  /* 상단 메뉴 행 모바일 */
  .top-menu-row {
    padding: 0;
  }

  .top-menu-items {
    flex-direction: column;
  }

  .top-menu-items li {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    width: 100%;
  }

  .top-menu-items li:last-child {
    border-bottom: none;
  }

  .top-menu-items a {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.9rem;
  }

  /* 메인 메뉴 모바일 */
  .primary-navigation {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-primary);
    z-index: 99;
  }

  .primary-menu {
    flex-direction: column;
    width: 100%;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .primary-menu.active {
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .primary-menu>li {
    width: 100%;
  }

  .primary-menu>li>a {
    display: block;
    padding: 12px 15px;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .primary-menu>li>a::before {
    display: none;
  }

  .primary-menu>li>a:hover,
  .primary-menu>li.current-menu-item>a {
    background-color: rgba(255, 255, 255, 0.1);
  }

  /* 모바일 서브메뉴 - 숨김 처리 */
  .primary-menu>li>.sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background-color: rgba(0, 0, 0, 0.2);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .primary-menu>li:hover>.sub-menu,
  .primary-menu>li.menu-open>.sub-menu {
    max-height: 500px;
  }

  .primary-menu>li>.sub-menu>li>a {
    padding-left: 30px;
  }

  .primary-menu>li>.sub-menu>li>a::before {
    display: none;
  }

  .primary-menu .sub-menu .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background-color: rgba(0, 0, 0, 0.15);
  }

  .primary-menu .sub-menu .sub-menu a {
    padding-left: 45px;
  }

  .primary-menu .sub-menu .sub-menu a::before {
    display: none;
  }

  /* 모바일 화살표 숨김 */
  .primary-menu>li.menu-item-has-children>a::after,
  .primary-menu .sub-menu li.menu-item-has-children>a::after {
    display: none;
  }

  /* 콘텐츠 래퍼 모바일 - 좌우 여백 제거 */
  .content-wrapper {
    flex-direction: column;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* 사이드바 모바일 - 숨김 */
  .site-sidebar {
    display: none !important;
  }

  /* 메인 콘텐츠 모바일 - 적절한 여백 적용 */
  .site-main {
    order: 1;
    width: 100% !important;
    max-width: 100% !important;
    /* 모바일 padding은 functions.php에서 커스터마이저 설정으로 동적 생성됨 */
    margin: 0 !important;
  }

  /* 배너 모바일 - 좌우 여백 0 (전체 너비) */
  .banner {
    font-size: 1.2rem;
    padding: 15px 0 !important;
    order: 1;
    width: 100% !important;
  }


  /* 페이지 컨테이너 모바일 */
  #page.site {
    padding: 0 !important;
    margin: 0 !important;
  }

  /* 게시물/페이지 컨텐츠 모바일 */
  article,
  .hentry,
  .post,
  .page {
    padding: 0 !important;
    margin: 0 0 var(--spacing-md) 0 !important;
  }

  /* 컨테이너 모바일 */
  .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
  }

  /* 네비게이션 모바일 */
  .primary-navigation {
    padding: 0 !important;
  }

  /* 푸터 모바일 */
  .site-footer {
    height: auto;
    padding: var(--spacing-md);
    font-size: 0.9rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  /* 소메뉴 모바일 */
  .submenu-horizontal {
    margin: 0 -var(--spacing-md) var(--spacing-md) -var(--spacing-md);
  }

  .submenu-top-menu a {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.9rem;
  }

  /* 테이블 모바일 */
  table th,
  table td,
  .entry-content table th,
  .entry-content table td,
  .wp-block-table th,
  .wp-block-table td {
    padding: 10px 6px;
    font-size: 0.9rem;
  }
}

/* 초소형 모바일 (480px 미만) */
@media (max-width: 479px) {
  :root {
    --spacing-lg: 15px;
    --spacing-md: 10px;
    --spacing-sm: 8px;
  }

  .site-header {
    padding: 10px 12px !important;
    min-height: 48px;
  }

  .site-logo {
    font-size: calc(var(--site-name-font-size, 24px) * 0.65);
  }

  /* .site-main padding은 functions.php에서 커스터마이저 설정으로 동적 생성됨 */

  .content-wrapper {
    padding: 0 !important;
  }

  .banner {
    padding: 10px !important;
    --banner-height: 70px;
  }

  .banner-title {
    font-size: 1rem !important;
    margin-bottom: 4px !important;
  }

  .banner-subtitle {
    font-size: 0.8rem !important;
  }

  h1 {
    font-size: 1.25rem;
  }

  h2 {
    font-size: 1.1rem;
  }

  h3 {
    font-size: 1rem;
  }
}

/* ==========================================
   UTILITIES
   ========================================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.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;
}

/* ==========================================
   WORDPRESS SPECIFIC
   ========================================== */

.wp-block-image {
  max-width: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

.alignleft {
  float: left;
  margin-right: var(--spacing-lg);
}

.alignright {
  float: right;
  margin-left: var(--spacing-lg);
}

.aligncenter {
  text-align: center;
}

.wp-caption {
  background: #f5f5f5;
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  border: 1px solid var(--color-border);
}

/* 서브페이지 상단 카테고리 목록 숨김 */
body:not(.home) .site-main>ul,
body:not(.home) .site-main>.widget_categories,
body:not(.home) .homepage-category-overview+ul,
.category .site-main>ul:first-of-type {
  display: none !important;
}

/* mobile-secondary-menu: PC에서 숨김, 모바일에서만 표시 */
.mobile-secondary-menu,
.mobile-menu-hint {
  display: none !important;
}

@media (max-width: 768px) {

  .mobile-secondary-menu {
    display: block !important;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 10px 15px;
    background-color: var(--color-background, #f5f5f5);
    border-bottom: 1px solid var(--color-border, #ddd);
    margin-bottom: 15px;
  }

  .mobile-secondary-menu-list {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: max-content;
  }

  .mobile-secondary-menu-list li {
    flex-shrink: 0;
    margin: 0;
  }

  .mobile-secondary-menu-list li a {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--color-background, #fff);
    border: 1px solid var(--color-border, #ddd);
    border-radius: 20px;
    color: var(--color-text, #333);
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.2s ease;
  }

  .mobile-secondary-menu-list li a:hover,
  .mobile-secondary-menu-list li a:active {
    background-color: var(--menu-active-color, #0089c4);
    color: #fff;
    border-color: var(--menu-active-color, #0089c4);
  }

  .mobile-secondary-menu-list li.current-menu-item a,
  .mobile-secondary-menu-list li.current-menu-ancestor a,
  .mobile-secondary-menu-list li.clicked-active a {
    background-color: var(--menu-active-color, #0089c4);
    color: #fff;
    border-color: var(--menu-active-color, #0089c4);
  }

  .mobile-menu-hint {
    display: block !important;
    text-align: center;
    font-size: 12px;
    color: #888;
    padding: 5px 15px 10px;
    margin-top: -10px;
  }

  /* 스크롤바 숨김 (선택사항) */
  .mobile-secondary-menu::-webkit-scrollbar {
    height: 4px;
  }

  .mobile-secondary-menu::-webkit-scrollbar-track {
    background: transparent;
  }

  .mobile-secondary-menu::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
  }
}

/* ==========================================
   COMMENTS FORM STYLING
   ========================================== */

/* 댓글 영역 전체 */
.comments-area {
  margin-top: 50px;
  padding: 30px;
  background: var(--comment-form-bg, #efefef);
  border-radius: 8px;
}

.comments-title {
  font-size: 24px;
  margin-bottom: 30px;
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 10px;
}

/* 댓글 폼 */
#respond {
  background: var(--comment-form-bg, #efefef);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.comment-reply-title {
  font-size: 20px;
  margin-bottom: 20px;
  color: var(--color-primary);
}

.comment-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .comment-form-row {
    grid-template-columns: 1fr;
  }
}

.comment-form-field {
  margin-bottom: 20px;
}

.comment-form-field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--color-primary);
  font-size: 14px;
}

.comment-form-field .required {
  color: #e74c3c;
}

.comment-form-field input[type="text"],
.comment-form-field input[type="email"],
.comment-form-field input[type="password"],
.comment-form-field textarea {
  width: 100%;
  padding: 12px 15px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.comment-form-field input:focus,
.comment-form-field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.comment-form-field textarea {
  resize: vertical;
  min-height: 120px;
}

/* 비밀번호 필드 */
.comment-form-password {
  background: var(--comment-password-bg, #fff);
  padding: 15px;
  border-radius: 6px;
  border: 1px solid var(--comment-password-border, #ddd);
}

.comment-form-password label {
  color: var(--color-primary);
}

.password-hint {
  margin: 8px 0 0 0;
  font-size: 12px;
  color: var(--color-secondary, #666);
}

/* 개인정보 동의 */
.comment-form-privacy {
  background: var(--comment-privacy-bg, #e7f3ff);
  padding: 15px;
  border-radius: 6px;
  border-left: 4px solid var(--color-accent);
}

.privacy-checkbox {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  font-weight: normal !important;
  color: var(--color-primary);
}

.privacy-checkbox input[type="checkbox"] {
  margin-right: 15px;
  margin-top: 2px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.privacy-link {
  color: var(--color-accent);
  text-decoration: underline;
  font-weight: 600;
}

.privacy-notice {
  margin: 10px 0 0 28px;
  font-size: 12px;
  color: var(--color-secondary, #666);
  line-height: 1.5;
}

/* 제출 버튼 */
.form-submit {
  margin-top: 20px;
}

.submit-button {
  background: #2c4a63;
  color: #fff;
  padding: 14px 40px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s, transform 0.1s;
}

.submit-button:hover {
  background: #1f3447;
  transform: translateY(-1px);
}

.submit-button:active {
  transform: translateY(0);
}

/* 댓글 목록 */
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
}

.comment-list .comment {
  background: #fff;
  padding: 20px;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.comment-body {
  position: relative;
}

/* 댓글 삭제 버튼 */
.comment-delete-wrapper {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.comment-delete-btn {
  background: #fff;
  color: #dc3545;
  border: 1px solid #dc3545;
  padding: 6px 15px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.comment-delete-btn:hover {
  background: #dc3545;
  color: #fff;
}

.comment-delete-btn .dashicons {
  width: 16px;
  height: 16px;
  font-size: 16px;
}

.comment-delete-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 다크모드 댓글 영역 추가 스타일 */
html[data-theme="dark"] #respond {
  background: #2a2a2a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .comment-reply-title {
  color: #f0f0f0;
}

html[data-theme="dark"] .comment-form-field label {
  color: #f0f0f0;
}

html[data-theme="dark"] .comment-form-field input[type="text"],
html[data-theme="dark"] .comment-form-field input[type="email"],
html[data-theme="dark"] .comment-form-field input[type="password"],
html[data-theme="dark"] .comment-form-field textarea {
  background: #3a3a3a;
  border-color: #555;
  color: #f0f0f0;
}

html[data-theme="dark"] .comment-form-field input::placeholder,
html[data-theme="dark"] .comment-form-field textarea::placeholder {
  color: #999;
}

html[data-theme="dark"] .comment-form-field input:focus,
html[data-theme="dark"] .comment-form-field textarea:focus {
  border-color: #5b9dd9;
  background: #424242;
}

html[data-theme="dark"] .comment-form-password label {
  color: #f0f0f0;
}

html[data-theme="dark"] .comment-form-password input {
  background: #2a2a2a;
  border-color: #555;
  color: #f0f0f0;
}

html[data-theme="dark"] .privacy-link {
  color: #6bb5ff;
}

html[data-theme="dark"] .submit-button {
  background: #3a5a7a;
  color: #fff;
}

html[data-theme="dark"] .submit-button:hover {
  background: #4a6a8a;
}

/* ==========================================
   COMMENT DELETE MODAL
   ========================================== */

.comment-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comment-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

.comment-modal-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 480px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.comment-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid #eee;
}

.comment-modal-header h3 {
  margin: 0;
  font-size: 20px;
  color: var(--color-primary);
}

.comment-modal-close {
  background: none;
  border: none;
  font-size: 32px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.comment-modal-close:hover {
  color: #333;
}

.comment-modal-body {
  padding: 25px;
}

.comment-modal-body>p {
  margin: 0 0 20px 0;
  color: #666;
  font-size: 14px;
  line-height: 1.6;
}

.modal-form-group {
  margin-bottom: 15px;
}

.modal-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--color-primary);
  font-size: 14px;
}

.modal-input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.modal-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.modal-error-message {
  margin-top: 15px;
  padding: 12px 15px;
  background: #fff3f3;
  border-left: 4px solid #dc3545;
  border-radius: 4px;
  color: #dc3545;
  font-size: 14px;
}

.comment-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 25px;
  border-top: 1px solid #eee;
  background: #f9f9f9;
  border-radius: 0 0 12px 12px;
}

.modal-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.modal-btn-cancel {
  background: #fff;
  color: #666;
  border: 1px solid #ddd;
}

.modal-btn-cancel:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

.modal-btn-delete {
  background: #2c4a63;
  color: #fff;
}

.modal-btn-delete:hover {
  background: #1f3447;
}

.modal-btn-delete:disabled {
  background: #5a728a;
  cursor: not-allowed;
}

/* 다크모드 지원 */
body.dark-mode .comment-modal-content {
  background: #2a2a2a;
}

body.dark-mode .comment-modal-header {
  border-bottom-color: #444;
}

body.dark-mode .comment-modal-header h3 {
  color: #ddd;
}

body.dark-mode .comment-modal-close {
  color: #999;
}

body.dark-mode .comment-modal-close:hover {
  color: #fff;
}

body.dark-mode .comment-modal-body>p {
  color: #aaa;
}

body.dark-mode .modal-input {
  background: #333;
  border-color: #555;
  color: #ddd;
}

body.dark-mode .modal-input:focus {
  border-color: var(--color-accent);
}

body.dark-mode .modal-error-message {
  background: #3a2020;
  border-left-color: #dc3545;
  color: #ff6b7a;
}

body.dark-mode .comment-modal-footer {
  background: #222;
  border-top-color: #444;
}

body.dark-mode .modal-btn-cancel {
  background: #333;
  color: #aaa;
  border-color: #555;
}

body.dark-mode .modal-btn-cancel:hover {
  background: #3a3a3a;
  border-color: #666;
}

/* 모바일 반응형 */
@media (max-width: 480px) {
  .comment-modal-content {
    width: 95%;
    max-width: none;
    margin: 20px;
  }

  .comment-modal-header {
    padding: 15px 20px;
  }

  .comment-modal-body {
    padding: 20px;
  }

  .comment-modal-footer {
    padding: 15px 20px;
    flex-direction: column;
  }

  .modal-btn {
    width: 100%;
  }
}

/* ==========================================
   CUSTOM CODE MANAGER - 레이아웃 보호
   ========================================== */

/* 커스텀 코드로 추가된 콘텐츠가 레이아웃을 깨지 않도록 보호 */
.site-main img,
.site-main table,
.site-main iframe,
.site-main video,
.site-main embed,
.site-main object {
  max-width: 100%;
  height: auto;
  box-sizing: border-box;
}

.site-main table {
  table-layout: auto;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.site-main pre,
.site-main code {
  max-width: 100%;
  overflow-x: auto;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
}

/* 긴 URL이나 텍스트가 레이아웃을 깨지 않도록 */
.site-main p,
.site-main div,
.site-main span {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ==========================================
   통합 레이아웃 보호 - 플러그인과 편집기 콘텐츠
   ========================================== */

/* 메인 콘텐츠 영역의 모든 직접 자식 요소 통합 규칙 */
.site-main>*,
.entry-content>* {
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-wrap: break-word !important;
  word-wrap: break-word !important;
}

/* 깊은 중첩 요소들도 보호 */
.site-main *,
.entry-content * {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* ==========================================
   CUSTOM CODE MANAGER - Wrapper 스타일
   ========================================== */

.fccm-custom-content-top,
.fccm-custom-content-bottom {
  max-width: 100% !important;
  width: 100% !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  box-sizing: border-box !important;
}

.fccm-custom-content-top *,
.fccm-custom-content-bottom * {
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-wrap: break-word !important;
}

.fccm-custom-content-top img,
.fccm-custom-content-bottom img,
.fccm-custom-content-top table,
.fccm-custom-content-bottom table,
.fccm-custom-content-top iframe,
.fccm-custom-content-bottom iframe {
  max-width: 100% !important;
  height: auto !important;
  width: 100% !important;
}

/* 플러그인 콘텐츠 내 그리드 레이아웃 반응형 처리 */
.fccm-custom-content-top .feature-grid,
.fccm-custom-content-bottom .feature-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
  gap: 20px !important;
  max-width: 100% !important;
}

/* ==========================================
   워드프레스 갤러리 블록 레이아웃 보호
   ========================================== */

.site-main .wp-block-gallery,
.entry-content .wp-block-gallery {
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.site-main .wp-block-gallery figure,
.entry-content .wp-block-gallery figure {
  min-width: 0;
  max-width: 100%;
  width: 100% !important;
  overflow: hidden;
  border: 1px solid #ddd;
}

/* is-cropped 갤러리: 편집기처럼 이미지를 잘라서 맞춤 */
.site-main .wp-block-gallery.is-cropped figure,
.entry-content .wp-block-gallery.is-cropped figure {
  aspect-ratio: 1;
}

.site-main .wp-block-gallery.is-cropped img,
.entry-content .wp-block-gallery.is-cropped img {
  max-width: none !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* is-cropped가 아닌 갤러리: 이미지 원본 비율 유지 */
.site-main .wp-block-gallery:not(.is-cropped) img,
.entry-content .wp-block-gallery:not(.is-cropped) img {
  max-width: 100%;
  width: 100% !important;
  height: auto !important;
  object-fit: contain;
}

/* columns-4 갤러리 */
.site-main .wp-block-gallery.columns-4,
.entry-content .wp-block-gallery.columns-4 {
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 16px !important;
}

/* columns-3 갤러리 */
.site-main .wp-block-gallery.columns-3,
.entry-content .wp-block-gallery.columns-3 {
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 16px !important;
}

/* columns-2 갤러리 */
.site-main .wp-block-gallery.columns-2,
.entry-content .wp-block-gallery.columns-2 {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 16px !important;
}

/* 모바일 반응형 */
@media (max-width: 600px) {

  .site-main .wp-block-gallery.columns-4,
  .entry-content .wp-block-gallery.columns-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .site-main .wp-block-gallery.columns-3,
  .entry-content .wp-block-gallery.columns-3 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* 갤러리가 flexbox인 경우 grid로 전환 */
.site-main .wp-block-gallery.is-layout-flex,
.entry-content .wp-block-gallery.is-layout-flex {
  display: grid !important;
}