/*
Theme Name: DikeNews
Theme URI: https://dike.com.ng
Author: Dike
Author URI: https://dike.com.ng
Description: A fast, accessible news magazine theme with a lead story, top stories rail, category sections, a just-in ticker, video post badges and a clean reading layout. Redesigned from the UrbanMag layout with a danfo-yellow identity.
Version: 2.0.0
Requires at least: 5.8
Tested up to: 6.6
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: dikenews
Tags: news, blog, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, post-formats, wide-blocks
*/

:root {
	--ink: #1b2130;
	--muted: #586174;
	--paper: #ffffff;
	--mist: #f2f4f7;
	--line: #dde1e8;
	--danfo: #ffc20e;
	--naija: #0a7a4a;
	--tone-0: #0a7a4a;
	--tone-1: #1f5fa8;
	--tone-2: #b8352b;
	--tone-3: #6a3fa0;
	--tone-4: #8a5a00;
	--head: "Bricolage Grotesque", "Segoe UI", system-ui, -apple-system, sans-serif;
	--body: "Source Serif 4", Georgia, "Times New Roman", serif;
	--ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--gap: 36px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--body);
	font-size: 1.0625rem;
	line-height: 1.6;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--danfo); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--naija); }
:focus-visible { outline: 3px solid var(--naija); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px;
}
.skip-link {
	position: absolute; left: 12px; top: -60px; z-index: 100;
	background: var(--danfo); color: var(--ink); padding: 10px 16px; font-family: var(--ui); font-weight: 700;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* Masthead */
.masthead__top {
	display: flex; justify-content: space-between; align-items: center; gap: 16px;
	padding-top: 10px; padding-bottom: 10px;
	font-family: var(--ui); font-size: .8125rem; color: var(--muted);
}
.masthead__date { margin: 0; }
.topmenu ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; }
.topmenu a { text-decoration: none; }
.topmenu a:hover { text-decoration: underline; }
.masthead__brand { padding-top: 14px; padding-bottom: 22px; }
.brand__name {
	font-family: var(--head); font-weight: 800; font-size: clamp(2.4rem, 7vw, 4.25rem);
	letter-spacing: -0.03em; line-height: 1; text-decoration: none; display: inline-block;
}
.brand__tag { margin: 8px 0 0; font-family: var(--ui); color: var(--muted); font-size: .95rem; }
.custom-logo { max-height: 80px; width: auto; }
.stripe { height: 14px; background: linear-gradient(to bottom, var(--danfo) 0 8px, var(--ink) 8px 14px); }

/* Navigation */
.navbar { background: var(--ink); color: #fff; position: relative; }
.navbar__inner { display: flex; align-items: stretch; justify-content: space-between; }
.primary-nav { flex: 1; }
.primary-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.primary-nav li { position: relative; }
.primary-nav a {
	display: block; padding: 15px 16px; color: #fff; text-decoration: none;
	font-family: var(--head); font-weight: 700; font-size: .95rem;
	border-bottom: 4px solid transparent;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current-menu-ancestor > a,
.primary-nav .current-cat > a { border-bottom-color: var(--danfo); }
.primary-nav .sub-menu {
	list-style: none; margin: 0; padding: 6px 0; position: absolute; left: 0; top: 100%;
	min-width: 220px; background: var(--ink); border-top: 3px solid var(--danfo);
	display: none; z-index: 50;
}
.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu { display: block; }
.primary-nav .sub-menu a { border: 0; padding: 10px 16px; font-weight: 500; }
.primary-nav .sub-menu a:hover { background: rgba(255, 255, 255, .08); }
.navbar :focus-visible { outline-color: var(--danfo); }
.navbar__toggle, .navbar__search {
	background: none; border: 0; color: #fff; font: 700 .95rem var(--head); padding: 0 16px; cursor: pointer;
}
.navbar__toggle { display: none; }
.navbar__search { border-left: 1px solid rgba(255, 255, 255, .18); }
.search-panel { background: var(--mist); padding: 16px 0; border-bottom: 1px solid var(--line); }
.search-panel[hidden] { display: none; }

.searchform { display: flex; max-width: 520px; }
.searchform input[type="search"] {
	flex: 1; min-width: 0; padding: 11px 14px; border: 2px solid var(--ink); border-right: 0;
	font: 1rem var(--ui); background: #fff; color: var(--ink); border-radius: 0;
}
.searchform button {
	padding: 11px 18px; background: var(--danfo); color: var(--ink); border: 2px solid var(--ink);
	font: 700 .95rem var(--head); cursor: pointer; border-radius: 0;
}
.searchform button:hover { background: var(--ink); color: var(--danfo); }

/* Ticker */
.ticker { display: flex; align-items: center; gap: 14px; margin: 22px 0 28px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.ticker__label { background: var(--danfo); font: 800 .9rem var(--head); padding: 5px 12px; white-space: nowrap; }
.ticker__list { list-style: none; margin: 0; padding: 0; min-width: 0; flex: 1; }
.ticker__list li { display: none; font-family: var(--head); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticker__list li:first-child { display: block; }
.ticker__list.is-js li { display: none; }
.ticker__list.is-js li.is-active { display: block; }
.ticker__list a { text-decoration: none; }
.ticker__list a:hover { text-decoration: underline; }

/* Section headings */
.section-title {
	font-size: 1.35rem; font-weight: 800; margin: 0 0 18px; padding-left: 12px;
	border-left: 6px solid var(--danfo);
}
.block { margin: 44px 0; }
.block__head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--ink); margin-bottom: 22px; }
.block__head .section-title { margin-bottom: 10px; }
.block__more { font: 600 .9rem var(--ui); color: var(--naija); }

/* Layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; margin: 40px 0 56px; }
.layout--single { margin-top: 0; }
.lead-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: var(--gap); }
.grid { display: grid; gap: 28px; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack { display: grid; gap: 28px; }

/* Cards */
.card { position: relative; }
.card__media { display: block; position: relative; overflow: hidden; background: var(--mist); }
.card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card--default .card__media, .card--wide .card__media { aspect-ratio: 16 / 10; }
.card--lead .card__media { aspect-ratio: 16 / 9; }
.card__body { padding-top: 12px; }
.card__title { font-size: 1.15rem; font-weight: 700; margin: 8px 0; }
.card__title a { text-decoration: none; }
.card__title a:hover { text-decoration: underline; text-decoration-color: var(--danfo); text-decoration-thickness: 3px; }
.card__excerpt { color: var(--muted); font-size: .98rem; margin: 0 0 8px; }
.card__meta { margin: 0; font: .8125rem var(--ui); color: var(--muted); }
.sep { margin: 0 4px; opacity: .6; }

.card--lead .card__title { font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; }
.card--lead .card__excerpt { font-size: 1.1rem; }

.card--wide { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.card--wide .card__body { padding-top: 0; }

.rail { align-self: start; }
.card--row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.card--row:first-of-type { border-top: 0; padding-top: 0; }
.card--row .card__media { aspect-ratio: 1; }
.card--row .card__body { padding-top: 0; }
.card--row .card__title { font-size: 1rem; margin: 4px 0; }

.card__play {
	position: absolute; left: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%;
	background: var(--danfo);
}
.card__play::after {
	content: ""; position: absolute; left: 15px; top: 11px;
	border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent var(--ink);
}

/* Category chip */
.chip {
	display: inline-block; font: 700 .8125rem var(--ui); color: #fff; padding: 3px 9px; text-decoration: none;
	background: var(--tone-0);
}
.chip--1 { background: var(--tone-1); }
.chip--2 { background: var(--tone-2); }
.chip--3 { background: var(--tone-3); }
.chip--4 { background: var(--tone-4); }
.chip:hover { filter: brightness(1.12); }

/* Placeholder thumbnail */
.ph {
	display: grid; place-items: center; width: 100%; height: 100%; min-height: 100%;
	font: 800 3rem var(--head); color: rgba(255, 255, 255, .85); background: var(--tone-0);
}
.ph--1 { background: var(--tone-1); }
.ph--2 { background: var(--tone-2); }
.ph--3 { background: var(--tone-3); }
.ph--4 { background: var(--tone-4); }
.card--row .ph { font-size: 1.6rem; }

/* Archive head */
.archive-head { padding: 36px 0 0; }
.archive-head__title { font-size: clamp(1.8rem, 4vw, 2.75rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 10px; }
.archive-head__desc { color: var(--muted); max-width: 60ch; }
.empty { color: var(--muted); font-family: var(--ui); }

/* Pagination */
.pagination { margin-top: 36px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--ui); }
.pagination .page-numbers {
	padding: 8px 14px; border: 2px solid var(--ink); text-decoration: none; font-weight: 700;
}
.pagination .page-numbers.current, .pagination a.page-numbers:hover { background: var(--danfo); }
.pagination .dots { border-color: transparent; }

/* Sidebar and widgets */
.sidebar { align-self: start; position: sticky; top: 20px; }
.widget { margin-bottom: 36px; }
.widget__title { font-size: 1.1rem; font-weight: 800; padding-bottom: 8px; border-bottom: 2px solid var(--ink); margin-bottom: 14px; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 9px 0; border-top: 1px solid var(--line); font-family: var(--head); font-weight: 500; }
.widget li:first-child { border-top: 0; }
.widget a { text-decoration: none; }
.widget a:hover { text-decoration: underline; }

/* Single */
.entry__head { max-width: 860px; margin: 40px auto 24px; }
.entry__title { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.025em; margin: 14px 0; }
.entry__standfirst { font-size: 1.25rem; color: var(--muted); }
.entry__byline { font: .9rem var(--ui); color: var(--muted); margin: 0; }
.entry__figure { margin: 0 0 32px; }
.entry__figure--wide { max-width: 1100px; margin: 0 auto 36px; }
.entry__figure img { display: block; width: 100%; }
.entry__figure figcaption { font: .85rem var(--ui); color: var(--muted); padding-top: 8px; }
.entry__content { font-size: 1.175rem; line-height: 1.75; max-width: 700px; }
.entry__content > * { max-width: 100%; }
.entry__content h2 { font-size: 1.7rem; margin-top: 1.8em; }
.entry__content h3 { font-size: 1.35rem; margin-top: 1.6em; }
.entry__content blockquote {
	margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 6px solid var(--danfo);
	font-size: 1.3rem; font-style: italic;
}
.entry__content a { color: var(--naija); }
.entry__content img { height: auto; }
.entry__content figure { margin: 1.6em 0; }
.entry__content figcaption, .wp-caption-text { font: .85rem var(--ui); color: var(--muted); }
.entry__content table { width: 100%; border-collapse: collapse; font: .95rem var(--ui); }
.entry__content th, .entry__content td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.entry__content pre { overflow-x: auto; background: var(--mist); padding: 14px; font-size: .9rem; }
.entry__tags { font: .9rem var(--ui); margin: 32px 0; }
.entry__tags a {
	display: inline-block; margin: 0 6px 6px 0; padding: 4px 10px; background: var(--mist); text-decoration: none;
}
.entry__tags a:hover { background: var(--danfo); }
.entry--single .entry__content { margin-bottom: 0; }
.page .entry__head { margin-left: 0; }

.author-box { display: flex; gap: 16px; padding: 20px; background: var(--mist); margin: 32px 0; max-width: 700px; }
.author-box img { border-radius: 50%; flex: none; }
.author-box p { margin: 0 0 6px; font: .95rem var(--ui); }
.author-box__name { font: 800 1.05rem var(--head) !important; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 700px; font-family: var(--head); font-weight: 700; }
.post-nav span { display: block; font: .8rem var(--ui); color: var(--muted); font-weight: 400; }
.post-nav a { text-decoration: none; }
.post-nav a:hover { text-decoration: underline; }
.post-nav__next { text-align: right; grid-column: 2; }

/* Comments */
.comments { margin: 56px 0; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 28px; }
.comment-body { padding: 18px 0; border-top: 1px solid var(--line); font-family: var(--ui); font-size: .95rem; }
.comment-author img { border-radius: 50%; vertical-align: middle; margin-right: 10px; }
.comment-metadata { font-size: .8rem; color: var(--muted); }
.comment-metadata a { text-decoration: none; }
.comment-form label { display: block; font: 600 .9rem var(--ui); margin-bottom: 4px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 10px 12px; border: 2px solid var(--ink); font: 1rem var(--ui); border-radius: 0;
}
.comment-form .submit {
	background: var(--danfo); color: var(--ink); border: 2px solid var(--ink); padding: 11px 22px;
	font: 700 1rem var(--head); cursor: pointer; border-radius: 0;
}
.comment-form .submit:hover { background: var(--ink); color: var(--danfo); }

/* Footer */
.site-footer { background: var(--ink); color: #e8ebf1; margin-top: 40px; }
.footer-widgets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; padding-top: 44px; padding-bottom: 20px; }
.site-footer .widget__title { color: #fff; border-bottom-color: var(--danfo); }
.site-footer .widget li { border-top-color: rgba(255, 255, 255, .14); }
.site-footer a { text-decoration-color: var(--danfo); }
.site-footer :focus-visible { outline-color: var(--danfo); }
.footer-base {
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
	padding-top: 26px; padding-bottom: 30px; font: .875rem var(--ui); color: #b6bdcc;
}
.footer-base p { margin: 0; }
.footer-base ul { list-style: none; display: flex; gap: 18px; margin: 0; padding: 0; }
.footer-base a { text-decoration: none; }
.footer-base a:hover { text-decoration: underline; }

/* WordPress core */
.alignleft { float: left; margin: .4em 1.5em 1em 0; }
.alignright { float: right; margin: .4em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide { max-width: 1000px; }
.wp-caption { max-width: 100%; }
.gallery { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.gallery-item { margin: 0; }
.sticky .card__title::before { content: ""; }
.bypostauthor > .comment-body { border-left: 4px solid var(--danfo); padding-left: 12px; }

/* Responsive */
@media (max-width: 1000px) {
	.layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.sidebar { position: static; }
	.grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.lead-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
	.navbar__toggle { display: block; padding: 14px 16px; }
	.primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--ink); z-index: 60; }
	.primary-nav.is-open { display: block; }
	.primary-nav .menu { flex-direction: column; }
	.primary-nav a { border-bottom: 0; border-left: 4px solid transparent; }
	.primary-nav a:hover, .primary-nav .current-menu-item > a { border-left-color: var(--danfo); }
	.primary-nav .sub-menu { position: static; display: block; border-top: 0; padding-left: 14px; }
	.navbar__inner { justify-content: space-between; }
	.navbar__search { margin-left: auto; }
	.topmenu { display: none; }
	.grid--3, .footer-widgets { grid-template-columns: minmax(0, 1fr); }
	.card--wide { grid-template-columns: 1fr; gap: 0; }
	.card--wide .card__body { padding-top: 12px; }
	.post-nav { grid-template-columns: 1fr; }
	.post-nav__next { grid-column: auto; text-align: left; }
}
@media (max-width: 480px) {
	.grid--4 { grid-template-columns: minmax(0, 1fr); }
	.ticker { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}
