/*
Theme Name: Aijeong
Theme URI: https://example.com/aijeong
Author: Your Name
Author URI: https://example.com
Description: A modern and clean WordPress theme for Aijeong project.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aijeong
Tags: modern, clean, responsive, custom
*/

/* Font */
@font-face {
    font-family: 'Pretendard';
    font-weight: 900;
    font-display: swap;
    src: local('Pretendard Black'), url(./src/fonts/Pretendard-Black.subset.woff2) format('woff2');
}

@font-face {
    font-family: 'Pretendard';
    font-weight: 800;
    font-display: swap;
    src: local('Pretendard ExtraBold'), url(./src/fonts/Pretendard-ExtraBold.subset.woff2) format('woff2');
}

@font-face {
    font-family: 'Pretendard';
    font-weight: 700;
    font-display: swap;
    src: local('Pretendard Bold'), url(./src/fonts/Pretendard-Bold.subset.woff2) format('woff2');
}

@font-face {
    font-family: 'Pretendard';
    font-weight: 600;
    font-display: swap;
    src: local('Pretendard SemiBold'), url(./src/fonts/Pretendard-SemiBold.subset.woff2) format('woff2');
}

@font-face {
    font-family: 'Pretendard';
    font-weight: 500;
    font-display: swap;
    src: local('Pretendard Medium'), url(./src/fonts/Pretendard-Medium.subset.woff2) format('woff2');
}

@font-face {
    font-family: 'Pretendard';
    font-weight: 400;
    font-display: swap;
    src: local('Pretendard Regular'), url(./src/fonts/Pretendard-Regular.subset.woff2) format('woff2');
}

@font-face {
    font-family: 'Pretendard';
    font-weight: 300;
    font-display: swap;
    src: local('Pretendard Light'), url(./src/fonts/Pretendard-Light.subset.woff2) format('woff2');
}

@font-face {
    font-family: 'Pretendard';
    font-weight: 200;
    font-display: swap;
    src: local('Pretendard ExtraLight'), url(./src/fonts/Pretendard-ExtraLight.subset.woff2) format('woff2');
}

@font-face {
    font-family: 'Pretendard';
    font-weight: 100;
    font-display: swap;
    src: local('Pretendard Thin'), url(./src/fonts/Pretendard-Thin.subset.woff2) format('woff2');
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* 기본 제목 크기 리셋 - page-single에서만 */
.page-single h1,
.page-single h2,
.page-single h3,
.page-single h4 {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 다크모드 스타일 */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

/* Dark mode header - 더 구체적인 선택자 사용 */
body.dark-mode #masthead.site-header,
body.dark-mode header.site-header,
/* Dark mode header - 더 구체적인 선택자로 우선순위 확보 */
body.dark-mode #masthead.site-header,
body.dark-mode header.site-header,
body.dark-mode .site-header {
    background-color: #1a1a1a !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .site-title a {
    color: #e0e0e0;
}

body.dark-mode .main-navigation a {
    color: #e0e0e0;
}

body.dark-mode .main-navigation a:hover {
    color: #1E3FA8;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Page Content Wrapper - Medium 스타일 */
.page-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.page-single {
    background-color: #fff;
    border-radius: 8px;
    padding: 3rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.page-single .entry-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #eee;
}

.page-single .post-thumbnail {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-single .post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.page-single .post-content {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #333;
}

.page-single .post-content p {
    margin-bottom: 1.5rem;
}

.page-single .post-content h2 {
    font-size: 1.75rem !important;
    font-weight: 600 !important;
    margin-top: 2.5rem !important;
    margin-bottom: 1rem !important;
    color: #333 !important;
    line-height: 1.4 !important;
}

.page-single .post-content h3 {
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    margin-top: 2rem !important;
    margin-bottom: 1rem !important;
    color: #333 !important;
    line-height: 1.4 !important;
}

.page-single .post-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #333;
}

.page-single .post-content ul,
.page-single .post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.page-single .post-content li {
    margin-bottom: 0.5rem;
}

/* 다크모드 페이지 스타일 */
body.dark-mode .page-single {
    background-color: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .page-single .entry-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .page-single .entry-header .post-title,
body.dark-mode .page-single h1.post-title {
    color: #fff !important;
    font-size: 2.5rem !important;
    font-weight: 700 !important;
}

body.dark-mode .page-single .post-content {
    color: #e0e0e0;
}

body.dark-mode .page-single .post-content h2,
body.dark-mode .page-single .post-content h3,
body.dark-mode .page-single .post-content h4 {
    color: #fff !important;
}

body.dark-mode .page-single .post-content a {
    color: #1E3FA8;
}

body.dark-mode .page-single .post-content a:hover {
    color: #0B2077;
}

/* Comments Section */
.comments-section {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid #eee;
}

.comments-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #333;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.comment-list li {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.comment-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.comment-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-author {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.comment-author img {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.comment-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.comment-meta .fn {
    font-weight: 600;
    font-style: normal;
    color: #333;
    text-decoration: none;
}

.comment-meta time {
    font-size: 0.9rem;
    color: #666;
}

.comment-content {
    margin-left: 66px;
    line-height: 1.6;
    color: #333;
}

.comment-content p {
    margin-bottom: 0.5rem;
}

.comment-reply {
    margin-left: 66px;
}

.comment-reply a {
    font-size: 0.9rem;
    color: #0B2077;
    text-decoration: none;
    transition: color 0.3s;
}

.comment-reply a:hover {
    color: #1E3FA8;
}

/* Comment Form */
.comment-form {
    margin-top: 2rem;
}

.comment-form p {
    margin-bottom: 1rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.comment-form .required {
    color: #d63638;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #0B2077;
}

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

.comment-form .form-submit {
    margin-top: 1rem;
}

.comment-form input[type="submit"] {
    background-color: #0B2077;
    color: #fff;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.comment-form input[type="submit"]:hover {
    background-color: #1E3FA8;
}

/* 다크모드 코멘트 스타일 */
body.dark-mode .comments-section {
    border-top-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .comments-title {
    color: #fff !important;
}

body.dark-mode .comment-list li {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .comment-meta .fn {
    color: #fff;
}

body.dark-mode .comment-meta time {
    color: #999;
}

body.dark-mode .comment-content {
    color: #e0e0e0;
}

body.dark-mode .comment-reply a {
    color: #1E3FA8;
}

body.dark-mode .comment-reply a:hover {
    color: #0B2077;
}

body.dark-mode .comment-form label {
    color: #e0e0e0;
}

body.dark-mode .comment-form input[type="text"],
body.dark-mode .comment-form input[type="email"],
body.dark-mode .comment-form input[type="url"],
body.dark-mode .comment-form textarea {
    background-color: #1a1a1a;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-mode .comment-form input[type="text"]:focus,
body.dark-mode .comment-form input[type="email"]:focus,
body.dark-mode .comment-form input[type="url"]:focus,
body.dark-mode .comment-form textarea:focus {
    border-color: #1E3FA8;
}

body.dark-mode .comment-form input[type="submit"] {
    background-color: #1E3FA8;
}

body.dark-mode .comment-form input[type="submit"]:hover {
    background-color: #0B2077;
}

/* Custom Page Links */
.page-links-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    gap: 1rem;
}

.page-link-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: #f5f5f5;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.page-link-nav:hover {
    background-color: #0B2077;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(11, 32, 119, 0.3);
}

.page-link-nav.page-link-disabled {
    opacity: 0;
    pointer-events: none;
}

.page-link-arrow {
    font-size: 1.2rem;
    font-weight: 600;
}

.page-link-numbers {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    flex: 1;
}

.page-link-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border-radius: 6px;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-link-number:hover {
    background-color: #f5f5f5;
    color: #0B2077;
}

.page-link-number.page-link-current {
    background-color: #0B2077;
    color: #fff;
    font-weight: 600;
}

/* 다크모드 페이지 링크 스타일 */
body.dark-mode .page-links-custom {
    border-top-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .page-link-nav {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .page-link-nav:hover {
    background-color: #1E3FA8;
    color: #fff;
}

body.dark-mode .page-link-number {
    color: #999;
}

body.dark-mode .page-link-number:hover {
    background-color: #1a1a1a;
    color: #1E3FA8;
}

body.dark-mode .page-link-number.page-link-current {
    background-color: #1E3FA8;
    color: #fff;
}

/* 페이지 제목 크기 우선순위 확보 - 파일 끝에 배치 */
.page-single .entry-header h1.post-title,
.page-single article .entry-header .post-title,
.page-single h1 {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}

.page-single .post-content h2,
.page-single article .post-content h2 {
    font-size: 1.75rem !important;
    font-weight: 600 !important;
}

.page-single .post-content h3,
.page-single article .post-content h3 {
    font-size: 1.4rem !important;
    font-weight: 600 !important;
}

body.dark-mode .page-single .entry-header h1.post-title,
body.dark-mode .page-single article .entry-header .post-title,
body.dark-mode .page-single h1 {
    color: #fff !important;
    font-size: 2.5rem !important;
    font-weight: 700 !important;
}

/* Header */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-bottom 0.3s ease;
    width: 100%;
}

.header-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    gap: 1rem;
    width: 100%;
    flex-wrap: nowrap;
}

.header-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

/* Site Branding - React 로드 전 스타일 보장 */
.site-branding {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    min-width: 0;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    display: flex;
    align-items: center;
}

.site-title a {
    text-decoration: none;
    color: #333;
    display: inline-block;
}

.site-title a:hover {
    color: #0B2077;
}

.site-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 0;
}

.site-logo {
    height: 40px;
    width: auto;
    transition: opacity 0.3s ease;
    display: block;
}

/* h-10 클래스 대체 */
.h-10 {
    height: 2.5rem;
    /* 40px */
}

.logo-light {
    display: block;
}

.logo-dark {
    display: none;
}

body.dark-mode .logo-light {
    display: none;
}

body.dark-mode .logo-dark {
    display: block;
}

/* Navigation - React 로드 전 스타일 보장 */
#site-navigation {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    margin-left: auto;
}

/* Tailwind 클래스 대체 - flex items-center gap-4 */
.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.gap-4 {
    gap: 1rem;
}

.list-none {
    list-style: none;
}

.m-0 {
    margin: 0;
}

.p-0 {
    padding: 0;
}

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

#site-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
    align-items: center;
    flex-wrap: wrap;
}

/* React 로드 전 메뉴 항목 스타일 보장 */
#site-navigation ul li {
    margin: 0;
    padding: 0;
    list-style: none;
}

#site-navigation ul li a {
    display: block;
    white-space: nowrap;
}

#site-navigation a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

#site-navigation a:hover {
    color: #0B2077;
}

body.dark-mode #site-navigation a {
    color: #e0e0e0;
}

body.dark-mode #site-navigation a:hover {
    color: #1E3FA8;
}

/* Main Content */
.site-main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* Posts */
.post {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.post:last-child {
    border-bottom: none;
}

.post-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.post-title a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

.post-title a:hover {
    color: #0B2077;
}

.post-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.post-content {
    margin-top: 1rem;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Footer */
.site-footer {
    background-color: #333;
    color: #fff;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-left {
    flex: 1;
    min-width: 300px;
}

.footer-tagline {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #fff;
}

.footer-info {
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer-info p {
    margin: 0.5rem 0;
    color: #e0e0e0;
}

.footer-info a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-info a:hover {
    color: #1E3FA8;
}

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

.footer-social {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-link {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: all 0.3s;
    text-align: center;
}

.social-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #1E3FA8;
    color: #1E3FA8;
}

.footer-copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: #999;
}

/* 다크모드 Footer 스타일 */
body.dark-mode .site-footer {
    background-color: #1a1a1a;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .footer-info p {
    color: #ccc;
}

body.dark-mode .footer-info a:hover {
    color: #1E3FA8;
}

body.dark-mode .social-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: #1E3FA8;
    color: #1E3FA8;
}

/* 반응형 Footer */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
    }

    .footer-left,
    .footer-right {
        width: 100%;
    }

    .footer-social {
        flex-direction: row;
        justify-content: flex-start;
    }

    .social-link {
        flex: 1;
        max-width: 200px;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #0B2077;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #1E3FA8;
}

/* Front Page Styles */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 6rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #fff;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background-color: #fff;
    color: #667eea;
}

.btn-primary:hover {
    background-color: #f0f0f0;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid #fff;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #fff;
    color: #667eea;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Section Styles */
.about-section,
.services-section,
.recent-posts-section {
    padding: 4rem 0;
}

.about-section {
    background-color: #f9f9f9;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: #333;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-item {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.service-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.service-item p {
    color: #666;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.post-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
}

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

.post-card .post-thumbnail {
    width: 100%;
    overflow: hidden;
}

.post-card .post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.post-card .post-content {
    padding: 1.5rem;
}

.post-card .post-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.post-card .post-title a {
    color: #333;
}

.post-card .post-meta {
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-card .post-excerpt {
    margin-bottom: 1rem;
    color: #666;
}


/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 4rem 0;
    text-align: center;
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.cta-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Category Archive Styles */
.blog-grid,
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #eee;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.archive-description {
    color: #666;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        gap: 1rem;
        flex-wrap: nowrap;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    /* 모바일 메뉴 토글 버튼 */
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 30px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
    }

    .mobile-menu-toggle .hamburger-line {
        width: 100%;
        height: 3px;
        background-color: #333;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    body.dark-mode .mobile-menu-toggle .hamburger-line {
        background-color: #fff;
    }

    .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }

    /* 데스크톱에서는 햄버거 메뉴 숨김 */
    .mobile-menu-toggle {
        display: none;
    }

    /* 모바일 네비게이션 스타일 */
    @media (max-width: 768px) {
        .mobile-menu-toggle {
            display: flex;
        }

        #site-navigation {
            position: fixed;
            top: 0;
            right: -100%;
            width: 80%;
            max-width: 300px;
            height: 100vh;
            background-color: #fff;
            box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
            transition: right 0.3s ease;
            z-index: 1000;
            padding: 4rem 2rem 2rem;
            overflow-y: auto;
        }

        #site-navigation.active {
            right: 0;
        }

        #site-navigation ul {
            flex-direction: column;
            gap: 1.5rem;
            align-items: flex-start;
        }

        #site-navigation ul li {
            width: 100%;
        }

        #site-navigation ul li a {
            display: block;
            padding: 0.75rem 0;
            font-size: 1.1rem;
        }

        .theme-toggle {
            margin-top: 1rem;
        }

        /* 모바일 메뉴 오버레이 */
        .mobile-menu-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 999;
        }

        .mobile-menu-overlay.active {
            display: block;
        }

        body.dark-mode #site-navigation {
            background-color: #1a1a1a;
            box-shadow: -2px 0 10px rgba(0, 0, 0, 0.5);
        }
    }

    /* 모바일 메뉴 토글 버튼 */
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 30px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
    }

    .mobile-menu-toggle .hamburger-line {
        width: 100%;
        height: 3px;
        background-color: #333;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    body.dark-mode .mobile-menu-toggle .hamburger-line {
        background-color: #fff;
    }

    .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }

    /* 데스크톱에서는 햄버거 메뉴 숨김 */
    .mobile-menu-toggle {
        display: none;
    }

    /* 모바일 네비게이션 스타일 */
    @media (max-width: 768px) {
        .mobile-menu-toggle {
            display: flex;
        }

        #site-navigation {
            position: fixed;
            top: 0;
            right: -100%;
            width: 80%;
            max-width: 300px;
            height: 100vh;
            background-color: #fff;
            box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
            transition: right 0.3s ease;
            z-index: 1000;
            padding: 4rem 2rem 2rem;
            overflow-y: auto;
        }

        #site-navigation.active {
            right: 0;
        }

        #site-navigation ul {
            flex-direction: column;
            gap: 1.5rem;
            align-items: flex-start;
        }

        #site-navigation ul li {
            width: 100%;
        }

        #site-navigation ul li a {
            display: block;
            padding: 0.75rem 0;
            font-size: 1.1rem;
        }

        .theme-toggle {
            margin-top: 1rem;
        }

        /* 모바일 메뉴 오버레이 */
        .mobile-menu-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 999;
        }

        .mobile-menu-overlay.active {
            display: block;
        }

        body.dark-mode #site-navigation {
            background-color: #1a1a1a;
            box-shadow: -2px 0 10px rgba(0, 0, 0, 0.5);
        }
    }

    .post-title {
        font-size: 1.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .posts-grid,
    .blog-grid,
    .education-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 2px solid #333;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    background-color: #f0f0f0;
    transform: scale(1.1);
}

body.dark-mode .theme-toggle {
    border-color: #e0e0e0;
}

body.dark-mode .theme-toggle:hover {
    background-color: #3a3a3a;
}

.theme-toggle-icon {
    font-size: 20px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    position: absolute;
    display: block;
}

.sun-icon {
    display: block;
    opacity: 1;
    transform: rotate(0deg);
}

.moon-icon {
    display: none;
    opacity: 0;
    transform: rotate(90deg);
}

body.dark-mode .sun-icon {
    display: none;
    opacity: 0;
    transform: rotate(90deg);
}

body.dark-mode .moon-icon {
    display: block;
    opacity: 1;
    transform: rotate(0deg);
}

/* 다크모드 추가 스타일 */
body.dark-mode .site-main {
    background-color: #1a1a1a;
}

body.dark-mode .post {
    border-bottom-color: #3a3a3a;
}

body.dark-mode .post-title a {
    color: #e0e0e0;
}

body.dark-mode .post-title a:hover {
    color: #1E3FA8;
}

body.dark-mode .post-meta {
    color: #999;
}

body.dark-mode .btn {
    background-color: #1E3FA8;
    color: #fff;
}

body.dark-mode .btn:hover {
    background-color: #0B2077;
}

/* 다크모드 카드 스타일 - 파일 끝에 배치하여 우선순위 확보 */
body.dark-mode .post-card,
body.dark-mode .education-card,
body.dark-mode .blog-card,
body.dark-mode article.post-card,
body.dark-mode article.education-card,
body.dark-mode article.blog-card {
    background-color: #2a2a2a !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .post-card:hover,
body.dark-mode .education-card:hover,
body.dark-mode .blog-card:hover,
body.dark-mode article.post-card:hover,
body.dark-mode article.education-card:hover,
body.dark-mode article.blog-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
    transform: translateY(-5px);
}

body.dark-mode .post-card .post-content,
body.dark-mode .education-card .post-content,
body.dark-mode .blog-card .post-content {
    background-color: #2a2a2a !important;
}

body.dark-mode .post-card .post-title a,
body.dark-mode .education-card .post-title a,
body.dark-mode .blog-card .post-title a {
    color: #e0e0e0 !important;
}

body.dark-mode .post-card .post-title a:hover,
body.dark-mode .education-card .post-title a:hover,
body.dark-mode .blog-card .post-title a:hover {
    color: #1E3FA8 !important;
}

body.dark-mode .post-card .post-meta,
body.dark-mode .education-card .post-meta,
body.dark-mode .blog-card .post-meta {
    color: #999 !important;
}

body.dark-mode .post-card .post-excerpt,
body.dark-mode .education-card .post-excerpt,
body.dark-mode .blog-card .post-excerpt {
    color: #ccc !important;
}

/* 다크모드 페이지 헤더 스타일 */
body.dark-mode .page-header {
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .page-title {
    color: #fff !important;
}

body.dark-mode .archive-description,
body.dark-mode .archive-description p {
    color: #fff !important;
}

/* 페이지 제목 크기 우선순위 최종 확보 - 파일 최종 위치 */
.page-single article .entry-header h1.post-title,
.page-single .entry-header h1.post-title,
.page-single article h1.post-title,
.page-single h1.post-title {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    color: #333 !important;
}

.page-single .post-content h2,
.page-single article .post-content h2 {
    font-size: 1.75rem !important;
    font-weight: 600 !important;
    margin-top: 2.5rem !important;
    margin-bottom: 1rem !important;
    color: #333 !important;
    line-height: 1.4 !important;
}

.page-single .post-content h3,
.page-single article .post-content h3 {
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    margin-top: 2rem !important;
    margin-bottom: 1rem !important;
    color: #333 !important;
    line-height: 1.4 !important;
}

body.dark-mode .page-single article .entry-header h1.post-title,
body.dark-mode .page-single .entry-header h1.post-title,
body.dark-mode .page-single article h1.post-title,
body.dark-mode .page-single h1.post-title {
    color: #fff !important;
    font-size: 2.5rem !important;
    font-weight: 700 !important;
}

/* Post Navigation */
.navigation.post-navigation {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid #eee;
}

.navigation.post-navigation .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.navigation.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.navigation.post-navigation .nav-previous,
.navigation.post-navigation .nav-next {
    flex: 1;
    min-width: 200px;
}

.navigation.post-navigation .nav-previous a,
.navigation.post-navigation .nav-next a {
    display: block;
    padding: 1.5rem;
    background-color: #f5f5f5;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.navigation.post-navigation .nav-previous a:hover,
.navigation.post-navigation .nav-next a:hover {
    background-color: #0B2077;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(11, 32, 119, 0.3);
    border-color: #0B2077;
}

.navigation.post-navigation .nav-subtitle {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.navigation.post-navigation .nav-title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.navigation.post-navigation .nav-previous a:hover .nav-subtitle,
.navigation.post-navigation .nav-next a:hover .nav-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.navigation.post-navigation .nav-previous a:hover .nav-title,
.navigation.post-navigation .nav-next a:hover .nav-title {
    color: #fff;
}

/* 다크모드 Post Navigation */
body.dark-mode .navigation.post-navigation {
    border-top-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .navigation.post-navigation .nav-previous a,
body.dark-mode .navigation.post-navigation .nav-next a {
    background-color: #1a1a1a;
    border-color: #555;
}

body.dark-mode .navigation.post-navigation .nav-subtitle {
    color: #999;
}

body.dark-mode .navigation.post-navigation .nav-title {
    color: #e0e0e0;
}

body.dark-mode .navigation.post-navigation .nav-previous a:hover,
body.dark-mode .navigation.post-navigation .nav-next a:hover {
    background-color: #1E3FA8;
    border-color: #1E3FA8;
}

body.dark-mode .navigation.post-navigation .nav-previous a:hover .nav-subtitle,
body.dark-mode .navigation.post-navigation .nav-next a:hover .nav-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

body.dark-mode .navigation.post-navigation .nav-previous a:hover .nav-title,
body.dark-mode .navigation.post-navigation .nav-next a:hover .nav-title {
    color: #fff;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .navigation.post-navigation .nav-links {
        flex-direction: column;
        gap: 1rem;
    }

    .navigation.post-navigation .nav-previous,
    .navigation.post-navigation .nav-next {
        flex: 1;
        min-width: 100%;
    }
}