/*
Theme Name: Betheme Child
Theme URI: https://themes.muffingroup.com/betheme
Author: Muffin group
Author URI: https://muffingroup.com
Description: Child Theme for Betheme - DOC Stefano Sicuro
Template: betheme
Version: 2.1.0
*/

/* ==========================================================================
   Convenzioni
   - Tutte le classi custom usano il prefisso .btc- e si assegnano dal campo
     "Custom Classes" di Sezioni, Wrap ed Elementi BeBuilder.
   - Niente stili in linea: ogni regola sta in questo file.
   - I colori e le misure ricorrenti stanno nelle variabili qui sotto.
   - Header, menu mobile, titolo pagina e footer sono del child
     (header.php, footer.php, template-parts/); i template BeBuilder di
     header, footer e menu laterale non vengono più stampati.
   ========================================================================== */

/* 1. Variabili
   ========================================================================== */

:root {
	--btc-gap: 24px;
	--btc-radius: 8px;
	--btc-radius-photo: 16px; /* Foto singole (immagini, Team, blog). */

	/* Colori del sito (Theme Options di BeTheme). */
	--btc-blue: #4774b8;
	--btc-blue-dark: #4068a5;
	--btc-red: #ff3c58;
	--btc-text: #6d6e70;
	--btc-heading: #2e2e2e;
	--btc-muted: #757575;
	--btc-soft: #e6eff2;
	--btc-soft-2: #f3f7f9;
	--btc-line: rgba(0, 0, 0, 0.08);
	--btc-focus: #14179a;

	/* Header. */
	--btc-header-h: 88px;
	--btc-header-h-scrolled: 72px;
	--btc-logo-h: 46px;
	--btc-container: 1220px;
	--btc-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media only screen and (max-width: 1024px) {
	:root {
		--btc-header-h: 72px;
		--btc-header-h-scrolled: 64px;
		--btc-logo-h: 40px;
	}
}

/* 1a. Utility
   ========================================================================== */

.btc-container {
	box-sizing: border-box;
	width: 100%;
	max-width: var(--btc-container);
	margin: 0 auto;
	padding: 0 var(--btc-gap);
}

.btc-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Link "Vai al contenuto": nascosto finché non riceve il focus da tastiera. */
.btc-skip-link {
	position: absolute;
	top: -100px;
	left: 16px;
	z-index: 100001;
	padding: 12px 20px;
	background: var(--btc-focus);
	color: #fff;
	border-radius: var(--btc-radius);
	font-weight: 500;
	text-decoration: none;
}

.btc-skip-link:focus {
	top: 16px;
	color: #fff;
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* Pulsanti del child (anche assegnabili a link BeBuilder). */
.btc-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
	min-height: 44px;
	padding: 10px 22px;
	border: 1.5px solid transparent;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btc-button--primary {
	background: var(--btc-blue);
	color: #fff;
}

.btc-button--primary:hover,
.btc-button--primary:focus-visible {
	background: var(--btc-blue-dark);
	color: #fff;
}

.btc-button--outline {
	border-color: var(--btc-blue);
	background: transparent;
	color: var(--btc-blue);
}

.btc-button--outline:hover,
.btc-button--outline:focus-visible {
	background: var(--btc-blue);
	color: #fff;
}

.btc-button--block {
	display: flex;
	width: 100%;
}

/* Pulsanti con icona nei testi del BeBuilder (es. urgenze nei Contatti). */
.btc-button--phone::before,
.btc-button--whatsapp::before {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	background-color: currentColor;
	-webkit-mask: var(--btc-icon) center / contain no-repeat;
	mask: var(--btc-icon) center / contain no-repeat;
}

.btc-button--phone {
	--btc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1.9.4 1.8.7 2.7a2 2 0 0 1-.5 2.1L8 9.8a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.7.7a2 2 0 0 1 1.7 2z'/%3E%3C/svg%3E");
}

.btc-button--whatsapp {
	--btc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21l1.6-4.7A8.5 8.5 0 1 1 7.9 19.6z'/%3E%3C/svg%3E");
}

/* Su mobile BeTheme fa ereditare il colore ai link tel: (responsive.css). */
a.btc-button.btc-button--primary[href^="tel"] {
	color: #fff;
}

.btc-button-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.btc-header a:focus-visible,
.btc-header button:focus-visible,
.btc-drawer a:focus-visible,
.btc-drawer button:focus-visible,
.btc-footer a:focus-visible,
.btc-to-top:focus-visible {
	outline: 2px solid var(--btc-focus);
	outline-offset: 3px;
}

/* 2. Header
   Trasparente all'inizio, bianco con ombra dopo lo scorrimento
   (.is-scrolled, da btc-main.js). Sopra lo slider della home
   (body.template-slider) testo e logo sono bianchi finché è trasparente.
   ========================================================================== */

.btc-header {
	position: fixed;
	top: var(--wp-admin--admin-bar--height, 0px);
	right: 0;
	left: 0;
	z-index: 9000;
	background: transparent;
	transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.btc-header__inner {
	display: flex;
	align-items: center;
	gap: 32px;
	height: var(--btc-header-h);
	transition: height 0.3s var(--btc-ease);
}

.btc-header.is-scrolled {
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 6px 24px rgba(20, 35, 70, 0.08);
	backdrop-filter: saturate(180%) blur(12px);
	-webkit-backdrop-filter: saturate(180%) blur(12px);
}

.btc-header.is-scrolled .btc-header__inner {
	height: var(--btc-header-h-scrolled);
}

/* Logo: versione scura di base, chiara sopra lo slider.
   Selettori a due classi: BeTheme imposta img:not([src$=".svg"]) {height:auto}. */
.btc-header__brand {
	display: flex;
	flex-shrink: 0;
	align-items: center;
}

.btc-header .btc-header__logo {
	display: block;
	width: auto;
	height: var(--btc-logo-h);
}

.btc-header .btc-header__logo--light {
	display: none;
}

.template-slider .btc-header:not(.is-scrolled) .btc-header__logo--light {
	display: block;
}

.template-slider .btc-header:not(.is-scrolled) .btc-header__logo--dark {
	display: none;
}

/* Menu orizzontale. */
.btc-header__nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

.btc-menu,
.btc-menu ul,
.btc-drawer-menu,
.btc-drawer-menu ul,
.btc-footer__list,
.btc-footer__links,
.btc-drawer__contacts {
	margin: 0;
	padding: 0;
	list-style: none;
}

.btc-menu {
	display: flex;
	align-items: center;
	gap: 8px;
}

.btc-menu > li {
	position: relative;
	margin: 0;
}

.btc-menu > li > a {
	position: relative;
	display: block;
	padding: 10px 14px;
	color: var(--btc-blue);
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0.01em;
	text-decoration: none;
	transition: color 0.2s ease;
}

.btc-menu > li > a::after {
	content: "";
	position: absolute;
	right: 14px;
	bottom: 4px;
	left: 14px;
	height: 2px;
	border-radius: 2px;
	background: var(--btc-red);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.25s var(--btc-ease);
}

.btc-menu > li > a:hover,
.btc-menu > .current-menu-item > a,
.btc-menu > .current-menu-ancestor > a {
	color: var(--btc-red);
}

/* La voce della pagina corrente resta rossa, senza sottolineatura. */
.btc-menu > li > a:hover::after {
	transform: scaleX(1);
}

.template-slider .btc-header:not(.is-scrolled) .btc-menu > li > a {
	color: #fff;
	text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

.template-slider .btc-header:not(.is-scrolled) .btc-menu > li > a:hover,
.template-slider .btc-header:not(.is-scrolled) .btc-menu > .current-menu-item > a {
	color: #fff;
}

/* Sottomenu (tendina di I servizi). */
.btc-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 270px;
	padding: 8px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba(20, 35, 70, 0.12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.btc-menu li:hover > .sub-menu,
.btc-menu li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.btc-menu .sub-menu a {
	display: block;
	padding: 10px 12px;
	border-radius: 8px;
	color: var(--btc-heading);
	font-size: 15px;
	text-decoration: none;
}

.btc-menu .sub-menu a:hover {
	background: var(--btc-soft-2);
	color: var(--btc-blue);
}

/* Azioni a destra: Prenota e hamburger. */
.btc-header__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-left: auto;
}

.btc-burger,
.btc-drawer__close,
.btc-to-top {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	color: inherit;
	font: inherit;
	cursor: pointer;
	overflow: visible;
	-webkit-appearance: none;
	appearance: none;
}

.btc-burger {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	color: var(--btc-blue);
}

.btc-burger:hover {
	background: rgba(71, 116, 184, 0.1);
}

.btc-burger__lines,
.btc-burger__lines::before,
.btc-burger__lines::after {
	display: block;
	width: 22px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
}

.btc-burger__lines {
	position: relative;
}

.btc-burger__lines::before,
.btc-burger__lines::after {
	content: "";
	position: absolute;
	left: 0;
}

.btc-burger__lines::before {
	top: -7px;
}

.btc-burger__lines::after {
	top: 7px;
}

.template-slider .btc-header:not(.is-scrolled) .btc-burger {
	color: #fff;
}

.template-slider .btc-header:not(.is-scrolled) .btc-burger:hover {
	background: rgba(255, 255, 255, 0.15);
}

@media only screen and (max-width: 1024px) {
	.btc-header__nav {
		display: none;
	}

	.btc-header__cta {
		min-height: 40px;
		padding: 8px 18px;
		font-size: 14px;
	}
}

@media only screen and (max-width: 359px) {
	.btc-header__cta {
		display: none;
	}
}

/* 2a. Menu mobile (pannello laterale)
   ========================================================================== */

.btc-drawer {
	position: fixed;
	inset: 0;
	z-index: 100000;
	visibility: hidden;
	transition: visibility 0s linear 0.35s;
}

.btc-drawer.is-open {
	visibility: visible;
	transition: visibility 0s;
}

.btc-drawer__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
	opacity: 0;
	transition: opacity 0.35s ease;
}

.btc-drawer.is-open .btc-drawer__overlay {
	opacity: 1;
}

.btc-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	gap: 28px;
	box-sizing: border-box;
	width: min(380px, 90vw);
	padding: 20px 24px 32px;
	overflow-y: auto;
	background: #fff;
	box-shadow: -12px 0 40px rgba(20, 35, 70, 0.15);
	transform: translateX(100%);
	transition: transform 0.35s var(--btc-ease);
}

.btc-drawer.is-open .btc-drawer__panel {
	transform: none;
}

body.btc-drawer-open {
	overflow: hidden;
}

.btc-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.btc-drawer .btc-drawer__logo {
	display: block;
	width: auto;
	height: 40px;
}

.btc-drawer__close {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	color: var(--btc-heading);
	font-size: 30px;
	line-height: 1;
}

.btc-drawer__close:hover {
	background: var(--btc-soft-2);
}

.btc-drawer-menu li {
	margin: 0;
	border-bottom: 1px solid var(--btc-line);
}

.btc-drawer-menu a {
	display: block;
	padding: 14px 0;
	color: var(--btc-heading);
	font-size: 20px;
	font-weight: 500;
	text-decoration: none;
}

.btc-drawer-menu .sub-menu a {
	padding-left: 16px;
	font-size: 17px;
}

.btc-drawer-menu a:hover,
.btc-drawer-menu .current-menu-item > a {
	color: var(--btc-red);
}

.btc-drawer__contacts {
	display: grid;
	gap: 12px;
	margin-top: auto;
	font-size: 15px;
	line-height: 1.4;
}

.btc-drawer__contacts li {
	margin: 0;
}

.btc-drawer__contacts a {
	color: var(--btc-blue);
	text-decoration: none;
}

.btc-drawer__contacts span {
	display: block;
	color: var(--btc-muted);
	font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
	.btc-header,
	.btc-header__inner,
	.btc-drawer,
	.btc-drawer__overlay,
	.btc-drawer__panel,
	.btc-menu > li > a::after,
	.btc-to-top {
		transition: none;
	}
}

/* 2b. Titolo della pagina (H1) al posto del subheader di BeTheme
   ========================================================================== */

.btc-page-title {
	padding: calc(var(--btc-header-h) + 64px) 0 56px;
	background: linear-gradient(180deg, var(--btc-soft) 0%, var(--btc-soft-2) 100%);
}

/* Breadcrumb sopra l'H1 (Rank Math). */
.btc-breadcrumb {
	margin: 0 0 16px;
	color: var(--btc-muted);
	font-size: 14px;
	line-height: 1.5;
}

.btc-breadcrumb p {
	margin: 0;
}

.btc-breadcrumb a {
	color: var(--btc-blue);
	text-decoration: none;
}

.btc-breadcrumb a:hover,
.btc-breadcrumb a:focus-visible {
	text-decoration: underline;
}

.btc-breadcrumb .separator {
	margin: 0 6px;
}

.btc-page-title__heading {
	max-width: 24ch;
	margin: 0;
	color: var(--btc-blue);
	font-size: clamp(2rem, 1.3rem + 2.4vw, 3.25rem);
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.btc-page-title__heading::after {
	content: "";
	display: block;
	width: 56px;
	height: 3px;
	margin-top: 20px;
	border-radius: 3px;
	background: var(--btc-red);
}

@media only screen and (max-width: 767px) {
	.btc-page-title {
		padding: calc(var(--btc-header-h) + 36px) 0 36px;
	}
}

/* Pagine senza titolo e senza slider: spazio per l'header fisso. */
body.btc-no-title:not(.template-slider) #Wrapper {
	padding-top: var(--btc-header-h);
}

/* 2c. H1 nello slider della home (Revolution Slider)
   Nel livello del slider:
   <h1 class="btc-hero-title"><span class="btc-hero-title__main">…</span>
   <span class="btc-hero-title__brand">DOC Stefano Sicuro</span></h1>
   Dimensioni e colori sono qui, non nel livello. !important su line-height
   e font-size perché Revolution Slider li scrive in linea sugli elementi
   del livello e li ridimensiona per ogni dispositivo.
   ========================================================================== */

#rev_slider_1_1 rs-layer h1 {
	margin: 0;
	line-height: 0 !important;
	letter-spacing: 0;
}

#rev_slider_1_1 rs-layer h1 > span {
	line-height: 1.15 !important;
	letter-spacing: 0;
}

#rev_slider_1_1 .btc-hero-title > span {
	display: block;
	font-weight: 500;
}

#rev_slider_1_1 .btc-hero-title__main {
	color: #fff;
	font-size: clamp(1.75rem, 1rem + 2.6vw, 3rem) !important;
}

#rev_slider_1_1 .btc-hero-title__brand {
	margin-top: 4px;
	color: var(--btc-red);
	font-size: clamp(1.375rem, 0.9rem + 1.8vw, 2.25rem) !important;
}

/* 3. Sidebar e widget
   ========================================================================== */

/* 4. Blocchi di contenuto (classi BeBuilder)
   ========================================================================== */

/* Angoli arrotondati per le foto singole: elemento Immagine, schede Team,
   anteprime del blog e articoli correlati. Gli sfondi di sezione e wrap
   restano a filo. */
.column_image .image_frame,
.column_image .image_wrapper,
.column_image .image_frame img,
.column_our_team .image_frame,
.column_our_team .image_wrapper,
.column_our_team .image_frame img,
.post-photo-wrapper.image_frame,
.post-photo-wrapper .image_wrapper,
.post-photo-wrapper img,
.section-related-adjustment .image_frame,
.section-related-adjustment .image_wrapper,
.section-related-adjustment .image_frame img {
	border-radius: var(--btc-radius-photo);
}

.column_image .image_frame,
.column_our_team .image_frame,
.post-photo-wrapper.image_frame,
.section-related-adjustment .image_frame {
	overflow: hidden;
}

/* Fancy link di BeTheme, stile 6 ("Conosci il nostro team" e simili):
   in origine grigio al 25% su bianco, illeggibile. */
a.mfn-link.mfn-link-6 {
	margin-left: 0;
	border-top-color: var(--btc-line);
	color: var(--btc-blue);
	font-weight: 500;
}

a.mfn-link.mfn-link-6:hover,
a.mfn-link.mfn-link-6:focus-visible {
	color: var(--btc-blue-dark);
}

/* Pulsante BeBuilder "Come raggiungerci": blu con icona a segnaposto.
   Classe da assegnare al pulsante: btc-button-map */
a.button.btc-button-map {
	display: inline-flex;
	flex-direction: row-reverse;
	align-items: center;
	gap: 10px;
	padding: 12px 24px;
	border: 0;
	border-radius: 999px;
	background: var(--btc-blue);
	color: #fff;
	box-shadow: 0 8px 20px rgba(71, 116, 184, 0.25);
	transition: background-color 0.2s ease, transform 0.2s ease;
}

a.button.btc-button-map:hover,
a.button.btc-button-map:focus-visible {
	background: var(--btc-blue-dark);
	color: #fff;
	transform: translateY(-1px);
}

a.button.btc-button-map .button_label {
	padding: 0;
	color: #fff;
}

a.button.btc-button-map .button_icon {
	position: static;
	display: inline-flex;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}

a.button.btc-button-map .button_icon i {
	display: block;
	width: 18px;
	height: 18px;
	margin: 0;
	background-color: currentColor;
	color: #fff;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21.5s-7-6.1-7-11.5a7 7 0 0 1 14 0c0 5.4-7 11.5-7 11.5z'/%3E%3Ccircle cx='12' cy='10' r='2.6'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21.5s-7-6.1-7-11.5a7 7 0 0 1 14 0c0 5.4-7 11.5-7 11.5z'/%3E%3Ccircle cx='12' cy='10' r='2.6'/%3E%3C/svg%3E") no-repeat center / contain;
}

a.button.btc-button-map .button_icon i::before {
	content: none;
}

/* 4a. Pagina profilo (Dott. Stefano Sicuro, ID 257), sottopagine di Servizi
   (ID 260-263) e Domande frequenti (ID 264)
   Sezioni BeBuilder:  btc-profile-intro | btc-profile-section
                       (+ btc-profile-events per il fondo chiaro)
                       (+ btc-faq: ogni <h3> è una domanda, letta anche dallo schema FAQPage)
   Nel testo:          p.btc-lead, ul.btc-timeline
   ========================================================================== */

.btc-lead {
	color: var(--btc-heading);
	font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3rem);
	line-height: 1.6;
}

.btc-profile-section h2 {
	margin-bottom: 16px;
	color: var(--btc-blue);
	font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem);
	line-height: 1.25;
}

.btc-profile-section .column_attr > h2:not(:first-child) {
	margin-top: 48px;
}

.btc-faq h3 {
	margin: 32px 0 8px;
	color: var(--btc-heading);
	font-size: 1.2rem;
	line-height: 1.4;
}

.btc-faq .column_attr > h2 + h3 {
	margin-top: 24px;
}

.btc-profile-events {
	margin-top: 80px;
	padding-bottom: 80px !important; /* BeBuilder scrive padding in linea */
	background: var(--btc-soft-2);
}

.btc-timeline {
	margin: 24px 0 0;
	padding: 0;
	list-style: none;
}

.btc-timeline li {
	position: relative;
	list-style: none;
	margin: 0;
	padding: 0 0 24px 28px;
	border-left: 2px solid var(--btc-soft);
}

.btc-timeline li:last-child {
	padding-bottom: 0;
}

.btc-timeline li::before {
	content: "";
	position: absolute;
	top: 6px;
	left: -7px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--btc-red);
}

.btc-timeline__date {
	display: block;
	margin-bottom: 4px;
	color: var(--btc-blue);
	font-size: 14px;
	font-weight: 600;
}

@media only screen and (max-width: 767px) {
	.btc-profile-intro .column_attr {
		padding-top: 24px;
	}
}

/* 4b. Pagina Team (ID 122)
   Sezioni BeBuilder:  btc-team-group (una per gruppo: odontoiatri, igienisti,
                       assistenti, segreteria), con una Colonna <h2> e gli
                       elementi "Our team"
   Nella descrizione:  ul.btc-team-cv (laurea, specializzazione, albo),
                       p.btc-team-profile (pulsante verso il profilo)
   Carosello:          assets/js/btc-main.js sposta le schede in
                       .btc-team-viewport > .btc-team-track e aggiunge
                       contatore e frecce. Con .is-pinned la sezione resta
                       ferma e lo scorrimento verticale della pagina fa
                       scorrere le schede in orizzontale, in direzione
                       alternata (.is-reverse sui gruppi pari: verso destra);
                       con .is-native (movimento ridotto) si scorre a mano.
   ========================================================================== */

.btc-team-group {
	--btc-team-card: clamp(230px, 21vw, 290px);
	--btc-team-gap: 24px;
	padding-top: 56px;
}

.btc-team-group h2 {
	margin: 0;
	color: var(--btc-blue);
	font-size: clamp(2rem, 1.4rem + 2.2vw, 3.4rem);
	font-weight: 400;
	line-height: 1.05;
}

/* Foto tutte della stessa altezza, anche se i file hanno proporzioni diverse */
.btc-team-group .column_our_team .image_wrapper img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	object-position: top center;
}

/* Riga del titolo: nome del gruppo a sinistra, numero e frecce a destra */
.btc-team-group.is-carousel .column_column .column_attr {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 32px;
}

/* Il clearfix di BeTheme diventerebbe un elemento flex e sposterebbe il titolo */
.btc-team-group.is-carousel .column_column .column_attr::before,
.btc-team-group.is-carousel .column_column .column_attr::after {
	display: none;
}

.btc-team-controls {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
}

.btc-team-count {
	color: var(--btc-heading);
	font-size: clamp(2rem, 1.4rem + 2.2vw, 3.4rem);
	font-weight: 300;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.btc-team-arrows {
	display: flex;
	gap: 8px;
}

.btc-team-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: var(--btc-soft);
	color: var(--btc-heading);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.btc-team-arrow:hover,
.btc-team-arrow:focus-visible {
	background: var(--btc-blue);
	color: #fff;
}

.btc-team-arrow:disabled {
	opacity: 0.35;
	cursor: default;
	background: var(--btc-soft);
	color: var(--btc-heading);
}

.btc-team-group.is-static .btc-team-arrows {
	display: none;
}

.btc-team-group.is-carousel .column_column .mcb-column-inner {
	margin-right: 0;
	margin-left: 0;
	padding-right: 0;
	padding-left: 0;
}

/* Binario delle schede a tutta larghezza dello schermo. La prima scheda parte
   allineata al titolo e l'ultima si ferma sul margine destro della pagina:
   il padding interno (calc(50vw - 50%)) è la distanza tra il bordo dello
   schermo e il contenuto, e le schede vi scorrono dentro. */
.btc-team-viewport {
	box-sizing: border-box;
	flex: 0 0 auto;
	width: 100vw;
	max-width: none;
	margin-left: calc(50% - 50vw);
	padding-right: calc(50vw - 50%);
	padding-left: calc(50vw - 50%);
	overflow: hidden;
}

.btc-team-track {
	display: flex;
	gap: var(--btc-team-gap);
	width: max-content;
	will-change: transform;
}

.btc-team-track > .column_our_team {
	flex: 0 0 var(--btc-team-card);
	width: var(--btc-team-card);
	margin: 0;
	float: none;
}

.btc-team-track .mcb-column-inner {
	margin: 0;
}

/* Scheda: nome e ruolo sopra la foto con una sola linea verticale accanto
   (la linea è il ::before della scheda e occupa le due righe della griglia);
   curriculum sotto la foto */
.btc-team-track .team {
	display: grid;
	grid-template-columns: 1px 1fr;
	column-gap: 12px;
}

.btc-team-track .team::before {
	content: "";
	grid-column: 1;
	grid-row: 1 / 3;
	background: var(--btc-heading);
}

.btc-team-track .desc_wrapper {
	display: contents;
}

.btc-team-track .desc_wrapper::before,
.btc-team-track .desc_wrapper::after,
.btc-team-group .btc-team-track .desc_wrapper .hr_color {
	display: none;
}

.btc-team-group .btc-team-track .desc_wrappper_title {
	grid-column: 2;
	grid-row: 1;
	margin: 0;
	padding: 0 0 2px;
	font-size: 17px;
	line-height: 1.3;
}

.btc-team-group .btc-team-track .subtitle {
	grid-column: 2;
	grid-row: 2;
	margin: 0;
	padding: 0;
	font-size: 13px;
	line-height: 1.4;
}

.btc-team-track .image_frame {
	grid-column: 1 / -1;
	grid-row: 3;
	margin: 14px 0 16px;
}

.btc-team-track .desc {
	grid-column: 1 / -1;
	grid-row: 4;
}

/* Su mobile BeTheme mette overflow-x: hidden sul body, che diventa un
   contenitore di scorrimento e blocca position: sticky. clip taglia allo
   stesso modo ma non crea il contenitore. Classe aggiunta dallo script. */
body.btc-has-team-carousel {
	overflow-x: clip;
	overflow-y: visible;
}

/* Sezione ferma mentre le schede scorrono: lo spaziatore (aggiunto dallo
   script dopo .section_wrapper) dà alla sezione l'altezza dello scorrimento */
.btc-team-spacer {
	display: none;
}

.btc-team-group.is-pinned:not(.is-static) > .btc-team-spacer {
	display: block;
	height: var(--btc-team-distance, 0);
}

.btc-team-group.is-pinned:not(.is-static) > .section_wrapper {
	position: sticky;
	z-index: 2; /* sopra .mcb-background-overlay, che altrimenti prende i clic sulle frecce */
	top: var(--btc-team-top, 80px);
	padding-top: 24px;
}

.btc-team-group > .mcb-background-overlay {
	pointer-events: none;
}

/* Movimento ridotto: scorrimento orizzontale a mano */
.btc-team-group.is-native .btc-team-viewport {
	overflow-x: auto;
	scroll-padding-left: calc(50vw - 50%);
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
}

.btc-team-group.is-native .btc-team-track > .column_our_team {
	scroll-snap-align: start;
}

.btc-team-profile {
	margin: 14px 0 0;
}

@media only screen and (max-width: 767px) {
	.btc-team-group {
		--btc-team-card: 72vw;
		--btc-team-gap: 16px;
	}
}

@media only screen and (min-width: 768px) and (max-height: 780px) {
	.btc-team-group {
		--btc-team-card: 220px;
	}
}

.btc-team-cv {
	margin: 0;
	padding: 0;
	list-style: none;
}

.btc-team-cv li {
	margin: 0 0 6px;
	padding: 0;
	list-style: none;
	font-size: 14px;
	line-height: 1.5;
}

/* 4c. Moduli: consenso privacy sopra il pulsante (classe btc-form-consent nel
   modulo CF7) e campo trappola anti-spam (inc/antispam.php) fuori dallo schermo
   ========================================================================== */

.btc-form-consent .wpcf7-list-item {
	margin: 0 0 8px;
}

.btc-form-consent label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13px;
	line-height: 1.6;
	cursor: pointer;
}

.btc-form-consent input[type="checkbox"] {
	flex: 0 0 auto;
	margin: 4px 0 0;
}

.btc-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* 5. Footer
   ========================================================================== */

.btc-footer {
	background: var(--btc-soft-2);
	color: var(--btc-muted);
	font-size: 15px;
	line-height: 1.6;
}

.btc-footer a {
	color: #3e3e3e;
	text-decoration: none;
	transition: color 0.2s ease;
}

.btc-footer a:hover {
	color: var(--btc-blue);
}

.btc-footer a.btc-button--primary,
.btc-footer a.btc-button--primary:hover,
.btc-footer a.btc-button--outline:hover {
	color: #fff;
}

.btc-footer a.btc-button--outline {
	color: var(--btc-blue);
}

.btc-footer__grid {
	display: grid;
	grid-template-columns: 1.5fr 1.2fr 1fr 1fr;
	gap: 40px;
	padding-top: 72px;
	padding-bottom: 48px;
}

.btc-footer__col {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
}

.btc-footer .btc-footer__logo {
	display: block;
	width: auto;
	height: 52px;
}

.btc-footer__tagline {
	margin: 0;
}

.btc-footer__label {
	margin: 0;
	color: var(--btc-red);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.btc-footer__list {
	display: grid;
	gap: 10px;
}

.btc-footer__list li,
.btc-footer__links li {
	margin: 0;
}

/* Prenota + Indicazioni affiancati. */
.btc-footer__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 4px;
}

.btc-icon {
	flex: none;
}

.btc-footer__note {
	display: block;
	color: var(--btc-muted);
	font-size: 13px;
}

.btc-footer__address {
	margin: 0;
	font-style: normal;
}

/* Orari sotto l'indirizzo, nella stessa colonna. */
.btc-footer__address + .btc-footer__label {
	margin-top: 8px;
}

.btc-footer__legal {
	display: grid;
	gap: 10px;
	margin: 0;
}

.btc-footer__legal dt {
	color: var(--btc-muted);
	font-size: 13px;
	font-weight: 400;
}

.btc-footer__legal dd {
	margin: 0;
	color: #3e3e3e;
}

.btc-footer__bottom {
	border-top: 1px solid var(--btc-line);
	font-size: 13px;
}

.btc-footer__bottom-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 24px;
	padding-top: 20px;
	padding-bottom: 20px;
}

.btc-footer__bottom p {
	margin: 0;
}

.btc-footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
}

@media only screen and (max-width: 1024px) {
	.btc-footer__grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media only screen and (max-width: 599px) {
	.btc-footer__grid {
		grid-template-columns: 1fr;
		gap: 32px;
		padding-top: 48px;
	}

	/* Spazio per il pulsante "Torna su". */
	.btc-footer__bottom-inner {
		padding-bottom: 80px;
	}
}

/* Pulsante "Torna su". */
.btc-to-top {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 8000;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 6px 20px rgba(20, 35, 70, 0.15);
	color: var(--btc-blue);
	font-size: 20px;
	opacity: 0;
	pointer-events: none;
	transform: translateY(10px);
	transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.2s ease, color 0.2s ease;
}

.btc-to-top.is-visible {
	opacity: 1;
	pointer-events: auto;
	transform: none;
}

.btc-to-top:hover {
	background: var(--btc-blue);
	color: #fff;
}

/* 6. Responsive
   ========================================================================== */
