/* ============================================================
   PQA Resources block
   Reuses .resource-card / .resource-icon / .resource-grid /
   .resource-section-header / .notice-banner from style.css and
   layers on: fully clickable cards, logo icon slot, PQA Partner
   badge, and an image (hero) mode that reveals the basic content
   on hover. All rules are scoped to .pqa-resources so the legacy
   template is left untouched.
   ============================================================ */

/* The block adds no section padding of its own — it flows inside whatever
   PQA Container / column it is placed in. The first section header sits flush
   with the top of the block; the parent section's padding handles the space
   above it. */
.pqa-resources .resource-section-header:first-of-type {
	margin-top: 0;
}

/* Section header/footer notice text is run through wpautop, which wraps it in
   a <p>. Strip that paragraph's outer margins so it doesn't add extra space
   above/below the notice box's own padding. */
.pqa-resources .notice-banner p:first-child {
	margin-top: 0;
}

.pqa-resources .notice-banner p:last-child {
	margin-bottom: 0;
}

/* When the block follows another block in the same column, separate it with
   the same rhythm used between resource sections (matches how stacked blocks
   space themselves within a container). */
.pqa-resources:not(:first-child) {
	margin-top: 3rem;
}

/* ── Clickable card (anchor) ─────────────────────────────────── */
.pqa-resources .resource-card {
	display: block;
	position: relative;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	cursor: pointer;
}

.pqa-resources .resource-card:focus-visible {
	outline: 2px solid var(--pqa-accent-blue);
	outline-offset: 2px;
}

.pqa-resources .resource-card__inner {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
}

.pqa-resources .resource-body {
	flex: 1;
	min-width: 0;
}

.pqa-resources .resource-body h3 {
	white-space: normal;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
}

/* Phone + link render as spans (the whole card is the link) but keep
   the original look of .resource-body a. */
.pqa-resources .resource-phone {
	display: block;
	font-size: 0.8rem;
	color: var(--pqa-text-mid);
	margin-top: 0.4rem;
}

.pqa-resources .resource-link {
	display: inline-block;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--pqa-accent-blue);
	margin-top: 0.4rem;
}

/* ── Logo in the icon slot ───────────────────────────────────── */
/* The logo fills the entire icon box edge-to-edge; overflow:hidden on the box
   clips it to the rounded corners. */
.pqa-resources .resource-icon {
	overflow: hidden;
	padding: 0;
}

/* Drop the light-navy fill when a logo image is present so transparent logos
   sit on the card background rather than a colored tile. Emoji icons keep it. */
.pqa-resources .resource-icon:has(img) {
	background-color: transparent;
}

.pqa-resources .resource-icon img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ── PQA Partner badge ───────────────────────────────────────── */
.pqa-resources .resource-partner-badge {
	display: inline-block;
	font-size: 0.6rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1;
	color: var(--pqa-white);
	background-color: var(--pqa-accent-blue);
	padding: 0.28rem 0.5rem;
	border-radius: 999px;
	white-space: nowrap;
}

/* Light-blue partner border on every partner card (basic and image). In image
   mode it frames the hero at rest and stays on the revealed card behind it. */
.pqa-resources .resource-card--partner {
	border-color: rgba(58, 186, 249, 0.55);
}

/* Partner badge pinned onto the hero layer. Because it lives inside
   .resource-card__hero, it slides up together with the image on hover. */
.pqa-resources .resource-partner-badge--on-hero {
	position: absolute;
	top: 0.85rem;
	left: 0.85rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

/* ── Image (hero) mode ───────────────────────────────────────── */
/* The card renders the standard basic layout, and the hero image sits on top
   as a full-cover overlay. On hover/focus the hero slides up out of view,
   revealing the standard layout (including the PQA Partner badge) behind it.
   The card's overflow:hidden clips the sliding hero to the rounded corners. */
.pqa-resources .resource-card__hero {
	position: absolute;
	inset: 0;
	z-index: 2;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-color: var(--pqa-navy);
	transform: translateY(0);
	transition: transform 0.35s ease;
}

.pqa-resources .resource-card--image:hover .resource-card__hero,
.pqa-resources .resource-card--image:focus-visible .resource-card__hero,
.pqa-resources .resource-card--image:focus-within .resource-card__hero {
	transform: translateY(-100%);
}

/* Reduced-motion: reveal instantly instead of sliding. */
@media (prefers-reduced-motion: reduce) {
	.pqa-resources .resource-card__hero {
		transition: none;
	}
}
