/*
Theme Name: Columnora
Author: Muhammad Mujahid Sarfraz
Description: Columnora is a fast, editorial block theme for news sites, online magazines, journals and independent publishers. Its blog home is a complete magazine layout — a lead story with top headlines, editor’s picks from your sticky posts, latest news beside a sidebar with a numbered “In brief” list, a dark long-read section and a paginated grid of older stories — built entirely with core blocks and query loops, so it fills itself with your posts. It ships article templates with reading time, author box, sidebar and standfirst options, author and category archives, patterns for opinion columns, a breaking news bar and category sections, five style variations including a dark Night Edition, two header and footer layouts and locally hosted Newsreader and Inter fonts. No page builder or bundled plugin is required.
Requires at least: 6.9
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: columnora
Tags: news, blog, two-columns, right-sidebar, wide-blocks, block-patterns, block-styles, custom-colors, custom-logo, custom-menu, editor-style, featured-images, full-site-editing, style-variations, template-editing, threaded-comments, translation-ready
*/

/* Global ------------------------------------------------------------------ */

a {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

:where(.wp-site-blocks) *:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

/*
 * On sections whose background is the Accent color (such as the breaking news bar),
 * an Accent outline would not show. These use the text color instead, and links are underlined.
 */
:where(.wp-site-blocks) :is(.columnora-breaking, .has-accent-background-color) :focus-visible {
	outline-color: currentColor;
}

:where(.wp-site-blocks) :is(.columnora-breaking, .has-accent-background-color) a:focus-visible {
	text-decoration: underline;
}

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* Section heading: a label with a heavy rule above it. */

.wp-block-heading.is-style-columnora-section {
	border-top: 3px solid currentColor;
	padding-top: 0.6rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

/* Kicker: small uppercase label above a headline. */

.is-style-columnora-kicker {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}

/* Category badge. */

.wp-block-post-terms.is-style-columnora-badge a {
	display: inline-block;
	padding: 0.25em 0.6em;
	border-radius: 2px;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--base) !important;
	line-height: 1.4;
}

.wp-block-post-terms.is-style-columnora-badge .wp-block-post-terms__separator {
	display: none;
}

.wp-block-post-terms.is-style-columnora-badge a + a {
	margin-inline-start: 0.35em;
}

/* Numbered list of posts, used for "Trending". */

.wp-block-post-template.is-style-columnora-numbered {
	counter-reset: columnora-rank;
}

.wp-block-post-template.is-style-columnora-numbered > li {
	counter-increment: columnora-rank;
	display: grid;
	grid-template-columns: 2.75rem 1fr;
	align-items: start;
	column-gap: 0.75rem;
}

.wp-block-post-template.is-style-columnora-numbered > li::before {
	content: counter(columnora-rank, decimal-leading-zero);
	grid-row: 1 / span 4;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 2rem;
	font-weight: 700;
	line-height: 1;
	color: var(--wp--preset--color--accent);
}

.wp-block-post-template.is-style-columnora-numbered > li > * {
	grid-column: 2;
}

/* Card with a hairline border. */

.wp-block-group.is-style-columnora-card {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 6px;
}

/* Heavy rule. */

.wp-block-separator.is-style-columnora-thick {
	border: 0;
	border-top: 3px solid var(--wp--preset--color--contrast);
	opacity: 1;
}

/* Rows of posts separated by hairlines. */

.columnora-divided > li + li {
	border-top: 1px solid var(--wp--preset--color--line);
	padding-top: var(--wp--preset--spacing--30);
}

.wp-block-group > .wp-block-post-featured-image {
	flex-shrink: 0;
}

/* Featured images zoom slightly on hover. */

.wp-block-post-featured-image {
	overflow: hidden;
}

.wp-block-post-featured-image img {
	transition: transform 0.4s ease;
}

.wp-block-post:hover .wp-block-post-featured-image img {
	transform: scale(1.03);
}

/* Social icons that follow the surrounding text color in every style variation. */

.wp-block-social-links.columnora-social-mono .wp-social-link {
	color: currentColor !important;
	background: none !important;
}

/* Meta text inside dark sections inherits the light text color. */

.has-contrast-background-color :is(.wp-block-post-date, .wp-block-post-time-to-read, .wp-block-post-author-name) {
	color: inherit;
	opacity: 0.85;
}

/* Breaking news bar label. */

.columnora-breaking .wp-block-post-title {
	margin: 0;
}

/* Header ------------------------------------------------------------------ */

.columnora-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--50);
}

@media (max-width: 600px) {
	.columnora-header .wp-block-site-tagline {
		display: none;
	}
}

/* Article ---------------------------------------------------------------- */

.columnora-article .wp-block-post-content > p:first-of-type::first-letter {
	float: left;
	margin: 0.08em 0.12em 0 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 3.6em;
	font-weight: 700;
	line-height: 0.8;
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-post-featured-image img {
		transition: none;
	}

	.wp-block-post:hover .wp-block-post-featured-image img {
		transform: none;
	}
}
