/*
Theme Name: Waryahe Media
Theme URI: https://waryahe.co.ke
Author: Waryahe Media Limited
Author URI: https://waryahe.co.ke
Description: Block theme for Waryahe Media, Somali news for Kenya and the world. Front page with breaking bar, top stories, latest list, video band, section blocks, opinion, most popular, in pictures, newsletter and two advert spaces per page. Built on the Waryahe brand: Waryahe Blue, Saffron, Ink and Paper, Newsreader and Instrument Sans.
Version: 1.1.0
Requires at least: 6.5
Tested up to: 6.8
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: waryahe
Tags: news, blog, block-patterns, full-site-editing, wide-blocks, translation-ready, two-columns, right-sidebar
*/

:root {
	--wy-paper: var(--wp--preset--color--paper);
	--wy-sand: var(--wp--preset--color--sand);
	--wy-ink: var(--wp--preset--color--ink);
	--wy-muted: var(--wp--preset--color--muted);
	--wy-hair: var(--wp--preset--color--hairline);
	--wy-blue: var(--wp--preset--color--blue);
	--wy-deep: var(--wp--preset--color--deep-blue);
	--wy-saffron: var(--wp--preset--color--saffron);
	--wy-red: var(--wp--preset--color--breaking);
	--wy-serif: var(--wp--preset--font-family--serif);
	--wy-sans: var(--wp--preset--font-family--sans);
	--wy-radius: 12px;
}

/* ---------- layout helpers ---------- */
.wy-container { max-width: 1280px; margin-left: auto !important; margin-right: auto !important; padding-left: 24px; padding-right: 24px; box-sizing: border-box; }
.wy-section { margin-top: 36px; }
.wy-rule { border-top: 3px solid var(--wy-ink); padding-top: 12px; }
.wy-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.wy-row-head > * { margin: 0 !important; }
.wy-more a, a.wy-more { font-family: var(--wy-sans); font-weight: 700; font-size: 14px; color: var(--wy-deep); text-decoration: none; }
.wp-block-post-template { margin: 0; padding: 0; list-style: none; }

/* ---------- header ---------- */
.wy-header { background: var(--wy-paper); border-bottom: 1px solid var(--wy-hair); }
.wy-header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-top: 14px; padding-bottom: 14px; }
.wy-header .wy-logo img, .wy-header .wp-block-site-logo img { height: 46px; width: auto !important; display: block; }
.wy-header .wy-logo, .wy-header .wp-block-site-logo { margin: 0; }
.wy-header .wp-block-navigation { flex: 1 1 480px; font-family: var(--wy-sans); font-weight: 600; font-size: 14px; gap: 4px 16px; }
.wy-header .wp-block-navigation .wp-block-navigation__container { gap: 4px 16px; }
@media (max-width: 1240px) { .wy-header .wp-block-search__input { width: 100px; } }
.wy-header .wp-block-navigation a { text-decoration: none; }
.wy-header .wp-block-navigation .current-menu-item > a, .wy-header .wp-block-navigation a[aria-current] { color: var(--wy-deep); border-bottom: 3px solid var(--wy-saffron); padding-bottom: 3px; }
.wy-tools { display: flex; align-items: center; gap: 10px; }
.wy-live .wp-block-button__link { background: var(--wy-ink) !important; color: #fff !important; border-radius: 2px !important; font-family: var(--wy-sans); font-weight: 700; font-size: 13px; letter-spacing: 1px; padding: 10px 14px !important; display: inline-flex; align-items: center; gap: 8px; }
.wy-live .wp-block-button__link::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--wy-red); }
.wy-lang { display: flex; list-style: none; margin: 0; padding: 0; border: 1px solid var(--wy-hair); border-radius: 2px; font-family: var(--wy-sans); font-size: 13px; font-weight: 700; text-transform: uppercase; }
.wy-lang li a { display: block; padding: 8px 10px; color: var(--wy-ink); text-decoration: none; }
.wy-lang li.current-lang a { background: var(--wy-blue); color: #fff; }
.wy-header .wp-block-search__inside-wrapper { border: 1px solid var(--wy-hair); border-radius: 8px; background: #fff; }
.wy-header .wp-block-search__input { border: 0; min-height: 40px; width: 130px; font-family: var(--wy-sans); }
.wy-header .wp-block-search__button { background: transparent; color: var(--wy-ink); border: 0; }

/* ---------- breaking bar ---------- */
.wy-breaking { background: var(--wy-red); color: #fff; }
.wy-breaking-inner { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding-top: 10px; padding-bottom: 10px; font-family: var(--wy-sans); }
.wy-breaking .wy-flag { font-weight: 700; font-size: 12px; letter-spacing: 2px; border: 1px solid rgba(255,255,255,.7); padding: 3px 8px; }
.wy-breaking a { color: #fff; font-weight: 600; font-size: 16px; text-decoration: none; }
.wy-breaking a:hover { text-decoration: underline; }

/* ---------- typography bits ---------- */
.wy-kicker, .wy-kicker a { font-family: var(--wy-sans); font-size: 12px !important; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--wy-deep); text-decoration: none; }
.wy-kicker { margin: 10px 0 4px !important; }
.wy-kicker .wp-block-post-terms__separator { color: var(--wy-muted); }
.wy-card-title { font-family: var(--wy-serif); font-weight: 600; font-size: 20px !important; line-height: 1.22; margin: 0 !important; }
.wy-card-title a, .wy-lead-title a, .wy-small-title a { color: var(--wy-ink); text-decoration: none; }
.wy-card-title a:hover, .wy-lead-title a:hover, .wy-small-title a:hover { color: var(--wy-deep); text-decoration: underline; }
.wy-lead-title { font-family: var(--wy-serif); font-weight: 600; font-size: clamp(30px, 3.4vw, 44px) !important; line-height: 1.08; letter-spacing: -0.5px; margin: 16px 0 0 !important; }
.wy-small-title { font-family: var(--wy-sans); font-weight: 600; font-size: 15px !important; line-height: 1.35; margin: 0 !important; }
.wy-excerpt p { font-size: 17px; margin: 10px 0 0; }
.wy-excerpt .wp-block-post-excerpt__more-text { display: none; }
.wy-time { font-family: var(--wy-sans); font-size: 12px; font-weight: 700; color: var(--wy-deep); margin: 0; }

/* ---------- pictures: rounded ---------- */
.wp-block-post-featured-image img, .wp-block-post-featured-image .wy-fallback, .wy-img img { border-radius: var(--wy-radius); }
.wp-block-post-featured-image { margin: 0; overflow: hidden; border-radius: var(--wy-radius); }
.wp-block-image img { border-radius: var(--wy-radius); }
.wy-header .wy-logo img, .wy-footer .wy-logo img { border-radius: 0; }

/* ---------- top stories ---------- */
.wy-top { display: flex; flex-wrap: wrap; gap: 28px; padding-top: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--wy-hair); }
.wy-top-lead { flex: 999 1 540px; min-width: 0; }
.wy-top-side { flex: 1 1 260px; min-width: 0; }
.wy-top-latest { flex: 1 1 250px; min-width: 0; }
.wy-top-side .wp-block-post-template > li + li { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--wy-hair); }
.wy-top-side .wy-card-title { margin-top: 8px !important; margin-bottom: 0 !important; font-size: 17px !important; line-height: 1.3 !important; }
.wy-label { font-family: var(--wy-sans); font-size: 13px; font-weight: 700; letter-spacing: 2px; display: flex; align-items: center; gap: 8px; margin: 0 0 4px !important; }
.wy-label::before { content: ""; width: 18px; height: 4px; background: var(--wy-saffron); }
.wy-latest .wp-block-post-template > li { padding: 11px 0; border-bottom: 1px solid var(--wy-hair); }

/* ---------- grids ---------- */
.wy-grid-4 { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.wy-grid-3 { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.wy-grid-2 { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
.wy-row { padding-top: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--wy-hair); }
@media (max-width: 1000px) { .wy-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wy-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .wy-grid-4, .wy-grid-3 { grid-template-columns: minmax(0, 1fr); } .wy-container { padding-left: 16px; padding-right: 16px; } }

/* ---------- list with thumbnails ---------- */
.wy-thumbs .wp-block-post-template > li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--wy-hair); }
.wy-thumbs .wp-block-post-featured-image { flex: 0 0 96px; }
.wy-thumbs .wp-block-post-featured-image img, .wy-thumbs .wy-fallback { width: 96px; height: 64px; object-fit: cover; }
.wy-thumbs .wy-card-title { font-size: 17px !important; line-height: 1.25; }

/* ---------- most popular ---------- */
.wy-popular .wp-block-post-template { counter-reset: wy; }
.wy-popular .wp-block-post-template > li { counter-increment: wy; display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--wy-hair); }
.wy-popular .wp-block-post-template > li::before { content: counter(wy); font-family: var(--wy-serif); font-weight: 600; font-size: 32px; line-height: 1; color: var(--wy-blue); min-width: 26px; }

/* ---------- adverts ---------- */
.wy-ad { display: flex; align-items: center; justify-content: center; border: 1px dashed var(--wy-hair); border-radius: var(--wy-radius); color: var(--wy-muted); font-family: var(--wy-sans); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; margin-left: auto; margin-right: auto; overflow: hidden; }
.wy-ad-leaderboard { max-width: 970px; min-height: 90px; margin-top: 28px; }
.wy-ad-box { width: 100%; max-width: 300px; min-height: 250px; box-sizing: border-box; }
.wy-ad:has(ins, iframe, img, script) { border: 0; }

/* ---------- video band ---------- */
.wy-video { background: var(--wy-ink); color: #f2ede4; margin-top: 36px; padding-top: 36px; padding-bottom: 40px; }
.wy-video h2 { color: #fff; }
.wy-video .wy-card-title a, .wy-video .wy-small-title a { color: #fff; }
.wy-video .wy-more a { color: #8fc0f5; }
.wy-video-grid { display: flex; flex-wrap: wrap; gap: 28px; }
.wy-video-main { flex: 999 1 540px; min-width: 0; }
.wy-video-side { flex: 1 1 440px; min-width: 0; }
.wy-video .wp-block-post-featured-image { position: relative; }
.wy-video .wp-block-post-featured-image::after { content: ""; position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: var(--wy-saffron) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z' fill='%2313202d'/%3E%3C/svg%3E") center / 24px no-repeat; pointer-events: none; }
.wy-video-main .wy-card-title { font-size: 30px !important; line-height: 1.12; margin-top: 14px !important; }
.wy-video-side .wp-block-post-featured-image::after { width: 34px; height: 34px; margin: -17px 0 0 -17px; background-size: 16px; }
.wy-video-side .wy-small-title { margin-top: 8px !important; }

/* ---------- section titles ---------- */
.wy-section-title { font-family: var(--wy-serif); font-weight: 600; font-size: 28px !important; margin: 0 !important; display: flex; align-items: center; gap: 12px; }
.wy-video .wy-section-title::before { content: ""; width: 28px; height: 4px; background: var(--wy-saffron); }
.wy-big .wy-card-title { font-size: 24px !important; margin-top: 10px !important; }
.wy-mini .wp-block-post-template > li { padding: 11px 0; border-bottom: 1px solid var(--wy-hair); }

/* ---------- main + sidebar ---------- */
.wy-main-side { display: flex; flex-wrap: wrap; gap: 40px; }
.wy-main { flex: 999 1 640px; min-width: 0; }
.wy-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.wy-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 700px) { .wy-split { grid-template-columns: minmax(0, 1fr); } }
.wy-east { display: flex; flex-wrap: wrap; gap: 24px; }
.wy-east > * { flex: 3 1 340px; min-width: 0; }
.wy-east > .wy-thumbs { flex: 2 1 240px; }

/* ---------- opinion ---------- */
.wy-opinion .wp-block-post-template > li { background: var(--wy-sand); border-radius: 2px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.wy-opinion .wp-block-avatar img { border-radius: 50%; border: 2px solid var(--wy-saffron); }
.wy-opinion .wy-card-title { font-style: italic; font-weight: 400; font-size: 19px !important; }
.wy-opinion .wp-block-post-author-name { font-family: var(--wy-sans); font-size: 13px; font-weight: 700; color: var(--wy-deep); }

/* ---------- somali box ---------- */
.wy-somali { background: var(--wy-sand); padding: 18px; border-top: 3px solid var(--wy-blue); }

/* ---------- in pictures ---------- */
.wy-pics .wp-block-post-template > li { position: relative; }
.wy-pics .wp-block-post-featured-image img, .wy-pics .wy-fallback { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; height: auto; }
.wy-pics .wy-card-title { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 14px 14px; border-radius: 0 0 var(--wy-radius) var(--wy-radius); background: linear-gradient(transparent, rgba(19,32,45,.92)); font-size: 19px !important; }
.wy-pics .wy-card-title a { color: #fff; }

/* ---------- newsletter ---------- */
.wy-newsletter { background: var(--wy-blue); color: #fff; border-radius: 2px; padding: 28px !important; margin-top: 40px; display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.wy-newsletter h2 { color: #fff; margin: 0; }
.wy-newsletter p { margin: 6px 0 0; color: #fff; }
.wy-newsletter .wp-block-button__link { background: var(--wy-saffron) !important; color: var(--wy-ink) !important; border-radius: 2px !important; font-weight: 700; }
.wy-newsletter .is-style-outline .wp-block-button__link { background: transparent !important; color: #fff !important; border: 2px solid #fff; }

/* ---------- article ---------- */
.wy-article-title { font-family: var(--wy-serif); font-weight: 600; font-size: clamp(32px, 4vw, 50px) !important; line-height: 1.06; letter-spacing: -0.6px; margin: 0 !important; }
.wy-standfirst p { font-size: 20px; line-height: 1.5; margin: 16px 0 0; }
.wy-byline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 14px 0; margin: 20px 0 24px; border-top: 1px solid var(--wy-hair); border-bottom: 1px solid var(--wy-hair); font-family: var(--wy-sans); font-size: 14px; }
.wy-byline .wp-block-post-author-name { font-weight: 700; }
.wy-byline .wp-block-post-date { color: var(--wy-muted); }
.wy-share { display: flex; flex-wrap: wrap; gap: 8px; }
.wy-share a { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border: 1px solid var(--wy-hair); border-radius: 8px; font-family: var(--wy-sans); font-size: 14px; font-weight: 600; color: var(--wy-ink); text-decoration: none; }
.wy-share a.wy-so { background: var(--wy-saffron); border-color: var(--wy-saffron); font-weight: 700; }
.wy-content { font-family: var(--wy-serif); font-size: 20px; line-height: 1.65; }
.wy-content blockquote, .wy-content .wp-block-quote { border-left: 4px solid var(--wy-saffron); padding-left: 20px; margin: 32px 0; }
.wy-content .wp-block-quote p { font-weight: 600; font-size: 26px; line-height: 1.25; color: var(--wy-deep); }
.wy-content figcaption, .wp-block-post-featured-image + figcaption { font-family: var(--wy-sans); font-size: 13px; color: var(--wy-muted); }
.wy-tags a { display: inline-block; padding: 6px 12px; background: var(--wy-sand); border-radius: 2px; font-family: var(--wy-sans); font-size: 14px; color: var(--wy-ink); text-decoration: none; margin: 0 4px 6px 0; }
.wy-tags .wp-block-post-terms__separator { display: none; }
.wy-author { background: var(--wy-sand); border-radius: var(--wy-radius); padding: 20px; font-family: var(--wy-sans); }
.wy-author .wp-block-post-author__avatar img { border-radius: 50%; border: 2px solid var(--wy-saffron); }
.wy-corrections { font-family: var(--wy-sans); font-size: 14px; color: var(--wy-muted); border-top: 1px solid var(--wy-hair); padding-top: 14px; }

/* ---------- archive ---------- */
.wy-archive-title { font-family: var(--wy-serif); font-weight: 600; font-size: 40px !important; margin: 28px 0 8px !important; }
.wp-block-query-pagination { font-family: var(--wy-sans); font-weight: 600; margin-top: 32px; gap: 12px; }

/* ---------- footer ---------- */
.wy-footer { background: var(--wy-ink); color: #f2ede4; margin-top: 56px; }
.wy-footer-bar { height: 6px; display: flex; }
.wy-footer-bar span { display: block; }
.wy-footer-inner { display: flex; flex-wrap: wrap; gap: 40px; padding-top: 44px; padding-bottom: 24px; }
.wy-footer-brand { flex: 2 1 280px; min-width: 0; }
.wy-footer .wy-logo img { height: 46px; width: auto; }
.wy-footer-tag { font-family: var(--wy-serif); font-style: italic; font-size: 22px; margin: 16px 0 0; }
.wy-footer-col { flex: 1 1 150px; display: flex; flex-direction: column; gap: 8px; font-family: var(--wy-sans); font-size: 14px; }
.wy-footer-col strong { font-size: 12px; letter-spacing: 1.5px; color: var(--wy-saffron); }
.wy-footer a { color: #f2ede4; text-decoration: none; }
.wy-footer a:hover { text-decoration: underline; }
.wy-footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 16px; padding-bottom: 32px; border-top: 1px solid #2f3f50; font-family: var(--wy-sans); font-size: 13px; color: #a7b1bb; }
.wy-footer-base a { color: #a7b1bb; }

/* ---------- phone ---------- */
@media (max-width: 781px) {
	.wy-header .wp-block-navigation { flex: 0 0 auto; order: -1; }
	.wy-tools { margin-left: auto; }
	.wy-header .wp-block-search { display: none; }
	.wy-header-inner { gap: 8px 12px !important; padding-top: 8px; padding-bottom: 8px; }
	.wy-header .wy-logo img, .wy-header .wp-block-site-logo img { height: 38px; }
	.wy-live .wp-block-button__link { padding: 8px 10px !important; }
	.wy-top { gap: 20px; }
	.wy-video-main .wy-card-title { font-size: 22px !important; }
}

/* ---------- spacing resets ---------- */
.wp-site-blocks > * + * { margin-block-start: 0 !important; }
.wy-container > .wy-section:first-child { margin-top: 28px; }

.wy-video .wy-rule { border-top-color: transparent; padding-top: 0; }

/* ---------- fixes 1.0.1 ---------- */
.wy-top > *, .wy-video-grid > *, .wy-east > *, .wy-main-side > *, .wy-split > *, .wy-side > *,
.wy-row-head > *, .wy-newsletter > *, .wy-byline > *, .wy-tools > *, .wy-header-inner > * { margin-block-start: 0 !important; }
.wy-content p, .wy-content li { font-size: 20px; }
.wy-content .has-small-font-size, .wy-content .has-medium-font-size { font-size: 20px !important; }
.wy-content h2, .wy-content h3 { font-family: var(--wy-serif); font-weight: 600; margin-top: 32px; }
.wy-content ul, .wy-content ol { padding-left: 1.2em; }
.wy-content a { color: var(--wy-deep); }
.wy-top-side .wy-excerpt p { font-size: 15px; color: var(--wy-muted); }
