/**
 * Talent Bulletin – archivio storico
 *
 * Il tema usa regole molto generiche per i button. Per il pulsante Condividi
 * usiamo selettori più specifici e !important mirati, così mantiene sempre
 * l'aspetto compatto su desktop e mobile senza influenzare altri bottoni.
 */

#tbpp-archive {
	max-width: 1100px;
	margin: 5rem auto 2rem;
	padding-top: 3rem;
	border-top: 1px solid #d9dfe5;
}

#tbpp-archive h2 {
	margin: 0 0 0.4rem;
	color: #101820;
	font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.tbpp-archive-search {
	display: flex;
	gap: 0.6rem;
	margin: 1.5rem 0 0.75rem;
}

.tbpp-archive-search input {
	flex: 1;
	min-width: 0;
	padding: 0.75rem 0.9rem;
	border: 1px solid #8793a0;
	border-radius: 4px;
	font: inherit;
}

.tbpp-archive-search button,
.tbpp-archive-more {
	padding: 0.75rem 1rem;
	border: 0;
	border-radius: 4px;
	background: #0c62bc;
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.tbpp-archive-count {
	margin: 0 0 1rem;
	color: #53606d;
}

/* Il contatore rimane visivamente agganciato alla ricerca, anche con le regole del tema. */
#tbpp-archive .tbpp-archive-count {
	display: table !important;
	width: auto !important;
	margin: 0 auto 1.25rem !important;
	text-align: center;
}

.tbpp-archive-results {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.tbpp-archive-card {
	padding: 1.25rem;
	border: 1px solid #d9dfe5;
	border-radius: 6px;
	background: #fff;
}

.tbpp-archive-card h3 {
	margin: 0 0 0.55rem;
	font-size: 1.2rem;
}

.tbpp-archive-card h3 a {
	color: #101820;
	text-decoration: none;
}

.tbpp-archive-card h3 a:hover,
.tbpp-archive-card h3 a:focus-visible {
	text-decoration: underline;
}

.tbpp-archive-description p {
	margin: 0;
	color: #53606d;
	line-height: 1.55;
}

/* Evidenziazione tenue: il testo conserva il colore originale della card. */
#tbpp-archive .tbpp-search-match {
	padding: 0 0.08em;
	border-radius: 0.16em;
	background: rgba(211, 169, 74, 0.48);
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
	box-shadow: none;
	color: inherit !important;
}

#tbpp-archive .tbpp-archive-actions {
	display: block !important;
	margin: 1rem 0 0 !important;
}

#tbpp-archive .tbpp-archive-share {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 0.5rem !important;
	width: auto !important;
	min-width: 0 !important;
	max-width: none !important;
	height: auto !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0.8rem 1.25rem !important;
	border: 1px solid #1f2933 !important;
	border-radius: 4px !important;
	background: #fff !important;
	color: #1f2933 !important;
	box-shadow: none !important;
	font: inherit !important;
	font-size: 1rem !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	text-decoration: none !important;
	cursor: pointer !important;
}

#tbpp-archive .tbpp-archive-share:hover {
	background: #f3f5f7 !important;
	color: #1f2933 !important;
}

#tbpp-archive .tbpp-archive-share svg {
	display: block !important;
	flex: 0 0 1.1rem !important;
	width: 1.1rem !important;
	height: 1.1rem !important;
	fill: currentColor !important;
}

.tbpp-archive-more-wrap {
	margin: 1.75rem 0;
	text-align: center;
}

/* Il caricamento progressivo usa la stessa forma del pulsante Condividi. */
#tbpp-archive .tbpp-archive-more {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-height: 0 !important;
	height: auto !important;
	margin: 0 !important;
	padding: 11px 16px !important;
	border: 0 !important;
	border-radius: 9px !important;
	background: #123a67 !important;
	color: #fff !important;
	box-shadow: none !important;
}

#tbpp-archive .tbpp-archive-more:hover,
#tbpp-archive .tbpp-archive-more:focus-visible {
	background: #0d2c4e !important;
	color: #fff !important;
}

.tbpp-archive-more[disabled] {
	display: none;
}

@media (max-width: 640px) {
	.tbpp-archive-results {
		grid-template-columns: 1fr;
	}

	.tbpp-archive-search {
		flex-wrap: wrap;
	}

	.tbpp-archive-search button {
		width: 100%;
	}
}

/* =========================================================
   PROFILI PREMIUM
   ========================================================= */

/*
 * I profili con copertina sono una collezione diversa dall'archivio storico:
 * questa sezione lo esplicita senza cambiare i blocchi che Massimo aggiorna.
 */
body.page-id-86 .tbpp-featured-section {
	margin: 1.6rem 0 5rem;
	padding-top: 1.35rem;
}

body.page-id-86 .tbpp-featured-section .tb-profile-index {
	margin: 0 !important;
}

body.page-id-86 .tbpp-featured-section .tb-profile-index .wp-block-post-template {
	gap: 1.25rem !important;
}

body.page-id-86 .tbpp-featured-section .tb-profile-card {
	display: flex !important;
	height: 100%;
	flex-direction: column;
	padding: 0.7rem 0.7rem 1rem !important;
	border: 1px solid #d9dfe5 !important;
	border-radius: 10px !important;
	background: #fff !important;
	box-shadow: 0 8px 20px rgba(18, 58, 103, 0.08);
	box-sizing: border-box;
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.page-id-86 .tbpp-featured-section .tb-profile-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 26px rgba(18, 58, 103, 0.14);
}

body.page-id-86 .tbpp-featured-section .tb-profile-card .wp-block-post-featured-image {
	margin: 0 0 0.9rem !important;
}

body.page-id-86 .tbpp-featured-section .tb-profile-card .wp-block-post-featured-image a {
	border-radius: 6px;
}

body.page-id-86 .tbpp-featured-section .tb-profile-card .wp-block-post-title {
	margin: 0.1rem 0 0 !important;
	padding: 0 0.35rem;
}

body.page-id-86 .tbpp-featured-section .tb-profile-card .wp-block-post-title a {
	color: #123a67 !important;
	font-weight: 400;
	text-decoration: none;
}

body.page-id-86 .tbpp-featured-section .tb-profile-card .wp-block-post-title a:hover {
	text-decoration: underline;
}

body.page-id-86 .tbpp-featured-section .tb-profile-card .tbpp-premium-job {
	margin: 0.35rem 0 0 !important;
	padding: 0 0.35rem;
	color: #607080;
	font-size: 0.95rem;
	font-weight: 400;
	line-height: 1.4;
	opacity: 1;
}

.tbpp-premium-profiles {
    margin: 40px 0 60px;
}

.tbpp-premium-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
}

.tbpp-premium-card {
    display: block;
    color: inherit;
    text-decoration: none;
}

.tbpp-premium-cover {
    width: 100%;
    overflow: hidden;
}

.tbpp-premium-cover img {
    display: block;
    width: 100%;
    height: auto;
}

.tbpp-premium-info {
    padding-top: 14px;
}

.tbpp-premium-name {
    margin: 0;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 600;
    color: inherit;
}

.tbpp-premium-job {
    margin: 5px 0 0;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 400;
    opacity: 0.7;
}

.tbpp-premium-card:hover .tbpp-premium-name {
    text-decoration: underline;
}


/* Tablet */
@media (max-width: 900px) {
    .tbpp-premium-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* Smartphone */
@media (max-width: 600px) {
	body.page-id-86 .tbpp-featured-section {
		margin: 1.35rem 0 4rem;
		padding-top: 1.1rem;
	}

	body.page-id-86 .tbpp-featured-section .tb-profile-index .wp-block-post-template {
		gap: 1rem !important;
	}

    .tbpp-premium-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}
