/**
 * ============================================================================
 *  MILTONCAT MANAGED FILE - DO NOT EDIT ON THE SERVER
 * ----------------------------------------------------------------------------
 *  Owner : Getfused (git repo: miltoncat)
 *  Deploy: SFTP overwrites this file wholesale. Server-side edits WILL BE
 *          LOST without warning, with no backup and no notification.
 *
 *  Site code belongs in one of these instead. Neither is ever written by a
 *  Getfused deploy, so anything you put there is safe:
 *      themes/miltoncat-gp/functions.php   (below the SITE CUSTOMIZATIONS marker)
 *      themes/miltoncat-gp/style.css       (below the SITE CUSTOMIZATIONS marker)
 *
 *  Full ownership map: _OWNERSHIP.md in the theme root.
 * ============================================================================
 *
 * Homepage template (page-templates/homepage.php) - SKELETON layout only:
 * grids, spacing and stacking. Visual design comes later. Prints before
 * style.css, so same-specificity overrides there win.
 */

body.home {
	background: url(/wp-content/uploads/chainlink.png) var(--mc-ink);
}

.mc-home__container {
	box-sizing: border-box;
	max-width: var(--mc-container);
	margin-left: auto;
	margin-right: auto;
}

/* Side padding lives on the full-width section; --mc-page-padding is
   responsive (site-style.css), so no per-breakpoint overrides here. */
.mc-home__section {
	padding-block: var(--mc-section-space);
	padding-inline: var(--mc-gutter);
	margin-block: 0;
}

.mc-home__brands.mc-home__section {
	padding-block: 5.375rem 9rem;
	background-color:#fff;
}

.mc-home ul.mc-teasers,
.mc-home ul.mc-brands {
	list-style: none;
	margin-top: 0;
	margin-bottom: 0;
}

.mc-home :focus-visible {
	outline: 2px solid var(--mc-ink);
	outline-offset: 2px;
}

/* ---- 1. Hero ---------------------------------------------------------- */
.mc-home__hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 20px;
	align-items: stretch;
}

.mc-carousel {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 320px;
	background: var(--mc-panel);
}

.mc-carousel__track {
	display: flex;
	flex: 1 1 auto;
}

.mc-carousel__slide {
	flex: 1 0 100%;
}

/* Static until the carousel script lands: first slide only. */
.mc-carousel__slide:not(.is-active) {
	display: none;
}

.mc-carousel__slide,
.mc-carousel__slide .mc-promo {
	height: 100%;
}

.mc-carousel__controls {
	position: absolute;
	inset: 50% 8px auto 8px;
	display: flex;
	justify-content: space-between;
	transform: translateY(-50%);
	pointer-events: none;
}

/* .mc-home prefix: outranks Elementor's global kit button styles. */
.mc-home .mc-carousel__controls button {
	pointer-events: auto;
	width: 32px;
	height: 32px;
	font-size: 1.75rem;
	line-height: 1;
	background: var(--mc-cat-yellow);
	color: var(--mc-black);
	border: 0;
	border-radius: 0;
	padding: 0 0 4px;
}

.mc-home .mc-carousel__controls button:hover {
	background: var(--mc-black);
	color: var(--mc-cat-yellow);
}

/* Find Equipment / Find a Location panels: assets/css/finders.css (shared
   with the [mc_find_location] / [mc_find_equipment] shortcodes). */

/* ---- Text links: the icon-link style (site-style.css) applies to the
   teaser, brand and closing CTA links. White on dark sections. */
.mc-teaser__content,
.mc-home .mc-closing-cta {
	--mc-icon-link-color: var(--mc-white);
}

/* ---- Promo card: assets/css/promotions.css (shared with FacetWP) ------ */

/* ---- 2. Teasers ------------------------------------------------------- */
.mc-teasers {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--mc-gap);
}

.mc-teaser__image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.mc-teaser__content {
	padding: 20px;
	background-color: #000;
}

.mc-teaser__content h2,
.mc-teaser__content {
	color: #fff!important;
}

/* ---- 3. Promo row ----------------------------------------------------- */
.mc-promo-row {
	display: grid;
	gap: var(--mc-gap);
}

.mc-promo-row--2-3_1-3     { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.mc-promo-row--1-2_1-2     { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mc-promo-row--1-3_1-3_1-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mc-promo-row--full        { grid-template-columns: minmax(0, 1fr); }

.mc-home__more {
	margin-top: 3rem;
	text-align: center;
}

/* ---- 4. Brands -------------------------------------------------------- */
.mc-home__heading {
	text-align: center;
	margin-bottom: 24px;
}

.mc-brands {
	display: grid;
	gap: 32px;
	max-width: 760px;
	margin-inline: auto;
	padding: 0;
}

/* Comp: heading sits on the left edge of the brands column. */
.mc-home__brands .mc-home__heading {
	max-width: 760px;
	margin-inline: auto;
	text-align: left;
}

.mc-brand {
	display: grid;
	grid-template-columns: 200px minmax(0, 1fr);
	gap: var(--mc-gap);
	align-items: start;
}

.mc-brand__image {
	display: block;
	width: 100%;
	height: auto;
}


/* ---- 5. Closing CTA: template-parts/closing-cta.php + closing-cta.css -- */
.mc-home .mc-closing-cta {
	margin-bottom: 0;
	/* Comp: dark band; the body's honeycomb shows through. */
	background: url(/wp-content/uploads/DSCF0627-1.jpg) center / cover no-repeat;
	color: var(--mc-white);
}

.mc-home .mc-closing-cta h2,
.mc-home .mc-closing-cta h3,
.mc-home .mc-closing-cta p {
	color: var(--mc-white);
}

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 1024px) {
	.mc-home__hero-grid,
	.mc-promo-row--2-3_1-3,
	.mc-promo-row--1-3_1-3_1-3 {
		grid-template-columns: minmax(0, 1fr);
	}

	.mc-teasers {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.mc-carousel {
		background: transparent;
	}

	/* Arrows sit below the slide so they never cover its text. */
	.mc-carousel__controls {
		position: static;
		justify-content: center;
		gap: 12px;
		padding: 8px;
		transform: none;
	}

	.mc-teasers,
	.mc-promo-row--1-2_1-2 {
		grid-template-columns: minmax(0, 1fr);
	}

	.mc-brand {
		grid-template-columns: minmax(0, 1fr);
	}

	.mc-brand__logo {
		max-width: 200px;
	}
}
