/*
Theme Name: UHPH
Theme URI: https://uhphllc.com
Author: UHPH LLC
Description: Custom full-site-editing block theme for UHPH LLC, built with native WordPress Gutenberg blocks so content can be edited entirely from the block editor — no code required.
Version: 1.72.0
Requires at least: 6.5
Requires PHP: 8.2.29
Tested up to: 7.0.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: uhph
*/

/* Reset the browser's default body margin (~8px in most browsers) — this
   was never explicitly zeroed out, which was pushing all page content,
   including the header, away from the edge of the viewport. */
html {
	margin: 0;
}
body {
	margin: 0;
	padding: 0;
}

/* Hero/page-title Cover blocks: pin content to the top instead of the
   Cover block's default vertical centering. Without this, a tall
   min-height (needed for the hero photo) pushes the header+copy down
   into the middle of the box, creating a large gap above the header. */
.wp-block-cover.is-position-top-center {
	align-items: flex-start !important;
}
.wp-block-cover.is-position-top-center .wp-block-cover__inner-container {
	align-self: flex-start;
	width: 100%;
}

.uhph-nav-wrap {
	display: flex !important;
	align-items: center !important;
}

/* Menu layout (display:flex, list-style, etc.) is now set with INLINE
   styles directly in the markup by uhph_render_menu_level() in
   functions.php — not dependent on this stylesheet at all. What's left
   here is only what genuinely requires CSS: hover colors and the
   Products dropdown's show-on-hover behavior. */
.uhph-menu-link:hover {
	color: #8fd15a !important;
}
.uhph-menu > .menu-item.current-menu-item > .uhph-menu-link {
	color: #ffffff !important;
}
.sub-menu .menu-item.current-menu-item > .uhph-menu-link {
	color: #4d8c1f !important;
	font-weight: 700 !important;
}

.sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 12px 28px rgba(0,0,0,0.18);
	padding: 10px 0;
	margin: 0;
	min-width: 210px;
	z-index: 100;
	list-style: none;
}
.menu-item-has-children:hover > .sub-menu,
.menu-item-has-children:focus-within > .sub-menu {
	display: flex;
	flex-direction: column;
}
.sub-menu .menu-item {
	width: 100%;
}
.sub-menu .uhph-menu-link:hover {
	background: #f2efe6;
	color: #4d8c1f !important;
}

/* Footer menu: open dropdown upward since it's at the bottom of the page */
footer .sub-menu {
	top: auto;
	bottom: 100%;
}

@media (max-width: 700px) {
	.uhph-grid-wrap > .wp-block-column {
		flex: 0 0 calc((100% - 28px) / 2) !important;
		width: calc((100% - 28px) / 2) !important;
		max-width: calc((100% - 28px) / 2) !important;
	}
}
@media (max-width: 900px) {
	.uhph-menu {
		gap: 14px;
	}
}
@media (max-width: 480px) {
	.uhph-grid-wrap > .wp-block-column {
		flex: 0 0 100% !important;
		width: 100% !important;
		max-width: 100% !important;
	}
}

/* Brand / feature cards */
.uhph-card {
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.uhph-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 32px rgba(15,41,21,0.12);
}
.uhph-card a {
	text-decoration: none;
}
/* Force equal-height columns/cards — scoped to card grids only, so it
   doesn't fight the intentional vertical-centering on asymmetric
   layouts like the Featured Product or CTA banner rows. */
.uhph-grid.wp-block-columns {
	align-items: stretch !important;
}
.uhph-grid > .wp-block-column {
	display: flex !important;
	flex-direction: column !important;
}
/* Opt-in wrapping for grids with a variable/larger item count (e.g. the
   "Explore More" section, which can show anywhere from a few up to all
   other products) — kept separate from the base .uhph-grid class above,
   since sections with a fixed, deliberate column count (the homepage's
   4-across product rows, the 2-up Zyme family) must NOT be forced into
   3-per-row wrapping too. */
.uhph-grid-wrap.wp-block-columns {
	flex-wrap: wrap !important;
	row-gap: 28px;
}
.uhph-grid-wrap > .wp-block-column {
	flex: 0 0 calc((100% - 84px) / 4) !important;
	width: calc((100% - 84px) / 4) !important;
	max-width: calc((100% - 84px) / 4) !important;
}
.uhph-grid > .wp-block-column > .wp-block-group {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	height: 100%;
	box-sizing: border-box;
	width: 100%;
}
.uhph-grid > .wp-block-column > .wp-block-group > *:last-child {
	margin-top: auto;
}

/* Team photos: guaranteed perfect circles regardless of source image
   aspect ratio. className lives on the <figure> (how a real, editable
   Image block works — WordPress doesn't let className target the <img>
   directly), so we style the nested img via a descendant selector. */
.uhph-team-photo {
	width: 190px !important;
	margin: 0 auto 32px !important;
}
.uhph-team-photo img {
	width: 190px;
	height: 190px;
	object-fit: cover !important;
	border-radius: 9999px !important;
	display: block;
}
.uhph-zyme-logo img {
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 90px;
	display: block;
	margin: 0 auto;
}

/* Team bio flip cards: click-to-flip, pure CSS transform driven by the
   .is-flipped class (toggled by a tiny theme-enqueued script — see
   uhph_enqueue_flip_card_script()). Card size and text are all normal,
   editable WordPress blocks; only the flip mechanics are custom. */
.uhph-flip-card {
	width: 380px !important;
	perspective: 1400px;
	cursor: pointer;
	user-select: none;
}
.uhph-flip-inner {
	position: relative !important;
	min-height: 560px;
	transition: transform 0.6s;
	transform-style: preserve-3d;
}
.uhph-flip-card.is-flipped .uhph-flip-inner {
	transform: rotateY(180deg);
}
.uhph-flip-front,
.uhph-flip-back {
	position: absolute !important;
	inset: 0;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	border-radius: 8px;
	padding: 40px 28px !important;
	box-shadow: 0 10px 26px rgba(15, 41, 21, 0.14);
	display: flex !important;
	flex-direction: column !important;
}
.uhph-flip-back {
	transform: rotateY(180deg);
	overflow-y: auto;
}
.uhph-flip-front {
	justify-content: center !important;
	/* Extra bottom padding nudges the photo/name/title block slightly above
	   true center (shifts up by half the difference, ~30px). */
	padding-bottom: 100px !important;
}
.uhph-flip-back .uhph-flip-hint {
	margin-top: auto !important;
	padding-top: 18px;
	opacity: 0.8;
}
.uhph-flip-front .uhph-flip-hint {
	/* Pinned to the bottom so the photo + name + title block above it
	   stays truly vertically centered in the card. */
	position: absolute !important;
	left: 0;
	right: 0;
	bottom: 18px;
	margin: 0 !important;
	opacity: 0.8;
}
.uhph-flip-list {
	text-align: left;
	padding-left: 18px !important;
}
.uhph-flip-list li {
	margin-bottom: 8px;
}
@media (max-width: 480px) {
	.uhph-flip-card {
		width: 100% !important;
		max-width: 340px;
	}
}

/* Spacing that couldn't be expressed as valid block attributes (button
   wrapper spacing and card title margin aren't supported style paths for
   their respective blocks) — added via className instead, per real block
   markup, and styled here. */
.uhph-btn-gap {
	margin-right: 24px !important;
}
.uhph-btn-gap-lg {
	margin-right: 28px !important;
}
.uhph-card-title {
	margin-top: 14px;
}
.uhph-product-photo-col img {
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 460px;
	display: block;
	margin: 0 auto;
}

/* Turf Max sub-product benefits row: consistent spacing between the 5
   checkmark items, sized to their own content rather than forced into
   equal-width columns (which made short items like "SPF 50" look lost
   in a wide column while long items looked cramped). */
.uhph-benefits-row {
	row-gap: 14px !important;
}
.uhph-benefit-item {
	margin-left: 14px !important;
	margin-right: 14px !important;
}

/* Turf Max variants section: badges float on the navy background with a
   soft drop shadow instead of sitting in a generic white card, so they
   read as siblings of the same brand rather than separate products. */
.uhph-turfmax-grid {
	flex-wrap: wrap !important;
	row-gap: 40px;
}
.uhph-turfmax-grid > .wp-block-column {
	padding-left: 16px !important;
	padding-right: 16px !important;
	flex-basis: 33.333% !important;
	max-width: 33.333% !important;
	box-sizing: border-box;
}
@media (max-width: 900px) {
	.uhph-turfmax-grid > .wp-block-column {
		flex-basis: 50% !important;
		max-width: 50% !important;
	}
}
@media (max-width: 600px) {
	.uhph-turfmax-grid > .wp-block-column {
		flex-basis: 100% !important;
		max-width: 100% !important;
	}
}
.uhph-turfmax-coming-soon {
	position: relative;
}
.uhph-turfmax-coming-soon-ribbon {
	display: inline-block;
	margin-top: 12px;
	padding: 4px 14px;
	background: #c0242b;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	border-radius: 3px;
}
.uhph-turfmax-masthead img {
	width: 100%;
	max-width: 340px;
	height: auto;
}
.uhph-turfmax-badge {
	height: 260px !important;
	min-height: 260px !important;
	max-height: 260px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	overflow: visible !important;
	margin: 0 auto !important;
}
.uhph-turfmax-badge img {
	width: auto !important;
	max-width: 100% !important;
	height: 260px !important;
	object-fit: contain !important;
	filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45));
	transition: transform 0.2s ease;
}
.uhph-turfmax-badge img:hover {
	transform: translateY(-4px);
}
.uhph-turfmax-grid,
.uhph-turfmax-grid > .wp-block-column {
	overflow: visible !important;
}
.uhph-turfmax-divider {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 220px;
}
.uhph-turfmax-divider span {
	flex: 1 1 auto;
	height: 1px;
	background: rgba(211, 168, 76, 0.5);
}

/* Checklist */
ul.uhph-checklist {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
ul.uhph-checklist li {
	position: relative;
	padding-left: 28px;
	font-size: 14.5px;
	color: #2a2a2a;
}
ul.uhph-checklist li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background-color: #5fa628;
}
ul.uhph-checklist li::after {
	content: "";
	position: absolute;
	left: 5.5px;
	top: 7.5px;
	width: 8px;
	height: 4px;
	border-left: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: rotate(-45deg);
}

/* Contact form */
.uhph-form input[type="text"],
.uhph-form input[type="email"],
.uhph-form textarea {
	width: 100%;
	border: 1px solid #ddd8c8;
	border-radius: 4px;
	padding: 12px 14px;
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	background: #fff;
	box-sizing: border-box;
}
.uhph-form label {
	display: block;
	font-size: 12.5px;
	font-weight: 700;
	color: #1a1a1a;
	margin-bottom: 8px;
}
.uhph-form .uhph-checkbox-row {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13.5px;
	color: #3a3a34;
	font-weight: 400;
}

/* WPForms — tightened spacing + brand styling for the contact form */
.wpforms-container {
	margin: 0 !important;
}
.wpforms-container .wpforms-field {
	width: 100% !important;
	max-width: 100% !important;
	padding: 0 !important;
	margin-bottom: 16px !important;
}
.wpforms-container .wpforms-field-label {
	font-size: 12.5px !important;
	font-weight: 700 !important;
	color: #1a1a1a !important;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	margin-bottom: 8px !important;
}
.wpforms-container .wpforms-field-required {
	color: #5fa628 !important;
}
.wpforms-container input[type="text"],
.wpforms-container input[type="email"],
.wpforms-container input[type="tel"],
.wpforms-container input[type="number"],
.wpforms-container select,
.wpforms-container textarea {
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
	border: 1px solid #ddd8c8 !important;
	border-radius: 4px !important;
	padding: 12px 14px !important;
	font-family: 'Inter', sans-serif !important;
	font-size: 14px !important;
	background: #fff !important;
	margin: 0 !important;
}
.wpforms-container textarea {
	height: 90px !important;
	min-height: 0 !important;
	resize: vertical;
}
.wpforms-container textarea[rows] {
	height: 90px !important;
}
.wpforms-container .wpforms-field-checkbox ul,
.wpforms-container .wpforms-field-radio ul {
	margin: 4px 0 0 !important;
}
.wpforms-container .wpforms-field-checkbox li,
.wpforms-container .wpforms-field-radio li {
	margin-bottom: 6px !important;
	font-size: 13.5px;
	color: #3a3a34;
}
.wpforms-container .wpforms-field-description {
	font-size: 12px !important;
	color: #5a5a52 !important;
	margin-top: 6px !important;
}

/* Submit button: full width, primary brand green */
.wpforms-container .wpforms-submit-container {
	margin-top: 8px !important;
}
.wpforms-container button[type="submit"].wpforms-submit {
	display: block !important;
	width: 100% !important;
	background: #5fa628 !important;
	color: #ffffff !important;
	border: none !important;
	border-radius: 4px !important;
	padding: 15px 26px !important;
	font-family: 'Inter', sans-serif !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.15s ease;
}
.wpforms-container button[type="submit"].wpforms-submit:hover {
	background: #4d8c1f !important;
}

/* TurfScreen® ribbon laid across the lower part of the Monitor badge
   (distributors still know the product by this name). It's a real,
   editable paragraph block placed right after the badge image; the
   negative top margin pulls it up over the badge's own small ribbon, and
   the matching bottom margin keeps the tagline aligned with the other cards. */
.uhph-turfmax-name-ribbon {
	position: relative;
	z-index: 3;
	display: block;
	width: fit-content;
	margin: -226px auto 174px !important;
	padding: 9px 30px;
	font-family: 'Poppins', sans-serif;
	font-size: 24px;
	font-weight: 800;
	letter-spacing: 2px;
	text-transform: uppercase;
	line-height: 1.1;
	white-space: nowrap;
	color: #0f1f3d;
	background: linear-gradient(180deg, #ecca75 0%, #d3a84c 55%, #b98f33 100%);
	border-top: 2px solid #f6e3a6;
	border-bottom: 2px solid #8f6d22;
	border-radius: 3px;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
	transform: rotate(-4deg);
}
