/*
Theme Name: nicker1
Theme URI: https://nickerpost.com/
Author: Nicker Post
Description: An editable editorial theme for Nicker Post thoroughbred racing news.
Version: 1.0.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: nicker1
Tags: blog, news, custom-logo, custom-menu, featured-images, threaded-comments
*/

:root {
	--nicker-green: #16852b;
	--nicker-green-dark: #126d23;
	--nicker-ink: #181a18;
	--nicker-muted: #6b706b;
	--nicker-line: #e7e9e6;
	--nicker-paper: #fff;
	--nicker-wash: #f5f7f4;
	--nicker-width: 1160px;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--nicker-paper);
	color: var(--nicker-ink);
	font-family: Arial, Helvetica, sans-serif;
	font-size: 16px;
	line-height: 1.65;
}

a {
	color: var(--nicker-green-dark);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

a:hover,
a:focus {
	color: var(--nicker-ink);
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

button,
input,
textarea {
	font: inherit;
}

.screen-reader-text {
	position: absolute;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	width: 1px;
	height: 1px;
	padding: 0;
	border: 0;
	white-space: nowrap;
	clip-path: inset(50%);
}

.screen-reader-text:focus {
	z-index: 100000;
	top: 8px;
	left: 8px;
	display: block;
	clip: auto;
	width: auto;
	height: auto;
	padding: 12px 16px;
	background: #fff;
	color: #000;
	clip-path: none;
}

.site-shell {
	width: min(var(--nicker-width), calc(100% - 40px));
	margin-inline: auto;
}

.topline {
	background: #111;
	color: #fff;
	font-size: 12px;
}

.topline-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 36px;
	gap: 20px;
}

.topline a {
	color: #fff;
	text-decoration: none;
}

.topline .date {
	color: #e3e3e3;
}

.brand-area {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 150px;
	padding: 24px 0;
	background: #e9ede8;
	text-align: center;
}

.brand-area::before {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgb(20 34 23 / 18%), rgb(20 34 23 / 4%)), var(--nicker-brand-image, none) center 52% / cover no-repeat;
	content: "";
}

.brand-area .site-shell {
	position: relative;
	z-index: 1;
}

.site-branding {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	color: var(--nicker-green);
	text-decoration: none;
	text-shadow: 0 1px 10px rgb(0 0 0 / 20%);
}

.site-branding:hover,
.site-branding:focus {
	color: var(--nicker-green-dark);
}

.site-branding .custom-logo {
	width: auto;
	max-width: min(280px, 70vw);
	max-height: 76px;
	object-fit: contain;
}

.site-title {
	margin: 0;
	font-size: clamp(32px, 5vw, 48px);
	font-weight: 900;
	letter-spacing: .035em;
	line-height: 1.1;
	text-transform: uppercase;
}

.site-description {
	margin: 4px 0 0;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .17em;
	line-height: 1.4;
	text-transform: uppercase;
}

.primary-bar {
	background: var(--nicker-green);
	color: #fff;
}

.primary-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	min-height: 50px;
}

.primary-navigation {
	min-width: 0;
}

.nicker-menu,
.nicker-menu ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nicker-menu a {
	display: block;
	padding: 13px 15px;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
}

.nicker-menu a:hover,
.nicker-menu a:focus,
.nicker-menu .current-menu-item > a,
.nicker-menu .current_page_item > a {
	background: var(--nicker-green-dark);
	color: #fff;
}

.nicker-menu .sub-menu {
	display: none;
	position: absolute;
	z-index: 10;
	min-width: 210px;
	background: var(--nicker-green-dark);
	box-shadow: 0 8px 20px rgb(0 0 0 / 16%);
}

.nicker-menu .menu-item-has-children {
	position: relative;
}

.nicker-menu .menu-item-has-children:hover > .sub-menu,
.nicker-menu .menu-item-has-children:focus-within > .sub-menu {
	display: block;
}

.nicker-menu .sub-menu a {
	padding: 10px 14px;
}

.header-search {
	flex: 0 0 210px;
}

.header-search .search-form {
	display: flex;
}

.header-search input[type="search"] {
	width: 100%;
	min-width: 0;
	padding: 7px 10px;
	border: 1px solid rgb(255 255 255 / 55%);
	border-right: 0;
	border-radius: 3px 0 0 3px;
	background: rgb(0 0 0 / 10%);
	color: #fff;
}

.header-search input[type="search"]::placeholder {
	color: rgb(255 255 255 / 85%);
}

.header-search .search-submit {
	padding: 6px 11px;
	border: 1px solid rgb(255 255 255 / 55%);
	border-radius: 0 3px 3px 0;
	background: var(--nicker-green-dark);
	color: #fff;
	cursor: pointer;
}

.main-content {
	min-height: 50vh;
	padding: 34px 0 64px;
}

.section-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 22px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--nicker-green);
}

.section-heading h1,
.section-heading h2 {
	margin: 0;
	font-size: 20px;
	font-weight: 800;
	line-height: 1.3;
	text-transform: uppercase;
}

.section-heading a {
	color: var(--nicker-muted);
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
	text-transform: uppercase;
}

.featured-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(260px, .8fr);
	gap: 28px;
	margin-bottom: 40px;
}

.featured-story {
	position: relative;
	overflow: hidden;
	min-height: 390px;
	background: #263129;
}

.featured-story > a:first-child,
.featured-story .featured-image {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 390px;
}

.featured-story .featured-image {
	object-fit: cover;
	opacity: .84;
	transition: transform .25s ease;
}

.featured-story:hover .featured-image {
	transform: scale(1.025);
}

.featured-copy {
	position: absolute;
	inset: auto 0 0;
	padding: 60px 26px 24px;
	background: linear-gradient(transparent, rgb(0 0 0 / 85%));
	color: #fff;
	pointer-events: none;
}

.featured-copy a,
.featured-copy .post-meta a {
	color: #fff;
	pointer-events: auto;
}

.featured-copy h2 {
	margin: 8px 0 7px;
	font-size: clamp(24px, 3vw, 34px);
	line-height: 1.17;
}

.featured-copy h2 a {
	text-decoration: none;
}

.featured-excerpt {
	max-width: 690px;
	margin: 0;
	color: rgb(255 255 255 / 88%);
	font-size: 14px;
}

.featured-side {
	display: grid;
	grid-template-rows: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.featured-side .post-card {
	display: grid;
	grid-template-columns: 42% 1fr;
	min-height: 0;
}

.featured-side .post-card-image {
	height: 100%;
	min-height: 130px;
}

.featured-side .post-card-copy {
	padding: 14px;
}

.featured-side .post-card h3 {
	font-size: 16px;
}

.post-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 26px;
}

.post-card {
	overflow: hidden;
	border: 1px solid var(--nicker-line);
	background: #fff;
}

.post-card-image {
	display: block;
	overflow: hidden;
	height: 205px;
	background: var(--nicker-wash);
}

.post-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .25s ease;
}

.post-card:hover .post-card-image img {
	transform: scale(1.03);
}

.post-card-copy {
	padding: 17px 18px 20px;
}

.post-card h2,
.post-card h3 {
	margin: 7px 0 9px;
	font-size: 19px;
	line-height: 1.3;
}

.post-card h2 a,
.post-card h3 a {
	color: var(--nicker-ink);
	text-decoration: none;
}

.post-card h2 a:hover,
.post-card h3 a:hover {
	color: var(--nicker-green-dark);
}

.post-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 5px 12px;
	color: var(--nicker-muted);
	font-size: 12px;
}

.post-meta a {
	color: inherit;
	text-decoration: none;
}

.post-categories a {
	color: var(--nicker-green-dark);
	font-weight: 800;
	text-transform: uppercase;
}

.post-card-excerpt {
	margin: 0;
	color: #4f554f;
	font-size: 14px;
}

.content-columns {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 290px;
	gap: 40px;
	align-items: start;
}

.content-area {
	min-width: 0;
}

.archive-intro {
	margin-bottom: 28px;
}

.archive-intro h1 {
	margin: 0 0 8px;
	font-size: clamp(28px, 4vw, 38px);
	line-height: 1.2;
}

.archive-description {
	color: var(--nicker-muted);
}

.sidebar {
	padding: 20px;
	border: 1px solid var(--nicker-line);
	background: var(--nicker-wash);
}

.widget + .widget {
	margin-top: 26px;
	padding-top: 22px;
	border-top: 1px solid var(--nicker-line);
}

.widget-title {
	margin: 0 0 14px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--nicker-green);
	font-size: 16px;
	text-transform: uppercase;
}

.widget ul {
	margin: 0;
	padding-left: 18px;
}

.single-article {
	max-width: 840px;
	margin: 0 auto;
}

.single-article .entry-title {
	margin: 10px 0 12px;
	font-size: clamp(32px, 5vw, 48px);
	line-height: 1.12;
}

.entry-featured-image {
	margin: 26px 0;
}

.entry-featured-image img {
	width: 100%;
	max-height: 560px;
	object-fit: cover;
}

.entry-content {
	font-size: 17px;
	line-height: 1.8;
}

.entry-content > * {
	max-width: 100%;
}

.entry-content h2,
.entry-content h3 {
	margin-top: 1.8em;
	line-height: 1.3;
}

.entry-content blockquote {
	margin: 1.8em 0;
	padding: 4px 0 4px 20px;
	border-left: 4px solid var(--nicker-green);
	color: #4f554f;
}

.entry-content .wp-block-image img,
.entry-content figure img {
	height: auto;
}

.entry-tags,
.post-navigation,
.comments-area {
	margin-top: 34px;
	padding-top: 24px;
	border-top: 1px solid var(--nicker-line);
}

.post-navigation .nav-links {
	display: flex;
	justify-content: space-between;
	gap: 20px;
}

.post-navigation .nav-subtitle {
	display: block;
	color: var(--nicker-muted);
	font-size: 12px;
}

.page-article {
	max-width: 900px;
	margin: 0 auto;
}

.page-article .entry-title {
	margin: 0 0 22px;
	font-size: clamp(30px, 4vw, 42px);
	line-height: 1.2;
}

.pagination,
.posts-navigation {
	margin-top: 32px;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.pagination .page-numbers {
	display: inline-block;
	padding: 7px 12px;
	border: 1px solid var(--nicker-line);
	text-decoration: none;
}

.pagination .current {
	border-color: var(--nicker-green);
	background: var(--nicker-green);
	color: #fff;
}

.site-footer {
	padding: 36px 0;
	background: #171a17;
	color: #dfe4df;
}

.footer-inner {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 20px;
	align-items: start;
}

.footer-title {
	margin: 0 0 6px;
	color: #fff;
	font-size: 20px;
}

.footer-description,
.site-info {
	margin: 0;
	color: #b9c0b9;
	font-size: 13px;
}

.footer-navigation .nicker-menu {
	justify-content: flex-end;
}

.footer-navigation .nicker-menu a {
	padding: 6px 10px;
}

.site-info {
	grid-column: 1 / -1;
	padding-top: 18px;
	border-top: 1px solid rgb(255 255 255 / 16%);
}

.no-posts {
	padding: 24px;
	background: var(--nicker-wash);
}

@media (max-width: 800px) {
	.primary-inner {
		display: block;
		padding: 4px 0 12px;
	}

	.nicker-menu a {
		padding: 10px 12px;
	}

	.header-search {
		max-width: 360px;
		margin: 0 12px;
	}

	.featured-layout,
	.content-columns {
		grid-template-columns: 1fr;
	}

	.featured-side {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-rows: auto;
	}

	.sidebar {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px;
	}

	.widget + .widget {
		margin: 0;
		padding: 0;
		border: 0;
	}

	.post-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 540px) {
	.site-shell {
		width: min(var(--nicker-width), calc(100% - 28px));
	}

	.brand-area {
		min-height: 125px;
	}

	.primary-inner {
		width: 100%;
	}

	.primary-navigation {
		overflow-x: auto;
	}

	.nicker-menu {
		flex-wrap: nowrap;
		width: max-content;
	}

	.nicker-menu a {
		padding: 11px 10px;
		font-size: 12px;
	}

	.header-search {
		margin: 4px 14px 0;
	}

	.main-content {
		padding-top: 24px;
	}

	.featured-story,
	.featured-story > a:first-child,
	.featured-story .featured-image {
		min-height: 290px;
	}

	.featured-copy {
		padding: 46px 18px 18px;
	}

	.featured-copy h2 {
		font-size: 25px;
	}

	.featured-side,
	.post-grid,
	.sidebar {
		grid-template-columns: 1fr;
	}

	.featured-side .post-card {
		grid-template-columns: 38% 1fr;
		min-height: 130px;
	}

	.post-card-image {
		height: 190px;
	}

	.footer-inner {
		grid-template-columns: 1fr;
	}

	.footer-navigation .nicker-menu {
		flex-wrap: wrap;
		width: auto;
	}

	.site-info {
		grid-column: auto;
	}
}
