/* Custom Properties */
:root {
	/* Colors in HSL format */
	--clr-primary-200: hsl(210, 61%, 92%);
	--clr-primary-500: hsl(210, 61%, 60%);
	/* #5B9BD5 - Blu primario */
	--clr-primary-700: hsl(210, 61%, 40%);

	--clr-secondary-200: hsl(182, 50%, 90%);
	--clr-secondary-500: hsl(182, 50%, 60%);
	/* #6EC1C2 - Verde acqua */
	--clr-secondary-700: hsl(182, 50%, 40%);

	--clr-dark-900: hsl(217, 33%, 28%);
	/* #2E3E5E - Blu scuro footer */
	--clr-neutral-100: hsl(0, 0%, 100%);
	/* #FFFFFF - Bianco */
	--clr-neutral-200: hsl(0, 0%, 98%);
	/* #FAFAFA - Grigio chiaro */
	--clr-neutral-300: hsl(0, 0%, 90%);
	--clr-neutral-900: hsl(0, 0%, 10%);

	/* Typography */
	--ff-primary: 'Lato', sans-serif;
	--ff-heading: 'Playfair Display', serif;

	--fw-regular: 400;
	--fw-medium: 500;
	--fw-bold: 700;

	--fs-300: 0.875rem;
	--fs-400: 1rem;
	/* 16px - base */
	--fs-500: 1.25rem;
	--fs-600: 1.5rem;
	--fs-700: 2rem;
	--fs-800: 2.5rem;
	--fs-900: 3rem;

	/* Spacing */
	--space-xs: 0.5rem;
	--space-sm: 1rem;
	--space-md: 2rem;
	--space-lg: 3rem;
	--space-xl: 4rem;

	/* Other */
	--radius-sm: 0.25rem;
	--radius-md: 0.5rem;
	--radius-lg: 1rem;
	--shadow-sm: 0 2px 4px hsla(0, 0%, 0%, 0.05);
	--shadow-md: 0 4px 8px hsla(0, 0%, 0%, 0.1);
	--transition: 300ms ease-in-out;
	--container-width: 1200px;
	--header-height: 80px;
}

/* CSS Reset */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
}

body {
	min-height: 100vh;
	text-rendering: optimizeSpeed;
	line-height: 1.6;
	font-family: var(--ff-primary);
	font-size: var(--fs-400);
	color: var(--clr-neutral-900);
	background-color: var(--clr-neutral-100);
}

img {
	max-width: 100%;
	display: block;
}

input,
button,
textarea,
select {
	font: inherit;
}

button {
	cursor: pointer;
}

ul {
	list-style: none;
}

a {
	text-decoration: none;
	color: inherit;
}

/* Base Styles */
h1,
h2,
h3,
h4 {
	font-family: var(--ff-heading);
	font-weight: var(--fw-bold);
	line-height: 1.2;
}

h1 {
	font-size: var(--fs-900);
	margin-bottom: var(--space-md);
}

h2 {
	font-size: var(--fs-800);
	margin-bottom: var(--space-sm);
}

h3 {
	font-size: var(--fs-600);
	margin-bottom: var(--space-sm);
}

h4 {
	font-size: var(--fs-500);
	margin-bottom: var(--space-xs);
}

p {
	margin-bottom: var(--space-sm);
	max-width: 70ch;
}

section {
	padding: var(--space-xl) var(--space-md);
}

/* Helper Classes */
.container {
	width: 100%;
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 var(--space-md);
}

.text-center {
	text-align: center;
}

.section-title {
	text-align: center;
	margin-bottom: var(--space-lg);
}

.section-title h2 {
	margin-bottom: var(--space-xs);
}

.section-title p {
	font-size: var(--fs-500);
	margin: 0 auto;
}

.btn {
	display: inline-block;
	padding: var(--space-xs) var(--space-md);
	border-radius: var(--radius-md);
	font-weight: var(--fw-medium);
	text-align: center;
	transition: var(--transition);
	border: none;
}

.btn-primary {
	background-color: var(--clr-primary-500);
	color: var(--clr-neutral-100);
}

.btn-primary:hover {
	background-color: var(--clr-primary-700);
}

.btn-outline {
	background-color: transparent;
	border: 2px solid var(--clr-primary-500);
	color: var(--clr-primary-500);
}

.btn-outline:hover {
	background-color: var(--clr-primary-200);
}

.card {
	background-color: var(--clr-neutral-100);
	border-radius: var(--radius-md);
	padding: var(--space-md);
	box-shadow: var(--shadow-sm);
	transition: var(--transition);
}

.card:hover {
	box-shadow: var(--shadow-md);
	transform: translateY(-5px);
}

.flex {
	display: flex;
}

.grid {
	display: grid;
	gap: var(--space-md);
}

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

.grid-4-cols {
	grid-template-columns: repeat(4, 1fr);
}

/* Component Styles */
/* Header */
.header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: var(--header-height);
	z-index: 100;
	transition: var(--transition);
	background-color: transparent;
}

.header.scrolled {
	background-color: var(--clr-neutral-100);
	box-shadow: var(--shadow-sm);
}

.navbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 100%;
}

.logo {
	font-family: var(--ff-heading);
	font-weight: var(--fw-bold);
	font-size: var(--fs-500);
	color: var(--clr-neutral-100);
	transition: var(--transition);
}

.header.scrolled .logo {
	color: var(--clr-neutral-900);
}

.logo-sub {
	font-size: var(--fs-300);
	font-weight: var(--fw-regular);
	display: block;
	color: var(--clr-neutral-100);
	opacity: 0.9;
}

.header.scrolled .logo-sub {
	color: var(--clr-neutral-900);
}

.nav-links {
	display: flex;
	gap: var(--space-md);
}

.nav-links a {
	color: var(--clr-neutral-100);
	font-weight: var(--fw-medium);
	position: relative;
	transition: var(--transition);
}

.header.scrolled .nav-links a {
	color: var(--clr-neutral-900);
}

.nav-links a::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: -5px;
	width: 0;
	height: 2px;
	background-color: var(--clr-secondary-500);
	transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
	width: 100%;
}

.cta-header {
	color: var(--clr-neutral-100);
	border: 2px solid var(--clr-neutral-100);
	border-radius: var(--radius-md);
	padding: var(--space-xs) var(--space-md);
	font-weight: var(--fw-medium);
	transition: var(--transition);
}

.header.scrolled .cta-header {
	color: var(--clr-primary-500);
	border-color: var(--clr-primary-500);
}

.cta-header:hover {
	background-color: var(--clr-neutral-100);
	color: var(--clr-primary-500);
}

.header.scrolled .cta-header:hover {
	background-color: var(--clr-primary-500);
	color: var(--clr-neutral-100);
}

.mobile-menu-btn {
	display: none;
	background: none;
	border: none;
	color: var(--clr-neutral-100);
	font-size: var(--fs-700);
}

.header.scrolled .mobile-menu-btn {
	color: var(--clr-neutral-900);
}

/* Hero Section */
.hero {
	height: 100vh;
	min-height: 600px;
	background-size: cover;
	background-position: center;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding-top: var(--header-height);
}

.hero::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: hsla(0, 0%, 0%, 0.4);
	z-index: 1;
}

.hero-content {
	position: relative;
	z-index: 2;
	color: var(--clr-neutral-100);
	max-width: 800px;
	padding: 0 var(--space-md);
}

.hero p {
	font-size: var(--fs-500);
	margin-bottom: var(--space-lg);
	margin-left: auto;
	margin-right: auto;
}

/* Services Section */
.services {
	background-color: var(--clr-neutral-100);
}

.service-card {
	text-align: center;
	height: 100%;
}

.service-icon {
	font-size: 3rem;
	color: var(--clr-secondary-500);
	margin-bottom: var(--space-sm);
}

.service-title {
	font-family: var(--ff-heading);
	margin-bottom: var(--space-xs);
}

.services-cta {
	text-align: center;
	margin-top: var(--space-lg);
}

/* About Section */
.about {
	background-color: var(--clr-neutral-200);
}

.about-img {
	border-radius: var(--radius-md);
	overflow: hidden;
	height: 100%;
}

.about-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.about-content {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.about-title {
	position: relative;
	margin-bottom: var(--space-md);
}

.about-title::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: -10px;
	width: 80px;
	height: 3px;
	background-color: var(--clr-primary-500);
}

.about-cta {
	margin-top: var(--space-md);
}

/* Approach Section */
.approach {
	background-color: var(--clr-neutral-100);
}

.timeline {
	margin-top: var(--space-lg);
}

.timeline-item {
	display: flex;
	margin-bottom: var(--space-md);
}

.timeline-icon {
	flex: 0 0 50px;
	height: 50px;
	border-radius: 50%;
	background-color: var(--clr-primary-200);
	color: var(--clr-primary-700);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	margin-right: var(--space-md);
}

.timeline-content {
	flex: 1;
}

.testimonial {
	background-color: var(--clr-neutral-200);
	border-radius: var(--radius-md);
	padding: var(--space-md);
	margin-top: var(--space-lg);
	position: relative;
}

.testimonial::before {
	content: '"';
	position: absolute;
	top: -20px;
	left: 20px;
	font-size: 4rem;
	font-family: var(--ff-heading);
	color: var(--clr-secondary-500);
	line-height: 1;
}

.testimonial-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: var(--space-md) 0;
}

.testimonial-avatar {
	width: 70px;
	height: 70px;
	border-radius: 50%;
	overflow: hidden;
	margin-bottom: var(--space-sm);
	border: 3px solid var(--clr-secondary-500);
	box-shadow: 0 2px 8px hsla(0, 0%, 0%, 0.08);
}

.testimonial-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
	display: block;
}

.testimonial-content {
	font-style: italic;
	margin-bottom: var(--space-xs);
}

.testimonial-author {
	font-weight: var(--fw-medium);
	text-align: right;
}

/* Swiper custom styles */
.testimonial-swiper {
	width: 100%;
	padding-bottom: 40px;
}

.swiper-pagination {
	margin-top: var(--space-sm);
}

.swiper-button-next,
.swiper-button-prev {
	color: var(--clr-secondary-500);
}

@media (max-width: 576px) {
	.testimonial-avatar {
		width: 50px;
		height: 50px;
	}
}

/* Contact Section */
.contact {
	background-color: var(--clr-neutral-200);
}

.contact-info {
	margin-bottom: var(--space-md);
}

.contact-item {
	display: flex;
	align-items: center;
	margin-bottom: var(--space-sm);
}

.contact-icon {
	margin-right: var(--space-sm);
	color: var(--clr-primary-500);
	font-size: var(--fs-600);
}

.contact-form {
	display: grid;
	gap: var(--space-sm);
}

.form-group {
	display: flex;
	flex-direction: column;
}

.form-group label {
	margin-bottom: var(--space-xs);
	font-weight: var(--fw-medium);
}

.form-control {
	padding: var(--space-xs) var(--space-sm);
	border: 1px solid var(--clr-neutral-300);
	border-radius: var(--radius-sm);
	transition: var(--transition);
}

.form-control:focus {
	outline: none;
	border-color: var(--clr-primary-500);
	box-shadow: 0 0 0 2px var(--clr-primary-200);
}

textarea.form-control {
	min-height: 150px;
	resize: vertical;
}

.form-note {
	font-size: var(--fs-300);
	margin-top: var(--space-sm);
}

.map-container {
	height: 100%;
	min-height: 300px;
	border-radius: var(--radius-md);
	overflow: hidden;
}

/* Footer */
.footer {
	background-color: var(--clr-dark-900);
	color: var(--clr-neutral-100);
	padding: var(--space-lg) 0;
	position: relative;
}

.footer::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 3px;
	background-color: var(--clr-secondary-500);
}

.footer-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.footer-links {
	display: flex;
	gap: var(--space-md);
}

.social-links {
	display: flex;
	gap: var(--space-sm);
}

.social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: hsla(0, 0%, 100%, 0.1);
	transition: var(--transition);
}

.social-link:hover {
	background-color: hsla(0, 0%, 100%, 0.2);
}

/* Responsive Design */
@media (max-width: 992px) {
	:root {
		--fs-900: 2.5rem;
		--fs-800: 2rem;
		--fs-700: 1.75rem;
	}

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

	.mobile-menu-btn {
		display: block;
	}

	.nav-links {
		position: fixed;
		top: var(--header-height);
		left: 0;
		width: 100%;
		background-color: var(--clr-neutral-100);
		flex-direction: column;
		align-items: center;
		padding: var(--space-md) 0;
		transform: translateY(-100%);
		opacity: 0;
		visibility: hidden;
		transition: var(--transition);
		box-shadow: var(--shadow-md);
	}

	.nav-links.active {
		transform: translateY(0);
		opacity: 1;
		visibility: visible;
	}

	.nav-links a {
		color: var(--clr-neutral-900);
	}

	.cta-header {
		display: none;
	}

	.about .grid-2-cols,
	.contact .grid-2-cols {
		grid-template-columns: 1fr;
		gap: var(--space-lg);
	}

	.about-img {
		max-height: 400px;
	}

	.footer-content {
		flex-direction: column;
		gap: var(--space-md);
		text-align: center;
	}
}

@media (max-width: 576px) {
	:root {
		--space-md: 1.5rem;
		--space-lg: 2rem;
		--space-xl: 3rem;
		--fs-800: 1.75rem;
		--fs-700: 1.5rem;
		--fs-600: 1.25rem;
	}

	.grid-2-cols,
	.grid-4-cols {
		grid-template-columns: 1fr;
	}

	.hero {
		min-height: 500px;
	}

	.service-card {
		max-width: 400px;
		margin: 0 auto;
	}

	.footer-links {
		flex-direction: column;
		gap: var(--space-sm);
	}
}