/*
Theme Name: NewsHub
Theme URI: https://example.com/newshub
Author: NewsHub
Description: Modern editorial news theme with Community, Personal Magazine, Trends and Knowledge Graph support.
Version: 2.1.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: newshub
*/
:root{--nh-bg:#fff;--nh-text:#111827;--nh-muted:#667085;--nh-soft:#f6f7f9;--nh-border:#e5e7eb;--nh-accent:#b42318;--nh-dark:#101828;--nh-max:1280px;--nh-radius:16px}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--nh-bg);color:var(--nh-text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.6}a{color:inherit;text-decoration:none}a:hover{color:var(--nh-accent)}img{display:block;max-width:100%;height:auto}.nh-container{width:min(var(--nh-max),calc(100% - 32px));margin:auto}.nh-header{position:sticky;top:0;z-index:100;background:rgba(255,255,255,.96);backdrop-filter:blur(14px);border-bottom:1px solid var(--nh-border)}.nh-header__inner{min-height:70px;display:flex;align-items:center;gap:24px}.nh-logo{font-size:25px;font-weight:900;letter-spacing:-.05em;white-space:nowrap}.nh-nav{flex:1}.nh-nav ul{display:flex;gap:18px;list-style:none;margin:0;padding:0}.nh-nav a{font-size:14px;font-weight:750}.nh-actions{display:flex;gap:8px;align-items:center}.nh-icon-btn{display:none;border:1px solid var(--nh-border);background:#fff;border-radius:10px;padding:9px 11px;font-size:18px}.nh-btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--nh-border);border-radius:10px;padding:9px 13px;background:#fff;font-weight:750}.nh-btn--primary{background:var(--nh-dark);color:#fff;border-color:var(--nh-dark)}.nh-main{padding:28px 0 70px}.nh-breaking{background:var(--nh-dark);color:#fff;padding:8px 0;font-size:13px}.nh-breaking__inner{display:flex;gap:12px;align-items:center}.nh-breaking strong{color:#fca5a5}.nh-hero{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(300px,1fr);gap:18px;margin-bottom:34px}.nh-feature{position:relative;min-height:430px;border-radius:20px;overflow:hidden;background:#111827}.nh-feature img{width:100%;height:100%;object-fit:cover;position:absolute;inset:0;opacity:.8}.nh-feature__overlay{position:absolute;inset:auto 0 0;padding:32px;color:#fff;background:linear-gradient(transparent,rgba(0,0,0,.86))}.nh-feature h1{font-size:clamp(30px,5vw,58px);line-height:1.02;letter-spacing:-.045em;margin:8px 0 10px}.nh-side-grid{display:grid;gap:18px}.nh-story{border:1px solid var(--nh-border);border-radius:16px;overflow:hidden;background:#fff}.nh-story img{aspect-ratio:16/9;width:100%;object-fit:cover}.nh-story__body{padding:15px}.nh-story h2{font-size:20px;line-height:1.15;margin:6px 0}.nh-kicker{font-size:11px;text-transform:uppercase;letter-spacing:.11em;font-weight:850;color:var(--nh-accent)}.nh-meta{font-size:12px;color:var(--nh-muted)}.nh-section{margin:42px 0}.nh-section__head{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:16px}.nh-section h2{font-size:28px;letter-spacing:-.035em;margin:0}.nh-section__head a{font-size:14px;font-weight:750}.nh-news-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.nh-card{border:1px solid var(--nh-border);border-radius:16px;overflow:hidden;background:#fff}.nh-card img{aspect-ratio:16/9;object-fit:cover;width:100%}.nh-card__body{padding:17px}.nh-card h3{font-size:20px;line-height:1.15;margin:6px 0}.nh-two{display:grid;grid-template-columns:2fr 1fr;gap:24px}.nh-panel{background:var(--nh-soft);border-radius:18px;padding:22px}.nh-panel h3{margin-top:0}.nh-list{display:grid;gap:10px}.nh-list a{padding:12px 0;border-bottom:1px solid var(--nh-border);font-weight:650}.nh-title{font-size:clamp(32px,5vw,58px);line-height:1.04;letter-spacing:-.045em;margin:8px 0 14px}.entry-content{max-width:820px;font-size:18px}.entry-content img{margin:24px 0;border-radius:12px}.entry-content h2{font-size:30px;line-height:1.15;margin-top:38px}.nh-article-meta{display:flex;gap:10px;align-items:center;flex-wrap:wrap;color:var(--nh-muted);font-size:13px;margin-bottom:22px}.nh-article-hero{width:100%;max-height:680px;object-fit:cover;border-radius:18px;margin:20px 0 28px}.nh-footer{border-top:1px solid var(--nh-border);padding:44px 0 20px;background:#fafafa}.nh-footer__grid{display:grid;grid-template-columns:2fr repeat(3,1fr);gap:28px}.nh-footer h3{font-size:13px;text-transform:uppercase;letter-spacing:.08em}.nh-footer a{display:block;color:#4b5563;font-size:14px;margin:7px 0}.nh-bottom{border-top:1px solid var(--nh-border);margin-top:30px;padding-top:18px;color:var(--nh-muted);font-size:12px;display:flex;justify-content:space-between;gap:12px}.nh-mobile-menu{display:none}.nh-mobile-menu.is-open{display:block;border-top:1px solid var(--nh-border);padding:12px 0 18px}.nh-mobile-menu a{display:block;padding:10px 0;font-weight:700}.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}
@media(max-width:900px){.nh-nav{display:none}.nh-icon-btn{display:block}.nh-hero,.nh-two{grid-template-columns:1fr}.nh-news-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.nh-footer__grid{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.nh-container{width:min(var(--nh-max),calc(100% - 22px))}.nh-header__inner{min-height:62px;gap:10px}.nh-actions .nh-btn:first-child{display:none}.nh-feature{min-height:360px}.nh-feature__overlay{padding:20px}.nh-news-grid,.nh-footer__grid{grid-template-columns:1fr}.nh-title{font-size:38px}.nh-bottom{display:block}.nh-bottom span{display:block;margin-top:5px}}

/* NewsHub Article Engine */
.nh-article-context{margin:42px 0 0;padding-top:28px;border-top:1px solid var(--nh-border)}
.nh-context-block{margin:0 0 34px}.nh-context-block h2{font-size:24px;letter-spacing:-.03em;margin:0 0 14px}
.nh-entity-chips{display:flex;flex-wrap:wrap;gap:9px}.nh-entity-chip{display:inline-flex;gap:7px;align-items:center;border:1px solid var(--nh-border);border-radius:999px;padding:8px 12px;background:#fff;font-weight:750}.nh-entity-chip small{font-size:10px;text-transform:uppercase;color:var(--nh-muted);font-weight:700}
.nh-related-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.nh-related-card{border:1px solid var(--nh-border);border-radius:14px;overflow:hidden;background:#fff}.nh-related-card img{width:100%;aspect-ratio:16/9;object-fit:cover}.nh-related-card>div{padding:13px}.nh-related-card h3{font-size:17px;line-height:1.18;margin:5px 0}.nh-related-card time{font-size:11px;color:var(--nh-muted)}
.nh-context-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px}.nh-save-btn,.nh-follow-btn{border:1px solid var(--nh-border);background:#fff;border-radius:10px;padding:10px 14px;font-weight:800;cursor:pointer}.nh-follow-btn{background:var(--nh-dark);color:#fff;border-color:var(--nh-dark)}
@media(max-width:700px){.nh-related-grid{grid-template-columns:1fr}.nh-context-actions button{flex:1}}
.nh-entity-page{max-width:980px;margin:0 auto}.nh-entity-page .nh-title{margin-bottom:12px}.nh-entity-page .entry-content{max-width:760px}.nh-section{margin-top:42px}.nh-section h2{font-size:clamp(24px,4vw,34px);margin-bottom:20px}.nh-related-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.nh-related-card{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:18px}.nh-related-card h3{margin:6px 0;font-size:20px}.nh-related-card h3 a{text-decoration:none;color:inherit}.nh-related-card time{font-size:13px;color:#6b7280}@media(max-width:700px){.nh-related-grid{grid-template-columns:1fr}}

.nh-profile-head{display:flex;gap:22px;align-items:flex-start;padding:28px;background:#fff;border:1px solid #e5e7eb;border-radius:18px}.nh-profile-avatar{width:96px;height:96px;border-radius:50%;object-fit:cover}.nh-profile-stats{display:flex;gap:18px;margin-top:10px}.nh-follow-btn{border:0;border-radius:999px;padding:11px 18px;background:#1d4ed8;color:#fff;font-weight:700;cursor:pointer;margin:14px 0}.nh-follow-btn.is-following{background:#111827}.nh-article-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:28px 0;padding:18px;background:#f8fafc;border-radius:14px}.nh-save-state{color:#667085}.nh-profile-mini{display:flex;gap:16px;align-items:center}.nh-profile-mini .nh-profile-avatar{width:56px;height:56px}.nh-core-btn{display:inline-block;padding:8px 13px;border-radius:8px;background:#111827;color:#fff;text-decoration:none}.nh-core-btn:hover{color:#fff}

/* NewsHub Personal Magazine V1.7 */
.nh-mag-create{display:grid;grid-template-columns:1.2fr 1.4fr .7fr auto;gap:10px;margin:0 0 24px}.nh-mag-create input,.nh-mag-create select,.nh-save-magazine{border:1px solid #d0d5dd;border-radius:10px;padding:11px 12px;background:#fff;font:inherit}.nh-mag-card{border:1px solid var(--nh-border);border-radius:16px;padding:20px;background:#fff}.nh-mag-card__icon{font-size:28px}.nh-mag-card h3{font-size:22px;margin:8px 0}.nh-mag-card p{color:var(--nh-muted);margin:0 0 10px}.nh-mag-card__meta,.nh-magazine-meta{font-size:12px;color:var(--nh-muted)}.nh-magazine-cover{padding:34px;border-radius:22px;background:linear-gradient(135deg,#111827,#374151);color:#fff;margin-bottom:34px}.nh-magazine-cover .nh-kicker{color:#fca5a5}.nh-magazine-cover .nh-title{margin:8px 0;color:#fff}.nh-magazine-cover p{max-width:720px;color:#e5e7eb}.nh-save-label{display:inline-flex;align-items:center;gap:8px}.nh-create-mag-link{font-weight:800;padding:10px 4px}.nh-remove-mag{margin-top:10px;border:1px solid #d0d5dd;background:#fff;border-radius:8px;padding:7px 10px;cursor:pointer;font-weight:700}@media(max-width:800px){.nh-mag-create{grid-template-columns:1fr}.nh-save-label{width:100%}.nh-save-magazine{width:100%}}

.nh-magazine-dashboard{max-width:1100px;margin:0 auto}
.nh-mag-create{display:grid;grid-template-columns:1.2fr 1.2fr .7fr auto;gap:10px;align-items:center;margin:22px 0}
.nh-mag-create input,.nh-mag-create select{min-height:46px;border:1px solid #d7dce4;border-radius:10px;padding:0 12px;font-size:16px}
.nh-mag-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:18px}
.nh-mag-card{border:1px solid #e2e6ec;border-radius:18px;padding:20px;background:#fff}
.nh-mag-card h3{margin:8px 0}
.nh-mag-card__meta{color:#667085;margin-top:10px}
.nh-mag-card__actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
@media(max-width:700px){.nh-mag-create{grid-template-columns:1fr}.nh-mag-create input,.nh-mag-create select{width:100%;box-sizing:border-box}}

.nh-feed-page,.nh-following-page{max-width:1100px;margin:0 auto}
.nh-feed-intro{font-size:18px;color:#667085}
.nh-personal-feed{margin-top:20px}
.nh-following-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px;margin-top:20px}
.nh-following-item{display:block;border:1px solid #e2e6ec;border-radius:14px;padding:16px;background:#fff;text-decoration:none}
.nh-following-type{display:block;text-transform:uppercase;font-size:12px;font-weight:700;letter-spacing:.08em;color:#b42318;margin-bottom:6px}
.nh-following-item strong{color:#101828}

.nh-comments{max-width:900px;margin:40px auto;padding:24px;border:1px solid #e5e7eb;border-radius:18px;background:#fff}
.nh-comments__head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}
.nh-comment-form textarea{width:100%;min-height:110px;border:1px solid #d1d5db;border-radius:12px;padding:12px;box-sizing:border-box;margin-bottom:10px}
.nh-comment{display:flex;gap:12px;padding:18px 0;border-top:1px solid #edf0f3}
.nh-comment-avatar img{border-radius:50%}
.nh-comment-body{flex:1}.nh-comment-body time{display:block;color:#667085;font-size:12px;margin-top:3px}
.nh-comment-body p{margin:9px 0;line-height:1.55}.nh-comment-delete{border:0;background:none;text-decoration:underline;cursor:pointer}

/* NewsHub V2.0 community controls */
.nh-comment{margin-left:calc(var(--nh-comment-depth,0)*22px)}.nh-comment-actions{display:flex;gap:12px;flex-wrap:wrap}.nh-notification.is-unread{background:#f4f7ff}


/* NewsHub V2.1 — Notification Center */
.nh-notifications{max-width:900px;margin:0 auto;padding:clamp(18px,3vw,36px);background:#fff;border:1px solid var(--nh-border);border-radius:20px;box-shadow:0 12px 40px rgba(16,24,40,.05)}
.nh-notifications__top{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;flex-wrap:wrap}
.nh-notifications__top h1{margin:0;font-size:clamp(1.7rem,3vw,2.2rem);line-height:1.2}
.nh-notifications__top p{color:var(--nh-muted);margin:8px 0 0}
.nh-notifications__count{display:inline-flex;align-items:center;padding:7px 12px;border-radius:999px;background:#fff1f0;color:#912018;font-size:.85rem;font-weight:700}
.nh-notifications__filters{display:flex;gap:8px;margin:24px 0 12px;border-bottom:1px solid var(--nh-border)}
.nh-notifications__filters a{padding:10px 14px;color:var(--nh-muted);font-weight:650;border-bottom:2px solid transparent}
.nh-notifications__filters a.is-active{color:var(--nh-text);border-color:var(--nh-accent)}
.nh-notifications__filters a span{font-size:.75rem;background:var(--nh-soft);border-radius:99px;padding:2px 7px;margin-left:4px}
.nh-notifications__actions{display:flex;justify-content:flex-end;margin:12px 0}
.nh-notifications__actions button,.nh-notifications__head button{border:1px solid var(--nh-border);background:#fff;border-radius:10px;padding:9px 13px;cursor:pointer;font-weight:650}
.nh-notifications__actions button:disabled{opacity:.45;cursor:default}
.nh-notification-list{display:grid;gap:8px}
.nh-notification{display:flex;align-items:center;gap:12px;padding:15px 14px;border:1px solid var(--nh-border);border-radius:13px;transition:background .15s,border-color .15s}
.nh-notification:hover{background:#fafafa;border-color:#d0d5dd}
.nh-notification.is-unread{background:#fff8f7;border-color:#f4c7c3}
.nh-notification__dot{flex:0 0 9px;width:9px;height:9px;border-radius:50%;background:transparent}
.nh-notification.is-unread .nh-notification__dot{background:var(--nh-accent)}
.nh-notification__body{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px}
.nh-notification__message{font-weight:600;overflow-wrap:anywhere}
.nh-notification time{color:var(--nh-muted);font-size:.82rem}
.nh-notification__open{font-size:1.7rem;color:var(--nh-muted)}
.nh-notifications__empty{text-align:center;padding:48px 16px;color:var(--nh-muted);border:1px dashed var(--nh-border);border-radius:14px}
.nh-notifications__empty>span{font-size:2rem}
.nh-notifications__empty h2{margin:8px 0 0;color:var(--nh-text);font-size:1.2rem}
.nh-notifications__empty p{margin:6px 0 0}
.nh-notifications__footnote{margin:16px 0 0;color:var(--nh-muted);font-size:.82rem}
@media(max-width:600px){.nh-notifications{padding:16px;border-radius:14px}.nh-notification{padding:12px 10px}.nh-notifications__top{gap:10px}}
