/*
Theme Name: Ferrari e Marchesi
Author: Nemesi Italia S.r.l.
Version: 1.0
Text Domain: ferrari-e-marchesi
*/

/* UTILITY CLASSES */

/*
 * Overlay scuro su un elemento con immagine di sfondo.
 * Applica la classe al contenitore e imposta --bg-darken-opacity via style inline.
 *
 * Uso:
 *   <div class="tt-item__bg bg-darken" style="--bg-darken-opacity: 0.5">
 *
 * --bg-darken-opacity: valore da 0.0 (nessun effetto) a 1.0 (nero totale).
 *   Default: 0.4
 */
.bg-darken {
	--bg-darken-opacity: 0.5;
	position: relative;
}
.bg-darken::after {
	content: "";
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, var(--bg-darken-opacity));
	pointer-events: none;
	z-index: 1;
}

.mt-1 {
	margin-top: 1rem !important;
}
.mt-2 {
	margin-top: 2rem !important;
}
.mt-3 {
	margin-top: 3rem !important;
}
.mb-1 {
	margin-bottom: 1rem !important;
}
.mb-2 {
	margin-bottom: 2rem !important;
}
.mb-3 {
	margin-bottom: 3rem !important;
}

/* HEADINGS */
h1 {
	font-size: clamp(2rem, 5vw, 3rem) !important;
}

h2 {
	font-size: clamp(1.5rem, 4vw, 2.5rem) !important;
}

/* HEADER */
/* Active nav menu item - mirrors li.active rule in assets/css/style.css */
#tt-nav > ul > li.current-menu-item > a,
#tt-nav > ul > li.current_page_item > a {
	color: var(--default_color);
}

.tt-col-logo {
	display: flex;
	align-items: center;
}

.custom-logo {
	width: 220px;
	height: auto;
	z-index: 1000;
}

/* SLIDEINFO - nasconde il marker quando il pannello è aperto */
.tt-slideinfo.open-info .tt-item__title .tt-icon {
	display: none;
}

/* GALLERIA REALIZZAZIONI */
#filter-layout .tt-gallery {
	aspect-ratio: 4 / 3;
}

#filter-layout .tt-gallery img {
	height: 100%;
	object-fit: cover;
}

/* CONTACT FORM 7 - integrazione con form-default */

/* Lo span wrapper di CF7 deve comportarsi come un block per rispettare width:100% */
.form-default .wpcf7-form-control-wrap {
	display: block;
}

/* Il submit di CF7 è un <input>, non un <button> */
.form-default input[type="submit"] {
	margin-top: 27px;
	cursor: pointer;
	border: none;
}

/* Messaggi di validazione CF7 */
.form-default .wpcf7-not-valid-tip {
	display: block;
	margin-top: 4px;
	font-size: 13px;
	color: #f8353e;
}

.form-default .wpcf7-response-output {
	margin: 16px 0 0;
	padding: 10px 16px;
	border-radius: var(--radius);
	font-size: 14px;
	border: none;
}

.wpcf7-mail-sent-ok {
	background-color: #d4edda;
	color: #155724;
}

.wpcf7-validation-errors,
.wpcf7-spam-blocked {
	background-color: #f8d7da;
	color: #721c24;
}

/* Checkbox accettazione privacy */
.form-default .wpcf7-acceptance {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-top: 4px;
}

.form-default .wpcf7-acceptance input[type="checkbox"] {
	flex-shrink: 0;
	margin-top: 3px;
	width: 16px;
	height: 16px;
	cursor: pointer;
}

.form-default .wpcf7-acceptance .wpcf7-list-item-label {
	font-size: 14px;
	line-height: 1.5;
	color: var(--default_text_color);
}

.form-default .wpcf7-acceptance .wpcf7-list-item-label a {
	color: var(--default_color);
	text-decoration: underline;
}

/* FOOTER MENU - single column */
.f-nav li {
	width: 100% !important;
	float: none !important;
}

/* FOOTER MAP - mirror #map styles for renamed #fem-map */
@media (min-width: 1230px) {
	#fem-map {
		width: 429px;
		height: 300px;
	}
}
@media (max-width: 1229px) {
	#fem-map {
		height: 300px;
		width: calc(50% - 30px);
		max-width: calc(50% - 30px);
		right: 25px;
	}
}
@media (min-width: 576px) {
	#fem-map {
		position: absolute !important;
		top: 25px;
		right: 15px;
	}
}
@media (max-width: 575px) {
	#fem-map {
		width: 100%;
		height: 300px;
		max-width: inherit;
		position: relative;
		margin-top: 35px;
		right: 0;
	}
}

.footer-wrapper {
	padding-top: 75px;
}

/* GOOGLE RECAPTCHA BADGE */
.grecaptcha-badge {
	display: none !important;
}
