/*
Theme Name: WireNews
Theme URI: https://example.com
Author: BusinessToMark
Description: A distinctive wire-service style WordPress news theme - a scrolling breaking-news ticker, color-coded categories, a subcategory mega-menu, a big-story-plus-list homepage hero, per-category sections, and single-post pages with a More in Category module, Related Articles, and a sidebar with ads and a Latest in Category widget. Fully portable - no site name, domain, or category is hardcoded; every category on the site is picked up automatically and assigned a color from a fixed palette.
Version: 1.0
Requires at least: 5.9
Requires PHP: 7.4
Text Domain: wirenews
*/

:root{
  --wn-red:#e2231a;
  --wn-black:#0d0d0d;
  --wn-gray:#6b6b6b;
  --wn-border:#e6e6e6;
  --wn-font: -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
}
*{box-sizing:border-box;}
body{margin:0;font-family:var(--wn-font);color:var(--wn-black);background:#fff;}
a{color:inherit;text-decoration:none;}
.container{max-width:1220px;margin:0 auto;padding:0 20px;}

/* ---- Breaking news ticker ---- */
.wn-ticker{background:var(--wn-red);color:#fff;overflow:hidden;white-space:nowrap;}
.wn-ticker .container{display:flex;align-items:center;height:38px;gap:14px;}
.wn-ticker-label{background:#000;padding:4px 12px;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.04em;flex-shrink:0;}
.wn-ticker-track{overflow:hidden;flex:1;position:relative;height:38px;display:flex;align-items:center;}
.wn-ticker-items{display:flex;gap:50px;animation:wn-scroll 30s linear infinite;white-space:nowrap;}
.wn-ticker-items a{font-size:13px;font-weight:600;color:#fff;}
@keyframes wn-scroll{0%{transform:translateX(0);}100%{transform:translateX(-100%);}}

/* ---- Header ---- */
.wn-header{padding:18px 0;border-bottom:4px solid var(--wn-black);}
.wn-header-inner{display:flex;align-items:center;justify-content:space-between;}
.wn-logo{font-size:32px;font-weight:900;letter-spacing:-.02em;}
.wn-logo .accent{color:var(--wn-red);}
.wn-header-right{display:flex;align-items:center;gap:16px;}
.wn-live-badge{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:800;color:var(--wn-red);text-transform:uppercase;}
.wn-live-dot{width:8px;height:8px;border-radius:50%;background:var(--wn-red);animation:wn-pulse 1.5s infinite;}
@keyframes wn-pulse{0%,100%{opacity:1;}50%{opacity:.3;}}

/* ---- Nav with mega-menu subcategories ---- */
.wn-nav{background:var(--wn-black);position:relative;}
.wn-nav-list{display:flex;list-style:none;margin:0;padding:0;}
.wn-nav-list>li{position:relative;}
.wn-nav-list>li>a{display:block;padding:14px 18px;color:#fff;font-size:13px;font-weight:800;text-transform:uppercase;letter-spacing:.02em;border-left:3px solid transparent;}
.wn-nav-list>li:hover>a{background:#1a1a1a;border-left-color:var(--wn-red);}
.wn-submenu, .wn-nav-list .sub-menu{display:none;position:absolute;top:100%;left:0;background:#fff;box-shadow:0 8px 20px rgba(0,0,0,.15);min-width:220px;z-index:50;padding:8px 0;list-style:none;margin:0;}
.wn-nav-list>li:hover .wn-submenu, .wn-nav-list>li:hover>.sub-menu{display:block;}
.wn-submenu a, .wn-nav-list .sub-menu a{display:block;padding:10px 18px;font-size:13px;font-weight:600;color:var(--wn-black);}
.wn-submenu a:hover, .wn-nav-list .sub-menu a:hover{background:#f5f5f5;color:var(--wn-red);}

/* ---- Category color pills (assigned per category) ---- */
.wn-tag{display:inline-block;font-size:10.5px;font-weight:900;text-transform:uppercase;letter-spacing:.03em;padding:4px 10px;color:#fff;margin-bottom:8px;}

/* ---- Hero: big story + side list ---- */
.wn-hero-module{display:grid;grid-template-columns:1.7fr 1fr;gap:0;margin:0 0 40px;border:1px solid var(--wn-border);}
.wn-hero-main{position:relative;border-right:1px solid var(--wn-border);}
.wn-hero-img{width:100%;height:520px;object-fit:cover;display:block;}
.wn-hero-overlay{position:absolute;left:0;right:0;bottom:0;padding:26px;background:linear-gradient(to top,rgba(0,0,0,.9),rgba(0,0,0,.1));}
.wn-hero-overlay h1{color:#fff;font-size:28px;line-height:1.2;font-weight:800;margin:8px 0 0;}
.wn-hero-side{display:flex;flex-direction:column;}
.wn-hero-side-item{display:block;padding:16px 20px;border-bottom:1px solid var(--wn-border);flex:1;}
.wn-hero-side-item:last-child{border-bottom:0;}
.wn-hero-side-item h4{font-size:14.5px;font-weight:800;line-height:1.32;margin:6px 0 6px;}
.wn-hero-side-item:hover h4{color:var(--wn-red);}
.wn-time{font-size:11px;color:var(--wn-gray);font-weight:700;}

/* ---- Category sections with color-coded left border ---- */
.wn-section{margin-bottom:40px;}
.wn-section-head{display:flex;justify-content:space-between;align-items:center;padding:10px 16px;margin-bottom:18px;border-left:5px solid var(--wn-red);background:#fafafa;}
.wn-section-head h2{font-size:17px;font-weight:900;text-transform:uppercase;letter-spacing:.02em;margin:0;}
.wn-section-head a{font-size:12px;font-weight:800;color:var(--wn-red);}
.wn-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;}
.wn-card{display:block;}
.wn-card-img{width:100%;height:150px;object-fit:cover;margin-bottom:10px;}
.wn-card h4{font-size:14px;font-weight:800;line-height:1.32;margin:0 0 6px;}
.wn-card:hover h4{color:var(--wn-red);}

/* ---- Footer ---- */
.wn-footer{background:var(--wn-black);color:#aaa;padding:40px 0 20px;margin-top:20px;}
.wn-footer-grid{display:grid;grid-template-columns:1.3fr 1fr 1fr 1fr;gap:36px;}
.wn-footer-title{color:#fff;font-size:13px;font-weight:900;text-transform:uppercase;margin-bottom:14px;}
.wn-footer-grid a{display:block;font-size:13px;padding:6px 0;color:#aaa;}
.wn-footer-grid a:hover{color:var(--wn-red);}
.wn-footer-bottom{text-align:center;font-size:12px;color:#666;margin-top:30px;padding-top:20px;border-top:1px solid #2a2a2a;}

@media(max-width:900px){
  .wn-hero-module{grid-template-columns:1fr;}
  .wn-grid{grid-template-columns:repeat(2,1fr);}
  .wn-footer-grid{grid-template-columns:1fr 1fr;}
  .wn-nav-list{flex-wrap:wrap;}
}

/* ---- Descriptions added to hero + cards ---- */
.wn-hero-overlay p{color:#e8e8e8;font-size:14px;line-height:1.5;margin:10px 0 0;max-width:600px;}
.wn-hero-side-item p{font-size:12.5px;color:#555;line-height:1.45;margin:0 0 6px;}
.wn-card p{font-size:12.5px;color:#555;line-height:1.45;margin:0 0 6px;}

/* ---- Author byline ---- */
.wn-author{font-size:11.5px;color:var(--wn-gray);font-weight:600;}
.wn-author a{color:var(--wn-black);font-weight:800;}
.wn-author a:hover{color:var(--wn-red);text-decoration:underline;}
.wn-hero-overlay .wn-author{color:#ddd;}
.wn-hero-overlay .wn-author a{color:#fff;}

.wn-card-link{display:block;color:inherit;}
.wn-card-link:hover h4, .wn-card-link:hover h1{color:var(--wn-red);}

/* ---------- Single article page ---------- */
.wn-breadcrumb{font-size:12.5px;color:var(--wn-gray);margin:20px 0 6px;}
.wn-breadcrumb a{color:var(--wn-gray);}
.wn-breadcrumb a:hover{color:var(--wn-red);}
.wn-article-header{padding-bottom:18px;border-bottom:1px solid var(--wn-border);margin-bottom:20px;}
.wn-article-header h1{font-size:32px;line-height:1.2;font-weight:900;margin:10px 0 12px;}
.wn-article-byline{display:flex;align-items:center;gap:10px;font-size:13px;color:var(--wn-gray);}
.wn-article-byline img{width:36px;height:36px;border-radius:50%;background:#ccc;}
.wn-article-thumb{width:100%;height:440px;object-fit:cover;margin-bottom:22px;}
.wn-article-layout{display:grid;grid-template-columns:2.2fr 1fr;gap:36px;align-items:start;}
.wn-article-body{font-size:17px;line-height:1.75;color:#1a1a1a;}
.wn-article-body p{margin:0 0 20px;}
.wn-article-body h2{font-size:23px;font-weight:800;margin:32px 0 12px;}

/* ---- "More in Category" — 1 big post (left) + list (right) ---- */
.wn-more-in{background:#fafafa;border-radius:8px;padding:24px 26px;margin:32px 0;}
.wn-more-in-title{font-size:19px;font-weight:800;margin:0 0 18px;display:flex;align-items:center;gap:10px;}
.wn-more-in-title .wn-globe{color:#3858e9;font-size:20px;}
.wn-more-in-layout{display:grid;grid-template-columns:1fr 1.3fr;gap:26px;align-items:start;}
.wn-more-in-big-img{width:100%;height:340px;object-fit:cover;border-radius:6px;display:block;}
.wn-more-in-list{display:flex;flex-direction:column;}
.wn-more-in-row{display:flex;gap:14px;padding:12px 0;border-bottom:1px solid #e6e6e6;align-items:flex-start;}
.wn-more-in-row:last-child{border-bottom:0;padding-bottom:0;}
.wn-more-in-row.no-thumb{padding-top:14px;}
.wn-more-in-thumb{width:70px;height:70px;object-fit:cover;border-radius:6px;flex-shrink:0;}
.wn-more-in-row h5{font-size:15px;font-weight:800;line-height:1.32;margin:0 0 6px;}
.wn-more-in-row:hover h5{color:var(--wn-red);}
.wn-more-in-author{font-size:12.5px;color:var(--wn-gray);}

/* ---- Related Articles — below the full article ---- */
.wn-related{margin-top:40px;padding-top:24px;border-top:3px solid var(--wn-black);}
.wn-related-title{font-size:20px;font-weight:900;text-transform:uppercase;margin-bottom:18px;}
.wn-related-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px;}
.wn-related-card-img{width:100%;height:180px;object-fit:cover;margin-bottom:10px;}
.wn-related-card h4{font-size:16px;font-weight:800;line-height:1.32;margin:6px 0 6px;}

/* ---- Sidebar: ads + Latest in Category ---- */
.wn-ad-slot{background:#fafafa;border:1px dashed #ccc;display:flex;align-items:center;justify-content:center;min-height:250px;color:#999;font-size:13px;text-align:center;margin-bottom:28px;padding:10px;}
.wn-sidebar-title{font-size:13px;font-weight:900;text-transform:uppercase;letter-spacing:.02em;border-bottom:3px solid var(--wn-red);padding-bottom:10px;margin:0 0 4px;}
.wn-sidebar-item{display:flex;gap:12px;padding:14px 0;border-bottom:1px solid var(--wn-border);align-items:flex-start;}
.wn-sidebar-thumb{width:80px;height:64px;object-fit:cover;flex-shrink:0;}
.wn-sidebar-item h5{font-size:13px;font-weight:800;line-height:1.32;margin:0 0 4px;}
.wn-sidebar-item:hover h5{color:var(--wn-red);}

@media(max-width:900px){
  .wn-article-layout{grid-template-columns:1fr;}
  .wn-more-in-grid{grid-template-columns:1fr 1fr;}
  .wn-related-grid{grid-template-columns:1fr;}
}
