/*
 * YGT Industrial – template layout and core-block styling.
 * Component styles (header, hero, cards, form…) come from the YGT Core plugin.
 */

/* Page content wrapper (post-content with constrained layout). */
.ygt-main {
	min-height: 40vh;
}

.ygt-content {
	padding-inline: var(--ygt-gutter, 16px);
	padding-block: clamp(32px, 5vw, 64px);
}

.ygt-content:empty {
	display: none;
}

/* Sections placed inside page content run edge to edge. */
.ygt-site .ygt-content > :is(.ygt-section, .ygt-trust, .ygt-cta, .ygt-hero, .ygt-form-section, .alignfull) {
	width: auto;
	max-width: none !important;
	margin-inline: calc(-1 * var(--ygt-gutter, 16px)) !important;
}

.ygt-site .ygt-content > :is(.ygt-section, .ygt-trust, .ygt-cta, .ygt-form-section):first-child {
	margin-top: calc(-1 * clamp(32px, 5vw, 64px));
}

.ygt-site .ygt-content > :is(.ygt-section, .ygt-trust, .ygt-cta, .ygt-form-section):last-child {
	margin-bottom: calc(-1 * clamp(32px, 5vw, 64px));
}

.ygt-site .ygt-content > .ygt-lead + :is(.ygt-section, .ygt-form-section) {
	margin-top: 24px;
}

.ygt-content--flush {
	padding: 0;
}

.ygt-content--wide {
	padding-block: 0;
}

/* Single product / industry / project layout. */
.ygt-single {
	padding-block: clamp(32px, 5vw, 64px);
}

.ygt-single > .ygt-split {
	margin-bottom: 0;
}

/* Industry/project template without a featured image: single column. */
.ygt-single > .ygt-split:not(:has(.wp-block-post-featured-image)) {
	grid-template-columns: minmax(0, 1fr);
	max-width: 860px;
}

.ygt-single .wp-block-post-featured-image img {
	border-radius: var(--ygt-radius-lg, 8px);
}

.ygt-single + .ygt-form-section {
	background: var(--ygt-background, #F5F7F9);
}

.ygt-content p,
.ygt-content li {
	max-width: 75ch;
}

.ygt-site .ygt-content :where(h2) {
	margin-top: 2em;
	font-size: clamp(22px, 2.4vw, 30px);
}

.ygt-site .ygt-content :where(h3) {
	margin-top: 1.6em;
}

.ygt-content :where(ul, ol) {
	padding-left: 1.25em;
}

.ygt-content :where(li) {
	margin-bottom: .4em;
}

.ygt-content .wp-block-table {
	overflow-x: auto;
}

.ygt-content .wp-block-table table {
	min-width: 560px;
	border-collapse: collapse;
}

.ygt-content .wp-block-table :is(th, td) {
	padding: 10px 12px;
	border: 1px solid var(--ygt-border, #DCE3E8);
	text-align: left;
}

.ygt-content .wp-block-table th {
	background: var(--ygt-background, #F5F7F9);
	color: var(--ygt-heading, #252A2E);
}

/* Core buttons follow the YGT button style. */
.ygt-site .wp-block-button__link {
	min-height: 44px;
	padding: 10px 22px;
	border: 2px solid var(--ygt-primary, #43B7E8);
	font-family: var(--ygt-font-heading);
	text-decoration: none;
}

.ygt-site .wp-block-button.is-style-outline > .wp-block-button__link {
	border-color: var(--ygt-graphite, #343A40);
	background: transparent;
	color: var(--ygt-graphite-deep, #252A2E);
}

.ygt-site .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--ygt-graphite-deep, #252A2E);
	color: #fff;
}

/* Pattern helpers. */
.ygt-pattern-banner {
	border-top: 4px solid var(--ygt-primary, #43B7E8);
}

.ygt-pattern-banner p {
	color: rgba(255, 255, 255, .86);
}

.ygt-pattern-features .wp-block-column {
	padding: 24px;
	border: 1px solid var(--ygt-border, #DCE3E8);
	border-top: 4px solid var(--ygt-primary, #43B7E8);
	border-radius: 4px;
}

/* Blog / search listings. */
.ygt-post-list {
	padding-block: clamp(32px, 5vw, 64px);
}

.ygt-post-grid {
	display: grid;
	gap: 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 768px) {
	.ygt-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1100px) {
	.ygt-post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.ygt-post-item {
	height: 100%;
	padding: 0 0 20px;
	border: 1px solid var(--ygt-border, #DCE3E8);
	border-radius: var(--ygt-radius-lg, 8px);
	overflow: hidden;
	background: var(--ygt-surface, #fff);
}

.ygt-post-item > :not(.wp-block-post-featured-image) {
	margin-inline: 20px;
}

.ygt-post-item .wp-block-post-featured-image {
	margin: 0 0 16px;
}

.ygt-site .ygt-post-title {
	margin-top: 6px;
	font-size: 20px;
}

.ygt-post-title a {
	color: var(--ygt-heading, #252A2E);
	text-decoration: none;
}

.ygt-post-date {
	margin-top: 16px;
	color: var(--ygt-secondary-text, #626B73);
	font-size: 14px;
}

.ygt-search-form {
	padding-top: 32px;
}

.ygt-site .wp-block-search__input {
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid #8A949C;
	border-radius: 4px;
	font-size: 16px;
}

.ygt-site .wp-block-search__button {
	min-height: 48px;
	margin-left: 8px;
	padding: 10px 20px;
	border: 0;
	border-radius: 4px;
	background: var(--ygt-primary, #43B7E8);
	color: var(--ygt-button-text, #1E2327);
	font-weight: 700;
	cursor: pointer;
}

.ygt-404 .wp-block-search {
	max-width: 520px;
	margin-block: 24px;
}
