/*
Theme Name: Insider Kenya
Theme URI: https://insiderkenya.com/
Author: Insider Kenya
Description: News and guides theme for Insider Kenya: three-story top grid, market ticker, category sections in four columns, sidebar with Most read and Recent posts, and named ad slots.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: insiderkenya
*/

:root {
	--ik-ink: #14171C;
	--ik-ink-2: #22262E;
	--ik-body: #3A404B;
	--ik-muted: #5B6270;
	--ik-line: #E3E5E9;
	--ik-soft: #F5F6F8;
	--ik-ph: #E9EBEF;
	--ik-cyan: #04D7F4;
	--ik-cyan-text: #00788A;
	--ik-up: #0F7B3F;
	--ik-down: #B3122E;
	--ik-head: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
	--ik-text: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
	--ik-wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: #fff; color: var(--ik-ink); font-family: var(--ik-text); font-size: 16px; line-height: 1.5; }
a { color: var(--ik-ink); text-decoration: none; }
a:hover, a:focus { color: var(--ik-cyan-text); }
img { max-width: 100%; height: auto; display: block; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto; padding: 12px 16px; background: #fff; color: var(--ik-ink); }
.ik-wrap { max-width: var(--ik-wrap); margin: 0 auto; padding: 0 24px; }

/* Shared type */
.ik-kick { font: 700 11px var(--ik-text); letter-spacing: .08em; text-transform: uppercase; color: var(--ik-cyan-text); }
.ik-meta { font: 400 13px var(--ik-text); color: var(--ik-muted); }
.ik-hl { font-family: var(--ik-head); font-weight: 700; color: var(--ik-ink); margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
.ik-sec { font: 700 13px var(--ik-text); letter-spacing: .1em; text-transform: uppercase; color: var(--ik-ink); margin: 0; }
.ik-snip { margin: 0; font: 400 14px/1.5 var(--ik-text); color: var(--ik-body); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ik-ph { background: var(--ik-ph); }

/* Top bar */
.ik-topbar { background: var(--ik-ink); color: #D7DAE0; font-size: 13px; }
.ik-topbar .ik-wrap { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; }
.ik-topbar a { color: #D7DAE0; }
.ik-topbar a:hover { color: var(--ik-cyan); }
.ik-topbar-links { display: flex; gap: 6px; align-items: center; }
.ik-topbar-links a { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; }
.ik-topbar-links svg { width: 16px; height: 16px; }

/* Header */
.ik-header { border-bottom: 1px solid var(--ik-line); }
.ik-brandrow { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; padding-top: 20px; padding-bottom: 20px; }
.ik-brand img, .ik-brand .custom-logo { height: 76px; width: auto; }
.ik-search { display: flex; gap: 8px; align-items: center; }
.ik-search input[type="search"] { height: 44px; width: 260px; min-width: 0; max-width: 60vw; border: 1px solid #CDD1D8; border-radius: 6px; padding: 0 14px; font: 400 14px var(--ik-text); }
.ik-btn { height: 44px; padding: 0 18px; border: 0; border-radius: 6px; background: var(--ik-cyan); color: var(--ik-ink); font: 600 14px var(--ik-text); cursor: pointer; }
.ik-btn:hover { filter: brightness(.95); }
.ik-header-banner { padding-bottom: 12px; display: flex; justify-content: center; }
.ik-header-banner > * { max-width: 100%; }
.ik-navrow { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; }
.ik-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 56px; font-weight: 600; font-size: 16px; }
.ik-nav a { display: block; padding: 12px 0; border-bottom: 3px solid transparent; }
.ik-nav .current-menu-item > a, .ik-nav .current-cat > a, .ik-nav .current-menu-ancestor > a, .ik-nav a[aria-current="page"] { border-bottom-color: var(--ik-cyan); }
.ik-nav ul ul { display: none; }
.ik-menu-toggle { display: none; height: 44px; padding: 0 14px; border: 1px solid #CDD1D8; border-radius: 6px; background: #fff; font: 600 14px var(--ik-text); cursor: pointer; }

/* Market ticker */
.ik-ticker { background: var(--ik-soft); border-bottom: 1px solid var(--ik-line); }
.ik-ticker .ik-wrap { display: flex; gap: 8px 24px; align-items: center; padding-top: 10px; padding-bottom: 10px; font-size: 14px; }
.ik-ticker-window { flex: 1 1 0; min-width: 0; overflow: hidden; }
.ik-ticker-track { display: inline-flex; white-space: nowrap; animation: ik-marquee 40s linear infinite; }
.ik-ticker-window:hover .ik-ticker-track { animation-play-state: paused; }
.ik-tick { display: inline-flex; gap: 8px; align-items: baseline; padding-right: 36px; }
.ik-tick b { font-weight: 600; }
.ik-tick .up { color: var(--ik-up); font-weight: 600; }
.ik-tick .down { color: var(--ik-down); font-weight: 600; }
.ik-tick .flat { color: var(--ik-muted); font-weight: 600; }
@keyframes ik-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ik-ticker-track { animation: none; } }

/* Main layout */
.ik-main { padding-top: 32px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 48px; }
.ik-cols { display: flex; flex-wrap: wrap; gap: 40px; }
.ik-col-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 44px; }
.ik-sidebar { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }

/* Hero */
.ik-hero { display: flex; flex-wrap: wrap; gap: 10px; }
.ik-hero-main { flex: 999 1 560px; min-width: 0; }
.ik-hero-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ik-tile { position: relative; display: block; overflow: hidden; border-radius: 4px; background: #C9CDD4; color: #fff; }
.ik-tile.big { height: 460px; }
.ik-tile.small { height: 225px; }
.ik-tile img, .ik-tile .ik-ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ik-tile-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px; background: linear-gradient(to top, rgba(10,12,16,.85), rgba(10,12,16,0)); display: flex; flex-direction: column; gap: 8px; }
.ik-tile-text .cat { font: 500 14px var(--ik-text); color: #fff; }
.ik-tile-text .ttl { margin: 0; font: 700 20px/1.3 var(--ik-head); color: #fff; }
.ik-tile.big .ttl { font-size: 28px; line-height: 1.25; }
.ik-tile-text .date { font: 600 12px var(--ik-text); color: #fff; }
.ik-tile:hover .ttl { text-decoration: underline; }

/* Sections and cards */
.ik-section { display: flex; flex-direction: column; gap: 18px; }
.ik-section-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--ik-ink); padding-bottom: 10px; }
.ik-section-head a.more { font-size: 14px; font-weight: 600; color: var(--ik-cyan-text); }
.ik-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 20px; }
.ik-col-main .ik-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 16px; }
.ik-grid.ik-grid-3, .ik-col-main .ik-grid.ik-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ik-card { display: flex; flex-direction: column; gap: 10px; }
.ik-card .thumb { display: block; aspect-ratio: 3 / 2; border-radius: 6px; overflow: hidden; background: var(--ik-ph); }
.ik-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.ik-card .ik-hl { font-size: 17px; }
.ik-col-main .ik-card .ik-hl { font-size: 16px; }
.ik-card:hover .ik-hl { color: var(--ik-cyan-text); }
.ik-quote { padding: 20px; background: var(--ik-soft); border-radius: 6px; gap: 12px; }
.ik-quote .mark { font: 700 40px/0.6 var(--ik-head); color: var(--ik-cyan); }

/* Sidebar */
.ik-widget-title { border-bottom: 2px solid var(--ik-ink); padding-bottom: 10px; margin: 0 0 6px; }
.ik-mostread { list-style: none; margin: 0; padding: 0; }
.ik-mostread li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--ik-line); }
.ik-mostread li:last-child { border-bottom: 0; }
.ik-mostread .n { font: 700 24px var(--ik-head); color: var(--ik-cyan-text); min-width: 22px; }
.ik-mostread a, .ik-recent a .t { font-weight: 600; font-size: 15px; line-height: 1.35; }
.ik-recent { list-style: none; margin: 0; padding: 0; }
.ik-recent li { padding: 12px 0; border-bottom: 1px solid var(--ik-line); }
.ik-recent li:last-child { border-bottom: 0; }
.ik-recent a { display: flex; gap: 12px; align-items: flex-start; }
.ik-recent .thumb { width: 84px; aspect-ratio: 1 / 1; border-radius: 4px; overflow: hidden; flex-shrink: 0; background: var(--ik-ph); }
.ik-recent .thumb img { width: 100%; height: 100%; object-fit: cover; }
.ik-recent .txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ik-ad { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ik-ad-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ik-muted); }

/* Article */
.ik-article { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.ik-article h1.ik-hl { font-size: 40px; line-height: 1.15; }
.ik-dek { margin: 0; font-size: 19px; line-height: 1.55; color: var(--ik-body); }
.ik-byline { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; border-top: 1px solid var(--ik-line); border-bottom: 1px solid var(--ik-line); padding: 12px 0; }
.ik-byline strong { color: var(--ik-ink); }
.ik-share { display: flex; gap: 8px; flex-wrap: wrap; }
.ik-share a { height: 44px; padding: 0 16px; border: 1px solid #CDD1D8; border-radius: 22px; display: flex; align-items: center; font-size: 14px; font-weight: 600; }
.ik-featured { border-radius: 6px; overflow: hidden; }
.ik-featured figcaption { font-size: 13px; color: var(--ik-muted); padding-top: 6px; }
.ik-content { font-size: 18px; line-height: 1.7; color: var(--ik-ink-2); }
.ik-content > * { margin: 0 0 1.1em; }
.ik-content h2 { font: 700 26px/1.25 var(--ik-head); letter-spacing: -0.01em; margin: 1.4em 0 .5em; color: var(--ik-ink); }
.ik-content h3 { font: 700 21px/1.3 var(--ik-head); margin: 1.3em 0 .4em; color: var(--ik-ink); }
.ik-content a { color: var(--ik-cyan-text); text-decoration: underline; }
.ik-content ul, .ik-content ol { padding-left: 1.3em; }
.ik-content li { margin-bottom: .4em; }
.ik-content table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.ik-content table td, .ik-content table th { padding: 12px 14px; border-bottom: 1px solid var(--ik-line); text-align: left; }
.ik-content table tr:first-child td { background: var(--ik-soft); font-weight: 600; }
.ik-content blockquote { margin-left: 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--ik-cyan); font-style: italic; }
.ik-content img { border-radius: 4px; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption { font-size: 13px; color: var(--ik-muted); }
.aligncenter { margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.gallery br { display: none; }
.ik-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.ik-tags a { padding: 8px 14px; background: var(--ik-soft); border-radius: 16px; font-size: 13px; font-weight: 600; }
.ik-in-article { margin: 8px 0 24px; }

/* Archive */
.ik-archive-head { display: flex; flex-direction: column; gap: 8px; }
.ik-archive-head h1 { font-size: 34px; }
.ik-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.ik-pagination .page-numbers { min-width: 44px; height: 44px; padding: 0 12px; border: 1px solid var(--ik-line); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.ik-pagination .current { background: var(--ik-ink); color: #fff; border-color: var(--ik-ink); }

/* Comments */
.ik-comments { border-top: 1px solid var(--ik-line); padding-top: 24px; }
.ik-comments ol { list-style: none; padding: 0; }
.ik-comments textarea, .ik-comments input[type="text"], .ik-comments input[type="email"], .ik-comments input[type="url"] { width: 100%; border: 1px solid #CDD1D8; border-radius: 6px; padding: 10px 12px; font: inherit; }
.ik-comments .submit { height: 44px; padding: 0 18px; border: 0; border-radius: 6px; background: var(--ik-cyan); font-weight: 600; cursor: pointer; }

/* Footer */
.ik-footer { background: var(--ik-ink); color: #B5BAC4; }
.ik-footer-cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr) minmax(0, .9fr) minmax(0, 1.3fr); gap: 40px 40px; align-items: start; padding-top: 48px; padding-bottom: 32px; }
.ik-footer-brand { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.ik-footer-brand img { height: 72px; width: auto; }
.ik-footer-brand p { margin: 0; font-size: 14px; line-height: 1.55; }
.ik-footer-col { min-width: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.ik-footer-col .ik-foot-title, .ik-footer-news h2 { margin: 0; font: 700 17px/1.3 var(--ik-head); color: #fff; }
.ik-footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ik-footer a { color: #D7DAE0; }
.ik-footer a:hover { color: var(--ik-cyan); }
.ik-social a { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.ik-social .ico { width: 36px; height: 36px; border-radius: 50%; border: 1px solid #3A404B; display: flex; align-items: center; justify-content: center; color: #fff; }
.ik-footer-news { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ik-footer-news p { margin: 0; font-size: 14px; line-height: 1.5; }
.ik-nl-form { display: flex; margin-top: 4px; }
.ik-nl-form input[type="email"] { flex: 1 1 0; min-width: 0; height: 44px; border: 0; border-radius: 6px 0 0 6px; padding: 0 14px; background: #fff; color: var(--ik-ink); font: 400 14px var(--ik-text); }
.ik-nl-form button { width: 48px; height: 44px; border: 0; border-radius: 0 6px 6px 0; background: var(--ik-cyan); color: var(--ik-ink); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ik-footer-news .widget input[type="email"] { width: 100%; height: 44px; border-radius: 6px; border: 0; padding: 0 14px; }
.ik-footer-news .widget button, .ik-footer-news .widget input[type="submit"] { height: 44px; border: 0; border-radius: 6px; background: var(--ik-cyan); color: var(--ik-ink); font-weight: 600; padding: 0 18px; }
.ik-contact { color: #D7DAE0; }
.ik-contact a { color: var(--ik-cyan); }
.ik-nl-msg { margin: 4px 0 0; font-size: 14px; color: var(--ik-cyan); }
.ik-copy { border-top: 1px solid #2C313A; padding-top: 16px; padding-bottom: 28px; font-size: 13px; }

/* Sidebar search */
.ik-side-search .ik-search { width: 100%; }
.ik-side-search .ik-search input[type="search"] { flex: 1 1 0; width: auto; max-width: none; }
.ik-footer-news .jetpack_subscription_widget, .ik-footer-news .wp-block-jetpack-subscriptions { margin: 0; }
.ik-footer-news .wp-block-jetpack-subscriptions__container form { display: flex; }

/* 404 / search */
.ik-empty { padding: 48px 0; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }

/* Responsive */
@media (max-width: 1100px) {
	.ik-col-main .ik-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
	.ik-grid, .ik-col-main .ik-grid, .ik-col-main .ik-grid.ik-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ik-footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ik-tile.big { height: 360px; }
	.ik-article h1.ik-hl { font-size: 32px; }
	.ik-menu-toggle { display: inline-block; }
	.ik-nav { width: 100%; display: none; }
	.ik-nav.is-open { display: block; }
	.ik-nav ul { flex-direction: column; gap: 0; }
	.ik-nav a { border-bottom: 1px solid var(--ik-line); }
}
@media (max-width: 520px) {
	.ik-grid, .ik-col-main .ik-grid, .ik-col-main .ik-grid.ik-grid-3 { grid-template-columns: minmax(0, 1fr); }
	.ik-footer-cols { grid-template-columns: minmax(0, 1fr); }
	.ik-tile.big { height: 300px; }
	.ik-tile.big .ttl { font-size: 22px; }
	.ik-brand img, .ik-brand .custom-logo { height: 60px; }
	.ik-search input[type="search"] { width: 100%; }
	.ik-search { width: 100%; }
}
