/*
Theme Name: 넷마루 테마2
Theme URI: https://example.com/netmaru2
Author: NETMARU
Description: 글로벌조달 넷마루 - 저널/매거진 스타일의 에디토리얼 레이아웃 테마. 커버스토리, 에디터 노트, 카테고리 캐러셀, 인기글 랭킹 사이드바 등 읽는 경험에 집중한 홈페이지 구성을 제공합니다.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
Author URI: https://example.com
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: netmaru2
Tags: blog, news, two-columns, custom-logo, custom-menu, featured-images, translation-ready
*/

/* ---------- Design tokens ---------- */
:root{
  --nm-navy:#13253F;
  --nm-navy-2:#1D3A5F;
  --nm-ink:#0E1C30;
  --nm-bg:#F7F6F1;
  --nm-white:#FFFFFF;
  --nm-border:#E4E1D8;
  --nm-muted:#6B6656;
  --nm-muted-2:#9B9683;
  --nm-slate:#8494AB;
  --nm-accent:#C08A34;
  --nm-font-serif:'Noto Serif KR', serif;
  --nm-font-sans:'Noto Sans KR', sans-serif;
}

/* ---------- Reset & base ---------- */
*{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{
  margin:0;
  background:var(--nm-bg);
  color:var(--nm-navy);
  font-family:var(--nm-font-sans);
  font-size:16px;
  line-height:1.6;
}
img{ max-width:100%; height:auto; display:block; }
a{ color:var(--nm-navy); text-decoration:none; }
a:hover{ opacity:.8; }
h1,h2,h3,h4{ font-family:var(--nm-font-serif); margin:0; color:var(--nm-navy); }
button, input, textarea{ font-family:var(--nm-font-sans); }
ul{ list-style:none; margin:0; padding:0; }
.container{ max-width:1312px; margin:0 auto; padding:0 64px; }
.screen-reader-text{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }

/* ---------- Announcement bar ---------- */
.nm-announce-bar{
  background:var(--nm-ink); color:var(--nm-white);
  display:flex; justify-content:center; align-items:center; gap:10px;
  padding:9px 64px; font-size:13px; text-align:center; position:relative;
}
.nm-announce-bar a{ color:var(--nm-white); font-weight:600; border-bottom:1px solid rgba(255,255,255,.4); }
.nm-announce-bar .nm-announce-close{
  position:absolute; right:20px; top:50%; transform:translateY(-50%);
  background:none; border:none; color:#9BA6B8; font-size:16px; line-height:1; cursor:pointer; padding:4px;
}
.nm-announce-bar.is-hidden{ display:none; }

/* ---------- Header ---------- */
.site-header{
  background:var(--nm-white); border-bottom:1px solid var(--nm-border);
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 64px 18px 20px; flex-wrap:wrap; gap:16px;
}
.nm-logo{ display:flex; align-items:center; gap:12px; color:inherit; }
.nm-logo img{ height:34px; width:auto; }
.nm-logo-mark{ flex-shrink:0; }
.nm-logo-text{ display:flex; flex-direction:column; line-height:1.15; }
.nm-logo-eyebrow{ font-size:10.5px; font-weight:700; color:var(--nm-accent); letter-spacing:.08em; }
.nm-logo-title{ font-family:var(--nm-font-serif); font-size:22px; font-weight:700; color:var(--nm-navy); }

.site-nav ul{ display:flex; gap:32px; font-size:15px; font-weight:500; flex-wrap:wrap; }
.site-nav a{ padding-bottom:4px; border-bottom:2px solid transparent; }
.site-nav .current-menu-item a,
.site-nav .current-menu-ancestor a{ color:var(--nm-accent); border-bottom-color:var(--nm-accent); }

.nm-header-actions{ display:flex; align-items:center; gap:14px; }
.nm-search-toggle{
  display:flex; align-items:center; justify-content:center; width:38px; height:38px;
  border-radius:999px; border:1px solid var(--nm-border);
}
.nm-search-toggle:hover{ border-color:var(--nm-accent); opacity:1; }
.nm-btn-subscribe{
  background:var(--nm-navy); color:var(--nm-bg); border:none;
  font-size:13px; font-weight:700; padding:10px 22px; border-radius:999px; cursor:pointer;
}
.nm-btn-subscribe:hover{ background:var(--nm-accent); color:var(--nm-navy); }

/* ---------- Hero ---------- */
.nm-hero{
  background:linear-gradient(135deg,var(--nm-navy) 0%,var(--nm-navy-2) 100%);
  padding:68px 64px; display:flex; align-items:center; justify-content:space-between; gap:48px; flex-wrap:wrap;
}
.nm-hero-copy{ max-width:640px; display:flex; flex-direction:column; gap:18px; }
.nm-hero-eyebrow{ color:var(--nm-accent); font-size:13px; font-weight:700; letter-spacing:.06em; }
.nm-hero-title{ font-size:42px; line-height:1.35; color:var(--nm-white); font-weight:700; }
.nm-hero-sub{ font-size:16px; line-height:1.7; color:#C9D2DE; }
.nm-hero-actions{ display:flex; gap:14px; margin-top:8px; flex-wrap:wrap; }
.nm-hero-visual{
  width:380px; height:300px; flex-shrink:0; background:#1B3654; border:1px solid #335072;
  border-radius:8px; display:flex; align-items:center; justify-content:center;
}

.btn{ font-size:15px; font-weight:700; padding:14px 26px; border-radius:4px; cursor:pointer; display:inline-block; border:1px solid transparent; }
.btn-primary{ background:var(--nm-accent); color:var(--nm-navy); }
.btn-outline{ background:transparent; color:var(--nm-white); border-color:#4A5D78; font-weight:600; }

/* ---------- Ad banner ---------- */
.nm-ad-banner{ background:var(--nm-bg); padding:28px 64px; display:flex; justify-content:center; }
.nm-ad-slot{
  width:100%; max-width:728px; min-height:90px; box-sizing:border-box;
  background:#EDEAE1; border:1px dashed #C7C2B3; display:flex; align-items:center; justify-content:center;
  font-size:12px; color:#8A8474; letter-spacing:.04em; text-align:center; padding:8px;
}

/* ---------- Latest posts ---------- */
.nm-section{ padding:24px 64px 56px; display:flex; flex-direction:column; gap:28px; }
.nm-section-head{ display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:12px; }
.nm-section-title{ font-size:26px; font-weight:700; }
.nm-section-link{ font-size:14px; color:var(--nm-accent); font-weight:600; }

.nm-posts-grid{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:26px; }
@media (max-width:960px){ .nm-posts-grid{ grid-template-columns:1fr; } }

.nm-post-card{ display:flex; flex-direction:column; background:var(--nm-white); border:1px solid var(--nm-border); border-radius:8px; overflow:hidden; color:inherit; }
.nm-post-thumb{ width:100%; height:156px; background:var(--nm-border); display:flex; align-items:center; justify-content:center; overflow:hidden; }
.nm-post-thumb img{ width:100%; height:100%; object-fit:cover; }
.nm-post-body{ padding:18px; display:flex; flex-direction:column; gap:8px; }
.nm-post-cat{ font-size:12px; font-weight:700; color:var(--nm-accent); letter-spacing:.03em; }
.nm-post-title{ font-size:16px; font-weight:700; line-height:1.4; color:var(--nm-navy); }
.nm-post-excerpt{ font-size:13px; color:var(--nm-muted); line-height:1.6; }
.nm-post-date{ font-size:12px; color:var(--nm-muted-2); margin-top:2px; }

/* ---------- Category highlights ---------- */
.nm-categories{
  background:var(--nm-white); padding:56px 64px; display:flex; flex-direction:column; gap:28px;
  border-top:1px solid var(--nm-border); border-bottom:1px solid var(--nm-border);
}
.nm-category-grid{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:22px; }
@media (max-width:960px){ .nm-category-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
.nm-category-card{ display:flex; flex-direction:column; gap:14px; padding:26px; background:var(--nm-bg); border-radius:8px; color:inherit; }
.nm-category-card svg{ stroke:var(--nm-accent); }
.nm-category-title{ font-size:15px; font-weight:700; color:var(--nm-navy); }
.nm-category-desc{ font-size:13px; color:var(--nm-muted); line-height:1.6; }

/* ---------- Newsletter ---------- */
.nm-newsletter{
  background:var(--nm-navy); padding:56px 64px; display:flex; align-items:center; justify-content:space-between; gap:32px; flex-wrap:wrap;
}
.nm-newsletter-copy{ display:flex; flex-direction:column; gap:8px; max-width:500px; }
.nm-newsletter-title{ font-size:22px; font-weight:700; color:var(--nm-white); }
.nm-newsletter-text{ font-size:14px; color:#C9D2DE; line-height:1.7; }
.nm-newsletter-form{ display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.nm-newsletter-form input[type="email"]{
  width:260px; box-sizing:border-box; padding:13px 16px; border-radius:4px; border:none; font-size:14px;
}
.nm-newsletter-form button{
  background:var(--nm-accent); color:var(--nm-navy); border:none; font-size:14px; font-weight:700;
  padding:13px 24px; border-radius:4px; cursor:pointer;
}

/* ---------- Footer ---------- */
.site-footer{ background:var(--nm-ink); padding:48px 64px 28px; display:flex; flex-direction:column; gap:28px; }
.nm-footer-top{ display:flex; justify-content:space-between; gap:48px; flex-wrap:wrap; }
.nm-footer-about{ max-width:340px; display:flex; flex-direction:column; gap:12px; }
.nm-footer-about .nm-footer-title{ font-family:var(--nm-font-serif); font-size:19px; font-weight:700; color:var(--nm-white); }
.nm-footer-about p{ font-size:13px; color:var(--nm-slate); line-height:1.7; margin:0; }
.nm-footer-cols{ display:flex; gap:56px; flex-wrap:wrap; }
.nm-footer-col{ display:flex; flex-direction:column; gap:10px; }
.nm-footer-col h4{ font-family:var(--nm-font-sans); font-size:13px; font-weight:700; color:var(--nm-white); }
.nm-footer-col a{ font-size:13px; color:var(--nm-slate); }
.nm-footer-bottom{
  border-top:1px solid #1E2E45; padding-top:22px; display:flex; justify-content:space-between;
  font-size:12px; color:#5E6E85; flex-wrap:wrap; gap:8px;
}

/* ---------- Generic content (single/page/archive) ---------- */
.nm-content-wrap{ display:flex; gap:48px; padding:56px 64px; align-items:flex-start; flex-wrap:wrap; }
.nm-main-col{ flex:1 1 640px; min-width:0; display:flex; flex-direction:column; gap:32px; }
.nm-sidebar{ width:320px; flex-shrink:0; display:flex; flex-direction:column; gap:24px; }
.nm-widget{ background:var(--nm-white); border:1px solid var(--nm-border); border-radius:8px; padding:22px; }
.nm-widget h3{ font-size:15px; font-weight:700; margin-bottom:14px; }

.nm-article-header{ display:flex; flex-direction:column; gap:12px; }
.nm-article-cat{ font-size:12px; font-weight:700; color:var(--nm-accent); letter-spacing:.03em; }
.nm-article-title{ font-size:32px; line-height:1.4; }
.nm-article-meta{ font-size:13px; color:var(--nm-muted-2); }
.nm-article-thumb{ width:100%; border-radius:8px; overflow:hidden; border:1px solid var(--nm-border); }
.nm-article-body{ font-size:16px; line-height:1.85; color:#232323; }
.nm-article-body p{ margin:0 0 20px; }
.nm-article-body h2{ font-size:24px; margin:36px 0 14px; }
.nm-article-body h3{ font-size:19px; margin:28px 0 12px; }
.nm-article-body img{ border-radius:8px; margin:20px 0; }
.nm-article-body a{ color:var(--nm-accent); text-decoration:underline; }
.nm-article-body ul, .nm-article-body ol{ margin:0 0 20px; padding-left:22px; list-style:revert; }

.nm-archive-title{ font-size:28px; padding:0 64px; margin-top:48px; }
.nm-pagination{ display:flex; gap:10px; padding:24px 64px 56px; }
.nm-pagination a, .nm-pagination span{
  padding:8px 14px; border:1px solid var(--nm-border); border-radius:4px; font-size:14px; background:var(--nm-white);
}

.nm-404{ text-align:center; padding:96px 64px; display:flex; flex-direction:column; gap:16px; align-items:center; }

/* ---------- Comments ---------- */
.nm-comments{ display:flex; flex-direction:column; gap:20px; }
.nm-comments .comment-body{ background:var(--nm-white); border:1px solid var(--nm-border); border-radius:8px; padding:18px; }

/* =========================================================
   Journal-style front page (넷마루 테마2)
   ========================================================= */

/* ---- Cover story ---- */
.nm-cover{ padding:28px 64px 8px; }
.nm-cover-label{ font-family:var(--nm-font-serif); font-size:20px; font-weight:700; margin-bottom:14px; }
.nm-cover-grid{
  display:grid; grid-template-columns:0.6fr 1.4fr; gap:0;
  border:1px solid var(--nm-border); border-radius:12px; overflow:hidden; background:var(--nm-white);
}
.nm-cover-thumb{ min-height:260px; background:var(--nm-border); overflow:hidden; }
.nm-cover-thumb img{ width:100%; height:100%; object-fit:cover; min-height:260px; }
.nm-cover-body{ padding:28px 32px; display:flex; flex-direction:column; gap:12px; justify-content:center; }
.nm-cover-cat{ font-size:12px; font-weight:700; color:var(--nm-accent); letter-spacing:.03em; }
.nm-cover-title{ font-size:21px; line-height:1.4; font-weight:700; font-family:var(--nm-font-sans); }
.nm-cover-title a{ color:inherit; }
.nm-key-insight{
  display:flex; gap:8px; align-items:flex-start; background:var(--nm-bg);
  border-radius:8px; padding:11px 14px; font-size:13px; font-weight:600; line-height:1.55;
}
.nm-key-insight .dot{ width:14px; height:14px; border-radius:50%; border:2px solid var(--nm-accent); flex-shrink:0; margin-top:2px; }
.nm-cover-excerpt{ font-size:13px; color:var(--nm-muted); line-height:1.7; }
.nm-cover-tags{ display:flex; gap:8px; flex-wrap:wrap; }
.nm-tag{ font-size:12px; font-weight:600; color:var(--nm-muted); background:var(--nm-bg); border-radius:999px; padding:5px 13px; }
.nm-cover-meta{ font-size:12px; color:var(--nm-muted-2); }

/* ---- Editor's note + keywords ---- */
.nm-editor-row{
  margin:32px 64px 0; display:grid; grid-template-columns:1fr 300px; gap:0;
  background:var(--nm-bg); border-radius:12px; overflow:hidden;
}
.nm-editor-note{ padding:28px 32px; }
.nm-editor-label{ font-size:11.5px; font-weight:800; letter-spacing:.08em; color:var(--nm-accent); margin-bottom:10px; }
.nm-editor-note p{ font-size:14.5px; line-height:1.8; color:var(--nm-navy); margin:0 0 10px; }
.nm-editor-note .nm-editor-signoff{ font-size:12.5px; color:var(--nm-muted-2); }
.nm-issue-keywords{ padding:28px 32px; border-left:1px solid var(--nm-border); }
.nm-issue-keywords-label{ font-size:11.5px; font-weight:800; letter-spacing:.08em; color:var(--nm-muted-2); margin-bottom:14px; }
.nm-issue-keywords ol{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }
.nm-issue-keywords li{ display:flex; align-items:baseline; gap:10px; font-size:14px; font-weight:600; }
.nm-issue-keywords .num{ font-size:12px; font-weight:800; color:var(--nm-accent); }

/* ---- Category carousel ---- */
.nm-cat-carousel{ padding:56px 64px; }
.nm-cat-carousel-head{ display:flex; align-items:baseline; justify-content:space-between; margin-bottom:22px; flex-wrap:wrap; gap:10px; }
.nm-cat-carousel-sub{ font-size:13px; color:var(--nm-muted-2); }
.nm-cat-track{
  display:flex; gap:20px; overflow-x:auto; scroll-snap-type:x proximity; padding-bottom:6px;
  scrollbar-width:thin;
}
.nm-cat-track::-webkit-scrollbar{ height:6px; }
.nm-cat-track::-webkit-scrollbar-thumb{ background:var(--nm-border); border-radius:999px; }
.nm-cat-item{
  flex:0 0 240px; scroll-snap-align:start; background:var(--nm-white); border:1px solid var(--nm-border);
  border-radius:10px; padding:22px; display:flex; flex-direction:column; gap:10px; color:inherit;
}
.nm-cat-item .bar{ width:32px; height:4px; border-radius:999px; }
.nm-cat-item .idx{ font-size:12px; font-weight:800; color:var(--nm-muted-2); }
.nm-cat-item .name{ font-size:17px; font-weight:700; }
.nm-cat-item .desc{ font-size:13px; color:var(--nm-muted); line-height:1.6; flex:1; }
.nm-cat-item .meta{ font-size:12px; color:var(--nm-muted-2); display:flex; align-items:center; justify-content:space-between; }

/* ---- Article list + sidebar ---- */
.nm-journal-main{ display:grid; grid-template-columns:1fr 320px; gap:48px; padding:8px 64px 40px; align-items:start; }
.nm-journal-list{ display:flex; flex-direction:column; }
.nm-journal-item{ display:grid; grid-template-columns:180px 1fr; gap:24px; padding:26px 0; border-bottom:1px solid var(--nm-border); }
.nm-journal-item:first-child{ padding-top:0; }
.nm-journal-thumb{ width:180px; height:130px; border-radius:8px; overflow:hidden; background:var(--nm-border); }
.nm-journal-thumb img{ width:100%; height:100%; object-fit:cover; }
.nm-journal-tags{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:8px; }
.nm-journal-tags .cat{ font-size:12px; font-weight:700; color:var(--nm-accent); }
.nm-journal-tags .badge-new{ font-size:11px; font-weight:700; color:var(--nm-accent); border:1px solid var(--nm-accent); border-radius:999px; padding:2px 9px; }
.nm-journal-title{ font-size:19px; font-weight:700; margin-bottom:6px; }
.nm-journal-title a{ color:var(--nm-navy); }
.nm-journal-desc{ font-size:13.5px; color:var(--nm-muted); line-height:1.7; margin-bottom:8px; }
.nm-journal-insight{ font-size:13px; font-weight:600; color:var(--nm-navy); margin-bottom:8px; }
.nm-journal-insight::before{ content:'○ '; color:var(--nm-accent); }
.nm-journal-meta{ font-size:12px; color:var(--nm-muted-2); }
.nm-more-btn-wrap{ display:flex; justify-content:center; margin-top:32px; }
.nm-more-btn{
  border:1px solid var(--nm-border); border-radius:999px; padding:12px 28px; font-size:14px; font-weight:600; color:var(--nm-navy);
}
.nm-more-btn:hover{ border-color:var(--nm-accent); color:var(--nm-accent); }

/* ---- Sidebar: popular ranking + categories ---- */
.nm-side-block{ background:var(--nm-white); border:1px solid var(--nm-border); border-radius:10px; padding:22px; margin-bottom:22px; }
.nm-side-title{ font-size:14px; font-weight:800; margin-bottom:16px; display:flex; align-items:center; gap:8px; }
.nm-side-title .bar{ width:3px; height:14px; background:var(--nm-accent); display:inline-block; }
.nm-rank-list{ display:flex; flex-direction:column; gap:16px; }
.nm-rank-item{ display:flex; gap:12px; }
.nm-rank-num{ font-size:15px; font-weight:800; color:var(--nm-accent); width:20px; flex-shrink:0; }
.nm-rank-title{ font-size:13.5px; font-weight:600; line-height:1.5; color:var(--nm-navy); }
.nm-rank-title a{ color:inherit; }
.nm-rank-meta{ font-size:11.5px; color:var(--nm-muted-2); margin-top:3px; }
.nm-side-cats{ display:flex; flex-direction:column; gap:2px; }
.nm-side-cats a{ display:flex; justify-content:space-between; padding:9px 0; font-size:13.5px; color:var(--nm-navy); border-bottom:1px solid var(--nm-border); }
.nm-side-cats a:last-child{ border-bottom:none; }
.nm-side-cats .count{ color:var(--nm-muted-2); font-size:12px; }

@media (max-width:960px){
  .nm-cover-grid{ grid-template-columns:1fr; }
  .nm-cover-thumb, .nm-cover-thumb img{ min-height:260px; }
  .nm-editor-row{ grid-template-columns:1fr; margin-left:24px; margin-right:24px; }
  .nm-issue-keywords{ border-left:none; border-top:1px solid var(--nm-border); }
  .nm-journal-main{ grid-template-columns:1fr; }
}

@media (max-width:700px){
  .site-header, .nm-hero, .nm-ad-banner, .nm-section, .nm-categories, .nm-newsletter, .site-footer, .nm-content-wrap,
  .nm-cover, .nm-cat-carousel, .nm-journal-main{ padding-left:24px; padding-right:24px; }
  .nm-hero-title{ font-size:30px; }
  .nm-posts-grid, .nm-category-grid{ grid-template-columns:1fr; }
  .nm-content-wrap{ flex-direction:column; }
  .nm-sidebar{ width:100%; }
  .nm-journal-item{ grid-template-columns:120px 1fr; gap:14px; }
  .nm-journal-thumb{ width:120px; height:90px; }
  .nm-editor-row{ margin-left:0; margin-right:0; border-radius:0; }
}


/* ---- Mobile: center the header on narrow screens ---- */
@media (max-width:700px){
  .site-header{ justify-content:center; text-align:center; }
}

/* ---- Pagination (numbered) ---- */
.nm-pagination{ display:flex; justify-content:center; align-items:center; gap:6px; margin-top:32px; flex-wrap:wrap; }
.nm-page-num{ display:inline-flex; align-items:center; justify-content:center; min-width:36px; height:36px; padding:0 6px; border:1px solid var(--nm-border); border-radius:999px; font-size:13.5px; font-weight:600; color:var(--nm-navy); }
a.nm-page-num:hover{ border-color:var(--nm-accent); color:var(--nm-accent); }
.nm-page-num.is-current{ background:var(--nm-navy); border-color:var(--nm-navy); color:var(--nm-white); }
.nm-page-ellipsis{ color:var(--nm-muted-2); font-size:13.5px; padding:0 4px; }
