:root {
  --primary: #FF4D00;
  --secondary: #0095FF;
  --text: #000000;
  --text-light: #666666;
  --background: #FFFFFF;
  --background-gray: #F5F7FA;
  --border: #E2E8F0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  line-height: 1.5;
  color: var(--text);
  background-color: var(--background);
  /* Fix per problemi di scroll su mobile */
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* HEADER */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--background);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  padding: 1rem 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo svg {
  width: 48px;
  height: 48px;
}

.nav-desktop {
  display: none;
}

.nav-desktop ul {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--text);
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--primary);
  transition: width 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.btn {
  display: inline-block;
  background-color: var(--primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: var(--secondary);
}

.mobile-menu-btn {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  padding: 1rem;
  background-color: var(--background);
}

.mobile-menu.open {
  display: block;
}

.mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.mobile-menu li {
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
}

.mobile-menu .btn {
  width: 100%;
  text-align: center;
}

/* HERO SECTION */
.hero {
  position: relative;
  height: 100vh;
  color: white;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 1rem;
}

.hero-title {
  font-size: 9vw;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 0, 5rem;
  line-height: 1;
  text-shadow: 0px 4px 5px rgba(0, 0, 0, 0.15);
}

.hero-subtitle {
  font-size: 3.7vw;
  font-weight: 500;
  white-space: nowrap;
  text-shadow: 0px 4px 5px rgba(0, 0, 0, 0.15);
}

/* SECTIONS */
.section {
  padding: 4rem 0;
}

.section-bg-gray {
  background-color: var(--background-gray);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  max-width: 30rem;
  margin: 0 auto 3rem;
  color: var(--text-light);
}

/* AZIENDA SECTION */
.azienda-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.azienda-content h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.azienda-content p {
  margin-bottom: 1.5rem;
}

.azienda-image img {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* PRODUCTS SECTION */
.products-container {
  position: relative;
  padding-bottom: 1.5rem;
}

/* Simple Navigation Arrows - positioned next to dots */
.carousel-nav-simple {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-nav-simple:hover {
  color: var(--primary);
}

.carousel-nav-simple:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.carousel-nav-simple svg {
  width: 1.5rem;
  height: 1.5rem;
}

.products-carousel {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 1.6rem;
  padding: 0.7rem;
  cursor: grab;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* Miglioramenti per mobile */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.products-carousel::-webkit-scrollbar {
  display: none;
}

.product-card {
  flex: 0 0 100%;
  scroll-snap-align: start;
  background-color: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  min-height: 29rem;
  /* Altezza fissa aumentata per uniformare le card */
  display: flex;
  flex-direction: column;
}

.product-card-prodotti {
  flex: 0 0 100%;
  scroll-snap-align: start;
  background-color: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  min-height: 35rem;
  /* Altezza fissa aumentata per uniformare le card */
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: 0 6px 8px rgb(0, 0, 0, 0.15) !important;
}

.product-image {
  height: 16rem;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.1);
}

.product-content {
  padding: 1.5rem;
  flex: 1;
  /* Occupa tutto lo spazio disponibile */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  /* Separa visivamente il contenuto dal link */
}

.product-text-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.product-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.product-badge {
  background-color: #EAB308;
  color: black;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
}

.product-description {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.product-link {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.product-link:hover {
  text-decoration: underline;
}

.product-link svg {
  margin-left: 0.25rem;
  width: 1rem;
  height: 1rem;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0rem;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.carousel-dot {
  width: 0.75rem;
  height: 0.75rem;
  background-color: #D1D5DB;
  border-radius: 9999px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.carousel-dot.active {
  width: 1.5rem;
  background-color: var(--primary);
}

/* PRODUCTS PAGE STYLES */
.section-header {
  padding: 8rem 0 4rem;
  background-color: var(--background-gray);
  text-align: center;
}

/* Search Bar */
.search-container {
  max-width: 600px;
  margin: 3rem auto 0;
}

.search-bar {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 1rem 3rem 1rem 1rem;
  border: 2px solid var(--border);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 77, 0, 0.1);
}

.search-button {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.25rem;
  transition: color 0.3s;
}

.search-button:hover {
  color: var(--primary);
}

/* Categories Navigation */
.categories-nav-section {
  padding: 2rem 0;
  background-color: white;
  border-bottom: 1px solid var(--border);
}

.categories-nav {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.categories-nav::-webkit-scrollbar {
  display: none;
}

.category-nav-btn {
  background-color: transparent;
  border: 2px solid var(--border);
  color: var(--text);
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
  flex-shrink: 0;
}

.category-nav-btn:hover,
.category-nav-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Products Grid */
.products-grid-section {
  padding: 4rem 0;
}

.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.product-item {
  transition: opacity 0.3s, transform 0.3s;
}

.product-item.hidden {
  display: none;
}

.product-image {
  height: 16rem;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.product-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}

.product-code {
  background-color: var(--background-gray);
  color: var(--text-light);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  flex-shrink: 0;
  margin-left: 1rem;
}

.product-description {
  color: var(--text-light);
  margin-bottom: 1rem;
  flex-grow: 1;
}

.product-features {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.feature-tag {
  background-color: #EFF6FF;
  color: #1D4ED8;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.product-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  margin-top: auto;
  transition: color 0.3s;
}

.product-link:hover {
  color: rgba(255, 77, 0, 0.8);
}

.product-link svg {
  margin-left: 0.5rem;
  width: 1rem;
  height: 1rem;
  transition: transform 0.3s;
}

.product-link:hover svg {
  transform: translateX(2px);
}

/* No Results */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-light);
}

.no-results h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

/* Breadcrumb */
.breadcrumb-section {
  padding: 1rem 0;
  background-color: var(--background-gray);
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s;
}

.breadcrumb a:hover {
  color: rgba(255, 77, 0, 0.8);
}

.breadcrumb span {
  color: var(--text-light);
}

/* Category Pages */
.category-products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.category-product-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  background-color: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgb(0, 0, 0, 0.1);
  padding: 2rem;
}

.category-product-image img {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

.category-product-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.category-product-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
}

.category-product-code {
  background-color: var(--primary);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  flex-shrink: 0;
  margin-left: 1rem;
}

.category-product-description {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.category-product-specs {
  margin-bottom: 2rem;
}

.category-product-specs h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary);
}

.category-product-specs ul {
  list-style: none;
  padding: 0;
}

.category-product-specs li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #F3F4F6;
}

.category-product-specs li:last-child {
  border-bottom: none;
}

/* Legal Pages */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

.legal-section {
  margin-bottom: 3rem;
}

.legal-section h2 {
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 0.5rem;
}

.legal-section h3 {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.5rem 0 1rem 0;
}

.legal-section p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.legal-section ul {
  color: var(--text-light);
  margin: 1rem 0 1rem 2rem;
}

.legal-section li {
  margin-bottom: 0.5rem;
}

.legal-section strong {
  color: var(--text);
  font-weight: 600;
}

.legal-section a {
  color: var(--primary);
  text-decoration: underline;
}

.legal-section a:hover {
  color: rgba(255, 77, 0, 0.8);
}

.legal-footer {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #E5E7EB;
}

.legal-footer p {
  color: var(--text-light);
  font-style: italic;
}

.category-product-specs strong {
  color: var(--text);
  margin-right: 0.5rem;
}

.category-product-features {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.category-product-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-block;
}

.btn-secondary:hover {
  background-color: var(--primary);
  color: white;
}

.categories-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.category-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  background-color: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.category-card:hover {
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}

.category-image {
  height: 12rem;
  overflow: hidden;
}

.category-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-card:hover .category-image img {
  transform: scale(1.05);
}

.category-title {
  padding: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
}

.product-detail-section {
  scroll-margin-top: 5rem;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.product-detail-image img {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.product-detail-subtitle {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary);
}

.product-detail-list {
  list-style-type: disc;
  margin-left: 1.5rem;
  margin-bottom: 2rem;
}

.product-detail-list li {
  margin-bottom: 0.5rem;
}

.product-models {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.product-model {
  background-color: #F3F4F6;
  padding: 1rem;
  border-radius: 0.5rem;
}

.product-model h4 {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.product-detail-cta {
  margin-top: 1rem;
  display: inline-block;
}

.other-products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.cta-box {
  background-color: white;
  border-radius: 0.5rem;
  padding: 2.5rem;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cta-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta-text {
  margin-bottom: 1.5rem;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.cta-btn {
  display: inline-block;
}

/* SERVIZI SECTION */
.servizi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.servizio-card {
  background-color: #F9FAFB;
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  transition: box-shadow 0.3s ease;
}

.servizio-card:hover {
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.servizio-icon {
  margin-bottom: 1rem;
}

.servizio-icon svg {
  width: 3rem;
  height: 3rem;
  stroke: var(--primary);
}

.servizio-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.servizio-description {
  color: var(--text-light);
}

/* STORIA SECTION */
.storia-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.storia-content p {
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
}

.storia-images {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.storia-images img {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.storia-images .color-block {
  height: 10rem;
  background-color: var(--primary);
  border-radius: 0.5rem;
}

/* CONTACT SECTION */
.contact-form {
  max-width: 32rem;
  margin: 0 auto;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(255, 77, 0, 0.2);
}

.form-input.error,
.form-textarea.error {
  border-color: #dc3545;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

.form-error {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.form-textarea {
  min-height: 8rem;
  resize: vertical;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 0.2rem;
  min-width: 18px;
  height: 18px;
}

.form-submit {
  width: 100%;
  position: relative;
  transition: all 0.3s ease;
  margin-top: 2rem;
}

.form-submit:disabled,
.form-submit.btn-disabled {
  cursor: not-allowed;
  transform: none;
  background-color: #ccc;
  color: #666;
  opacity: 0.6;
}

.form-submit:disabled:hover,
.form-submit.btn-disabled:hover {
  background-color: #ccc;
  transform: none;
}

/* Loading spinner per il pulsante */
.form-submit.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  margin: auto;
  border: 2px solid transparent;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* REALIZZAZIONI PAGE */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.project-card {
  background-color: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.project-card:hover {
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.project-image {
  height: 16rem;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-content {
  padding: 1.5rem;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.project-year {
  font-size: 0.875rem;
  background-color: #F3F4F6;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
}

.project-description {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.cta-section {
  text-align: center;
  margin-top: 4rem;
}

.cta-text {
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

/* FOOTER */
.footer {
  background-color: white;
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer-top {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  /* Centrato su mobile */
  margin-bottom: 2rem;
  gap: 1.5rem;
  /* Aumentato gap per mobile */
  text-align: center;
  /* Centrato su mobile */
}

.footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: 0;
  /* Rimosso margin su mobile */
}

.footer-logo svg {
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.footer-address {
  font-size: 0.875rem;
  line-height: 1.4;
  text-align: left;
}

.footer-address p {
  margin-bottom: 0.25rem;
}

.footer-contact {
  font-size: 0.875rem;
  text-align: right;
  line-height: 1.4;
}

.footer-contact p {
  margin-bottom: 0.25rem;
}

.footer-nav {
  margin-bottom: 3rem;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  list-style: none;
}

.footer-nav li {
  white-space: nowrap;
}

.footer-nav a {
  font-size: 0.875rem;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  transition: color 0.3s;
  padding: 0.25rem 0.5rem;
  display: block;
}

.footer-nav a:hover {
  color: var(--primary);
}

.footer-logo-large {
  text-align: center;
  margin-bottom: 2rem;
  font-size: clamp(1rem, 8vw, 7rem);
}

.footer-logo-large svg {
  width: 5rem;
  height: 5rem;
  margin-bottom: 1rem;
  fill: var(--primary);
}

.footer-logo-large h2 {
  /* Dimensione minima e massima per evitare wrapping */
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  white-space: nowrap;
  /* Impedisce il wrapping del testo */
  overflow: hidden;
  /* Nasconde overflow se necessario */
  /* Aggiunge ellipsis se il testo è troppo lungo */
}

.footer-copyright {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-light);
  line-height: 1.4;
}

/* ANIMATIONS */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* GALLERY COMPONENT */
.gallery-container {
  margin: 2rem 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
  border-radius: 0.5rem;
  /* Applico il border-radius direttamente all'immagine */
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
  border-radius: 0.5rem;
  /* Applico il border-radius anche all'overlay */
}

.gallery-item:hover::after {
  background: rgba(0, 0, 0, 0.1);
}

/* MODAL STYLES */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 2rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
  z-index: 10;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.5rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
  z-index: 10;
}

.modal-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.modal-nav:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.modal-nav.prev {
  left: 1rem;
}

.modal-nav.next {
  right: 1rem;
}

.modal-counter {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  font-size: 0.875rem;
}

/* RESPONSIVE */
@media (min-width: 640px) {
  .product-card {
    flex: 0 0 calc(50% - 0.5rem);
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  .gallery-item img {
    height: 250px;
  }

  .categories-nav {
    justify-content: center;
  }

  .servizi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2.5rem;
  }

  .azienda-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .storia-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-product-card {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }



  .footer-top {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    text-align: left;
    /* Reset del text-align per desktop */
  }

  .footer-logo {
    margin-bottom: 0;
  }

  .footer-contact {
    text-align: right;
  }

  .footer-logo-large svg {
    width: 7.5rem;
    height: 7.5rem;
  }

  .nav-desktop {
    display: block;
  }

  .mobile-menu-btn {
    display: none;
  }

}

@media (min-width: 1024px) {
  .product-card {
    flex: 0 0 calc(33.333% - 0.667rem);
  }

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }

  .gallery-item img {
    height: 300px;
  }

  .servizi-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.category-code-badge {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}

@media (max-width: 640px) {
  .logo-footer {
    display: none;
  }

  .hero {
    height: 90vh;
  }

  .hero-title {
    font-size: 13.2vw;
    white-space: normal;
    word-break: normal;
    text-align: left;
    line-height: auto;
  }

  .hero-subtitle {
    font-size: 5.4vw;
    line-height: auto;
    white-space: nowrap;
    text-align: center;
    word-break: keep-all;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 1.5rem;
    padding-top: 0rem;
  }

  .products-carousel {
    justify-content: flex-start;
    gap: 1.5rem;
    overflow: hidden;
    margin-left: 1.1rem;
  }

  .product-card-prodotti {
    min-height: 100%;
  }
}

.category-code {
  background-color: var(--primary);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  display: inline-block;
}