/*
Theme Name: Masaa Aggregator
Theme URI: https://masaa.co.ke
Author: Masaa
Description: Kenya at one place — News aggregation theme
Version: 1.0
*/

/* ============================================================
   DESIGN SYSTEM
============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

:root {
    /* Category colours */
    --col-politics:     #CC0000;
    --col-business:     #1a3a7c;
    --col-sports:       #1a7c3a;
    --col-entertainment:#7c1a7c;
    --col-technology:   #1a7c7c;
    --col-health:       #c45c00;
    --col-counties:     #3a7c1a;
    --col-crime:        #7c1a2a;
    --col-environment:  #2d7c2d;
    --col-international:#1a1a7c;
    --col-general:      #444;
    --col-trending:     #e8a000;

    /* UI */
    --black:   #0a0a0f;
    --dark:    #111118;
    --mid:     #1e1e2a;
    --border:  #2a2a3a;
    --white:   #ffffff;
    --offwhite:#f8f8fc;
    --text:    #1a1a2e;
    --text2:   #555566;
    --text3:   #888899;

    --font-head: 'Playfair Display', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --font-mono: 'DM Mono', monospace;
    --maxw: 1400px;
    --r: 6px;
}

*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { font-size:15px; scroll-behavior:smooth; }
body { font-family:var(--font-body); color:var(--text); background:var(--offwhite); line-height:1.6; -webkit-font-smoothing:antialiased; }
a { color:inherit; text-decoration:none; transition:all .2s; }
img { max-width:100%; height:auto; display:block; }
ul { list-style:none; }
.wrap { max-width:var(--maxw); margin:0 auto; padding:0 20px; }

/* ============================================================
   TOPBAR
============================================================ */
.m-topbar {
    background:var(--black);
    border-bottom:1px solid var(--border);
    padding:6px 0;
    font-size:11px;
    color:rgba(255,255,255,.4);
    font-family:var(--font-mono);
}
.m-topbar .wrap { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; }
.m-topbar .live-badge { display:inline-flex; align-items:center; gap:6px; color:#4ade80; font-weight:500; }
.m-topbar .live-badge::before { content:''; width:6px; height:6px; border-radius:50%; background:#4ade80; animation:pulse-green 1.5s ease-in-out infinite; }
@keyframes pulse-green { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(.8)} }
.m-topbar .social-links { display:flex; gap:12px; }
.m-topbar .social-links a { color:rgba(255,255,255,.35); font-size:11px; text-transform:uppercase; letter-spacing:.5px; }
.m-topbar .social-links a:hover { color:#CC0000; }

/* ============================================================
   HEADER
============================================================ */
.m-header {
    background:var(--black);
    padding:16px 0;
    border-bottom:3px solid #CC0000;
}
.m-header .wrap { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.m-logo { display:flex; flex-direction:column; }
.m-logo .logo-main { font-family:var(--font-head); font-size:44px; font-weight:900; color:#fff; letter-spacing:-2px; line-height:1; }
.m-logo .logo-main span { color:#CC0000; }
.m-logo .logo-sub { font-size:10px; color:rgba(255,255,255,.4); text-transform:uppercase; letter-spacing:5px; margin-top:4px; font-family:var(--font-mono); }
.m-header-search { flex:1; max-width:400px; }
.m-header-search form { display:flex; align-items:center; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.1); border-radius:30px; overflow:hidden; }
.m-header-search input { background:none; border:none; outline:none; color:#fff; padding:8px 16px; font-size:13px; width:100%; font-family:var(--font-body); }
.m-header-search input::placeholder { color:rgba(255,255,255,.3); }
.m-header-search button { background:none; border:none; color:rgba(255,255,255,.4); padding:8px 14px; cursor:pointer; font-size:16px; }
.m-header-search button:hover { color:#CC0000; }
.m-header-time { text-align:right; }
.m-header-time .time { font-family:var(--font-mono); font-size:22px; font-weight:500; color:#fff; }
.m-header-time .date { font-size:11px; color:rgba(255,255,255,.35); margin-top:2px; }

/* ============================================================
   NAVIGATION
============================================================ */
.m-nav {
    background:var(--dark);
    position:sticky;
    top:0;
    z-index:999;
    border-bottom:1px solid var(--border);
    box-shadow:0 4px 20px rgba(0,0,0,.3);
}
.m-nav .wrap { display:flex; align-items:center; justify-content:space-between; }
.m-nav .nav-cats { display:flex; align-items:center; overflow-x:auto; scrollbar-width:none; }
.m-nav .nav-cats::-webkit-scrollbar { display:none; }
.m-nav .nav-cats a { display:flex; align-items:center; gap:6px; padding:13px 14px; color:rgba(255,255,255,.6); font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.5px; white-space:nowrap; border-bottom:3px solid transparent; transition:all .2s; }
.m-nav .nav-cats a:hover { color:#fff; border-bottom-color:currentColor; }
.m-nav .nav-cats a.active { color:#fff; border-bottom-color:currentColor; }
.m-nav .nav-cats a .nav-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }

/* Category nav colours */
.nav-politics    { color:var(--col-politics)    !important; }
.nav-business    { color:var(--col-business)    !important; }
.nav-sports      { color:var(--col-sports)      !important; }
.nav-entertainment{ color:var(--col-entertainment) !important; }
.nav-technology  { color:var(--col-technology)  !important; }
.nav-health      { color:var(--col-health)       !important; }
.nav-counties    { color:var(--col-counties)    !important; }
.nav-crime       { color:var(--col-crime)        !important; }
.nav-environment { color:var(--col-environment) !important; }
.nav-international{ color:var(--col-international) !important; }
.nav-trending    { color:var(--col-trending)    !important; }

.m-ham { display:none; background:none; border:none; cursor:pointer; padding:13px 16px; flex-direction:column; gap:5px; flex-shrink:0; }
.m-ham span { display:block; width:20px; height:2px; background:rgba(255,255,255,.6); border-radius:2px; transition:all .3s; }
.m-mobnav { display:none; background:var(--mid); border-top:1px solid var(--border); }
.m-mobnav.open { display:block; }
.m-mobnav a { display:block; padding:12px 20px; color:rgba(255,255,255,.7); font-size:13px; font-weight:500; border-bottom:1px solid var(--border); }

/* ============================================================
   TICKER
============================================================ */
.m-ticker {
    background:var(--col-politics);
    padding:0;
    overflow:hidden;
    display:flex;
    align-items:center;
    height:34px;
}
.m-ticker .ticker-label { background:rgba(0,0,0,.25); color:#fff; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:2px; padding:0 16px; height:100%; display:flex; align-items:center; white-space:nowrap; flex-shrink:0; font-family:var(--font-mono); }
.m-ticker .ticker-wrap { flex:1; overflow:hidden; }
.m-ticker .ticker-inner { display:flex; animation:ticker-scroll 60s linear infinite; white-space:nowrap; }
.m-ticker .ticker-inner:hover { animation-play-state:paused; }
.m-ticker .ticker-inner a { color:rgba(255,255,255,.9); font-size:12px; font-weight:500; padding:0 40px 0 0; display:inline-block; }
.m-ticker .ticker-inner a:hover { color:#fff; }
@keyframes ticker-scroll { from{transform:translateX(0)} to{transform:translateX(-50%)} }

/* ============================================================
   TRENDING BANNER
============================================================ */
.m-trending-banner {
    background:var(--black);
    padding:16px 0;
    border-bottom:1px solid var(--border);
}
.m-trending-banner .tb-header { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.m-trending-banner .tb-label { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:2px; color:var(--col-trending); font-family:var(--font-mono); display:flex; align-items:center; gap:6px; }
.m-trending-banner .tb-label::before { content:'🔥'; font-size:14px; }
.m-trending-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:12px; }
.m-trending-item { position:relative; border-radius:var(--r); overflow:hidden; cursor:pointer; }
.m-trending-item .ti-rank { position:absolute; top:8px; left:8px; width:24px; height:24px; border-radius:50%; background:var(--col-trending); color:#000; font-size:11px; font-weight:900; display:flex; align-items:center; justify-content:center; font-family:var(--font-mono); z-index:2; }
.m-trending-item .ti-img { width:100%; height:100px; object-fit:cover; }
.m-trending-item .ti-noimg { width:100%; height:100px; background:var(--mid); display:flex; align-items:center; justify-content:center; font-size:24px; }
.m-trending-item .ti-over { position:absolute; bottom:0; left:0; right:0; background:linear-gradient(to top,rgba(0,0,0,.95) 0%,transparent 100%); padding:20px 10px 10px; }
.m-trending-item .ti-source { font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; color:var(--col-trending); margin-bottom:3px; }
.m-trending-item .ti-title { font-size:12px; font-weight:600; color:#fff; line-height:1.3; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.m-trending-item .ti-title a { color:#fff; }
.m-trending-item .ti-title a:hover { color:var(--col-trending); }

/* ============================================================
   MAIN LAYOUT
============================================================ */
.m-main { padding:20px 0; }
.m-main .wrap { display:grid; grid-template-columns:1fr 320px; gap:24px; }

/* ============================================================
   NEWS GRID
============================================================ */
.news-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }

/* NEWS CARD */
.news-card {
    background:#fff;
    border-radius:var(--r);
    overflow:hidden;
    box-shadow:0 1px 4px rgba(0,0,0,.06);
    transition:transform .2s, box-shadow .2s;
    display:flex;
    flex-direction:column;
    position:relative;
}
.news-card:hover { transform:translateY(-2px); box-shadow:0 6px 20px rgba(0,0,0,.12); }
.news-card .nc-img { width:100%; height:160px; object-fit:cover; }
.news-card .nc-noimg { width:100%; height:160px; display:flex; align-items:center; justify-content:center; font-size:36px; }
.news-card .nc-body { padding:12px; flex:1; display:flex; flex-direction:column; }
.news-card .nc-cat { display:inline-block; font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:1px; padding:2px 8px; border-radius:3px; color:#fff; margin-bottom:7px; }
.news-card .nc-title { font-family:var(--font-head); font-size:15px; font-weight:700; line-height:1.3; color:var(--text); margin-bottom:8px; flex:1; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.news-card .nc-title a:hover { opacity:.8; }
.news-card .nc-excerpt { font-size:12px; color:var(--text2); line-height:1.5; margin-bottom:10px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.news-card .nc-footer { display:flex; align-items:center; justify-content:space-between; padding-top:10px; border-top:1px solid #f0f0f8; margin-top:auto; }
.news-card .nc-source { font-size:10px; font-weight:600; color:var(--text3); text-transform:uppercase; letter-spacing:.5px; }
.news-card .nc-time { font-size:10px; color:var(--text3); font-family:var(--font-mono); }
.news-card .nc-read { position:absolute; top:10px; right:10px; background:rgba(0,0,0,.6); color:#fff; font-size:10px; font-weight:600; padding:4px 8px; border-radius:3px; text-transform:uppercase; letter-spacing:.5px; opacity:0; transition:opacity .2s; }
.news-card:hover .nc-read { opacity:1; }

/* Category colours for cards */
.nc-noimg.politics     { background:linear-gradient(135deg,#CC0000,#800000); }
.nc-noimg.business     { background:linear-gradient(135deg,#1a3a7c,#0a1a4c); }
.nc-noimg.sports       { background:linear-gradient(135deg,#1a7c3a,#0a4c1a); }
.nc-noimg.entertainment{ background:linear-gradient(135deg,#7c1a7c,#4c0a4c); }
.nc-noimg.technology   { background:linear-gradient(135deg,#1a7c7c,#0a4c4c); }
.nc-noimg.health       { background:linear-gradient(135deg,#c45c00,#7c3a00); }
.nc-noimg.counties     { background:linear-gradient(135deg,#3a7c1a,#1a4c0a); }
.nc-noimg.crime        { background:linear-gradient(135deg,#7c1a2a,#4c0a1a); }
.nc-noimg.environment  { background:linear-gradient(135deg,#2d7c2d,#1a4c1a); }
.nc-noimg.international{ background:linear-gradient(135deg,#1a1a7c,#0a0a4c); }
.nc-noimg.general      { background:linear-gradient(135deg,#444,#222); }

/* ============================================================
   CATEGORY SECTIONS
============================================================ */
.cat-section { margin-bottom:28px; }
.cat-section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; padding-bottom:10px; position:relative; }
.cat-section-header::after { content:''; position:absolute; bottom:0; left:0; right:0; height:2px; background:var(--border); border-radius:2px; }
.cat-section-header::before { content:''; position:absolute; bottom:0; left:0; width:80px; height:2px; border-radius:2px; z-index:1; }
.cat-section-header h2 { font-family:var(--font-head); font-size:18px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; display:flex; align-items:center; gap:8px; }
.cat-section-header .cat-icon { font-size:16px; }
.cat-section-header .see-more { font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.5px; opacity:.7; }
.cat-section-header .see-more:hover { opacity:1; }

/* Section colours */
.cs-politics    .cat-section-header::before, .cs-politics    .cat-section-header h2 { color:var(--col-politics); }
.cs-business    .cat-section-header::before, .cs-business    .cat-section-header h2 { color:var(--col-business); }
.cs-sports      .cat-section-header::before, .cs-sports      .cat-section-header h2 { color:var(--col-sports); }
.cs-entertainment .cat-section-header::before, .cs-entertainment .cat-section-header h2 { color:var(--col-entertainment); }
.cs-technology  .cat-section-header::before, .cs-technology  .cat-section-header h2 { color:var(--col-technology); }
.cs-health      .cat-section-header::before, .cs-health      .cat-section-header h2 { color:var(--col-health); }
.cs-counties    .cat-section-header::before, .cs-counties    .cat-section-header h2 { color:var(--col-counties); }
.cs-crime       .cat-section-header::before, .cs-crime       .cat-section-header h2 { color:var(--col-crime); }
.cs-environment .cat-section-header::before, .cs-environment .cat-section-header h2 { color:var(--col-environment); }
.cs-international .cat-section-header::before, .cs-international .cat-section-header h2 { color:var(--col-international); }

/* ============================================================
   SIDEBAR
============================================================ */
.m-sidebar {}
.sidebar-widget { background:#fff; border-radius:var(--r); padding:16px; margin-bottom:20px; box-shadow:0 1px 4px rgba(0,0,0,.06); }
.sw-title { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:1.5px; color:var(--text3); padding-bottom:10px; border-bottom:2px solid #f0f0f8; margin-bottom:12px; font-family:var(--font-mono); }

/* Sources widget */
.source-item { display:flex; align-items:center; gap:10px; padding:7px 0; border-bottom:1px solid #f8f8fc; }
.source-item:last-child { border-bottom:none; }
.source-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.source-name { font-size:12px; font-weight:500; color:var(--text); flex:1; }
.source-count { font-size:10px; font-family:var(--font-mono); color:var(--text3); }

/* Most read widget */
.mr-item { display:flex; gap:10px; padding:10px 0; border-bottom:1px solid #f8f8fc; align-items:flex-start; }
.mr-item:last-child { border-bottom:none; }
.mr-rank { font-family:var(--font-head); font-size:24px; font-weight:900; color:#f0f0f8; line-height:1; flex-shrink:0; width:28px; }
.mr-item:nth-child(1) .mr-rank { color:var(--col-politics); }
.mr-item:nth-child(2) .mr-rank { color:var(--text3); }
.mr-item:nth-child(3) .mr-rank { color:#c9a84c; }
.mr-title { font-size:12px; font-weight:600; line-height:1.35; color:var(--text); }
.mr-title a:hover { opacity:.7; }
.mr-meta { font-size:10px; color:var(--text3); margin-top:3px; font-family:var(--font-mono); }

/* ============================================================
   VIDEO SECTION
============================================================ */
.m-videos { background:var(--black); padding:24px 0; margin:20px 0; }
.m-videos .vs-header { display:flex; align-items:center; gap:10px; margin-bottom:16px; }
.m-videos .vs-title { font-family:var(--font-head); font-size:20px; font-weight:700; color:#fff; display:flex; align-items:center; gap:8px; }
.m-videos .vs-title::before { content:'▶'; color:#CC0000; font-size:16px; }
.video-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.video-item { border-radius:var(--r); overflow:hidden; background:var(--mid); }
.video-item iframe { width:100%; height:160px; border:none; display:block; }
.video-item .vi-title { padding:10px; font-size:12px; font-weight:500; color:rgba(255,255,255,.8); line-height:1.3; }
.video-item .vi-source { padding:0 10px 10px; font-size:10px; color:rgba(255,255,255,.35); text-transform:uppercase; letter-spacing:.5px; }

/* ============================================================
   INTERNATIONAL SECTION
============================================================ */
.m-international { background:var(--dark); padding:24px 0; margin:20px 0; }
.m-international .int-header { color:#fff; margin-bottom:16px; }
.m-international .news-card { background:var(--mid); }
.m-international .nc-title { color:#fff; }
.m-international .nc-excerpt { color:rgba(255,255,255,.5); }
.m-international .nc-footer { border-top-color:rgba(255,255,255,.08); }
.m-international .nc-source, .m-international .nc-time { color:rgba(255,255,255,.35); }

/* ============================================================
   LOAD MORE
============================================================ */
.load-more-wrap { text-align:center; padding:20px 0; }
.btn-load-more { display:inline-block; padding:10px 28px; background:var(--text); color:#fff; border-radius:30px; font-size:13px; font-weight:600; cursor:pointer; transition:all .2s; border:none; font-family:var(--font-body); }
.btn-load-more:hover { background:#CC0000; color:#fff; transform:translateY(-1px); }

/* ============================================================
   FOOTER
============================================================ */
.m-footer { background:var(--black); padding:40px 0 0; border-top:3px solid #CC0000; margin-top:40px; }
.m-footer .wrap { display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:32px; padding-bottom:32px; }
.mf-logo { font-family:var(--font-head); font-size:36px; font-weight:900; color:#fff; letter-spacing:-1px; }
.mf-logo span { color:#CC0000; }
.mf-tag { font-size:10px; color:rgba(255,255,255,.25); text-transform:uppercase; letter-spacing:4px; margin-top:4px; display:block; font-family:var(--font-mono); }
.mf-desc { font-size:13px; color:rgba(255,255,255,.4); line-height:1.6; margin-top:12px; }
.mf-col h4 { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:2px; color:rgba(255,255,255,.25); padding-bottom:10px; border-bottom:1px solid rgba(255,255,255,.06); margin-bottom:12px; font-family:var(--font-mono); }
.mf-col ul li { margin-bottom:8px; }
.mf-col ul li a { font-size:13px; color:rgba(255,255,255,.45); }
.mf-col ul li a:hover { color:#CC0000; }
.m-footer-btm { background:#050508; padding:14px 0; }
.m-footer-btm .wrap { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; }
.m-footer-btm p { font-size:11px; color:rgba(255,255,255,.2); font-family:var(--font-mono); }

/* ============================================================
   AD ZONES
============================================================ */
.ad-zone { background:#f0f0f8; border:1px dashed #ddd; display:flex; align-items:center; justify-content:center; color:#bbb; font-size:11px; border-radius:var(--r); text-align:center; font-family:var(--font-mono); }
.ad-728 { width:100%; height:90px; margin:16px 0; }
.ad-300 { width:100%; height:250px; }
.ad-300b { width:100%; height:300px; margin-top:16px; }

/* ============================================================
   RESPONSIVE
============================================================ */
@media(max-width:1100px) {
    .m-main .wrap { grid-template-columns:1fr; }
    .m-sidebar { display:none; }
    .m-trending-grid { grid-template-columns:repeat(3,1fr); }
    .video-grid { grid-template-columns:repeat(2,1fr); }
    .m-footer .wrap { grid-template-columns:1fr 1fr; }
}
@media(max-width:768px) {
    .m-logo .logo-main { font-size:32px; }
    .m-header-search { display:none; }
    .m-header-time { display:none; }
    .m-nav .nav-cats { display:none; }
    .m-ham { display:flex; }
    .news-grid { grid-template-columns:1fr 1fr; }
    .m-trending-grid { grid-template-columns:repeat(2,1fr); }
    .video-grid { grid-template-columns:1fr; }
    .m-footer .wrap { grid-template-columns:1fr; }
}
@media(max-width:480px) {
    .news-grid { grid-template-columns:1fr; }
    .m-trending-grid { grid-template-columns:1fr 1fr; }
    .m-topbar .social-links { display:none; }
}
