/*
Theme Name: Time Enterprise
Theme URI: https://timeenterprise.co.uk/
Author: Time Enterprise
Author URI: https://timeenterprise.co.uk/
Description: A clean blogging theme for Time Enterprise, matching the ibusinessday.co.uk layout: green header with centred title and search, green navigation with dropdowns, a 3-column post grid on the homepage, and a single black footer. No sidebar.
Version: 1.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: time-enterprise
Tags: blog, news, grid-layout, custom-menu, featured-images, translation-ready
*/

:root {
	--green: #22c55e;
	--green-dark: #16a34a;
	--blue: #2563eb;
	--ink: #1c2733;
	--muted: #8a94a6;
	--bg: #f7f7f7;
	--card: #ffffff;
	--line: #e6e6e6;
	--shadow: 0 1px 6px rgba(0, 0, 0, .08), 0 4px 18px rgba(0, 0, 0, .05);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
	background: var(--bg);
	color: var(--ink);
	font-size: 16.5px;
	line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 18px; }

/* ---------- Header ---------- */
.topbar { background: #fff; border-bottom: 3px solid var(--green); }
.topbar-in {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 12px 0;
	min-height: 64px;
}
.contact-pill {
	background: var(--green);
	color: #fff !important;
	text-decoration: none;
	font-family: "Poppins", sans-serif;
	font-weight: 700;
	font-size: 16.5px;
	padding: 8px 24px;
	border-radius: 999px;
	white-space: nowrap;
	border: 0;
	cursor: pointer;
	display: inline-block;
}
.contact-pill:hover { background: var(--green-dark); }
.brand {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 9px;
	text-decoration: none;
}
.brand-name {
	font-family: "Poppins", sans-serif;
	font-weight: 800;
	font-size: clamp(22px, 3.6vw, 32px);
	line-height: 1;
	color: var(--blue);
	letter-spacing: -.5px;
	white-space: nowrap;
}
.brand-name em {
	font-style: normal;
	background: var(--green);
	color: #fff;
	padding: 1px 12px 3px;
	border-radius: 999px;
	margin-left: 5px;
}
.icon-btn {
	background: none;
	border: 0;
	cursor: pointer;
	color: var(--green);
	padding: 8px;
	display: grid;
	place-items: center;
}
.searchbar { display: none; background: #fff; border-top: 1px solid var(--line); padding: 12px 0; }
.searchbar.open { display: block; }
.searchbar form { display: flex; gap: 10px; max-width: 640px; margin: 0 auto; }
.searchbar input[type="search"] {
	flex: 1;
	padding: 10px 16px;
	border: 1px solid #cfd4dc;
	border-radius: 4px;
	font: inherit;
	background: #fff;
	color: var(--ink);
}
.searchbar input[type="search"]:focus { outline: none; border-color: var(--green); }
.searchbar button,
.searchbar input[type="submit"] {
	background: var(--green);
	color: #fff;
	border: 0;
	cursor: pointer;
	font-family: "Poppins", sans-serif;
	font-weight: 700;
	font-size: 15px;
	padding: 10px 24px;
	border-radius: 4px;
}
.searchbar button:hover,
.searchbar input[type="submit"]:hover { background: var(--green-dark); }

/* ---------- Navigation ---------- */
.mainnav { background: #fff; border-bottom: 3px solid var(--blue); }
.mainnav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	flex-wrap: wrap;
}
.mainnav ul li { position: relative; }
.mainnav ul li a {
	color: var(--green);
	font-family: "Playfair Display", Georgia, serif;
	font-weight: 700;
	font-size: 16.5px;
	padding: 10px;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	white-space: nowrap;
}
.mainnav ul li a:hover,
.mainnav ul li.current-menu-item > a,
.mainnav ul li.current-menu-parent > a { color: var(--blue); }
.mainnav ul li.menu-item-has-children > a::after { content: "\25BE"; font-size: 10px; }
.mainnav ul ul.sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	background: #1c2733;
	min-width: 210px;
	padding: 6px;
	display: none;
	z-index: 60;
	flex-direction: column;
	align-items: stretch;
	box-shadow: var(--shadow);
}
.mainnav ul li:hover > ul.sub-menu,
.mainnav ul li:focus-within > ul.sub-menu { display: flex; }
.mainnav ul ul.sub-menu li a {
	color: #fff;
	font-family: "Source Sans 3", system-ui, sans-serif;
	font-weight: 600;
	padding: 8px 12px;
	display: block;
}
.mainnav ul ul.sub-menu li a:hover { background: #2a3644; color: #fff; }
/* Third-level fly-out (e.g. Beauty & Natural under Tips & Tricks). */
.mainnav ul ul.sub-menu ul.sub-menu { top: 0; left: 100%; }
.mainnav ul ul.sub-menu li.menu-item-has-children > a::after { content: "\203A"; font-size: 14px; margin-left: auto; }

/* ---------- Post grid (the only homepage section) ---------- */
.home-sec { padding: 64px 0 30px; min-height: 60vh; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.post-card {
	background: var(--card);
	border: 1px solid #eee;
	border-radius: 8px;
	box-shadow: var(--shadow);
	padding: 10px 10px 18px;
	display: flex;
	flex-direction: column;
}
.post-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 5px; }
.post-card .no-thumb { width: 100%; aspect-ratio: 16/10; background: #d5d5d5; border-radius: 5px; }
.post-body { padding: 14px 8px 0; display: flex; flex-direction: column; flex: 1; text-align: center; }
.post-body h2 { font-size: 19px; line-height: 1.35; margin: 0 0 8px; font-weight: 700; color: #20242b; }
.post-body h2 a { color: #20242b; text-decoration: none; }
.post-body h2 a:hover { color: var(--blue); }
.post-date { color: var(--muted); font-size: 13.5px; margin: 0 0 10px; }
.post-ex { color: #3c4450; margin: 0; flex: 1; }
.avatar-wrap { display: flex; justify-content: center; padding-top: 16px; }
.avatar-wrap img.avatar,
.avatar-wrap .avatar { width: 50px; height: 50px; border-radius: 50%; }
.empty-msg { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 44px 10px; }

/* Archive heading: the category name only. */
.archive-title { font-size: clamp(26px, 4vw, 36px); margin: 0 0 26px; color: #20242b; font-weight: 700; text-align: center; }

/* Pagination (archive / search only — never on the homepage). */
.pagination { text-align: center; padding: 30px 0 10px; }
.pagination .page-numbers {
	display: inline-block;
	padding: 8px 14px;
	margin: 0 3px;
	border: 1px solid var(--line);
	border-radius: 4px;
	color: var(--ink);
	text-decoration: none;
	background: #fff;
}
.pagination .page-numbers.current { background: var(--green); border-color: var(--green); color: #fff; }
.pagination .page-numbers:hover { border-color: var(--green); color: var(--green-dark); }

/* ---------- Single article ---------- */
.page-sec { padding: 56px 0 30px; min-height: 60vh; }
.article-box { max-width: 820px; margin: 0 auto; }
.article-box > img { width: 100%; aspect-ratio: 21/9; object-fit: cover; border-radius: 6px; }
.article-box h1 { font-size: clamp(25px, 4.2vw, 36px); line-height: 1.25; margin: 22px 0 6px; color: #20242b; }
.article-date { color: var(--muted); font-size: 14.5px; margin: 0 0 20px; }
.article-body p { margin: 0 0 16px; font-size: 17.5px; color: #2b333f; }
.article-body h2, .article-body h3 { font-size: 21px; margin: 24px 0 8px; color: #20242b; }

/* ---------- Simple pages ---------- */
.page-title { font-size: clamp(26px, 4vw, 36px); margin: 0 0 26px; color: #20242b; font-weight: 700; }
.simple-page { max-width: 820px; margin: 0 auto; }
.simple-page form label { font-weight: 600; display: block; margin: 16px 0 6px; }
.simple-page form label:first-child { margin-top: 0; }
.simple-page form input[type="text"],
.simple-page form input[type="email"],
.simple-page form textarea {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid #c9ced6;
	border-radius: 4px;
	font: inherit;
	background: #fff;
	color: var(--ink);
}
.simple-page form input:focus,
.simple-page form textarea:focus { outline: none; border-color: var(--green); }
.simple-page form textarea { resize: vertical; }
.simple-page form input[type="submit"],
.submit-btn {
	margin-top: 20px;
	background: var(--blue);
	color: #fff;
	border: 0;
	cursor: pointer;
	font-family: "Poppins", sans-serif;
	font-weight: 700;
	font-size: 16px;
	padding: 11px 34px;
	border-radius: 4px;
}
.simple-page form input[type="submit"]:hover,
.submit-btn:hover { background: #152f83; }

/* ---------- Search results ---------- */
.search-result { background: #fff; border: 1px solid #eee; border-radius: 8px; box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 22px; }
.search-result .result-cat { color: var(--green); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .5px; }
.search-result .result-cat a { color: var(--green); text-decoration: none; }
.search-result h2 { font-size: 22px; margin: 8px 0 6px; }
.search-result h2 a { color: #20242b; text-decoration: none; }
.search-result h2 a:hover { color: var(--blue); }
.search-result .result-meta { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.search-result p { color: #3c4450; margin: 0 0 12px; }
.search-result .read-more { color: var(--green); font-weight: 700; text-decoration: none; }
.search-result .read-more:hover { color: var(--blue); }

/* ---------- Footer ---------- */
.site-footer { background: #000; color: #cfd6e6; margin-top: 56px; padding: 40px 0 26px; text-align: center; }
.site-footer .fbrand { font-family: "Playfair Display", Georgia, serif; font-size: clamp(27px, 4vw, 36px); color: #fff; font-weight: 800; margin: 0; }
.site-footer .fbrand a { color: #fff; text-decoration: none; }
.fnav { display: flex; justify-content: center; gap: 8px 30px; flex-wrap: wrap; margin: 22px 0 30px; }
.fnav ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 8px 30px; flex-wrap: wrap; }
.fnav ul li a { color: #fff; font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: 17px; padding: 0; text-decoration: none; }
.fnav ul li a:hover { color: var(--green); }
.fbottom { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.fbottom p { margin: 0; font-family: "Playfair Display", Georgia, serif; font-weight: 700; color: #8fa0c4; }
.socials { display: flex; gap: 16px; }
.socials a { color: #fff; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 50%; text-decoration: none; }
.socials a:hover { color: var(--green); border-color: var(--green); }
.socials svg { width: 16px; height: 16px; fill: currentColor; }

/* Screen-reader text. */
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 960px) {
	.grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
	.grid { grid-template-columns: 1fr; }
	.home-sec { padding-top: 36px; }
	.topbar-in { flex-wrap: wrap; justify-content: space-between; }
	.brand { position: static; transform: none; order: -1; width: 100%; justify-content: center; }
	.mainnav ul ul.sub-menu { position: static; box-shadow: none; background: #f0f7f1; }
	.mainnav ul ul.sub-menu li a { color: var(--ink); }
	.fbottom { justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}
