/*
Theme Name: Welfare Glass
Theme URI: https://welfarehelper.co.kr
Author: WelfareHelper
Author URI: https://welfarehelper.co.kr
Description: welfarehelper 스타일의 다크 글래스모피즘 정보·블로그 테마. 읽기 중심 레이아웃, AdSense·SEO 친화적 구조. 어떤 WordPress 사이트에도 바로 적용 가능.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: welfare-glass
*/

/* ===== Design Tokens (welfarehelper 이식) ===== */
:root {
  --bg-color: #0d0f17;
  --card-bg: rgba(22, 25, 41, 0.7);
  --card-border: rgba(255, 255, 255, 0.08);
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --accent-purple: #9d4edd;
  --accent-purple-glow: rgba(157, 78, 221, 0.4);
  --accent-cyan: #00f5d4;
  --accent-cyan-glow: rgba(0, 245, 212, 0.4);
  --font-outfit: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 900px;
}

* { box-sizing: border-box; }

html {
  font-family: var(--font-outfit);
  background-color: var(--bg-color);
  color: var(--text-primary);
  scroll-behavior: smooth;
  font-size: 17px;
  line-height: 1.8;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-image:
    radial-gradient(at 0% 0%, rgba(157, 78, 221, 0.1) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(0, 245, 212, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
a:hover { color: #fff; text-shadow: 0 0 8px var(--accent-cyan-glow); }

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

/* ===== Layout ===== */
.container {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 20px;
}

/* ===== Navbar ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 15, 23, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
}
.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.logo {
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
}
.logo:hover { text-shadow: 0 0 10px var(--accent-cyan-glow); }
.nav-links { display: flex; gap: 22px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.nav-links li { list-style: none; }
.nav-links a { color: var(--text-secondary); font-weight: 500; font-size: 0.97rem; }
.nav-links a:hover { color: var(--accent-cyan); }
.nav-links .current-menu-item a,
.nav-links .current_page_item a { color: #fff; }

/* ===== Page Head ===== */
.page-head { margin-bottom: 36px; }
.page-title {
  font-size: 2.1rem;
  font-weight: 800;
  margin: 0 0 12px;
  background: linear-gradient(135deg, #fff 55%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.3;
}
.page-sub { color: var(--text-secondary); font-size: 1.05rem; margin: 0; }

/* ===== Post Grid (목록) ===== */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}
.post-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  overflow: hidden;
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 245, 212, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.post-card-link { display: block; color: inherit; }
.post-card-link:hover { text-shadow: none; }
.post-card-thumb { aspect-ratio: 16 / 9; overflow: hidden; background: rgba(255,255,255,0.03); }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card-thumb--empty { display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.post-card-body { padding: 18px 20px 20px; }
.post-card-title { font-size: 1.12rem; font-weight: 700; color: #fff; margin: 0 0 10px; line-height: 1.45; }
.post-card-excerpt { color: var(--text-secondary); font-size: 0.93rem; line-height: 1.65; margin: 0 0 14px; }
.post-card-meta { color: var(--text-secondary); font-size: 0.82rem; opacity: 0.8; }

/* ===== Single / Page (글 본문) ===== */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 40px;
  backdrop-filter: blur(8px);
}
.single-title { font-size: 2rem; font-weight: 800; color: #fff; line-height: 1.35; margin: 0 0 16px; }
.single-meta { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 26px; }
.single-meta a { color: var(--accent-cyan); }
.single-thumb { margin: 0 0 30px; border-radius: 12px; overflow: hidden; }
.single-thumb img { width: 100%; display: block; }

/* 본문 타이포그래피 */
.single-content { font-size: 1.05rem; line-height: 1.9; color: var(--text-primary); }
.single-content h2 {
  font-size: 1.5rem; font-weight: 700; color: var(--accent-cyan);
  margin: 42px 0 16px; padding-bottom: 8px; border-bottom: 1px solid var(--card-border);
}
.single-content h3 { font-size: 1.2rem; font-weight: 700; color: #fff; margin: 30px 0 12px; }
.single-content p { margin: 0 0 20px; }
.single-content ul, .single-content ol { padding-left: 22px; margin: 0 0 22px; }
.single-content li { margin-bottom: 10px; }
.single-content strong { color: #fff; }
.single-content a { color: var(--accent-cyan); text-decoration: underline; text-underline-offset: 3px; }
.single-content blockquote {
  border-left: 3px solid var(--accent-purple);
  margin: 24px 0; padding: 6px 20px; color: var(--text-secondary);
  background: rgba(157, 78, 221, 0.06); border-radius: 0 8px 8px 0;
}
.single-content code {
  background: rgba(255,255,255,0.08); padding: 2px 7px; border-radius: 5px;
  font-size: 0.9em; color: var(--accent-cyan);
}
.single-content pre {
  background: rgba(0,0,0,0.4); padding: 18px; border-radius: 10px; overflow-x: auto;
  border: 1px solid var(--card-border);
}
.single-content pre code { background: none; color: var(--text-primary); padding: 0; }
.single-content img { border-radius: 10px; margin: 10px 0; }
.single-content table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 0.95rem; }
.single-content th, .single-content td { border: 1px solid var(--card-border); padding: 10px 14px; text-align: left; }
.single-content th { background: rgba(0, 245, 212, 0.07); color: #fff; }
.single-tags { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--card-border); font-size: 0.9rem; }
.single-tags a { color: var(--text-secondary); }
.single-tags a:hover { color: var(--accent-cyan); }

/* ===== 이전/다음 글 네비 ===== */
.post-nav { display: flex; gap: 16px; margin-top: 26px; }
.post-nav-item {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 12px; padding: 16px 18px; max-width: 49%; flex: 0 1 auto;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.post-nav-item:hover { border-color: rgba(0,245,212,0.3); transform: translateY(-2px); text-shadow: none; }
.post-nav-prev { margin-right: auto; }
.post-nav-next { margin-left: auto; text-align: right; }
.post-nav-label { font-size: 0.82rem; color: var(--accent-cyan); font-weight: 600; }
.post-nav-title { font-size: 0.95rem; color: var(--text-primary); font-weight: 500; line-height: 1.4; }

/* ===== 관련 글 ===== */
.related { margin-top: 50px; }
.related-title {
  font-size: 1.4rem; font-weight: 700; color: #fff;
  margin: 0 0 22px; padding-bottom: 10px; border-bottom: 1px solid var(--card-border);
}

/* ===== Pagination ===== */
.pagination { margin-top: 40px; text-align: center; }
.pagination .nav-links { display: inline-flex; gap: 8px; justify-content: center; }
.pagination a, .pagination .current {
  display: inline-block; padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--card-border); color: var(--text-secondary);
}
.pagination .current { background: var(--accent-cyan); color: #0d0f17; border-color: var(--accent-cyan); font-weight: 700; }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--card-border);
  background: rgba(13, 15, 23, 0.6);
  margin-top: 40px;
}
.footer-container { max-width: var(--max-width); margin: 0 auto; padding: 34px 20px; text-align: center; color: var(--text-secondary); font-size: 0.9rem; }
.footer-links { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; }
.footer-links li { list-style: none; }
.footer-links a { color: var(--text-secondary); font-size: 0.9rem; }
.footer-links a:hover { color: var(--accent-cyan); }
.footer-desc { line-height: 1.7; margin: 0 0 16px; }
.footer-sub { margin-top: 8px; }

/* ===== Responsive ===== */
@media (max-width: 600px) {
  html { font-size: 16px; }
  .glass-card { padding: 24px; }
  .single-title { font-size: 1.6rem; }
  .page-title { font-size: 1.7rem; }
  .nav-container { padding: 14px 16px; }
  .nav-links { gap: 16px; }
}
