/* What the Joomla template's screen.css doesn't cover: the editor's images and
   galleries (they were Widgetkit grids of 116 px thumbnails), the lightbox,
   the project tiles, the form's layout and the honeypot. The admin loads this
   file too, before its own styles, so the editor shows the texts as the page. */

.page-title {
	font-size: 26px;
}

.editor-image {
	margin: 15px 0 0;
}
.editor-image img {
	max-width: 100%;
	height: auto;
}

.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
	gap: 10px;
	margin-top: 20px;
}
.gallery a {
	display: block;
	overflow: hidden;
	border-radius: 4px;
	aspect-ratio: 1;
}
.gallery img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s;
}
.gallery a:hover img {
	transform: scale(1.1);
}

.projects {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
	gap: 20px 10px;
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}
.projects a {
	display: block;
	text-align: center;
	text-decoration: none;
	color: #333 !important;
}
.projects img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
}
.projects h3 {
	margin-top: 8px;
	font-size: 14px;
	line-height: 18px;
}

#lightbox {
	margin: auto;
	padding: 0;
	border: 0;
	background: transparent;
	max-width: none;
	max-height: none;
}
#lightbox::backdrop {
	background: rgba(0, 0, 0, 0.85);
}
#lightbox img {
	display: block;
	max-width: 92vw;
	max-height: 90vh;
	object-fit: contain;
}
#lightbox button {
	position: absolute;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.9);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}
#lightbox .lightbox-step {
	top: 50%;
	transform: translateY(-50%);
}
#lightbox .lightbox-prev {
	left: 8px;
}
#lightbox .lightbox-next {
	right: 8px;
}
#lightbox .lightbox-close {
	top: 8px;
	right: 8px;
}

#userForm {
	margin-top: 20px;
}
#userForm .form-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 12px;
	margin-bottom: 12px;
}
#userForm label {
	width: 160px;
	font-size: 14px;
}
#userForm .form-hint {
	flex-basis: 100%;
	padding-left: 172px;
	font-size: 12px;
	color: #777;
}
#userForm .form-buttons {
	padding-left: 172px;
}
#userForm .form-required {
	font-size: 12px;
}
#userForm input[type="email"],
#userForm input[type="tel"] {
	width: 225px;
}
#userForm textarea {
	max-width: 100%;
}
.hp {
	position: absolute;
	left: -10000px;
}

@media (max-width: 700px) {
	#userForm label {
		width: 100%;
	}
	#userForm .form-hint,
	#userForm .form-buttons {
		padding-left: 0;
	}
	#userForm input,
	#userForm textarea {
		width: 100% !important;
	}
}
