/*
Theme Name: Achieve Ease Blocks
Author: Achieve Ease
Description: A native Gutenberg block theme for the Achieve Ease website.
Version: 1.7.3
Requires at least: 6.4
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: achieve-ease-blocks
Tags: block-patterns, full-site-editing, blog, custom-colors, custom-menu
*/

:root {
	--ae-shadow: 0 20px 50px -24px rgba(48, 54, 48, .28);
}

/* Keep supporting subheadings readable even when older Site Editor styles remain cached. */
.has-muted-foreground-color {
	color: #655d56 !important;
}

html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
a { text-underline-offset: .18em; }

.ae-pill {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	padding: .45rem 1rem;
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: .02em;
}

.ae-button .wp-block-button__link {
	transition: transform .18s ease, filter .18s ease;
}
.ae-button .wp-block-button__link:hover {
	filter: brightness(1.05);
	transform: translateY(-2px);
}

.ae-card {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 1.5rem;
	overflow: hidden;
	box-shadow: var(--ae-shadow);
}

.ae-marquee-leaf {
	display: inline-block;
	width: 1rem;
	height: 1rem;
	margin: 0 1rem;
	vertical-align: -.16em;
	background-color: var(--wp--preset--color--sage);
	-webkit-mask: url("assets/images/leaf.svg") center / contain no-repeat;
	mask: url("assets/images/leaf.svg") center / contain no-repeat;
}

.ae-card .wp-block-post-featured-image img,
.ae-image-grid img {
	transition: transform .7s ease;
}
.ae-card:hover .wp-block-post-featured-image img,
.ae-image-grid figure:hover img {
	transform: scale(1.035);
}

.ae-image-grid figure {
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 1.5rem;
	box-shadow: var(--ae-shadow);
}

.ae-image-grid img {
	width: 100%;
	height: 100%;
	min-height: 210px;
	object-fit: cover;
}

.ae-soft-panel {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 1.5rem;
}

.ae-village-grid {
	display: grid !important;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 1rem;
}

.ae-village-grid > * {
	margin-block-start: 0 !important;
}

.ae-village-card {
	box-sizing: border-box;
	height: 100%;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 1rem;
	background: var(--wp--preset--color--card);
	box-shadow: none;
	transition: transform .25s ease, box-shadow .25s ease;
}

.ae-village-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 30px -12px rgba(65, 55, 48, .18);
}

.ae-village-card h3 a {
	text-decoration: none;
}

.ae-village-card h3 a:hover {
	color: var(--wp--preset--color--sage);
}

.ae-village-icon {
	display: flex;
	width: 44px;
	height: 44px;
	margin: 0;
	align-items: center;
	justify-content: center;
	border-radius: .75rem;
	background: var(--wp--preset--color--sage-soft);
	color: var(--wp--preset--color--sage);
	font-size: 1.1rem;
	line-height: 1;
}

.ae-village-icon--terracotta {
	background: var(--wp--preset--color--terracotta-soft);
	color: var(--wp--preset--color--terracotta);
}

.ae-village-icon--neutral {
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--secondary-foreground);
}

.ae-village-art {
	margin: 0;
}

.ae-village-art img {
	display: block;
	width: 96px;
	height: 96px;
	border-radius: 999px;
	object-fit: cover;
}

.ae-quote-panel {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 1.5rem;
	text-align: center;
}

.ae-quote-mark {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: 4rem;
	line-height: .6;
}

.ae-support-grid {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.25rem;
}

.ae-support-card {
	height: 100%;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 1rem;
	box-sizing: border-box;
}

.ae-support-icon {
	margin: 0 0 .75rem;
	color: var(--wp--preset--color--terracotta);
	font-size: 1.35rem;
	line-height: 1;
}

.ae-kicker {
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .2em;
	text-transform: uppercase;
}

.ae-marquee {
	overflow: hidden;
	white-space: nowrap;
}
.ae-marquee p {
	animation: ae-marquee 24s linear infinite;
	width: max-content;
}
@keyframes ae-marquee {
	to { transform: translateX(-33.333333%); }
}

.ae-newsletter input[type="email"] {
	box-sizing: border-box;
	width: 100%;
	border: 1px solid rgba(255,255,255,.35);
	border-radius: 999px;
	background: rgba(255,255,255,.14);
	color: #fff;
	padding: .9rem 1.2rem;
}
.ae-newsletter input::placeholder { color: rgba(255,255,255,.7); }

.ae-topic-hero {
	position: relative;
	overflow: hidden;
}
.ae-topic-hero::after {
	content: "";
	position: absolute;
	width: 24rem;
	height: 24rem;
	right: -8rem;
	top: -10rem;
	border-radius: 50%;
	background: var(--wp--preset--color--sage);
	filter: blur(55px);
	opacity: .18;
	pointer-events: none;
}

.wp-block-navigation .wp-block-navigation-item__content {
	text-decoration: none;
}

/* Original Achieve Ease header */
.ae-site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid transparent;
	background: rgba(250, 248, 245, .95);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	transition: box-shadow .25s ease, border-color .25s ease;
}

body.admin-bar .ae-site-header { top: 32px; }

.ae-site-header__inner {
	box-sizing: border-box;
	min-height: 68px;
}

.ae-brand {
	position: relative;
	box-sizing: border-box;
	flex: 0 0 auto;
	min-width: 154px;
	margin: 0;
	padding: 5px 0 4px 47px;
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.05;
	letter-spacing: -.02em;
}

.ae-brand::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 36px;
	height: 36px;
	border-radius: 999px;
	background: var(--wp--preset--color--sage) url("assets/images/leaf.svg") center / 18px 18px no-repeat;
	transform: translateY(-50%);
	transition: transform .3s ease;
}

.ae-brand:hover::before {
	transform: translateY(-50%) rotate(-12deg);
}

.ae-brand::after {
	content: "YOUR VILLAGE";
	display: block;
	margin-top: 5px;
	font-family: var(--wp--preset--font-family--body);
	font-size: 10px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: .2em;
	color: var(--wp--preset--color--muted-foreground);
}

.ae-brand a {
	color: var(--wp--preset--color--foreground);
	text-decoration: none;
}

.ae-primary-nav {
	margin-left: auto;
}

.ae-primary-nav .wp-block-navigation-item__content {
	border-radius: 999px;
	padding: .5rem .75rem;
	color: var(--wp--preset--color--muted-foreground);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	white-space: nowrap;
	transition: color .18s ease, background-color .18s ease;
}

.ae-primary-nav .wp-block-navigation-item__content:hover,
.ae-primary-nav .current-menu-item > .wp-block-navigation-item__content {
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--foreground);
}

.ae-primary-nav .wp-block-navigation__responsive-container-open,
.ae-primary-nav .wp-block-navigation__responsive-container-close {
	box-sizing: border-box;
	width: 40px;
	height: 40px;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
}

.ae-primary-nav .wp-block-navigation__responsive-container-open:hover,
.ae-primary-nav .wp-block-navigation__responsive-container-close:hover {
	background: var(--wp--preset--color--secondary);
}

.ae-primary-nav .wp-block-navigation__responsive-container.is-menu-open {
	box-sizing: border-box;
	padding: 1.25rem;
	background: var(--wp--preset--color--background);
	color: var(--wp--preset--color--foreground);
}

.ae-primary-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	width: 100%;
	align-items: stretch;
	gap: .25rem;
}

.ae-primary-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: .8rem 1rem;
	font-size: 1rem;
}

@media (max-width: 1279px) {
	.ae-village-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ae-primary-nav .wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: none !important;
	}
	.ae-primary-nav .wp-block-navigation__responsive-container-open {
		display: flex !important;
	}
}

@media (min-width: 1280px) {
	.ae-primary-nav .wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: block !important;
		position: static;
		width: auto;
		height: auto;
		background: transparent;
	}
	.ae-primary-nav .wp-block-navigation__responsive-container-open {
		display: none !important;
	}
}

@media (max-width: 781px) {
	.ae-image-grid img { min-height: 170px; }
	.ae-desktop-only { display: none !important; }
	.ae-village-grid { grid-template-columns: 1fr; }
	.ae-support-grid { grid-template-columns: 1fr; }
}

@media (max-width: 782px) {
	body.admin-bar .ae-site-header { top: 46px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.ae-marquee p { animation: none; }
	.ae-card img, .ae-image-grid img, .ae-button .wp-block-button__link {
		transition: none;
	}
}

/* Achieve Ease: automatic category colors for single blog posts */
body.single-post {
  --ae-post-tint: #f6f3ee;
  --ae-post-accent: #7a8f77;
  --ae-post-text: #353535;
}

/* Category → color system. The :has() selectors support this block theme,
   while the body-class selectors preserve compatibility with future templates. */
body.single-post.category-the-parenthood-diary,
body.single-post:has(.taxonomy-category a[href*="/category/the-parenthood-diary/"]) {
  --ae-post-tint: #f6e6df;
  --ae-post-accent: #bc7758;
}

body.single-post.category-family-food,
body.single-post:has(.taxonomy-category a[href*="/category/family-food/"]) {
  --ae-post-tint: #e9eee6;
  --ae-post-accent: #7a8f77;
}

body.single-post.category-everyday-ease,
body.single-post:has(.taxonomy-category a[href*="/category/everyday-ease/"]) {
  --ae-post-tint: #e7eef1;
  --ae-post-accent: #8ea6b3;
}

body.single-post.category-things-we-love,
body.single-post:has(.taxonomy-category a[href*="/category/things-we-love/"]) {
  --ae-post-tint: #f2e5e2;
  --ae-post-accent: #c89a90;
}

body.single-post.category-start-here,
body.single-post:has(.taxonomy-category a[href*="/category/start-here/"]) {
  --ae-post-tint: #f6f3ee;
  --ae-post-accent: #7a8f77;
}

/* The post shell carries the category color. */
body.single-post main {
  background: var(--ae-post-tint);
  color: var(--ae-post-text);
}

/* Keep long-form reading on a calm, neutral surface. */
body.single-post .wp-block-post-content {
  background: #fffdf9;
  border-radius: 24px;
  box-sizing: border-box;
  margin-block: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(1.25rem, 4vw, 3.5rem);
}

/* Carry the category accent into navigation and editorial details. */
body.single-post .taxonomy-category a,
body.single-post .wp-block-post-terms a,
body.single-post .wp-block-post-content a {
  color: var(--ae-post-accent);
}

body.single-post .wp-block-post-content blockquote,
body.single-post .wp-block-quote {
  background: var(--ae-post-tint);
  border-left: 4px solid var(--ae-post-accent);
  border-radius: 0 16px 16px 0;
  margin-inline: 0;
  padding: 1.25rem 1.5rem;
}

body.single-post .wp-block-separator {
  border-color: var(--ae-post-accent);
  color: var(--ae-post-accent);
  opacity: .45;
}

body.single-post ::selection {
  background: var(--ae-post-tint);
  color: var(--ae-post-text);
}

@media (max-width: 600px) {
  body.single-post .wp-block-post-content {
    border-radius: 16px;
    margin-block: 1rem;
    padding: 1.25rem;
  }
}


/* Keep Latest from the Village cards equal in height. */
.ae-latest-village .wp-block-post {
  display: flex;
}

.ae-latest-village .ae-card {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.ae-latest-village .wp-block-post-excerpt {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.ae-latest-village .wp-block-post-excerpt__more-text {
  margin-top: auto;
}


/* Keep Parenthood Diary feed cards equal in height. */
.ae-diary-only .wp-block-post {
  display: flex;
}

.ae-diary-only .ae-card {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.ae-diary-only .wp-block-post-excerpt {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.ae-diary-only .wp-block-post-excerpt__more-text {
  margin-top: auto;
}
