body {
    font-family: 'Montserrat', Arial, sans-serif;
    background: #f5f5f7; /* Un grigio molto chiaro, quasi bianco */
    color: #1d1d1f; /* Un nero profondo per il testo */
    margin: 0;
    min-height: 100vh;
    transition: background 0.5s;
    margin-top: 100px;
}

@media (max-width: 600px) {
    body {
        margin-top: 92px;
    }
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.8); /* Bianco traslucido */
    backdrop-filter: blur(15px); /* Sfocatura più intensa */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Ombra sottile */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    top: 0;
    z-index: 100;
    animation: fadeDown 0.8s;
}

.navbar-phone {
    display: inline-flex;
    align-items: center;
    background: #007aff;
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    position: absolute;
    right: 20px; /* sempre a destra della navbar */
    top: 50%;
    transform: translateY(-50%);
}

.navbar-phone:hover {
    transform: translateY(-52%);
    background: #005ecc; /* variante hover */
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.logo {
    font-size: 2rem;
    font-weight: 600; /* Font weight più leggero */
    color: #007aff; /* Blu Apple */
    letter-spacing: -1px; /* Spaziatura più stretta */
    text-shadow: none;
}

.nav-links li a:hover,
.nav-links li a.cta-phone {
    background: #007aff;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
    transform: translateY(-2px);
}

.cta-phone {
    background: #007aff;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none;
}

.cta-phone-bubble {
    display: none;
    background: #007aff;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
    padding: 10px 10px;
    border-radius: 50%;
    text-decoration: none;
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: #1d1d1f;
    cursor: pointer;
    margin-left: auto;
}

@media (max-width: 900px) {
    
    .navbar-toggle {
        display: block;
        position: absolute;
        left: 16px;
        top: 16px;
        z-index: 1001;
        
    }

    .navbar {
        flex-direction: column;
        gap: 12px;
        padding: 0px;
    }
    .nav-links {
        /*
         * SOSTITUISCI display: none; e le sue dipendenze con le seguenti proprietà
         * per abilitare l'animazione.
         */
        display: flex; /* Mantieni display:flex per la disposizione degli elementi */
        flex-direction: column;
        background: #f5f5f7;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        border-radius: 0 0 12px 12px;
        z-index: 1000;
        
        /* Proprietà per l'animazione: menu chiuso */
        max-height: 0; /* Nasconde il menu collassando l'altezza */
        opacity: 0; /* Lo rende trasparente */
        overflow: hidden; /* Nasconde gli elementi che superano l'altezza */
        transition: max-height 0.4s ease-out, opacity 0.4s ease-out; /* Aggiungi la transizione */
    }
    .nav-links.nav-open {
        /*
         * Aggiorna le proprietà per lo stato "aperto"
         */
        max-height: 500px; /* Imposta un'altezza sufficientemente grande per mostrare tutto il menu */
        opacity: 1;
        padding: 20px; /* Riaggiungi il padding per lo stato aperto */
    }
    .nav-links.nav-open {
        display: flex;
        padding: 20px;
    }
    .nav-links li {
        margin: 0;
        border-bottom: 1px solid #e0e0e0;
    }
    .nav-links li:last-child {
        border-bottom: none;
    }
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border-radius: 0;
        background: #f5f5f7;
        padding-left: 24px;
    }
    .cta-phone-bubble {
        display: block;
        position: absolute;
        right: 16px;
        top: 16px;
        z-index: 1001;
        
    }
     .cta-phone {
        display: none;

    }
}

.hero {
    background: #ffffff;
    padding: 60px 0 40px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #e0e0e0;
}

.hero h1 {
    font-size: 2.7rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: #1d1d1f;
    text-shadow: none;
}

.hero .subtitle {
    font-size: 1.2rem;
    color: #6e6e73;
    margin-bottom: 28px;
}

.counter {
    background: #ffffff;
    border-radius: 12px;
    padding: 22px 30px;
    min-width: 160px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: transform 0.3s;
    animation: fadeUp 1.2s;
}


.counter-number {
    font-size: 1.7rem;
    font-weight: 600;
    color: #007aff;
    display: block;
}

.counter-label {
    font-size: 1rem;
    color: #6e6e73;
}

/* Offers Section */
.offers {
    background: #f5f5f7;
    padding: 50px 0 20px 0;
	margin-top: -40px;
    text-align: center;
    background-image: url("/images/persona-che-lavora-da-casa-con-un-cane.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    z-index: 0;
    background-attachment: fixed;
}

.offers::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(255, 255, 255, 0.8); /* Overlay bianco semi-trasparente */
z-index: -1;
}


.offer-card h3 {
    color: #1d1d1f;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.offer-card h4 {
    color: #ff1745;
    font-size: 1rem;
    margin-bottom: 18px;
}

.offer-card p {
    color: #6e6e73;
    font-size: 1rem;
    
}


.price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ff1745;
    background: #ffe6eb; /* Sfondo molto chiaro */
    border-radius: 8px;
    padding: 6px 0;
    margin-bottom: 18px;
    box-shadow: none;
}


.btn-primary {
    background: #ff1745;
    color: #ffffff;
	border: none;
}

.btn-primary:hover {
    background: #a10524;
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-phone {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  overflow: hidden;
  background: #ff1745;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 20px; /* cerchio iniziale */
  width: 50px; /* larghezza iniziale = cerchio */
  height: 50px;
  transition: width 0.3s ease, transform 0.2s ease;
  white-space: nowrap;
  padding: 0 14px; /* padding laterale usato quando si espande */
  box-sizing: border-box; /* così padding non fa sbordare */
  
}

.btn-phone .material-icons {
  font-size: 24px;
  margin-right: 8px;
}

.btn-phone .number {
  opacity: 0;
  margin-left: 0px;
  transition: opacity 0.2s ease;
}

.btn-phone:hover {
  width: 100%; /* si espande */
  background: #ff1745;
  transform: translateY(-2px);
}

.btn-phone:hover .number {
  opacity: 1;
}

.btn-secondary {
    background: transparent;
    color: #007aff;
    border: 2px solid #007aff;
}

.btn-secondary:hover {
    background: #007aff;
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-green {
    background: green;
    color: white;
    border: 2px solid green;
}

.btn-green:hover {
    background: rgb(9, 207, 9);
    color: white;
    border: 2px solid green;
    transform: translateY(-2px);
}

/* Help Section */
.help {
    background: #ffffff;
    padding: 50px 0 40px 0;
    text-align: center;
    color: #1d1d1f;
    animation: fadeUp 1.4s;
}

.help h2 {
    font-size: 1.7rem;
    margin-bottom: 18px;
    color: #1d1d1f;
}

.help-phone {
    color: #007aff;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.help-phone:hover {
    color: #005bb5;
}

/* Footer */
.footer {
    background: #ffffff;
    color: #6e6e73;
    text-align: center;
    padding: 24px 0;
    font-size: 0.9rem;
    margin-top: 40px;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.04);
    animation: fadeUp 1.5s;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 180px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    z-index: 200;
    padding: 10px 0;
    margin-top: 10px;
}

.dropdown-menu li {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 24px;
    color: #1d1d1f;
    text-decoration: none;
    font-weight: 400;
    font-size: 1rem;
    border-radius: 0;
    transition: background 0.2s, color 0.2s;
}

.dropdown-menu li a:hover {
    background: #e5f1ff;
    color: #007aff;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    display: block;
}

/* Energy News Banner */
.energy-news-banner {
    top: 0px;
    left: 0;
    width: 100vw;
    background: #1d1d1f;
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    z-index: 2000;
    height: 38px;
    display: flex;
    align-items: center;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/*Form di contatto*/
/* Stili per il Form */
.contact-form {
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
    padding: 25px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #1d1d1f;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-sizing: border-box; /* Questa è la chiave! */
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: 'Inter', sans-serif;
    color: #1d1d1f;
}

.contact-form input:focus {
    border-color: #007aff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
}

.consent-fieldset {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.consent-fieldset legend {
    font-size: 1rem;
    font-weight: 600;
    color: #1d1d1f;
    padding: 0 5px;
}