/* style.css */

/* -------------------------------------------------------------------------- */
/*                               Custom Properties                            */
/* -------------------------------------------------------------------------- */
:root {
	/* Colors (HSL/HSLA) */
	--color-primary-hsl: 145, 63%, 42%;
	/* Verde principale */
	--color-primary: hsl(var(--color-primary-hsl));
	--color-primary-light: hsla(var(--color-primary-hsl), 0.8);
	--color-primary-dark: hsl(145, 63%, 35%);

	--color-accent-hsl: 30, 100%, 65%;
	/* Arancio/Pesca per accenti */
	--color-accent: hsl(var(--color-accent-hsl));
	--color-accent-dark: hsl(30, 100%, 55%);

	--color-text-hsl: 210, 10%, 23%;
	/* Grigio scuro/Blu per testo */
	--color-text: hsl(var(--color-text-hsl));
	--color-headings-hsl: 210, 15%, 15%;
	/* Più scuro per titoli */
	--color-headings: hsl(var(--color-headings-hsl));
	--color-text-light: hsl(0, 0%, 98%);
	/* Per sfondi scuri */
	--color-text-muted: hsl(210, 10%, 50%);

	--color-background: hsl(0, 0%, 100%);
	/* Bianco */
	--color-background-alt: hsl(0, 0%, 96%);
	/* Grigio chiaro */
	--color-background-hero: hsl(145, 20%, 90%);
	/* Sfondo hero leggermente colorato */
	--color-footer-bg: hsl(210, 10%, 18%);
	--color-border: hsl(0, 0%, 85%);

	/* Fonts */
	--font-primary: 'Poppins', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	/* Titoli */
	--font-secondary: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	/* Corpo testo */

	/* Dimensions & Spacing */
	--spacing-xs: 0.25rem;
	/* 4px */
	--spacing-s: 0.5rem;
	/* 8px */
	--spacing-m: 1rem;
	/* 16px */
	--spacing-l: 1.5rem;
	/* 24px */
	--spacing-xl: 3rem;
	/* 48px */
	--spacing-xxl: 5rem;
	/* 80px */

	--border-radius-small: 3px;
	--border-radius-medium: 6px;
	--border-radius-large: 10px;

	/* Layout Widths */
	--width-content: 900px;
	--width-wide: 1200px;

	/* Header */
	--header-height: 70px;

	/* Shadows */
	--box-shadow-light: 0 2px 8px hsla(0, 0%, 0%, 0.1);
	--box-shadow-medium: 0 4px 12px hsla(0, 0%, 0%, 0.15);

	/* Transitions */
	--transition-fast: 0.2s ease-in-out;
	--transition-medium: 0.3s ease-in-out;
}

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

html {
	scroll-behavior: smooth;
	font-size: 100%;
	/* Typically 16px */
}

body {
	font-family: var(--font-secondary);
	line-height: 1.65;
	color: var(--color-text);
	background-color: var(--color-background);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-primary);
	color: var(--color-headings);
	line-height: 1.2;
	margin-bottom: var(--spacing-m);
	font-weight: 600;
}

h1 {
	font-size: 2.5rem;
}

/* 40px */
h2 {
	font-size: 2rem;
}

/* 32px */
h3 {
	font-size: 1.5rem;
}

/* 24px */
h4 {
	font-size: 1.25rem;
}

/* 20px */

p {
	margin-bottom: var(--spacing-m);
}

a {
	color: var(--color-primary);
	text-decoration: none;
	transition: color var(--transition-fast);
}

a:hover,
a:focus {
	color: var(--color-primary-dark);
	text-decoration: underline;
}

ul,
ol {
	list-style-position: inside;
	margin-bottom: var(--spacing-m);
	padding-left: var(--spacing-s);
	/* Adjusted for better visual */
}

/* -------------------------------------------------------------------------- */
/*                                Base Styles                                 */
/* -------------------------------------------------------------------------- */
section {
	padding: var(--spacing-xxl) var(--spacing-m);
}

section:nth-child(even) {
	background-color: var(--color-background-alt);
}

.section-title {
	text-align: center;
	margin-bottom: var(--spacing-xl);
	font-weight: 700;
}

/* -------------------------------------------------------------------------- */
/*                              Helper Classes                                */
/* -------------------------------------------------------------------------- */
.container {
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--spacing-m);
	padding-right: var(--spacing-m);
}

.container--content {
	max-width: var(--width-content);
}

.container--wide {
	max-width: var(--width-wide);
}

.container--full {
	max-width: 100%;
}

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

.text-primary {
	color: var(--color-primary);
}

.text-accent {
	color: var(--color-accent);
}

.mb-0 {
	margin-bottom: 0 !important;
}

.mb-s {
	margin-bottom: var(--spacing-s) !important;
}

.mb-m {
	margin-bottom: var(--spacing-m) !important;
}

.mb-l {
	margin-bottom: var(--spacing-l) !important;
}

.mb-xl {
	margin-bottom: var(--spacing-xl) !important;
}

.mt-s {
	margin-top: var(--spacing-s) !important;
}

.mt-m {
	margin-top: var(--spacing-m) !important;
}

.mt-l {
	margin-top: var(--spacing-l) !important;
}

.mt-xl {
	margin-top: var(--spacing-xl) !important;
}

.d-grid {
	display: grid;
	gap: var(--spacing-l);
}

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

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

.d-flex {
	display: flex;
}

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

.justify-content-between {
	justify-content: space-between;
}

.justify-content-center {
	justify-content: center;
}

.gap-m {
	gap: var(--spacing-m);
}

.gap-l {
	gap: var(--spacing-l);
}

/* -------------------------------------------------------------------------- */
/*                             Component Styles                               */
/* -------------------------------------------------------------------------- */
/* Buttons */
.btn {
	display: inline-block;
	padding: var(--spacing-s) var(--spacing-l);
	font-family: var(--font-primary);
	font-weight: 600;
	text-decoration: none;
	border-radius: var(--border-radius-medium);
	cursor: pointer;
	transition: background-color var(--transition-medium), color var(--transition-medium), border-color var(--transition-medium);
	border: 2px solid transparent;
	text-align: center;
}

.btn--primary {
	background-color: var(--color-primary);
	color: var(--color-text-light);
	border-color: var(--color-primary);
}

.btn--primary:hover,
.btn--primary:focus {
	background-color: var(--color-primary-dark);
	border-color: var(--color-primary-dark);
	color: var(--color-text-light);
	text-decoration: none;
}

.btn--accent {
	background-color: var(--color-accent);
	color: var(--color-text);
	/* Ensure contrast on accent */
	border-color: var(--color-accent);
}

.btn--accent:hover,
.btn--accent:focus {
	background-color: var(--color-accent-dark);
	border-color: var(--color-accent-dark);
	color: var(--color-text);
	text-decoration: none;
}

.btn--outline {
	background-color: transparent;
	color: var(--color-primary);
	border-color: var(--color-primary);
}

.btn--outline:hover,
.btn--outline:focus {
	background-color: var(--color-primary);
	color: var(--color-text-light);
	text-decoration: none;
}

/* Forms */
.form-group {
	margin-bottom: var(--spacing-m);
}

.form-group label {
	display: block;
	margin-bottom: var(--spacing-s);
	font-weight: 600;
	color: var(--color-headings);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
	width: 100%;
	padding: var(--spacing-s);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius-small);
	background-color: var(--color-background);
	color: var(--color-text);
	transition: border-color var(--transition-fast);
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group textarea:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 2px hsla(var(--color-primary-hsl), 0.3);
}

.form-group textarea {
	min-height: 120px;
	resize: vertical;
}

/* Cards */
.card {
	background-color: var(--color-background);
	border-radius: var(--border-radius-medium);
	box-shadow: var(--box-shadow-light);
	padding: var(--spacing-l);
	transition: box-shadow var(--transition-medium);
	height: 100%;
	/* For equal height cards in a grid */
}

.card:hover {
	box-shadow: var(--box-shadow-medium);
}

.card__title {
	margin-top: 0;
	color: var(--color-primary);
}

.card__icon {
	font-size: 2.5rem;
	color: var(--color-primary);
	margin-bottom: var(--spacing-m);
}

/* Tables */
.table-comparative {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: var(--spacing-l);
	box-shadow: var(--box-shadow-light);
}

.table-comparative th,
.table-comparative td {
	padding: var(--spacing-m);
	text-align: left;
	border-bottom: 1px solid var(--color-border);
}

.table-comparative th {
	background-color: var(--color-primary-light);
	color: white;
	font-weight: 600;
}

.table-comparative tbody tr:nth-child(even) {
	background-color: hsl(0, 0%, 98%);
}

.table-comparative tbody tr:hover {
	background-color: hsl(0, 0%, 94%);
}

.table-comparative td .fa-check {
	color: green;
}

.table-comparative td .fa-times {
	color: red;
}

/* Details (for FAQ) */
details {
	background-color: var(--color-background);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius-small);
	margin-bottom: var(--spacing-s);
}

details summary {
	padding: var(--spacing-m);
	font-weight: 600;
	cursor: pointer;
	color: var(--color-headings);
	list-style: none;
	/* Remove default marker */
	display: flex;
	justify-content: space-between;
	align-items: center;
}

details summary::-webkit-details-marker {
	display: none;
}

/* Chrome/Safari */

details summary::after {
	content: "\f063";
	/* Font Awesome down arrow */
	font-family: 'Font Awesome 5 Free';
	font-weight: 900;
	transition: transform var(--transition-fast);
}

details[open] summary::after {
	transform: rotate(180deg);
}

details div {
	/* Content wrapper */
	padding: 0 var(--spacing-m) var(--spacing-m) var(--spacing-m);
	border-top: 1px solid var(--color-border);
}

/* Header */
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: var(--header-height);
	background-color: hsla(0, 0%, 100%, 0.95);
	box-shadow: var(--box-shadow-light);
	z-index: 1000;
	display: flex;
	align-items: center;
}

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

.site-header__logo {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--color-primary);
	text-decoration: none;
}

.site-header__logo:hover {
	text-decoration: none;
	color: var(--color-primary-dark);
}

.site-nav__list {
	display: flex;
	list-style: none;
	padding: 0;
	margin: 0;
}

.site-nav__item {
	margin-left: var(--spacing-l);
}

.site-nav__link {
	text-decoration: none;
	color: var(--color-text);
	font-weight: 500;
	padding: var(--spacing-s) 0;
	position: relative;
}

.site-nav__link::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 2px;
	background-color: var(--color-primary);
	transition: width var(--transition-medium);
}

.site-nav__link:hover::after,
.site-nav__link.active::after {
	width: 100%;
}

.site-nav__link:hover,
.site-nav__link.active {
	color: var(--color-primary);
	text-decoration: none;
}

.nav-toggle {
	display: none;
	/* Hidden on desktop */
	background: none;
	border: none;
	font-size: 1.5rem;
	color: var(--color-primary);
	cursor: pointer;
}

/* Footer */
.site-footer {
	background-color: var(--color-footer-bg);
	color: var(--color-text-light);
	padding: var(--spacing-xl) var(--spacing-m);
}

.site-footer a {
	color: var(--color-text-light);
	opacity: 0.8;
}

.site-footer a:hover,
.site-footer a:focus {
	color: var(--color-text-light);
	opacity: 1;
	text-decoration: underline;
}

.footer-grid {
	display: grid;
	gap: var(--spacing-l);
}

.footer-grid h4 {
	color: var(--color-text-light);
	margin-bottom: var(--spacing-s);
	font-size: 1.1rem;
}

.footer-grid ul {
	list-style: none;
	padding: 0;
}

.footer-grid ul li {
	margin-bottom: var(--spacing-xs);
}

.social-icons {
	display: flex;
	gap: var(--spacing-m);
	margin-top: var(--spacing-s);
}

.social-icons a {
	font-size: 1.5rem;
}

.footer-bottom {
	margin-top: var(--spacing-xl);
	padding-top: var(--spacing-l);
	border-top: 1px solid hsla(0, 0%, 100%, 0.2);
	text-align: center;
	font-size: 0.9rem;
	opacity: 0.7;
}

.footer-bottom p {
	margin-bottom: 0;
}

.newsletter-form input[type="email"] {
	background-color: hsla(0, 0%, 100%, 0.1);
	border-color: hsla(0, 0%, 100%, 0.3);
	color: var(--color-text-light);
	margin-right: var(--spacing-s);
	padding-inline: .5rem;
}

.newsletter-form input[type="email"]::placeholder {
	color: hsla(0, 0%, 100%, 0.5);
}


/* -------------------------------------------------------------------------- */
/*                          Section-Specific Styles                           */
/* -------------------------------------------------------------------------- */
/* Hero Section */
#hero {
	/* background-color: var(--color-background-hero); Light green tint */
	background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('img/hero.jpg');
	padding-top: calc(var(--header-height) + var(--spacing-xxl));
	/* Account for fixed header */
	min-height: 70vh;
	display: flex;
	align-items: center;
	text-align: center;
}

#hero .container {
	max-width: 800px;
	/* Content width specific for hero text */
}

#hero h1 {
	font-size: 3rem;
	/* Larger for hero */
	font-weight: 700;
	color: var(--color-primary-light);
	margin-bottom: var(--spacing-m);
}

#hero .subtitle {
	font-size: 1.25rem;
	color: #fff;
	margin-bottom: var(--spacing-l);
	line-height: 1.7;
}

/* Chi Sono Section */
#chi-sono .chi-sono-content {
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: var(--spacing-xl);
	align-items: center;
}

#chi-sono .chi-sono-image img {
	border-radius: var(--border-radius-large);
	box-shadow: var(--box-shadow-medium);
	max-width: 300px;
	/* Control image size */
	margin: 0 auto;
}

/* Servizi Section */
#servizi .card__icon {
	display: block;
	/* Center icon if alone */
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

/* Testimonianze Section */
#testimonianze {
	position: relative;
	overflow: hidden;
	/* For Swiper navigation outside */
}

.testimonial-card {
	background-color: var(--color-background);
	padding: var(--spacing-l);
	border-radius: var(--border-radius-medium);
	box-shadow: var(--box-shadow-light);
	text-align: center;
}

.testimonial-card img {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	margin: 0 auto var(--spacing-m);
	object-fit: cover;
}

.testimonial-card blockquote {
	margin-bottom: var(--spacing-m);
	font-style: italic;
	color: var(--color-text-muted);
}

.testimonial-card blockquote p {
	margin-bottom: 0;
}

.testimonial-card cite {
	font-weight: 600;
	color: var(--color-primary);
	display: block;
}

.star-rating .fas,
.star-rating .far {
	color: #FFD700;
	/* Gold color for stars */
	margin: 0 var(--spacing-xs);
}

/* Swiper specific */
.swiper-container {
	padding-bottom: var(--spacing-xl);
	/* Space for pagination */
}

.swiper-pagination-bullet {
	background-color: var(--color-primary);
	opacity: 0.5;
}

.swiper-pagination-bullet-active {
	opacity: 1;
}

.swiper-button-next,
.swiper-button-prev {
	color: var(--color-primary);
	transition: opacity var(--transition-fast);
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
	opacity: 0.7;
}


/* Ricette & Risorse */
.resource-download,
.recipe-preview {
	text-align: center;
	margin-bottom: var(--spacing-l);
}

.recipe-card {
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius-medium);
	overflow: hidden;
	text-align: left;
}

.recipe-card img {
	width: 100%;
	height: 200px;
	object-fit: cover;
}

.recipe-card-content {
	padding: var(--spacing-m);
}

.recipe-card-content h4 {
	margin-top: 0;
	color: var(--color-headings);
}

/* Eventi & Workshop */
.event-item {
	border-left: 4px solid var(--color-primary);
	padding-left: var(--spacing-m);
	margin-bottom: var(--spacing-l);
}

.event-item h4 {
	color: var(--color-primary);
}

/* Contatti & Prenotazioni */
#contatti .contact-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--spacing-xl);
}

#contatti .contact-info p {
	margin-bottom: var(--spacing-s);
}

#contatti .contact-info i {
	margin-right: var(--spacing-s);
	color: var(--color-primary);
	width: 20px;
	/* Align icons */
	text-align: center;
}

.map-placeholder {
	width: 100%;
	height: 300px;
	background-color: var(--color-background-alt);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius-medium);
	display: flex;
	justify-content: center;
	align-items: center;
	color: var(--color-text-muted);
}

/* Footer Logos */
.footer-logos {
	display: flex;
	gap: var(--spacing-m);
	align-items: center;
	flex-wrap: wrap;
	/* In case of many logos */
}

.footer-logos img {
	max-height: 30px;
	/* Adjust as needed */
	opacity: 0.8;
	transition: opacity var(--transition-fast);
}

.footer-logos img:hover {
	opacity: 1;
}


/* -------------------------------------------------------------------------- */
/*                             Responsive Design                              */
/* -------------------------------------------------------------------------- */

/* Tablet (max-width: 992px) */
@media (max-width: 992px) {
	h1 {
		font-size: 2.2rem;
	}

	h2 {
		font-size: 1.8rem;
	}

	h3 {
		font-size: 1.3rem;
	}

	section {
		padding: var(--spacing-xl) var(--spacing-m);
	}

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

	#chi-sono .chi-sono-content {
		grid-template-columns: 1fr;
		text-align: center;
	}

	#chi-sono .chi-sono-image img {
		margin-bottom: var(--spacing-l);
	}

	#contatti .contact-grid {
		grid-template-columns: 1fr;
	}

	.site-header {
		position: static;
	}

	.site-header__nav {
		position: fixed;
		top: var(--header-height);
		left: 0;
		width: 100vw;
		background-color: var(--color-background);
		flex-direction: column;
		align-items: center;
		padding: var(--spacing-l) 0;
		box-shadow: var(--box-shadow-light);
		transform: translateY(-150%);
		/* Start off-screen */
		transition: transform var(--transition-medium);
		z-index: 999;
		/* Below header but above content */
	}

	.site-header__nav.nav-active {
		transform: translateY(0);
	}

	.site-nav__list {
		flex-direction: column;
		align-items: center;
	}

	.site-nav__item {
		margin-left: 0;
		margin-bottom: var(--spacing-m);
		display: inline-block;
	}

	.site-nav__link {
		font-size: 1.1rem;
	}

	.nav-toggle {
		display: block;
	}

	.footer-grid {
		grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	}

	.footer-logos {
		flex-direction: column;
	}

}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
	:root {
		--header-height: 60px;
	}

	h1 {
		font-size: 2rem;
	}

	#hero h1 {
		font-size: 2.5rem;
	}

	#hero .subtitle {
		font-size: 1.1rem;
	}

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

	.table-comparative th,
	.table-comparative td {
		padding: var(--spacing-s);
		font-size: 0.9rem;
	}

	/* Simple responsive table: display block for rows/cells if complex */
	.table-comparative thead {
		display: none;
		/* Hide table header on small screens */
	}

	.table-comparative tr {
		display: block;
		margin-bottom: var(--spacing-m);
		border: 1px solid var(--color-border);
		border-radius: var(--border-radius-small);
	}

	.table-comparative td {
		display: block;
		text-align: right;
		/* Align value to the right */
		border-bottom: 1px dotted var(--color-border);
		/* Dotted for inner cells */
		position: relative;
		padding-left: 50%;
		/* Make space for the label */
	}

	.table-comparative td:last-child {
		border-bottom: none;
	}

	.table-comparative td::before {
		content: attr(data-label);
		/* Use data-label from HTML */
		position: absolute;
		left: var(--spacing-s);
		width: calc(50% - var(--spacing-m));
		/* Calculate label width */
		text-align: left;
		font-weight: bold;
		color: var(--color-primary);
	}

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

	.newsletter-form input[type="email"] {
		margin-right: 0;
		margin-bottom: var(--spacing-s);
	}
}