/*
 * Dettaglio listing (/scopri/…) — sistema di design editoriale.
 * Override mirato sul markup di Listable: nessuna struttura cambiata.
 */

.single-job_listing,
.wpjm-single-listing,
.single-listing-map-category-icon,
.single_job_listing,
.job_listing {
	--ed-ink: #1d1b1a;
	--ed-muted: #6d6763;
	--ed-accent: #f64554;
	--ed-accent-dark: #d92e3d;
	--ed-paper: #fffdf9;
	--ed-hairline: rgba(43, 35, 33, .12);
	--ed-card: #fff;
	--ed-radius: 8px;
}

/* ——— Galleria: striscia di mini-box a scorrimento automatico ———— */

.entry-featured-carousel {
	position: relative;
	padding: 0 !important; /* full-bleed: da bordo a bordo dello schermo */
	margin: 30px 0 clamp(2rem, 4vw, 3.5rem) !important; /* respiro sotto l'header */
}

.entry-featured-carousel .ed-gallery {
	max-width: none;
	margin-inline: auto;
}

.entry-featured-image,
.entry-cover-image {
	display: block;
	width: 100% !important;
	height: clamp(360px, 36vw, 540px) !important; /* doppio rispetto alle mini-box */
	object-fit: cover;
	object-position: center;
	margin: 0 !important;
	border-radius: var(--ed-radius);
}

.entry-cover-image { width: 100% !important; object-position: center; }

/* Frecce: sempre visibili, piatte, ai lati della striscia */
.entry-featured-carousel .gallery-arrow {
	background: #fff;
	border: 1px solid var(--ed-hairline);
	box-shadow: none;
	color: var(--ed-ink);
	opacity: 1;
	transition: color .15s ease, border-color .15s ease;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	cursor: pointer;
	z-index: 3;
}
.ed-gallery__prev { left: clamp(.5rem, 2vw, 1.5rem); }
.ed-gallery__next { right: clamp(.5rem, 2vw, 1.5rem); }

.entry-featured-carousel .gallery-arrow:hover {
	color: var(--ed-accent-dark);
	border-color: var(--ed-accent);
}

.entry-featured-carousel .gallery-arrow svg { display: none; } /* freccia SVG del tema non usata */
.entry-featured-carousel .ed-arrow {
	display: inline-flex;
	font-size: 1rem;
	line-height: 1;
	padding: .3rem .45rem;
}

/* Il counter resta nel markup ma non serve con le mini-scelte */
.ed-gallery__counter { display: none; }

/* ——— Layout a due colonne: contenuto + sidebar ————————————————— */

@media (min-width: 900px) {
	.grid { align-items: start; }
}

.grid__item.column-content { padding-top: .5rem; }

.entry-header {
	padding: .4rem 0 1.6rem !important;
	border-bottom: 1px solid var(--ed-hairline);
	margin: 0 0 2.2rem !important;
	position: relative;
}

.entry-header::after { /* linea di accento sul righello */
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 4.5rem;
	height: 2px;
	background: var(--ed-accent);
}

/* Breadcrumb categorie: chip riepilogative (niente ">>"), l'unico punto
   in cui le categorie si esaltano */
.single-categories-breadcrumb {
	font-size: .8125rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ed-muted);
	margin: 0 0 1.3rem !important;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: .5rem;
}

.single-categories-breadcrumb a {
	display: inline-flex;
	align-items: center;
	padding: .38em .85em;
	border-radius: 6px;
	background: rgba(246, 69, 84, .08);
	color: var(--ed-accent-dark) !important;
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease;
}

.single-categories-breadcrumb a:hover,
.single-categories-breadcrumb a:focus-visible {
	background: var(--ed-accent);
	color: #fff !important;
}

/* Separatori reali del breadcrumb: nascosti, le chip si separano da sole */
.single-categories-breadcrumb .crumb-sep,
.single-categories-breadcrumb .separator { display: none !important; }

.single-categories-breadcrumb a::after { content: none !important; }

/* Titolo: inchiostro, scala display, non tutto rosso */
.entry-header h1.entry-title,
.single-job_listing .page-title,
.single_job_listing h1 {
	font-size: clamp(1.6rem, 1.05rem + 2vw, 2.7rem) !important;
	line-height: 1.15 !important;
	letter-spacing: -0.015em !important;
	color: var(--ed-ink) !important;
	text-wrap: balance;
	max-width: 30ch;
	overflow-wrap: normal;
	word-break: normal;
	hyphens: none;
	margin: 0 0 .55rem !important;
}

.entry-subtitle {
	font-size: clamp(1.05rem, 1rem + .5vw, 1.3rem) !important;
	line-height: 1.65 !important;
	color: var(--ed-muted) !important;
	font-weight: 400 !important;
	max-width: 56ch !important;
	margin: 0 !important;
}

/* Telefono / sito web: chip evidenti sotto il sottotitolo */
.single-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .6rem;
	margin: 1.1rem 0 0 !important;
	font-size: .9rem;
}

.single-meta .listing-contact {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	padding: .55rem 1rem;
	border-radius: var(--ed-radius);
	font-weight: 700 !important;
	font-size: .92rem;
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

/* Eventuale fila recensione: inline prima delle chip */
.single-meta .single-rating {
	display: inline-flex;
	padding: .4rem .35rem .4rem 0;
	font-size: .85rem;
}

/* Telefono: chip piena rossa, la CTA primaria */
.single-meta .listing--phone {
	background: var(--ed-accent);
	color: #fff !important;
}

.single-meta .listing--phone:hover,
.single-meta .listing--phone:focus-visible {
	background: var(--ed-accent-dark);
	color: #fff !important;
}

/* Sito web: chip outlined con freccia che scatta all'hover */
.single-meta .listing--website {
	background: var(--ed-card);
	border: 1px solid var(--ed-hairline);
	color: var(--ed-ink) !important;
}

.single-meta .listing--website:hover,
.single-meta .listing--website:focus-visible {
	border-color: var(--ed-accent);
	color: var(--ed-accent-dark) !important;
}

.single-meta .listing--website::after {
	content: "↗";
	color: var(--ed-accent);
	font-size: 1rem;
	line-height: 1;
	transition: transform .15s ease;
}

.single-meta .listing--website:hover::after { transform: translate(2px, -2px); }

/* Icone: SVG inline in mask (colori dai token, resa identica ovunque);
   sostituiscono i glyph font del tema */
.single-meta .listing--phone::before,
.single-meta .listing--website::before {
	content: "";
	flex: none;
	width: 1.05rem;
	height: 1.05rem;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.62 10.79a15.05 15.05 0 0 0 6.59 6.59l2.2-2.2a1 1 0 0 1 1.02-.24 11.36 11.36 0 0 0 3.57.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1 11.36 11.36 0 0 0 .57 3.57 1 1 0 0 1-.25 1.02z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.62 10.79a15.05 15.05 0 0 0 6.59 6.59l2.2-2.2a1 1 0 0 1 1.02-.24 11.36 11.36 0 0 0 3.57.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1 11.36 11.36 0 0 0 .57 3.57 1 1 0 0 1-.25 1.02z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.single-meta .listing--phone::before { background: #fff; }

.single-meta .listing--website::before {
	background: var(--ed-accent);
	-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'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3a13.5 13.5 0 0 1 0 18M12 3a13.5 13.5 0 0 0 0 18'/%3E%3C/svg%3E") center / contain no-repeat;
	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'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3a13.5 13.5 0 0 1 0 18M12 3a13.5 13.5 0 0 0 0 18'/%3E%3C/svg%3E") center / contain no-repeat;
}

.single-meta .listing--twitter {
	background: var(--ed-card);
	border: 1px solid var(--ed-hairline);
	color: var(--ed-ink) !important;
}

/* ——— Corpo del contenuto (job_description) ————————————————— */

.job_description {
	font-size: clamp(1rem, .94rem + .25vw, 1.11rem);
	line-height: 1.85;
	color: var(--ed-ink);
}

.job_description p { margin: 0 0 1.4em; }

.job_description h1, .job_description h2,
.job_description h3, .job_description h4 {
	color: var(--ed-ink) !important;
}

.job_description h2 {
	font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem) !important;
	line-height: 1.28 !important;
	letter-spacing: -0.012em;
	margin: 2.4em 0 .8em !important;
	text-wrap: balance;
}

.job_description h3 {
	font-size: clamp(1.12rem, 1rem + .45vw, 1.32rem) !important;
	line-height: 1.4 !important;
	margin: 2em 0 .6em !important;
}

.job_description strong { font-weight: 700; }

.job_description a {
	color: var(--ed-accent-dark);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .18em;
	text-decoration-color: rgba(217, 46, 61, .35);
}

.job_description a:hover { text-decoration-color: currentColor; }

.job_description img { border-radius: var(--ed-radius); }

/* ——— Sidebar: schede piatte, solo hairline ————————————— */

.listing-sidebar .widget {
	background: var(--ed-card);
	border: 1px solid var(--ed-hairline);
	border-radius: var(--ed-radius);
	padding: 1.25rem !important;
	margin: 0 0 1.25rem !important;
}

.listing-sidebar .widget_listing_sidebar_map .single-listing-map__link,
.widget_listing_sidebar_map {
	gap: .4rem;
}

.widget_listing_sidebar_map .gm-style,
.widget_listing_sidebar_map iframe,
.widget_listing_sidebar_map .listing-map {
	border-radius: calc(var(--ed-radius) - 4px);
	overflow: hidden;
}

/* La mappa ha width fisso 350px nel tema: su mobile va in overflow */
.listing-map,
.listing-sidebar .listing-map,
.listing-sidebar .widget_listing_sidebar_map .listing-map,
.listing-sidebar .widget_listing_sidebar_map .listing-map .gm-style,
.listing-sidebar iframe,
.listing-sidebar img {
	width: 100% !important;
	max-width: 100% !important;
}

.listing-sidebar .widget-title,
.listing-sidebar h3 {
	font-size: .8125rem !important;
	font-weight: 600 !important;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ed-muted) !important;
	margin: 0 0 .9rem !important;
}

/* Chips di categoria nella sidebar */
.widget_listing_sidebar_categories .category-icon svg { width: 26px; height: 22px; }
.widget_listing_sidebar_categories a {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	color: var(--ed-ink);
	font-weight: 500;
}

/* ——— Galleria della sidebar ——————————————————————— */

.listing-gallery__item {
	border-radius: calc(var(--ed-radius) - 4px);
	overflow: hidden;
}

.listing-gallery__item img { height: auto !important; }

/* ——— Recensioni / commenti ————————————————————————— */

.widget_listing_comments { padding: 1.5rem 1.25rem !important; }

.comments-area .comments-title,
.widget_listing_comments .comments-title {
	font-size: clamp(1.2rem, 1rem + .8vw, 1.5rem) !important;
	letter-spacing: -0.01em;
}

/* ——— CTA prima recensione (pauro-conero) ———
   Solo sulle schede senza recensioni: invita a compilare il form
   sottostante invece di mostrare nulla. Card greige in linea col
   sistema del sito (hairline, radius, accent). */

.pauro-first-review {
	margin: 0 0 1.5rem;
	padding: 1.15rem 1.25rem 1.3rem;
	background: #f0ede6;
	border: 1px solid var(--ed-hairline);
	border-radius: var(--ed-radius);
}

.pauro-first-review__kicker {
	margin: 0 0 .4rem;
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ed-accent-dark); /* #d92e3d: 4.6:1 su greige */
}

.pauro-first-review__text {
	margin: 0 0 .7rem;
	font-size: .95rem;
	line-height: 1.5;
	color: var(--ed-muted);
}

.pauro-first-review__cta {
	font-size: .95rem;
	font-weight: 600;
	color: var(--ed-ink);
	text-decoration: underline;
	text-decoration-thickness: 1.5px;
	text-underline-offset: 3px;
	transition: color .15s ease;
}

.pauro-first-review__cta:hover,
.pauro-first-review__cta:focus-visible {
	color: var(--ed-accent-dark);
	text-decoration-color: var(--ed-accent-dark);
}

/* L'ancora #respond non deve finire sotto l'header sticky */
#respond { scroll-margin-top: 5.5rem; }

/* ——— Navigazione precedente/successiva: due card affiancate ——— */

.post-navigation {
	margin-top: 3rem !important;
}

.post-navigation .nav-links {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.25rem;
}

/* Il tema applica ai link nav il look "pagina di paginazione" (bordo + sfondo):
   qui si ritorna a card piatte in tema col resto della pagina */
.post-navigation .nav-links a,
.post-navigation .nav-links a:after,
.post-navigation .nav-links a:before {
	background: transparent;
	border: 0;
	padding: 0;
	border-radius: 0;
}

.post-navigation .nav-links a {
	position: relative;
	display: block;
	background: var(--ed-card);
	border: 1px solid var(--ed-hairline);
	border-radius: var(--ed-radius);
	padding: 1.35rem 1.6rem 3rem !important; /* spazio in basso per la freccia */
	text-align: left;
	font-size: .95rem;
	line-height: 1.5;
	transition: border-color .15s ease, color .15s ease;
}

.post-navigation .nav-links a:hover {
	border-color: var(--ed-accent);
	color: var(--ed-accent-dark) !important;
}

/* Etichetta sopra il titolo — reset completo degli pseudoelementi
   del tema (triangolo e box overlay) */
.post-navigation .nav-links a::before {
	content: "PRECEDENTE";
	display: block;
	position: static;
	top: auto;
	right: auto;
	left: auto;
	margin: 0 0 .45rem;
	padding: 0;
	border: 0 !important; /* niente triangolo ereditato */
	font-size: .72rem;
	font-weight: 600;
	letter-spacing: .14em;
	color: var(--ed-muted);
	opacity: 1;
}

/* Freccia del brand in fondo alla card */
.post-navigation .nav-links a::after {
	content: "←";
	position: absolute;
	top: auto;
	right: auto;
	bottom: 1.2rem;
	left: 1.6rem;
	border: 0;
	opacity: 1;
	color: var(--ed-accent);
	font-size: 1.05rem;
	line-height: 1;
}

.post-navigation .nav-links .nav-next a { text-align: right; }
.post-navigation .nav-links .nav-next a::before { content: "SUCCESSIVO"; }
.post-navigation .nav-links .nav-next a::after {
	content: "→";
	left: auto;
	right: 1.6rem;
}

.post-navigation a {
	display: inline-block;
	font-weight: 500;
	color: var(--ed-ink) !important;
	text-decoration: none;
	line-height: 1.5;
}

/* ——— Focus accessibile ————————————————————————— */

.single-job_listing a:focus-visible {
	outline: 2px solid var(--ed-accent);
	outline-offset: 3px;
	border-radius: 2px;
}

/* ——— Mobile: galleria 2×2, titolo più compatto —————————— */

@media (max-width: 899px) {
	.entry-featured-image { height: clamp(320px, 55vw, 460px) !important; }
	.post-navigation .nav-links { grid-template-columns: 1fr; }
	.grid__item.column-content { padding: 0 .25rem; }
}

@media (max-width: 480px) {
	.entry-featured-image { height: 340px !important; }
}

/* ——— Riduzione del movimento ——————————————————————— */

@media (prefers-reduced-motion: reduce) {
	.entry-featured-carousel *, .listing-sidebar * { transition: none !important; }
}