/*
Theme Name: Salient Child Theme
Description: This is a custom child theme for Salient
Theme URI:   https://themeforest.net/item/salient-responsive-multipurpose-theme/4363266
Author: ThemeNectar
Author URI:  https://themeforest.net/user/themenectar
Template: salient
Version: 1.1
*/

/* ---------------------------------------------------------------------------
   Nieuwenhuijs & Peetoom rebrand
--------------------------------------------------------------------------- */

/* Zaanse huisjes-strook helemaal onderaan de pagina (zie reclamebord) */
.np-huisjes-strip {
	background: transparent;
	padding: 40px 20px 0;
	line-height: 0;
	overflow: hidden;
}

.np-huisjes-strip img {
	display: block;
	width: 100%;
	max-width: 1400px;
	height: auto;
	margin: 0 auto;
}

@media only screen and (max-width: 690px) {
	.np-huisjes-strip {
		padding-top: 24px;
	}
}

/* Onze specialismen: lijst als twee-koloms checklist i.p.v. "saaie" opsomming */
.np-specialismen ul {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px 40px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.np-specialismen ul li {
	position: relative;
	padding-left: 34px;
	margin: 0 !important;
	line-height: 1.55;
	list-style: none !important;
}

.np-specialismen ul li::marker {
	content: "";
}

.np-specialismen ul li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	top: 0;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #f8eadc;
	color: #1e5449;
	font-size: 12px;
	line-height: 22px;
	text-align: center;
}

@media only screen and (max-width: 690px) {
	.np-specialismen ul {
		grid-template-columns: 1fr;
	}
}

/* Ons verhaal: extra blokken onder de intro */
.np-verhaal-blok h4 {
	margin-bottom: 18px;
}

.np-verhaal-blok p {
	padding-bottom: 14px;
}

/* Fotoreportage (#story): per kop de foto naar voren, meer foto's erachter.
   Klikken bladert door de stapel (js/np-fotoreportage.js). */
.np-fotoreportage {
	display: grid;
	grid-template-columns: repeat(var(--np-fr-kolommen, 2), 1fr);
	gap: 46px 36px;
	padding: 12px 10px;
}

.np-fr-cat {
	margin: 0;
	text-align: center;
}

.np-fr-stack {
	position: relative;
	aspect-ratio: 4 / 3;
	cursor: pointer;
}

.np-fr-stack img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	border-radius: 4px;
	box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
	transition: transform 0.35s ease;
	backface-visibility: hidden;
}

/* fallback zonder JS: eerste foto voor, rest er schuin achter */
.np-fr-stack img:nth-child(1) { z-index: 3; }
.np-fr-stack img:nth-child(2) { z-index: 2; transform: rotate(-4deg) translate(-4%, 2%); }
.np-fr-stack img:nth-child(3) { z-index: 1; transform: rotate(3deg) translate(4%, 3%); }

/* met JS krijgen de foto's positieklassen; deze winnen van de fallback hierboven */
.np-fr-stack img.np-pos-0 { z-index: 3; transform: none; }
.np-fr-stack img.np-pos-1 { z-index: 2; transform: rotate(-4deg) translate(-4%, 2%); }
.np-fr-stack img.np-pos-2 { z-index: 1; transform: rotate(3deg) translate(4%, 3%); }

.np-fr-cat figcaption {
	margin-top: 20px;
	font-weight: 600;
	font-size: 18px;
	line-height: 1.3;
}

@media only screen and (max-width: 690px) {
	.np-fotoreportage {
		grid-template-columns: 1fr;
		gap: 40px;
	}
}

/* Werkplaatskaart: interactieve vectorkaart in plaats van de oude statische gif */
.np-kaart {
	position: relative;
	width: 100%;
	aspect-ratio: 1.05;
	min-height: 320px;
	background: #EFE5D7;
	overflow: hidden;
}

.np-kaart canvas {
	outline: none;
}

.np-kaart__pin {
	line-height: 0;
	cursor: default;
}

.np-kaart .maplibregl-ctrl-group {
	background: #f8eadc;
	box-shadow: none;
	border-radius: 4px;
}

.np-kaart .maplibregl-ctrl-group button + button {
	border-top-color: rgba(30, 84, 73, 0.2);
}

.np-kaart .maplibregl-ctrl-attrib {
	background: rgba(248, 234, 220, 0.75);
	font-size: 10px;
}

.np-kaart .maplibregl-ctrl-attrib a {
	color: #1e5449;
}

@media only screen and (max-width: 999px) {
	.np-kaart {
		aspect-ratio: 1.15;
	}
}

@media only screen and (max-width: 690px) {
	.np-kaart {
		aspect-ratio: 0.9;
		min-height: 340px;
	}
}

/* Pin: zweeft zoals in de oorspronkelijke gif; het streepje blijft op de plek liggen */
.np-kaart__pin {
	position: relative;
	line-height: 0;
	cursor: pointer;
}

.np-kaart__pin-body {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	line-height: 0;
	animation: np-pin-zweef 1.05s linear infinite;
	transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Bij hover of klik zakt de pin naar rust, zodat het kaartje er netjes boven staat */
.np-kaart__pin.is-actief .np-kaart__pin-body {
	animation: none;
	transform: translateY(0);
}

.np-kaart__pin-dash {
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 47.5%;
	transform: translateX(-50%);
	line-height: 0;
}

@keyframes np-pin-zweef {
	0%     { transform: translateY(0); }
	25.7%  { transform: translateY(-2.56%); }
	28.6%  { transform: translateY(-4.27%); }
	31.4%  { transform: translateY(-6.84%); }
	34.3%  { transform: translateY(-10.26%); }
	37.1%  { transform: translateY(-17.09%); }
	40%    { transform: translateY(-26.5%); }
	42.9%  { transform: translateY(-42.74%); }
	54.3%  { transform: translateY(-42.74%); }
	57.1%  { transform: translateY(-41.88%); }
	77.1%  { transform: translateY(-41.03%); }
	80%    { transform: translateY(-40.17%); }
	82.9%  { transform: translateY(-38.46%); }
	85.7%  { transform: translateY(-35.9%); }
	88.6%  { transform: translateY(-31.62%); }
	91.4%  { transform: translateY(-25.64%); }
	94.3%  { transform: translateY(-16.24%); }
	97.1%  { transform: translateY(0); }
	100%   { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	.np-kaart__pin-body {
		animation: none;
	}
}

/* Kaartje met adres bij de pin */
.maplibregl-popup.np-kaart__popup .maplibregl-popup-content {
	background: #f8eadc;
	color: #1e5449;
	border-radius: 6px;
	padding: 16px 18px;
	box-shadow: 0 10px 30px rgba(30, 84, 73, 0.18);
}

/* Specifieker dan de MapLibre-stylesheet, die na deze CSS in de head wordt gezet.
   Het pijltje krijgt zijn kleur van de rand aan de kant waar het kaartje staat. */
.maplibregl-popup.np-kaart__popup {
	z-index: 5;
}

.maplibregl-popup.np-kaart__popup.maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
.maplibregl-popup.np-kaart__popup.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
.maplibregl-popup.np-kaart__popup.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip {
	border-top-color: #f8eadc;
}

.maplibregl-popup.np-kaart__popup.maplibregl-popup-anchor-top .maplibregl-popup-tip,
.maplibregl-popup.np-kaart__popup.maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
.maplibregl-popup.np-kaart__popup.maplibregl-popup-anchor-top-right .maplibregl-popup-tip {
	border-bottom-color: #f8eadc;
}

.maplibregl-popup.np-kaart__popup.maplibregl-popup-anchor-left .maplibregl-popup-tip {
	border-right-color: #f8eadc;
}

.maplibregl-popup.np-kaart__popup.maplibregl-popup-anchor-right .maplibregl-popup-tip {
	border-left-color: #f8eadc;
}

.np-kaart__kaartje {
	display: block;
	min-width: 168px;
}

.np-kaart__kaartje-titel {
	display: block;
	margin-bottom: 4px;
	font-size: 15px;
	line-height: 1.3;
	color: #1e5449;
}

.np-kaart__kaartje-adres {
	display: block;
	font-size: 13px;
	line-height: 1.55;
	color: #1e5449;
	opacity: 0.85;
}

.np-kaart__kaartje-knop {
	display: inline-block;
	margin-top: 13px;
	padding: 9px 15px;
	border-radius: 4px;
	background: #1e5449;
	color: #f8eadc !important;
	font-size: 13px;
	line-height: 1.2;
	text-decoration: none !important;
	transition: background 0.2s ease;
}

.np-kaart__kaartje-knop:hover,
.np-kaart__kaartje-knop:focus {
	background: #ff6b30;
	color: #ffffff !important;
}

/* Bedrijfsgegevens onder de werkplaats. De desktopindeling is lege kolom | logo |
   tel/KvK + handtekening; op tablet en telefoon vallen die onder elkaar, dus daar
   zetten we alles netjes gecentreerd. */
@media only screen and (max-width: 999px) {
	#np-bedrijfsgegevens .row_col_wrap_12 > .wpb_column {
		width: 100% !important;
		margin-left: 0 !important;
		text-align: center;
	}

	#np-bedrijfsgegevens .row_col_wrap_12 > .wpb_column:first-child {
		display: none; /* lege uitlijnkolom uit de desktopindeling */
	}

	#np-bedrijfsgegevens h6 {
		text-align: center !important;
	}

	#np-bedrijfsgegevens .img-with-aniamtion-wrap {
		text-align: center;
	}

	/* Salient zet de afbeelding in een .inner met max-width; die moeten we centreren */
	#np-bedrijfsgegevens .img-with-aniamtion-wrap > .inner {
		margin-left: auto !important;
		margin-right: auto !important;
	}

	/* Logo en handtekening niet beeldvullend nu de kolom de volle breedte heeft */
	#np-bedrijfsgegevens .row_col_wrap_12 > .wpb_column:nth-child(2) .img-with-aniamtion-wrap > .inner {
		max-width: 240px !important;
	}

	#np-bedrijfsgegevens .row_col_wrap_12 > .wpb_column:nth-child(3) .img-with-aniamtion-wrap > .inner {
		max-width: 300px !important;
	}
}

/* De kaartkolom heeft op desktop een negatieve marge zodat de kaart doorloopt.
   Op tablet en telefoon moet hij juist gewoon uitlijnen met de andere blokken.
   Via CSS en niet via left_margin_tablet/_phone: Salient zet die gegenereerde
   regels op volgorde van verwerking in de head, waardoor zo'n override de
   telefooninstelling van een andere kolom in dezelfde rij kan overrulen. */
@media only screen and (max-width: 999px) {
	body .wpb_column.np-kaart-kolom,
	body .wpb_column.np-werkplaats-tekst {
		margin-left: 0 !important;
	}
}
