/*
Theme Name: Premium Blog Pro
Theme URI: https://your-domain.com
Author: Your Name
Description: Modern Premium Blog Theme
Version: 2.2.0
License: GPL v2 or later
Text Domain: premium-blog-pro
*/

/* ==================== CSS Reset ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==================== CSS Variables ==================== */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --accent-color: #ec4899;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --container-max: 1280px;
    --board-container-max: 1280px;
    --sidebar-width: 320px;
    --header-height: 70px;
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --border-radius-lg: 12px;
}

/* Dark Mode */
[data-theme="dark"] {
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    --border-color: #374151;
}

/* ==================== Base Styles ==================== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: all var(--transition-base);
}

a {
    color: inherit;
    text-decoration: none;
    transition: all var(--transition-fast);
}

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

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

/* ==================== Header Styles ==================== */
.site-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    backdrop-filter: blur(10px);
    transition: all var(--transition-base);
}

.header-wrapper {
    height: 100%;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: none;
}

.site-branding {
    display: flex;
    align-items: center;
    z-index: 101;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

.site-title-link {
    color: var(--text-primary);
    text-decoration: none;
}

/* Main Navigation */
.main-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 99;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 10px 15px;
    color: var(--text-primary);
    font-weight: 500;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* Submenu Styles */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 8px;
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
    list-style: none;
    z-index: 1000;
}

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

.sub-menu a {
    padding: 8px 12px;
    border-radius: 4px;
    display: block;
}

.sub-menu a:hover {
    background: var(--bg-secondary);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 101;
}

.dark-mode-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text-primary);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.dark-mode-toggle:hover {
    background: var(--bg-secondary);
}

.dark-mode-toggle .moon-icon {
    display: none;
}

[data-theme="dark"] .dark-mode-toggle .sun-icon {
    display: none;
}

[data-theme="dark"] .dark-mode-toggle .moon-icon {
    display: block;
}

.btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
    text-decoration: none;
    font-size: 14px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-outline {
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* User Menu */
.user-menu {
    position: relative;
    z-index: 1002;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.user-menu-toggle:hover {
    border-color: var(--primary-color);
}

.user-menu-toggle img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 200px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
    z-index: 1003;
}

.user-menu:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.dropdown-item:hover {
    background: var(--bg-secondary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    position: absolute;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.mobile-menu-toggle span:nth-child(1) { 
    transform: translateY(-7px);
}

.mobile-menu-toggle span:nth-child(2) { 
    transform: translateY(0);
}

.mobile-menu-toggle span:nth-child(3) { 
    transform: translateY(7px);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
}

/* Mobile Navigation */
.mobile-navigation {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: calc(100vh - var(--header-height));
    background: var(--bg-primary);
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    overflow-y: auto;
    transition: right 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
    z-index: 999;
}

.mobile-navigation.active {
    right: 0;
}

.mobile-menu-inner {
    padding: 20px;
}

.mobile-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu li {
    margin-bottom: 5px;
}

.mobile-menu a {
    display: block;
    padding: 12px 15px;
    color: var(--text-primary);
    font-weight: 500;
    border-radius: 8px;
    transition: all var(--transition-base);
    text-decoration: none;
}

.mobile-menu a:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
    transform: translateX(5px);
}

.mobile-user-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.mobile-user-link {
    display: block;
    padding: 12px 15px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    text-align: center;
    border-radius: 8px;
    font-weight: 600;
    transition: all var(--transition-base);
    text-decoration: none;
}

.mobile-user-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Mobile overlay */
body.menu-open::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==================== Main Content ==================== */
.site-content {
    padding: 40px 0;
}

.content-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.content-area {
    flex: 1;
    min-width: 0;
}

/* ==================== Index/Home Page Hero Section ==================== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 80px 0;
    margin-bottom: 60px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeIn 0.8s ease;
    position: relative;
    z-index: 2;
}

.hero-description {
    font-size: 1.25rem;
    opacity: 0.9;
    animation: fadeIn 1s ease 0.2s both;
    position: relative;
    z-index: 2;
}

/* ==================== Posts Grid - 3 Columns ==================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    animation: fadeIn 0.6s ease;
}

.posts-grid-3col {
    grid-template-columns: repeat(3, 1fr);
}

.post-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    position: relative;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    transition: opacity var(--transition-base);
    border-radius: var(--border-radius-lg);
    z-index: -1;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.post-card:hover::before {
    opacity: 0.05;
}

.post-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

.post-category-badge a {
    color: white;
    text-decoration: none;
}

.post-content {
    padding: 25px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: var(--text-muted);
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-title {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 12px;
    font-weight: 600;
}

.post-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.post-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: var(--text-muted);
}

.post-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.read-more-btn:hover {
    gap: 10px;
    transform: translateX(2px);
}

/* ==================== Archive Header ==================== */
.archive-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 40px 30px;
    border-radius: var(--border-radius-lg);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.archive-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 6s ease-in-out infinite;
}

.archive-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 2;
}

.archive-icon {
    background: rgba(255,255,255,0.2);
    padding: 15px;
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

.archive-type {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.archive-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    line-height: 1.2;
}

.archive-description {
    opacity: 0.9;
    margin-bottom: 15px;
    line-height: 1.6;
}

.archive-meta {
    display: flex;
    align-items: center;
    gap: 20px;
}

.post-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    opacity: 0.9;
}

/* ==================== Single Post Styles ==================== */
.single-post {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.entry-header {
    padding: 40px 40px 30px;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.entry-categories {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.category-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.category-badge:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.entry-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 25px;
    font-weight: 700;
    color: var(--text-primary);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Single Post Meta 압축 */
.entry-meta-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.entry-meta-compact .meta-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.entry-meta-compact .meta-author img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

.entry-meta-compact > span {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    font-size: 12px;
}

.entry-thumbnail {
    margin: 0;
    position: relative;
    overflow: hidden;
}

.entry-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-slow);
}

.entry-content {
    padding: 50px 40px;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    font-size: 16px;
    color: var(--text-primary);
}

/* ==================== Sidebar ==================== */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--header-height) + 20px);
    height: fit-content;
}

.widget {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 25px;
    margin-bottom: 25px;
    transition: all var(--transition-base);
}

.widget:hover {
    box-shadow: var(--shadow-md);
}

.widget-title {
    font-size: 1.125rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.widget-title svg {
    opacity: 0.8;
}

/* Newsletter Widget Styles */
.newsletter-content p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 14px;
}

.newsletter-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: all var(--transition-base);
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.newsletter-button {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    margin-top: 10px;
}

.newsletter-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Modern Search Widget */
.modern-search .search-wrapper {
    position: relative;
    background: var(--bg-secondary);
    border-radius: 50px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all var(--transition-base);
}

.modern-search .search-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.modern-search .search-field {
    width: 100%;
    padding: 12px 50px 12px 20px;
    border: none;
    background: transparent;
    font-size: 15px;
    outline: none;
    color: var(--text-primary);
}

.modern-search .search-submit {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

/* Recent Posts & Popular Posts */
.recent-posts-list,
.popular-posts-list {
    list-style: none;
}

.recent-post-item,
.popular-post-item {
    display: flex;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.recent-post-item:last-child,
.popular-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.post-thumbnail-small {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    overflow: hidden;
    flex-shrink: 0;
}

.post-info {
    flex: 1;
    min-width: 0;
}

.post-title-small {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 6px;
    font-weight: 500;
}

.post-title-small a {
    color: var(--text-primary);
}

.post-title-small a:hover {
    color: var(--primary-color);
}

.post-meta-small {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    gap: 10px;
}

/* Categories Widget */
.categories-list {
    list-style: none;
}

.category-item {
    margin-bottom: 8px;
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
}

.category-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

.category-count {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

/* Tags Widget */
.modern-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border-radius: 20px;
    font-size: 13px;
    transition: all var(--transition-fast);
}

.tag-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}



/* ==================== Footer Styles ==================== */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-left {
    max-width: 400px;
}

.footer-logo img {
    max-height: 40px;
    margin-bottom: 15px;
}

.footer-site-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.footer-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* ==================== Pagination ==================== */
.pagination-wrapper {
    margin-top: 60px;
    text-align: center;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    margin: 0 4px;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all var(--transition-fast);
    border: 1px solid var(--border-color);
}

.page-numbers:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.page-numbers.current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
    .main-navigation,
    .header-actions > *:not(.mobile-menu-toggle) {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .content-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
    }
    
    .posts-grid,
    .posts-grid-3col {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .archive-title {
        font-size: 2rem;
    }
    
    .entry-title {
        font-size: 2rem;
    }
    
    .archive-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .posts-grid-3col {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .entry-title {
        font-size: 1.75rem;
    }
    
    .archive-title {
        font-size: 1.5rem;
    }
    
    .entry-meta-compact {
        flex-direction: column;
        gap: 8px;
    }
}

/* ==================== No Sidebar Layout ==================== */
body.no-sidebar:not(.page-template-page-board):not(.board-page):not([class*="board"]) .sidebar {
    display: none !important;
}

body.no-sidebar:not(.page-template-page-board):not(.board-page):not([class*="board"]) .content-area {
    max-width: 100% !important;
}

body.no-sidebar:not(.page-template-page-board):not(.board-page):not([class*="board"]) .content-wrapper {
    display: block !important;
}

/* ==================== Dark Mode ==================== */
[data-theme="dark"] .site-header {
    background: var(--bg-primary);
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .mobile-navigation {
    background: var(--bg-primary);
    border-left: 1px solid var(--border-color);
}

[data-theme="dark"] .post-card {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .widget {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .site-footer {
    background: var(--bg-secondary);
    border-top-color: var(--border-color);
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* ==================== Back to Top Button ==================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

/* ==================== Animations ==================== */
@keyframes pulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(180deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
/* ==================== 전역 반응형 레이아웃 수정 - style.css에 추가 ==================== */

/* 기본 컨테이너 및 콘텐츠 래퍼 */
.content-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    width: 100%;
}

.content-area {
    flex: 1;
    min-width: 0;
    width: auto;
}

.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--header-height) + 20px);
    height: fit-content;
}

/* ==================== 사이드바 있는 경우 레이아웃 ==================== */
/* 데스크톱 (1025px 이상) - 사이드바와 콘텐츠 나란히 */
@media (min-width: 1025px) {
    .content-wrapper {
        display: flex !important;
        flex-direction: row !important;
        gap: 40px !important;
    }
    
    .content-area {
        flex: 1 !important;
        min-width: 0 !important;
        width: auto !important;
        max-width: calc(100% - 360px) !important;
    }
    
    .sidebar {
        width: 320px !important;
        flex: 0 0 320px !important;
        min-width: 320px !important;
        max-width: 320px !important;
        display: block !important;
        position: sticky !important;
        top: calc(var(--header-height) + 20px) !important;
    }
}

/* 태블릿 (769px ~ 1024px) - 사이드바가 아래로 이동하고 콘텐츠가 전체 너비 사용 */
@media (max-width: 1024px) and (min-width: 769px) {
    .content-wrapper {
        display: block !important; /* flex 해제하여 수직 배치 */
        width: 100% !important;
    }
    
    .content-area {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 40px !important;
        flex: none !important; /* flex 속성 제거 */
    }
    
    .sidebar {
        width: 100% !important;
        max-width: 100% !important;
        position: static !important;
        margin-top: 0 !important;
        flex: none !important; /* flex 속성 제거 */
    }
}

/* 모바일 (768px 이하) - 세로 배치, 콘텐츠 전체 너비 */
@media (max-width: 768px) {
    .content-wrapper {
        display: block !important;
        width: 100% !important;
        flex-direction: column !important;
    }
    
    .content-area {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 30px !important;
        flex: none !important;
    }
    
    .sidebar {
        width: 100% !important;
        max-width: 100% !important;
        position: static !important;
        margin-top: 0 !important;
        flex: none !important;
    }
}

/* ==================== no-sidebar 클래스 적용시 ==================== */
/* 사이드바 숨김 설정이 있을 때 콘텐츠가 전체 너비 사용 */
.no-sidebar .content-wrapper {
    display: block !important;
}

.no-sidebar .content-area {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
}

.no-sidebar .sidebar {
    display: none !important;
}

/* ==================== 게시판 페이지는 예외 처리 ==================== */
/* 게시판 페이지는 항상 사이드바 표시 (no-sidebar 설정 무시) */
.page-template-board-template .content-wrapper,
.board-page .content-wrapper,
.has-board-content .content-wrapper {
    display: flex !important;
}

.page-template-board-template .sidebar,
.board-page .sidebar,
.has-board-content .sidebar {
    display: block !important;
}

/* 게시판 페이지 모바일 반응형 */
@media (max-width: 1024px) {
    .page-template-board-template .content-wrapper,
    .board-page .content-wrapper,
    .has-board-content .content-wrapper {
        display: block !important;
    }
    
    .page-template-board-template .content-area,
    .board-page .content-area,
    .has-board-content .content-area {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .page-template-board-template .sidebar,
    .board-page .sidebar,
    .has-board-content .sidebar {
        width: 100% !important;
        position: static !important;
        margin-top: 40px !important;
    }
}

/* ==================== 포스트 그리드 반응형 개선 ==================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    width: 100%;
}

.posts-grid-3col {
    grid-template-columns: repeat(3, 1fr);
}

/* 태블릿에서 포스트 그리드 */
@media (max-width: 1200px) and (min-width: 769px) {
    .posts-grid-3col {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px;
    }
}

/* 모바일에서 포스트 그리드 */
@media (max-width: 768px) {
    .posts-grid,
    .posts-grid-3col {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
}

/* ==================== Single Post 레이아웃 개선 ==================== */
.single-post .entry-content {
    padding: 50px 0;
    max-width: 100%;
    margin: 0;
    line-height: 1.8;
    font-size: 16px;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .single-post .entry-content {
        padding: 30px 0;
        font-size: 15px;
    }
}

/* ==================== Archive 페이지 카드 개선 ==================== */
.archive-posts-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.archive-post-card {
    display: flex;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    min-height: 150px;
    max-height: 180px;
}

.archive-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.card-image {
    width: 200px;
    height: 150px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.card-content {
    flex: 1;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 150px;
    overflow: hidden;
}

/* Archive 모바일 반응형 */
@media (max-width: 768px) {
    .archive-post-card {
        flex-direction: column;
        min-height: auto;
        max-height: none;
    }
    
    .card-image {
        width: 100%;
        height: 180px;
    }
    
    .card-content {
        min-height: auto;
        padding: 15px;
    }
}

/* ==================== 컨테이너 최대 너비 보장 ==================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
}

/* ==================== 추가: 모든 페이지 콘텐츠 영역 보장 ==================== */
.site-content {
    padding: 40px 0;
    width: 100%;
}

.site-main {
    width: 100%;
    min-height: calc(100vh - var(--header-height) - 200px);
}

/* ==================== 디버깅: 레이아웃 문제 해결 ==================== */
/* Flexbox fallback 제거 및 명확한 width 설정 */
.content-area,
.sidebar {
    box-sizing: border-box;
}

/* 강제 너비 재설정 (중요도 높음) */
@media (max-width: 1024px) {
    .content-area {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        display: block !important;
    }
    
    .sidebar {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        display: block !important;
        clear: both !important;
    }
}

/* ==================== Archive, Index, Single 공통 수정 ==================== */
.posts-grid,
.archive-posts-cards,
.single-post,
.page-content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Archive 카드 레이아웃 완전 수정 */
@media (max-width: 1024px) {
    .archive-posts-cards {
        width: 100% !important;
    }
    
    .archive-post-card {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 768px) {
    .archive-post-card {
        flex-direction: column !important;
        min-height: auto !important;
        max-height: none !important;
    }
    
    .card-image {
        width: 100% !important;
        height: 180px !important;
    }
    
    .card-content {
        width: 100% !important;
        min-height: auto !important;
        padding: 15px !important;
    }
}

/* ==================== 테스트용 시각적 확인 (개발 완료 후 제거) ==================== */
/*
.content-area {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid red;
}

.sidebar {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid green;
}

.content-wrapper {
    background: rgba(0, 0, 255, 0.05);
    border: 2px dashed blue;
}
*/