﻿/* ── Digital Marketing page ──────────────────────────────────────── */

/* Colore sfondo sezione CTA: nero in dark, grigio chiaro in light */
:root {
	--dm-cta-bg: #000;
}
@media ( prefers-color-scheme: light ) {
	:root:not( [data-theme="dark"] ) {
		--dm-cta-bg: #d0d0d0;
	}
}
:root[data-theme="light"] {
	--dm-cta-bg: #d0d0d0;
}

/* Hide the WP block-theme post title — the hero already has one */
.page-digital-marketing .wp-block-post-title {
	display: none;
}

/* Prevent horizontal scrollbar caused by the full-bleed breakout */
.page-digital-marketing body,
.page-digital-marketing .wp-site-blocks {
	overflow-x: hidden;
}

/* Strip all top spacing added by WP theme wrappers (post-content, article, etc.)
   before our dm-page div — without this the hero floats 200-300px below the nav */
.page-digital-marketing .wp-block-post-content,
.page-digital-marketing .entry-content,
.page-digital-marketing article.page,
.page-digital-marketing article,
.page-digital-marketing main > *,
.page-digital-marketing .wp-site-blocks > * {
	padding-top: 0 !important;
	margin-top: 0 !important;
}
.page-digital-marketing .wp-block-post-content > *:first-child,
.page-digital-marketing .entry-content > *:first-child {
	margin-top: 0 !important;
}

/* --- Outer wrapper ------------------------------------------------ */
/*
 * Full-bleed breakout: WordPress's is-layout-constrained caps children
 * to --wp--style--global--content-size. We escape it with the 50vw trick
 * so the dm-page spans the full viewport, then each inner section
 * re-centres itself with max-width + margin: auto.
 */
.dm-page {
	width: 100vw !important;
	max-width: 100vw !important;
	margin-left: calc( 50% - 50vw ) !important;
	margin-right: calc( 50% - 50vw ) !important;
	box-sizing: border-box;
	background: var( --bg );
	color: var( --text );
	overflow-x: hidden;
}

/* --- Hero --------------------------------------------------------- */
.dm-hero {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: clamp( 40px, 6vw, 80px );
	padding:
		clamp( 60px, 8vh, 100px )
		clamp( 24px, 6vw, 96px )
		clamp( 40px, 6vh, 80px );
	max-width: 1440px;
	margin: 0 auto;
	box-sizing: border-box;
}

.dm-hero__content {
	display: flex;
	flex-direction: column;
}

.dm-hero__title {
	font-family: var( --wp--preset--font-family--manrope );
	font-weight: 800;
	font-size: clamp( 2.6rem, 5.2vw, 4.6rem );
	line-height: 1.05;
	letter-spacing: -0.02em;
	color: var( --text );
	margin: 0 0 clamp( 20px, 3vh, 36px );
}

.dm-hero__tagline {
	font-size: clamp( 1rem, 1.8vw, 1.35rem );
	font-weight: 600;
	color: var( --accent-purple );
	line-height: 1.35;
	margin: 0 0 clamp( 24px, 4vh, 40px );
}

.dm-hero__body {
	color: var( --text-muted );
	font-size: clamp( 0.88rem, 1.3vw, 1.02rem );
	line-height: 1.8;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 1em;
}

.dm-hero__body p {
	margin: 0;
}

.dm-hero__visual {
	display: flex;
	align-items: center;
	justify-content: center;
}

.dm-hero__visual img {
	width: 100%;
	max-width: 560px;
	height: auto;
	filter: drop-shadow( 0 24px 64px rgba( 136, 65, 231, 0.18 ) );
	animation: dm-hero-float 6s ease-in-out infinite;
}

@keyframes dm-hero-float {
	0%, 100% { transform: translateY( 0 ); }
	50%       { transform: translateY( -14px ); }
}

/* --- Services grid ----------------------------------------------- */
.dm-services {
	padding:
		clamp( 60px, 10vh, 120px )
		clamp( 24px, 6vw, 96px );
	max-width: 1440px;
	margin: 0 auto;
}

.dm-services__intro {
	margin-bottom: clamp( 40px, 6vh, 72px );
}

.dm-services__heading {
	font-family: var( --wp--preset--font-family--manrope );
	font-weight: 800;
	font-size: clamp( 2rem, 4vw, 3.5rem );
	line-height: 1.05;
	letter-spacing: -0.02em;
	color: var( --text );
	margin: 0;
	text-align: center;
}

.dm-services__grid {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: clamp( 14px, 2vw, 24px );
	max-width: 860px;
	margin: 0 auto;
}

/* --- Cards -------------------------------------------------------- */
.dm-card {
	display: flex;
	flex-direction: column;
	background: var( --surface );
	border: 1px solid var( --border );
	border-radius: 20px;
	overflow: hidden;
	text-decoration: none;
	color: var( --text );
	position: relative;
	transition:
		transform 0.35s cubic-bezier( 0.34, 1.56, 0.64, 1 ),
		box-shadow 0.35s ease,
		border-color 0.25s ease;
}

.dm-card:hover {
	transform: translateY( -10px );
	border-color: var( --accent-purple );
	box-shadow:
		0 24px 64px rgba( 136, 65, 231, 0.2 ),
		0 0 0 1px var( --accent-purple );
}

.dm-card__number {
	display: none;
}

.dm-card__image-wrap {
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp( 16px, 3%, 28px );
	box-sizing: border-box;
}

.dm-card__image-wrap img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	transition: transform 0.45s ease;
}

.dm-card:hover .dm-card__image-wrap img {
	transform: scale( 1.06 );
}

.dm-card__body {
	flex: 1;
	padding:
		clamp( 18px, 2.2vw, 28px )
		clamp( 18px, 2.2vw, 28px )
		clamp( 10px, 1.2vw, 14px );
}

.dm-card__title {
	font-family: var( --wp--preset--font-family--manrope );
	font-weight: 800;
	font-size: clamp( 1.05rem, 1.6vw, 1.35rem );
	line-height: 1.15;
	margin: 0 0 0.4em;
	color: var( --text );
}

.dm-card__subtitle {
	font-size: clamp( 0.8rem, 1.1vw, 0.92rem );
	color: var( --text-muted );
	line-height: 1.55;
	margin: 0;
}

.dm-card__arrow {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding:
		0
		clamp( 18px, 2.2vw, 28px )
		clamp( 16px, 2vw, 24px );
	line-height: 1;
	font-size: 0; /* nasconde il testo → nell'HTML, resta solo l'::after */
}

.dm-card__arrow::after {
	content: '→';
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1.5px solid var( --accent-purple );
	color: var( --accent-purple );
	font-size: 1rem;
	font-weight: 600;
	transition: background 0.25s ease, transform 0.25s ease;
	flex-shrink: 0;
}

.dm-card:hover .dm-card__arrow::after {
	background: var( --accent-purple );
	color: #fff;
	transform: translateX( 4px );
}

/* --- CTA finale -------------------------------------------------- */
.dm-cta {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: clamp( 40px, 6vw, 100px );
	padding:
		clamp( 60px, 10vh, 120px )
		clamp( 24px, 6vw, 96px );
	max-width: 1440px;
	margin: 0 auto;
	box-sizing: border-box;
	position: relative;
}

/* Sfondo nero full-bleed — estende il bg oltre il max-width del grid */
.dm-cta::before {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	transform: translateX( -50% );
	width: 100vw;
	background: var( --dm-cta-bg );
	z-index: 0;
}

/* Il contenuto resta sopra al pseudo-elemento di sfondo */
.dm-cta > * {
	position: relative;
	z-index: 1;
}

.dm-cta__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

/* Parola accent nei titoli (es. "marketing" in viola) */
.dm-accent {
	color: var( --accent-purple );
}

.dm-cta__title {
	font-family: var( --wp--preset--font-family--manrope );
	font-weight: 800;
	font-size: clamp( 2rem, 4vw, 3.5rem );
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: var( --text );
	margin: 0 0 clamp( 16px, 2.5vh, 28px );
}

.dm-cta__body {
	font-size: clamp( 0.88rem, 1.3vw, 1.02rem );
	color: var( --text-muted );
	line-height: 1.75;
	margin: 0 0 clamp( 28px, 4vh, 44px );
}

.dm-cta__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.8em 1.8em;
	background: var( --accent-purple );
	color: #fff;
	font-weight: 700;
	font-size: 0.95rem;
	letter-spacing: 0.02em;
	border-radius: 100px;
	text-decoration: none;
	transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.dm-cta__btn:hover {
	background: #9a28e8;
	transform: translateY( -2px );
	box-shadow: 0 8px 24px rgba( 136, 65, 231, 0.35 );
}

.dm-cta__visual {
	display: flex;
	align-items: center;
	justify-content: center;
}

.dm-cta__visual img {
	width: 100%;
	max-width: 480px;
	height: auto;
	filter: drop-shadow( 0 20px 50px rgba( 136, 65, 231, 0.15 ) );
}

/* --- Tablet (768 – 1100px) --------------------------------------- */
@media ( max-width: 1100px ) {
	.dm-hero {
		grid-template-columns: 1fr;
		min-height: auto;
		padding-top: clamp( 100px, 12vh, 140px );
	}

	.dm-hero__visual {
		order: -1;
	}

	.dm-hero__visual img {
		max-width: 360px;
	}

	.dm-services__grid {
		grid-template-columns: repeat( 2, 1fr );
	}

	.dm-cta {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.dm-cta__content {
		align-items: center;
		order: 2;
	}

	.dm-cta__visual {
		order: 1;
	}

	.dm-cta__visual img {
		max-width: 320px;
	}
}

/* --- Mobile (≤ 600px) ------------------------------------------- */
@media ( max-width: 600px ) {
	.dm-hero {
		padding: 90px 20px 48px;
		gap: 28px;
	}

	.dm-hero__content,
	.dm-hero__visual {
		padding-left: 20px;
		padding-right: 20px;
	}

	.dm-hero__visual img {
		max-width: 280px;
	}

	.dm-services {
		padding: 48px 20px;
	}

	.dm-services__grid {
		grid-template-columns: 1fr;
	}

	.dm-cta {
		padding: 48px 20px;
	}

	.dm-card__image-wrap {
		padding: 20px;
	}

	.dm-card__body {
		padding: 20px 20px 10px;
	}

	.dm-card__arrow {
		padding: 0 20px 16px;
	}
}
