/* ==========================================================
	 PHYTOITALIA - STILE EDITORIALE CONTENUTI TINYMCE
	 Classi generate da pulisci_html_tinymce()
	 ========================================================== */

.editor-content {
	font-family: "Poppins", sans-serif;
	color: #4f5b52;
	font-size: 1.65rem;
	line-height: 1.9;
	letter-spacing: 0;
	word-break: break-word;
	overflow-wrap: break-word;
}

.editor-content>*:last-child {
	margin-bottom: 0 !important;
}

/* ======= paragrafi ======= */
.editor-content .contenuto-paragrafo,
.editor-content p {
	font-size: 1.65rem;
	line-height: 1.9;
	color: #4f5b52;
	margin: 0 0 2rem;
}

/* ======= titoli ======= */
.editor-content .contenuto-titolo,
.editor-content h2,
.editor-content h3,
.editor-content h4,
.editor-content h5,
.editor-content h6 {
	font-family: "Poppins", sans-serif;
	color: #2f4034;
	font-weight: 600;
	letter-spacing: -0.025em;
	line-height: 1.3;
	margin-top: 3.6rem;
	margin-bottom: 1.4rem;
}

.editor-content h2.contenuto-titolo,
.editor-content h2 {
	font-size: 3.1rem;
	margin-top: 4.2rem;
	padding-bottom: 1rem;
	position: relative;
}

.editor-content h2.contenuto-titolo::after,
.editor-content h2::after {
	content: "";
	display: block;
	width: 7rem;
	height: 0.3rem;
	margin-top: 1rem;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
}

.editor-content h3.contenuto-titolo,
.editor-content h3 {
	font-size: 2.5rem;
	color: #37503d;
}

.editor-content h4.contenuto-titolo,
.editor-content h4 {
	font-size: 2rem;
	color: #3e5a45;
}

.editor-content h5.contenuto-titolo,
.editor-content h5 {
	font-size: 1.75rem;
	color: #45634d;
}

.editor-content h6.contenuto-titolo,
.editor-content h6 {
	font-size: 1.45rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--secondary);
}

/* ======= link ======= */
.editor-content .contenuto-link,
.editor-content a {
	color: var(--secondary);
	font-weight: 500;
	text-decoration: none;
	border-bottom: 0.1rem solid rgba(65, 123, 73, 0.25);
	transition: all 0.25s ease;
}

.editor-content .contenuto-link:hover,
.editor-content .contenuto-link:focus,
.editor-content a:hover,
.editor-content a:focus {
	color: var(--primary);
	border-bottom-color: var(--primary);
	text-decoration: none;
}

/* ======= enfasi ======= */
.editor-content strong {
	color: #2f4034;
	font-weight: 600;
}

.editor-content em {
	color: #5c6a61;
	font-style: italic;
}

/* ======= liste ======= */
.editor-content .contenuto-lista,
.editor-content ul,
.editor-content ol {
	margin: 0 0 2.2rem;
	padding-left: 0;
	color: #4f5b52;
}

.editor-content ul.contenuto-lista,
.editor-content ul {
	list-style: none;
}

.editor-content ul.contenuto-lista li,
.editor-content ul li {
	position: relative;
	padding-left: 2.4rem;
	margin-bottom: 1rem;
	line-height: 1.8;
}

.editor-content ul.contenuto-lista li::before,
.editor-content ul li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.95rem;
	width: 0.8rem;
	height: 0.8rem;
	border-radius: 50%;
	background: var(--primary);
	box-shadow: 0 0 0 0.35rem rgba(76, 145, 86, 0.12);
}

.editor-content ol.contenuto-lista,
.editor-content ol {
	list-style: none;
	counter-reset: phyto-counter;
}

.editor-content ol.contenuto-lista li,
.editor-content ol li {
	position: relative;
	padding-left: 3.8rem;
	margin-bottom: 1rem;
	line-height: 1.8;
	counter-increment: phyto-counter;
}

.editor-content ol.contenuto-lista li::before,
.editor-content ol li::before {
	content: counter(phyto-counter);
	position: absolute;
	left: 0;
	top: 0.1rem;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.2rem;
	font-weight: 700;
	color: var(--secondary);
	background: var(--primary-soft);
	border: 0.1rem solid rgba(76, 145, 86, 0.18);
}

.editor-content ul ul,
.editor-content ul ol,
.editor-content ol ul,
.editor-content ol ol {
	margin-top: 1rem;
	margin-bottom: 0.6rem;
}

/* ======= blockquote ======= */
.editor-content .contenuto-citazione,
.editor-content blockquote {
	position: relative;
	margin: 3rem 0;
	padding: 2.6rem 2.6rem 2.4rem 3rem;
	background: linear-gradient(180deg, #fbfdfb 0%, #f3f8f4 100%);
	border-left: 0.35rem solid var(--primary);
	border-radius: 0.6rem;
	color: #4a574f;
	font-size: 1.75rem;
	line-height: 1.85;
	font-weight: 300;
}

.editor-content .contenuto-citazione::before,
.editor-content blockquote::before {
	content: "“";
	position: absolute;
	left: 1.2rem;
	top: 0.2rem;
	font-size: 5rem;
	line-height: 1;
	color: rgba(76, 145, 86, 0.14);
	font-weight: 700;
}

.editor-content .contenuto-citazione p:last-child,
.editor-content blockquote p:last-child {
	margin-bottom: 0;
}

/* ======= immagini ======= */
.editor-content figure {
	margin: 3rem 0 2.2rem;
}

.editor-content .contenuto-immagine,
.editor-content img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
	border-radius: 0.4rem;
	background: #ffffff;
	box-shadow: 0 10px 28px rgba(25, 40, 29, 0.08);
}

.editor-content figcaption {
	margin-top: 1rem;
	font-size: 1.3rem;
	line-height: 1.6;
	text-align: center;
	color: #7a867d;
	font-style: italic;
}

/* ======= tabelle ======= */
.editor-content .tabella-contenuto,
.editor-content table {
	width: 100%;
	margin: 3rem 0;
	border-collapse: collapse;
	background: #fff;
	border-radius: 0.4rem;
	overflow: hidden;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.editor-content .tabella-contenuto th,
.editor-content .tabella-contenuto td,
.editor-content table th,
.editor-content table td {
	padding: 1.3rem 1.5rem;
	text-align: left;
	vertical-align: top;
	font-size: 1.45rem;
	line-height: 1.65;
	border-bottom: 0.1rem solid #edf2ee;
}

.editor-content .tabella-contenuto thead th,
.editor-content table thead th {
	background: linear-gradient(180deg, #f3f8f4 0%, #ebf4ed 100%);
	color: var(--secondary);
	font-weight: 600;
	border-bottom: 0.1rem solid rgba(76, 145, 86, 0.2);
}

.editor-content .tabella-contenuto tbody tr:nth-child(even),
.editor-content table tbody tr:nth-child(even) {
	background: #fcfdfc;
}

.editor-content .tabella-contenuto tbody tr:hover,
.editor-content table tbody tr:hover {
	background: #f6faf7;
}

.editor-content .tabella-contenuto tbody tr:last-child td,
.editor-content table tbody tr:last-child td {
	border-bottom: 0;
}

/* ======= separatore ======= */
.editor-content hr {
	border: 0;
	height: 0.1rem;
	margin: 3.2rem 0;
	background: linear-gradient(90deg,
			rgba(76, 145, 86, 0) 0%,
			rgba(76, 145, 86, 0.28) 50%,
			rgba(76, 145, 86, 0) 100%);
}

/* ======= spaziature intelligenti ======= */
.editor-content h2+p,
.editor-content h3+p,
.editor-content h4+p,
.editor-content h5+p,
.editor-content h6+p,
.editor-content h2+.contenuto-paragrafo,
.editor-content h3+.contenuto-paragrafo,
.editor-content h4+.contenuto-paragrafo,
.editor-content h5+.contenuto-paragrafo,
.editor-content h6+.contenuto-paragrafo {
	margin-top: 0.2rem;
}

.editor-content p+ul,
.editor-content p+ol,
.editor-content .contenuto-paragrafo+.contenuto-lista {
	margin-top: -0.5rem;
}

/* ======= responsive ======= */
@media screen and (max-width: 767px) {
	.editor-content {
		font-size: 1.5rem;
		line-height: 1.8;
	}

	.editor-content .contenuto-paragrafo,
	.editor-content p {
		font-size: 1.5rem;
		line-height: 1.8;
		margin-bottom: 1.7rem;
	}

	.editor-content h2.contenuto-titolo,
	.editor-content h2 {
		font-size: 2.5rem;
		margin-top: 3.4rem;
	}

	.editor-content h3.contenuto-titolo,
	.editor-content h3 {
		font-size: 2.1rem;
	}

	.editor-content h4.contenuto-titolo,
	.editor-content h4 {
		font-size: 1.8rem;
	}

	.editor-content .contenuto-citazione,
	.editor-content blockquote {
		padding: 2.2rem 1.8rem 2rem 2.4rem;
		font-size: 1.55rem;
		line-height: 1.75;
	}

	.editor-content .tabella-contenuto,
	.editor-content table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		white-space: nowrap;
	}
}