/*
	Theme Name: Stoomgemaal
	Theme URI: https://stoomgemaal.ysendoorn.nl
	Description: Child theme van Hello Elementor voor het Stoomgemaal.
	Author: Ysendoorn
	Author URI: https://ysendoorn.nl
	Template: hello-elementor
	Version: 1.5.1
	Requires at least: 6.0
	Requires PHP: 7.4
	License: GNU General Public License v3 or later.
	License URI: https://www.gnu.org/licenses/gpl-3.0.html
	Text Domain: stoomgemaal
*/

/* Eigen styling hieronder */

/* Basis buiten Elementor-widgets en inline links in tekst (links via de link-instelling van een widget houden hun eigen stijl); kleuren en fonts komen uit de Elementor-variabelen */
body {
	font-family: "Open Sans", Arial, Helvetica, sans-serif;
	font-weight: 300;
	color: var(--sg-text, #000);
}

a,
.e-heading-base a:not(.e-heading-link-base),
.e-paragraph-base a:not(.e-paragraph-link-base) {
	color: var(--sg-navy, #1D3A74);
}

a:hover,
a:active,
.e-heading-base a:not(.e-heading-link-base):hover,
.e-paragraph-base a:not(.e-paragraph-link-base):hover {
	color: #111;
}

/* Header blijft bovenaan staan bij scrollen, zoals op het origineel */
.elementor-location-header {
	position: sticky;
	top: 0;
	z-index: 999;
}

.admin-bar .elementor-location-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .elementor-location-header {
		top: 46px;
	}
}

/* Footer-links onderstreept, zoals op het origineel */
.sg-footer a {
	text-decoration: underline;
}

.sg-footer a:hover {
	text-decoration: none;
}

/* Slideshow homepage: de foto's (Elementor-afbeeldingen in .sg-slideshow) wisselen elkaar om de 6 seconden af */
.sg-slideshow > img,
.sg-slideshow > a {
	animation: sg-slide 24s infinite;
}

.sg-slideshow > :nth-child(2) {
	animation-delay: 6s;
}

.sg-slideshow > :nth-child(3) {
	animation-delay: 12s;
}

.sg-slideshow > :nth-child(4) {
	animation-delay: 18s;
}

@keyframes sg-slide {
	0% { opacity: 0; }
	4% { opacity: 1; }
	25% { opacity: 1; }
	29% { opacity: 0; }
	100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.sg-slideshow > img,
	.sg-slideshow > a {
		animation: none;
	}
}


/* Intranet: inlogformulier (Elementor Pro-widget "Login" met klasse sg-login) in de huisstijl van de formulieren */
.sg-login {
	width: 100%;
	max-width: 800px;
}

.sg-login .elementor-login {
	background: #eef1f7;
	border: 1px solid #c9cfdc;
	padding: 20px;
}

.sg-login .elementor-field-group {
	margin-bottom: 14px;
}

.sg-login .elementor-field-label {
	font-family: "Open Sans", Arial, Helvetica, sans-serif;
	font-size: 15px;
	font-weight: 600;
	color: #000;
	margin-bottom: 6px;
}

.sg-login .elementor-field {
	min-height: 42px;
	font-size: 16px;
	background: #fff;
	border: 1px solid #a9b2c6;
	border-radius: 3px;
	color: #000;
}

.sg-login .elementor-field:focus {
	border-color: #1d3a74;
	outline: 2px solid rgba(29, 58, 116, 0.25);
	outline-offset: 0;
}

.sg-login .elementor-button {
	font-family: "Montserrat", Arial, sans-serif;
	font-size: 15px;
	font-weight: 600;
	padding: 10px 28px;
	background-color: #1d3a74;
	color: #fff;
	border-radius: 4px;
}

.sg-login .elementor-button:hover,
.sg-login .elementor-button:focus {
	background-color: #cb1c21;
	color: #fff;
}

.sg-login .elementor-lost-password a {
	font-size: 14px;
}

.sg-login-melding {
	margin-bottom: 14px;
	padding: 12px 16px;
	background: #fff;
	border-left: 4px solid #1d3a74;
	font-size: 15px;
}

.sg-login-melding--fout {
	border-left-color: #cb1c21;
	color: #cb1c21;
}

/* Intranet: overzicht van besloten pagina's na inloggen (op /intranet/) */
.sg-intranet-ingelogd .sg-intro-left {
	display: none;
}

.sg-intranet-overzicht {
	background: #eef1f7;
	border: 1px solid #c9cfdc;
	padding: 20px 24px;
	font-size: 16px;
}

.sg-intranet-overzicht p {
	margin: 0 0 12px;
}

.sg-intranet-paginas {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
}

.sg-intranet-paginas li {
	margin: 0;
}

.sg-intranet-paginas > li > a {
	display: block;
	padding: 10px 14px;
	margin-bottom: 6px;
	background: #fff;
	border: 1px solid #c9cfdc;
	border-left: 4px solid #1d3a74;
	font-family: "Montserrat", Arial, sans-serif;
	font-weight: 600;
	text-decoration: none;
}

.sg-intranet-paginas > li > a:hover,
.sg-intranet-paginas > li > a:focus {
	border-left-color: #cb1c21;
}

.sg-intranet-paginas .sg-intranet-paginas {
	margin: 0 0 6px 18px;
}

.sg-intranet-uitloggen {
	font-size: 14px;
}

/* Fotoalbums (berichttype Fotoalbum): galerij met bijschrift bij hover en lightbox, zoals op de oude site */
.sg-album {
	display: flex;
	flex-direction: column;
	gap: 24px;
	width: 100%;
}

.sg-album-tekst p:last-child {
	margin-bottom: 0;
}

.sg-album-video {
	max-width: 800px;
}

.sg-album-video a {
	display: block;
}

.sg-album-video img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.sg-album-video-leeg {
	display: flex;
	align-items: flex-end;
	aspect-ratio: 16 / 9;
	padding: 16px;
	background: #1d3a74;
	color: #fff;
}

.sg-album-grid,
.sg-albums {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sg-albums {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.sg-album-item,
.sg-albums-item {
	margin: 0;
}

.sg-album-foto {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: #eef1f7;
}

.sg-album-foto img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.sg-album-bijschrift {
	position: absolute;
	inset: auto 0 0;
	padding: 8px 10px;
	background: rgba(29, 58, 116, 0.85);
	color: #fff;
	font-size: 14px;
	line-height: 1.3;
	opacity: 0;
	transform: translateY(100%);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.sg-album-foto:hover img,
.sg-album-foto:focus-visible img {
	transform: scale(1.05);
}

.sg-album-foto:hover .sg-album-bijschrift,
.sg-album-foto:focus-visible .sg-album-bijschrift {
	opacity: 1;
	transform: none;
}

/* Albumoverzicht (/fotoalbum/) */
.sg-albums-item a {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #eef1f7;
	border: 1px solid #c9cfdc;
	color: #000;
	text-decoration: none;
	transition: border-color 0.2s ease;
}

.sg-albums-afb {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #1d3a74;
}

.sg-albums-afb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.sg-albums-item--video .sg-albums-afb::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 56px;
	height: 56px;
	margin: -28px 0 0 -28px;
	border-radius: 50%;
	background: rgba(203, 28, 33, 0.9) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 28px no-repeat;
}

.sg-albums-tekst {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 14px 16px;
	border-left: 4px solid #1d3a74;
	transition: border-color 0.2s ease;
}

.sg-albums-titel {
	font-family: "Montserrat", Arial, sans-serif;
	font-size: 17px;
	font-weight: 600;
	color: #1d3a74;
}

.sg-albums-info {
	font-size: 14px;
	color: #555;
}

.sg-albums-item a:hover,
.sg-albums-item a:focus-visible {
	border-color: #1d3a74;
}

.sg-albums-item a:hover .sg-albums-tekst,
.sg-albums-item a:focus-visible .sg-albums-tekst {
	border-left-color: #cb1c21;
}

.sg-albums-item a:hover .sg-albums-afb img,
.sg-albums-item a:focus-visible .sg-albums-afb img {
	transform: scale(1.05);
}

.sg-album-terug {
	font-size: 15px;
}

@media (max-width: 1024px) {
	.sg-album-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

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

@media (max-width: 767px) {
	.sg-album-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

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

	.sg-album-bijschrift {
		opacity: 1;
		transform: none;
		font-size: 13px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sg-album-foto img,
	.sg-albums-afb img,
	.sg-album-bijschrift {
		transition: none;
	}
}
