/**
 * Professional presentation layer — typography, depth, motion.
 * Loaded after blocks.css. Safe to tweak tokens here for client reviews.
 */

:root {
	--sa-radius: 12px;
	--sa-radius-sm: 10px;
	--sa-elev-1: 0 4px 24px rgba(15, 23, 42, 0.07);
	--sa-elev-2: 0 12px 40px rgba(15, 23, 42, 0.11);
	--sa-border: rgba(148, 163, 184, 0.35);
	--sa-text: #1e293b;
	--sa-muted: #64748b;
}

body {
	color: var(--sa-text);
}

/* —— Header —— */
.top-area .wp-block-columns.has-background {
	border-radius: var(--sa-radius-sm);
	border: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
	backdrop-filter: saturate(1.2) blur(10px);
	-webkit-backdrop-filter: saturate(1.2) blur(10px);
}

.top-area .wp-block-navigation .wp-block-navigation-item a {
	transition: color 0.2s ease, opacity 0.2s ease;
	letter-spacing: 0.02em;
	font-size: 0.95rem;
}

.top-area .wp-block-navigation .wp-block-navigation-item a:hover {
	opacity: 0.95;
}

/* What we do page — balanced grid + cards */
.what-we-do-section {
	padding-top: var(--wp--preset--spacing--50, 1.75rem) !important;
	padding-bottom: var(--wp--preset--spacing--50, 1.75rem) !important;
}

.what-we-do-section > .wp-block-group {
	max-width: 62rem;
	margin-left: auto;
	margin-right: auto;
}

.what-we-do-section > .wp-block-group > .wp-block-heading {
	font-size: clamp(1.85rem, 4.2vw, 2.35rem) !important;
}

.what-we-do-section .wp-block-columns {
	gap: var(--wp--preset--spacing--40, 1.35rem) !important;
}

.what-we-do-section .story-card {
	padding: 1.35rem 1.4rem !important;
}

.what-we-do-section .story-card h4 {
	font-size: 1.15rem !important;
}

.what-we-do-section .story-card p {
	font-size: 0.9375rem !important;
	line-height: 1.6 !important;
}

/* —— Story / blog cards —— */
.what-we-do-section .story-card,
.blog-area .post-main-area {
	border-radius: var(--sa-radius) !important;
	border-color: var(--sa-border) !important;
	transition: box-shadow 0.28s ease, transform 0.28s ease, border-color 0.28s ease;
}

.what-we-do-section .story-card:hover,
.blog-area .post-main-area:hover {
	box-shadow: var(--sa-elev-2) !important;
	transform: translateY(-3px);
	border-color: rgba(15, 118, 110, 0.25) !important;
}

.what-we-do-section .story-card h4,
.blog-area .post-main-area .wp-block-post-title {
	letter-spacing: -0.02em;
	line-height: 1.3;
}

.what-we-do-section .story-card p a {
	font-weight: 500;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.what-we-do-section .story-card p a:hover {
	border-bottom-color: currentColor;
}

/* —— Section headings —— */
.what-we-do-section > .wp-block-group > .wp-block-group h2 {
	letter-spacing: -0.035em;
	font-weight: 700;
}

/* —— Buttons —— */
.wp-block-button .wp-block-button__link {
	transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
	box-shadow: 0 2px 12px rgba(15, 23, 42, 0.12);
}

.wp-block-button .wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(15, 23, 42, 0.18);
}

/* —— Footer —— */
.has-primary-background-color .footer-div a {
	transition: color 0.2s ease, opacity 0.2s ease;
}

.has-primary-background-color .footer-div a:hover {
	opacity: 0.95;
}

.has-primary-background-color .footer-div h3 {
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-size: 0.85rem !important;
	opacity: 0.95;
}

/* —— Search in header —— */
.top-area .wp-block-search__button {
	border-radius: 8px;
	transition: background 0.2s ease, transform 0.2s ease;
}

/* —— Caritas homepage sections —— */
.ca-landing-services h2,
.ca-landing-team-cta h2,
.ca-landing-partners h2 {
	margin-bottom: 0.35em;
}

/* Our services — layered background + glass grid */
.ca-landing-services--layered {
	background: linear-gradient(165deg, #f8fafc 0%, #e2e8f0 38%, #f1f5f9 72%, #f8fafc 100%);
}

.ca-services-grid-main.is-layout-grid,
.ca-services-grid-pillars.is-layout-grid {
	gap: clamp(0.100rem, 2vw, 1.9rem) !important;
	align-items: stretch;
}

/* Fallback if theme does not print is-layout-grid on the group */
.ca-services-grid-main:not(.is-layout-grid) {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
	gap: clamp(0.85rem, 2vw, 1.4rem);
	align-items: stretch;
}

.ca-services-grid-pillars:not(.is-layout-grid) {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
	gap: clamp(0.75rem, 1.7vw, 1.2rem);
	align-items: stretch;
}

.ca-landing-services .ca-services-glass:not(.ca-services-glass--compact) {
	padding: 1.375rem 1.5rem !important;
}

.ca-landing-services .ca-services-glass--compact {
	padding: 1.125rem 1.2rem !important;
}

.ca-services-glass {
	background: rgba(255, 255, 255, 0.4);
	border: 1px solid rgba(255, 255, 255, 0.75);
	box-shadow:
		0 4px 28px rgba(15, 23, 42, 0.06),
		inset 0 1px 0 rgba(255, 255, 255, 0.7);
	backdrop-filter: blur(14px) saturate(1.15);
	-webkit-backdrop-filter: blur(14px) saturate(1.15);
	transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
	height: 100%;
	box-sizing: border-box;
}

.ca-services-glass:hover {
	background: rgba(255, 255, 255, 0.56);
	border-color: rgba(255, 255, 255, 0.9);
	box-shadow:
		0 12px 40px rgba(15, 23, 42, 0.09),
		inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.ca-services-glass--compact {
	background: rgba(255, 255, 255, 0.28);
}

.ca-services-glass--compact:hover {
	background: rgba(255, 255, 255, 0.44);
}

.ca-services-glass a {
	color: var(--wp--preset--color--extra-primary, #0d9488);
	text-decoration: none;
	font-weight: 600;
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.ca-services-glass a:hover {
	border-bottom-color: currentColor;
}

.ca-landing-vm h2 {
	margin-bottom: 0;
}

.ca-landing-cdjp {
	border-top: 1px solid rgba(148, 163, 184, 0.35);
}

/* CDJP — balanced grid (Vision | Mission, then Values) */
.ca-landing-cdjp .ca-cdjp-square-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(0.90rem, 1.6vw, 1.5rem);
	margin-top: var(--wp--preset--spacing--50, 1.75rem);
	margin-left: auto;
	margin-right: auto;
	max-width: 44rem;
	align-items: stretch;
}

.ca-landing-cdjp .ca-cdjp-square-grid.is-layout-grid {
	gap: clamp(0.65rem, 1.6vw, 1.05rem) !important;
}

.ca-landing-cdjp .ca-cdjp-cell {
	background: rgba(255, 255, 255, 0.72);
	box-sizing: border-box;
	min-height: 0;
	aspect-ratio: auto;
	max-height: none;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	overflow: visible;
	box-shadow: 0 2px 16px rgba(15, 23, 42, 0.04);
	transition: box-shadow 0.25s ease, background 0.25s ease;
	padding: 1.35rem 1.45rem !important;
}

.ca-landing-cdjp .ca-cdjp-cell p {
	font-size: 0.9375rem !important;
	line-height: 1.62 !important;
}

.ca-landing-cdjp .ca-cdjp-cell p.has-text-color:first-of-type {
	font-size: 0.7rem !important;
	margin-bottom: 0.45rem !important;
}

.ca-landing-cdjp .ca-cdjp-cell:hover {
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 8px 28px rgba(15, 23, 42, 0.07);
}

.ca-landing-cdjp .ca-cdjp-cell--values {
	grid-column: 1 / -1;
	aspect-ratio: auto;
	min-height: auto;
	overflow: visible;
	padding: 1.2rem 1.4rem !important;
}

.ca-landing-cdjp .ca-cdjp-cell--values .wp-block-list {
	font-size: 0.875rem !important;
	margin: 0;
}

.ca-landing-cdjp .ca-cdjp-cell--values .wp-block-columns {
	margin-bottom: 0;
}

.ca-landing-partners p a {
	color: var(--wp--preset--color--extra-primary, #0d9488);
	text-decoration: none;
	font-weight: 600;
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.ca-landing-partners p a:hover {
	border-bottom-color: currentColor;
}

@media (max-width: 600px) {
	.ca-landing-cdjp .ca-cdjp-square-grid {
		grid-template-columns: 1fr;
		max-width: 26rem;
	}

	.ca-landing-cdjp .ca-cdjp-cell {
		min-height: 0;
	}

	.ca-landing-cdjp .ca-cdjp-cell--values {
		grid-column: auto;
	}
}

/* CARITAS — vertical glass stack (Vision / Mission / Values) */
.ca-landing-caritas-vertical {
	background: linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, rgba(226, 232, 240, 0.55) 45%, rgba(241, 245, 249, 0.9) 100%);
}

.ca-landing-caritas-vertical h2 {
	margin-bottom: 0.15em;
}

.ca-vm-stack {
	display: flex;
	flex-direction: column;
	gap: clamp(0.7rem, 1.8vw, 1.15rem);
	margin-top: var(--wp--preset--spacing--50, 1.75rem);
	max-width: 39rem;
	margin-left: auto;
	margin-right: auto;
}

.ca-vm-stack.is-layout-flex.is-vertical {
	gap: clamp(0.7rem, 1.8vw, 1.15rem);
}

.ca-landing-caritas-vertical .ca-vm-glass-row {
	padding: 1.35rem 1.45rem !important;
	border-radius: 12px !important;
}

.ca-vm-glass-row {
	background: rgba(255, 255, 255, 0.22);
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-left: 3px solid rgba(13, 148, 136, 0.45);
	box-shadow: 0 4px 28px rgba(15, 23, 42, 0.04);
	backdrop-filter: blur(12px) saturate(1.1);
	-webkit-backdrop-filter: blur(12px) saturate(1.1);
	transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.ca-vm-glass-row:hover {
	background: rgba(255, 255, 255, 0.38);
	border-left-color: rgba(13, 148, 136, 0.65);
	box-shadow: 0 10px 36px rgba(15, 23, 42, 0.07);
}

.ca-landing-caritas-vertical .ca-vm-label {
	margin-top: 0;
	margin-bottom: 0.5rem;
	color: rgba(13, 148, 136, 0.72);
	font-size: 0.7rem !important;
	letter-spacing: 0.18em !important;
}

.ca-landing-caritas-vertical .ca-vm-body {
	margin: 0;
	color: rgba(30, 41, 59, 0.68);
	letter-spacing: 0.01em;
	font-size: 1rem !important;
	line-height: 1.65 !important;
}

/* —— Reduced motion —— */
@media (prefers-reduced-motion: reduce) {
	.ca-vm-glass-row {
		transition: none;
	}
	.ca-vm-glass-row:hover {
		background: rgba(255, 255, 255, 0.22);
		box-shadow: 0 4px 28px rgba(15, 23, 42, 0.04);
	}
	.ca-landing-cdjp .ca-cdjp-cell {
		transition: none;
	}
	.ca-landing-cdjp .ca-cdjp-cell:hover {
		box-shadow: 0 2px 16px rgba(15, 23, 42, 0.04);
	}
	.ca-services-glass,
	.ca-services-glass--compact {
		transition: none;
	}
	.ca-services-glass:hover,
	.ca-services-glass--compact:hover {
		background: rgba(255, 255, 255, 0.4);
		box-shadow: 0 4px 28px rgba(15, 23, 42, 0.06);
	}
	.what-we-do-section .story-card,
	.blog-area .post-main-area,
	.wp-block-button .wp-block-button__link {
		transition: none;
	}
	.what-we-do-section .story-card:hover,
	.blog-area .post-main-area:hover {
		transform: none;
	}
	.wp-block-button .wp-block-button__link:hover {
		transform: none;
	}
}
