/*
Theme Name: PSR Block
Theme URI:
Author: PSR Technology Solutions Group
Author URI:
Description: A full-site editing block theme for PSR. Replaces the Understrap/Bootstrap classic theme.
Requires at least: 6.7
Tested up to: 6.7
Requires PHP: 8.0
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: psr-block
Tags: full-site-editing, block-theme, custom-colors, custom-menu, featured-images
*/

/* =========================================================
   Typography — heading scale matching the classic Bootstrap 4 theme
   (bootstrap-replacement.css provides utility classes only, not the
   Bootstrap reboot heading rules that content and legacy blocks rely on)
   ========================================================= */

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
	margin-top: 0;
	margin-bottom: 0.5rem;
	font-weight: 500;
	line-height: 1.2;
}
h1, .h1 { font-size: 2rem; }
h2, .h2 { font-size: 1.6rem; }
h3, .h3 { font-size: 1.4rem; }
h4, .h4 { font-size: 1.2rem; }
h5, .h5 { font-size: 1rem; }
h6, .h6 { font-size: 0.8rem; }

/* [author_card] shortcode: the <h5> name and <p> title sit inside an <a class="btn">
   which sets font-size:1rem. The block theme does not pin the html root font-size the
   way the classic theme does, so 1rem resolves larger here. Match body size for both,
   reset the browser-default paragraph margin-top (no Bootstrap reboot in this theme). */
.d-block.rounded-0 h5.text-nowrap {
	font-size: var(--wp--preset--font-size--normal);
	font-weight: 600;
}
.d-block.rounded-0 p.mb-0 {
	font-size: var(--wp--preset--font-size--normal);
	margin-top: 0;
}

/* =========================================================
   Utility bar
   ========================================================= */

.utility-bar {
	background-color: var(--wp--preset--color--secondary);
}

.utility-bar a:not(.btn) {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
	font-size: 0.875rem;
}

.utility-bar a:not(.btn):hover {
	text-decoration: underline;
}

.utility-bar svg {
	vertical-align: middle;
}

@media (max-width: 767px) {
	.utility-bar .wp-block-columns {
		flex-direction: column !important;
	}
	.utility-bar .wp-block-column {
		width: 100% !important;
		flex-basis: auto !important;
		min-width: 0 !important;
	}
}

/* =========================================================
   Site header / navbar
   ========================================================= */

.site-navbar {
	background-color: #ffffff;
	border-bottom: 1px solid var(--wp--preset--color--secondary);
	position: sticky;
	top: 0;
	z-index: 100;
}

/* Hamburger and close buttons — PSR red to match classic theme */
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--primary);
}

/* Mobile nav overlay */
.wp-block-navigation__responsive-container.is-menu-open {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100vw !important;   /* vw ignores any transformed/constrained containing block */
	max-width: 100vw !important;
	overflow-x: hidden !important;
	z-index: 100000 !important;
	/* Override the block's justifyContent:right — items should align left on mobile */
	--navigation-layout-justification-setting: flex-start !important;
}

/* Close button: pin to viewport corner so it's never pushed off-screen */
.wp-block-navigation__responsive-container.is-menu-open
.wp-block-navigation__responsive-container-close {
	position: fixed !important;
	top: 0.75rem !important;
	right: 0.75rem !important;
	left: auto !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: flex-start;
	justify-content: flex-start;
	width: 100%;
}

/* Top-level items: full width, left-aligned */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: flex-start !important;
	width: 100%;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	color: var(--wp--preset--color--primary);
	font-size: 1.25rem;
	text-align: left !important;
	text-transform: uppercase;
	width: 100%;
}

/* Sub-items: indented, slightly smaller */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	padding-left: 1.5rem !important;
	padding-right: 0 !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	font-size: 1rem;
}

/* =========================================================
   PowerLink modal
   ========================================================= */

.psr-modal {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 1050;
	align-items: center;
	justify-content: center;
}

.psr-modal.is-open {
	display: flex;
}

.psr-modal-inner {
	background: #fff;
	border: 2px solid var(--wp--preset--color--primary);
	max-width: 500px;
	width: 90%;
	padding: 1.5rem;
	position: relative;
}

.psr-modal-close {
	position: absolute;
	top: 0.4rem;
	right: 0.75rem;
	background: none;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: var(--wp--preset--color--dark);
}

.psr-modal-close:hover {
	color: var(--wp--preset--color--primary);
}

/* =========================================================
   Post / content styles
   ========================================================= */

.entry-meta {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--gray);
}

.entry-meta a {
	color: var(--wp--preset--color--gray);
}

.entry-author {
	margin-block-start: 0;
	color: var(--wp--preset--color--dark); /* unlinked author names: dark/black */
}

.wp-block-paragraph {
	margin-block-start: 0;
	margin-block-end: 1rem;
}

.entry-author a {
	color: var(--wp--preset--color--primary); /* linked author names: PSR red */
}

.post-thumbnail img {
	width: 100%;
	height: auto;
}

/* Report PDF viewer */
.report-pdf-viewer object {
	display: block;
	min-height: 500px;
	border: 1px solid var(--wp--preset--color--secondary);
}
.report-pdf-viewer .btn {
	margin-top: 0.5rem;
}

/* Report type term icon (shown in post-cards via render_block filter) */
img.term-icon {
	width: 20px;
	height: 20px;
	vertical-align: middle;
	margin-right: 0.25rem;
}

/* Embed wrapper for responsive iframes */
.embed {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
}

.embed iframe,
.embed object,
.embed embed {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

/* =========================================================
   Archive / taxonomy listing
   ========================================================= */

.post-card {
	border: 1px solid var(--wp--preset--color--secondary);
	padding: 1rem;
	height: 100%;
}

.post-card .post-card-meta {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--gray);
	margin-top: 0.5rem;
}

/* =========================================================
   Team page
   ========================================================= */

.team-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.5rem;
}

@media (min-width: 768px) {
	.team-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

.team-card {
	cursor: pointer;
	background: #fff;
	width: 100%;
}

.team-card:hover {
	background-color: var(--wp--preset--color--secondary);
}

.team-card .card-title {
	font-size: 0.9rem;
	margin-top: 0.4rem;
}

.team-card .card-body h5 + p {
	margin-top: 0;
}

.wp-block-column .bg-grad-blue {
	margin-top: 0;
	margin-block-start: 0;
}

/* =========================================================
   Search form (utility bar variant)
   ========================================================= */

.wp-block-search__input {
	border: 1px solid var(--wp--preset--color--primary);
	font-size: var(--wp--preset--font-size--small);
	padding: 0.2rem 0.5rem;
}

.wp-block-search__button {
	border-radius: 0;
	font-size: var(--wp--preset--font-size--small);
	padding: 0.2rem 0.5rem;
}

/* =========================================================
   Pagination
   ========================================================= */

.wp-block-query-pagination {
	margin-top: 2rem;
}

.wp-block-query-pagination a,
.wp-block-query-pagination span {
	padding: 0.35rem 0.65rem;
	border: 1px solid var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}

.wp-block-query-pagination .current {
	background-color: var(--wp--preset--color--primary);
	color: #fff;
	border-color: var(--wp--preset--color--primary);
}

/* =========================================================
   Remove default top spacing on <main> and <footer>
   WP's site-blocks gap rule adds margin-block-start to every
   top-level block, which pushes main/footer down from the hero.
   ========================================================= */

main.wp-block-group,
footer.wp-block-group,
footer.wp-block-template-part {
	margin-block-start: 0;
	padding-block-start: 0;
}

/* World Footer — office address paragraphs (desktop overlay + mobile row) */
.card-img-overlay h5 + p,
.d-md-none h5 + p {
	margin-top: 0;
	font-size: 0.8rem;
}

/* =========================================================
   Landing page (no header/footer)
   ========================================================= */

.template-page-landing .site-header,
.template-page-landing .utility-bar,
.template-page-landing footer {
	display: none;
}

/* =========================================================
   Navigation — colours + uppercase (matches classic theme)
   The classic theme sets $navbar-light-color: $primary,
   making all nav links #8C2633.
   ========================================================= */

.site-navbar .wp-block-navigation-item__content,
.site-navbar .wp-block-navigation a {
	text-transform: uppercase !important;
	color: var(--wp--preset--color--primary) !important;
	text-decoration: none !important;
}

.site-navbar .wp-block-navigation-item__content:hover,
.site-navbar .wp-block-navigation a:hover {
	color: var(--wp--preset--color--dark) !important;
}

/* =========================================================
   Bootstrap heading helper classes (.h1–.h6)
   Matches the classic Bootstrap 4 $headings-color: $primary
   ========================================================= */

.h1, .h2, .h3, .h4, .h5, .h6 {
	color: var(--wp--preset--color--primary);
}

/* =========================================================
   Bootstrap .row margin fix
   WP's constrained layout adds margin-left/right: auto to direct
   children. For rows that carry m-0 (margin:0), that auto-centering
   is lost. Re-apply it here with higher specificity (0,2,0 > 0,1,0
   of m-0) so outer rows are always centered at max-width.
   Inner rows (inside columns) are not direct children so are unaffected.
   ========================================================= */

.is-layout-constrained > .row {
	margin-left:  auto !important;
	margin-right: auto !important;
}

/* =========================================================
   Responsive font scaling (matches classic theme behaviour)
   ========================================================= */

html {
	font-size: 1rem;
}

@media (min-width: 992px) {
	html {
		font-size: 1.2rem;
	}
}

/* =========================================================
   Border width utilities  (.border-top-3 / .border-bottom-3)
   Used in post listings and content blocks.
   ========================================================= */

.border-top-3 {
	border-top: 3px solid #dee2e6;
}

.border-bottom-3 {
	border-bottom: 3px solid #dee2e6;
}

/* =========================================================
   Entry image / title overlay (Full Width Page template)
   ========================================================= */

.entry-image {
	position: relative;
	overflow: hidden;
	max-height: 400px;
	min-height: 150px;
	padding: 0;
	background-image: linear-gradient(to bottom right, #adb5bd, #f8f9fa, #adb5bd);
	max-width: var(--wp--style--global--content-size, 1140px);
	margin-left: auto;
	margin-right: auto;
}

.entry-image .wp-block-post-featured-image img {
	width: 100%;
	height: 400px;
	object-fit: cover;
	display: block;
}

/* Fallback image: scale to full width, natural height — no crop */
.entry-image:has(.entry-image-fallback) {
	max-height: none;
	overflow: visible;
}

.entry-image .entry-image-fallback img {
	height: auto;
	object-fit: initial;
}

h1.entry-title {
	line-height: 1.5;
	margin: 0;
}

.entry-title-overlay {
	position: absolute;
	padding: 0.5rem 1rem;
	bottom: 0;
	left: 0;
	margin: 0;
	color: var(--wp--preset--color--primary);
	width: 100%;
	background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.90) 50%, rgba(255, 255, 255, 0) 100%);
}

/* Hide the overlaid title when no featured image is set */
.entry-image:not(:has(img)) .entry-title-overlay {
	position: static;
	background-image: none;
	padding: 1rem;
}

.entry-image + * {
	margin-block-start: 0;
	margin-top: 0;
}

/* Mobile: hero scales to full width at natural proportions — no crop */
@media (max-width: 767px) {
	.entry-image {
		max-height: none;
		overflow: visible;
		min-height: 0;
	}
	.entry-image .wp-block-post-featured-image img {
		height: auto;
		object-fit: initial;
	}
}

/* Archive summary (ACF field rendered below the hero) */
.archive-summary {
	max-width: var(--wp--style--global--content-size);
	margin-left: auto;
	margin-right: auto;
	padding: 1rem 1rem 0;
}

/* Post card featured images (index / archive pages): always 100% width, natural height */
.post-card .wp-block-post-featured-image,
.post-card .wp-block-post-featured-image a {
	display: block;
	width: 100%;
}

.post-card .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: initial;
}

/* =========================================================
   Post / entry date styling
   ========================================================= */

.post-date,
.entry-date {
	color: #343a40;
	font-style: italic;
}

/* =========================================================
   Text shadow utilities (used in content blocks)
   ========================================================= */

.text-shadow {
	text-shadow: 2px 2px 4px #303030, -2px 2px 4px #303030, 2px -2px 4px #303030, -2px -2px 4px #303030, 4px 4px 8px rgba(48, 48, 48, 0.8), -4px 4px 8px rgba(48, 48, 48, 0.8), 4px -4px 8px rgba(48, 48, 48, 0.8), -4px -4px 8px rgba(48, 48, 48, 0.8);
}

.text-shadow-blue {
	text-shadow: 2px 2px 4px #4f727f, -2px 2px 4px #4f727f, 2px -2px 4px #4f727f, -2px -2px 4px #4f727f, 4px 4px 8px rgba(79, 114, 127, 0.8), -4px 4px 8px rgba(79, 114, 127, 0.8), 4px -4px 8px rgba(79, 114, 127, 0.8), -4px -4px 8px rgba(79, 114, 127, 0.8);
}

.text-shadow-light {
	text-shadow: 2px 2px 4px white, -2px 2px 4px white, 2px -2px 4px white, -2px -2px 4px white;
}

.text-bg-blur {
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}

.text-info a {
	color: inherit;
}

.text-info a:hover {
	color: #f8f9fa;
}

/* =========================================================
   Background colour / gradient utilities (used in content)
   ========================================================= */

.bg-yellow {
	background-color: #fdec97;
}

.bg-gray {
	background-color: #adb5bd;
}

.bg-green {
	background-color: #28a745;
}

.bg-indigo {
	background-color: #6610f2;
}

.bg-light-transparent {
	background-color: rgba(255, 255, 255, 0.6);
}

.bg-blue,
.bg-blue-transparent {
	color: #f8f9fa;
}

.bg-blue {
	background-color: #3f84c3;
}

.bg-blue-transparent {
	background-color: rgba(0, 101, 158, 0.8);
}

.bg-blue h2, .bg-blue h3, .bg-blue h4, .bg-blue h5,
.bg-blue-transparent h2, .bg-blue-transparent h3, .bg-blue-transparent h4, .bg-blue-transparent h5 {
	color: #fdec97;
}

.bg-blue a,
.bg-blue-transparent a {
	color: #f8f9fa;
	font-weight: bold;
}

.bg-grad-blue,
.bg-gradient-blue {
	background-image: linear-gradient(to bottom right, #50b3ff, #9ce5ff, #50b3ff);
}

.bg-grad-yellow,
.bg-gradient-yellow {
	background-image: linear-gradient(to bottom right, #dede89, #fcfcec, #dede89);
}

.bg-grad-teal,
.bg-gradient-teal {
	background-image: linear-gradient(to bottom right, #15999e, #1acbce, #15999e);
	color: #f8f9fa;
}

.bg-grad-gray,
.bg-gradient-gray {
	background-image: linear-gradient(to bottom right, #adb5bd, #f8f9fa, #adb5bd);
}

.bg-grad-green,
.bg-gradient-green {
	background-image: linear-gradient(to bottom right, #aacc90, #edffde, #aacc90);
}

.bg-grad-red,
.bg-gradient-red {
	background-image: linear-gradient(to bottom right, #8c2633, #fac2ca, #8c2633);
}

/* =========================================================
   PSR brand elements
   ========================================================= */

.psr-arrow {
	content: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50' height='40'%3E%3Cpath fill='%23DDD' d='M5,10L20,10L20,0L45,20L20,40L20,30L5,30Z' transform='rotate(30,25,20)'/%3E%3C/svg%3E");
}

.psr-symbol {
	content: url('data:image/svg+xml;utf8, %3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 180" transform="translate(0,-2)"%3E %3Cpath d="M 130 30 L 46 152 A 90 70 0 0 1 130 30" fill="white"/%3E %3Cpath d="M 130 30 L 80 165 A 90 70 0 1 0 130 30" fill="white"/%3E %3C/svg%3E');
	width: 55px;
	height: 44px;
	background-color: #333;
	border-radius: 60%;
	margin-bottom: -0.3rem;
	margin-right: -0.5rem;
	box-shadow: 0 0 10px #333;
}

/* =========================================================
   PSR inline icon classes (Bootstrap Icons via CSS content)
   Usage in post content: <i class="psr-icon-phone"></i>
   ========================================================= */

.psr-icon-phone::before,
.psr-icon-envelope::before,
.psr-icon-globe::before,
.psr-icon-fax::before {
	display: inline-block;
	vertical-align: middle;
}

.psr-icon-phone::before {
	content: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16' fill='%238C2633'%3E%3Cpath fill-rule='evenodd' d='M1.885.511a1.745 1.745 0 0 1 2.61.163L6.29 2.98c.329.423.445.974.315 1.494l-.547 2.19a.68.68 0 0 0 .178.643l2.457 2.457a.68.68 0 0 0 .644.178l2.189-.547a1.745 1.745 0 0 1 1.494.315l2.306 1.794c.829.645.905 1.87.163 2.611l-1.034 1.034c-.74.74-1.846 1.065-2.877.702a18.6 18.6 0 0 1-7.01-4.42 18.6 18.6 0 0 1-4.42-7.009c-.362-1.03-.037-2.137.703-2.877z'/%3E%3C/svg%3E");
}

.psr-icon-envelope::before {
	content: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16' fill='%238C2633'%3E%3Cpath d='M.05 3.555A2 2 0 0 1 2 2h12a2 2 0 0 1 1.95 1.555L8 8.414zM0 4.697v7.104l5.803-3.558zM6.761 8.83l-6.57 4.027A2 2 0 0 0 2 14h12a2 2 0 0 0 1.808-1.144l-6.57-4.027L8 9.586zm3.436-.586L16 11.801V4.697z'/%3E%3C/svg%3E");
}

.psr-icon-globe::before {
	content: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16' fill='%238C2633'%3E%3Cpath d='M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8m7.5-6.923c-.67.204-1.335.82-1.887 1.855A8 8 0 0 0 5.145 4H7.5zM4.09 4a9.3 9.3 0 0 1 .64-1.539 7 7 0 0 1 .597-.933A7.03 7.03 0 0 0 2.255 4zm-.582 3.5c.03-.877.138-1.718.312-2.5H1.674a7 7 0 0 0-.656 2.5zM4.847 5a12.5 12.5 0 0 0-.338 2.5H7.5V5zM8.5 5v2.5h2.99a12.5 12.5 0 0 0-.337-2.5zM4.51 8.5a12.5 12.5 0 0 0 .337 2.5H7.5V8.5zm3.99 0V11h2.653c.187-.765.306-1.608.338-2.5zM5.145 12q.208.58.468 1.068c.552 1.035 1.218 1.65 1.887 1.855V12zm.182 2.472a7 7 0 0 1-.597-.933A9.3 9.3 0 0 1 4.09 12H2.255a7 7 0 0 0 3.072 2.472M3.82 11a13.7 13.7 0 0 1-.312-2.5h-2.49c.062.89.291 1.733.656 2.5zm6.853 3.472A7 7 0 0 0 13.745 12H11.91a9.3 9.3 0 0 1-.64 1.539 7 7 0 0 1-.597.933M8.5 12v2.923c.67-.204 1.335-.82 1.887-1.855q.26-.487.468-1.068zm3.68-1h2.146c.365-.767.594-1.61.656-2.5h-2.49a13.7 13.7 0 0 1-.312 2.5m2.802-3.5a7 7 0 0 0-.656-2.5H12.18c.174.782.282 1.623.312 2.5zM11.27 2.461c.247.464.462.98.64 1.539h1.835a7 7 0 0 0-3.072-2.472c.218.284.418.598.597.933M10.855 4a8 8 0 0 0-.468-1.068C9.835 1.897 9.17 1.282 8.5 1.077V4z'/%3E%3C/svg%3E");
}

.psr-icon-fax::before {
	content: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16' fill='%238C2633'%3E%3Cpath d='M2.5 8a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1'/%3E%3Cpath d='M5 1a2 2 0 0 0-2 2v2H2a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h1v1a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-1h1a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-1V3a2 2 0 0 0-2-2zM4 3a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2H4zm1 5a2 2 0 0 0-2 2v1H2a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-1v-1a2 2 0 0 0-2-2zm7 2v3a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1'/%3E%3C/svg%3E");
}

/* =========================================================
   Chart legend colour swatches (used in report content)
   ========================================================= */

.legend1 { background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><rect x='0' y='0' width='16' height='16' fill='rgb(140,38,41)' /></svg>") left 5px no-repeat; padding-left: 21px; }
.legend2 { background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><rect x='0' y='0' width='16' height='16' fill='rgb(142,146,149)' /></svg>") left 5px no-repeat; padding-left: 21px; }
.legend3 { background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><rect x='0' y='0' width='16' height='16' fill='rgb(205,151,148)' /></svg>") left 5px no-repeat; padding-left: 21px; }
.legend4 { background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><rect x='0' y='0' width='16' height='16' fill='rgb(35,31,32)' /></svg>") left 5px no-repeat; padding-left: 21px; }
.legend5 { background: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Crect x='0' y='0' width='16' height='16' fill='rgb(170,84,89)' /%3E%3C/svg%3E") left 5px no-repeat; padding-left: 21px; }
.legend6 { background: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Crect x='0' y='0' width='16' height='16' fill='rgb(123,121,121)' /%3E%3C/svg%3E") left 5px no-repeat; padding-left: 21px; }
.legend7 { background: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Crect x='0' y='0' width='16' height='16' fill='rgb(190,124,125)' /%3E%3C/svg%3E") left 5px no-repeat; padding-left: 21px; }
.legend8 { background: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Crect x='0' y='0' width='16' height='16' fill='rgb(211,211,211)' /%3E%3C/svg%3E") left 5px no-repeat; padding-left: 21px; }

/* =========================================================
   Card link colour inherit
   ========================================================= */

a.card {
	color: inherit;
}

/* =========================================================
   Accordion (note: original typo "accordian" preserved to
   match any authored content using that class)
   ========================================================= */

.accordian button[aria-expanded="true"]::after {
	content: "\25B2";
}

.accordian button[aria-expanded="false"]::after {
	content: "\25BC";
}

/* =========================================================
   PowerTalk podcast — prefix heading with "Podcast: "
   ========================================================= */

.category-psr-powertalk-podcast h1.entry-title::before,
.category-psr-powertalk-podcast h2.entry-title::before {
	content: "Podcast: ";
	color: #343a40;
}

/* =========================================================
   Category icon sizing (ACF image field output)
   ========================================================= */

h1 img.category-icon {
	height: 2rem;
}

h4 img.category-icon {
	height: 1.2rem;
}

/* =========================================================
   File download button
   ========================================================= */

.wp-block-file .wp-block-file__button {
	display: inline-block;
	font-size: 0.875rem;
	padding: 0.25rem 0.5rem;
	border: 1px solid var(--wp--preset--color--primary);
	background-color: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--primary);
	text-decoration: none;
	border-radius: 0;
}

.wp-block-file .wp-block-file__button:hover {
	background-color: var(--wp--preset--color--primary);
	color: #ffffff;
}

/* =========================================================
   Japanese font stack
   ========================================================= */

:lang(ja) {
	font-family: "メイリオ", Meiryo, "Meiryo UI", "Yu Gothic", "Open Sans", sans-serif;
}

/* =========================================================
   Dateline
   ========================================================= */

.dateline {
	margin: 0;
}

/* =========================================================
   WPForms
   ========================================================= */

.wpforms-confirmation-container-full a {
	color: rgb(0, 101, 158);
}

.wpforms-confirmation-container-full a:hover {
	color: #666;
}

.psr-compact .wpforms-field {
	padding-bottom: 2px !important;
	padding-top: 2px !important;
}

.psr-compact .wpforms-field ul {
	padding-left: 0;
}

div.wpforms-container-full .wpforms-form .wpforms-field-label-inline {
	word-break: normal !important;
}

/* =========================================================
   Single-post sidebar column spacing
   WP emits the blockGap as a generated <style> in <head>;
   if that injection misses (e.g. template-part context) the
   browser falls back to the default :root :where(.is-layout-flex)
   { gap: 24px }.  Pin the gap explicitly and zero any stray
   margin-block that sneaks in from WP's flow-layout rules.
   ========================================================= */

.single-sidebar {
	gap: 0;
	align-items: stretch; /* stretch all flex children to full column width */
}

.single-sidebar > * {
	margin-block-start: 0;
	margin-block-end: 0;
}

/* Categories dropdown fills full column width */
.single-sidebar .wp-block-categories select {
	width: 100%;
	box-sizing: border-box;
}

/* Breadcrumb top breathing room */
.aioseo-breadcrumbs {
	padding-top: 0.5rem;
}

/* =========================================================
   Sidebar report-rotator carousel (#reportsShow)
   All images are 400×326 (blank-card.png is fully transparent).
   aspect-ratio locks every slide to the same proportional height;
   object-fit: cover fills real photos while transparent slides
   let the item's background colour show through.
   ========================================================= */

#reportsShow .carousel-item {
	aspect-ratio: 400 / 326;
	overflow: hidden;
}

#reportsShow .carousel-item > img,
#reportsShow .card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

#reportsShow .card {
	height: 100%;
	overflow: hidden;
	border: none;
}

/* TPI and Globe slides use .carousel-caption.text-left with an
   inner h-100 layout to place content at top/bottom of the slide.
   Stretch the caption to cover the full slide so h-100 works.
   Padding matches the classic theme's 15% horizontal margin on .carousel-caption. */
#reportsShow .carousel-caption.text-left {
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 0.5rem 15%;
}

/* Make the inner container a flex column so the last row is pushed
   to the bottom (TPI: two rows → top/bottom split; Globe: one row → bottom). */
#reportsShow .carousel-caption.text-left .container-fluid {
	display: flex;
	flex-direction: column;
	height: 100%;
}
#reportsShow .carousel-caption.text-left .container-fluid > .row:last-child {
	margin-top: auto;
}

/* =========================================================
   Product Definitions Guide — sticky segment/application headers
   (/resources/product-definitions-guide, page ID 2817)
   ========================================================= */

/* Segment h2 row actual height: h4 font (~29px) + pt-4 (24px) + pb-2 (8px) ≈ 61px. */
.page-id-2817 {
	--pdg-seg-height: 64px;
}

/* PHP wraps each segment section in this div so sticky children are
   bounded by their own container and un-stick when the section ends. */
.product-segment-section {
	position: relative;
}

/* Segment h2 rows stick at the top of the viewport (admin bar may overlap
   slightly, but the rows are tall enough that text remains readable). */
.page-id-2817 .sticky-top:has(h2) {
	top: 0;
	z-index: 102;
}

/* Application h3 rows stick just below the segment header.
   margin-top provides flow-level spacing above the row; it does not
   affect the visual sticky position (sticky ignores margins). */
.page-id-2817 .sticky-top:has(h3) {
	top: var(--pdg-seg-height);
	z-index: 101;
	margin-top: 2rem;
}

/* Remove browser-default heading margins inside sticky rows.
   The row is set to m-0 but that only clears the div's own margins,
   not the h2/h3 inside it. The original h3 mt-5 is replaced by the
   row's own margin-top set above. */
.page-id-2817 .sticky-top h2,
.page-id-2817 .sticky-top h3 {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

/* prodSlides modal: col-md-6 was designed for a non-modal context and
   limits the carousel to 50% of the dialog width (~400px). Expand it
   to full modal width so the product images display at full size. */
#prodSlides .col-md-6 {
	flex: 0 0 100% !important;
	max-width: 100% !important;
}

/* =========================================================
   Carousel controls — push prev/next outside the slide area
   ========================================================= */

#homeRotate .carousel-control-prev {
	left: -75px;
}

#homeRotate .carousel-control-next {
	right: -75px;
}

#homeRotate .nav {
	gap: 0.25rem 1.5rem;
}

#homeRotate .nav-item {
	margin-left: 0;
	margin-right: 0;
}

/* =========================================================
   Utility classes ported from classic theme Additional CSS
   ========================================================= */

.custom-left-shadow {
	box-shadow: -3px 0 0 0 rgba(140, 38, 51, 1);
}

/* =========================================================
   Float-right inside WP constrained post content
   WP's is-layout-constrained applies margin-right: auto to direct
   children, which can misplace floated elements. Override for buttons
   and links that need to float to the right of the content column.
   ========================================================= */

.wp-block-post-content > .float-right,
.entry-content > .float-right,
.wp-block-post-content .alignright,
.entry-content .alignright,
.post-card .alignright {
	float: right !important;
	margin-right: 0 !important;
	margin-left: 1rem;
	max-width: none !important;
}

.post-card .alignleft {
	float: left;
	margin-left: 0;
	margin-right: 1rem;
	margin-bottom: 0.5rem;
}

/* =========================================================
   Archive filter widget [psr_archive_filter]
   ========================================================= */

.psr-filter {
	width: 100%;
	font-size: 0.875rem;
}

/* Block title */
.psr-filter-title {
	padding: 0.5rem 0.75rem 0.25rem;
	font-weight: 700;
	font-size: 0.9375rem;
	color: var(--wp--preset--color--primary);
	border-bottom: 2px solid #dee2e6;
	margin-bottom: 0.25rem;
	text-align: center;
}

/* Segment dropdown */
.psr-filter-segment {
	padding: 0.6rem 0.75rem;
}

.psr-filter-label {
	display: block;
	font-weight: 600;
	font-size: 0.8125rem;
	color: #212529;
	margin-bottom: 0;
}

.psr-seg-select {
	width: 100%;
}

/* Filter form */
.psr-filter-form {
	padding: 0.4rem 0.75rem 0.5rem;
}

.psr-filter-panel {
	margin-bottom: 0.4rem;
}

.psr-filter-panel-toggle {
	display: flex;
	align-items: center;
	width: 100%;
	background: none;
	border: none;
	border-bottom: 1px solid #dee2e6;
	padding: 0.3rem 0;
	font-weight: 600;
	font-size: 0.8125rem;
	color: #212529;
	cursor: pointer;
	text-align: left;
	gap: 0.4rem;
}

.psr-filter-panel-toggle::after {
	content: '+';
	margin-left: auto;
	color: #6c757d;
	font-size: 1rem;
	line-height: 1;
}

.psr-filter-panel-toggle[aria-expanded="true"]::after {
	content: '\2212'; /* minus sign */
}

/* Checkboxes */
.psr-filter-check {
	display: flex;
	align-items: flex-start;
	gap: 0.3rem;
	padding: 0.1rem 0;
	cursor: pointer;
	font-weight: normal;
	margin-bottom: 0;
	line-height: 1.3;
}

.psr-filter-check input[type="checkbox"] {
	flex-shrink: 0;
	margin-top: 0.2em;
}

.psr-filter-depth-1 { padding-left: 1rem; }
.psr-filter-depth-2 { padding-left: 1.75rem; }
.psr-filter-depth-3 { padding-left: 2.5rem; }

/* Actions */
.psr-filter-actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding-top: 0.5rem;
}

.psr-filter-reset {
	font-size: 0.8rem;
	color: #6c757d;
}

.psr-filter-reset:hover {
	color: #495057;
	text-decoration: none;
}
