/*
Theme Name: SAMLAB
Theme URI: https://www.sam-lab.it
Author: SAMLAB
Description: Tema a blocchi che riproduce il sito SAMLAB - Assistenza Informatica (Bologna). Responsive, con caratteri ospitati localmente.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: samlab
*/

html { scroll-behavior: smooth; }
:target, [id] { scroll-margin-top: 90px; }
body { -webkit-font-smoothing: antialiased; }

/* ---------- Header ---------- */
.samlab-header {
	position: sticky;
	top: 0;
	z-index: 100;
}
body.admin-bar .samlab-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .samlab-header { top: 0; } }

.samlab-header .samlab-remote .wp-block-button__link {
	font-size: 13px;
	padding: 10px 12px;
	border-radius: 0;
	background: var(--wp--preset--color--celeste);
	color: #fff;
	transition: background .2s;
}
.samlab-header .samlab-remote .wp-block-button__link:hover,
.samlab-header .samlab-remote .wp-block-button__link:focus { background: var(--wp--preset--color--primario); }

.samlab-header .wp-block-navigation a { font-weight: 700; }
.samlab-header .wp-block-navigation .wp-block-navigation-item__content:hover { color: #e7f1fb; text-decoration: underline; text-underline-offset: 6px; }
.samlab-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--azzurro) !important;
	color: #fff !important;
	padding: 2rem;
}
.samlab-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: center;
	padding-top: 3rem;
}
.samlab-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { font-size: 1.4rem; }

/* ---------- Hero ---------- */
.samlab-hero .wp-block-cover__inner-container { width: 100%; }
.samlab-hero-brand { gap: 1.5rem; }
.samlab-hero-brand .wp-block-image { margin: 0; flex-shrink: 0; }
.samlab-hero-title { letter-spacing: .01em; text-shadow: 0 2px 12px rgba(0,0,0,.25); }

/* ---------- Divider (linea azzurra sotto i titoli) ---------- */
.wp-block-separator.samlab-divider {
	width: 260px !important;
	max-width: 70%;
	border: 0;
	border-top: 2px solid var(--wp--preset--color--linea) !important;
	opacity: 1;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* ---------- Riquadri servizi con icona ---------- */
.samlab-tile { text-align: center; }
.samlab-tile .wp-block-image { margin: 0 auto 1.5rem; }
.samlab-tile .wp-block-image img { width: 100px; height: auto; transition: transform .25s ease; }
.samlab-tile:hover .wp-block-image img { transform: translateY(-4px); }
.samlab-tile.tile-pc:hover img  { content: url("assets/img/pc1.png"); }
.samlab-tile.tile-dom:hover img { content: url("assets/img/dom1.png"); }
.samlab-tile.tile-rip:hover img { content: url("assets/img/rip1.png"); }
.samlab-tile.tile-sel:hover img { content: url("assets/img/sel1.png"); }
.samlab-tile p { margin: 0; }

/* ---------- Servizi ---------- */
.samlab-servizi-box {
	background: linear-gradient(rgba(61,133,198,.8), rgba(159,197,232,.8));
}
.samlab-servizi-col h3 { margin-bottom: .25rem; }

/* ---------- Contatti ---------- */
.samlab-map iframe {
	display: block;
	width: 100%;
	height: 320px;
	border: 0;
}

/* ---------- Footer ---------- */
.samlab-footer a { color: var(--wp--preset--color--link-footer); text-decoration: none; }
.samlab-footer a:hover { text-decoration: underline; }
.samlab-footer-items { column-gap: 2.5rem; row-gap: .5rem; }
.samlab-footer-items p { margin: 0; }

/* ---------- Pagine interne (Privacy, Cookie) ---------- */
.samlab-page-title { text-align: center; }

/* ---------- Banner cookie ---------- */
#samlab-cookie {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 999;
	background: #282828;
	color: #fff;
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 14px;
	line-height: 1.5;
	padding: 16px 56px 16px 20px;
	text-align: center;
	display: none;
}
#samlab-cookie.is-visible { display: block; }
#samlab-cookie a { color: #6fa8dc; }
#samlab-cookie button {
	position: absolute;
	right: 14px; top: 50%;
	transform: translateY(-50%);
	background: none;
	border: 0;
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
}

/* ---------- Torna su ---------- */
#samlab-top {
	position: fixed;
	right: 18px; bottom: 18px;
	width: 42px; height: 42px;
	border-radius: 50%;
	background: rgba(0,0,0,.35);
	color: #fff;
	border: 0;
	font-size: 20px;
	cursor: pointer;
	opacity: 0;
	pointer-events: none;
	transition: opacity .3s;
	z-index: 998;
}
#samlab-top.is-visible { opacity: 1; pointer-events: auto; }
#samlab-cookie.is-visible ~ #samlab-top { bottom: 90px; }

/* ---------- Mobile ---------- */
@media (max-width: 781px) {
	.samlab-header-inner { justify-content: space-between !important; }
	.samlab-header .samlab-remote .wp-block-button__link { font-size: 12px; padding: 8px 9px; }
	.samlab-hero-brand { flex-direction: column; text-align: center; }
	.samlab-hero-brand .wp-block-image img { width: 110px !important; }
	.samlab-tiles { row-gap: 2.5rem !important; }
	.samlab-servizi-cols { row-gap: 2rem !important; }
	.samlab-footer-items { flex-direction: column; align-items: center !important; text-align: center; }
}
@media (max-width: 480px) {
	.samlab-header .samlab-remote { gap: 6px !important; }
	.samlab-header .samlab-remote .wp-block-button__link { font-size: 11px; padding: 7px 7px; }
}

/* Sezioni attaccate senza spazi bianchi tra header, contenuto e footer */
.wp-site-blocks > main,
.wp-site-blocks > footer,
.wp-site-blocks > header + * { margin-block-start: 0 !important; }
