/* ============================================
   Inner Pages v2 — Shared Styles
   Matches new homepage design system
   ============================================ */

/* ============================================
   Page Hero — WeBuild-inspired
   ============================================ */

.page-hero {
	position: relative;
	padding: calc(var(--navbar-height) + clamp(48px, 6vw, 80px)) 0 clamp(48px, 6vw, 80px);
	background-color: var(--color-navy);
	color: #fff;
	overflow: hidden;
}

.page-hero-bg {
	position: absolute;
	inset: 0;
	opacity: 0.08;
	background-size: cover;
	background-position: center;
}

/* Grid lines overlay */
.page-hero-grid {
	position: absolute;
	inset: 0;
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	pointer-events: none;
	z-index: 0;
}
.page-hero-grid span {
	border-right: 1px solid rgba(255, 255, 255, 0.03);
}

.page-hero .section-inner {
	position: relative;
	z-index: 1;
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 clamp(24px, 5vw, 88px);
}

.page-hero h1 {
	font-size: clamp(2rem, 1.2rem + 3.5vw, 3.5rem);
	font-weight: 300;
	color: #fff;
	margin-bottom: var(--space-lg);
	max-width: 700px;
	letter-spacing: -0.02em;
	line-height: 1.1;
}
.page-hero h1 strong {
	font-weight: 700;
}

.page-hero p {
	color: rgba(255, 255, 255, 0.6);
	max-width: 560px;
	font-size: var(--fs-md);
	line-height: 1.7;
	font-weight: 300;
}

.page-hero .section-label {
	color: var(--color-gold);
}

/* Breadcrumb */
.page-breadcrumb {
	font-family: var(--font-accent);
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.7);
	margin-bottom: var(--space-xl);
	display: flex;
	align-items: center;
	gap: 8px;
}
.page-breadcrumb a {
	color: rgba(255, 255, 255, 0.8);
	text-decoration: none;
	transition: color 0.2s ease;
}
.page-breadcrumb a:hover {
	color: var(--color-gold);
}
.page-breadcrumb .sep {
	color: rgba(255, 255, 255, 0.2);
}

/* ============================================
   Inner page sections (reuses section-v2)
   ============================================ */

.page-section {
	position: relative;
	padding: clamp(48px, 6vw, 100px) clamp(24px, 5vw, 88px);
	overflow: hidden;
}
.page-section .section-inner {
	max-width: 1400px;
	margin: 0 auto;
}

.page-section.grey-bg { background-color: var(--color-bg-alt); }
.page-section.warm-bg { background-color: var(--color-bg-warm); }
.page-section.dark-bg { background-color: var(--color-navy); color: var(--color-white); }
.page-section.dark-bg h2,
.page-section.dark-bg h3,
.page-section.dark-bg h4,
.page-section.dark-bg p { color: var(--color-white); }
.page-section.dark-bg .section-label { color: var(--color-gold); }
.page-section.gold-bg { background-color: var(--color-gold); color: var(--color-navy); }

/* ============================================
   Azienda — Timeline (storia)
   ============================================ */

.timeline-v2 {
	position: relative;
	padding-left: 32px;
}
.timeline-v2::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 2px;
	background: var(--color-border);
}

.timeline-block {
	position: relative;
	padding: 0 0 clamp(40px, 4vw, 64px) 0;
}
.timeline-block:last-child {
	padding-bottom: 0;
}

/* Dot on timeline */
.timeline-block::before {
	content: '';
	position: absolute;
	left: -38px;
	top: 6px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--color-bg);
	border: 3px solid var(--color-gold);
	z-index: 1;
}

.timeline-year {
	font-family: var(--font-accent);
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--color-gold);
	margin-bottom: var(--space-sm);
	display: block;
}

.timeline-block h2 {
	font-size: var(--fs-xl);
	font-weight: 700;
	margin-bottom: var(--space-md);
	letter-spacing: -0.01em;
}

.timeline-block p {
	color: var(--color-text-light);
	line-height: 1.75;
	max-width: 600px;
}

.timeline-block img {
	border-radius: var(--border-radius-lg);
}

/* Stats row inside timeline */
.timeline-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: var(--space-lg);
	margin-top: var(--space-xl);
}

/* ============================================
   Chi Siamo — Team Cards
   ============================================ */

.team-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: var(--space-lg);
}

.team-card {
	background: var(--color-white);
	border-radius: var(--border-radius-lg);
	overflow: hidden;
	border: 1px solid var(--color-border);
	transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.team-card:hover {
	box-shadow: var(--shadow-lg);
	border-color: transparent;
	transform: translateY(-4px);
}

.team-card-img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	filter: grayscale(20%);
	transition: filter 0.4s ease;
}
.team-card:hover .team-card-img {
	filter: grayscale(0%);
}

.team-card-body {
	padding: var(--space-xl);
}

.team-card-body h4 {
	font-size: var(--fs-md);
	margin-bottom: 2px;
	font-weight: 700;
}

.team-card-role {
	font-family: var(--font-accent);
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--color-gold-dark);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: var(--space-sm);
	display: block;
}

.team-card-body p {
	font-size: var(--fs-sm);
	color: var(--color-text-light);
	line-height: 1.6;
	margin: 0;
}

.team-card-body .social-link {
	color: var(--color-text-light);
	font-size: 1.1rem;
	transition: color 0.2s ease;
	margin-left: 6px;
}
.team-card-body .social-link:hover {
	color: var(--color-immobiltour);
}

/* Team small (tech team) */
.team-small-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: var(--space-md);
}

.team-small {
	display: flex;
	align-items: center;
	gap: var(--space-md);
	padding: var(--space-md) var(--space-lg);
	background: var(--color-white);
	border-radius: var(--border-radius);
	border: 1px solid var(--color-border);
	transition: all 0.3s ease;
}
.team-small:hover {
	box-shadow: var(--shadow-sm);
	border-color: var(--color-gold);
}
.team-small img {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	filter: grayscale(100%);
}
.team-small:hover img {
	filter: grayscale(0%);
}
.team-small h6 {
	font-size: var(--fs-sm);
	margin: 0;
}
.team-small p {
	font-size: var(--fs-xs);
	color: var(--color-text-light);
	margin: 0;
}

/* ============================================
   Service Hub (progetti.html)
   ============================================ */

.service-detail-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-lg);
}
@media (min-width: 768px) {
	.service-detail-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (min-width: 1100px) {
	.service-detail-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.service-detail-card {
	background: var(--color-white);
	border-radius: var(--border-radius-lg);
	padding: var(--space-2xl);
	border: 1px solid var(--color-border);
	transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
	position: relative;
	overflow: hidden;
}
.service-detail-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: var(--card-accent, var(--color-gold));
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.service-detail-card:hover {
	box-shadow: var(--shadow-lg);
	transform: translateY(-4px);
	border-color: transparent;
}
.service-detail-card:hover::before {
	transform: scaleX(1);
}

.service-detail-card .card-icon {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: var(--space-lg);
	background: var(--color-bg-alt);
}
.service-detail-card .card-icon i {
	font-size: 1.3rem;
	color: var(--color-navy);
}

.service-detail-card h3 {
	font-size: var(--fs-lg);
	margin-bottom: var(--space-md);
	color: var(--color-navy);
	font-weight: 700;
}

.service-detail-card p {
	color: var(--color-text-light);
	line-height: 1.7;
	font-size: var(--fs-sm);
}

.service-detail-card ul {
	padding-left: 0;
	list-style: none;
	margin-top: var(--space-md);
}
.service-detail-card ul li {
	padding: 6px 0 6px 20px;
	position: relative;
	color: var(--color-text-light);
	font-size: var(--fs-sm);
}
.service-detail-card ul li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 14px;
	width: 8px;
	height: 2px;
	background: var(--color-gold);
}

/* ============================================
   Info Box (collabora, features)
   ============================================ */

.info-box-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: var(--space-lg);
}

.info-box {
	background: var(--color-white);
	border-radius: var(--border-radius-lg);
	padding: var(--space-2xl);
	border-left: 4px solid var(--color-gold);
	transition: all 0.3s ease;
}
.info-box:hover {
	box-shadow: var(--shadow-md);
	transform: translateY(-2px);
}

.info-box h4 {
	font-size: var(--fs-md);
	margin-bottom: var(--space-sm);
	font-weight: 700;
}

.info-box p {
	font-size: var(--fs-sm);
	color: var(--color-text-light);
	line-height: 1.7;
	margin-bottom: 0;
}

/* ============================================
   Feature Grid (service/product pages)
   ============================================ */

.feature-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: var(--space-lg);
}

.feature-item {
	background: var(--color-white);
	border-radius: var(--border-radius-lg);
	padding: var(--space-2xl);
	border: 1px solid var(--color-border);
	transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.feature-item:hover {
	box-shadow: var(--shadow-md);
	transform: translateY(-3px);
	border-color: transparent;
}

.feature-item .feature-icon {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: var(--space-lg);
	background: var(--color-bg-alt);
}
.feature-item .feature-icon i {
	font-size: 1.3rem;
	color: var(--color-navy);
}

.feature-item h4 {
	font-size: var(--fs-md);
	margin-bottom: var(--space-sm);
	color: var(--color-navy);
	font-weight: 700;
}

.feature-item p {
	font-size: var(--fs-sm);
	color: var(--color-text-light);
	line-height: 1.65;
	margin-bottom: 0;
}

.feature-item img {
	max-height: 120px;
	margin-bottom: var(--space-lg);
	border-radius: var(--border-radius);
}

/* ============================================
   Product Page Hero
   ============================================ */

.product-page-hero {
	position: relative;
	padding: calc(var(--navbar-height) + clamp(48px, 6vw, 80px)) 0 clamp(48px, 6vw, 80px);
	color: #fff;
	overflow: hidden;
}
.product-page-hero .section-inner {
	position: relative;
	z-index: 1;
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 clamp(24px, 5vw, 88px);
}

.product-page-hero h1 {
	font-size: clamp(2rem, 1.2rem + 3.5vw, 3.5rem);
	color: #fff;
	font-weight: 300;
	letter-spacing: -0.02em;
}
.product-page-hero h1 strong {
	font-weight: 700;
}

.product-page-hero img.product-logo {
	height: 64px;
	width: auto;
	margin-bottom: var(--space-lg);
}

.product-page-hero p {
	color: rgba(255, 255, 255, 0.7);
	max-width: 560px;
	font-size: var(--fs-md);
	line-height: 1.7;
	font-weight: 300;
}

/* Product CTA band */
.product-cta-band {
	text-align: center;
	max-width: 600px;
	margin: 0 auto;
}
.product-cta-band h2 {
	font-size: clamp(1.5rem, 1rem + 2vw, 2.5rem);
	font-weight: 300;
	margin-bottom: var(--space-md);
	letter-spacing: -0.02em;
}
.product-cta-band h2 strong {
	font-weight: 700;
}
.product-cta-band p {
	max-width: 480px;
	margin: 0 auto var(--space-xl);
	color: var(--color-text-light);
}

/* ============================================
   Case Study Cards (portfolio grid)
   ============================================ */

.portfolio-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: var(--space-lg);
}

.portfolio-grid-card {
	position: relative;
	border-radius: var(--border-radius-lg);
	overflow: hidden;
	aspect-ratio: 4/3;
	background: var(--color-navy);
	text-decoration: none;
	display: block;
	transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.portfolio-grid-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.55;
	transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.portfolio-grid-card:hover img {
	opacity: 0.3;
	transform: scale(1.05);
}
.portfolio-grid-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-xl);
}

.portfolio-grid-card .card-content {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: var(--space-xl);
	background: linear-gradient(to top, rgba(27, 42, 54, 0.95) 0%, rgba(27, 42, 54, 0.4) 60%, transparent 100%);
}
.portfolio-grid-card .card-tag {
	font-family: var(--font-accent);
	font-size: 0.7rem;
	font-weight: 600;
	color: var(--color-gold);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	margin-bottom: 4px;
	display: block;
}
.portfolio-grid-card h4 {
	color: #fff;
	font-size: var(--fs-md);
	margin: 0;
	font-weight: 600;
}

/* ============================================
   Blog Cards
   ============================================ */

.blog-grid-page {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: var(--space-lg);
}

.blog-page-card {
	background: var(--color-white);
	border-radius: var(--border-radius-lg);
	overflow: hidden;
	border: 1px solid var(--color-border);
	transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
}
.blog-page-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-lg);
	border-color: transparent;
	color: inherit;
}
.blog-page-card .card-img-wrap {
	overflow: hidden;
	aspect-ratio: 16/10;
}
.blog-page-card .card-img-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.blog-page-card:hover .card-img-wrap img {
	transform: scale(1.05);
}
.blog-page-card .card-body {
	padding: var(--space-xl);
	flex: 1;
}
.blog-page-card .card-date {
	font-family: var(--font-accent);
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--color-gold-dark);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: var(--space-sm);
	display: block;
}
.blog-page-card h4 {
	font-size: var(--fs-md);
	margin-bottom: var(--space-xs);
	line-height: 1.3;
}
.blog-page-card p {
	font-size: var(--fs-sm);
	color: var(--color-text-light);
	margin: 0;
}

/* ============================================
   Contact Page
   ============================================ */

.contact-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-3xl);
}
@media (min-width: 768px) {
	.contact-grid {
		grid-template-columns: 1fr 1fr;
	}
}

.contact-form input,
.contact-form textarea {
	background-color: var(--color-bg-alt);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	/* Neutralise the global fixed 60px text-input height / 50px line-height */
	height: auto;
	min-height: 0;
	line-height: 1.5;
	margin: 0;
}
.contact-form textarea {
	min-height: 120px;
}
.contact-form input:focus,
.contact-form textarea:focus {
	border-color: var(--color-gold);
	box-shadow: 0 0 0 3px rgba(255, 192, 0, 0.1);
	background: var(--color-white);
}
/* Submit confirmation */
.contact-form-success {
	margin: var(--space-sm) 0 0;
	padding: 12px 16px;
	border-radius: var(--border-radius);
	background: rgba(122, 190, 135, 0.14);
	border: 1px solid rgba(122, 190, 135, 0.45);
	color: var(--color-text);
	font-size: var(--fs-sm);
	line-height: 1.5;
}

.office-card {
	background: var(--color-white);
	border-radius: var(--border-radius-lg);
	padding: var(--space-xl);
	border: 1px solid var(--color-border);
	margin-bottom: var(--space-lg);
}
.office-card h4 {
	font-size: var(--fs-md);
	font-weight: 700;
	margin-bottom: var(--space-sm);
}
.office-card p {
	font-size: var(--fs-sm);
	color: var(--color-text-light);
	margin-bottom: 4px;
}
.office-card iframe {
	border-radius: var(--border-radius);
	margin-top: var(--space-md);
}

/* ============================================
   CTA Section (shared across pages)
   ============================================ */

.page-cta {
	text-align: center;
	max-width: 600px;
	margin: 0 auto;
}
.page-cta h2 {
	font-size: clamp(1.5rem, 1rem + 2vw, 2.5rem);
	font-weight: 300;
	margin-bottom: var(--space-md);
	letter-spacing: -0.02em;
}
.page-cta h2 strong {
	font-weight: 700;
}
.page-cta p {
	font-size: var(--fs-md);
	opacity: 0.85;
	margin-bottom: var(--space-2xl);
}

/* Gold CTA (matching home) */
.page-section.gold-bg .page-cta h2,
.page-section.gold-bg .page-cta p {
	color: var(--color-navy);
}

/* ============================================
   GSAP reveal classes (same as home)
   ============================================ */

.reveal-up {
	opacity: 0;
	transform: translateY(40px);
}
.reveal-left {
	opacity: 0;
	transform: translateX(-40px);
}
.reveal-right {
	opacity: 0;
	transform: translateX(40px);
}
.reveal-scale {
	opacity: 0;
	transform: scale(0.95);
}

/* ============================================
   No-JS / reduced-motion safety net (see home.css for rationale):
   without the .js gate on <html>, reveal content stays visible.
   ============================================ */
html:not(.js) .reveal-up,
html:not(.js) .reveal-left,
html:not(.js) .reveal-right,
html:not(.js) .reveal-scale,
html:not(.js) .reveal-stagger > * {
	opacity: 1 !important;
	transform: none !important;
}

/* ============================================
   Approach — Horizontal animated timeline
   ============================================ */

.approach-container {
	position: relative;
}

/* Progress line */
.approach-line {
	position: absolute;
	top: 36px;
	left: 0;
	right: 0;
	height: 2px;
	background: var(--color-border);
	z-index: 0;
	display: none;
}
.approach-line-fill {
	height: 100%;
	width: 0%;
	background: var(--color-gold);
	transition: width 0.6s ease;
}

@media (min-width: 992px) {
	.approach-line {
		display: block;
	}
}

.approach-steps {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
	position: relative;
	z-index: 1;
}
@media (min-width: 992px) {
	.approach-steps {
		grid-template-columns: repeat(5, 1fr);
		gap: var(--space-lg);
	}
}

.approach-step {
	position: relative;
	padding: var(--space-lg) 0;
	border-bottom: 1px solid var(--color-border);
	display: flex;
	gap: var(--space-lg);
	align-items: flex-start;
}
@media (min-width: 992px) {
	.approach-step {
		flex-direction: column;
		text-align: center;
		align-items: center;
		border-bottom: none;
		padding: 0;
		padding-top: calc(36px + var(--space-xl));
	}
}

.approach-step:last-child {
	border-bottom: none;
}

/* Step dot on timeline */
.approach-step-dot {
	display: none;
}
@media (min-width: 992px) {
	.approach-step-dot {
		display: block;
		position: absolute;
		top: 28px;
		left: 50%;
		transform: translateX(-50%);
		width: 16px;
		height: 16px;
		border-radius: 50%;
		background: var(--color-bg);
		border: 3px solid var(--color-border);
		transition: var(--transition-base);
		z-index: 2;
	}
	.approach-step.is-active .approach-step-dot {
		border-color: var(--color-gold);
		background: var(--color-gold);
		box-shadow: 0 0 0 6px rgba(255, 192, 0, 0.15);
	}
}

.approach-step-num {
	font-family: var(--font-accent);
	font-size: var(--fs-xl);
	font-weight: 800;
	color: var(--color-gold);
	opacity: 0.2;
	line-height: 1;
	flex-shrink: 0;
	width: 50px;
}
@media (min-width: 992px) {
	.approach-step-num {
		font-size: var(--fs-2xl);
		width: auto;
		margin-bottom: var(--space-sm);
	}
}

.approach-step h5 {
	font-size: var(--fs-base);
	font-weight: 700;
	margin-bottom: var(--space-xs);
}

.approach-step p {
	font-size: var(--fs-xs);
	color: var(--color-text-light);
	line-height: 1.55;
	margin: 0;
}

/* Lenis support */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
