/*
Theme Name: hubAfrika.Co.Ke News
Theme URI: https://hubafrika.co.ke/
Author: hubAfrika
Description: WordPress conversion of the hubAfrika.Co.Ke News Page. Original responsive design preserved.
Version: 1.0.0
*/

/* =========================================================
   HUBAFRIKA.CO.KE — COMPLETE RESPONSIVE STYLES
   ========================================================= */

:root{
  --red:#ff4f12;
  --dark:#1a1a1a;
  --gray-text:#4a4a4a;
  --light-gray:#f4f4f4;
  --border:#e2e2e2;
  --link:#0b57d0;
  --sidebar-bg:#fafafa;

  --font-head:Georgia, 'Times New Roman', serif;
  --font-body:Arial, Helvetica, sans-serif;
}


/* =========================================================
   RESET
   ========================================================= */

*{
  box-sizing:border-box;
  margin:0;
  padding:0;
}

html{
  width:100%;
  overflow-x:hidden;
}

body{
  width:100%;
  margin:0;
  padding:0;

  font-family:var(--font-body);
  color:var(--dark);
  background:#fff;
  line-height:1.4;

  overflow-x:hidden;
}

a{
  color:inherit;
  text-decoration:none;
}

img{
  max-width:100%;
  height:auto;
  display:block;
}


/* =========================================================
   IMAGE PLACEHOLDER
   ========================================================= */

.placeholder-img{
  width:100%;
  aspect-ratio:16/10;

  background:linear-gradient(
    135deg,
    #d7d7d7,
    #eeeeee
  );

  display:flex;
  align-items:center;
  justify-content:center;

  color:#999;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.05em;

  overflow:hidden;
}


/* =========================================================
   MAIN SITE WIDTH
   ========================================================= */

.wrap{
  width:100%;
  max-width:1180px;

  margin:0 auto;

  /*
   IMPORTANT:
   No horizontal padding here.
   Individual sections control their own spacing.
  */
  padding:0;
}


/* =========================================================
   TOP BAR
   ========================================================= */

.topbar{
  width:100%;
  max-width:1180px;

  margin:0 auto;

  background:#071c3c;
  color:#fff;

  font-size:12px;

  padding:4px 0;
}

.topbar .wrap{
  width:100%;
  max-width:none;

  display:flex;
  justify-content:space-between;
  align-items:center;

  padding:0 16px;
}


/* =========================================================
   HEADER / LOGO
   ========================================================= */

header.site-header{
  width:100%;
  max-width:1180px;

  margin:0 auto;

  /*
   FIX:
   Removed the old 16px left/right padding.
   The logo now begins exactly at the left edge
   of the 1180px website section.
  */

  padding:14px 0;

  border-bottom:4px solid var(--red);
}

header.site-header .wrap{
  width:100%;
  max-width:none;

  padding:0;
}

.brand{
  display:inline-flex;
  align-items:center;
}

.brand img{
  height:64px;
  width:auto;

  object-fit:contain;
  display:block;
}


/* =========================================================
   MAIN NAVIGATION
   ========================================================= */

nav.main-nav{
  width:100%;
  max-width:1180px;

  margin:0 auto;

  background:var(--red);
}

nav.main-nav .wrap{
  width:100%;
  max-width:none;

  padding:0;
}

nav.main-nav ul{
  display:flex;

  list-style:none;
  flex-wrap:wrap;

  /*
   Navigation itself keeps its 16px breathing room.
  */
  padding:0 16px;

  margin:0;
}

nav.main-nav a{
  display:block;

  padding:10px 16px;

  color:#fff;

  font-size:13px;
  font-weight:600;

  text-transform:uppercase;
  letter-spacing:.03em;

  white-space:nowrap;
}

nav.main-nav a:hover{
  background:rgba(0,0,0,.15);
}

  /* ===== Layout ===== */
  .content-area{
    display:grid;
    grid-template-columns: 2.1fr 1fr;
    gap:28px;
    padding:24px 0 40px;
  }
  .section-title{
    display:flex;
    align-items:center;
    gap:14px;
    font-family:var(--font-body);
    font-size:15px;
    font-weight:bold;
    letter-spacing:.06em;
    text-transform:uppercase;
    color:var(--red);
    margin-bottom:18px;
  }
  .section-title::before,
  .section-title::after{
    content:"";
    flex:1;
    height:1px;
    background:var(--red);
  }

  /* ===== Article list =====
     FIX: this used to be grid-template-columns:150px 1fr with the
     image at aspect-ratio:4/3, which made News page thumbnails
     noticeably smaller and squarer than every other listing page
     on the site (style.css uses 300px 1fr / aspect-ratio:2/1).
     Matched to the site-wide sizing and to the reference image
     supplied (a wide, ~2:1 landscape crop). */
  .article{
    display:grid;
    grid-template-columns:300px 1fr;
    gap:14px;
    padding:16px 0;
    border-bottom:1px solid var(--border);
  }
  .article:first-child{padding-top:0;}
  .article .placeholder-img{aspect-ratio:2/1;border-radius:2px;}
  .article .meta{
    font-size:11px;
    color:var(--red);
    text-transform:uppercase;
    font-weight:bold;
    letter-spacing:.03em;
    margin-bottom:4px;
  }
  .article .meta .byline{color:#999;font-weight:normal;text-transform:none;margin-left:6px;}
  .article h3{
    font-family:var(--font-head);
    font-size:18px;
    line-height:1.25;
    margin-bottom:6px;
  }
  .article h3 a:hover{color:var(--red);}
  .article p.excerpt{
    font-size:13.5px;
    color:var(--gray-text);
  }

  /* Featured big story */
  .featured-story{
    margin-bottom:20px;
  }
  .featured-story .placeholder-img{aspect-ratio:16/8;border-radius:2px;margin-bottom:12px;}
  .featured-story h2{
    font-family:var(--font-head);
    font-size:26px;
    line-height:1.2;
    margin-bottom:8px;
  }
  .featured-story .meta{font-size:11px;color:var(--red);font-weight:bold;text-transform:uppercase;margin-bottom:6px;}
  .featured-story p.excerpt{color:var(--gray-text);font-size:14.5px;}

  /* Byline/date box */
  .byline-box{
    display:inline-flex;
    align-items:stretch;
    border:1px solid #cfcfcf;
    border-radius:2px;
    overflow:hidden;
    font-size:11px;
    font-weight:bold;
    letter-spacing:.02em;
    margin-bottom:12px;
  }
  .byline-box .date{
    background:#5a5f66;
    color:#fff;
    padding:6px 12px;
    text-transform:uppercase;
    white-space:nowrap;
  }
  .byline-box .author{
    background:#eceef0;
    color:#4a4a4a;
    padding:6px 12px;
    text-transform:uppercase;
    white-space:nowrap;
  }

  /* ===== Sidebar ===== */
  aside.sidebar{background:var(--sidebar-bg);}
  .widget{
    background:#fff;
    border:1px solid var(--border);
    padding:16px;
    margin-bottom:20px;
  }
  .widget h4{
    display:flex;
    align-items:center;
    gap:10px;
    font-family:var(--font-body);
    font-size:13px;
    font-weight:bold;
    margin-bottom:14px;
    text-transform:uppercase;
    letter-spacing:.06em;
    color:var(--red);
  }
  .widget h4::before,
  .widget h4::after{
    content:"";
    flex:1;
    height:1px;
    background:var(--red);
  }
  .search-box{
    display:flex;
    border:1px solid #ccc;
    border-radius:3px;
    overflow:hidden;
  }
  .search-box input{
    flex:1;
    border:none;
    padding:8px 10px;
    font-size:13px;
    outline:none;
  }
  .search-box button{
    background:var(--red);
    color:#fff;
    border:none;
    padding:0 14px;
    cursor:pointer;
    font-size:14px;
  }
  .tv-ad{
    background:linear-gradient(160deg,#0a2540,#123a63);
    color:#fff;
    padding:18px;
    text-align:center;
    border-radius:4px;
    margin-top:14px;
  }
  .tv-ad .tag{
    display:inline-block;
    font-size:10px;
    background:#fff;
    color:#0a2540;
    padding:2px 8px;
    border-radius:2px;
    font-weight:bold;
    margin-bottom:8px;
  }
  .tv-ad h5{font-size:15px;margin-bottom:4px;}
  .tv-ad p{font-size:11px;opacity:.8;margin-bottom:12px;}
  .tv-ad .watch-btn{
    display:inline-block;
    background:var(--red);
    padding:6px 16px;
    border-radius:20px;
    font-size:11px;
    font-weight:bold;
  }

  /* =========================================================
   POPULAR NEWS
   ========================================================= */

.ranked-list{
  list-style:none;

  counter-reset:rank;
}

.ranked-list li{
  display:flex;

  gap:10px;

  padding:10px 0;

  border-bottom:1px solid var(--border);

  align-items:flex-start;
}

.ranked-list li:last-child{
  border-bottom:none;

  padding-bottom:0;
}

.ranked-list .num{
  font-family:var(--font-head);

  font-size:20px;

  font-weight:bold;

  color:#141212;

  line-height:1;

  min-width:20px;
}

.ranked-list a{
  font-size:13.5px;

  font-weight:600;

  line-height:1.35;
}

.ranked-list a:hover{
  color:var(--red);
}

  /* ===== Pagination ===== */
  .pagination{
    text-align:center;
    padding:20px 0 40px;
    font-size:13px;
    color:#888;
  }

  /* ===== Footer ===== */
  footer.site-footer{
    background: #071c3c;
    color:#ccc;
    padding:24px 0;
    text-align:center;
    font-size:12.5px;

/* Constrain width */
    max-width: 1180px;
    margin: 0 auto;
  }
  
  footer.site-footer .links{
    display:flex;
    justify-content:center;
    gap:18px;
    flex-wrap:wrap;
    margin-bottom:10px;
  }
  footer.site-footer a:hover{color:#fff;}

  /* =========================================================
     RESPONSIVE / MOBILE-FIRST ADJUSTMENTS
     Designed for large, medium and small phones
     ========================================================= */

  /* Mobile menu button is hidden on desktop */
  .menu-toggle{
    display:none;
    width:100%;
    border:0;
    background:transparent;
    color:#fff;
    font:700 14px/1 var(--font-body);
    text-transform:uppercase;
    letter-spacing:.04em;
    padding:12px 16px;
    text-align:left;
    cursor:pointer;
  }

  .menu-toggle .menu-icon{
    font-size:20px;
    vertical-align:-2px;
    margin-right:8px;
  }

  /* Tablets / medium screens */
  @media (max-width: 1024px){
    .wrap,
    .topbar,
    header.site-header,
    nav.main-nav,
    footer.site-footer{
      max-width:100%;
    }

    .content-area{
      padding-left:20px;
      padding-right:20px;
      gap:22px;
    }

    .article{
      grid-template-columns:130px minmax(0,1fr);
    }

    .article h3{
      font-size:17px;
    }

    .featured-story h2{
      font-size:25px;
    }

    nav.main-nav ul{
      padding:0 10px;
    }

    nav.main-nav a{
      padding:10px 11px;
      font-size:12px;
    }
  }

  /* Phones and small tablets */
  @media (max-width: 860px){
    .topbar{
      padding:6px 0;
    }

    .topbar .wrap{
      padding:0 16px;
      gap:8px;
    }

    .topbar .wrap span:last-child{
      white-space:nowrap;
    }

    header.site-header{
      padding:12px 16px;
    }

    header.site-header .wrap{
      display:flex;
      justify-content:center;
    }

    .brand img{
      height:52px;
      max-width:85vw;
    }

    /* Replace crowded multi-line navigation with a hamburger */
    nav.main-nav .wrap{
      padding:0;
    }

    .menu-toggle{
      display:block;
    }

    nav.main-nav ul{
      display:none;
      flex-direction:column;
      flex-wrap:nowrap;
      padding:0;
      width:100%;
    }

    nav.main-nav ul.is-open{
      display:flex;
    }

    nav.main-nav li{
      width:100%;
      border-top:1px solid rgba(255,255,255,.16);
    }

    nav.main-nav a{
      width:100%;
      padding:13px 16px;
      font-size:13px;
      min-height:44px;
      display:flex;
      align-items:center;
    }

    .content-area{
      display:block;
      padding:20px 16px 34px;
    }

    .section-title{
      font-size:14px;
      margin-bottom:16px;
      gap:10px;
    }

    .featured-story .placeholder-img{
      aspect-ratio:16/9;
      margin-bottom:10px;
    }

    .featured-story h2{
      font-size:24px;
      line-height:1.18;
    }

    .featured-story p.excerpt{
      font-size:14px;
    }

    .article{
      grid-template-columns:110px minmax(0,1fr);
      gap:12px;
      padding:14px 0;
    }

    .article .placeholder-img{
      aspect-ratio:2/1;
    }

    .article h3{
      font-size:16px;
      line-height:1.25;
    }

    .article p.excerpt{
      font-size:13px;
      line-height:1.4;
    }

    .byline-box{
      max-width:100%;
      margin-bottom:8px;
      font-size:9px;
    }

    .byline-box .date,
    .byline-box .author{
      padding:5px 7px;
      overflow:hidden;
      text-overflow:ellipsis;
    }

    .byline-box .date{
      max-width:58%;
    }

    .byline-box .author{
      max-width:42%;
    }

    aside.sidebar{
      background:transparent;
      margin-top:8px;
    }

    .widget{
      padding:14px;
      margin-bottom:16px;
    }

    .ranked-list a{
      font-size:14px;
    }

    .ranked-list .num{
      font-size:21px;
      min-width:22px;
    }

    .pagination{
      padding:18px 0 28px;
    }

    footer.site-footer{
      padding:22px 16px;
    }

    footer.site-footer .links{
      gap:12px 18px;
    }
  }

  /* Standard small phones */
  @media (max-width: 600px){
    .topbar .wrap{
      justify-content:center;
      text-align:center;
    }

    .topbar .wrap span:first-child{
      font-size:11px;
    }

    .topbar .wrap span:last-child{
      display:none;
    }

    header.site-header{
      padding:10px 12px;
      border-bottom-width:3px;
    }

    .brand img{
      height:46px;
      max-width:88vw;
    }

    .content-area{
      padding-left:12px;
      padding-right:12px;
    }

    .section-title{
      font-size:13px;
    }

    .featured-story h2{
      font-size:22px;
    }

    .featured-story p.excerpt{
      font-size:13.5px;
    }

    /* Articles become full-width cards for easier reading/tapping */
    .article{
      display:block;
      padding:16px 0;
    }

    .article .placeholder-img{
      width:100%;
      aspect-ratio:2/1;
      margin-bottom:10px;
    }

    .article h3{
      font-size:18px;
      line-height:1.25;
      margin-bottom:6px;
    }

    .article p.excerpt{
      font-size:13.5px;
    }

    .byline-box{
      display:flex;
      width:100%;
      max-width:100%;
      margin-bottom:9px;
    }

    .byline-box .date{
      max-width:62%;
      flex:1 1 auto;
    }

    .byline-box .author{
      max-width:38%;
      flex:0 1 auto;
    }

    .widget h4{
      font-size:12px;
    }

    .search-box input{
      min-width:0;
      font-size:14px;
      padding:10px;
    }

    .search-box button{
      min-width:48px;
      padding:0 12px;
    }

    .tv-ad{
      padding:16px 12px;
    }

    .ranked-list li{
      gap:11px;
      padding:11px 0;
    }

    .ranked-list .num{
      font-size:22px;
      min-width:23px;
    }

    .ranked-list a{
      font-size:14px;
      line-height:1.35;
    }

    footer.site-footer{
      font-size:12px;
    }
  }

  /* Very small phones: 320–380px */
  @media (max-width: 380px){
    .content-area{
      padding-left:10px;
      padding-right:10px;
    }

    .brand img{
      height:42px;
    }

    .featured-story h2{
      font-size:20px;
    }

    .article h3{
      font-size:17px;
    }

    .byline-box{
      font-size:8px;
    }

    .byline-box .date,
    .byline-box .author{
      padding:5px 6px;
    }

    .ranked-list a{
      font-size:13.5px;
    }

    footer.site-footer .links{
      display:grid;
      grid-template-columns:1fr 1fr;
      gap:10px;
    }
  }

  /* Accessibility: prevent focus/interaction problems on touch devices */
  nav.main-nav a,
  .menu-toggle,
  .watch-btn,
  .search-box button{
    -webkit-tap-highlight-color:transparent;
  }

  nav.main-nav a:focus-visible,
  .menu-toggle:focus-visible,
  .search-box button:focus-visible{
    outline:3px solid #fff;
    outline-offset:-3px;
  }