/**
 * Talent Bulletin – profili upgrade
 *
 * Queste regole si caricano soltanto nelle pagine Premium Talent Bulletin.
 * Copertina e contenuto hanno la stessa larghezza massima.
 * La copertina mantiene il formato A4 senza ritagliare l'immagine.
 */


/* =========================================================
   NASCONDE HEADER DEL TEMA
   ========================================================= */

body.tbpp-profile-page .entry-header {
	display: none;
}


/* =========================================================
   CONTENITORE GENERALE DEL PROFILO
   ========================================================= */

body.tbpp-profile-page .entry-content {
	width: 100%;
	max-width: 700px;
	margin-left: auto;
	margin-right: auto;
	padding-top: 2.25rem;
	padding-left: 20px;
	padding-right: 20px;
	box-sizing: border-box;
}


/* =========================================================
   HEADER PROFILO
   ========================================================= */

.tbpp-profile-header {
	width: 100%;
	margin: 0 0 2.5rem;
}

/* Marchio discreto in alto: porta alla home senza sottrarre spazio alla copertina. */
.tbpp-profile-brand {
	display: flex;
	align-items: center;
	justify-content: center;
	width: fit-content;
	margin: 0 auto 1.6rem;
	padding: 0.2rem;
	border-radius: 4px;
}

.tbpp-profile-brand img {
	display: block;
	width: auto;
	height: auto;
	max-width: 104px;
	max-height: 44px;
}

.tbpp-profile-brand:focus-visible {
	outline: 3px solid #c49a32;
	outline-offset: 4px;
}


/* =========================================================
   COPERTINA
   ========================================================= */

.tbpp-profile-cover {
	width: 100%;
	aspect-ratio: 210 / 297;
	margin: 0 0 1.5rem;
	overflow: hidden;
	background: #fff;
}

.tbpp-profile-cover img,
.tbpp-cover-placeholder {
	display: block;
	width: 100%;
	height: 100%;
}

/*
 * L'immagine viene mostrata interamente.
 * Non viene ritagliata.
 */
.tbpp-profile-cover img {
	object-fit: contain;
}

/* Placeholder rosso quando non è presente una copertina */
.tbpp-cover-placeholder {
	background: #8b1e1e;
}


/* =========================================================
   NOME E JOB TITLE
   ========================================================= */

.tbpp-profile-name {
	margin: 0;
	color: #123a67;
	font-size: clamp(1.5rem, 2.5vw, 2.1rem);
	line-height: 1.1;
	font-weight: 800;
}

.tbpp-profile-job {
	margin: 0.45rem 0 0;
	color: #53606d;
	font-size: clamp(1rem, 2vw, 1.2rem);
	line-height: 1.35;
	font-weight: 600;
}


/* =========================================================
   AZIONI PROFILO
   ========================================================= */

body.tbpp-profile-page .tbpp-actions {
	/*
	 * Desktop: Condividi · LinkedIn · Scarica PDF. La posizione centrale di
	 * LinkedIn rende equilibrato il suo blu, diverso dal blu istituzionale.
	 */
	display: grid !important;
	grid-template-columns: max-content max-content max-content;
	grid-template-areas: "share linkedin download";
	align-items: center !important;
	justify-content: center !important;
	gap: 0.75rem !important;

	margin: 2.5rem 0 !important;
	padding: 0 !important;
}

body.tbpp-profile-page .tbpp-actions .tbpp-share {
	grid-area: share;
	justify-self: center;
}

body.tbpp-profile-page .tbpp-actions .tbpp-linkedin {
	grid-area: linkedin;
	justify-self: center;
}

body.tbpp-profile-page .tbpp-actions .tbpp-download {
	grid-area: download;
	justify-self: center;
}


/* Reset comune dei tre pulsanti */
body.tbpp-profile-page .tbpp-actions .tbpp-linkedin,
body.tbpp-profile-page .tbpp-actions .tbpp-share,
body.tbpp-profile-page .tbpp-actions .tbpp-download {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 0.55rem !important;

	width: auto !important;
	min-width: 0 !important;
	max-width: none !important;

	height: 46px !important;
	min-height: 46px !important;

	margin: 0 !important;
	padding: 0 1rem !important;

	border-radius: 9px !important;
	box-sizing: border-box !important;

	font-family: inherit !important;
	font-size: 0.95rem !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	letter-spacing: normal !important;
	text-transform: none !important;

	text-decoration: none !important;
	box-shadow: none !important;
	cursor: pointer !important;
}


/* =========================================================
   LINKEDIN
   ========================================================= */

body.tbpp-profile-page .tbpp-actions .tbpp-linkedin {
	border: 0 !important;
	background: #0a66c2 !important;
	color: #fff !important;
}

body.tbpp-profile-page .tbpp-actions .tbpp-linkedin:hover {
	border-color: #084f96 !important;
	background: #084f96 !important;
	color: #fff !important;
}


/* SVG LinkedIn: impedisce al tema di ingrandirlo */
body.tbpp-profile-page .tbpp-actions .tbpp-linkedin svg {
	display: block !important;

	width: 18px !important;
	height: 18px !important;
	min-width: 18px !important;
	max-width: 18px !important;
	min-height: 18px !important;
	max-height: 18px !important;

	margin: 0 !important;
	padding: 0 !important;

	fill: currentColor !important;
}


/* =========================================================
   CONDIVIDI
   ========================================================= */

body.tbpp-profile-page .tbpp-actions .tbpp-share {
	border: 0 !important;
	background: #123a67 !important;
	color: #fff !important;
}

body.tbpp-profile-page .tbpp-actions .tbpp-share:hover {
	background: #0d2c4e !important;
	color: #fff !important;
}

body.tbpp-profile-page .tbpp-actions .tbpp-share svg {
	display: block !important;

	width: 18px !important;
	height: 18px !important;
	min-width: 18px !important;
	max-width: 18px !important;
	min-height: 18px !important;
	max-height: 18px !important;

	margin: 0 !important;

	fill: currentColor !important;
}


/* =========================================================
   SCARICA PDF
   ========================================================= */

body.tbpp-profile-page .tbpp-actions .tbpp-download {
	border: 0 !important;
	background: #123a67 !important;
	color: #fff !important;
}

body.tbpp-profile-page .tbpp-actions .tbpp-download:hover {
	background: #0d2c4e !important;
	color: #fff !important;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

	body.tbpp-profile-page .tbpp-actions {
		/* Su due righe: LinkedIn chiude centrato sotto gli altri due pulsanti. */
		grid-template-columns: max-content max-content;
		grid-template-areas:
			"share download"
			"linkedin linkedin";
		gap: 0.55rem !important;
		margin: 2rem 0 !important;
	}

	body.tbpp-profile-page .tbpp-actions .tbpp-linkedin,
	body.tbpp-profile-page .tbpp-actions .tbpp-share,
	body.tbpp-profile-page .tbpp-actions .tbpp-download {
		height: 44px !important;
		min-height: 44px !important;
		padding: 0 0.9rem !important;
		font-size: 0.9rem !important;
	}

}

/* =========================================================
   IMMAGINE IN EVIDENZA DEL TEMA
   ========================================================= */

.tbpp-profile-page .post-thumbnail,
.tbpp-profile-page .entry-thumbnail,
.tbpp-profile-page .featured-image,
.tbpp-profile-page .wp-post-image {
	display: none !important;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

	body.tbpp-profile-page .entry-content {
		padding-top: 2.5rem;
		padding-left: 18px;
		padding-right: 18px;
	}

	.tbpp-profile-name {
		font-size: 2.1rem;
	}
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

	body.tbpp-profile-page .entry-content {
		/* Compatta l'apertura su telefono, senza avvicinare il marchio alla copertina. */
		padding-top: 0.75rem;
		padding-left: 16px;
		padding-right: 16px;
	}

	.tbpp-profile-header {
		margin-bottom: 2rem;
	}

	.tbpp-profile-brand {
		/* Occupa tutta la riga: il logo resta centrato rispetto alla copertina. */
		width: 100%;
		margin-bottom: 1.45rem;
	}

	.tbpp-profile-brand img {
		max-width: 82px;
		max-height: 34px;
	}

	.tbpp-profile-name {
		font-size: 1.7rem;
	}

	.tbpp-profile-job {
		font-size: 1rem;
	}

	.tbpp-actions {
		gap: 0.6rem;
		margin: 2rem 0;
	}

	.tbpp-download,
	.tbpp-share,
	.tbpp-linkedin {
		padding: 0.75rem 1rem;
		font-size: 0.95rem;
	}
}
