/*
 * S5 site-wide fixes (site review, 24 Nov 2026). Loaded on every page by inc/s5-site.php.
 *
 * The old pages are Cornerstone layouts. Their element classes (e<layout>-e<n>) are stable
 * per element; the generated style classes (mhq-1a and the like) are not, so selectors
 * here use the element classes, with "html body" in front so they win over the generated
 * CSS without !important. Keep each rule tied to the finding it fixes.
 */

/* G4: headings in plain content (privacy policy, blog post bodies, landing pages, the
   HTML sitemap) fell back to Pro's global Montserrat. Cornerstone elements set their own
   font with class selectors, which still win. */
html h1, html h2, html h3, html h4, html h5, html h6,
html .h1, html .h2, html .h3, html .h4, html .h5, html .h6,
html .x-text-headline {
	font-family: "br-hendrix", sans-serif;
}

/* G5: white text on #2D7FF9 is about 3.8:1 and fails WCAG AA; #1749D1 (the solution
   pages' blue) is about 7.8:1. Pro's global buttons first, then the Cornerstone ones. */
html body .x-btn,
html body .button,
html body [type="submit"] {
	background-color: #1749D1;
	border-color: #1749D1;
}

/* Blog index and category cards: "Read more" (e638-e21). B2: a text link, not 22 large
   gradient buttons; the whole card is already the link. */
html body .e638-e21.x-anchor {
	width: auto;
	margin-right: auto;
	background-image: none;
	background-color: transparent;
	border-radius: 0;
	font-size: 1em;
}
html body .e638-e21.x-anchor .x-anchor-content {
	justify-content: flex-start;
	padding: 0;
}
html body .e638-e21.x-anchor .x-anchor-text {
	margin: 0;
}
html body .e638-e21.x-anchor .x-anchor-text-primary {
	color: #1749D1;
	font-size: 1.15em;
}
html body .e638-e13:hover .e638-e21.x-anchor .x-anchor-text-primary,
html body .e638-e21.x-anchor:hover .x-anchor-text-primary {
	color: #1749D1;
	text-decoration: underline;
}

/* B1: the date chip sat over the S5 mark in the bottom-left of each featured image. */
html body .e638-e15 {
	left: auto;
	right: 20px;
}

/* B3: the post sidebar's "Get in Touch With Us" card (e636-e49) and its figure (e636-e27). */
html body .e636-e49,
html body .e636-e27 {
	background-color: #1749D1;
}

/* Case study "Browse our services" (e615-e21), services "More info" (e599-e16) and the
   home page's hero and services buttons (e8-e6, e8-e21): solid #1749D1. */
html body .e615-e21.x-anchor,
html body .e599-e16.x-anchor,
html body .e8-e6.x-anchor,
html body .e8-e21.x-anchor {
	background-image: none;
	background-color: #1749D1;
}

/* Block-editor pages (the Fortinet landing pages) set their buttons' colour inline. */
html body a[style*="background:#2d7ff9"] {
	background: #1749D1 !important;
}

/* Footer (white background): the current page's link and hovered links were #2D7FF9. */
html body footer .x-anchor[class*="active"] .x-anchor-text-primary,
html body footer .x-anchor:hover .x-anchor-text-primary {
	color: #1749D1;
}

/* Links in running text on white: #2D7FF9 is 3.8:1. */
html body .x-content a:not(.x-anchor),
html body .x-text a:not(.x-anchor),
html body .entry-content a:not(.x-anchor) {
	color: #1749D1;
}

/* C1: the case study "About <client>" photo and logo card (e615-e23) were 120% wide and
   ran off the right edge of the screen on desktop. */
html body .e615-e23 {
	width: 100%;
}

/* C2: "More Case Studies" cards: the date (55% white) on a darkened photo failed contrast. */
html body .e615-e87.x-text {
	color: #ffffff;
}

/* Blog category pages: the category's description under its h1 (inc/s5-site.php). */
/* It sits inside the layout's headline element, so it sets every type property itself. */
html body .s5site-cat-lead {
	max-width: 46rem;
	margin: 12px auto 0;
	color: #ffffff;
	font-family: "Poppins", sans-serif;
	font-size: 18px;
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: 0;
	text-align: center;
	text-transform: none;
}
@media (max-width: 600px) {
	html body .s5site-cat-lead {
		font-size: 16px;
	}
}

/* F1: the Fortinet landing page sets a 56px h1 inline, which ran off a phone screen.
   Matched by its inline size, not the page ID (IDs differ on live). */
@media (max-width: 600px) {
	html body h1[style*="font-size:56px"] {
		font-size: 36px !important;
		overflow-wrap: break-word;
	}
	/* Its button's arrow wrapped onto a second line. */
	html body a[href="#scoping-form"] {
		padding-left: 24px !important;
		padding-right: 24px !important;
		white-space: nowrap;
	}
}
