/*
 * Block styles. Loaded on the front end AND inside the block editor, so
 * editors see the same look they publish.
 */

/* ---- Sections ------------------------------------------------------------ */
.hw-section { position: relative; }
.hw-section .wp-block-columns { gap: 30px; }

/* Triangular "notch" under a section (from the old company/facility/quality sections). */
.company-section,
.is-style-hw-notch-white { position: relative; z-index: 9; }
.company-section::before,
.is-style-hw-notch-white::before,
.facility-section::before,
.quality-section::before,
.is-style-hw-notch-red::before {
	content: "";
	position: absolute;
	bottom: -40px;
	left: 15.5%;
	width: 0;
	height: 0;
	border-left: 65.5px solid transparent;
	border-right: 65.5px solid transparent;
	border-top: 40px solid #fff;
	z-index: 2;
}
.facility-section::before,
.quality-section::before,
.is-style-hw-notch-red::before { border-top-color: #ee3324; }
.facility-section,
.quality-section,
.is-style-hw-notch-red { position: relative; z-index: 99; }
.company-section.hw-section { padding-top: 122px !important; padding-bottom: 114px !important; }
@media (max-width: 781px) {
	.company-section.hw-section { padding-top: 60px !important; padding-bottom: 60px !important; }
}

.hw-section-heading { margin-bottom: 1.5rem; }
.hw-section-subheading { margin-top: -0.75rem; margin-bottom: 2rem; }

/* ---- Hero (home page) ---------------------------------------------------- */
.hw-hero-column { align-self: center; }
.hw-hero-column h1,
.hw-hero-column h2,
h1.hw-hero,
h2.hw-hero,
.is-style-hw-hero {
	text-align: left;
	color: #fff !important;
	letter-spacing: 0.01rem;
}
.hw-hero-column h1,
h1.hw-hero,
h1.is-style-hw-hero {
	font-family: 'eurostile', Arial, sans-serif !important;
	font-size: 4rem !important;
	font-weight: normal !important;
	line-height: 1.1;
	margin-bottom: 10px !important;
	text-transform: none;
}
.hw-hero-column h2,
h2.hw-hero,
h2.is-style-hw-hero {
	font-family: eurostile, Arial, sans-serif;
	font-size: 1.5rem !important;
	font-weight: normal !important;
}
@media (max-width: 781px) {
	.hw-hero-column h1, h1.hw-hero, h1.is-style-hw-hero { font-size: 2.6rem !important; }
}
.hw-hero-video-column .wp-block-video video { width: 100%; display: block; }

/* ---- Headings ------------------------------------------------------------ */
.is-style-hw-page-title {
	font-family: eurostile, Arial, sans-serif !important;
	font-size: 30px !important;
	font-weight: 700 !important;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #000;
	text-align: center;
}
.is-style-hw-section-title {
	font-family: eurostile, Arial, sans-serif !important;
	font-weight: 700 !important;
	letter-spacing: 2px;
	text-transform: uppercase;
}

/* ---- Separator: red accent bar ------------------------------------------ */
/* Drawn as a 100px stripe inside a full-width rule, so it lines up with the
   text whether it sits in a column or directly in a full-width section. */
.wp-block-separator.is-style-hw-red-bar {
	border: 0 !important;
	height: 3px;
	opacity: 1;
	background: linear-gradient(#ee3324, #ee3324) left center / 100px 3px no-repeat !important;
	margin-top: 20px !important;
	margin-bottom: 20px !important;
}
.has-text-align-center + .wp-block-separator.is-style-hw-red-bar,
.hw-text-center .wp-block-separator.is-style-hw-red-bar { background-position: center center !important; }

/* ---- Images -------------------------------------------------------------- */
.wp-block-image.is-style-hw-framed img, .wp-block-video.is-style-hw-framed video {
	box-shadow: 0 3px 9px 0 rgba(0, 0, 0, 0.5);
	border: 1px solid #b3a8a8;
	padding: 20px;
	background: #fff;
}
.home .wp-block-image.is-style-hw-framed img, .wp-block-video.is-style-hw-framed video { padding: 8px; }
.wp-block-image.is-style-hw-framed { margin-bottom: 30px; }
.wp-block-image.hw-inline-figure img { max-width: 400px; }
.wp-block-image.alignright.hw-inline-figure { margin-left: 20px; }
.wp-block-image.alignleft.hw-inline-figure { margin-right: 20px; }

/* Floated images directly inside a full-width section stay within the content width. */
.is-layout-constrained > .alignright {
	margin-right: max(0px, calc((100% - var(--wp--style--global--content-size, 1140px)) / 2)) !important;
}
.is-layout-constrained > .alignleft {
	margin-left: max(0px, calc((100% - var(--wp--style--global--content-size, 1140px)) / 2)) !important;
}

/* Logo wall (customer logos). */
.wp-block-gallery.is-style-hw-logos { gap: 30px 30px; align-items: center; }
.wp-block-gallery.is-style-hw-logos .wp-block-image { justify-content: center; align-items: center; }
.wp-block-gallery.is-style-hw-logos .wp-block-image img {
	object-fit: contain !important;

	width: auto !important;
	margin: 0 auto;
	box-shadow: none;
	border: 0;
	padding: 0;
}

/* ---- Buttons ------------------------------------------------------------- */
.wp-block-button .wp-block-button__link { border-radius: 0; }
.has-harlow-red-background-color .wp-block-button__link,
.has-link-red-background-color .wp-block-button__link { background: #222; color: #fff; }
.has-harlow-red-background-color .wp-block-button__link:hover { background: #fff; color: #222; }

/* ---- Feature (icon + title + text) ------------------------------------- */
.hw-feature { margin-bottom: 40px; }
.hw-feature.hw-text-center,
.hw-text-center { text-align: center; }
.hw-feature__icon { margin-bottom: 20px; }
.hw-feature__icon i {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 95px;
	height: 95px;
	font-size: 35px;
	color: #fff;
	background: #f91715;
	transition: background-color .2s;
}
.hw-feature:hover .hw-feature__icon i { background: #1e1e1e; }
.hw-feature__title { font-size: 22px !important; line-height: 1.2; color: #222; margin-bottom: .75rem; }
.hw-feature p { font-size: 16px; line-height: 28px; }
.hw-icon { margin-bottom: 1rem; }
.hw-icon i { font-size: 36px; color: #f7c221; }

/* ---- Flip card (image front, text revealed on hover) -------------------- */
.wp-block-group.is-style-hw-flip {
	position: relative;
	min-height: 300px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 30px 20px;
	color: #fff;
	background-size: cover;
	background-position: center;
	overflow: hidden;
	margin-bottom: 30px;
}
.wp-block-group.is-style-hw-flip::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 0;
}
.wp-block-group.is-style-hw-flip > * { position: relative; z-index: 1; }
.wp-block-group.is-style-hw-flip h1,
.wp-block-group.is-style-hw-flip h2,
.wp-block-group.is-style-hw-flip h3 { color: #fff !important; }
.wp-block-group.is-style-hw-flip .hw-flip__back {
	position: absolute;
	inset: 0;
	z-index: 2;
	margin: 0 !important;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 25px;
	max-width: none !important;
	background: #f7c221;
	color: #222;
	opacity: 0;
	transform: rotateY(90deg);
	transition: opacity .35s, transform .35s;
}
.wp-block-group.is-style-hw-flip:hover .hw-flip__back,
.wp-block-group.is-style-hw-flip:focus-within .hw-flip__back,
.wp-block-group.is-style-hw-flip.is-flipped .hw-flip__back { opacity: 1; transform: none; }
.wp-block-group.is-style-hw-flip .hw-flip__back p { font-size: 17px; line-height: 1.6; color: #222; }

/* ---- Team member --------------------------------------------------------- */
.wp-block-group.is-style-hw-person { background: #fff; margin-bottom: 30px; text-align: center; padding: 0 0 15px; }
.wp-block-group.is-style-hw-person .wp-block-image { margin: 0 0 15px; }
.wp-block-group.is-style-hw-person .wp-block-image img { width: 100%; height: auto; display: block; }
.hw-person__name { font-size: 1.4em !important; margin: 0 15px 4px !important; color: #222; }
.hw-person__role { font-size: 16px !important; line-height: 1.5 !important; color: #888; margin: 0 15px !important; }

/* ---- Certification badges (Quality System Approvals) -------------------- */
.hw-badge { text-align: center; margin-bottom: 30px; }
.hw-badge .wp-block-image.hw-badge-logo img { width: 100px; height: auto; margin: 0 auto 10px; }
.hw-badge p { font-size: 18px !important; line-height: 1.5 !important; margin-bottom: .5rem; }
.hw-badge a { color: inherit; text-decoration: underline; }
.hw-badge-caption { font-weight: 700; }

/* ---- Image + text panel (Quality pages) --------------------------------- */
.wp-block-group.hw-image-content { margin-bottom: 30px; padding: 0 !important; }
.hw-image-content .wp-block-columns { gap: 0; margin: 0; }
.hw-image-content__image .wp-block-image { margin: 0; height: 100%; }
.hw-image-content__image .wp-block-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hw-image-content__text { padding: 60px 50px; }
.hw-image-content__title { font-family: eurostile, Arial, sans-serif !important; font-size: 30px !important; font-weight: 900 !important; text-transform: uppercase; color: #000 !important; letter-spacing: 0; }
@media (max-width: 781px) { .hw-image-content__text { padding: 20px 15px 40px; } }

/* ---- Slideshow (former carousel) ---------------------------------------- */
/* Each slide is a Cover block inside a group with class "hw-slides".
   theme.js crossfades them; in the editor they simply stack. */
.hw-slides { display: grid; gap: 20px; }
.hw-slide { min-height: 260px !important; }
.hw-slide__title { color: #fff !important; font-size: 2em !important; }
.hw-slides.is-rotating { gap: 0; }
.hw-slides.is-rotating > .hw-slide {
	grid-area: 1 / 1;
	opacity: 0;
	visibility: hidden;
	transition: opacity .6s ease, visibility .6s;
	margin: 0 !important;
}
.hw-slides.is-rotating > .hw-slide.is-active { opacity: 1; visibility: visible; }
.hw-slides__dots { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.hw-slides__dots button {
	width: 12px; height: 12px; padding: 0; border-radius: 50%;
	border: 2px solid #2c2e36; background: transparent; cursor: pointer;
}
.hw-slides__dots button.is-active { background: #2c2e36; }

/* ---- Link list (footer "Useful Links") ---------------------------------- */
.wp-block-list.hw-link-list { list-style: none; padding-left: 0; }
.wp-block-list.hw-link-list li { padding: 7px 0; line-height: 1.4 !important; font-size: 16px !important; }

/* ---- Progress bar --------------------------------------------------------- */
.hw-progress { height: 8px; background: #eee; margin-bottom: 25px; }
.hw-progress > span { display: block; height: 100%; background: #f7c221; }

/* ---- Accordion (Details block) ------------------------------------------ */
.wp-block-details { border: 1px solid #e5e5e5; padding: 15px 20px; margin-bottom: 10px; }
.wp-block-details summary { font-size: 20px; font-family: 'Roboto Condensed', Arial, sans-serif; cursor: pointer; }

/* ---- Latest news cards (home page) -------------------------------------- */
.wp-block-latest-posts.is-style-hw-news-cards { padding: 0; }
.wp-block-latest-posts.is-style-hw-news-cards > li {
	padding: 20px;
	border: 1px solid #f4f4f4;
	background: #fff;
	list-style: none;
}
.wp-block-latest-posts.is-style-hw-news-cards .wp-block-latest-posts__post-title {
	display: block;
	color: #2c2e36;
	font-family: 'Roboto Condensed', Arial, Helvetica, sans-serif;
	font-weight: bold;
	font-size: 18px;
	line-height: 1.4;
	text-decoration: none;
}
.wp-block-latest-posts.is-style-hw-news-cards .wp-block-latest-posts__post-title:hover { color: #e13533; }
.wp-block-latest-posts.is-style-hw-news-cards .wp-block-latest-posts__post-excerpt {
	font-size: 16px;
	line-height: 1.6;
	padding: 4px 0;
	margin: 8px 0;
}
.wp-block-latest-posts.is-style-hw-news-cards .wp-block-latest-posts__post-date {
	font-size: 14px;
	color: #686868;
	margin-top: 0;
}
.wp-block-latest-posts.is-style-hw-news-cards .wp-block-latest-posts__post-date::before { content: "Written on "; }
/* K2 order: title, intro, then date. */
.wp-block-latest-posts.is-style-hw-news-cards > li { display: flex; flex-direction: column; }
.wp-block-latest-posts.is-style-hw-news-cards .wp-block-latest-posts__post-excerpt { order: 2; }
.wp-block-latest-posts.is-style-hw-news-cards .wp-block-latest-posts__post-date { order: 3; }
