/*
 * Italy Travel Experience — institutional pages.
 *
 * Uses the shared color, spacing and container variables declared by
 * homepage.css. All content components are Gutenberg blocks with ite-prefixed
 * classes, so editors can change copy, order, links and whole sections without
 * editing PHP templates.
 */

.ite-institutional-page,
.editor-styles-wrapper {
	--ite-institutional-accent: var(--ite-color-accent, #2c5f7c);
	--ite-institutional-ink: var(--ite-color-text, #14202b);
	--ite-institutional-muted: var(--ite-color-muted, #5b6b76);
	--ite-institutional-border: var(--ite-color-border, #dfe6ea);
	--ite-institutional-soft: #f3f7f9;
	--ite-institutional-white: #ffffff;
	--ite-institutional-radius: 18px;
	--ite-institutional-shadow: 0 18px 45px rgba(20, 32, 43, 0.09);
}

.ite-institutional-page,
.ite-institutional-page *,
.ite-institutional-page *::before,
.ite-institutional-page *::after,
.editor-styles-wrapper .ite-section-intro,
.editor-styles-wrapper .ite-card-grid,
.editor-styles-wrapper .ite-card,
.editor-styles-wrapper .ite-highlight,
.editor-styles-wrapper .ite-cta,
.editor-styles-wrapper .ite-newsletter-panel,
.editor-styles-wrapper .ite-trust-note {
	box-sizing: border-box;
}

.ite-institutional-page {
	background: var(--ite-institutional-white);
	color: var(--ite-institutional-ink);
}

.ite-institutional-shell {
	width: min(
		calc(100% - (2 * var(--ite-container-padding, clamp(1rem, 4vw, 2rem)))),
		var(--ite-container-max-width, 1240px)
	);
	margin-inline: auto;
}

.ite-institutional-hero {
	position: relative;
	overflow: hidden;
	padding-block: clamp(3.75rem, 8vw, 7.5rem);
	background:
		radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.16), transparent 24rem),
		linear-gradient(135deg, #14202b 0%, #203f52 58%, var(--ite-institutional-accent) 100%);
	color: var(--ite-institutional-white);
}

.ite-institutional-hero::after {
	content: '';
	position: absolute;
	inset: auto 0 0;
	height: 5px;
	background: linear-gradient(90deg, #178447 0 33.333%, #ffffff 33.333% 66.666%, #c83232 66.666% 100%);
}

.ite-institutional-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.55rem;
	margin-bottom: clamp(2.5rem, 6vw, 5rem);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.72);
}

.ite-institutional-breadcrumb a {
	color: inherit;
	text-decoration: none;
}

.ite-institutional-breadcrumb a:hover,
.ite-institutional-breadcrumb a:focus-visible {
	color: #ffffff;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.ite-institutional-kicker,
.editor-styles-wrapper .ite-eyebrow {
	margin: 0 0 1rem;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.ite-institutional-kicker {
	color: rgba(255, 255, 255, 0.78);
}

.ite-institutional-title {
	max-width: 15ch;
	margin: 0;
	font-size: clamp(2.7rem, 7vw, 5.8rem);
	font-weight: 800;
	letter-spacing: -0.045em;
	line-height: 0.98;
	color: #ffffff;
}

.ite-institutional-dek {
	max-width: 760px;
	margin: clamp(1.5rem, 3vw, 2.25rem) 0 0;
	font-size: clamp(1.08rem, 2vw, 1.35rem);
	line-height: 1.65;
	color: rgba(255, 255, 255, 0.82);
}

.ite-institutional-content-shell {
	padding-block: clamp(3.5rem, 7vw, 7rem);
}

.ite-institutional-content {
	max-width: 1080px;
	margin-inline: auto;
	font-size: clamp(1rem, 1.2vw, 1.08rem);
	line-height: 1.75;
}

.ite-institutional-content > * + * {
	margin-top: clamp(2rem, 5vw, 4.5rem);
}

.ite-institutional-content h2,
.editor-styles-wrapper .ite-section-intro h2,
.editor-styles-wrapper .ite-highlight h2,
.editor-styles-wrapper .ite-cta h2,
.editor-styles-wrapper .ite-newsletter-panel h2 {
	margin-top: 0;
	font-size: clamp(1.85rem, 4vw, 3.2rem);
	font-weight: 800;
	letter-spacing: -0.035em;
	line-height: 1.08;
	color: var(--ite-institutional-ink);
}

.ite-institutional-content h3,
.editor-styles-wrapper .ite-card h3 {
	margin-top: 0;
	font-size: clamp(1.1rem, 2vw, 1.35rem);
	font-weight: 800;
	line-height: 1.25;
	color: var(--ite-institutional-ink);
}

.ite-institutional-content p,
.ite-institutional-content li,
.editor-styles-wrapper .ite-card p,
.editor-styles-wrapper .ite-section-intro p {
	color: var(--ite-institutional-muted);
}

.ite-section-intro {
	position: relative;
	max-width: 850px;
	padding-inline-start: clamp(1.25rem, 3vw, 2.25rem);
	border-inline-start: 4px solid var(--ite-institutional-accent);
}

.ite-section-intro .ite-eyebrow,
.ite-eyebrow {
	color: var(--ite-institutional-accent) !important;
}

.ite-section-intro > :last-child {
	margin-bottom: 0;
}

.ite-card-grid {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1rem, 2.5vw, 1.75rem);
}

.ite-card-grid.ite-card-grid--two {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ite-card-grid > .wp-block-column,
.ite-card {
	position: relative;
	min-width: 0;
	padding: clamp(1.4rem, 3vw, 2rem);
	border: 1px solid var(--ite-institutional-border);
	border-radius: var(--ite-institutional-radius);
	background: #ffffff;
	box-shadow: 0 8px 24px rgba(20, 32, 43, 0.045);
}

.ite-card-grid > .wp-block-column::before,
.ite-card::before {
	content: '';
	display: block;
	width: 2.75rem;
	height: 4px;
	margin-bottom: 1.25rem;
	border-radius: 999px;
	background: var(--ite-institutional-accent);
}

.ite-card-grid > .wp-block-column > :last-child,
.ite-card > :last-child {
	margin-bottom: 0;
}

.ite-highlight,
.ite-newsletter-panel,
.ite-trust-note,
.ite-cta {
	padding: clamp(1.75rem, 4vw, 3.25rem);
	border-radius: calc(var(--ite-institutional-radius) + 4px);
}

.ite-highlight {
	border: 1px solid #dbe8ee;
	background: var(--ite-institutional-soft);
}

.ite-highlight > :last-child,
.ite-newsletter-panel > :last-child,
.ite-trust-note > :last-child,
.ite-cta > :last-child {
	margin-bottom: 0;
}

.ite-newsletter-panel {
	border: 1px solid rgba(44, 95, 124, 0.3);
	background:
		linear-gradient(135deg, rgba(44, 95, 124, 0.1), rgba(44, 95, 124, 0.02)),
		#ffffff;
	box-shadow: var(--ite-institutional-shadow);
}

.ite-newsletter-panel .wp-block-shortcode {
	margin-top: 1.75rem;
	padding: clamp(1rem, 3vw, 1.5rem);
	border-radius: 14px;
	background: #ffffff;
}

.ite-trust-note {
	border: 1px dashed var(--ite-institutional-border);
	background: #fbfcfd;
}

.ite-cta {
	position: relative;
	overflow: hidden;
	background: var(--ite-institutional-ink);
	color: #ffffff;
	box-shadow: var(--ite-institutional-shadow);
}

.ite-cta::after {
	content: '';
	position: absolute;
	right: -5rem;
	bottom: -7rem;
	width: 18rem;
	height: 18rem;
	border-radius: 50%;
	background: rgba(44, 95, 124, 0.35);
	pointer-events: none;
}

.ite-cta > * {
	position: relative;
	z-index: 1;
}

.ite-cta h2,
.ite-cta p {
	color: #ffffff !important;
}

.ite-institutional-content .wp-block-button__link,
.editor-styles-wrapper .ite-cta .wp-block-button__link,
.editor-styles-wrapper .ite-newsletter-panel .wp-block-button__link {
	padding: 0.82rem 1.25rem;
	border: 0;
	border-radius: 999px;
	background: var(--ite-institutional-accent);
	color: #ffffff;
	font-size: 0.92rem;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.ite-institutional-content .wp-block-button__link:hover,
.ite-institutional-content .wp-block-button__link:focus-visible {
	background: #214a62;
	box-shadow: 0 10px 24px rgba(20, 32, 43, 0.22);
	transform: translateY(-1px);
}

.ite-institutional-content a:not(.wp-block-button__link) {
	color: var(--ite-institutional-accent);
	font-weight: 700;
	text-underline-offset: 0.18em;
}

.ite-institutional-content ul,
.ite-institutional-content ol {
	padding-inline-start: 1.25rem;
}

.ite-institutional-content li + li {
	margin-top: 0.55rem;
}

.ite-institutional-content :focus-visible {
	outline: 3px solid rgba(44, 95, 124, 0.42);
	outline-offset: 3px;
}

.editor-styles-wrapper .ite-card-grid {
	margin-block: 2rem;
}

.editor-styles-wrapper .ite-section-intro,
.editor-styles-wrapper .ite-highlight,
.editor-styles-wrapper .ite-cta,
.editor-styles-wrapper .ite-newsletter-panel,
.editor-styles-wrapper .ite-trust-note {
	margin-block: 2rem;
}

@media (max-width: 900px) {
	.ite-card-grid,
	.ite-card-grid.ite-card-grid--two {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.ite-institutional-hero {
		padding-block: 3.25rem 4rem;
	}

	.ite-institutional-breadcrumb {
		margin-bottom: 2.75rem;
	}

	.ite-card-grid,
	.ite-card-grid.ite-card-grid--two {
		grid-template-columns: 1fr;
	}

	.ite-highlight,
	.ite-newsletter-panel,
	.ite-trust-note,
	.ite-cta,
	.ite-card-grid > .wp-block-column,
	.ite-card {
		border-radius: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ite-institutional-content .wp-block-button__link {
		transition: none;
	}
}
