/**
 * APSP page content inside Design Comuni templates.
 */

/* Hero + body share one col-lg-10 column (see comuni-page.php) */
.apsp-comuni-page-column .cmp-hero {
	margin-bottom: 0;
}

.apsp-comuni-page-column .apsp-comuni-page {
	margin-top: 0;
}

/* Bootstrap .variable-gutters uses negative side margins; keep content aligned in narrow column */
.apsp-comuni-page-column .apsp-comuni-page__body-row.variable-gutters,
.apsp-comuni-page-column .apsp-at-page-row.variable-gutters {
	margin-left: 0;
	margin-right: 0;
}

.apsp-comuni-page-column .apsp-comuni-page__body-row > [class*='col-'] {
	padding-left: 0;
	padding-right: 0;
}

/* Breathing room before site footer (all pages, including homepage) */
body.wp-theme-design-comuni-wordpress-theme main {
	padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

main .article-wrapper,
main .apsp-homepage-article {
	padding-bottom: clamp(1.25rem, 3vw, 2rem);
}

footer.it-footer {
	margin-top: 0;
}

/* Readable typography in article body */
.apsp-comuni-page .entry-content,
.apsp-comuni-page .page-content-wrapper {
	color: #262626;
	font-size: 1rem;
	line-height: 1.6;
	max-width: 52rem;
}

.apsp-comuni-page .entry-content > h2:first-child,
.apsp-comuni-page .entry-content > h3 {
	margin-top: 0;
}

.apsp-comuni-page .entry-content a {
	color: #0066cc;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.apsp-comuni-page .entry-content a:hover {
	color: #004d99;
}

/* Section hub cards: whole card is one link; do not inherit body link underline */
.apsp-comuni-page .entry-content a.apsp-section-card__link,
.apsp-comuni-page .entry-content a.apsp-section-card__link:hover,
.apsp-comuni-page .entry-content a.apsp-section-card__link:focus {
	text-decoration: none;
	font-weight: inherit;
	color: inherit;
}

.apsp-comuni-page .entry-content .apsp-section-card__title {
	color: #0f172a;
	font-weight: 600;
}

.apsp-comuni-page .entry-content .apsp-section-card__excerpt {
	color: #475569;
	font-weight: 400;
}

/* Chi siamo — list / card sections (Avio migrated markup) */
.in-evidenza-list,
.documenti-list {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	margin: 1.5rem 0 0;
	padding: 0;
}

.in-evidenza-item,
.documento-item {
	padding: 0 0 1.5rem;
	border-bottom: 1px solid #e6e6e6;
}

.in-evidenza-item:last-child,
.documento-item:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.in-evidenza-item h3,
.documento-item h3 {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
	line-height: 1.35;
}

.in-evidenza-item h3 a,
.documento-item h3 a {
	text-decoration: none;
}

.in-evidenza-item h3 a:hover,
.documento-item h3 a:hover {
	text-decoration: underline;
}

.in-evidenza-item p,
.documento-item p {
	margin: 0;
}

.struttura-sections {
	display: flex;
	flex-direction: column;
	gap: 2rem;
	margin-top: 1.5rem;
}

.struttura-item {
	display: grid;
	grid-template-columns: minmax(140px, 220px) 1fr;
	gap: 1.25rem 1.5rem;
	align-items: start;
	padding-bottom: 2rem;
	border-bottom: 1px solid #e6e6e6;
}

.struttura-item:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.struttura-image img,
.struttura-img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
}

.struttura-content h3 {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
}

.struttura-content h3 a {
	text-decoration: none;
}

.struttura-content h3 a:hover {
	text-decoration: underline;
}

.struttura-content p {
	margin: 0;
}

@media (max-width: 767.98px) {
	.struttura-item {
		grid-template-columns: 1fr;
	}
}
