/*
Theme Name: Paytools Blog
Theme URI: https://paytools.work
Description: Paytools Blog 전용 독립형 테마 - 급여·노무 정보 블로그
Author: Paytools
Author URI: https://paytools.work
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: paytools-blog
*/

/* ===== CSS Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #3d84f5;
    --primary-dark: #1d4ed8;
    --paytools-green: #10B981;
    --bg-light: #f8f9fc;
    --text-dark: #0d131c;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --border-color: #e7ecf4;
    --white: #ffffff;
    --header-height: 72px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

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

ul, ol {
    list-style: none;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

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

.container-narrow {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

.main-nav {
    display: none;
}

@media (min-width: 1024px) {
    .main-nav {
        display: flex;
        align-items: center;
        gap: 2rem;
    }
}

.main-nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-gray);
}

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

.header-cta {
    display: none;
    padding: 10px 20px;
    background: var(--paytools-green);
    color: white;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    transition: background-color 0.2s;
}

.header-cta:hover {
    background: #059669;
    color: white;
}

@media (min-width: 640px) {
    .header-cta {
        display: inline-flex;
    }
}

.header-spacer {
    height: var(--header-height);
}

/* ===== Hero Section ===== */
.hero-section {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 4rem 20px;
    text-align: center;
}

@media (min-width: 768px) {
    .hero-section {
        padding: 6rem 20px;
    }
}

.hero-title {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 1rem;
    word-break: keep-all;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-gray);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-form {
    max-width: 560px;
    margin: 0 auto;
    position: relative;
}

.search-form input[type="search"] {
    width: 100%;
    height: 56px;
    padding: 0 120px 0 48px;
    background: #f0f4f8;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
}

@media (min-width: 768px) {
    .search-form input[type="search"] {
        height: 64px;
    }
}

.search-form input[type="search"]:focus {
    background: var(--white);
    border-color: rgba(61, 132, 245, 0.5);
}

.search-form .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    pointer-events: none;
}

.search-form button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-form button:hover {
    background: var(--primary-dark);
}

.search-tags {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.search-tags a {
    display: inline-block;
    padding: 4px 8px;
    background: #f3f4f6;
    border-radius: 6px;
    margin: 2px;
    transition: background-color 0.2s;
}

.search-tags a:hover {
    background: #e5e7eb;
}

/* ===== Section Styles ===== */
.section {
    padding: 4rem 20px;
}

.section-white {
    background: var(--white);
}

.section-light {
    background: var(--bg-light);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 700;
}

.section-title .icon {
    color: var(--primary);
}

.section-title .icon-fire {
    color: #ef4444;
}

.section-more {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 4px;
}

.section-more:hover {
    color: var(--primary);
}

/* ===== Post Grid ===== */
.post-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .post-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== Post Card ===== */
.post-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #f3f4f6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.post-card:hover {
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}

.post-card-image {
    aspect-ratio: 16/9;
    width: 100%;
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.post-card-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e7ff 0%, #f0f4f8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.post-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-card-category {
    display: inline-block;
    padding: 4px 10px;
    background: #eff6ff;
    color: var(--primary);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    width: fit-content;
}

.post-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    word-break: keep-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.post-card-excerpt {
    color: var(--text-gray);
    font-size: 0.875rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}

.post-card-meta {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
    font-size: 0.75rem;
    color: var(--text-light);
    display: flex;
    justify-content: space-between;
}

/* ===== Simple Post Card (No Image) ===== */
.post-card-simple {
    background: var(--white);
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid #f3f4f6;
    transition: all 0.2s;
}

.post-card-simple:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.post-card-simple-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.post-card-simple .post-card-category {
    margin-bottom: 0;
}

.post-card-simple .post-card-title {
    margin-bottom: 0.75rem;
}

.post-card-simple .read-more {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 700;
    margin-top: auto;
}

/* ===== CTA Section ===== */
.cta-section {
    padding: 5rem 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: 1.875rem;
    font-weight: 900;
    color: var(--white);
    margin-bottom: 1.5rem;
    word-break: keep-all;
}

@media (min-width: 768px) {
    .cta-title {
        font-size: 2.25rem;
    }
}

.cta-subtitle {
    font-size: 1.125rem;
    color: #bfdbfe;
    margin-bottom: 2.5rem;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

@media (min-width: 640px) {
    .cta-buttons {
        flex-direction: row;
    }
}

.cta-btn-primary {
    padding: 1rem 2rem;
    background: var(--white);
    color: #1d4ed8;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.2s;
}

.cta-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    color: #1d4ed8;
}

.cta-btn-secondary {
    padding: 1rem 2rem;
    background: rgba(59, 130, 246, 0.5);
    color: var(--white);
    border: 1px solid #60a5fa;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 700;
    transition: all 0.2s;
}

.cta-btn-secondary:hover {
    background: rgba(59, 130, 246, 0.7);
    color: var(--white);
}

/* ===== Footer ===== */
.site-footer {
    background: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 4rem 20px 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

.footer-brand .site-logo {
    margin-bottom: 1.5rem;
}

.footer-brand p {
    color: var(--text-gray);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

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

.footer-social a {
    color: var(--text-light);
    transition: color 0.2s;
}

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

.footer-nav h4 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-nav ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-nav a {
    font-size: 0.875rem;
    color: var(--text-gray);
}

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

.footer-bottom {
    border-top: 1px solid #f3f4f6;
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-light);
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

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

/* ===== Single Post ===== */
.single-post {
    background: var(--white);
    padding: 3rem 20px;
}

.single-post-inner {
    max-width: 800px;
    margin: 0 auto;
}

.single-post-header {
    margin-bottom: 2rem;
    text-align: center;
}

.single-post-category {
    display: inline-block;
    padding: 6px 14px;
    background: #eff6ff;
    color: var(--primary);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.single-post-title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 1rem;
    word-break: keep-all;
}

@media (min-width: 768px) {
    .single-post-title {
        font-size: 2.5rem;
    }
}

.single-post-meta {
    color: var(--text-light);
    font-size: 0.875rem;
}

.single-post-featured {
    margin-bottom: 2rem;
    border-radius: 16px;
    overflow: hidden;
}

.single-post-featured img {
    width: 100%;
    height: auto;
}

.single-post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.single-post-content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

.single-post-content h3 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem;
}

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

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

.single-post-content ul {
    list-style: disc;
}

.single-post-content ol {
    list-style: decimal;
}

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

.single-post-content a {
    color: var(--primary);
    text-decoration: underline;
}

.single-post-content blockquote {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--bg-light);
    border-left: 4px solid var(--primary);
    border-radius: 0 8px 8px 0;
}

.single-post-content img {
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* ===== Post CTA Box ===== */
.post-cta-box {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    border-radius: 16px;
    text-align: center;
}

.post-cta-box h3 {
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.post-cta-box p {
    color: #bfdbfe;
    margin-bottom: 1rem;
}

.post-cta-box a {
    display: inline-block;
    padding: 12px 24px;
    background: var(--white);
    color: #1d4ed8;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
}

.post-cta-box a:hover {
    background: #f0f4f8;
}

/* ===== Related Posts ===== */
.related-posts {
    padding: 3rem 20px;
    background: var(--bg-light);
}

.related-posts-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.related-posts .section-title {
    margin-bottom: 2rem;
}

/* ===== Archive Page ===== */
.archive-header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 3rem 20px;
    text-align: center;
}

.archive-title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.archive-description {
    color: var(--text-gray);
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-gray);
    transition: all 0.2s;
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

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

/* ===== 404 Page ===== */
.error-404 {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 20px;
}

.error-404 h1 {
    font-size: 6rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 1rem;
}

.error-404 p {
    font-size: 1.25rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.error-404 a {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary);
    color: var(--white);
    border-radius: 8px;
    font-weight: 700;
}

/* ===== Material Icons ===== */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400;
    font-size: 24px;
    vertical-align: middle;
}

/* ===== Utility Classes ===== */
.text-center {
    text-align: center;
}

.hidden {
    display: none;
}

@media (min-width: 1024px) {
    .lg\:flex {
        display: flex;
    }
    .lg\:hidden {
        display: none;
    }
}

/* ===== WordPress Core Styles ===== */
.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.875rem;
    color: var(--text-gray);
    margin-top: 0.5rem;
}

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