/* ==========================================================================
   HemoDefend theme styles
   Colours, fonts and sizes live in theme.json. This file adds the block
   styles, section rhythm and the few graphics that need custom CSS.
   ========================================================================== */

/* Full-width sections sit flush against each other */
.wp-site-blocks > * + *,
.hd-sections > * + *,
.hd-main > * + * { margin-block-start: 0; }

html { scroll-behavior: smooth; }
:target { scroll-margin-top: 24px; }

/* ---------- Header ---------------------------------------------------- */
.hd-header { border-bottom: 1px solid var(--wp--preset--color--line); }
.hd-header .wp-block-navigation a { text-decoration: none; }
.hd-header .wp-block-navigation .current-menu-item > a { color: var(--wp--preset--color--accent); }
.hd-header .wp-block-button__link { padding: 11px 20px; font-size: var(--wp--preset--font-size--small); background: var(--wp--preset--color--navy); }
.hd-header .wp-block-button__link:hover { background: var(--wp--preset--color--accent); }
.hd-header .wp-block-site-title a { text-decoration: none; }

/* ---------- Links & buttons on dark ---------------------------------- */
.has-navy-background-color a:not(.wp-block-button__link),
.has-navy-deep-background-color a:not(.wp-block-button__link) { color: var(--wp--preset--color--white); }
.has-navy-background-color a:not(.wp-block-button__link):hover,
.has-navy-deep-background-color a:not(.wp-block-button__link):hover { color: var(--wp--preset--color--accent-light); }

.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent; color: var(--wp--preset--color--navy);
	border: 1.5px solid currentColor; padding: 11.5px 22.5px;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { color: var(--wp--preset--color--accent); }
.has-navy-background-color .wp-block-button.is-style-outline > .wp-block-button__link { color: var(--wp--preset--color--white); }
.has-navy-background-color .wp-block-button.is-style-outline > .wp-block-button__link:hover { color: var(--wp--preset--color--accent-light); }
.wp-block-button__link:focus-visible, a:focus-visible { outline: 2px solid var(--wp--preset--color--cyan); outline-offset: 3px; }

/* Text links with an arrow */
.hd-arrow-link a { font-weight: 600; text-decoration: none; color: var(--wp--preset--color--accent); }
.hd-arrow-link a::after { content: " \2192"; }

/* ---------- Paragraph styles ----------------------------------------- */
.is-style-eyebrow {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px !important; letter-spacing: .08em; text-transform: uppercase;
	line-height: 1.4; color: var(--wp--preset--color--accent);
}
.has-navy-background-color .is-style-eyebrow,
.has-navy-raised-background-color .is-style-eyebrow { color: var(--wp--preset--color--accent-light); }
.is-style-eyebrow.has-text-color { color: inherit; }

.is-style-pill {
	display: inline-block; width: fit-content; align-self: flex-start; margin: 0; padding: 7px 16px;
	border-radius: 999px; font-size: var(--wp--preset--font-size--small); font-weight: 600; line-height: 1.4;
	background: var(--wp--preset--color--cloud);
}
.is-style-pill.has-background { background: inherit; }
.is-style-pill.has-accent-background-color { background: var(--wp--preset--color--accent); }
.has-navy-background-color .is-style-pill:not(.has-background) { background: transparent; border: 1px dashed #5E7A96; color: var(--wp--preset--color--mist); font-weight: 500; }
.has-navy-background-color .has-white-background-color .is-style-pill:not(.has-background) { background: var(--wp--preset--color--cloud); border: 0; color: var(--wp--preset--color--navy); font-weight: 600; }

.is-style-stat {
	font-family: var(--wp--preset--font-family--display); font-weight: 700;
	font-size: var(--wp--preset--font-size--stat) !important; line-height: 1; letter-spacing: -0.02em;
}

.is-style-notice {
	padding: 18px 20px; border: 1px solid #D5DDE5; border-radius: 16px;
	background: var(--wp--preset--color--white); font-size: var(--wp--preset--font-size--small);
}

/* ---------- Group styles --------------------------------------------- */
.wp-block-group.is-style-card { background: var(--wp--preset--color--white); border-radius: 20px; padding: 28px; }
.has-white-background-color .wp-block-group.is-style-card,
.wp-block-group.is-style-card.on-white { background: var(--wp--preset--color--cloud); }
.wp-block-group.is-style-card-line { border: 1px solid var(--wp--preset--color--line); border-radius: 20px; padding: 24px; }
.wp-block-group.is-style-card-dark {
	background: var(--wp--preset--color--navy-raised); border: 1px solid #2E4A66;
	border-radius: 20px; padding: 24px; color: var(--wp--preset--color--white);
}
.wp-block-group.is-style-card > :first-child,
.wp-block-group.is-style-card-line > :first-child,
.wp-block-group.is-style-card-dark > :first-child { margin-top: 0; }

/* ---------- List styles ---------------------------------------------- */
.wp-block-list.is-style-checklist { list-style: none; padding-left: 0; }
.wp-block-list.is-style-checklist li { position: relative; padding-left: 34px; margin-bottom: 14px; }
.wp-block-list.is-style-checklist li::before {
	content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px;
	background: var(--wp--preset--color--accent);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l4 4 10-10'/%3E%3C/svg%3E") center/contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l4 4 10-10'/%3E%3C/svg%3E") center/contain no-repeat;
}

.wp-block-list.is-style-rows { list-style: none; padding-left: 0; counter-reset: hdrow; }
.wp-block-list.is-style-rows li {
	counter-increment: hdrow; display: flex; gap: 16px; align-items: baseline;
	padding: 18px 0; border-bottom: 1px solid #D5DDE5; font-weight: 600;
}
.wp-block-list.is-style-rows li:last-child { border-bottom: 0; }
.wp-block-list.is-style-rows li::before {
	content: counter(hdrow, decimal-leading-zero);
	font-family: var(--wp--preset--font-family--mono); font-size: 12px; letter-spacing: .08em;
	color: var(--wp--preset--color--accent); flex: none;
}
.wp-block-list.is-style-rows li strong,
.wp-block-list.is-style-rows li em { margin-left: auto; }
/* Status chip inside a row: write the status in <em> */
.wp-block-list.is-style-rows li em {
	font-style: normal; font-family: var(--wp--preset--font-family--mono); font-size: 12px;
	letter-spacing: .08em; text-transform: uppercase; color: var(--wp--preset--color--slate); font-weight: 500;
}
.wp-block-list.is-style-rows li strong {
	font-family: var(--wp--preset--font-family--mono); font-size: 12px; letter-spacing: .08em;
	text-transform: uppercase; font-weight: 500; padding: 4px 10px; border-radius: 999px;
	background: var(--wp--preset--color--navy); color: var(--wp--preset--color--white);
}

/* ---------- Images ---------------------------------------------------- */
.wp-block-image img { display: block; width: 100%; height: auto; }
.wp-block-image.is-style-circle img { border-radius: 50% !important; aspect-ratio: 1; object-fit: cover; }

/* ---------- Process steps (Collect -> Filter -> Product) -------------- */
.hd-steps { position: relative; }
@media (min-width: 782px) {
	.hd-steps.wp-block-columns { column-gap: 56px; }
	.hd-steps > .wp-block-column { position: relative; }
	.hd-steps > .wp-block-column:not(:last-child)::after {
		content: ""; position: absolute; right: -44px; top: 50%; width: 32px; height: 32px; transform: translateY(-50%);
		background: #8A9CAE;
		-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat;
		        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat;
	}
}

/* ---------- Platform hub (one filter -> four products) --------------- */
.hd-node { position: relative; }
.hd-node.is-primary { border-color: var(--wp--preset--color--accent) !important; border-width: 1.5px !important; }
@media (min-width: 782px) {
	.hd-hub.wp-block-columns { column-gap: 40px; }
	.hd-hub-left .hd-node::after,
	.hd-hub-right .hd-node::before {
		content: ""; position: absolute; top: 50%; width: 40px; height: 2px; background: #5E7A96;
	}
	.hd-hub-left .hd-node::after { right: -41px; }
	.hd-hub-right .hd-node::before { left: -41px; }
}
.hd-hub-core img { border: 2px solid var(--wp--preset--color--accent); }

/* ---------- Fragmented inventory graphic ----------------------------- */
.hd-inventory { background: var(--wp--preset--color--cloud); border-radius: 24px; padding: 32px; margin: 0; }
.hd-inventory .hd-bars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; margin: 20px 0; }
.hd-inventory .hd-bar { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hd-inventory .hd-bar span { display: block; width: 100%; border-radius: 10px; background: #D5DDE5; }
.hd-inventory .hd-bar b { font-family: var(--wp--preset--font-family--display); font-size: 22px; }
.hd-inventory .hd-or { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--wp--preset--color--slate); }
.hd-inventory .hd-or::before, .hd-inventory .hd-or::after { content: ""; flex: 1; height: 1px; background: #B8C5D2; }
.hd-inventory .hd-one {
	margin-top: 20px; min-height: 64px; border-radius: 10px; background: var(--wp--preset--color--accent);
	color: #fff; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 600; padding: 8px 16px;
}
.hd-inventory figcaption { margin-top: 16px; font-size: 13px; color: var(--wp--preset--color--slate); }

/* ---------- Grid of benefits with hairlines --------------------------- */
.hd-hairline-grid { gap: 1px !important; background: var(--wp--preset--color--line); border: 1px solid var(--wp--preset--color--line); border-radius: 20px; overflow: hidden; }
.hd-hairline-grid > .wp-block-group { background: var(--wp--preset--color--white); padding: 28px; height: 100%; box-sizing: border-box; }

/* ---------- Timeline cards ------------------------------------------- */
.hd-timeline > .wp-block-group { border-top: 4px solid #8A9CAE; }
.hd-timeline > .wp-block-group.is-done { border-top-color: var(--wp--preset--color--navy); }

/* ---------- Footer ---------------------------------------------------- */
.hd-footer a { color: var(--wp--preset--color--mist); text-decoration: none; }
.hd-footer a:hover { color: var(--wp--preset--color--white); }
.hd-footer .wp-block-site-title a { color: var(--wp--preset--color--white); }

/* ---------- News cards ----------------------------------------------- */
.hd-news .wp-block-post-title a { text-decoration: none; }
.hd-news .wp-block-post-date { font-family: var(--wp--preset--font-family--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--wp--preset--color--slate); }

/* ---------- Contact form area (works with WPForms / Gravity Forms) ---- */
.hd-form-card { background: var(--wp--preset--color--white); color: var(--wp--preset--color--navy); border-radius: 24px; padding: 32px; }
.hd-form-card a { color: var(--wp--preset--color--accent) !important; }
.hd-form-card input[type="text"], .hd-form-card input[type="email"], .hd-form-card input[type="tel"],
.hd-form-card select, .hd-form-card textarea {
	min-height: 44px; border: 1px solid #B8C5D2 !important; border-radius: 10px !important; padding: 8px 12px; font: inherit; width: 100%; box-sizing: border-box;
}
.hd-form-card button[type="submit"], .hd-form-card input[type="submit"] {
	min-height: 52px; border: 0; border-radius: 999px !important; background: var(--wp--preset--color--accent) !important;
	color: #fff !important; font: inherit; font-weight: 600; padding: 0 28px; cursor: pointer;
}
