.gw-document-library,
.gw-document-feature,
.gw-document-link {
	--gw-doc-accent: var(--e-global-color-accent, var(--wp--preset--color--primary, #17679a));
	--gw-doc-accent-dark: color-mix(in srgb, var(--gw-doc-accent) 75%, #000000);
	--gw-doc-ink: #1f2d36;
	--gw-doc-muted: #57666f;
	--gw-doc-border: #dfe8ef;
	--gw-doc-border-strong: #c9dce8;
	--gw-doc-surface: #ffffff;
	--gw-doc-sky: #e4f1f8;
	--gw-doc-radius: 14px;
	--gw-doc-radius-sm: 8px;
	--gw-doc-shadow: 0 12px 28px -9px rgba(20, 42, 36, .2), 0 3px 8px rgba(20, 42, 36, .06);
	color: var(--gw-doc-ink);
	font-family: var(--gw-doc-body-font, inherit);
}

.gw-document-library {
	display: flex;
	flex-direction: column;
	gap: clamp(3rem, 6vw, 5rem);
	margin-top: clamp(2.5rem, 5vw, 4rem);
}

.gw-document-section,
.gw-document-item,
.gw-document-feature,
.elementor-widget-gw-document-library[id] {
	scroll-margin-top: var(--gw-doc-scroll-offset, 120px);
}

.gw-document-section__heading {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.15rem;
	padding-bottom: .8rem;
	border-bottom: 1px solid var(--gw-doc-border-strong);
}

.gw-document-library .gw-document-section__heading h2 {
	margin: 0;
	font-family: var(--gw-doc-heading-font, inherit);
	font-size: clamp(1.55rem, 2.6vw, 2.15rem);
}

.gw-document-section__heading > span {
	color: var(--gw-doc-muted);
	font-size: .88rem;
	font-weight: 600;
	line-height: 1.62;
	white-space: nowrap;
}

.gw-document-list {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gw-document-item {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1.15rem;
	min-width: 0;
	padding: 1.35rem 1.4rem;
	border: 1px solid var(--gw-doc-border);
	border-left: 4px solid var(--gw-doc-accent);
	border-radius: var(--gw-doc-radius);
	background: var(--gw-doc-surface);
	box-shadow: var(--gw-doc-shadow);
	scroll-margin-top: 130px;
	transition: border-color 180ms ease, box-shadow 180ms ease;
}

.gw-document-item:target {
	border-color: var(--gw-doc-accent);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--gw-doc-accent) 16%, transparent), var(--gw-doc-shadow);
}

.gw-document-library .gw-document-item__content h3 {
	margin: 0;
	font-family: var(--gw-doc-heading-font, inherit);
	font-size: 1.18rem;
	line-height: 1.25;
}

.gw-document-item__content > p:not(.gw-document-meta) {
	margin: .65rem 0 0;
	color: var(--gw-doc-muted);
	font-size: .96rem;
	line-height: 1.55;
}

.gw-document-meta {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: .45rem;
	margin: .85rem 0 0;
	color: var(--gw-doc-muted);
	font-size: .8rem;
	font-weight: 650;
	line-height: 1.62;
	letter-spacing: .02em;
}

.gw-document-meta span {
	display: inline-flex;
	padding: .3rem .55rem;
	border-radius: 999px;
	background: var(--gw-doc-sky);
	white-space: nowrap;
}

.gw-document-download {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 11px 16px;
	border: 2px solid var(--gw-doc-accent);
	border-radius: 8px;
	background: var(--gw-doc-accent);
	color: #fff !important;
	font-size: 15px;
	font-style: normal;
	font-weight: 650;
	line-height: 1.2;
	text-decoration: none !important;
	transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.gw-document-download:hover,
.gw-document-download:focus {
	border-color: var(--gw-doc-accent-dark);
	background: var(--gw-doc-accent-dark);
	color: #fff !important;
	text-decoration: none !important;
}

.gw-document-download:active {
	transform: translateY(1px);
	border-color: var(--gw-doc-accent-dark);
	background: var(--gw-doc-accent-dark);
	color: #fff !important;
}

.gw-document-unavailable {
	color: var(--gw-doc-muted);
	font-size: .92rem;
	font-style: italic;
}

.gw-document-link {
	color: var(--gw-doc-accent);
	font-weight: 700;
}

.gw-document-link--download {
	align-items: center;
	display: flex;
	gap: 1rem;
	justify-content: space-between;
	min-height: 44px;
	text-decoration: none;
	width: 100%;
}

.gw-document-link__label {
	min-width: 0;
	overflow-wrap: anywhere;
}

.gw-document-link__icon {
	align-items: center;
	display: inline-flex;
	flex: 0 0 44px;
	height: 44px;
	justify-content: center;
	width: 44px;
}

.gw-document-link__icon svg {
	fill: currentColor;
	height: 1.15rem;
	width: 1.15rem;
}

.gw-document-download:focus-visible,
.gw-document-link:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 3px;
}

.gw-document-feature {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: clamp(1.5rem, 4vw, 3rem);
	margin: 2rem 0 2.5rem;
	padding: clamp(1.4rem, 3vw, 2rem);
	border: 1px solid var(--gw-doc-border-strong);
	border-radius: var(--gw-doc-radius);
	background: var(--gw-doc-feature-background, var(--gw-doc-sky));
	scroll-margin-top: 130px;
}

.gw-document-feature h2 {
	margin: 0;
	font-size: clamp(1.4rem, 2.4vw, 1.95rem);
}

.gw-document-feature p {
	margin: .65rem 0 0;
}

.gw-document-feature__eyebrow {
	color: var(--gw-doc-accent);
	font-size: .8rem;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
}

@media (max-width: 767px) {
	.gw-document-list {
		grid-template-columns: 1fr;
	}

	.gw-document-section__heading {
		align-items: flex-start;
		flex-direction: column;
		gap: .35rem;
	}

	.gw-document-feature {
		align-items: stretch;
		flex-direction: column;
	}

	.gw-document-feature .gw-document-download,
	.gw-document-item .gw-document-download {
		align-self: flex-start;
		width: auto;
	}
}

/* Layout editoriale: archivio a righe con hero e palette configurabile. */
.gw-document-dynamic-section,
.gw-document-dynamic-section > .elementor-container,
.gw-document-dynamic-section .elementor-column,
.gw-document-dynamic-section .elementor-widget-wrap,
.gw-document-dynamic-section .elementor-widget-shortcode,
.gw-document-dynamic-section .elementor-widget-container {
	width: 100% !important;
	max-width: none !important;
	padding: 0 !important;
}

.gw-document-library--editorial {
	--gw-doc-editorial-primary: #17355f;
	--gw-doc-editorial-accent: #5ab4da;
	--gw-doc-editorial-action: #005699;
	--gw-doc-editorial-highlight: #ed145b;
	--gw-doc-editorial-background: #f4f7f8;
	--gw-doc-editorial-text: #18324b;
	--gw-doc-editorial-muted: #3f5668;
	--gw-doc-editorial-border: #ccdae3;
	display: block;
	margin-top: 0;
	color: var(--gw-doc-editorial-text);
}

.gw-document-editorial-section,
.gw-document-editorial-item {
	scroll-margin-top: var(--gw-doc-scroll-offset, 120px);
}

.gw-document-editorial-shell {
	box-sizing: border-box;
	width: min(1180px, calc(100% - 48px));
	margin: 0 auto;
}

.gw-document-editorial-hero,
.gw-document-editorial-main {
	width: 100vw;
	margin-left: calc(50% - 50vw);
}

.gw-document-editorial-hero {
	padding: 58px 0 66px;
	background: var(--gw-doc-editorial-primary);
	color: #fff;
}

.gw-document-editorial-hero h1 {
	max-width: 15ch;
	margin: 0;
	color: #fff !important;
	font: inherit;
	font-size: clamp(52px, 5.2vw, 68px);
	font-weight: 700;
	line-height: 1.03;
	letter-spacing: -.03em;
	text-transform: none;
}

.gw-document-editorial-hero__rule {
	display: block;
	width: 76px;
	height: 4px;
	margin: 24px 0 20px;
	background: var(--gw-doc-editorial-accent);
}

.gw-document-editorial-hero p {
	max-width: 66ch;
	margin: 0;
	color: #e1ebf1;
	font-size: 20px;
	font-weight: 500;
	line-height: 1.65;
}

.gw-document-editorial-main {
	padding: 74px 0 104px;
	background: var(--gw-doc-editorial-background);
}

.gw-document-editorial-section {
	box-sizing: border-box;
	margin: 0 0 64px;
	overflow: hidden;
	border: 1px solid var(--gw-doc-editorial-border);
	background: #fff;
	box-shadow: 0 12px 28px rgba(16, 47, 75, .08);
}

.gw-document-editorial-section:last-child {
	margin-bottom: 0;
}

.gw-document-editorial-section__heading {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: end;
	gap: 24px;
	padding: 26px 30px 24px;
	background: var(--gw-doc-editorial-primary);
}

.gw-document-editorial-section__heading::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 4px;
	background: var(--gw-doc-editorial-accent);
}

.gw-document-editorial-section__heading h2 {
	margin: 0;
	color: #fff !important;
	font: inherit;
	font-size: 40px !important;
	font-weight: 700 !important;
	line-height: 1.16 !important;
	letter-spacing: -.018em !important;
	text-transform: none;
	overflow-wrap: anywhere;
}

.gw-document-editorial-section__heading p {
	margin: 0 0 4px;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	white-space: nowrap;
}

.gw-document-editorial-item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 34px;
	padding: 27px 30px 28px;
	border-bottom: 1px solid var(--gw-doc-editorial-border);
}

.gw-document-editorial-item:last-child {
	border-bottom: 0;
}

.gw-document-editorial-item h3 {
	margin: 0;
	color: var(--gw-doc-editorial-text) !important;
	font: inherit;
	font-size: 24px !important;
	font-weight: 650 !important;
	line-height: 1.28 !important;
	letter-spacing: -.012em !important;
	text-transform: none;
	overflow-wrap: anywhere;
}

.gw-document-editorial-item p {
	margin: 8px 0 0;
	color: var(--gw-doc-editorial-muted) !important;
	font-size: 18px !important;
	font-weight: 500 !important;
	line-height: 1.58 !important;
}

.gw-document-editorial-open {
	box-sizing: border-box;
	display: inline-flex;
	min-width: 184px;
	min-height: 52px;
	align-items: center;
	justify-content: center;
	padding: 11px 20px;
	border: 2px solid var(--gw-doc-editorial-action);
	border-radius: 0;
	background: var(--gw-doc-editorial-action);
	color: #fff !important;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
	text-align: center;
	text-decoration: none !important;
	transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.gw-document-editorial-open::before {
	content: "";
	width: 19px;
	height: 19px;
	flex: 0 0 19px;
	margin-inline-end: 10px;
	background: currentColor;
	-webkit-mask: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M9 15h6'/%3E%3Cpath d='m13 12 3 3-3 3'/%3E%3C/svg%3E");
	mask: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M9 15h6'/%3E%3Cpath d='m13 12 3 3-3 3'/%3E%3C/svg%3E");
}

.gw-document-editorial-open:hover,
.gw-document-editorial-open:focus {
	border-color: var(--gw-doc-editorial-highlight);
	background: var(--gw-doc-editorial-highlight);
	color: #fff !important;
	transform: translateY(-2px);
}

.gw-document-editorial-open:focus-visible {
	outline: 3px solid var(--gw-doc-editorial-accent);
	outline-offset: 4px;
}

.gw-document-editorial-pagination {
	padding: 30px;
	border-top: 1px solid var(--gw-doc-editorial-border);
}

.gw-document-editorial-pagination .page-numbers {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gw-document-editorial-pagination .page-numbers li {
	margin: 0;
}

.gw-document-editorial-pagination a,
.gw-document-editorial-pagination span.page-numbers {
	box-sizing: border-box;
	display: inline-flex;
	min-width: 48px;
	min-height: 48px;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 9px 15px;
	border: 2px solid var(--gw-doc-editorial-action);
	background: #fff;
	color: var(--gw-doc-editorial-action) !important;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
}

.gw-document-editorial-pagination span.current,
.gw-document-editorial-pagination a:hover,
.gw-document-editorial-pagination a:focus {
	border-color: var(--gw-doc-editorial-highlight);
	background: var(--gw-doc-editorial-highlight);
	color: #fff !important;
}

@media (max-width: 767px) {
	.gw-document-editorial-shell {
		width: min(100% - 32px, 1180px);
	}

	.gw-document-editorial-hero {
		padding: 45px 0 50px;
	}

	.gw-document-editorial-hero h1 {
		font-size: clamp(40px, 12vw, 54px);
	}

	.gw-document-editorial-main {
		padding: 48px 0 72px;
	}

	.gw-document-editorial-section__heading,
	.gw-document-editorial-item {
		grid-template-columns: 1fr;
	}

	.gw-document-editorial-section__heading {
		gap: 8px;
		padding: 24px 22px;
	}

	.gw-document-editorial-section__heading h2 {
		font-size: 31px !important;
	}

	.gw-document-editorial-section__heading p {
		justify-self: start;
	}

	.gw-document-editorial-item {
		gap: 20px;
		padding: 24px 22px;
	}

	.gw-document-editorial-open {
		width: 100%;
	}
}
