/* Cycle staff (and similar post-type grid) cards through the muted-rainbow palette:
   name color and that card's Book Now button share the same hue. */
.post-type-archive .wp-block-post-template > li:nth-child(6n+1) { --beehive-card-color: var(--wp--preset--color--primary); }
.post-type-archive .wp-block-post-template > li:nth-child(6n+2) { --beehive-card-color: var(--wp--preset--color--accent-coral); }
.post-type-archive .wp-block-post-template > li:nth-child(6n+3) { --beehive-card-color: var(--wp--preset--color--accent-gold); }
.post-type-archive .wp-block-post-template > li:nth-child(6n+4) { --beehive-card-color: var(--wp--preset--color--accent-sage); }
.post-type-archive .wp-block-post-template > li:nth-child(6n+5) { --beehive-card-color: var(--wp--preset--color--accent-blue); }
.post-type-archive .wp-block-post-template > li:nth-child(6n) { --beehive-card-color: var(--wp--preset--color--accent-lavender); }

.post-type-archive .wp-block-post-template > li .wp-block-post-title,
.post-type-archive .wp-block-post-template > li .wp-block-post-title a {
	color: var(--beehive-card-color) !important;
}

.post-type-archive .wp-block-post-template > li .wp-block-button__link {
	background-color: var(--beehive-card-color) !important;
}

.post-type-archive .wp-block-post-template > li .wp-block-button__link:hover {
	background-color: color-mix(in srgb, var(--beehive-card-color) 85%, black) !important;
}

/* Staff (and similar post-type grid) cards: stretch each card to the row's full
   height and pin the Book Now button to the bottom, so buttons line up across a
   row no matter how long each person's bio copy runs. */
.post-type-archive .wp-block-post-template > li.wp-block-post {
	height: 100%;
}
.post-type-archive .wp-block-post-template > li.wp-block-post > .wp-block-group {
	display: flex;
	flex-direction: column;
	height: 100%;
}
.post-type-archive .wp-block-post-template > li .wp-block-post-featured-image {
	margin-left: auto;
	margin-right: auto;
}
.post-type-archive .wp-block-post-template > li .wp-block-buttons {
	margin-top: auto;
	padding-top: 1rem;
}

/* Products archive: crop every product image to the same size/ratio
   regardless of the source image's own dimensions (logos vs. product photos). */
.post-type-archive-product .wp-block-post-template > li .beehive-product-image {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	margin-left: 0;
	margin-right: 0;
}
.post-type-archive-product .wp-block-post-template > li .beehive-product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* The excerpt has no link of its own by default, so it's wrapped in one
   (see beehive_product_card_link()) -- reset it to look like plain text. */
.post-type-archive-product .wp-block-post-template > li .beehive-product-card-link {
	display: block;
	color: inherit;
	text-decoration: none;
}

/* Team page: same treatment for the stylist bio excerpt (see
   beehive_staff_excerpt_link()) -- looks like plain text, but is clickable
   like the photo and name above it. */
.post-type-archive-staff .wp-block-post-template > li .beehive-staff-excerpt-link {
	display: block;
	color: inherit;
	text-decoration: none;
	cursor: pointer;
}

/* Root-level block spacing (.wp-site-blocks > *) inserts a top margin before the
   footer template part regardless of the last section's own margin. Zero it so the
   homepage's last section sits flush against the footer. */
.wp-site-blocks > footer.wp-block-template-part {
	margin-block-start: 0 !important;
}

/* The site-wide link hover color is "contrast" (dark), meant for pages with a
   light background -- but the footer's own background IS contrast, so a
   hovered footer link nearly disappears. Keep footer links on hover the same
   cream as the rest of the footer's copy instead. */
footer.wp-block-template-part a:hover {
	color: var(--wp--preset--color--base) !important;
}

/* Footer's top row (address / nav / social / Book Now) needs to span the full
   width of the footer's own padded content box so justify-content:space-between
   actually spreads its items edge to edge, matching the header's alignment. */
.beehive-footer-row {
	width: 100%;
}

/* "Meet the Team" outline button: reverse colors on hover */
.beehive-meet-team-btn .wp-block-button__link {
	transition: background-color 0.2s ease, color 0.2s ease;
}
.beehive-meet-team-btn .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--contrast) !important;
	color: var(--wp--preset--color--base) !important;
}

/* Equality section photo: this is the full, uncropped carousel shot (the
   carousel used to show a square crop of just the lit storefront window as
   its own separate slide -- that crop is now redundant since the whole shot
   lives here instead). The gradient tints the outer ~20% on each edge into
   the section's own background color, leaving a "spotlight" band roughly
   matching where the old crop was (approx. 20%-78% of the width) fully
   bright, so the same interesting part of the photo still reads first. */
.beehive-equality-photo {
	position: relative;
	overflow: hidden;
}
.beehive-equality-photo img {
	display: block;
	width: 100%;
	height: auto;
}
.beehive-equality-photo::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to right,
		var(--wp--preset--color--contrast) 0%,
		var(--wp--preset--color--contrast) 12%,
		transparent 26%,
		transparent 74%,
		var(--wp--preset--color--contrast) 88%,
		var(--wp--preset--color--contrast) 100%
	);
	opacity: 0.5;
	pointer-events: none;
	border-radius: inherit;
}

/* Policies list: more breathing room between items */
.beehive-spaced-list li {
	margin-bottom: 1.1em;
}
.beehive-spaced-list li:last-child {
	margin-bottom: 0;
}

/* "Check out {Stylist}'s Gallery" link on single staff pages: sits between
   the bio copy and the Book Now button. */
.beehive-staff-gallery-link {
	margin-top: 0;
	margin-bottom: 1.5rem;
}
.beehive-staff-gallery-link a {
	font-weight: 600;
}
.post-type-archive .wp-block-post-template .beehive-staff-gallery-link {
	text-align: center;
}

/* Home page "From the Blog" teaser grid */
.beehive-home-blog-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
}
.beehive-home-blog-card__image {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: 12px;
	margin-bottom: 1rem;
}
.beehive-home-blog-card__image img {
	/* 101%, not 100%: at 100% a sub-pixel rounding gap between the image and
	   its rounded-corner container left a hairline of the page background
	   showing through on one edge. */
	width: 101%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.beehive-home-blog-card__title {
	margin: 0 0 0.5rem;
	font-size: var(--wp--preset--font-size--medium);
}
.beehive-home-blog-card__title a {
	color: var(--wp--preset--color--base);
	text-decoration: none;
}
.beehive-home-blog-card__excerpt {
	color: var(--wp--preset--color--base);
	opacity: 0.8;
}
@media (max-width: 782px) {
	.beehive-home-blog-grid {
		grid-template-columns: 1fr;
	}
}

/* "See All Posts" button on the dark "From the Blog" section: light outline
   by default, inverts to a solid light pill on hover (mirrors
   .beehive-meet-team-btn's invert pattern, but flipped for a dark background). */
.beehive-blog-see-all-btn .wp-block-button__link {
	border-color: var(--wp--preset--color--base) !important;
	color: var(--wp--preset--color--base) !important;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.beehive-blog-see-all-btn .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--base) !important;
	color: var(--wp--preset--color--contrast) !important;
}

/* Gallery filter bar + grid */
.beehive-gallery-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
	margin-bottom: 2rem;
}
.beehive-gallery-filter label {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
}
.beehive-gallery-filter select {
	font-family: inherit;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 400;
	padding: 0.5rem 1rem;
	border-radius: 999px;
	border: 1px solid var(--wp--preset--color--contrast);
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	min-width: 180px;
}
.beehive-gallery-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
}
.beehive-gallery-grid__item {
	position: relative;
	margin: 0;
	cursor: pointer;
}
.beehive-gallery-grid__image-container {
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 8px;
}
.beehive-gallery-grid__image-container img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.beehive-gallery-grid__image-container img.after {
	z-index: 1;
}
.beehive-gallery-grid__image-container img.alternate {
	z-index: 2;
	opacity: 0;
	transition: opacity 0.2s ease;
}
/* Hovering (or tapping, via .is-active) ANYWHERE on the tile does both things
   at once: crossfades to the alternate photo (if there is one) and reveals
   the tag/stylist chips. Using one shared trigger for both, instead of the
   image needing a separate mouse-position zone, is what fixed the "tags
   show but the photo doesn't" inconsistency. */
.beehive-gallery-grid__item:hover .beehive-gallery-grid__image-container img.alternate,
.beehive-gallery-grid__item:focus-within .beehive-gallery-grid__image-container img.alternate,
.beehive-gallery-grid__item.is-active .beehive-gallery-grid__image-container img.alternate {
	opacity: 1;
}
.beehive-gallery-grid__tags {
	position: absolute;
	inset: auto 0 0 0;
	margin: 0;
	padding: 0.5rem;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	align-content: flex-end;
	gap: 0.3rem;
	max-height: 100%;
	overflow: hidden;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.55) 60%, transparent 100%);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease;
	z-index: 3;
	border-radius: 8px;
}
.beehive-gallery-grid__item:hover .beehive-gallery-grid__tags,
.beehive-gallery-grid__item:focus-within .beehive-gallery-grid__tags,
.beehive-gallery-grid__item.is-active .beehive-gallery-grid__tags {
	opacity: 1;
}
.beehive-gallery-grid__tags li {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	border-radius: 4px;
	padding: 3px 9px;
	font-size: 11px;
	line-height: 1.4;
	font-weight: 700;
	text-transform: uppercase;
	white-space: nowrap;
}
/* Stylist chip stands apart from the plain style/cut tags next to it. */
.beehive-gallery-grid__tags li.beehive-gallery-grid__tags-stylist {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}
/* Hide/show-tags toggle: appears alongside the tag overlay on hover/tap so a
   visitor can dismiss the tag chips without affecting the alternate-photo
   crossfade. The hidden state is a per-photo preference, not a hover state,
   so it stays hidden across future hovers of the same tile until toggled
   back -- that's why it needs its own class instead of just riding :hover. */
.beehive-gallery-grid__tags-toggle {
	position: absolute;
	inset: 0.4rem 0.4rem auto auto;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	padding: 3px 8px;
	border: none;
	border-radius: 999px;
	background-color: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	line-height: 1.4;
	cursor: pointer;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease;
}
.beehive-gallery-grid__item:hover .beehive-gallery-grid__tags-toggle,
.beehive-gallery-grid__item:focus-within .beehive-gallery-grid__tags-toggle,
.beehive-gallery-grid__item.is-active .beehive-gallery-grid__tags-toggle {
	opacity: 1;
	pointer-events: auto;
}
.beehive-gallery-grid__tags-toggle-icon--hidden,
.beehive-gallery-grid__tags-toggle-text--show {
	display: none;
}
.beehive-gallery-grid__item.tags-hidden .beehive-gallery-grid__tags-toggle-icon--visible,
.beehive-gallery-grid__item.tags-hidden .beehive-gallery-grid__tags-toggle-text--hide {
	display: none;
}
.beehive-gallery-grid__item.tags-hidden .beehive-gallery-grid__tags-toggle-icon--hidden,
.beehive-gallery-grid__item.tags-hidden .beehive-gallery-grid__tags-toggle-text--show {
	display: inline-flex;
}
.beehive-gallery-grid__item.tags-hidden .beehive-gallery-grid__tags {
	opacity: 0 !important;
	pointer-events: none !important;
}
@media (max-width: 900px) {
	.beehive-gallery-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}
@media (max-width: 600px) {
	.beehive-gallery-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Menu pricing cards: keep all three columns the same size (height) even when
   one has fewer items than the others, but only once they're side by side. */
@media (min-width: 782px) {
	.beehive-pricing-card {
		height: 100%;
	}
}

/* Footer social icons: small chips with a shared neutral background. Plain
   markup (not the core Social Links block) so there's real, valid content
   for the editor to display -- a hand-typed self-closing social-link block
   has no actual rendered markup, which is what triggered Gutenberg's
   "block contains unexpected or invalid content" warning here. */
.beehive-footer-social {
	display: flex;
	justify-content: flex-end;
	gap: 0.5rem;
	list-style: none;
	margin: 0 0 0.75rem;
	padding: 0;
}
.beehive-footer-social .wp-social-link {
	border-radius: 999px;
	transition: transform 0.15s ease, background-color 0.15s ease;
}
.beehive-footer-social .wp-social-link a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	color: var(--wp--preset--color--base);
}
.beehive-footer-social .beehive-social-1,
.beehive-footer-social .beehive-social-2,
.beehive-footer-social .beehive-social-3 {
	background-color: #53504f;
}
.beehive-footer-social .wp-social-link:hover {
	transform: translateY(-2px);
}
.beehive-footer-social .beehive-social-1:hover,
.beehive-footer-social .beehive-social-2:hover,
.beehive-footer-social .beehive-social-3:hover {
	background-color: color-mix(in srgb, #53504f 85%, black);
}
