/*
 * DINLEEY theme-owned site layouts.
 *
 * Page shells, page families, homepage sections, cards, media and responsive
 * page behavior live here. Plugins do not control visual presentation.
 */

.dly-layout-shell {
	box-sizing: border-box;
	width: 100%;
}

.dly-front-page-shell {
	padding: 0;
}

.dly-page-heading {
	box-sizing: border-box;
	width: 100%;
	margin-bottom: clamp(1.75rem, 4vw, 3.75rem);
}

.dly-page-heading .wp-block-post-title {
	max-width: 21ch;
	margin-bottom: 0;
}

.dly-page-content {
	box-sizing: border-box;
	width: 100%;
}

.dly-page-content > :first-child {
	margin-top: 0;
}

.dly-page-content > :last-child {
	margin-bottom: 0;
}

.dly-page-content > :where(h2, h3, p, ul, ol) {
	box-sizing: border-box;
	width: 100%;
	max-width: 980px;
	margin-right: auto;
	margin-left: auto;
}

.dly-page-content > h2 {
	margin-top: clamp(3rem, 5vw, 4.75rem);
}

.dly-page-content > h3 {
	margin-top: clamp(2rem, 3.5vw, 3rem);
}

.dly-page-content > .dly-cta-panel {
	box-sizing: border-box;
	width: 100%;
	max-width: 980px;
	margin: clamp(3rem, 5vw, 4.75rem) auto 0;
	padding: clamp(2rem, 4vw, 3.5rem);
	background: #0b1f33;
	color: #fff;
}

.dly-page-content > .dly-cta-panel :where(h2, h3, p) {
	color: #fff !important;
}

.dly-page-content > .dly-cta-panel .wp-block-button__link {
	border: 1px solid #fff;
	background: #fff !important;
	color: #0b1f33 !important;
}

/* Compatibility for the two reviewed pages that retain the former palette slug. */
.has-navy-color {
	color: #0b1f33 !important;
}

.has-navy-background-color {
	background-color: #0b1f33 !important;
}

.dly-layout-legal .dly-page-heading,
.dly-layout-legal .dly-page-content,
.dly-layout-article .dly-page-heading,
.dly-layout-article .dly-page-content,
.dly-article-shell {
	max-width: 900px;
	margin-right: auto;
	margin-left: auto;
}

.dly-layout-contact .dly-page-heading .wp-block-post-title,
.dly-layout-company .dly-page-heading .wp-block-post-title {
	max-width: 26ch;
}

.dly-layout-product .dly-page-heading,
.dly-layout-service .dly-page-heading,
.dly-layout-collection .dly-page-heading,
.dly-layout-company .dly-page-heading,
.dly-layout-contact .dly-page-heading {
	padding-bottom: clamp(1.25rem, 2.5vw, 2rem);
	border-bottom: 1px solid #d9dee2;
}

.dly-page-content .dly-card {
	height: 100%;
}

.dly-page-content :where(h2, h3) {
	scroll-margin-top: 110px;
}

.dly-layout-front .dly-hero {
	display: grid;
	box-sizing: border-box;
	min-height: clamp(620px, 46vw, 720px);
	align-content: center;
	padding-top: clamp(4rem, 6vw, 6rem) !important;
	padding-bottom: clamp(4rem, 6vw, 6rem) !important;
	background-image:
		linear-gradient(
			90deg,
			rgba(7, 26, 42, .96) 0%,
			rgba(7, 26, 42, .88) 42%,
			rgba(7, 26, 42, .42) 72%,
			rgba(7, 26, 42, .28) 100%
		),
		url('/wp-content/themes/dinleey/assets/images/site-v2/home-automotive-products-hero-v1.webp');
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
}

.dly-hero-content {
	box-sizing: border-box;
	width: 100%;
}

.dly-home-layout h1.has-display-font-size {
	max-width: 720px;
	font-size: clamp(3.4rem, 5vw, 4.5rem) !important;
	line-height: 1.08;
}

.dly-home-layout .dly-hero-copy {
	max-width: 680px;
}

body.dly-site-language-de-de .dly-home-layout h1.has-display-font-size {
	font-size: clamp(3.1rem, 4.6vw, 4.2rem) !important;
}

.dly-visual-section {
	margin-block: clamp(2rem, 4vw, 3.5rem);
}

.dly-visual-figure {
	margin: 0;
}

.dly-visual-figure img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 10px;
	background: #e9eef2;
}

.dly-page-visual {
	box-sizing: border-box;
	width: 100%;
	margin: 0 auto clamp(2rem, 4vw, 3.75rem);
	overflow: hidden;
	border-radius: 10px;
	background: #e9eef2;
}

.dly-page-visual img {
	display: block;
	width: 100%;
	aspect-ratio: 8 / 3;
	object-fit: cover;
	object-position: center;
}

.dly-page-content :where(figure, .wp-block-image) img {
	border-radius: 10px;
}

.dly-page-content > h2 {
	padding-top: clamp(1.25rem, 2.5vw, 2rem);
	border-top: 1px solid #d9dee2;
}

.dly-visual-feature img {
	aspect-ratio: 16 / 8;
	object-fit: cover;
	object-position: center;
}

.dly-visual-figure figcaption,
.dly-visual-concept-note,
.dly-visual-partner-note {
	color: #526372;
	font-size: .9rem;
	line-height: 1.55;
}

.dly-visual-figure figcaption {
	margin-top: .65rem;
}

.dly-visual-concept-note {
	margin-top: .4rem;
}

.dly-partner-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(1rem, 2vw, 1.4rem);
	margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

.dly-partner-image img {
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.dly-visual-partner-note {
	padding-left: 1rem;
	border-left: 3px solid #5d7d93;
	margin-top: 1.25rem;
}

@media (min-width: 782px) {
	body:is(
		.dly-site-language-en,
		.dly-site-language-ko-kr,
		.dly-site-language-ja-jp,
		.dly-site-language-de-de
	) .dly-page-content .wp-block-columns:has(
		> .wp-block-column:nth-child(4) > .dly-card
	) {
		flex-wrap: wrap !important;
		align-items: stretch;
	}

	body:is(
		.dly-site-language-en,
		.dly-site-language-ko-kr,
		.dly-site-language-ja-jp,
		.dly-site-language-de-de
	) .dly-page-content .wp-block-columns:has(
		> .wp-block-column:nth-child(4) > .dly-card
	) > .wp-block-column {
		flex-basis: calc(50% - 12px) !important;
		flex-grow: 0 !important;
	}
}

@media (max-width: 781px) {
	.dly-page-shell {
		padding-top: var(--wp--preset--spacing--40) !important;
		padding-bottom: var(--wp--preset--spacing--50) !important;
	}

	.dly-page-heading {
		margin-bottom: var(--wp--preset--spacing--40);
	}

	.dly-layout-front .dly-hero {
		display: block;
		min-height: 0;
		padding-top: var(--wp--preset--spacing--60) !important;
		padding-bottom: var(--wp--preset--spacing--60) !important;
		background-image:
			linear-gradient(
				180deg,
				rgba(7, 26, 42, .92) 0%,
				rgba(7, 26, 42, .78) 100%
			),
			url('/wp-content/themes/dinleey/assets/images/site-v2/home-automotive-products-hero-v1.webp');
		background-position: 67% center;
	}

	.dly-home-layout h1.has-display-font-size {
		max-width: 12ch;
		font-size: clamp(2.45rem, 11vw, 4rem) !important;
		line-height: 1.04;
	}

	.dly-partner-grid {
		grid-template-columns: 1fr;
	}

	.dly-visual-feature img {
		aspect-ratio: 4 / 3;
	}

	.dly-page-visual img {
		aspect-ratio: 4 / 3;
	}
}

/* Node 032: long-form insight readability, evidence tables and review diagrams. */
.dly-layout-article .dly-page-content {
	min-width: 0;
}

.dly-layout-article .dly-page-content > .dly-eyebrow {
	margin-top: 0;
	margin-bottom: 1.25rem;
	color: #315e78;
}

.dly-layout-article .dly-page-content > :where(p, ul, ol) {
	line-height: 1.72;
}

.dly-layout-article .dly-page-content > :where(ul, ol) {
	padding-left: 1.35rem;
}

.dly-layout-article .dly-page-content > :where(h2, h3) {
	text-wrap: balance;
}

.dly-layout-article .dly-article-table {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: clamp(1.35rem, 2.5vw, 2rem) auto clamp(2rem, 4vw, 3rem);
	overflow-x: auto;
	border: 1px solid #d9dee2;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(11, 31, 51, .06);
	-webkit-overflow-scrolling: touch;
}

.dly-layout-article .dly-article-table table {
	width: 100%;
	min-width: 680px;
	border: 0;
	border-collapse: collapse;
	font-size: .94rem;
	line-height: 1.45;
}

.dly-layout-article .dly-article-table :where(th, td) {
	padding: .85rem 1rem;
	border: 0;
	border-right: 1px solid #d9dee2;
	border-bottom: 1px solid #d9dee2;
	text-align: left;
	vertical-align: top;
}

.dly-layout-article .dly-article-table :where(th, td):last-child {
	border-right: 0;
}

.dly-layout-article .dly-article-table tr:last-child td {
	border-bottom: 0;
}

.dly-layout-article .dly-article-table th {
	background: #0b1f33;
	color: #fff;
	font-weight: 650;
}

.dly-layout-article .dly-article-table tbody tr:nth-child(even) {
	background: #f6f5f1;
}

.dly-layout-article .dly-visual-figure {
	box-sizing: border-box;
	width: 100%;
	max-width: 900px;
	margin: clamp(1.5rem, 3vw, 2.5rem) auto clamp(2.25rem, 4vw, 3.5rem);
}

.dly-layout-article .dly-visual-figure img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid #d9dee2;
	border-radius: 10px;
	background: #f6f5f1;
}

.dly-layout-article .dly-visual-figure figcaption {
	margin-top: .7rem;
	color: #66727c;
	font-size: .86rem;
	line-height: 1.55;
}

.dly-layout-article .dly-cta-band {
	box-sizing: border-box;
	width: 100%;
	max-width: 900px;
	margin: clamp(3rem, 5vw, 4.5rem) auto 0;
	padding: clamp(1.75rem, 4vw, 3rem);
	border-radius: 10px;
	background: #0b1f33;
	color: #fff;
}

.dly-layout-article .dly-cta-band :where(h2, p) {
	color: #fff !important;
}

.dly-layout-article .dly-cta-band h2 {
	margin-top: 0;
}

.dly-layout-article .dly-cta-band .wp-block-button__link {
	border: 1px solid #fff;
}

@media (max-width: 781px) {
	.dly-layout-article .dly-page-content > :where(p, ul, ol) {
		line-height: 1.66;
	}

	.dly-layout-article .dly-article-table {
		border-radius: 8px;
	}

	.dly-layout-article .dly-article-table table {
		min-width: 620px;
		font-size: .86rem;
	}

	.dly-layout-article .dly-article-table :where(th, td) {
		padding: .72rem .78rem;
	}

	.dly-layout-article .dly-visual-figure figcaption {
		font-size: .82rem;
	}

	.dly-layout-article .dly-cta-band {
		padding: 1.5rem;
	}
}

/* Node 024: compact evidence-led inner pages and protect wide product montages. */
.dly-page-shell {
	padding-top: clamp(1.75rem, 3.2vw, 3rem) !important;
	padding-bottom: clamp(3rem, 5vw, 5rem) !important;
}

.dly-page-heading {
	margin-bottom: clamp(1.25rem, 2.4vw, 2rem);
}

.dly-layout-product .dly-page-heading,
.dly-layout-service .dly-page-heading,
.dly-layout-collection .dly-page-heading,
.dly-layout-company .dly-page-heading,
.dly-layout-contact .dly-page-heading {
	padding-bottom: clamp(.9rem, 1.7vw, 1.35rem);
}

.dly-page-visual {
	margin-bottom: clamp(1.5rem, 2.8vw, 2.5rem);
}

.dly-layout-product .dly-page-visual,
.dly-layout-service .dly-page-visual,
.dly-layout-company .dly-page-visual {
	max-width: 1180px;
}

.dly-layout-product .dly-page-visual img,
.dly-layout-service .dly-page-visual img,
.dly-layout-company .dly-page-visual img {
	aspect-ratio: 10 / 3;
}

.dly-layout-collection .dly-page-visual {
	max-width: 1120px;
}

.dly-layout-collection .dly-page-visual img {
	aspect-ratio: 5 / 1;
}

.dly-page-content > h2 {
	margin-top: clamp(2.25rem, 4vw, 3.5rem);
	padding-top: clamp(1rem, 2vw, 1.5rem);
}

.dly-layout-contact .dly-page-heading {
	margin-bottom: 1.25rem;
}

.dly-layout-contact .dly-page-content > p {
	max-width: 860px;
}

.dly-page-functional-bags .dly-page-visual {
	max-width: 1080px;
	background: #082033;
}

.dly-page-functional-bags .dly-page-visual img {
	aspect-ratio: 8 / 3;
	object-fit: contain;
}

@media (max-width: 781px) {
	.dly-page-shell {
		padding-top: 1.4rem !important;
		padding-bottom: 3rem !important;
	}

	.dly-page-heading {
		margin-bottom: 1.15rem;
	}

	.dly-layout-product .dly-page-visual img,
	.dly-layout-service .dly-page-visual img,
	.dly-layout-company .dly-page-visual img {
		aspect-ratio: 16 / 7;
	}

	.dly-layout-collection .dly-page-visual img {
		aspect-ratio: 16 / 6;
	}

	.dly-page-functional-bags .dly-page-visual img {
		aspect-ratio: 8 / 3;
		object-fit: contain;
	}

	.dly-page-content > h2 {
		margin-top: 2.15rem;
		padding-top: 1rem;
	}
}
