/* ============================================
   Craft-Wood Design Pattern
   교대 저녁 보양식 - 향촌흑염소
   ============================================ */

:root {
    --cw-bg: #1a1208;
    --cw-bg2: #2a1f10;
    --cw-bg3: #3a2e18;
    --cw-card: #2a1f10;
    --cw-border: #4a3c24;
    --cw-gold: #c4a86c;
    --cw-gold-light: #d4c08c;
    --cw-brown: #8b6914;
    --cw-brown-dark: #5c3d0e;
    --cw-green: #4a7c3f;
    --cw-green-dark: #2d5a27;
    --cw-text: #f5f0e8;
    --cw-text-sub: #c4b898;
    --cw-text-muted: #9a8b70;
    --cw-accent: #d4af55;
    --cw-warm: #b8860b;
    --cw-serif: 'Noto Serif KR', 'Georgia', serif;
    --cw-sans: 'Noto Sans KR', 'Helvetica Neue', sans-serif;
}

/* WordPress Post/Page Custom Styling */
body.single, body.page, body.archive, body.search, body.category {
    background: var(--cw-bg) !important;
    color: var(--cw-text) !important;
    font-family: var(--cw-sans) !important;
    line-height: 1.9;
}

/* Entry content */
.entry-content, .wp-block-post-content, article.post, article.page {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px;
}

.entry-content h1, .entry-content h2, .entry-content h3,
.wp-block-post-content h1, .wp-block-post-content h2, .wp-block-post-content h3 {
    font-family: var(--cw-serif) !important;
    color: var(--cw-gold) !important;
    line-height: 1.4;
    margin-top: 2em;
    margin-bottom: 0.8em;
}

.entry-content h1, .wp-block-post-content h1 { font-size: 2em; }
.entry-content h2, .wp-block-post-content h2 { font-size: 1.6em; border-bottom: 2px solid var(--cw-border); padding-bottom: 0.4em; }
.entry-content h3, .wp-block-post-content h3 { font-size: 1.3em; color: var(--cw-gold-light) !important; }

.entry-content p, .wp-block-post-content p {
    color: var(--cw-text) !important;
    font-size: 16px;
    line-height: 2;
    margin-bottom: 1.5em;
}

.entry-content a, .wp-block-post-content a {
    color: var(--cw-accent) !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.entry-content a:hover, .wp-block-post-content a:hover {
    color: var(--cw-gold-light) !important;
}

.entry-content img, .wp-block-post-content img {
    border-radius: 12px;
    border: 1px solid var(--cw-border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.entry-content blockquote, .wp-block-post-content blockquote {
    border-left: 4px solid var(--cw-gold);
    background: var(--cw-bg2);
    padding: 20px 24px;
    margin: 2em 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--cw-text-sub);
}

.entry-content ul, .entry-content ol,
.wp-block-post-content ul, .wp-block-post-content ol {
    padding-left: 1.5em;
    margin-bottom: 1.5em;
}

.entry-content li, .wp-block-post-content li {
    color: var(--cw-text);
    margin-bottom: 0.5em;
    line-height: 1.8;
}

.entry-content table, .wp-block-post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    background: var(--cw-bg2);
    border-radius: 8px;
    overflow: hidden;
}

.entry-content th, .wp-block-post-content th {
    background: var(--cw-bg3);
    color: var(--cw-gold);
    font-weight: 700;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid var(--cw-gold);
}

.entry-content td, .wp-block-post-content td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--cw-border);
    color: var(--cw-text-sub);
}

/* WordPress Header/Navigation override */
.wp-site-blocks header, header.wp-block-template-part {
    background: rgba(26, 18, 8, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--cw-border);
}

.wp-site-blocks header a, header.wp-block-template-part a {
    color: var(--cw-gold) !important;
    font-family: var(--cw-serif);
}

/* WordPress Footer override */
.wp-site-blocks footer, footer.wp-block-template-part {
    background: var(--cw-bg) !important;
    color: var(--cw-text-muted) !important;
    border-top: 1px solid var(--cw-border);
}

/* Post title */
.wp-block-post-title, h1.entry-title, .entry-title {
    font-family: var(--cw-serif) !important;
    color: var(--cw-gold) !important;
    font-size: clamp(24px, 4vw, 36px) !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
    margin-bottom: 16px !important;
}

/* Post meta */
.wp-block-post-date, .entry-meta, .post-date {
    color: var(--cw-text-muted) !important;
    font-size: 14px !important;
}

/* Featured image */
.wp-block-post-featured-image img, .post-thumbnail img {
    border-radius: 12px !important;
    border: 1px solid var(--cw-border) !important;
}

/* Archive / Category pages */
.wp-block-query .wp-block-post {
    background: var(--cw-card);
    border: 1px solid var(--cw-border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.wp-block-query .wp-block-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

/* Sidebar / widgets */
.widget, .wp-block-widget {
    background: var(--cw-card);
    border: 1px solid var(--cw-border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.widget-title, .wp-block-heading {
    color: var(--cw-gold) !important;
    font-family: var(--cw-serif);
}

/* Comments */
.comment-body {
    background: var(--cw-bg2);
    border: 1px solid var(--cw-border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}

.comment-author { color: var(--cw-gold); }
.comment-content { color: var(--cw-text-sub); }

/* Forms */
input[type="text"], input[type="email"], input[type="url"], textarea {
    background: var(--cw-bg2) !important;
    border: 1px solid var(--cw-border) !important;
    color: var(--cw-text) !important;
    border-radius: 6px !important;
    padding: 10px 14px !important;
}

input[type="submit"], button.submit {
    background: var(--cw-gold) !important;
    color: var(--cw-bg) !important;
    border: none !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    padding: 12px 24px !important;
    cursor: pointer;
    transition: opacity 0.2s;
}

input[type="submit"]:hover, button.submit:hover {
    opacity: 0.85;
}

/* Custom info box classes for post content */
.info-box {
    background: var(--cw-bg3);
    border: 1px solid var(--cw-gold);
    border-radius: 10px;
    padding: 24px;
    margin: 2em 0;
}

.info-box h4 {
    color: var(--cw-gold);
    font-family: var(--cw-serif);
    margin-bottom: 12px;
}

.tip-box {
    background: rgba(74, 124, 63, 0.15);
    border-left: 4px solid var(--cw-green);
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    margin: 1.5em 0;
}

.tip-box strong { color: var(--cw-green); }

.highlight-box {
    background: rgba(196, 168, 108, 0.1);
    border: 1px solid var(--cw-gold);
    border-radius: 8px;
    padding: 20px;
    margin: 1.5em 0;
    text-align: center;
}

.highlight-box .phone {
    font-size: 1.4em;
    color: var(--cw-accent);
    font-weight: 700;
    font-family: var(--cw-serif);
}

/* FAQ section in posts */
.post-faq { margin: 2em 0; }
.post-faq-item {
    background: var(--cw-bg2);
    border: 1px solid var(--cw-border);
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
}
.post-faq-q {
    padding: 16px 20px;
    font-weight: 700;
    color: var(--cw-gold);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.post-faq-q:hover { background: var(--cw-bg3); }
.post-faq-a {
    padding: 0 20px 16px;
    color: var(--cw-text-sub);
    line-height: 1.8;
}

/* Navigation back to home */
.back-home {
    display: inline-block;
    color: var(--cw-gold);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 0;
    margin-bottom: 20px;
}
.back-home:hover { color: var(--cw-gold-light); }

/* Responsive */
@media (max-width: 768px) {
    .entry-content, .wp-block-post-content, article.post, article.page {
        padding: 20px 16px;
    }
    .entry-content h1, .wp-block-post-content h1 { font-size: 1.6em; }
    .entry-content h2, .wp-block-post-content h2 { font-size: 1.3em; }
}
