.sheen-flex-item {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	overflow: visible !important;
	justify-content: flex-start !important;
}

.sheen-flex-item.has-shadow {
	transition: box-shadow 0.25s ease, transform 0.25s ease !important;
}

.has-shadow.has-shadow-soft,
.has-shadow.has-shadow-soft .sheen-link-card { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important; }
.has-shadow.has-shadow-soft:hover,
.has-shadow.has-shadow-soft:hover .sheen-link-card { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important; }

.has-shadow.has-shadow-subtle,
.has-shadow.has-shadow-subtle .sheen-link-card { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important; }
.has-shadow.has-shadow-subtle:hover,
.has-shadow.has-shadow-subtle:hover .sheen-link-card { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12) !important; }

.has-shadow.has-shadow-medium,
.has-shadow.has-shadow-medium .sheen-link-card { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important; }
.has-shadow.has-shadow-medium:hover,
.has-shadow.has-shadow-medium:hover .sheen-link-card { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16) !important; }

.has-shadow.has-shadow-strong,
.has-shadow.has-shadow-strong .sheen-link-card { box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18) !important; }
.has-shadow.has-shadow-strong:hover,
.has-shadow.has-shadow-strong:hover .sheen-link-card { box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22) !important; }

.has-shadow.has-shadow-intense,
.has-shadow.has-shadow-intense .sheen-link-card { box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25) !important; }
.has-shadow.has-shadow-intense:hover,
.has-shadow.has-shadow-intense:hover .sheen-link-card { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.30) !important; }

/* Stack direct child elements vertically with clean, compact spacing on the frontend */
.sheen-flex-item > * {
	margin-top: 0;
	margin-bottom: 8px;
}

.sheen-flex-item > *:last-child {
	margin-bottom: 0;
}

/* Default typography rules for children inside flex-items to normalize layout */
.sheen-flex-item p,
.editor-styles-wrapper .wp-block-sheen-blocks-flex-item p {
	font-size: 15px;
	line-height: 1.6;
}

.sheen-flex-item h1,
.editor-styles-wrapper .wp-block-sheen-blocks-flex-item h1 { font-size: 32px; font-weight: 700; line-height: 1.25; margin-bottom: 12px; }
.sheen-flex-item h2,
.editor-styles-wrapper .wp-block-sheen-blocks-flex-item h2 { font-size: 24px; font-weight: 700; line-height: 1.3; margin-bottom: 12px; }
.sheen-flex-item h3,
.editor-styles-wrapper .wp-block-sheen-blocks-flex-item h3 { font-size: 18px; font-weight: 700; line-height: 1.4; margin-bottom: 8px; }
.sheen-flex-item h4,
.editor-styles-wrapper .wp-block-sheen-blocks-flex-item h4 { font-size: 16px; font-weight: 600; line-height: 1.4; margin-bottom: 8px; }

/* Universal Hover Effect for all Linked Flex Items */
a.sheen-flex-item,
a.sheen-flex-item:hover,
a.sheen-flex-item *,
a.sheen-flex-item:hover * {
	text-decoration: none !important;
}

a.sheen-flex-item {
	position: relative;
	color: inherit !important;
	transition: all 0.25s ease !important;
}

/* Universal Dark Overlay Tint for all backgrounds */
a.sheen-flex-item::after {
	content: '';
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.12);
	opacity: 0;
	transition: opacity 0.25s ease;
	pointer-events: none;
	border-radius: inherit;
	z-index: 2;
}

/* High-specificity hover state for solid buttons & cards */
a.sheen-flex-item:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
	filter: brightness(0.92) !important;
}

/* Solid UGM Primary background hover */
a.sheen-flex-item.has-ugm-primary-background-color:hover {
	background-color: #052c4a !important; /* Rich Darker Navy Hover */
	filter: none !important;
}

/* Outline / Transparent button hover (e.g. Compare programs) */
a.sheen-flex-item:not(.has-background):hover,
a.sheen-flex-item.has-border-color:not(.has-background):hover {
	background-color: rgba(0,0,0,0.04) !important; /* Soft light gray hover */
	filter: none !important;
}

a.sheen-flex-item:hover::after {
	opacity: 1;
}

/* Text-only linked flex items (sole child is a p/heading, e.g. form download
   links on Student Affairs): give the text itself hover feedback — the card
   has no surface to lift, so color + underline carry the affordance. */
a.sheen-flex-item > :is(p, h1, h2, h3, h4, h5, h6):only-child {
	text-decoration: none !important;
	transition: color 0.15s ease;
}
a.sheen-flex-item:hover > :is(p, h1, h2, h3, h4, h5, h6):only-child {
	color: var(--wp--preset--color--ugm-primary, #073C64) !important;
	text-decoration: underline !important;
	text-underline-offset: 0.18em;
}

/* Linked flex items with heading + paragraph (e.g. curriculum doc cards):
   title underline must survive the universal none (a.sheen-flex-item *
   carries !important), and the title is often already UGM-primary navy —
   so the visible hover affordance is the underline, not a color change. */
a.sheen-flex-item:hover > :is(h1, h2, h3, h4) {
	text-decoration: underline !important;
	text-underline-offset: 0.18em;
}

/* If the child is a Link Card block, make it grow and fill height */
.sheen-flex-item .wp-block-sheen-blocks-link-card,
.sheen-flex-item .sheen-link-card {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}

.sheen-flex-item .sheen-link-card-wrap {
	flex-grow: 1;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.editor-styles-wrapper .wp-block-sheen-blocks-flex-item {
	box-sizing: border-box;
	display: flex !important;
	flex-direction: column !important;
}

/* Ensure intermediate Gutenberg wrappers stretch vertically to fill the column height */
.editor-styles-wrapper .wp-block-sheen-blocks-flex-item > .sheen-flex-item-editor-border,
.editor-styles-wrapper .wp-block-sheen-blocks-flex-item > .sheen-flex-item-editor-border > .block-editor-inner-blocks,
.editor-styles-wrapper .wp-block-sheen-blocks-flex-item > .sheen-flex-item-editor-border > .block-editor-inner-blocks > .block-editor-block-list__layout {
	display: flex !important;
	flex-direction: column !important;
	flex-grow: 1 !important;
	width: 100% !important;
	justify-content: flex-start !important;
}

/* Make direct inner child blocks stack vertically in the editor without growing */
.editor-styles-wrapper .wp-block-sheen-blocks-flex-item > .sheen-flex-item-editor-border > .block-editor-inner-blocks > .block-editor-block-list__layout > .wp-block {
	display: block !important;
	width: 100% !important;
	margin-top: 0;
	margin-bottom: 8px;
}

.editor-styles-wrapper .wp-block-sheen-blocks-flex-item > .sheen-flex-item-editor-border > .block-editor-inner-blocks > .block-editor-block-list__layout > .wp-block-sheen-blocks-link-card,
.editor-styles-wrapper .wp-block-sheen-blocks-flex-item > .sheen-flex-item-editor-border > .block-editor-inner-blocks > .block-editor-block-list__layout > .sheen-link-card,
.editor-styles-wrapper .wp-block-sheen-blocks-flex-item .sheen-link-card-wrap {
	display: flex !important;
	flex-direction: column !important;
	flex-grow: 1 !important;
	height: 100% !important;
}

/* Prevent Flex Items from collapsing to 0px height in vertical column layouts */
.sheen-flex-dir-column > .sheen-flex-item,
.sheen-flex-dir-column-reverse > .sheen-flex-item,
/* Editor specific targeting */
.wp-block-sheen-blocks-flex.sheen-flex-dir-column > .block-editor-inner-blocks > .block-editor-block-list__layout > .wp-block-sheen-blocks-flex-item,
.wp-block-sheen-blocks-flex.sheen-flex-dir-column-reverse > .block-editor-inner-blocks > .block-editor-block-list__layout > .wp-block-sheen-blocks-flex-item {
	flex-basis: auto !important;
}

/* Same fix for mobile-stacked row layouts (mobileStack:true switches via CSS class) */
@media (max-width: 767px) {
	.sheen-flex-mobile-stack > .sheen-flex-item,
	.wp-block-sheen-blocks-flex.sheen-flex-mobile-stack > .block-editor-inner-blocks > .block-editor-block-list__layout > .wp-block-sheen-blocks-flex-item {
		flex-basis: auto !important;
	}
}

/* Hover feedback: underline-on-hover for plain content links inside flex items
   (e.g. Documentation card: Faculty Profile / Foresight). Static = no underline. */
.sheen-flex-item ul li a {
	text-decoration: none;
	transition: color 0.15s ease;
}
.sheen-flex-item ul li a:hover,
.sheen-flex-item ul li a:focus-visible {
	color: var(--wp--preset--color--ugm-primary, #073C64);
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

/* Equal-height rows: stretch each item's inner card to fill the tallest item */
.sheen-flex-equal-height > .sheen-flex-item {
	height: auto !important;
}
.sheen-flex-equal-height > .sheen-flex-item .sheen-link-card,
.sheen-flex-equal-height > .sheen-flex-item .sheen-content-card,
.sheen-flex-equal-height > .sheen-flex-item .sheen-event-card {
	height: 100% !important;
	display: flex;
	flex-direction: column;
}
.sheen-flex-equal-height > .sheen-flex-item .sheen-link-card .sheen-link-card-content,
.sheen-flex-equal-height > .sheen-flex-item .sheen-content-card .sheen-content-card-content,
.sheen-flex-equal-height > .sheen-flex-item .sheen-event-card .sheen-event-card-content {
	flex: 1;
	display: flex;
	flex-direction: column;
}
