/*
Theme Name: Bække Murerfirma
Theme URI: https://baekkemurer.dk
Author: Bække Murerfirma ApS
Description: Blocktema til Bække Murerfirma ApS. Alle designværdier ligger i theme.json; denne fil indeholder kun det, core-blokkene ikke selv kan udtrykke.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: baekke
*/

/* Breakpoints: 1024px (header skifter til menuknap), 782px (core Columns stables), 480px (små mobiler).
   Alle værdier kommer fra theme.json (--wp--preset--* og --wp--custom--*). */

/* ---------- Sidelayout ---------- */

/* Sektionerne styrer selv deres afstand – ingen standard-mellemrum mellem dem */
.wp-block-post-content.wp-block-post-content > * {
	margin-block-start: 0;
}

:focus-visible {
	outline: var(--wp--custom--border-width--thick) solid var(--wp--preset--color--secondary);
	outline-offset: var(--wp--custom--border-width--thick);
}

/* ---------- Header ---------- */

header.wp-block-template-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
	background: var(--wp--preset--color--base);
	box-shadow: var(--wp--preset--shadow--small);
}

.site-header .wp-block-site-logo img {
	width: var(--wp--custom--logo-width);
	height: auto;
}

.site-header .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	min-height: var(--wp--custom--touch-target);
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.site-header .wp-block-navigation-item__content:hover,
.site-header .current-menu-item > .wp-block-navigation-item__content,
.site-header .current-menu-ancestor > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--secondary);
	text-decoration: underline;
}

.site-header .current-menu-item > .wp-block-navigation-item__content {
	text-decoration-thickness: var(--wp--custom--border-width--thick);
	text-underline-offset: 0.45em;
}

.site-header .wp-block-navigation__submenu-container {
	border-top: var(--wp--custom--border-width--thick) solid var(--wp--preset--color--primary) !important;
	box-shadow: var(--wp--preset--shadow--medium);
}

.site-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	font-weight: 500;
}

/* Telefonnummer adskilt med en lodret streg */
.site-header .nav-phone {
	padding-left: var(--wp--preset--spacing--40);
	border-left: var(--wp--custom--border-width--thin) solid var(--wp--preset--color--border);
}

/* Navigation-blokken skifter som standard til menuknap ved 600px – her ved 1024px */
@media (min-width: 600px) and (max-width: 1023px) {
	.site-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.site-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

.site-header .wp-block-navigation__responsive-container-open,
.site-header .wp-block-navigation__responsive-container-close {
	width: var(--wp--custom--touch-target);
	height: var(--wp--custom--touch-target);
	justify-content: center;
	align-items: center;
	border: var(--wp--custom--border-width--thin) solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius);
}

/* Overlay-menuen (tablet/mobil) */
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
}

.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--large);
}

.site-header .wp-block-navigation__responsive-container.is-menu-open .nav-phone {
	margin-top: var(--wp--preset--spacing--30);
	padding: var(--wp--preset--spacing--30) 0 0;
	border-left: 0;
	border-top: var(--wp--custom--border-width--thin) solid var(--wp--preset--color--border);
}

/* ---------- Knapper ---------- */

.wp-element-button,
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--wp--custom--touch-target);
	transition: background-color 0.15s ease, color 0.15s ease;
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--muted);
	color: var(--wp--preset--color--secondary);
}

/* ---------- Hero (Cover-blok) ---------- */

.hero {
	min-height: var(--wp--custom--hero-height) !important;
}

.hero.hero-page {
	min-height: var(--wp--custom--hero-height-small) !important;
}

.hero .wp-block-cover__inner-container {
	max-width: var(--wp--custom--measure);
}

.hero :focus-visible,
.card-service :focus-visible {
	outline-color: var(--wp--preset--color--base);
}

/* ---------- Servicekort (Cover-blok) ---------- */

.card-service a {
	display: inline-flex;
	align-items: center;
	min-height: var(--wp--custom--touch-target);
	color: inherit;
}

/* ---------- Placeholder for formular (plugin) ---------- */

.form-placeholder {
	border: var(--wp--custom--border-width--thin) dashed var(--wp--preset--color--text-muted);
}

/* Grundstil til formularfelter, så plugin-formularer matcher designet */
:where(input[type="text"], input[type="email"], input[type="tel"], textarea, select) {
	width: 100%;
	min-height: var(--wp--custom--touch-target);
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	border: var(--wp--custom--border-width--thin) solid var(--wp--preset--color--border-strong);
	border-radius: var(--wp--custom--radius);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
}

:where(input[type="text"], input[type="email"], input[type="tel"], textarea, select):focus-visible {
	border-color: var(--wp--preset--color--secondary);
}

/* ---------- Footer ---------- */

.site-footer .wp-block-site-logo img {
	width: var(--wp--custom--logo-width);
	height: auto;
}

.site-footer a {
	display: inline-flex;
	align-items: center;
	min-height: var(--wp--custom--touch-target);
}

.site-footer .wp-block-navigation-item__content {
	font-weight: 700;
}

/* ---------- Synlighed pr. skærmstørrelse ---------- */

@media (min-width: 1024px) {
	.show-compact {
		display: none !important;
	}
}

@media (max-width: 781px) {
	.hide-mobile {
		display: none !important;
	}

	.footer-bottom,
	.footer-bottom .wp-block-navigation__container {
		justify-content: center !important;
		text-align: center;
	}
}

@media (max-width: 480px) {
	.hero .wp-block-buttons {
		flex-direction: column;
		align-items: stretch;
	}

	.hero .wp-block-button {
		width: 100%;
	}
}
