/*
Theme Name: Neil's Wildlife Journal
Description: Lightweight yellow-and-green theme for neilswildlifejournal.uk. No page builder, no plugin dependencies.
Version: 1.0.0
Author: Aidan Gray
Text Domain: nwj-journal
Requires at least: 6.0
Requires PHP: 7.4
*/

:root {
	--nwj-bg: #ffffcc;
	--nwj-bg-accent: #ccffcc;
	--nwj-primary: #4a5d23;
	--nwj-secondary: #8b5e3c;
	--nwj-text: #333333;
	--nwj-dark: #2e2e2e;
	--nwj-heading: #5e0808;
	--nwj-link: #cc3366;
	--nwj-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--nwj-head-font: Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--nwj-bg);
	color: var(--nwj-text);
	font-family: var(--nwj-font);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

img { max-width: 100%; height: auto; border-style: none; }
a { color: var(--nwj-link); text-decoration: none; }
a:hover, a:focus { color: var(--nwj-heading); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 { margin: .5rem 0 1rem; font-weight: 500; line-height: 1.2; color: inherit; }
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }
p { margin: 0 0 .9rem; }
blockquote { margin: 1rem 0; padding: .5rem 1.25rem; border-left: 4px solid var(--nwj-bg-accent); }
hr { border: 0; border-top: 1px solid #000; }
table { border-collapse: collapse; width: 100%; margin-bottom: 1rem; }
td, th { border: 1px solid rgba(0, 0, 0, .15); padding: .5rem .75rem; }

.screen-reader-text {
	position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden;
}
.screen-reader-text:focus {
	left: 6px; top: 7px; width: auto; height: auto; padding: 12px 20px; z-index: 100000;
	background: #fff; color: var(--nwj-heading); clip: auto;
}

/* ---------- Header ---------- */
.site-header { padding: 10px 10px 0; }
.site-title { margin: 0 0 20px; font-family: var(--nwj-head-font); font-size: 40px; line-height: 40px; font-weight: 500; }
.site-title a, .site-title a:hover { color: var(--nwj-heading); text-decoration: none; }
.site-banner { display: block; margin: 0 0 27px; }
.site-banner img { display: block; width: 100%; height: auto; }
.site-tagline { margin: 0 0 16px; font-family: var(--nwj-head-font); font-size: 28px; line-height: 1.2; font-weight: 500; color: var(--nwj-dark); }
.site-header-rule { margin: 51px 0 25px; }

.site-nav { display: flex; flex-wrap: wrap; align-items: center; margin-inline: -10px; padding: 16px 24px; }
.site-nav ul { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.site-nav li { position: relative; }
.site-nav a {
	position: relative; display: block; padding: 13px 8px; color: var(--nwj-primary);
	font-family: var(--nwj-head-font); font-size: 16px; line-height: 24px; text-decoration: none;
}
.site-nav a:hover, .site-nav a:focus { color: var(--nwj-heading); text-decoration: none; }
.site-nav .current-menu-item > a, .site-nav .current_page_item > a, .site-nav .current-menu-ancestor > a, .site-nav .current-page-ancestor > a { color: var(--nwj-dark); }
.site-nav .current-menu-item > a::after, .site-nav .current_page_item > a::after, .site-nav .current-menu-ancestor > a::after, .site-nav .current-page-ancestor > a::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; border-bottom: 1px solid var(--nwj-dark);
}
.site-nav .sub-menu {
	display: none; position: absolute; z-index: 20; left: 0; min-width: 220px;
	flex-direction: column; background: var(--nwj-bg); border: 1px solid rgba(0, 0, 0, .15);
}
.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu { display: flex; }

/* ---------- Main content column ---------- */
.site-main { width: 100%; margin: 0 auto; padding: 0 10px 40px; }
@media (min-width: 576px)  { .site-main { max-width: 500px;  padding-inline: 0; } }
@media (min-width: 768px)  { .site-main { max-width: 600px; } }
@media (min-width: 992px)  { .site-main { max-width: 800px; } }
@media (min-width: 1200px) { .site-main { max-width: 1140px; } }

.entry-title { margin: 8px 0 16px; font-size: 40px; color: var(--nwj-heading); }
.entry-title a { color: inherit; }
.entry-meta { margin: -6px 0 16px; font-size: 14px; color: var(--nwj-secondary); }
.entry-meta a { color: inherit; }
.post-thumbnail { margin: 0 0 20px; }
.page-content::after, .entry-content::after { content: ""; display: block; clear: both; }
.entry-content > *:last-child { margin-bottom: 0; }

.alignleft { float: left; margin: .3rem 1.25rem 1rem 0; }
.alignright { float: right; margin: .3rem 0 1rem 1.25rem; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption, figure { max-width: 100%; margin: 0 0 1rem; }
.wp-caption-text, figcaption { font-size: 14px; color: var(--nwj-dark); }

/* Post lists (blog index, archives, search) */
.post-list-item { margin: 0 0 40px; padding-bottom: 24px; border-bottom: 1px solid rgba(0, 0, 0, .15); }
.post-list-item .entry-title { font-size: 28px; margin-bottom: 8px; }
.post-list-item .post-thumbnail img { width: 100%; }
.archive-title { margin: 8px 0 24px; font-size: 32px; color: var(--nwj-heading); }

.pagination, .post-navigation { margin: 32px 0 0; }
.pagination .nav-links, .post-navigation .nav-links { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; }
.pagination .page-numbers { display: inline-block; padding: 4px 10px; border: 1px solid rgba(0, 0, 0, .25); color: var(--nwj-primary); }
.pagination .page-numbers.current { background: var(--nwj-bg-accent); }

/* Forms / buttons */
input[type="text"], input[type="search"], input[type="email"], input[type="url"], textarea {
	width: 100%; padding: .5rem 1rem; border: 1px solid #666; border-radius: 3px; background: #fff; font: inherit;
}
button, input[type="submit"], .button {
	display: inline-block; padding: .5rem 1rem; border: 1px solid var(--nwj-primary); border-radius: 3px;
	background: var(--nwj-primary); color: #fff; font: inherit; cursor: pointer; text-decoration: none;
}
button:hover, input[type="submit"]:hover, .button:hover { background: var(--nwj-heading); border-color: var(--nwj-heading); color: #fff; text-decoration: none; }
.search-form { display: flex; gap: 8px; }

/* Comments */
.comments-area { margin-top: 48px; }
.comment-list { padding-left: 0; list-style: none; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-body { margin-bottom: 20px; padding: 12px 16px; background: rgba(255, 255, 255, .5); }

/* 404 */
.error-404 { padding: 40px 0; }

/* ---------- Footer ---------- */
.site-footer { margin-top: auto; min-height: 280px; padding: 169px 26px 90px; background: var(--nwj-bg-accent); }
.site-footer p { margin: 0; color: var(--nwj-primary); font-size: 14px; line-height: 21px; }

@media (max-width: 575px) {
	.site-title { font-size: 32px; line-height: 1.1; }
	.site-tagline { font-size: 22px; }
	.site-nav { padding-inline: 10px; }
	.entry-title { font-size: 32px; }
	.site-footer { padding-top: 60px; padding-bottom: 60px; min-height: 0; }
}

/* Nav search toggle */
.nav-search { position: relative; margin-left: 10px; }
.nav-search summary { list-style: none; display: block; padding: 13px 8px; color: #777; cursor: pointer; line-height: 0; }
.nav-search summary::-webkit-details-marker { display: none; }
.nav-search summary:hover, .nav-search[open] summary { color: var(--nwj-heading); }
.nav-search .search-form {
	position: absolute; z-index: 30; top: 100%; right: 0; width: 280px; padding: 10px;
	background: var(--nwj-bg); border: 1px solid rgba(0, 0, 0, .2); box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}
@media (max-width: 575px) { .nav-search .search-form { right: auto; left: 0; width: 240px; } }
