/*
Theme Name: 모든계산기 블로그
Theme URI: https://xn--989a00ay0metgwmi.com/blog
Description: 티스토리 스타일의 독립 워드프레스 테마 - 모든계산기 전용
Author: 엑시트컴퍼니
Author URI: https://xn--989a00ay0metgwmi.com
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: modoo-calculator
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.0
*/

/* ============================================
   전역 변수
   ============================================ */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --text-color: #333;
    --light-text: #666;
    --light-bg: #f5f7fa;
    --white: #ffffff;
    --border-color: #e1e8ed;
    --hover-color: #5568d3;
    --card-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

/* ============================================
   전역 리셋
   ============================================ */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: var(--light-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans KR", sans-serif;
    color: var(--text-color);
    line-height: 1.8;
}

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

a:hover {
    color: var(--hover-color);
}

/* ============================================
   헤더 - 티스토리 스타일
   ============================================ */
.site-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.site-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* 상단 헤더 (로고 + 링크) */
.site-branding {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo-area {
    text-align: center;
    flex: 1;
}

.site-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.site-title a {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1px;
    justify-content: center;
}

.site-logo {
    height: 60px;
    width: auto;
    transition: transform 0.3s;
}

.site-name {
    font-size: 2rem;
    font-weight: 700;
}

.site-title a:hover .site-logo {
    transform: rotate(-5deg) scale(1.1);
}

.site-description {
    color: var(--light-text);
    font-size: 0.9rem;
    margin: 8px 0 0;
}

/* 헤더 우측 계산기 링크 */
.calculator-link {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    transition: all 0.3s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 1px;
}

.calculator-icon {
    height: 20px;
    width: auto;
    transition: transform 0.3s;
}

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

.calculator-link:hover .calculator-icon {
    transform: rotate(-10deg) scale(1.1);
}

/* 네비게이션 메뉴 - 티스토리 스타일 (수평) */
.main-navigation {
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
}

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

.nav-menu li {
    position: relative;
}

.nav-menu li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 15px 25px;
    display: block;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.nav-menu li a:hover,
.nav-menu li.current-menu-item a {
    color: var(--primary-color);
    background: var(--light-bg);
}

/* 계산기 CTA 섹션 - 푸터 상단 */
.calculator-cta {
    background: white;
    padding: 40px 0;
    margin-top: 60px;
    border-top: 2px solid var(--light-bg);
}

.cta-content {
    text-align: center;
}

.cta-text {
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 0 0 20px;
    font-weight: 500;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 14px 35px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.cta-icon {
    height: 24px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: transform 0.3s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    color: white;
}

.cta-button:hover .cta-icon {
    transform: rotate(-10deg) scale(1.15);
}

/* ============================================
   레이아웃 (2단 - 메인 + 사이드바)
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.content-area {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

.primary-content {
    min-width: 0;
}

/* ============================================
   포스트 그리드 - 티스토리 스타일
   ============================================ */
.posts-grid {
    display: grid;
    gap: 0;
}

.post-card {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 30px 0;
    transition: all 0.3s;
}

.post-card:hover {
    background: #fafafa;
}

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

.post-categories {
    margin-bottom: 12px;
}

.category-badge {
    display: inline-block;
    background: transparent;
    color: var(--primary-color);
    padding: 0;
    font-size: 0.85rem;
    text-decoration: none;
    margin-right: 8px;
    font-weight: 500;
}

.category-badge:before {
    content: "📁 ";
}

.category-badge:hover {
    text-decoration: underline;
}

.entry-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.5;
}

.entry-title a {
    color: var(--text-color);
    text-decoration: none;
}

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

.entry-meta {
    color: var(--light-text);
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.entry-meta span {
    margin-right: 12px;
}

.entry-meta span:before {
    content: "· ";
    margin-right: 5px;
}

.entry-meta span:first-child:before {
    content: "";
    margin-right: 0;
}

.entry-summary {
    line-height: 1.8;
    color: #666;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.read-more {
    display: inline-block;
    background: transparent;
    color: var(--primary-color);
    padding: 0;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--primary-color);
    transition: all 0.3s;
}

.read-more:hover {
    color: var(--hover-color);
    border-bottom-color: var(--hover-color);
}

/* ============================================
   개별 포스트 (Single) - 티스토리 스타일
   ============================================ */
.single-post {
    background: white;
    border: 1px solid var(--border-color);
    padding: 40px;
}

.single-post .entry-title {
    font-size: 2rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.single-post .entry-content {
    font-size: 1rem;
    line-height: 1.8;
    margin-top: 30px;
    color: #333;
}

.single-post .entry-content h2,
.single-post .entry-content h3 {
    color: var(--text-color);
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 700;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.single-post .entry-content h2 {
    font-size: 1.6rem;
}

.single-post .entry-content h3 {
    font-size: 1.3rem;
}

.single-post .entry-content img {
    max-width: 100%;
    height: auto;
    margin: 25px 0;
}

.single-post .entry-content p {
    margin-bottom: 1.5em;
}

.single-post .entry-content ul,
.single-post .entry-content ol {
    margin: 1.5em 0;
    padding-left: 2em;
}

.single-post .entry-content li {
    margin-bottom: 0.8em;
}

.post-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.tag-badge {
    display: inline-block;
    background: var(--light-bg);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    text-decoration: none;
    margin-right: 5px;
    margin-bottom: 5px;
    transition: all 0.3s;
}

.tag-badge:hover {
    background: var(--primary-color);
    color: white;
}

/* 이전/다음 글 네비게이션 */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.post-navigation a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.post-navigation a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ============================================
   사이드바 - 티스토리 스타일
   ============================================ */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.widget {
    background: white;
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 15px;
}

.widget-title {
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    padding: 10px 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.widget ul li a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
    display: block;
}

.widget ul li a:hover {
    color: var(--primary-color);
}

/* 태그 클라우드 스타일 */
.tagcloud a,
.wp-block-tag-cloud a {
    display: inline-block;
    background: var(--light-bg);
    color: var(--text-color);
    padding: 5px 12px;
    margin: 3px;
    border-radius: 3px;
    font-size: 0.85rem !important;
    text-decoration: none;
    transition: all 0.3s;
}

.tagcloud a:hover,
.wp-block-tag-cloud a:hover {
    background: var(--primary-color);
    color: white;
}

/* 검색 위젯 스타일 */
.widget .search-form {
    display: flex;
    align-items: center;
    background: var(--light-bg);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.widget .search-field {
    border: none;
    padding: 8px 12px;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 0.9rem;
}

.widget .search-submit {
    background: var(--primary-color);
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    color: white;
    font-size: 0.9rem;
}

.widget .search-icon {
    font-size: 0.9rem;
}

/* ============================================
   페이지네이션
   ============================================ */
.pagination {
    text-align: center;
    margin: 40px 0;
}

.page-numbers {
    display: inline-block;
    background: white;
    color: var(--text-color);
    padding: 10px 15px;
    margin: 0 5px;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

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

/* ============================================
   푸터
   ============================================ */
.site-footer {
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-copyright {
    margin: 0 0 15px 0;
    color: var(--light-text);
    font-size: 0.85rem;
}

.footer-copyright a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-copyright a:hover {
    color: var(--primary-color);
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-links .separator {
    color: var(--border-color);
    font-size: 0.85rem;
}

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

.comment-body {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.comment-author img {
    border-radius: 50%;
}

.comment-content {
    line-height: 1.8;
}

/* ============================================
   검색결과 없음
   ============================================ */
.no-posts {
    background: white;
    border-radius: 12px;
    padding: 60px 30px;
    text-align: center;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.no-posts h2 {
    color: var(--text-color);
    margin-bottom: 15px;
}

.no-posts p {
    color: var(--light-text);
}

/* ============================================
   아카이브 헤더
   ============================================ */
.archive-header {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
}

.archive-title {
    color: var(--text-color);
    font-size: 2rem;
    margin-bottom: 10px;
}

.archive-description {
    color: var(--light-text);
    line-height: 1.8;
}

/* ============================================
   검색 결과
   ============================================ */
.search-header {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
}

.search-title {
    color: var(--text-color);
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.search-form-wrapper {
    max-width: 500px;
}

/* ============================================
   404 에러
   ============================================ */
.error-404 {
    background: white;
    border-radius: 12px;
    padding: 60px 30px;
    text-align: center;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.error-404 .page-title {
    font-size: 8rem;
    color: var(--primary-color);
    margin: 0;
    line-height: 1;
}

.error-404 h2 {
    color: var(--text-color);
    margin: 20px 0 10px;
}

.error-404 p {
    color: var(--light-text);
    margin-bottom: 40px;
}

.error-search,
.error-links {
    margin: 40px 0;
}

.error-search h3,
.error-links h3 {
    color: var(--text-color);
    margin-bottom: 20px;
}

.error-links ul {
    list-style: none;
    padding: 0;
}

.error-links li {
    margin: 10px 0;
}

.error-links a {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* ============================================
   댓글
   ============================================ */
.comments-area {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin-top: 40px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
}

.comments-title {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
}

.comment-list .children {
    list-style: none;
    margin-left: 40px;
}

.comment-body {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.comment-author img {
    border-radius: 50%;
}

.comment-author strong {
    color: var(--text-color);
}

.comment-author time {
    color: var(--light-text);
    font-size: 0.9rem;
}

.comment-content {
    line-height: 1.8;
    margin-bottom: 10px;
}

.comment-reply-link {
    color: var(--primary-color);
    font-size: 0.9rem;
    text-decoration: none;
}

.comment-form label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-color);
    font-weight: 500;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 15px;
}

.comment-form input[type="submit"] {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.comment-form input[type="submit"]:hover {
    background: var(--hover-color);
    transform: translateY(-2px);
}

/* ============================================
   페이지
   ============================================ */
.single-page {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
}

.single-page .entry-title {
    font-size: 2.2rem;
    margin-bottom: 30px;
}

.single-page .entry-content {
    line-height: 2;
}

/* ============================================
   반응형 디자인
   ============================================ */
@media (max-width: 768px) {
    .content-area {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
    
    .site-branding {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .site-logo {
        height: 50px;
    }
    
    .site-name {
        font-size: 1.5rem;
    }
    
    .calculator-link {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
    
    .calculator-icon {
        height: 18px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 10px;
    }
    
    .cta-text {
        font-size: 1rem;
    }
    
    .cta-button {
        padding: 12px 28px;
        font-size: 0.9rem;
    }
    
    .cta-icon {
        height: 20px;
    }
    
    .header-search {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .post-card,
    .single-post,
    .single-page,
    .comments-area {
        padding: 20px;
    }
    
    .entry-title {
        font-size: 1.4rem;
    }
    
    .single-post .entry-title,
    .single-page .entry-title {
        font-size: 1.6rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .comment-list .children {
        margin-left: 20px;
    }
    
    .error-404 .page-title {
        font-size: 5rem;
    }
}
