html, body{
	font-family: Montserrat, sans-serif;
	font-size: 14px;
	font-weight: 400;
	letter-spacing: normal;
}

.sp-logo{
	font-family: "Imprint MT Shadow";
	text-transform: uppercase;
	font-size: 1.5rem;
}

.sp-logo i{
	font-size: 0.7rem;
	vertical-align: super;
}

.sp-sitebar {
	background-image: linear-gradient( to right, #67a2be 0%, #67a2be 60%, #25477a 100% );  
}

.sp-main-content-content {
	padding: calc(30px*2) calc(48.54px*5);
}

.sp-menu-item-nested {
	z-index: 10;
}

.sp-home-grid-promo {
	text-align: center;
	line-height: 180%;
	font-size: 1.15rem;
	font-weight: 600;
	background-color: #ff000010; /* rosso tenue */
	border-radius: .75rem;
	border: 1px solid #ce0000;
	padding: 14px 18px;
	color: #222;
	box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.sp-home-promo {
	text-align: center;
	line-height: 180%;
	font-size: 1.15rem;
	font-weight: 600;
	border: 1px solid #ce000030;
	color: #222;
	box-sizing: border-box;
	background-color: #ff000010; /* rosso tenue */
	box-shadow: 0 2px 8px rgba(0,0,0,0.2);
	padding: 30px;
	border-radius: calc(5px/2);
	position: relative;
}

.sp-home-grid-promo strong {
	color: #ce0000;
}

.sp-home-promo strong {
	color: #ce0000;
}

.sp-main-content-content.sp-login {
	background-repeat: no-repeat;
	background-position: center;
	background-color: #67a3bf;
}

.sp-map {
	margin: 0 calc(48.54px*5) 30px;
}

.sp-contacts {
	margin: 30px calc(48.54px*4.4);
}

.sp-article{
	padding: calc(30px*2) calc(48.54px*5);
}

.sp-article-image img {
	height: auto;
}

.sp-article-teaser-img img {
	height: auto;
}

.sp-footer-title{
	font-family: "Imprint MT Shadow";
	text-transform: uppercase;
}

.sp-footer-title i{
	font-size: 0.7rem;
	vertical-align: super;
}

footer{
	background: #436e95;
}

.sp-totals {
	font-weight: bold;
	font-style: italic;
	margin-top: 10px;
	color: #a24b4b;
	font-size: 1.1em;
}

.sp-content-image-top {
	height: auto;
}

.sp-content-image-top img {
	height: 100%;
}

.sp-footer-menu-item > :first-child{
	min-width: 0;
}

.sp-home-grid-title{
	margin-bottom: 15px;
}

.slides, .slide{
	height: 800px;
}

.sp-main-content-intro{
	background: none;
}

.sp-main-content-top {
	padding: calc(30px*3) calc(30px*5);
	padding-bottom: 0;
}

.sp-main-icon-intro{
	margin-bottom: calc(30px*2);
}
/*
div.sp-main-content-content:nth-child(2) {
  padding-bottom: 0;
}
*/

.sp-main-content-box{
	margin-bottom: 30px;
	width: 15%;
}

.sp-main-content-box-title{
	font-weight: bold;
}

.sp-main-icon-box{
	margin-right: 15px;
}

.sp-main-icon-box:last-child{
	margin-right:0;
}

.sp-button-download {
	background: none;
	color: #25477a;
	font-size: 2.3rem;
}

.sp-article .sp-button {
  padding: 5px calc(5px*2);
  margin-left: 0;
}

::selection {
	color: #fafafa;
}

.sp-footer-menu-item a{
	font-weight: bold;
}

.redazione{
	width: 240px;
	height: 270px;
	margin-right: 30px;
	position: relative;
	overflow: hidden;
	flex-shrink: 0;
}

.chi-siamo img{
	width: 100%;
	object-fit: cover;
}

.chi-siamo > div{
	margin-bottom: 30px;
}

.sp-roman{
	width: 50px;
	text-align: center;
	color: #25477a;
}

.sp-lessico-teaser-chapter{
	width: calc(100% - 50px);
}

.sp-lessico-teaser-title {
	color: #436e95;
	font-size: 1.3rem;
	font-weight: bold;
}

.sp-lessico-first{
	color:#25477a;
}

.sp-lessico-teaser-chapter .sp-lessico-giurisprudenza{
	color:#fafafa;
}

.sp-article-teaser-content .sp-lessico-giurisprudenza{
	color:#25477a;
	font-weight: bold;
}

.massima{
	margin-top: 25px;
}

.sp-public-desbar{
	justify-content: flex-end;	
}

.massima-title{
	color: #25477a;
	font-weight: bold;
}

.massima-source{
	color: #67a2be;
	font-style: italic;
}

.massima-content{
	margin-top: 5px;
}
.massima-sentenza{
	margin: 0 0 15px;
}

.sp-chapter-link .sp-lessico-giurisprudenza{
	color:#25477a;
}

.sp-article-teaser{
	width: 100%;
}
.sp-article-subtitle{
	color: #67a2be;
	font-style: italic;
	padding: 5px 0;
}

.sp-article-teaser-subtitle {
	padding-left: 0;
	padding-top: 5px;
	color: #25477a;
}

.sp-legalnews-teaser-subtitle {
	padding-bottom: 0;
	padding-left: 0;
	padding-top: 5px;
	color: #67a2be;
}

.sp-events-teaser-img img{
  width: 100%;
  height: calc(30px*20);
  object-fit: cover;
}

.sp-events-image {
	width: 100%;
}

.sp-article-teaser-content {
	margin-top: 15px;
	margin-bottom: 15px;
}

.sp-article-teaser:not(:last-child) {
	margin-bottom: 30px;
}

.sp-article-teaser-icon {
	font-size: 30px;
	color: #25477a;
	margin-bottom: 5px;
}

.sp-chapter-bar{
	background: #67a2be;
	padding: 15px;
	color: #fff;
	font-size: 1.25rem;
	margin-bottom: 15px;
}

.sp-chapter-bar .sp-roman{
	color: #fff;
	font-size: 4rem;
	font-family: Times New Roman;
	width: auto;
	margin-right: 15px;
}

.sp-chapter-bar .sp-lessico-teaser-chapter{
	width: auto;
}

.sp-chapter-wrapper{
	margin-bottom: 30px;
	text-align: justify;
}

.sp-chapter-link{
	cursor: pointer;
}

.sp-chapter-link.sp-scale:hover{
	transform: scale(1.01);
}

.sphere-dialog .sp-article{
	padding: 30px;
}

.sphere-dialog{
	width: 500px;
}

.sp-sitebar > * > * {
	font-size: 1rem;
}

.sp-article-content {
	margin: 15px 0 30px;
}

/*------------------->>>>>MENU A SCORRIMENTO<<<<<-------------------*/

.sp-menu{
	display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; 
    scroll-snap-type: x mandatory;
	align-items: center;
}

.sp-menu-item {
    white-space: nowrap;
    flex: 0 0 auto;
    scroll-snap-align: start; 
}

.sp-menu-item-label {
    white-space: nowrap;
}

.sp-events-image > img{
	width: 50%;
}

div.sp-main-content-intro:nth-child(5) > a:nth-child(1) > div:nth-child(3) {
	text-align: left;
}

div.sp-main-content-intro:nth-child(5) > a:nth-child(2) > div:nth-child(3) {
	text-align: left;
}

div.sp-main-content-intro:nth-child(5) > a:nth-child(3) > div:nth-child(3) {
	text-align: left;
}
.sp-menu-item {
  position: static; /* attenzione! nessun posizionamento relativo qui */
}




/*(min-width: 1099px) and (max-width: 1954px)*/
@media (min-width: 1440px) and (max-width: 2560px) {

	.sp-events-image > img {
		width: 55%;
	}
}

/* Viewport medio-grande (laptop HiDPI 2560x1600 @150% = 1707 logical, e simili).
   Riempie il gap tra il blocco completo 720-1280 e i due range parziali superiori. */
@media (min-width: 1281px) and (max-width: 1799px) {
	/* MENU compatto: 10 voci stanno meglio con meno margine e font ridotto */
	.sp-menu-item {
		margin: 0 4px;
		font-size: 0.85rem;
	}
	.sp-menu-item-label {
		white-space: nowrap;
	}
	/* BOX home: clamp altezza del SOLO content interno (non del box, per non tagliare
	   le icone "pallocchio" posizionate fuori dal bordo top). Fade-out gradiente bianco
	   sull'overflow + footer counter rimane visibile. */
	.sp-main-content-box-content {
		max-height: 260px;
		overflow: hidden;
		position: relative;
	}
	.sp-main-content-box-content::after {
		content: "";
		position: absolute;
		bottom: 0;
		left: 0;
		right: 0;
		height: 60px;
		background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,1));
		pointer-events: none;
	}
	/* Home box: default Lessico è 15% (troppo stretti). Allarghiamo a 27% per layout 3+2 a riga. */
	.sp-main-content-box {
		width: 27%;
	}
	/* Dialog risultati ricerca: box meno stretti + spazio per icone "pallocchio" */
	.sphere-dialog .sp-search-results {
		max-width: 1400px;
	}
	.sphere-dialog .sp-search-results .sp-main-content-intro {
		padding-top: 36px;
	}
	.sphere-dialog .sp-search-results .sp-main-content-box {
		width: 31%;
		min-width: 280px;
	}
	/* Pallocchio nel dialog risultati ricerca: in flow (position relative) con
	   margin-top -45px per simulare "metà fuori" senza che il .sphere-dialog
	   (overflow:hidden a sp-site-layout-1.1.css:456) lo clippi. */
	.sphere-dialog .sp-main-content-box-icon,
	.sphere-dialog-content .sp-main-content-box-icon,
	.sphere-dialog-w .sp-main-content-box-icon {
		position: relative !important;
		top: 0 !important;
		left: auto !important;
		right: auto !important;
		margin: -45px auto 8px !important;
	}
	/* Spazio sopra al primo box per non far clippare il pallocchio dal dialog */
	.sphere-dialog .sp-search-results .sp-main-content-intro {
		padding-top: 50px;
	}
}

@media (min-width: 1025px) and (max-width: 1920px) {
	
	.sp-events-image > img {
		width: 65%;
	}
	
	.sp-menu-item {
		margin: 0 8px;
	}
	
	.sp-login-box {
		width: 100%;
	}

}

@media (min-width: 720px) and (max-width: 1280px) {
	
	html, body{
		font-family: Montserrat, sans-serif;
		font-size: 12px;
		font-weight: 400;
		letter-spacing: normal;
	}

	header {
		padding: 15px calc(30px*2);
	}

	header.sp-flex > div:nth-child(1) {
		width: 12%;
	}

	header.sp-flex > div:nth-child(2) {
		width: 88%;
	}

	.sp-sitebar > * > * {
		padding: 0 calc(30px*2);
	}
/*
	.sp-menu {
		justify-content: end;
	}
*/
	.sp-menu-item {
		margin: 5px 6px;
	}

	.sp-logo {
		font-size: 1.3rem;
		width: 10%;
	}

	.slides, .slide {
		height: 420px;
	}

	.sp-main-content-top {
		padding: calc(30px*3) calc(30px*2) 0;
	}

	.sp-main-content-intro {
		padding: calc(30px*2) calc(30px*1);
	}

	footer {
		padding: calc(15px*3) calc(30px*2);
	}

	.sp-content-text-top, .sp-content-text-top-sub {
		left: calc(30px*2);
		font-size: 2.5rem;
		line-height: 2.5rem;
	}

	.sp-main-content-content {
		padding: calc(30px*2) calc(48.54px*2);
	}

	.sp-article {
		padding: calc(30px*2) calc(48.54px*2);
	}

	.sp-article-teaser.sp-full-width.sp-scale > .sp-flex > div:first-child {
		width: 80%;
	}

	.sp-content-text-top {
		font-size: 2.5rem;
	}

	.sp-main-content-box, .sp-contact-box {
		width: 28%;
	}

	.sp-content-text-top-sub {
		font-size: 1.8rem;
		margin-top: 5px;
	}

	.sp-map {
		margin: 0 calc(48.54px*2) 30px;
	}

	.sp-contacts {
		margin: 30px calc(48.54px*1.4);
	}
	
	.sp-events-image > img {
		width: 70%;
	}
}

@media only screen and (min-device-width: 956px) and (max-device-width: 1470px) {
	html, body{
		font-family: Montserrat, sans-serif;
		font-size: 14px;
		font-weight: 400;
		letter-spacing: normal;
	}

	header {
		padding: 15px calc(30px*2);
	}

	header.sp-flex > div:nth-child(1) {
		width: 12%;
	}

	header.sp-flex > div:nth-child(2) {
		width: 88%;
	}

	.sp-sitebar > * > * {
		padding: 0 calc(30px*2);
	}
/*
	.sp-menu {
		justify-content: end;
	}
*/
	.sp-menu-item {
		margin: 5px 6px;
	}

	.sp-logo {
		font-size: 1.3rem;
		width: 10%;
	}

	.slides, .slide {
		height: 490px;
	}

	.sp-main-content-top {
		padding: calc(30px*3) calc(30px*2) 0;
	}

	.sp-main-content-intro {
		padding: calc(30px*2) calc(30px*1);
	}

	footer {
		padding: calc(15px*3) calc(30px*2);
	}

	.sp-content-text-top, .sp-content-text-top-sub {
		left: calc(30px*2);
		font-size: 2.5rem;
		line-height: 2.5rem;
	}

	.sp-main-content-content {
		padding: calc(30px*2) calc(48.54px*2);
	}

	.sp-article {
		padding: calc(30px*2) calc(48.54px*2);
	}

	.sp-article-teaser.sp-full-width.sp-scale > .sp-flex > div:first-child {
		width: 80%;
	}

	.sp-content-text-top {
		font-size: 2.5rem;
	}

	.sp-main-content-box, .sp-contact-box {
		width: 20%;
	}

	.sp-content-text-top-sub {
		font-size: 1.8rem;
		margin-top: 5px;
	}

	.sp-map {
		margin: 0 calc(48.54px*2) 30px;
	}

	.sp-contacts {
		margin: 30px calc(48.54px*1.4);
	}
		
	.sp-events-image > img {
		width: 70%;
	}
}

@media only screen and (min-device-width: 375px) and (max-device-width: 767px) {

	.sp-events-image > img {
		width: 100%;
	}
	
	.sp-menu-item-nested {
		position: fixed;
		top: auto;
		left: 5%;
		background: rgba(255, 255, 255, 0.95);
		padding: 15px;
		border-radius: 5px;
		box-shadow: 0 10px 30px rgba(0,0,0,0.2);
		visibility: hidden;
		opacity: 0;
		transform: translateY(10px);
		transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
		z-index: 9999;
		min-width: 220px;
		pointer-events: auto;
	}
	
	header {
		height: calc(15px*8);
	}
	
	.sp-logo {
		margin: unset;
	}
}

@media only screen and (max-width: 600px) {

	html, body{
		font-family: Montserrat, sans-serif;
		font-size: 15px;
		font-weight: 400;
		letter-spacing: normal;
	}

	.sp-sitebar > * > * {
	  font-size: 0.7rem;
	}

	header {
		padding: 15px;
		font-size: 0.9rem;
		height: calc(15px*8);
	}

	.sp-logo, .sp-footer-logo {
		max-height: calc(30px*2);
	}
/*
	.sp-menu {
		justify-content: space-around;
	}
*/
	.sp-logo, .sp-footer-logo {
		max-height: calc(30px*3);
	}
	
	.sp-logo{
		text-align: center;
	}

	.slides, .slide {
		height: 400px;
	}

	.slide img {
		height: 100%;
	}

	.sp-main-content-top {
		padding: 30px 30px 0;
		font-size: 1rem;
		line-height: 2rem;
	}

	.sp-menu-item-label {
		padding: 3px;
	}

	.sp-main-content-intro {
		padding: 0px 0px 30px;
	}

	.sp-main-content-content {
		padding: 30px;
		width: 83%;
		line-height: 1.6rem;
	}

	.sp-lessico-teaser-chapter {
		width: 100%;
	}

	.sp-roman {
		width: 35px;
	}

	.fen-1-2 {
		width: 85%;
	}

	.sp-content-image-top img {
		background-repeat: no-repeat;
		background-position: center;
		background-color: #67a3bf;
	}

	.sp-main-content img {
		max-width: unset;
	}

	.sp-content-image-top img {
		width: 500%;
		transform: translateY(0%) translateX(-66%);
	}

	.sp-content-text-top {
		font-size: 1.6rem;
		width: 90%;
		text-align: left;
	}

	.sp-main-content-content h1 {
		font-size: 1.3rem;
		line-height: 1.5rem;
	}

	.sp-article {
		padding: 30px;
	}

	.sp-chapter-bar {
		font-size: 1.15rem;
	}

	.sp-article h2 {
		margin: 0 0 10px;
		font-size: 1.3rem;
	}

	.sp-button-download {
		font-size: 1.5rem;
	}

	.sphere-dialog {
		width: 490px;
	}

	.sphere-dialog {
		left: 5%;
		height: auto;
		width: 100%; 
		max-width: 90%;
	}

	.sp-article-teaser-icon {
		font-size: 25px;
		margin: 0 20px;
	}

	.sp-flex-column {
		flex-direction: unset;
	}

	.sp-events-image > img:nth-child(1) {
		max-width: 100%;
	}

	.sp-article-teaser-share {
		font-size: 1.8rem;
	}

	.chi-siamo > div {
		display: unset;
	}

	.redazione {
		margin: 30px auto 30px;
	}

	.sp-content-text-top-sub {
		padding-left: unset;
		top: 78%;
		font-size: 1.1rem;
		width: 90%;
		left: 5%;
	}

	.sp-contacts {
		margin: 15px 0px 0px;
	}

	.sp-map {
		margin: 0 30px 30px;
	}

	.sp-res-menu-items {
		display: flex;
		justify-content: center;
	}

	.sp-res-menu-title > h1 {
		margin: 0 0 10px;
		text-align: center;
	}
	
	.sp-main-content-box-text {
		font-size: 1.1rem;
	}
	
	.sp-main-content-top-title {
		letter-spacing: 1px;
	}

	h3.sp-intro {
		font-size: 1.5rem;
	}

	.sp-modal-close {
		color: #000;
	}


	.des .sp-button {
		width: auto;
	}

	.sp-button {
		text-align: center;
	}

	.des .sp-button {
		width: auto;
	}

	.sp-public-desbar{
		justify-content: center;	
	}

	.sp-button {
		text-align: center;
		padding: 10px 26px;
	}

	#sp-cookie-banner {
		z-index: 5;
	}
	
	.sphere-dialog .sp-article {
		padding: 15px;
	}
	
	.sphere-dialog-content .sp-content-image-top {
		height: 100px;
	}
	
	.sp-events-image > img {
		width: 100%;
	}
	
	.sp-menu-item-nested {
		position: fixed;
		top: auto;
		left: 5%;
		background: rgba(255, 255, 255, 0.95);
		padding: 15px;
		border-radius: 5px;
		box-shadow: 0 10px 30px rgba(0,0,0,0.2);
		visibility: hidden;
		opacity: 0;
		transform: translateY(10px);
		transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
		z-index: 9999;
		min-width: 220px;
		pointer-events: auto;
	}

	/* Pezza mobile: i box homeBoxes/cerca ereditano width:15% dal layout
	   desktop e su <600px diventano illeggibili (~58px di larghezza).
	   Su mobile li forziamo a colonna unica con margini contenuti. */
	.sp-main-content-intro {
		flex-direction: column;
		align-items: stretch;
	}
	.sp-main-content-box {
		width: auto;
		margin: calc(30px*1.5) 15px 30px;
		min-height: auto;
	}
}

@media only screen and (max-width: 360px) {
	header.sp-flex {
		height: calc(15px*7);
	}
	
	.sp-menu-item-nested {
		position: fixed;
		top: auto;
		left: 5%;
		background: rgba(255, 255, 255, 0.95);
		padding: 15px;
		border-radius: 5px;
		box-shadow: 0 10px 30px rgba(0,0,0,0.2);
		visibility: hidden;
		opacity: 0;
		transform: translateY(10px);
		transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
		z-index: 9999;
		min-width: 220px;
		pointer-events: auto;
	}
}

/* =====================================================================
   Pagina risultati globalSearch — standalone + dentro dialog Sphere
   ===================================================================== */
.sp-search-refine {
	box-sizing: border-box;
	padding: calc(30px*2) 30px 30px;
	gap: 15px;
	align-items: center;
	max-width: 980px;
	margin: 0 auto;
}
.sp-search-refine *, .sp-search-refine *::before, .sp-search-refine *::after { box-sizing: border-box; }
.sp-search-refine .fen { flex: 1; max-width: 680px; min-width: 0; }
.sp-search-refine-button { white-space: nowrap; min-width: 110px; }
.sp-search-results { padding: 0 30px calc(30px*2); max-width: 1180px; margin: 0 auto; }
.sp-search-results .sp-main-content-intro { gap: 15px; justify-content: center; }
.sp-search-results .sp-main-content-box { width: 28%; min-width: 220px; }
.sp-search-results-summary { margin: 0 0 calc(30px*1.5); color: #444; font-size: 1rem; text-align: center; }
.sp-search-results-summary b { color: #a83232; font-size: 1.3rem; font-weight: 700; margin-right: 4px; }
.sp-search-result-count { font-size: 0.95rem; color: #444; }
.sp-search-result-count b { color: #a83232; font-size: 1.2rem; margin-right: 4px; }
.sp-search-result-no-match { color: #999; }
.sp-search-result-empty.sp-main-content-box { opacity: .55; pointer-events: none; }

/* Box bloccato (sezione che richiede login/abbonamento) */
.sp-search-result-locked { position: relative; cursor: pointer; }
.sp-search-result-locked::after {
	content: "\f023"; /* fa-lock */
	font-family: "Font Awesome 6 Pro", "Font Awesome 5 Pro";
	font-weight: 300;
	position: absolute;
	top: 10px;
	right: 12px;
	color: #a83232;
	font-size: 1rem;
	opacity: .75;
}
.sp-search-result-locked .sp-search-result-count { color: #999; }
.sp-search-result-locked .sp-search-result-count b { color: #a83232; }
.sp-search-result-locked:hover::after { opacity: 1; transform: scale(1.1); }

/* Banner sphere.banner per accesso riservato (toast) */
[data-banner].banner-info {
	position: fixed;
	top: 80px;
	right: 30px;
	background: #1c3d68;
	color: #fff;
	padding: calc(15px*1.2) calc(30px*1.2);
	border-radius: 4px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.25);
	font-size: 0.95rem;
	line-height: 1.6;
	max-width: 480px;
	transition: opacity .4s ease;
	z-index: 10000;
	white-space: normal;
	word-spacing: 0.05em;
}
[data-banner].banner-info i { margin-right: 10px; color: #f0c87a; }
[data-banner].banner-info strong { color: #f0c87a; margin: 0 3px; font-weight: 600; }
.sp-search-results-empty { padding: calc(30px*3) 30px; text-align: center; color: #666; }

/* Dentro il dialog Sphere: layout dei box ottimizzato, larghezza dialog ampia.
   .sphere-dialog è il template clonato, .sphere-dialog-content contiene il
   nostro HTML. */
/* Dialog: max 900px, lascia >=100px attorno per dare effetto "finestra" sul sito sotto */
.sphere-dialog { max-width: 900px; width: min(900px, calc(100vw - 100px)) !important; }
.sphere-dialog .sphere-dialog-content { padding: 0; max-height: 78vh; overflow-y: auto; }
.sphere-dialog .sp-search-refine { padding: calc(30px*0.8) 5px 5px; margin: 0 auto; }
.sphere-dialog .sp-search-results { padding: 0 0 5px; }
.sphere-dialog .sp-search-results-summary { margin: 0 0 5px; font-size: 0.85rem; }
.sphere-dialog .sp-search-results-summary b { font-size: 1rem; }
.sphere-dialog .sp-main-content-intro { gap: 4px; justify-content: center; padding: 15px 15px; }
.sphere-dialog .sp-main-content-box {
	width: 30% !important;
	min-width: 170px;
	min-height: auto !important;
	padding: 28px 10px 10px !important;
	margin: calc(30px*0.7) 3px 5px !important;
}
.sphere-dialog .sp-main-content-box-icon {
	width: 10px !important;
	height: 10px !important;
	top: -5px !important;
	font-size: 0.78rem !important;
}
.sphere-dialog .sp-main-content-box-title { font-size: 0.82rem !important; margin-bottom: 6px !important; letter-spacing: .3px; }
.sphere-dialog .sp-main-content-box-text { margin-bottom: 6px !important; font-size: 0.82rem; }
.sphere-dialog .sp-totals { font-size: 0.72rem !important; padding-top: 0 !important; margin-top: 0 !important; }
.sphere-dialog .sp-search-result-count b { font-size: 1rem; }

/* Viewport "intermedi": tablet portrait/laptop piccolo dove il dialog rischia
   di occupare tutto. Compressione ulteriore. */
@media (max-width: 1024px) and (min-width: 761px) {
	.sphere-dialog { width: min(800px, calc(100vw - 80px)) !important; }
	.sphere-dialog .sphere-dialog-content { max-height: 82vh; }
	.sphere-dialog .sp-search-refine { padding: 15px 5px 4px; }
	.sphere-dialog .sp-search-results { padding: 0; }
	.sphere-dialog .sp-search-results-summary { margin: 0 0 5px; font-size: 0.78rem; }
	.sphere-dialog .sp-search-results-summary b { font-size: 0.95rem; }
	.sphere-dialog .sp-main-content-intro { gap: 2px; }
	.sphere-dialog .sp-main-content-box {
		min-width: 150px;
		padding: 22px 6px 6px !important;
		margin: 15px 3px 4px !important;
	}
	.sphere-dialog .sp-main-content-box-icon { width: 26px !important; height: 26px !important; top: -13px !important; font-size: 0.72rem !important; }
	.sphere-dialog .sp-main-content-box-title { font-size: 0.74rem !important; margin-bottom: 4px !important; }
	.sphere-dialog .sp-main-content-box-text { font-size: 0.74rem; margin-bottom: 4px !important; }
	.sphere-dialog .sp-totals { font-size: 0.68rem !important; padding-top: 0 !important; }
	.sphere-dialog .sp-search-dialog-foot { padding: 5px 15px; margin-top: 5px; font-size: 0.75rem; }
}

/* Footer hint del dialog (mockup variante RD).
   Nascosto di default; visibile solo dentro .sphere-dialog. */
.sp-search-dialog-foot { display: none; }
.sphere-dialog .sp-search-dialog-foot {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	justify-content: space-between;
	align-items: center;
	padding: 15px 30px;
	margin: 15px 0 0;
	background: #fafaf8;
	border-top: 1px solid #e1e1dc;
	font-size: 0.85rem;
	color: #6b6b6b;
}
.sphere-dialog .sp-search-dialog-foot-hint b {
	color: #1c3d68;
	font-weight: 600;
	background: #fff;
	padding: 2px 6px;
	border: 1px solid #e1e1dc;
	border-radius: 3px;
	font-family: monospace;
	font-size: 0.85em;
}
.sphere-dialog .sp-search-dialog-foot-hint i { margin-right: 6px; }
.sphere-dialog .sp-search-dialog-foot-link {
	color: #1c3d68;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .4px;
	font-size: 0.75rem;
	text-decoration: none;
	white-space: nowrap;
}
.sphere-dialog .sp-search-dialog-foot-link:hover { color: #a83232; }
.sphere-dialog .sp-search-dialog-foot-link i { margin-left: 4px; }

/* Bottone "minimize-to-icon" iniettato nei .sphere-dialog-controls.
   Stile coerente con .sphere-dialog-max / .sphere-dialog-close esistenti. */
.sphere-dialog-min {
	cursor: pointer;
	color: #fff;
	margin-right: 8px;
	transition: opacity .15s;
	display: inline-flex;
	align-items: center;
}
.sphere-dialog-min:hover { opacity: .7; }

/* FAB sticky in basso a destra dopo minimize. Doppio click → restore. */
.sp-search-fab {
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #1c3d68;
	color: #fff;
	display: none;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(0,0,0,.3);
	z-index: 9999;
	font-size: 1.3rem;
	transition: transform .2s, box-shadow .2s;
	user-select: none;
}
.sp-search-fab:hover { transform: scale(1.08); box-shadow: 0 12px 30px rgba(0,0,0,.4); }
.sp-search-fab::after {
	content: "Doppio click per riaprire";
	position: absolute;
	right: 70px;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(28,61,104,.95);
	color: #fff;
	font-size: 0.75rem;
	padding: 4px 10px;
	border-radius: 4px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s;
}
.sp-search-fab:hover::after { opacity: 1; }

@media (max-width: 760px) {
	.sphere-dialog { width: calc(100vw - 20px) !important; }
	.sphere-dialog .sphere-dialog-content { max-height: 78vh; }
	.sphere-dialog .sp-main-content-box { width: 90% !important; min-width: 0; }
	.sp-search-refine { flex-wrap: wrap; padding: 30px 15px 15px; gap: 15px; }
	.sp-search-refine .fen { width: 100%; max-width: none; }
	.sp-search-refine-button { width: 100%; }
	/* Pagina results standalone (fuori dialog) su mobile */
	.sp-search-results { padding: 0 5px 30px; overflow-x: hidden; }
	.sp-search-results .sp-main-content-intro { flex-direction: column; align-items: stretch; gap: calc(30px*1.5); }
	.sp-search-results .sp-main-content-box { width: auto !important; min-width: 0; margin: calc(30px*1.5) 15px 5px !important; }
	.sp-search-results-summary { padding: 0 15px; }
}

/* =====================================================================
   Search hero (home + dialog risultati)
   - HTML emesso da devsiteSphere::searchSlideshow (addons/devsitesphere.php)
   - JS in fondo a questo lessico.js (typewriter, chip, submit)
   ===================================================================== */
.sp-search-hero { position: relative; min-height: 440px; overflow: hidden; display: flex; align-items: center; justify-content: center; color: #fff; margin-bottom: 30px; }
.sp-search-hero-bg { position: absolute; inset: 0; z-index: 0; }
.sp-search-hero-slide { position: absolute; inset: -30px; background-size: cover; background-position: center; opacity: 0; animation-name: sp-search-hero-cross; animation-timing-function: ease-in-out; animation-iteration-count: infinite; transform: scale(1.05); filter: blur(7px) brightness(.85); }
@keyframes sp-search-hero-cross { 0% { opacity: 0; transform: scale(1.05); } 6% { opacity: 1; } 44% { opacity: 1; transform: scale(1.13); } 50% { opacity: 0; transform: scale(1.14); } 100% { opacity: 0; transform: scale(1.14); } }
.sp-search-hero-overlay { position: absolute; inset: 0; background: radial-gradient(circle farthest-corner at center, rgba(0,0,0,.55) 0%, rgba(0,0,0,.25) 50%, rgba(0,0,0,0) 100%), rgba(8,18,34,.05); pointer-events: none; }
.sp-search-hero-inner { position: relative; z-index: 2; width: 100%; max-width: 880px; padding: 40px 24px; text-align: center; }
.sp-search-hero-title { color: #fff; font-size: 34px; font-weight: 300; margin: 0 0 8px; letter-spacing: .5px; text-shadow: 0 2px 8px rgba(0,0,0,.4); line-height: 1.2; }
.sp-search-hero-accent { color: #f0c87a; font-style: italic; font-weight: 400; }
.sp-search-hero-subtitle { color: rgba(255,255,255,.95); font-size: 14px; margin: 0 0 26px; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.sp-search-hero-form { display: flex; background: #fff; border-radius: 50px; padding: 6px; box-shadow: 0 14px 40px rgba(0,0,0,.35), 0 4px 12px rgba(0,0,0,.2); max-width: 680px; margin: 0 auto; align-items: center; }
.sp-search-hero-input { flex: 1; border: 0; outline: 0; padding: 16px 22px; font-size: 16px; background: transparent; color: #222; min-width: 0; }
.sp-search-hero-button { background: #25477a; color: #fff; border: 0; padding: 14px 30px; border-radius: 50px; font-size: 13px; letter-spacing: .6px; text-transform: uppercase; cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.sp-search-hero-button:hover { background: #67a2be; }
.sp-search-hero-popular { margin-top: 18px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; align-items: center; }
.sp-search-hero-popular-label { color: rgba(255,255,255,.85); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; margin-right: 4px; }
.sp-search-hero-chip { background: rgba(255,255,255,.12); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; border: 1px solid rgba(255,255,255,.25); padding: 5px 12px; border-radius: 18px; font-size: 12px; cursor: pointer; transition: .2s; font-family: inherit; animation: sp-search-hero-fadeup .6s ease both; }
.sp-search-hero-chip:hover { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.4); transform: translateY(-1px); }
.sp-search-hero-chip:nth-child(2) { animation-delay: .1s; }
.sp-search-hero-chip:nth-child(3) { animation-delay: .2s; }
.sp-search-hero-chip:nth-child(4) { animation-delay: .3s; }
.sp-search-hero-chip:nth-child(5) { animation-delay: .4s; }
.sp-search-hero-chip:nth-child(6) { animation-delay: .5s; }
@keyframes sp-search-hero-fadeup { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 760px) {
	.sp-search-hero { min-height: 360px; }
	.sp-search-hero-title { font-size: 22px; }
	.sp-search-hero-input { font-size: 14px; padding: 12px 16px; }
	.sp-search-hero-button-label { display: none; }
	.sp-search-hero-button { padding: 12px 16px; border-radius: 50%; }
}
