/**
 * Front-end Gutenberg block styles — pages, posts and index fallback.
 * Homepage sections in front-page.php are unchanged; this targets .ucfe-entry-content.
 */

.ucfe-homepage-gutenberg {
	width: 100%;
}

.ucfe-homepage-gutenberg .wp-block-html {
	margin: 0;
}

.ucfe-entry-content,
.entry-content,
.wp-block-post-content {
	--ucfe-content-max: 720px;
	--ucfe-wide-max: 1320px;
}

.ucfe-page {
	padding-top: 140px;
	padding-bottom: 120px;
	min-height: 60vh;
}

.ucfe-article-header {
	margin-bottom: 2.5rem;
	max-width: var(--ucfe-wide-max);
}

.ucfe-article-meta {
	margin-top: 1rem;
	font-size: 0.875rem;
	color: var(--mute);
}

/* Pattern utility classes on the front end */
.ucfe-entry-content .ucfe-kicker,
.entry-content .ucfe-kicker {
	font-family: var(--sans);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.36em;
	text-transform: uppercase;
	color: var(--gold);
	display: inline-flex;
	align-items: center;
	gap: 14px;
}

.ucfe-entry-content .ucfe-kicker::before,
.entry-content .ucfe-kicker::before {
	content: "";
	width: 30px;
	height: 1px;
	background: var(--gold);
}

.ucfe-entry-content .ucfe-kicker.solo::before,
.entry-content .ucfe-kicker.solo::before {
	display: none;
}

.ucfe-entry-content .ucfe-display,
.entry-content .ucfe-display {
	font-size: clamp(2.4rem, 6vw, 5rem);
	letter-spacing: -0.035em;
}

.ucfe-entry-content .ucfe-h2,
.entry-content .ucfe-h2 {
	font-size: clamp(2rem, 4.5vw, 3.5rem);
}

.ucfe-entry-content .ucfe-lead,
.entry-content .ucfe-lead {
	font-size: clamp(1.05rem, 1.6vw, 1.35rem);
	color: var(--mute);
	font-weight: 300;
	max-width: 60ch;
	line-height: 1.6;
}

.ucfe-entry-content .ucfe-lead-light,
.entry-content .ucfe-lead-light {
	color: var(--mute-d);
	max-width: 60ch;
	line-height: 1.6;
}

/* Block flow */
.ucfe-entry-content > *,
.entry-content > *,
.wp-block-post-content > * {
	margin-top: 0;
	margin-bottom: 1.5rem;
}

.ucfe-entry-content > *:last-child,
.entry-content > *:last-child,
.wp-block-post-content > *:last-child {
	margin-bottom: 0;
}

.ucfe-entry-content h1,
.ucfe-entry-content h2,
.ucfe-entry-content h3,
.ucfe-entry-content h4,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.wp-block-post-content h1,
.wp-block-post-content h2,
.wp-block-post-content h3,
.wp-block-post-content h4 {
	font-family: var(--serif);
	font-weight: 400;
	line-height: 1.08;
	letter-spacing: -0.02em;
	margin-bottom: 1rem;
}

.ucfe-entry-content p,
.entry-content p,
.wp-block-post-content p {
	max-width: 68ch;
}

.ucfe-entry-content em,
.entry-content em,
.wp-block-post-content em {
	font-style: italic;
	color: var(--gold-2);
}

.ucfe-entry-content a:not(.wp-block-button__link),
.entry-content a:not(.wp-block-button__link),
.wp-block-post-content a:not(.wp-block-button__link) {
	color: var(--gold);
	text-decoration: underline;
	text-underline-offset: 0.15em;
	transition: color 0.3s ease;
}

.ucfe-entry-content a:not(.wp-block-button__link):hover,
.entry-content a:not(.wp-block-button__link):hover,
.wp-block-post-content a:not(.wp-block-button__link):hover {
	color: var(--gold-2);
}

/* Lists */
.ucfe-entry-content ul,
.ucfe-entry-content ol,
.entry-content ul,
.entry-content ol,
.wp-block-post-content ul,
.wp-block-post-content ol {
	padding-left: 1.4rem;
	color: var(--mute);
	max-width: 68ch;
}

.ucfe-entry-content li + li,
.entry-content li + li,
.wp-block-post-content li + li {
	margin-top: 0.5rem;
}

/* Quotes */
.ucfe-entry-content blockquote,
.ucfe-entry-content .wp-block-quote,
.entry-content blockquote,
.entry-content .wp-block-quote,
.wp-block-post-content blockquote,
.wp-block-post-content .wp-block-quote {
	border-left: 3px solid var(--gold);
	padding: 0.25rem 0 0.25rem 1.5rem;
	margin: 2rem 0;
	font-family: var(--serif);
	font-size: clamp(1.2rem, 2vw, 1.6rem);
	color: var(--ink);
}

.ucfe-entry-content .wp-block-pullquote,
.entry-content .wp-block-pullquote,
.wp-block-post-content .wp-block-pullquote {
	border-top: 2px solid var(--gold);
	border-bottom: 2px solid var(--gold);
	padding: 2rem 0;
	font-family: var(--serif);
	text-align: center;
}

.ucfe-entry-content .wp-block-pullquote cite,
.entry-content .wp-block-pullquote cite,
.wp-block-post-content .wp-block-pullquote cite {
	color: var(--mute);
	font-size: 0.875rem;
	font-style: normal;
}

/* Separators */
.ucfe-entry-content hr,
.ucfe-entry-content .wp-block-separator,
.entry-content hr,
.entry-content .wp-block-separator,
.wp-block-post-content hr,
.wp-block-post-content .wp-block-separator {
	border: none;
	border-top: 1px solid rgba(202, 168, 106, 0.35);
	margin: 2.5rem auto;
	max-width: 120px;
}

/* Buttons */
.ucfe-entry-content .wp-block-button__link,
.entry-content .wp-block-button__link,
.wp-block-post-content .wp-block-button__link {
	border-radius: 2px;
	font-family: var(--sans);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	padding: 17px 34px;
	transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1), box-shadow 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.ucfe-entry-content .wp-block-button__link:hover,
.entry-content .wp-block-button__link:hover,
.wp-block-post-content .wp-block-button__link:hover {
	transform: translateY(-3px);
	box-shadow: 0 20px 50px -16px rgba(202, 168, 106, 0.55);
}

.ucfe-entry-content .wp-block-button:not(.is-style-outline) .wp-block-button__link,
.entry-content .wp-block-button:not(.is-style-outline) .wp-block-button__link,
.wp-block-post-content .wp-block-button:not(.is-style-outline) .wp-block-button__link {
	background: var(--gold);
	color: var(--bg);
	border: 1px solid var(--gold);
}

.ucfe-entry-content .wp-block-button.is-style-outline .wp-block-button__link,
.entry-content .wp-block-button.is-style-outline .wp-block-button__link,
.wp-block-post-content .wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--ink);
	border: 1px solid var(--gold);
}

/* Images & media */
.ucfe-entry-content .wp-block-image img,
.entry-content .wp-block-image img,
.wp-block-post-content .wp-block-image img {
	border-radius: 2px;
}

.ucfe-entry-content .wp-block-image figcaption,
.entry-content .wp-block-image figcaption,
.wp-block-post-content .wp-block-image figcaption {
	color: var(--mute);
	font-size: 0.875rem;
	margin-top: 0.75rem;
}

.ucfe-entry-content .wp-block-gallery,
.entry-content .wp-block-gallery,
.wp-block-post-content .wp-block-gallery {
	gap: 1rem;
}

.ucfe-entry-content .wp-block-embed,
.entry-content .wp-block-embed,
.wp-block-post-content .wp-block-embed {
	margin: 2rem 0;
}

/* Tables */
.ucfe-entry-content .wp-block-table table,
.entry-content .wp-block-table table,
.wp-block-post-content .wp-block-table table {
	border-collapse: collapse;
	width: 100%;
}

.ucfe-entry-content .wp-block-table th,
.ucfe-entry-content .wp-block-table td,
.entry-content .wp-block-table th,
.entry-content .wp-block-table td,
.wp-block-post-content .wp-block-table th,
.wp-block-post-content .wp-block-table td {
	border: 1px solid var(--line-soft);
	padding: 0.75rem 1rem;
}

.ucfe-entry-content .wp-block-table th,
.entry-content .wp-block-table th,
.wp-block-post-content .wp-block-table th {
	background: var(--panel);
	color: var(--gold);
	font-weight: 600;
	text-align: left;
}

/* Groups with theme palette backgrounds */
.ucfe-entry-content .has-paper-background-color,
.entry-content .has-paper-background-color,
.wp-block-post-content .has-paper-background-color {
	color: var(--ink-d);
}

.ucfe-entry-content .has-paper-background-color em,
.entry-content .has-paper-background-color em,
.wp-block-post-content .has-paper-background-color em {
	color: var(--gold-deep);
}

.ucfe-entry-content .has-paper-background-color .ucfe-lead,
.entry-content .has-paper-background-color .ucfe-lead,
.wp-block-post-content .has-paper-background-color .ucfe-lead {
	color: var(--mute-d);
}

.ucfe-entry-content .has-panel-background-color,
.entry-content .has-panel-background-color,
.wp-block-post-content .has-panel-background-color {
	border: 1px solid var(--line-soft);
}

/* Wide & full alignment */
.ucfe-entry-content .alignwide,
.entry-content .alignwide,
.wp-block-post-content .alignwide {
	max-width: var(--ucfe-wide-max);
	margin-left: auto;
	margin-right: auto;
}

.ucfe-entry-content .alignfull,
.entry-content .alignfull,
.wp-block-post-content .alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.ucfe-entry-content .aligncenter,
.entry-content .aligncenter,
.wp-block-post-content .aligncenter {
	margin-left: auto;
	margin-right: auto;
}

/* Columns */
.ucfe-entry-content .wp-block-columns,
.entry-content .wp-block-columns,
.wp-block-post-content .wp-block-columns {
	gap: 2rem;
}

/* Cover blocks */
.ucfe-entry-content .wp-block-cover,
.entry-content .wp-block-cover,
.wp-block-post-content .wp-block-cover {
	border-radius: 2px;
	min-height: 320px;
}

/* Code & preformatted */
.ucfe-entry-content code,
.entry-content code,
.wp-block-post-content code {
	background: var(--panel);
	padding: 0.15em 0.4em;
	border-radius: 2px;
	font-size: 0.9em;
}

.ucfe-entry-content pre,
.ucfe-entry-content .wp-block-code,
.entry-content pre,
.entry-content .wp-block-code,
.wp-block-post-content pre,
.wp-block-post-content .wp-block-code {
	background: var(--panel);
	border: 1px solid var(--line-soft);
	padding: 1.25rem;
	border-radius: 2px;
	overflow-x: auto;
}

/* Light section on dark page body */
.ucfe-entry-content .has-paper-background-color a:not(.wp-block-button__link),
.entry-content .has-paper-background-color a:not(.wp-block-button__link),
.wp-block-post-content .has-paper-background-color a:not(.wp-block-button__link) {
	color: var(--gold-deep);
}

@media (max-width: 768px) {
	.ucfe-page {
		padding-top: 120px;
		padding-bottom: 80px;
	}

	.ucfe-entry-content .alignfull,
	.entry-content .alignfull,
	.wp-block-post-content .alignfull {
		width: 100%;
		max-width: 100%;
		margin-left: 0;
		margin-right: 0;
	}
}
