
:root {
  --primary: #1a3c5e;
  --accent: #e8792a;
  --bg: #f8f9fa;
  --card-bg: #ffffff;
  --text: #2d2d2d;
  --muted: #6c757d;
  --border: #e2e8f0;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--text); background: var(--bg); line-height: 1.7; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }

/* NAV */
.site-nav { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow); }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.nav-logo img { height: 44px; }
.nav-links { display: flex; list-style: none; gap: 0.25rem; margin-left: auto; flex-wrap: wrap; }
.nav-links > li { position: relative; }
.nav-links > li > a { display: block; padding: 0.5rem 0.75rem; font-size: 0.88rem; font-weight: 500; color: var(--primary); border-radius: 4px; white-space: nowrap; }
.nav-links > li > a:hover { background: var(--bg); color: var(--accent); }
.sub-menu { display: none; position: absolute; top: 100%; left: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); min-width: 240px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); list-style: none; z-index: 200; }
.has-sub:hover .sub-menu { display: block; }
.sub-menu li a { display: block; padding: 0.6rem 1rem; font-size: 0.85rem; color: var(--text); white-space: nowrap; }
.sub-menu li a:hover { background: var(--bg); color: var(--accent); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--primary); margin-left: auto; }

/* LAYOUT */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.page-wrap { max-width: 860px; margin: 0 auto; padding: 2.5rem 1.5rem; }

/* HERO STRIP */
.page-header { background: var(--primary); color: #fff; padding: 2.5rem 1.5rem; margin-bottom: 2rem; }
.page-header .container h1 { font-size: 2rem; font-weight: 700; }
.page-header .container p { opacity: 0.8; margin-top: 0.5rem; }

/* BLOG LISTING */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; padding: 2rem 0; }
.post-card { background: var(--card-bg); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; transition: box-shadow 0.2s, transform 0.2s; }
.post-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.12); transform: translateY(-2px); }
.post-card-img { height: 180px; background: linear-gradient(135deg, #1a3c5e 0%, #2d6a9f 100%); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 1.25rem; }
.post-card-meta { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.5rem; }
.post-card-title { font-size: 1rem; font-weight: 600; line-height: 1.4; margin-bottom: 0.75rem; }
.post-card-title a { color: var(--text); }
.post-card-title a:hover { color: var(--accent); }
.post-card-excerpt { font-size: 0.875rem; color: var(--muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card-cats { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.cat-badge { font-size: 0.7rem; padding: 0.2rem 0.6rem; border-radius: 20px; background: #e8f0fb; color: var(--primary); font-weight: 500; }

/* PAGINATION */
.pagination { display: flex; justify-content: center; gap: 0.5rem; padding: 2rem 0; flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-block; padding: 0.5rem 1rem; border-radius: 6px; border: 1px solid var(--border); font-size: 0.9rem; }
.pagination a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* SINGLE POST */
.post-header { padding: 3rem 1.5rem 2rem; background: #fff; border-bottom: 1px solid var(--border); margin-bottom: 2.5rem; }
.post-header .container { max-width: 860px; }
.post-cats { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.post-title { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; line-height: 1.3; color: var(--primary); margin-bottom: 1rem; }
.post-meta { font-size: 0.85rem; color: var(--muted); display: flex; gap: 1.5rem; flex-wrap: wrap; }
.post-content { max-width: 860px; margin: 0 auto; padding: 0 1.5rem 3rem; }
.post-content h1, .post-content h2, .post-content h3, .post-content h4 { color: var(--primary); margin: 1.8rem 0 0.8rem; line-height: 1.3; }
.post-content h2 { font-size: 1.5rem; border-bottom: 2px solid var(--accent); padding-bottom: 0.4rem; }
.post-content h3 { font-size: 1.2rem; }
.post-content p { margin-bottom: 1.2rem; }
.post-content ul, .post-content ol { margin: 0.8rem 0 1.2rem 1.8rem; }
.post-content li { margin-bottom: 0.4rem; }
.post-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.9rem; }
.post-content th { background: var(--primary); color: #fff; padding: 0.75rem 1rem; text-align: left; }
.post-content td { padding: 0.65rem 1rem; border-bottom: 1px solid var(--border); }
.post-content tr:hover td { background: var(--bg); }
.post-content blockquote { border-left: 4px solid var(--accent); padding: 1rem 1.5rem; background: #fff8f3; margin: 1.5rem 0; border-radius: 0 var(--radius) var(--radius) 0; }
.post-content .wp-block-table { overflow-x: auto; }
.post-content img { border-radius: var(--radius); margin: 1rem 0; }
.post-content pre, .post-content code { background: #f1f5f9; padding: 0.2em 0.5em; border-radius: 4px; font-family: monospace; font-size: 0.9em; }
.post-content pre code { padding: 0; }
.post-content pre { padding: 1rem; overflow-x: auto; margin: 1rem 0; }

/* LIBRARY */
.library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; padding: 2rem 0; }
.lib-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; transition: box-shadow 0.2s; }
.lib-card:hover { box-shadow: var(--shadow); }
.lib-card-cat { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); font-weight: 600; margin-bottom: 0.5rem; }
.lib-card-title { font-size: 0.92rem; font-weight: 600; line-height: 1.4; color: var(--text); }
.lib-card-title a { color: var(--text); }
.lib-card-title a:hover { color: var(--accent); }
.lib-card-badge { display: inline-block; margin-top: 0.75rem; font-size: 0.72rem; padding: 0.2rem 0.6rem; border-radius: 20px; }
.badge-content { background: #e8f5e9; color: #2e7d32; }
.badge-empty { background: #f3f4f6; color: #9ca3af; }

/* FOOTER */
.site-footer { background: var(--primary); color: rgba(255,255,255,0.8); padding: 3rem 1.5rem 1.5rem; margin-top: 4rem; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { color: #fff; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a { color: rgba(255,255,255,0.7); font-size: 0.875rem; }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.15); text-align: center; font-size: 0.82rem; color: rgba(255,255,255,0.5); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 1rem; box-shadow: 0 8px 16px rgba(0,0,0,0.1); }
  .nav-links.open { display: flex; }
  .sub-menu { position: static; box-shadow: none; border: none; padding-left: 1rem; }
  .has-sub:hover .sub-menu { display: none; }
  .has-sub .sub-menu { display: none; }
  .post-grid { grid-template-columns: 1fr; }
}
