/**
 * Homepage — hero, kaarten, merklogobalk.
 * Layout-reset: assets/css/components.css
 *
 * @package Astra Child
 */

/* ── Header: transparant over hero ────────────────────────────────────────── */
body.page-template-page-template-home #masthead.site-header {
	position: fixed !important;
	width: 100%;
	background: transparent !important;
	box-shadow: none !important;
	transition: background 0.3s ease, box-shadow 0.3s ease, opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
}

/* Alle header-subbars ook transparant — Astra injecteert background via Customizer op .ast-primary-header-bar */
body.page-template-page-template-home:not(.ast-child-header-scrolled) .ast-primary-header-bar,
body.page-template-page-template-home:not(.ast-child-header-scrolled) .ast-above-header-bar,
body.page-template-page-template-home:not(.ast-child-header-scrolled) .ast-below-header-bar {
	background: transparent !important;
	box-shadow: none !important;
}

/* Na scroll: witte header terugzetten */
body.page-template-page-template-home.ast-child-header-scrolled #masthead.site-header,
body.page-template-page-template-home.ast-child-header-scrolled .ast-primary-header-bar {
	background: #ffffff !important;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08) !important;
}

/* Ingelogd: admin bar offset */
body.page-template-page-template-home.admin-bar #masthead.site-header {
	top: 32px !important;
}

@media screen and (max-width: 782px) {
	body.page-template-page-template-home.admin-bar #masthead.site-header {
		top: 46px !important;
	}
}

/* Nav-links, hover en active wit op transparante header (niet submenu) */
body.page-template-page-template-home:not(.ast-child-header-scrolled) #masthead .main-navigation .menu-link,
body.page-template-page-template-home:not(.ast-child-header-scrolled) #masthead .main-header-menu > .menu-item > a,
body.page-template-page-template-home:not(.ast-child-header-scrolled) #masthead .ast-masthead-custom-menu-items a,
body.page-template-page-template-home:not(.ast-child-header-scrolled) #masthead .site-title a {
	color: #ffffff !important;
}

body.page-template-page-template-home:not(.ast-child-header-scrolled) #masthead .main-navigation .menu-link:hover,
body.page-template-page-template-home:not(.ast-child-header-scrolled) #masthead .main-header-menu > .menu-item > a:hover,
body.page-template-page-template-home:not(.ast-child-header-scrolled) #masthead .main-header-menu > .menu-item.current-menu-item > a,
body.page-template-page-template-home:not(.ast-child-header-scrolled) #masthead .main-header-menu > .menu-item.current-menu-ancestor > a,
body.page-template-page-template-home:not(.ast-child-header-scrolled) #masthead .main-header-menu > .menu-item.current_page_item > a {
	color: #ffffff !important;
	opacity: 0.75;
}

/* Submenu-links: altijd normale tekstkleur (ook boven hero) */
body.page-template-page-template-home:not(.ast-child-header-scrolled) #masthead .main-navigation .sub-menu a,
body.page-template-page-template-home:not(.ast-child-header-scrolled) #masthead .main-navigation .sub-menu .menu-link,
body.page-template-page-template-home:not(.ast-child-header-scrolled) #masthead .main-header-menu .sub-menu a {
	color: var(--ast-global-color-3) !important;
	opacity: 1;
}

/* Hamburger: wit boven hero (Astra SVG gebruikt eigen fill, niet inherited color) */
body.page-template-page-template-home:not(.ast-child-header-scrolled) #masthead .menu-toggle,
body.page-template-page-template-home:not(.ast-child-header-scrolled) #masthead [class*="ast-mobile-menu-trigger"],
body.page-template-page-template-home:not(.ast-child-header-scrolled) #masthead .mobile-menu-toggle-icon,
body.page-template-page-template-home:not(.ast-child-header-scrolled) #masthead .ast-mobile-svg,
body.page-template-page-template-home:not(.ast-child-header-scrolled) #masthead .menu-toggle svg,
body.page-template-page-template-home:not(.ast-child-header-scrolled) #masthead .menu-toggle svg path {
	color: #ffffff !important;
	fill: #ffffff !important;
	stroke: none !important;
}

/* Na scroll: blauwe hamburger op witte balk */
body.page-template-page-template-home.ast-child-header-scrolled #masthead .menu-toggle,
body.page-template-page-template-home.ast-child-header-scrolled #masthead [class*="ast-mobile-menu-trigger"],
body.page-template-page-template-home.ast-child-header-scrolled #masthead .mobile-menu-toggle-icon,
body.page-template-page-template-home.ast-child-header-scrolled #masthead .ast-mobile-svg,
body.page-template-page-template-home.ast-child-header-scrolled #masthead .menu-toggle svg,
body.page-template-page-template-home.ast-child-header-scrolled #masthead .menu-toggle svg path {
	color: var(--mgh-blue-700, #314ba4) !important;
	fill: var(--mgh-blue-700, #314ba4) !important;
	stroke: none !important;
}

/* Mobiel: header breedte correct */
@media screen and (max-width: 768px) {
	body.page-template-page-template-home #masthead.site-header,
	body.page-template-page-template-home .ast-primary-header-bar {
		width: 100% !important;
		max-width: 100% !important;
		left: 0 !important;
	}
}

/* Logo: geen filter — SVG heeft eigen kleuren die zichtbaar zijn op de hero */

/* Knop na scroll: donker */
body.page-template-page-template-home.ast-child-header-scrolled #masthead .ast-custom-button,
body.page-template-page-template-home.ast-child-header-scrolled #masthead .menu-item .button {
	background: #1a202c !important;
	border-color: #1a202c !important;
	color: #ffffff !important;
}

/* "Contacteer ons"-knop aanpassen voor transparante state */
body.page-template-page-template-home:not(.ast-child-header-scrolled) #masthead .ast-custom-button,
body.page-template-page-template-home:not(.ast-child-header-scrolled) #masthead .menu-item .button {
	background: #ffffff !important;
	border-color: #ffffff !important;
	color: #1a3a6b !important;
}

body.page-template-page-template-home:not(.ast-child-header-scrolled) #masthead .ast-custom-button:hover,
body.page-template-page-template-home:not(.ast-child-header-scrolled) #masthead .menu-item .button:hover {
	background: #f0f4fa !important;
	border-color: #f0f4fa !important;
	color: #1a3a6b !important;
}


/* ── Hero ──────────────────────────────────────────────────────────────────── */
.mgh-home-hero {
	position: relative;
	min-height: 70vh;
	width: 100%;
	background: #1a3a6b center center / cover no-repeat;
	display: flex;
	align-items: stretch;
}

/*
 * Content vult de hero. Kaarten zitten altijd onderaan.
 * Titel/CTA worden verticaal gepositioneerd in .mgh-home-hero__text.
 */
.mgh-home-hero--v-top    .mgh-home-hero__text { justify-content: flex-start; }
.mgh-home-hero--v-middle .mgh-home-hero__text { justify-content: center; }
.mgh-home-hero--v-bottom .mgh-home-hero__text { justify-content: flex-end; }

.mgh-home-hero__overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.mgh-home-hero__content {
	position: relative;
	z-index: 1;
	width: 100%;
	flex: 1 1 auto;
	min-height: 100%;
	/* Altijd flex — overschrijft de globale .ast-container display:block regel */
	display: flex !important;
	flex-direction: column;
	align-items: flex-start; /* overschreven door horizontale modifier */
	padding-top: calc(var(--mgh-header-h, 115px) + 3rem);
	padding-bottom: 2.5rem;
	gap: 2rem;
}

.mgh-home-hero__text {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	width: 100%;
	min-height: 0;
}

/* Horizontale uitlijning */
.mgh-home-hero--h-left   .mgh-home-hero__content { text-align: left;   align-items: flex-start; }
.mgh-home-hero--h-center .mgh-home-hero__content { text-align: center; align-items: center; }
.mgh-home-hero--h-right  .mgh-home-hero__content { text-align: right;  align-items: flex-end; }

.mgh-home-hero--h-left   .mgh-home-hero__text { align-items: flex-start; }
.mgh-home-hero--h-center .mgh-home-hero__text { align-items: center; }
.mgh-home-hero--h-right  .mgh-home-hero__text { align-items: flex-end; }

.mgh-home-hero__title {
	color: #ffffff;
	font-family: var(--mgh-font-family-heading);
	font-size: clamp(2rem, 5.5vw, 3.75rem);
	font-weight: var(--mgh-font-weight-semibold);
	line-height: 1.1;
	margin: 0 0 1rem;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
	max-width: 18ch;
}

.mgh-home-hero--h-center .mgh-home-hero__title,
.mgh-home-hero--h-right  .mgh-home-hero__title {
	max-width: 22ch;
}

.mgh-home-hero__subtitle {
	color: rgba(255, 255, 255, 0.88);
	font-size: clamp(1rem, 2vw, 1.2rem);
	margin: 0 0 2rem;
	max-width: 48ch;
	line-height: 1.5;
}

.mgh-home-hero__cta {
	display: inline-block;
	background: #ffffff;
	color: #1a3a6b;
	font-size: 0.95rem;
	font-weight: 700;
	padding: 0.85rem 2rem;
	border-radius: 6px;
	text-decoration: none;
	transition: background 0.18s, color 0.18s, transform 0.12s;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.mgh-home-hero__cta:hover {
	background: #1a3a6b;
	color: #ffffff;
	transform: translateY(-1px);
}

/* Admin-bar-offset voor hero padding */
body.admin-bar .mgh-home-hero__content {
	padding-top: calc(var(--mgh-header-h, 115px) + 32px + 3rem);
}

@media screen and (max-width: 782px) {
	body.admin-bar .mgh-home-hero__content {
		padding-top: calc(var(--mgh-header-h, 115px) + 46px + 2rem);
	}
}

/* ── Kaarten: altijd onderaan .mgh-home-hero__content ─────────────────────── */
.mgh-home-cards {
	width: 100%;
	max-width: 900px;
	margin: 0 auto;
	align-self: center;
	flex-shrink: 0;
}

.mgh-home-cards__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.25rem;
}

@media screen and (max-width: 860px) {
	.mgh-home-cards__grid {
		grid-template-columns: 1fr;
		max-width: 440px;
		margin-left: auto;
		margin-right: auto;
	}
}

.mgh-home-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 0.75rem;
	padding: 1.75rem 1.5rem 1.75rem;
	background: #ffffff;
	border-radius: 10px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
	text-decoration: none;
	color: inherit;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.mgh-home-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16);
	color: inherit;
}

.mgh-home-card__badge {
	position: absolute;
	top: -5px;
	left: auto;
	right: 1rem;
	background: #000000;
	color: #ffffff;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 3px 10px;
	border-radius: 100px;
}

.mgh-home-card__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	background: #f0f4fa;
	border-radius: 50%;
	color: #1a3a6b;
	flex-shrink: 0;
}

.mgh-home-card__icon svg,
.mgh-home-card__icon img {
	width: 26px;
	height: 26px;
	object-fit: contain;
}

.mgh-home-card__copy {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
}

.mgh-home-card__title {
	font-size: 22px;
	font-weight: 400;
	color: #1a202c;
	line-height: 1.25;
}

.mgh-home-card__desc {
	font-size: 0.85rem;
	color: #556;
	line-height: 1.55;
}

/* ── Merklogobalk ─────────────────────────────────────────────────────────── */
.mgh-home-brands {
	width: 100%;
	position: relative;
	z-index: 10;
	padding: 0 1.5rem;
	box-shadow: 0px 3px 1px rgb(27 65 169 / 4%);
}

.mgh-home-brands__track {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2.5rem;
	flex-wrap: wrap;
	height: 105px;
	border-radius: 7px;
	padding: 0 2rem;
}

.mgh-home-brands__item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	opacity: 0.75;
	transition: opacity 0.18s ease, filter 0.18s ease;
	filter: grayscale(100%);
}

.mgh-home-brands__item:hover {
	opacity: 1;
	filter: grayscale(0%);
}

.mgh-home-brands__item img {
	height: 80px;
	width: auto;
	display: block;
	background: #F4F6FE;
	border-radius: 10px;
}

.mgh-home-brands__name {
	display: none;
}

@media screen and (max-width: 768px) {
	.mgh-home-brands__item img {
		height: 57px;
	}

	.mgh-home-brands__track {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		align-items: center;
		justify-content: flex-start;
		padding: 0.15rem 1.25rem;
		height: auto;
		white-space: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.mgh-home-brands__track::-webkit-scrollbar {
		display: none;
	}

	.mgh-home-brands__item {
		display: inline-flex;
		vertical-align: middle;
	}
}

/* ── Editor-blokken (Gutenberg) ────────────────────────────────────────────── */
/*
 * Homepage heeft geen page-level container. Groepen zijn standaard 100% breed
 * (achtergrondkleur over volledige breedte). Block style "In container"
 * (is-style-mgh-contained) begrenst de inner content tot --mgh-container.
 */
.mgh-home-content.entry-content {
	width: 100%;
	max-width: none;
	padding: 0;
}

.mgh-home-content.entry-content > .wp-block-group,
.mgh-home-content.entry-content > .wp-block-columns,
.mgh-home-content.entry-content > .wp-block-cover,
.mgh-home-content[data-ast-blocks-layout] > .wp-block-group,
.mgh-home-content[data-ast-blocks-layout] > .wp-block-columns,
.mgh-home-content[data-ast-blocks-layout] > .wp-block-cover {
	max-width: none !important;
	width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.mgh-home-content.entry-content > .wp-block-group.is-style-mgh-contained > .wp-block-group__inner-container,
.mgh-home-content[data-ast-blocks-layout] > .wp-block-group.is-style-mgh-contained > .wp-block-group__inner-container {
	max-width: var(--mgh-container, 1200px);
	margin-left: auto;
	margin-right: auto;
	padding-left: 20px;
	padding-right: 20px;
	width: 100%;
	box-sizing: border-box;
}
