/*
Theme Name: PageHunter Blog
Theme URI: https://pagehunter.ai/blog
Author: PageHunter
Author URI: https://pagehunter.ai
Description: Editorial child theme of Twenty Twenty-Five. Continues the PageHunter.ai brand for bilingual reading (EN default, HE under /he/). Project1OS owns article content and schema.
Template: twentytwentyfive
Version: 1.3.2
Requires at least: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pagehunter-blog
*/

/* --------------------------------------------------------------------------
   Hebrew Open Sans subsets (theme.json cannot express unicode-range faces)
   -------------------------------------------------------------------------- */
@font-face {
	font-family: "Open Sans";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("./assets/fonts/open-sans/open-sans-he-400.woff2") format("woff2");
	unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

@font-face {
	font-family: "Open Sans";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("./assets/fonts/open-sans/open-sans-he-500.woff2") format("woff2");
	unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

@font-face {
	font-family: "Open Sans";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("./assets/fonts/open-sans/open-sans-he-600.woff2") format("woff2");
	unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

@font-face {
	font-family: "Open Sans";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("./assets/fonts/open-sans/open-sans-he-700.woff2") format("woff2");
	unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

/* Hebrew headings fall back to Open Sans (Poppins has no Hebrew glyphs). */
.lang-he h1,
.lang-he h2,
.lang-he h3,
.lang-he h4,
.lang-he .wp-block-post-title,
.lang-he .wp-block-site-title {
	font-family: "Open Sans", system-ui, sans-serif;
}

/* --------------------------------------------------------------------------
   Shell
   -------------------------------------------------------------------------- */
.pagehunter-blog {
	background:
		radial-gradient(1200px 600px at 10% -10%, rgba(163, 209, 51, 0.18), transparent 55%),
		radial-gradient(900px 500px at 90% 0%, rgba(45, 79, 30, 0.08), transparent 50%),
		var(--wp--preset--color--surface, #f5f7f0);
	min-height: 100dvh;
}

.pagehunter-site-header {
	position: sticky;
	top: 1rem;
	z-index: 50;
	margin-inline: auto;
	max-width: var(--wp--style--global--wide-size, 1120px);
	padding-inline: var(--wp--preset--spacing--40, 1rem);
}

.pagehunter-site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 4rem;
	padding: 0.5rem 1rem;
	border-radius: 1rem;
	background: rgba(255, 255, 255, 0.88);
	border: 1px solid rgba(0, 0, 0, 0.06);
	box-shadow: 0 10px 30px rgba(26, 51, 18, 0.08);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
}

@media (prefers-reduced-transparency: reduce) {
	.pagehunter-site-header__inner {
		background: #fff;
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
	}
}

.pagehunter-site-logo a {
	display: block;
	line-height: 0;
}

.pagehunter-site-logo img {
	display: block;
	width: auto;
	height: 2.25rem;
	max-width: 100%;
}

@media (min-width: 782px) {
	.pagehunter-site-logo img {
		height: 2.75rem;
	}
}

.pagehunter-site-header .wp-block-navigation {
	gap: 0.25rem;
}

.pagehunter-site-header .wp-block-navigation-item__content {
	padding: 0.5rem 0.85rem;
	border-radius: 0.65rem;
	color: #475569;
}

.pagehunter-site-header .wp-block-navigation-item__content:hover,
.pagehunter-site-header .current-menu-item > .wp-block-navigation-item__content {
	color: #1a3312;
	background: rgba(216, 235, 168, 0.55);
}

.pagehunter-lang-menu {
	position: relative;
	z-index: 2;
}

.pagehunter-lang-menu__trigger {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.45rem 0.75rem;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.7);
	color: #2d4f1e;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	list-style: none;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.pagehunter-lang-menu__trigger::-webkit-details-marker {
	display: none;
}

.pagehunter-lang-menu__trigger:hover,
.pagehunter-lang-menu__trigger:focus-visible,
.pagehunter-lang-menu[open] .pagehunter-lang-menu__trigger {
	background: #fff;
	border-color: rgba(45, 79, 30, 0.35);
	color: #1a3312;
}

.pagehunter-lang-menu__globe {
	width: 1.05rem;
	height: 1.05rem;
	flex: none;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.pagehunter-lang-menu__chevron {
	width: 0.7rem;
	height: 0.45rem;
	margin-inline-start: 0.1rem;
	transition: transform 0.2s ease;
}

.pagehunter-lang-menu[open] .pagehunter-lang-menu__chevron {
	transform: rotate(180deg);
}

.pagehunter-lang-menu__list {
	position: absolute;
	inset-block-start: calc(100% + 0.5rem);
	inset-inline-end: 0;
	min-width: 10rem;
	margin: 0;
	padding: 0.35rem;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 0.8rem;
	background: #fff;
	box-shadow: 0 14px 32px rgba(26, 51, 18, 0.16);
	list-style: none;
}

.pagehunter-lang-menu__option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.65rem 0.75rem;
	border-radius: 0.55rem;
	color: #2d4f1e;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
}

a.pagehunter-lang-menu__option:hover,
a.pagehunter-lang-menu__option:focus-visible {
	background: rgba(216, 235, 168, 0.55);
	color: #1a3312;
}

.pagehunter-lang-menu__option.is-current {
	color: #475569;
	cursor: default;
}

.pagehunter-lang-menu__option svg {
	width: 1rem;
	height: 1rem;
	color: #2d4f1e;
}

.pagehunter-lang-menu [lang^="he"] {
	font-family: "Open Sans", system-ui, sans-serif;
}

.pagehunter-cta .wp-block-button__link {
	background: #a3d133 !important;
	color: #0a0a0a !important;
	border-radius: 0.75rem !important;
	font-weight: 600;
	box-shadow: 0 8px 20px rgba(163, 209, 51, 0.25);
}

.pagehunter-cta .wp-block-button__link:hover {
	filter: brightness(0.96);
}

.pagehunter-site-footer {
	margin-top: var(--wp--preset--spacing--80, 4rem);
	background: #1a3312;
	color: #edf2e6;
	padding: var(--wp--preset--spacing--70, 3rem) var(--wp--preset--spacing--50, 1.5rem);
}

.pagehunter-site-footer a {
	color: #d8eba8;
}

.pagehunter-site-footer a:hover {
	color: #fff;
}

.pagehunter-site-footer .wp-block-heading {
	color: #fff;
}

/* --------------------------------------------------------------------------
   Editorial intro + cards
   -------------------------------------------------------------------------- */
.pagehunter-blog-intro {
	position: relative;
	padding: var(--wp--preset--spacing--70, 3rem) 0 var(--wp--preset--spacing--50, 1.5rem);
}

.pagehunter-blog-intro::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: 1.5rem;
	bottom: 1.5rem;
	width: 4px;
	border-radius: 999px;
	background: linear-gradient(180deg, #a3d133, rgba(163, 209, 51, 0.15));
}

.pagehunter-blog-intro > * {
	padding-inline-start: 1.25rem;
}

.pagehunter-feature-card,
.pagehunter-post-card {
	position: relative;
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 1rem;
	overflow: hidden;
	box-shadow: 0 12px 32px rgba(26, 51, 18, 0.06);
	transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.pagehunter-feature-card:hover,
.pagehunter-post-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 16px 40px rgba(26, 51, 18, 0.1);
}

@media (prefers-reduced-motion: reduce) {
	.pagehunter-feature-card,
	.pagehunter-post-card {
		transition: none;
	}

	.pagehunter-feature-card:hover,
	.pagehunter-post-card:hover {
		transform: none;
	}
}

.pagehunter-post-card::before,
.pagehunter-feature-card::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: #a3d133;
}

.pagehunter-post-card .wp-block-post-featured-image,
.pagehunter-feature-card .wp-block-post-featured-image {
	aspect-ratio: 16 / 10;
	background: #edf2e6;
}

.pagehunter-post-card .wp-block-post-featured-image img,
.pagehunter-feature-card .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pagehunter-post-card .wp-block-post-title,
.pagehunter-feature-card .wp-block-post-title {
	margin-top: 0.75rem;
}

.pagehunter-meta {
	color: #475569;
	font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   Single article reading experience
   -------------------------------------------------------------------------- */
.pagehunter-article {
	position: relative;
}

.pagehunter-article::before {
	content: "";
	position: fixed;
	inset-inline-start: 0;
	top: 0;
	width: 3px;
	height: 100%;
	background: rgba(163, 209, 51, 0.2);
	z-index: 40;
	pointer-events: none;
}

@supports (animation-timeline: scroll()) {
	.pagehunter-article::after {
		content: "";
		position: fixed;
		inset-inline-start: 0;
		top: 0;
		width: 3px;
		height: 100%;
		transform-origin: top;
		background: #a3d133;
		z-index: 41;
		pointer-events: none;
		scale: 1 0;
		animation: pagehunter-read-progress linear;
		animation-timeline: scroll(root);
	}

	@keyframes pagehunter-read-progress {
		to {
			scale: 1 1;
		}
	}
}

@media (prefers-reduced-motion: reduce) {
	.pagehunter-article::after {
		animation: none !important;
		display: none;
	}
}

.pagehunter-article .wp-block-post-terms:first-child {
	display: inline-block;
	padding: 0.3rem 0.8rem;
	border-radius: 999px;
	background: rgba(163, 209, 51, 0.22);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.pagehunter-article h1.wp-block-post-title {
	margin-block: 1rem 0;
	font-size: clamp(2.25rem, 5vw, 3.25rem);
	line-height: 1.08;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.pagehunter-article h1.wp-block-post-title::after {
	content: "";
	display: block;
	width: 4.5rem;
	height: 6px;
	margin-top: 1.35rem;
	border-radius: 999px;
	background: linear-gradient(90deg, #a3d133, rgba(163, 209, 51, 0.12));
}

.lang-he .pagehunter-article h1.wp-block-post-title::after {
	background: linear-gradient(270deg, #a3d133, rgba(163, 209, 51, 0.12));
}

.pagehunter-article .wp-block-post-featured-image {
	aspect-ratio: 3 / 2;
	border-radius: 1rem;
	overflow: hidden;
	background: #edf2e6;
	margin-block: 1.5rem;
}

.pagehunter-article .wp-block-post-content {
	font-size: 1.0625rem;
	line-height: 1.75;
}

.pagehunter-article .wp-block-post-content > * + * {
	margin-top: 1.15rem;
}

.pagehunter-article .wp-block-post-content h2,
.pagehunter-article .wp-block-post-content h3 {
	margin-top: 2rem;
}

.pagehunter-article .wp-block-post-content img {
	border-radius: 0.75rem;
}

.pagehunter-article .wp-block-post-content table {
	width: 100%;
	border-collapse: collapse;
}

.pagehunter-article .wp-block-post-content th,
.pagehunter-article .wp-block-post-content td {
	border: 1px solid rgba(0, 0, 0, 0.08);
	padding: 0.65rem 0.75rem;
	text-align: start;
}

.pagehunter-article .wp-block-post-content .faq,
.pagehunter-article .wp-block-post-content details {
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 0.75rem;
	padding: 1rem 1.15rem;
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.pagehunter-empty-state {
	padding: 2.5rem 1.5rem;
	border-radius: 1rem;
	background: rgba(255, 255, 255, 0.8);
	border: 1px dashed rgba(45, 79, 30, 0.25);
	text-align: center;
}

.pagehunter-skip-link:focus {
	position: fixed;
	top: 0.5rem;
	inset-inline-start: 0.5rem;
	z-index: 100;
	padding: 0.75rem 1rem;
	background: #0a0a0a;
	color: #fff;
	border-radius: 0.5rem;
}
