/* Rifiniture del tema Falzone Psicologa (i colori e i caratteri sono in theme.json). */

html {
	scroll-behavior: smooth;
}

/* Sezioni a tutta larghezza attaccate tra loro, senza spazi bianchi */
body .wp-site-blocks > * {
	margin-block-start: 0;
	margin-block-end: 0;
}

body .wp-block-post-content > .alignfull {
	margin-block-start: 0;
	margin-block-end: 0;
}

/* Intestazione fissa in alto */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 50;
	background-color: var(--wp--preset--color--base);
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.admin-bar header.wp-block-template-part {
	top: 32px;
}

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

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

.topbar p {
	margin: 0;
}

.site-brand svg {
	display: block;
	width: 52px;
	height: auto;
	flex-shrink: 0;
}

.site-brand .wp-block-site-title {
	margin: 0;
}

.site-brand .wp-block-site-tagline {
	margin: 0.15rem 0 0;
}

.topbar a {
	color: inherit;
	text-decoration: none;
}

.topbar a:hover {
	text-decoration: underline;
}

@media (max-width: 640px) {
	.topbar .topbar-address {
		display: none;
	}
}

.wp-block-navigation .wp-block-navigation-item__content {
	padding: 0.35rem 0;
	border-bottom: 2px solid transparent;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.wp-block-navigation .wp-block-navigation-item__content:hover,
.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--accent);
	border-bottom-color: currentColor;
}

.wp-block-navigation__responsive-container.is-menu-open {
	padding: 2rem;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 1.25rem;
}

/* Occhiello: piccolo titolo sopra le sezioni */
.is-style-eyebrow {
	font-size: 0.8rem !important;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--green);
	margin-bottom: 0.5rem !important;
}

/* Schede */
.wp-block-group.is-style-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 18px;
	padding: clamp(1.25rem, 3vw, 1.9rem);
	box-shadow: var(--wp--preset--shadow--soft);
	height: 100%;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wp-block-group.is-style-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 18px 40px -18px rgba(18, 63, 86, 0.3);
}

.wp-block-group.is-style-card > :first-child {
	margin-top: 0;
}

.wp-block-group.is-style-card h3 {
	margin-bottom: 0.5rem;
}

.wp-block-group.is-style-card p {
	margin-top: 0;
}

.wp-block-columns.is-cards > .wp-block-column {
	display: flex;
	flex-direction: column;
}

/* Elenco con foglie */
ul.is-style-leaf {
	list-style: none;
	padding-left: 0;
}

ul.is-style-leaf li {
	position: relative;
	padding-left: 1.9rem;
	margin-bottom: 0.55rem;
}

ul.is-style-leaf li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.42em;
	width: 1.05rem;
	height: 1.05rem;
	background-color: var(--wp--preset--color--green);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.5 3.5C11 3.5 4 8 4 15.5c0 1.6.4 3 1 4.1L3.3 21.3l1.4 1.4 1.8-1.8c1.1.6 2.4.9 3.8.9 7.2 0 10.2-7.5 10.2-18.3zM8 17.5c2.2-3.8 5.4-6.6 9.4-8.4-3.1 2.3-5.8 5.1-7.9 8.9z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.5 3.5C11 3.5 4 8 4 15.5c0 1.6.4 3 1 4.1L3.3 21.3l1.4 1.4 1.8-1.8c1.1.6 2.4.9 3.8.9 7.2 0 10.2-7.5 10.2-18.3zM8 17.5c2.2-3.8 5.4-6.6 9.4-8.4-3.1 2.3-5.8 5.1-7.9 8.9z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Immagine che si fonde con lo sfondo (per foto su fondo bianco) */
.wp-block-image.is-style-blend img {
	mix-blend-mode: multiply;
}

/* Etichette "A chi mi rivolgo" */
.pill-list {
	gap: 0.6rem !important;
}

.pill-list > p {
	margin: 0 !important;
	padding: 0.5rem 1.1rem;
	border-radius: 999px;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--line);
	color: var(--wp--preset--color--primary-dark);
	font-weight: 700;
	font-size: 0.95rem;
}

/* Citazioni */
.wp-block-quote {
	margin: 0;
	padding: 0;
}

.quote-card {
	position: relative;
}

.quote-card::before {
	content: "\201C";
	position: absolute;
	top: -0.6rem;
	left: 1rem;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 5rem;
	line-height: 1;
	color: var(--wp--preset--color--accent);
	opacity: 0.25;
	pointer-events: none;
}

/* Pulsante contorno */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 2px solid currentColor;
	background: transparent;
	color: var(--wp--preset--color--primary);
	padding: calc(0.8rem - 2px) calc(1.6rem - 2px);
}

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

.has-primary-dark-background-color .wp-block-button.is-style-outline > .wp-block-button__link,
.has-dusk-gradient-background .wp-block-button.is-style-outline > .wp-block-button__link {
	color: var(--wp--preset--color--base);
}

.has-primary-dark-background-color .wp-block-button.is-style-outline > .wp-block-button__link:hover,
.has-dusk-gradient-background .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--primary-dark);
}

/* Link su fondi scuri */
.has-primary-dark-background-color a:not(.wp-block-button__link),
.has-dusk-gradient-background a:not(.wp-block-button__link) {
	color: inherit;
}

/* Piè di pagina */
.site-footer a {
	color: inherit;
	text-decoration: none;
}

.site-footer a:hover {
	text-decoration: underline;
}

.site-footer h2,
.site-footer h3 {
	color: var(--wp--preset--color--base);
}

.site-footer .wp-block-navigation .wp-block-navigation-item__content {
	padding: 0.15rem 0;
}

.site-footer .wp-block-navigation .wp-block-navigation-item__content:hover,
.site-footer .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--base);
}

/* Articoli */
.post-card .wp-block-post-featured-image img {
	border-radius: 14px;
}

.post-card .wp-block-post-title a:hover {
	color: var(--wp--preset--color--accent);
}

/* Mappa */
.map-embed iframe {
	display: block;
	width: 100%;
	height: 380px;
	border: 0;
	border-radius: 18px;
}

/* Contact Form 7 */
.wpcf7 form {
	display: grid;
	gap: 0.25rem;
}

.wpcf7 label {
	display: block;
	font-weight: 700;
	font-size: 0.92rem;
	color: var(--wp--preset--color--primary-dark);
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
	width: 100%;
	box-sizing: border-box;
	margin-top: 0.35rem;
	padding: 0.75rem 0.9rem;
	font: inherit;
	font-weight: 400;
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--base);
	border: 1px solid #c9d6db;
	border-radius: 10px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wpcf7 textarea {
	min-height: 140px;
	resize: vertical;
}

.wpcf7 input:focus,
.wpcf7 textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 3px rgba(29, 91, 121, 0.15);
}

.wpcf7 .wpcf7-acceptance label {
	font-weight: 400;
	color: var(--wp--preset--color--muted);
}

.wpcf7 input[type="submit"] {
	justify-self: start;
	margin-top: 0.5rem;
	padding: 0.85rem 1.8rem;
	font: inherit;
	font-weight: 700;
	color: var(--wp--preset--color--base);
	background: var(--wp--preset--color--primary);
	border: 0;
	border-radius: 999px;
	cursor: pointer;
}

.wpcf7 input[type="submit"]:hover {
	background: var(--wp--preset--color--primary-dark);
}

.wpcf7 input[type="submit"]:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

/* Accessibilità: focus visibile */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.wp-block-group.is-style-card {
		transition: none;
	}

	.wp-block-group.is-style-card:hover {
		transform: none;
	}
}
