/* ---------------------------------------------------------------------
 * FC-019 — Corporate / About page.
 *
 * Loaded only where the "Kurumsal / Hakkımızda" page template is assigned
 * (see inc/corporate.php). Every selector stays anchored to .corporate-page
 * so the sheet cannot reach WooCommerce, blog or generic page surfaces even
 * if the enqueue condition is ever widened.
 *
 * Colours come from tokens.css only: cream page ground, white content
 * surface, brand green for hierarchy, copper as a supporting accent.
 * ------------------------------------------------------------------- */

.corporate-page {
	/* Editorial canvas, narrower than the 1280px shell but wide enough for
	   the intro's text + image pair. */
	--fc-corporate-measure: 62rem;
	/* Reading measure for body blocks inside the content surface. */
	--fc-corporate-text: 44rem;
}

.corporate-page.site-main {
	padding-block: var(--fc-space-3) var(--fc-space-5);
}

.corporate-page__article {
	width: min(100%, var(--fc-corporate-measure));
	min-width: 0;
	margin-inline: auto;
}

/* ---------------------------------------------------------------------
 * Head: breadcrumb -> H1 (ADR-010 inner page standard).
 * ------------------------------------------------------------------- */

.corporate-page__head {
	margin: 0 0 var(--fc-space-4);
	text-align: left;
}

.corporate-page__breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: var(--fc-space-1);
	align-items: center;
	margin: 0 0 var(--fc-space-2);
	color: var(--fc-text-muted);
	font-size: 0.86rem;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.corporate-page__breadcrumb a {
	color: var(--fc-text);
	font-weight: 700;
	text-decoration: none;
}

.corporate-page__breadcrumb a:hover {
	text-decoration: underline;
}

.corporate-page__breadcrumb-separator {
	color: var(--fc-brand-accent);
}

/*
 * Global inner-page H1 standard (ADR-010), shared with .shop-archive__title
 * and .blog-single__title: brand primary, 3rem desktop, 1.05 line-height,
 * left aligned. Copper is never used here.
 */
.corporate-page__title {
	margin: 0;
	color: var(--fc-brand-primary);
	font-size: 3rem;
	line-height: 1.05;
	overflow-wrap: anywhere;
	text-wrap: balance;
}

/* ---------------------------------------------------------------------
 * Intro: excerpt copy beside the featured image.
 * Both halves are optional; the grid collapses to whatever exists.
 * ------------------------------------------------------------------- */

.corporate-page__intro {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--fc-space-4);
	align-items: start;
	margin: 0 0 var(--fc-space-4);
}

.corporate-page__intro-text {
	min-width: 0;
	max-width: var(--fc-corporate-text);
	color: var(--fc-text);
	font-size: 1.125rem;
	line-height: 1.75;
	overflow-wrap: break-word;
}

.corporate-page__intro-text p {
	margin: 0 0 1em;
}

.corporate-page__intro-text > :last-child {
	margin-bottom: 0;
}

.corporate-page__media {
	min-width: 0;
	margin: 0;
	overflow: hidden;
	border: 1px solid var(--fc-border);
	border-radius: var(--fc-radius-lg);
	background: var(--fc-background);
}

/* No aspect-ratio: the editor's image keeps its own proportions. */
.corporate-page__image {
	display: block;
	width: 100%;
	height: auto;
}

/* ---------------------------------------------------------------------
 * Content surface: white card on the cream page ground, matching the
 * single post reading surface.
 * ------------------------------------------------------------------- */

.corporate-page__content {
	padding: var(--fc-space-4);
	border: 1px solid var(--fc-border);
	border-radius: var(--fc-radius-lg);
	color: var(--fc-text);
	background: var(--fc-surface);
	font-size: 1.0625rem;
	line-height: 1.75;
	/* break-word keeps prose natural while still splitting long URLs. */
	overflow-wrap: break-word;
}

/*
 * Body blocks stay on a readable measure; wide/full blocks are allowed to
 * span the card instead of the viewport, so they can never produce a
 * horizontal scrollbar at page level.
 */
.corporate-page__content > * {
	max-width: var(--fc-corporate-text);
}

.corporate-page__content > .alignwide,
.corporate-page__content > .alignfull,
.corporate-page__content > .wp-block-separator.is-style-wide {
	width: 100%;
	max-width: 100%;
	margin-inline: 0;
}

.corporate-page__content > :first-child {
	margin-top: 0;
}

.corporate-page__content > :last-child {
	margin-bottom: 0;
}

.corporate-page__content p {
	margin: 0 0 1.5em;
}

.corporate-page__content a {
	color: var(--fc-text);
	text-decoration-color: var(--fc-brand-accent);
	text-underline-offset: 0.15em;
}

/*
 * Section headings carry the brand hierarchy on this page: H2 repeats the
 * brand green one step down from the H1, H3/H4 fall back to body text so the
 * scale stays readable on a long editorial page. Copper is never used on a
 * heading (ADR-010).
 */
.corporate-page__content h2,
.corporate-page__content h3,
.corporate-page__content h4 {
	margin: 1.75em 0 0.75em;
	color: var(--fc-text);
	line-height: 1.25;
	overflow-wrap: break-word;
	text-wrap: balance;
}

.corporate-page__content h2 {
	color: var(--fc-brand-primary);
	font-size: 1.6rem;
}

.corporate-page__content h3 {
	font-size: 1.3rem;
}

.corporate-page__content h4 {
	font-size: 1.1rem;
}

.corporate-page__content ul,
.corporate-page__content ol {
	margin: 0 0 1.5em;
	padding-inline-start: 1.35em;
}

.corporate-page__content li {
	margin-bottom: 0.5em;
}

.corporate-page__content blockquote {
	margin: 1.75em 0;
	padding: var(--fc-space-2) var(--fc-space-3);
	border: 1px solid var(--fc-border);
	border-inline-start: 3px solid var(--fc-brand-accent);
	border-radius: var(--fc-radius-sm);
	background: var(--fc-background);
	font-style: italic;
}

.corporate-page__content blockquote > :last-child {
	margin-bottom: 0;
}

.corporate-page__content cite,
.corporate-page__content .wp-block-quote__citation,
.corporate-page__content .wp-block-pullquote__citation {
	display: block;
	margin-top: var(--fc-space-1);
	color: var(--fc-text-muted);
	font-size: 0.86rem;
	font-style: normal;
}

/* Keep every embedded surface inside the card. */
.corporate-page__content img,
.corporate-page__content video,
.corporate-page__content iframe,
.corporate-page__content object,
.corporate-page__content embed {
	max-width: 100%;
	height: auto;
}

.corporate-page__content img {
	border-radius: var(--fc-radius-sm);
}

.corporate-page__content figure,
.corporate-page__content .wp-block-image {
	margin-inline: 0;
	max-width: 100%;
}

.corporate-page__content figcaption {
	margin-top: 0.5rem;
	color: var(--fc-text-muted);
	font-size: 0.86rem;
}

.corporate-page__content .wp-block-separator {
	height: 0;
	margin-block: var(--fc-space-4);
	border: 0;
	border-top: 1px solid var(--fc-border);
	opacity: 1;
}

/* Columns: core stacks below 782px; the min-width guard stops a long word
   or URL inside a column from widening the grid. */
.corporate-page__content .wp-block-columns {
	margin-bottom: 1.5em;
}

.corporate-page__content .wp-block-column {
	min-width: 0;
	overflow-wrap: break-word;
}

.corporate-page__content .wp-block-buttons {
	margin-bottom: 1.5em;
}

.corporate-page__content .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
	padding: 0.65rem 1.25rem;
	border: 1px solid var(--fc-brand-primary);
	border-radius: var(--fc-radius-pill);
	color: var(--fc-surface);
	background: var(--fc-brand-primary);
	font-size: 0.95rem;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none;
	overflow-wrap: anywhere;
	transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.corporate-page__content .wp-block-button__link:hover {
	border-color: var(--fc-brand-secondary);
	color: var(--fc-surface);
	background: var(--fc-brand-secondary);
}

.corporate-page__content .wp-block-button.is-style-outline .wp-block-button__link {
	color: var(--fc-brand-primary);
	background: transparent;
}

.corporate-page__content .wp-block-button.is-style-outline .wp-block-button__link:hover {
	color: var(--fc-surface);
	background: var(--fc-brand-primary);
}

.corporate-page__content pre,
.corporate-page__content .wp-block-code {
	max-width: 100%;
	overflow-x: auto;
	padding: var(--fc-space-2);
	border: 1px solid var(--fc-border);
	border-radius: var(--fc-radius-sm);
	background: var(--fc-background);
	font-size: 0.9rem;
	line-height: 1.6;
	white-space: pre;
	word-break: normal;
	overflow-wrap: normal;
}

.corporate-page__content code {
	overflow-wrap: anywhere;
}

.corporate-page__content .wp-block-table,
.corporate-page__content .wp-block-embed,
.corporate-page__content .wp-block-embed__wrapper {
	max-width: 100%;
	overflow-x: auto;
}

.corporate-page__content table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

.corporate-page__content th,
.corporate-page__content td {
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--fc-border);
	text-align: start;
	overflow-wrap: anywhere;
}

.corporate-page__content .wp-block-table figcaption {
	text-align: start;
}

/* Focus visibility (copper, matching the storefront accent). */
.corporate-page a:focus-visible,
.corporate-page button:focus-visible {
	outline: 2px solid var(--fc-brand-accent);
	outline-offset: 3px;
}

/* ---------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------- */

/*
 * Desktop page head and canvas, aligned with the Blog archive baseline.
 *
 * Blog inherits the generic .site-main 3rem top padding; this page reduced it
 * locally, so its breadcrumb and H1 jumped upward when moving between the two.
 * From the same breakpoint the article fills the page shell instead of sitting
 * in its own centred 62rem column, so the outer canvas matches as well. The
 * reading measure is not lost: it moves inward onto the prose blocks, which
 * take the shared --fc-reading-measure. Mobile spacing stays unchanged.
 */
@media (min-width: 769px) {
	.corporate-page.site-main {
		padding-block-start: var(--fc-space-5, 3rem);
	}

	.corporate-page {
		--fc-corporate-measure: 100%;
	}

	.corporate-page__article {
		width: 100%;
		margin-inline: 0;
	}

	.corporate-page__content > :where(p, h2, h3, h4, h5, h6, ul, ol, blockquote) {
		max-width: var(--fc-reading-measure, 54rem);
	}
}

@media (min-width: 861px) {
	/* Two columns only when both halves exist; a lone image spans the row. */
	.corporate-page__intro--has-text.corporate-page__intro--has-media {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	}
}

@media (max-width: 860px) {
	.corporate-page__title {
		font-size: 2.25rem;
	}

	.corporate-page__intro {
		gap: var(--fc-space-3);
	}

	.corporate-page__intro-text {
		font-size: 1.0625rem;
	}
}

@media (max-width: 768px) {
	.corporate-page__content {
		padding: var(--fc-space-3);
		font-size: 1rem;
	}
}

@media (max-width: 480px) {
	.corporate-page__content {
		padding: var(--fc-space-2);
	}

	.corporate-page__content blockquote {
		padding: var(--fc-space-2);
	}
}

@media (max-width: 359px) {
	.corporate-page__title {
		font-size: 1.85rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.corporate-page__content .wp-block-button__link {
		transition: none;
	}
}
