/*
Theme Name: Kahawa News
Theme URI: https://example.com/kahawa-news
Author: Okii
Description: Custom news homepage template inspired by a magazine-style layout — hero slider, category grids, sidebar headlines, and tag-based post badges. Built to be dropped into an existing WordPress install as a homepage layout.
Version: 1.0
Text Domain: kahawa-news
*/

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1a1a1a;
  background: #f4f4f4;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Top utility bar ---------- */
.kt-topbar {
  background: #111;
  color: #ccc;
  font-size: 12px;
}
.kt-topbar .container {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  padding: 6px 16px;
}
.kt-topbar a { color: #ccc; }
.kt-topbar a:hover { color: #fff; }

/* ---------- Header ---------- */
.kt-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 18px 0;
}
.kt-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kt-logo {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: 0.5px;
}
.kt-logo .kt-logo-part1 { color: #111; }
.kt-logo .kt-logo-part2 {
  background: #e11b22;
  color: #fff;
  padding: 2px 8px;
  border-radius: 3px;
}
.kt-tagline {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3px;
  color: #e11b22;
  text-align: center;
  margin-top: 2px;
}
.kt-header-cta a {
  background: #111;
  color: #fff;
  padding: 10px 22px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 14px;
}
.kt-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
}

/* ---------- Nav ---------- */
.kt-nav {
  background: #fff;
  border-bottom: 3px solid #e11b22;
}
.kt-nav ul {
  display: flex;
  gap: 28px;
  padding: 12px 16px;
  overflow-x: auto;
}
.kt-nav a {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #222;
  white-space: nowrap;
}
.kt-nav a:hover { color: #e11b22; }

/* ---------- Ad banner ---------- */
.kt-ad-banner {
  background: #fff;
  margin: 18px 0;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  border: 1px solid #eee;
  border-radius: 6px;
}
.kt-ad-banner img { max-height: 90px; border-radius: 4px; }
.kt-ad-banner .kt-ad-copy { flex: 1; min-width: 200px; }
.kt-ad-banner .kt-ad-copy h4 { margin: 0 0 4px; font-size: 20px; }
.kt-ad-banner .kt-ad-btn {
  background: #3c1a78;
  color: #fff;
  padding: 12px 26px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 14px;
}
.kt-ad-label { font-size: 12px; color: #888; display: flex; align-items: center; gap: 8px; }

/* ---------- Section titles ---------- */
.kt-section-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #e11b22;
  border-bottom: 2px solid #e11b22;
  display: inline-block;
  padding-bottom: 6px;
  margin: 30px 0 16px;
}

/* ---------- Badges ---------- */
.kt-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
  background: #e11b22;
  padding: 3px 8px;
  border-radius: 2px;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.kt-badge.cat-sports { background: #1a7d3c; }
.kt-badge.cat-entertainment { background: #c2185b; }
.kt-badge.cat-crime { background: #7a0e0e; }
.kt-badge.cat-celebrity { background: #6a1fb0; }
.kt-badge.cat-tech { background: #0d5cab; }
.kt-badge.cat-world { background: #b8860b; }

/* ---------- Card ---------- */
.kt-card { margin-bottom: 20px; }
.kt-card img { border-radius: 6px; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.kt-card h3 {
  font-size: 15px;
  line-height: 1.35;
  margin: 8px 0 4px;
  font-weight: 700;
}
.kt-card h3 a:hover { color: #e11b22; }
.kt-card .kt-meta {
  font-size: 11px;
  color: #999;
}
.kt-card.kt-card-sm { display: flex; gap: 10px; margin-bottom: 14px; }
.kt-card.kt-card-sm img { width: 90px; height: 70px; flex-shrink: 0; aspect-ratio: auto; }
.kt-card.kt-card-sm h3 { font-size: 13px; margin: 0 0 4px; }

/* ---------- Featured top grid ---------- */
/* Use flex layout for the three‑column hero area (overrides the grid below) */
.kt-featured-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: stretch;
  margin-top: 20px;
}
.kt-featured-col-side,
.kt-slider {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
}
.kt-slider {
  /* ensures inner content fills the column */
}
.kt-hero-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.kt-hero-thumb-item {
  flex: 1 1 calc(50% - 5px);
  min-width: 0;
}
.kt-hero-main {
  flex: 1; /* takes available space */
}

/* Side columns */
.kt-featured-col-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
}
.kt-featured-col-side .kt-card {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.kt-featured-col-side .kt-card img {
  aspect-ratio: 16/10;
  object-fit: cover;
  width: 100%;
}

/* Single featured hero (replaces slider) */
.kt-featured-hero {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.kt-featured-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16/10;
}
.kt-featured-hero-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  color: #fff;
  padding: 40px 20px 16px;
}
.kt-featured-hero-caption h2 {
  font-size: 22px;
  margin: 0 0 6px;
}
.kt-featured-hero-caption .kt-meta {
  color: #ddd;
}

/* Top headlines list */
.kt-headlines-box {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 14px;
}
.kt-headlines-box .kt-section-title { margin-top: 0; font-size: 12px; }
.kt-headline-item {
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}
.kt-headline-item:last-child { border-bottom: none; }
.kt-headline-item a:hover { color: #e11b22; }

/* ---------- Secondary featured row (3 equal columns) ---------- */
.kt-secondary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 4px;
}
.kt-secondary-row .kt-card {
  display: flex;
  flex-direction: column;
}
.kt-secondary-row .kt-card img {
  aspect-ratio: 16/10;
  object-fit: cover;
  width: 100%;
  border-radius: 6px;
}

/* ---------- Grid rows (Latest news, How-to, Tech, Sports, World) ---------- */
.kt-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ---------- Big hero banner (single image + caption, mid-page) ---------- */
.kt-hero {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 30px;
}
.kt-hero img { width: 100%; aspect-ratio: 21/9; object-fit: cover; }
.kt-hero .kt-hero-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  color: #fff;
  padding: 60px 24px 20px;
}
.kt-hero .kt-hero-caption h2 { font-size: 28px; margin: 0 0 8px; }
.kt-hero-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.4); color: #fff; border: none;
  width: 40px; height: 40px; border-radius: 50%; font-size: 18px; cursor: pointer;
}
.kt-hero-nav.prev { left: 16px; }
.kt-hero-nav.next { right: 16px; }

/* ---------- Two column category split (Celebrity / Entertainment) ---------- */
.kt-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 30px;
}
.kt-two-col .kt-card-sm img { width: 110px; height: 85px; }
.kt-load-more {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 18px;
  border: 1px solid #ccc;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

/* ---------- Footer ---------- */
.kt-footer {
  background: #111;
  color: #ccc;
  margin-top: 40px;
  padding: 30px 0;
  text-align: center;
}
.kt-footer .kt-social { display: flex; justify-content: center; gap: 14px; margin-bottom: 14px; }
.kt-footer .kt-social a {
  width: 34px; height: 34px; border-radius: 50%;
  background: #222; display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.kt-footer p { font-size: 12px; color: #888; margin: 0; }

/* ---------- Accessibility ---------- */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
.kt-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #e11b22;
  color: #fff;
  padding: 10px 16px;
  z-index: 9999;
  font-weight: 700;
}
.kt-skip-link:focus {
  left: 10px;
  top: 10px;
}
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid #3c1a78;
  outline-offset: 2px;
}

/* ---------- Breadcrumbs ---------- */
.kt-breadcrumbs {
  font-size: 12px;
  color: #888;
  padding: 12px 0 0;
}
.kt-breadcrumbs ol { 
  display: flex; 
  gap: 6px; 
  flex-wrap: wrap; 
  margin: 0;
  padding: 0;
  list-style: none;
}
.kt-breadcrumbs li:not(:last-child)::after { 
  content: '/'; 
  margin-left: 6px; 
  color: #ccc; 
}
.kt-breadcrumbs a { color: #888; }
.kt-breadcrumbs a:hover { color: #e11b22; }

/* ---------- Search form ---------- */
.kt-search-form { display: flex; gap: 8px; max-width: 420px; margin: 16px 0; }
.kt-search-field {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 14px;
}
.kt-search-submit {
  background: #e11b22;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: 700;
  cursor: pointer;
}

/* ---------- Single post ---------- */
/* Allow the single post container to be as wide as the main container */
.kt-single-wrap { 
  max-width: 1200px;   /* was 800px – widened to fit sidebar */
  margin: 0 auto; 
  padding-top: 20px; 
}
.kt-single-title { font-size: 30px; line-height: 1.25; margin: 10px 0; }
.kt-single-meta { font-size: 13px; color: #888; margin-bottom: 16px; }
.kt-single-thumb img { border-radius: 6px; width: 100%; aspect-ratio: 16/8; object-fit: cover; }
.kt-single-content {
  font-size: 17px;
  line-height: 1.75;
  margin-top: 20px;
}
.kt-single-content p { margin: 0 0 20px; }
.kt-single-content img { border-radius: 6px; margin: 10px 0; }
.kt-single-content h2, .kt-single-content h3 { margin-top: 30px; }
.kt-share { display: flex; gap: 10px; margin: 24px 0; }
.kt-share a {
  border: 1px solid #ddd;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}
.kt-share a:hover { border-color: #e11b22; color: #e11b22; }
.kt-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0; }
.kt-tags a {
  background: #f0f0f0;
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 12px;
}
.kt-pagination { margin: 24px 0; display: flex; gap: 12px; justify-content: center; }
.kt-pagination .page-numbers {
  padding: 8px 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
}
.kt-pagination .page-numbers.current { background: #e11b22; color: #fff; border-color: #e11b22; }



/* ---------- Single post: sidebar layout ---------- */

.kt-single-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  align-items: start;
  margin-top: 20px;
}

.kt-single-main {
  min-width: 0;
  width: 100%;
}

.kt-single-sidebar {
  width: 100%;
  min-width: 0;
  position: sticky;
  top: 20px;
}

/* Sidebar widgets */
.kt-single-sidebar .kt-widget {
  margin-bottom: 25px;
}

.kt-single-sidebar img {
  max-width: 100%;
  height: auto;
}

/* Laptop / desktop */
@media (min-width: 769px) {
  .kt-single-row {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .kt-single-main {
    grid-column: 1;
  }

  .kt-single-sidebar {
    grid-column: 2;
  }
}

/* Tablet and mobile */
@media (max-width: 768px) {
  .kt-single-row {
    display: flex;
    flex-direction: column;
    gap: 25px;
  }

  .kt-single-main,
  .kt-single-sidebar {
    width: 100%;
  }

  .kt-single-sidebar {
    position: static;
  }
}



/* ---------- Archive layout ---------- */
.kt-archive-wrap { padding-top: 20px; }
.kt-archive-layout { display: grid; grid-template-columns: 3fr 1fr; gap: 30px; margin-top: 20px; }
.kt-sidebar .kt-widget { margin-bottom: 26px; }

/* ---------- Comments ---------- */
.kt-comments { max-width: 800px; margin: 40px auto 0; }
.kt-comment-list { margin-top: 16px; }
.kt-comment-list li { border-bottom: 1px solid #eee; padding: 16px 0; }
.comment-form input, .comment-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 10px;
  font-family: inherit;
}
.comment-form .form-submit input {
  width: auto;
  background: #e11b22;
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 20px;
  font-weight: 700;
  cursor: pointer;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .kt-featured-grid { flex-direction: column; }
  .kt-secondary-row { grid-template-columns: 1fr; }
  .kt-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .kt-two-col { grid-template-columns: 1fr; }
  .kt-archive-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .kt-menu-toggle { display: block; }
  .kt-nav ul { flex-wrap: wrap; display: none; }
  #kt-primary-menu.is-open ul { display: flex; }
  .kt-grid-4 { grid-template-columns: 1fr 1fr; }
  .kt-header .container { flex-wrap: wrap; gap: 10px; }
  .kt-single-title { font-size: 24px; }
}