/*
Theme Name: Qube Home
Theme URI: https://qube-home.pl/
Author: Web Systems
Author URI: https://web-systems.pl/
Description: Blokowy motyw dla Qube Home — zarządzanie nieruchomościami.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: qubehome
*/

/* Kotwice nie chowają się pod przyklejonym nagłówkiem */
html {
	scroll-padding-top: 7rem;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

/* Nagłówek przyklejony do góry ekranu */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 100;
}

.admin-bar header.wp-block-template-part {
	top: var(--wp-admin--admin-bar--height, 0px);
}

@media (max-width: 600px) {
	.admin-bar header.wp-block-template-part {
		top: 0;
	}
}

.qh-header {
	border-bottom: 1px solid var(--wp--preset--color--contrast-3);
}

/* Link i obrazek jako bloki — inline-block zostawiał pod logo ~8px na linię bazową,
   przez co odstęp od dołu był większy niż od góry */
.qh-header .qh-logo a,
.qh-header .qh-logo img {
	display: block;
}

/* Stopka */
.wp-site-blocks > footer.wp-block-template-part {
	margin-block-start: 0;
}

.qh-footer__claim {
	line-height: 1.25;
}

.qh-footer__email {
	overflow-wrap: anywhere;
}

.qh-footer__columns {
	border-top: 1px solid var(--wp--preset--color--contrast-2);
	padding-top: var(--wp--preset--spacing--50);
}

.qh-footer__label {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 600;
}

.qh-footer__list {
	list-style: none;
	padding-left: 0;
}

.qh-footer__list li + li {
	margin-top: 0.5em;
}

.qh-footer__bottom {
	border-top: 1px solid var(--wp--preset--color--contrast-2);
	padding-top: var(--wp--preset--spacing--30);
}

.qh-footer a:where(:not(.wp-element-button)) {
	text-decoration: none;
}

.qh-footer a:where(:not(.wp-element-button)):hover,
.qh-footer a:where(:not(.wp-element-button)):focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* Baner cookies — na froncie ukryty, dopóki skrypt go nie pokaże */
body:not(.editor-styles-wrapper) .qh-cookie-banner {
	position: fixed;
	right: var(--wp--preset--spacing--20);
	bottom: var(--wp--preset--spacing--20);
	left: var(--wp--preset--spacing--20);
	z-index: 1000;
	max-width: 1100px;
	margin-inline: auto;
	box-shadow: 0 10px 40px rgb(0 0 0 / 0.25);
}

body:not(.editor-styles-wrapper) .qh-cookie-banner:not(.is-visible) {
	display: none;
}

.qh-cookie-banner__text {
	flex: 1 1 28rem;
}

.qh-cookie-banner .wp-block-button__link {
	white-space: nowrap;
}

.qh-cookie-banner .wp-block-button__link:focus-visible {
	outline: 2px solid var(--wp--preset--color--base);
	outline-offset: 2px;
}

/* Rozwijany zakres usług (blok Szczegóły z klasą qh-details) */
.qh-details {
	border-top: 1px solid var(--wp--preset--color--contrast-3);
	padding-top: var(--wp--preset--spacing--10);
}

.qh-details + .qh-details {
	margin-block-start: 0;
}

.qh-details summary {
	cursor: pointer;
	font-weight: 600;
	padding-block: var(--wp--preset--spacing--10);
}

.qh-details[open] summary {
	color: var(--wp--preset--color--accent);
}

.qh-details .wp-block-list {
	color: var(--wp--preset--color--contrast-2);
	margin-block: 0 var(--wp--preset--spacing--20);
}

/* Hero B: treść okładki wyrównana do dołu.
   Nie używamy „pozycji treści” bloku, bo nadaje ona kontenerowi width:auto,
   a wtedy siatka w środku nie zawija się na wąskich ekranach. */
.qh-hero.wp-block-cover {
	align-items: flex-end;
}
