
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.product-link{
  text-decoration: none;
  color: inherit;
}

/* Header */
.header {
    background-color: #ffffff;
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: 0.35s cubic-bezier(0.65, 0.05, 0.36, 1);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;   
    flex-direction: column;
}

.logo-icon{
background-color: white;
border-radius: 50%;
margin-bottom: 1rem;
width: 120px; 
height: 120px;
}

.logo-made-in-italy{
  width: 120px;;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

/* Hero Section */
.hero {
    background: #2b87f1;
    color: white;
    padding: calc(120px + 2rem) 0 0px;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 85vh;
    overflow: hidden;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    align-content: center;
    width: 100%;
    height: 100%;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    color:black;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    opacity: 0.9;
    color:black;
}

/* Pulsante mucca */
.cowButton button {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  color: white;
  background-color: #171717;
  padding: 1em 2em;
  border: none;
  border-radius: .6rem;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: 1.5s ease;
}

.cowButton button span:not(:nth-child(6)) {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  height: 30px;
  width: 30px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: .6s ease;
}

.cowButton button span:nth-child(6) {
  position: relative;
}

.cowButton button span:nth-child(1) {
  transform: translate(-10em, -4em);
}

.cowButton button span:nth-child(2) {
  transform: translate(-10em, 1.3em);
}

.cowButton button span:nth-child(3) {
  transform: translate(-10em, 1.8em);
}

.cowButton button span:nth-child(4) {
  transform: translate(10em, 1.4em);
}

.cowButton button span:nth-child(5) {
  transform: translate(10em, -3.8em);
}

.cowButton button:hover span:not(:nth-child(6)) {
  transform: translate(-50%, -50%) scale(9);
  transition: 1.5s ease;
    background-color:white;
}  
.cowButton button:hover {
  color: black;
    transition: 1.5s ease;
}  

/* Products Section */
.products {
    padding: 80px 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #000000;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: #2b87f1;
    margin: 15px auto;
    border-radius: 2px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.product-card {
    background: #fbf9f8;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    height: 100%;;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: #2b87f1;
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: #2b87f1;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.product-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.product-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2b87f1;
}

.product-features {
    list-style: none;
    margin: 1.5rem 0;
}

.product-features li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 25px;
}

.product-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #2b87f1;
    font-weight: bold;
}

/* About Section */
.about {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 80px 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text {
    padding: 2rem;
}

.about-text h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: #2b87f1;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #ff6b35;
    display: block;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

/* Contact Section */
.contact {
    background: #2b87f1;
    color: white;
    padding: 80px 0;
}

.contact .container{
  max-width: none;
}

.contact-content {
    text-align: center;
}

.contact h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;   
}

.contact-link{
  text-decoration: none;
  color: inherit;
}

.contact-item {
    background: rgba(255,255,255,0.1);
    padding: 1rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);     
    height: 100%;
}

.contact-icon {
    font-size: 3rem;
    display: block;
}

.privacyPolicyAlert{
  margin-top:1rem;
}

/* Footer */
.footer {
    background: #1959a3;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }

    .nav {
        justify-content: center;
    }

    .logo-icon{
        width: 80px;
        height: 80px;
    }

    .logo-made-in-italy{
        width: 80px;
    }
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}


/* Bottoni in alto */
/* Bottoni di navigazione - Versione compatibile Firefox */

.btn-23,
.btn-23 *,
.btn-23 :after,
.btn-23 :before,
.btn-23::after,
.btn-23::before {
  border: 0 solid;
  box-sizing: border-box;
}

.btn-23 {
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: button;
  -moz-appearance: button; /* Aggiunto per Firefox */
  background-color: #ffffff;
  background-image: none;
  color: #0952b3;
  cursor: pointer;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  font-size: 100%;
  font-weight: 900;
  line-height: 1.5;
  margin: 0;
  /* Rimosso -webkit-mask-image che può causare problemi in Firefox */
  padding: 0;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block; /* Aggiunto per consistenza cross-browser */
}

.btn-23:disabled {
  cursor: default;
}

/* Firefox specific focus ring */
.btn-23:-moz-focusring {
  outline: 2px solid #0952b3;
  outline-offset: 2px;
}

.btn-23 svg {
  display: block;
  vertical-align: middle;
}

.btn-23 [hidden] {
  display: none;
}

.btn-23 {
  border: 2px solid #0952b3;
  border-radius: 99rem;
  overflow: hidden;
  padding: 0.8rem 2.8rem;
  position: relative;
  /* Aggiunto background hover per Firefox */
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.btn-23:hover {
  background-color: #f0f8ff;
  border-color: #2b87f1;
}

.btn-23 span {
  display: grid;
  inset: 0;
  place-items: center;
  position: absolute;
  transition: opacity 0.2s ease;
  /* Fallback per Firefox che potrebbe non supportare 'inset' */
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  color: #0952b3;
}

.btn-23 .marquee {
  --spacing: 6em;
  --start: 0em;
  --end: 6em;
  animation: marquee 1s linear infinite;
  animation-play-state: paused;
  opacity: 0;
  position: relative;
  /* Semplificato text-shadow per Firefox */
  text-shadow: 
    #0952b3 6em 0,
    #0952b3 -6em 0,
    #0952b3 -12em 0;
}

.btn-23:hover .marquee {
  animation-play-state: running;
  opacity: 1;
}

.btn-23:hover .text {
  opacity: 0;
}

/* Keyframes con prefissi per compatibilità */
@keyframes marquee {
  0% {
    transform: translateX(var(--start, 0em));
  }
  100% {
    transform: translateX(var(--end, 6em));
  }
}

/* Fallback per browser che non supportano CSS custom properties */
@supports not (--css: variables) {
  .btn-23 .marquee {
    text-shadow: #0952b3 6em 0, #0952b3 -6em 0, #0952b3 -12em 0;
  }
  
  @keyframes marquee {
    0% {
      transform: translateX(0em);
    }
    100% {
      transform: translateX(6em);
    }
  }
}

/* Fix specifici per Firefox */
@-moz-document url-prefix() {
  .btn-23 {
    /* Forza hardware acceleration in Firefox */
    transform: translateZ(0);
    will-change: transform;
  }
  
  .btn-23 .marquee {
    /* Fix per animazioni in Firefox */
    backface-visibility: hidden;
  }
}

/* Media query per dispositivi con hover limitato (touch) */
@media (hover: none) {
  .btn-23:hover .marquee {
    animation-play-state: paused;
    opacity: 0;
  }
  
  .btn-23:hover .text {
    opacity: 1;
  }
  
  .btn-23:active .marquee {
    animation-play-state: running;
    opacity: 1;
  }
  
  .btn-23:active .text {
    opacity: 0;
  }
}

/* Ulteriori fix per cross-browser compatibility */
.btn-23 * {
  box-sizing: inherit;
}

/* Assicura che i link funzionino correttamente */
.nav-links a.btn-23 {
  color: inherit;
  text-decoration: none;
}

.nav-links a.btn-23:visited {
  color: #0952b3;
}
/* Animazione onde */

.wave-container {
  position: relative;
  width: 100%;
  height: 100%;  
}

#waves {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

/* Switch lingua */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 5px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
    min-width: 40px;
}

.lang-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #2b87f1;
}

.lang-btn.active {
    background: #2b87f1;
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .language-switcher,
    .language-switcher-flags {
        top: 15px;
        right: 15px;
        scale: 0.9;
    }
}

/* Assicurati che non interferisca con il header */
.header {
    z-index: 999;
}




/* Fix per scroll smooth con header fisso */

/* Metodo 1: Usando scroll-padding-top (più moderno) */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 140px; /* Altezza header + margine */
}

/* Metodo 2: Alternativo con pseudo-elementi (per compatibilità) */
#chi-siamo::before,
#prodotti::before,
#contatti::before,
#home::before {
  content: '';
  display: block;
  height: 140px; /* Altezza header + margine */
  margin-top: -140px; /* Compensazione negativa */
  visibility: hidden;
  pointer-events: none;
}

/* Fix specifico per la sezione about che ha già padding */
.about {
  padding: 80px 0;
  /* Riduci leggermente il padding top per compensare */
  padding-top: 60px;
}

/* Assicurati che l'header mantenga la giusta altezza */
.header {
  background-color: #ffffff;
  color: white;
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: 0.35s cubic-bezier(0.65, 0.05, 0.36, 1);
  /* Assicura un'altezza minima consistente */
  min-height: 120px;
}

/* Per dispositivi mobili, riduci l'offset */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 100px;
  }
  
  #chi-siamo::before,
  #prodotti::before,
  #contatti::before,
  #home::before {
    height: 100px;
    margin-top: -100px;
  }
  
  .about {
    padding-top: 40px;
  }

  .hero {
    padding: calc(90px + 2rem) 0 0px;
}

}

/* Sezione video */
.videos{
  padding-top: 20px;
}

.videos-in-action {
    margin-bottom: 2rem;
    text-align: center;
}

.video-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.video-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.video-grid video {
    max-width: 480px;
    width: 100%;
    border-radius: 12px;
}
