/* KayoLife — global design tokens & base site chrome.
   Mirrors the Landing-Synthate design system so Elementor-built pages can
   reuse the same palette (set these as Elementor Global Colors/Fonts too). */

:root {
	--kl-blue: #2563EB;
	--kl-violet: #7C3AED;
	--kl-ink: #111827;
	--kl-body: #4B5563;
	--kl-muted: #6B7280;
	--kl-faint: #94A3B8;
	--kl-border: #EEF2F7;
	--kl-surface: #F8FAFC;
	--kl-green: #10B981;
	--kl-amber: #F59E0B;
	--kl-red: #EF4444;
	--kl-gradient: linear-gradient(135deg, var(--kl-blue), var(--kl-violet));
	--kl-font-display: 'Poppins', sans-serif;
	--kl-font-body: 'Inter', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
	font-family: var(--kl-font-body);
	color: var(--kl-ink);
	background: #fff;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--kl-blue); text-decoration: none; }
a:hover { color: var(--kl-violet); }

h1, h2, h3, h4, h5 { font-family: var(--kl-font-display); letter-spacing: -0.02em; }

img { max-width: 100%; height: auto; display: block; }

::selection { background: var(--kl-violet); color: #fff; }

/* ---- Standard site header (non-landing pages: Home, Category, Review) ---- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	backdrop-filter: saturate(180%) blur(14px);
	background: rgba(255, 255, 255, .4);
	border-bottom: 1px solid transparent;
	transition: background .3s, border-color .3s;
}
.site-header.is-scrolled { background: rgba(255, 255, 255, .85); border-bottom-color: var(--kl-border); }
.site-header__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
	height: 72px;
	display: flex;
	align-items: center;
	gap: 24px;
}
.site-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.site-logo__mark {
	width: 34px; height: 34px; border-radius: 10px;
	background: var(--kl-gradient);
	display: inline-flex; align-items: center; justify-content: center;
	color: #fff; font-family: var(--kl-font-display); font-weight: 800; font-size: 18px;
}
.site-logo__text { font-family: var(--kl-font-display); font-weight: 700; font-size: 20px; color: var(--kl-ink); }
.site-nav { display: flex; gap: 6px; margin-left: 8px; }
.site-nav__link { padding: 8px 14px; border-radius: 10px; color: #374151; font-weight: 500; font-size: 15px; transition: background .2s, color .2s; }
.site-nav__link:hover { background: #F1F5FF; color: var(--kl-blue); }
.site-nav__link.is-active { color: var(--kl-blue); background: #F1F5FF; font-weight: 600; }
.site-header__spacer { flex: 1; }
.site-search {
	display: flex; align-items: center; gap: 8px;
	background: var(--kl-surface); border: 1px solid #E5E9F0; border-radius: 12px;
	padding: 9px 14px; width: 220px; transition: border-color .2s;
}
.site-search:focus-within { border-color: var(--kl-blue); }
.site-search input { border: none; outline: none; background: transparent; font-family: var(--kl-font-body); font-size: 14px; color: var(--kl-ink); width: 100%; }
.site-header__cta {
	flex-shrink: 0; background: var(--kl-gradient); color: #fff; font-weight: 600; font-size: 15px;
	padding: 11px 20px; border-radius: 12px; box-shadow: 0 8px 20px -6px rgba(124, 58, 237, .5);
	transition: transform .2s, box-shadow .2s;
}
.site-header__cta:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 26px -6px rgba(124, 58, 237, .6); }
@media (max-width: 900px) {
	.site-nav, .site-search { display: none !important; }
}

/* ---- Standard site footer (non-landing pages) ---- */
.site-footer { background: var(--kl-ink); color: #9CA3AF; }
.site-footer__inner { max-width: 1200px; margin: 0 auto; padding: 64px 24px 32px; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.site-footer__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.site-footer__brand-text { font-family: var(--kl-font-display); font-weight: 700; font-size: 20px; color: #fff; }
.site-footer__blurb { font-size: 14px; line-height: 1.6; max-width: 300px; }
.site-footer__col-title { font-family: var(--kl-font-display); font-size: 14px; font-weight: 600; color: #fff; letter-spacing: .04em; margin-bottom: 16px; }
.site-footer__col-links { display: flex; flex-direction: column; gap: 11px; }
.site-footer__col-links a { font-size: 14px; color: #9CA3AF; transition: color .2s; }
.site-footer__col-links a:hover { color: #fff; }
.site-footer__bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid #1F2937; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.site-footer__bottom-links { display: flex; gap: 24px; }
.site-footer__bottom-links a { color: #9CA3AF; }
.site-footer__bottom-links a:hover { color: #fff; }
@media (max-width: 900px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* ---- Generic content pages / blog ---- */
.site-main__inner { max-width: 1120px; margin: 0 auto; padding: 56px 24px; }
.site-main__inner--narrow { max-width: 760px; }
.page-title { font-size: 36px; font-weight: 800; margin-bottom: 24px; }
.page-content { font-size: 17px; line-height: 1.7; color: var(--kl-body); }
.page-content > * + * { margin-top: 1em; }
.post-card { margin-bottom: 40px; }
.post-card__title { font-size: 24px; font-weight: 700; margin: 12px 0 8px; }
.post-card__thumb img { border-radius: 16px; }

/* ---- Reusable search form ---- */
.kayolife-searchform { display: flex; align-items: center; gap: 8px; background: var(--kl-surface); border: 1px solid #E5E9F0; border-radius: 14px; padding: 6px 6px 6px 16px; transition: border-color .2s, box-shadow .2s; max-width: 560px; }
.kayolife-searchform:focus-within { border-color: var(--kl-blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .1); }
.kayolife-searchform__icon { color: var(--kl-muted); flex-shrink: 0; }
.kayolife-searchform__input { flex: 1; border: none; outline: none; background: transparent; font-family: var(--kl-font-body); font-size: 15px; color: var(--kl-ink); min-width: 0; padding: 8px 0; }
.kayolife-searchform__submit { flex-shrink: 0; background: var(--kl-gradient); color: #fff; font-weight: 600; font-size: 14px; padding: 11px 22px; border: none; border-radius: 10px; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.kayolife-searchform__submit:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -6px rgba(124, 58, 237, .5); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

/* ---- Search results page ---- */
.search-hero { background: radial-gradient(1000px 420px at 20% -10%, #EEF2FF 0%, transparent 55%), radial-gradient(900px 420px at 90% 0%, #F3E8FF 0%, transparent 55%), #fff; border-bottom: 1px solid #F1F5F9; }
.search-hero__inner { max-width: 820px; margin: 0 auto; padding: 56px 24px 44px; }
.search-hero__eyebrow { font-weight: 600; font-size: 13px; letter-spacing: .08em; color: var(--kl-violet); }
.search-hero h1 { font-size: 40px; font-weight: 800; margin: 12px 0 8px; line-height: 1.1; word-break: break-word; }
.search-hero__count { font-size: 16px; color: var(--kl-muted); margin-bottom: 24px; }
.search-hero__form .kayolife-searchform { max-width: 100%; }

.search-body { max-width: 820px; margin: 0 auto; padding: 40px 24px 80px; }
.search-results { display: flex; flex-direction: column; gap: 18px; }
.search-card { display: flex; gap: 20px; background: #fff; border: 1px solid var(--kl-border); border-radius: 20px; padding: 22px; box-shadow: 0 2px 4px rgba(17, 24, 39, .03); transition: transform .25s, box-shadow .25s, border-color .25s; }
.search-card:hover { transform: translateY(-4px); box-shadow: 0 24px 44px -18px rgba(17, 24, 39, .18); border-color: #DBE4FF; }
.search-card__thumb { flex-shrink: 0; width: 120px; height: 90px; border-radius: 14px; overflow: hidden; background: var(--kl-surface); }
.search-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.search-card__body { min-width: 0; }
.search-card__type { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--kl-muted); }
.search-card__title { font-size: 20px; font-weight: 700; margin: 6px 0 8px; line-height: 1.3; }
.search-card__title a { color: var(--kl-ink); }
.search-card__title a:hover { color: var(--kl-blue); }
.search-card__excerpt { font-size: 15px; color: var(--kl-muted); line-height: 1.6; margin-bottom: 10px; }
.search-card__link { font-size: 14px; font-weight: 600; color: var(--kl-blue); }

.search-pagination { margin-top: 36px; }
.search-pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.search-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--kl-border); background: #fff; color: #374151; font-weight: 600; font-size: 14px; transition: background .2s, color .2s, border-color .2s; }
.search-pagination .page-numbers:hover { border-color: var(--kl-blue); color: var(--kl-blue); }
.search-pagination .page-numbers.current { background: var(--kl-gradient); color: #fff; border-color: transparent; }

.search-empty { text-align: center; max-width: 560px; margin: 0 auto; padding: 40px 0; }
.search-empty__icon { font-size: 44px; margin-bottom: 12px; }
.search-empty h2 { font-size: 28px; font-weight: 800; margin-bottom: 10px; word-break: break-word; }
.search-empty p { font-size: 16px; color: var(--kl-muted); line-height: 1.6; margin-bottom: 24px; }
.search-empty__form { display: flex; justify-content: center; margin-bottom: 28px; }
.search-empty__form .kayolife-searchform { width: 100%; }
.search-empty__cats { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.search-empty__cats a { background: #fff; border: 1px solid var(--kl-border); border-radius: 999px; padding: 9px 18px; font-size: 14px; font-weight: 600; color: #374151; transition: background .2s, color .2s, border-color .2s; }
.search-empty__cats a:hover { background: #F1F5FF; color: var(--kl-blue); border-color: #DBE4FF; }

@media (max-width: 560px) {
	.search-hero h1 { font-size: 30px; }
	.search-card { flex-direction: column; gap: 14px; }
	.search-card__thumb { width: 100%; height: 160px; }
	.kayolife-searchform { flex-wrap: wrap; }
}

/* ---- 404 error page ---- */
.error-404-page { display: flex; align-items: center; justify-content: center; min-height: 60vh; padding: 60px 24px; }
.error-404__inner { max-width: 480px; text-align: center; }
.error-404__code { display: block; font-family: var(--kl-font-display); font-weight: 800; font-size: 72px; line-height: 1; background: var(--kl-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 8px; }
.error-404-page h1 { font-size: 26px; font-weight: 800; margin-bottom: 12px; }
.error-404-page p { font-size: 15.5px; color: var(--kl-body); line-height: 1.6; margin-bottom: 28px; }
.error-404__search { display: flex; justify-content: center; margin-bottom: 28px; }
.error-404__search .kayolife-searchform { width: 100%; }
.error-404__links { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.error-404__links a { background: #fff; border: 1px solid var(--kl-border); border-radius: 999px; padding: 9px 18px; font-size: 14px; font-weight: 600; color: #374151; transition: background .2s, color .2s, border-color .2s; }
.error-404__links a:hover { background: #F1F5FF; color: var(--kl-blue); border-color: #DBE4FF; }

/* ---- Full Width template: no content constraint, Elementor spans edge to edge ---- */
.kayolife-full-width { width: 100%; overflow-x: hidden; }

/* ---- Ad slots (inc/ad-slots.php) ----
   Reserved space up front so a slot loading in doesn't shift surrounding
   layout (CLS) — sized to the standard IAB unit each placement is meant
   for. assets/js/ad-lazy.js clones the <template> payload in once the slot
   nears the viewport; .is-loaded relaxes the fixed height back to auto. */
.kayolife-ad-slot {
	display: flex; align-items: center; justify-content: center;
	background: var(--kl-surface); border: 1px dashed var(--kl-border); border-radius: 12px;
	margin: 0 auto; overflow: hidden;
}
.kayolife-ad-slot.is-loaded { border-style: solid; background: transparent; min-height: 0; }
.kayolife-ad-slot__label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--kl-muted); }
.kayolife-ad-slot--header, .kayolife-ad-slot--in_content { width: 100%; max-width: 728px; min-height: 90px; }
.kayolife-ad-slot--sidebar { width: 100%; min-height: 250px; }
