* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Poppins', sans-serif;
    background-color: #ffffff;
    color: #333;
    scroll-behavior: smooth;
}

#servizi, #progetti, #contatti, #social {
    padding-top: 150px;
}

/* ========================
   COOKIE BANNER
======================== */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;

    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #023e8a;
    z-index: 9999; /* molto sopra tutto il resto */
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    transform: translateY(100%);
}

#cookie-banner.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

#cookie-banner p {
    margin: 0;
    font-size: 0.9rem;
}

#cookie-banner a {
    color: #4fc3f7;
    text-decoration: underline;
    margin-left: 10px;
}

#cookie-banner button {
    background: #4fc3f7;
    color: #000;
    border: none;
    padding: 8px 12px;
    margin-left: 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

/* Navbar */

.navbar {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    transition: top 0.3s ease, background-color 0.4s ease, box-shadow 0.4s ease;
}

.navbar.transparent {
    background-color: transparent;
    box-shadow: none;
}

.navbar.scrolled {
    background-color: #0077b6;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.logo {
    width: 80px;        /* assicurati che width = height per avere un cerchio perfetto */
    height: 80px;
    border-radius: 50%;
    object-fit: cover;  /* ritaglia l'immagine mantenendo proporzioni */
    display: inline-block;
}

.nav-links {
    display: flex;
    gap: 1rem;
    padding-left: 1rem; /* spostamento a sinistra */
}

.nav-links a {
    color: #f4f4f4;
    text-decoration: none;
    font-weight: 600;
    border-bottom: none !important;
    outline: none;
}

.nav-links a:hover {
    color: #ffffff;
}

.menu-toggle {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: #f5f5f5;
}

/* Hamburger menu icon */
.menu-toggle {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: #f4f4f4;
    user-select: none;
}

.social-icons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.social-icons a img {
    height: 24px;
    width: 24px;
}

.social-icons a:focus,
.social-icons a:active {
    outline: none;
    box-shadow: none;
}

/* Mobile styles */



@media (max-width: 1359px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 40%;
        background: black;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding: 4rem 2rem;
        gap: 1.5rem;
        transition: right 0.4s ease-in-out;
        z-index: 999;
    }

    .nav-links.open {
        right: 0;
    }


    .menu-toggle {
        display: block;
    }

    .desktop-only {
        display: none;
    }
}

/* --- SOLO DESKTOP --- */
@media (min-width: 1360px) {
    .navbar {
        display: grid;
        grid-template-columns: auto 1fr auto; /* logo | menu | social */
        align-items: center;
        padding: 1rem 3rem;
    }

    .logo {
        height: 115px;
        width: 115px;
        margin-left: 15rem; /* spostato più a destra */
    }

    .nav-links {
        display: flex;
        justify-content: center;
        gap: 2rem;
        padding-left: 0; /* tolgo spostamento inutile */
    }

    .nav-links a {
        font-size: 1rem; /* aumenta la dimensione su desktop */
        position: relative;
        color: #ffffff;
        text-decoration: none;
        font-weight: 600;
        padding: 0.2rem 0;
        transition: color 0.3s ease, text-shadow 0.3s ease;
    }

    /* Glow soffuso */
    .nav-links a:hover {
        color: #90e0ef;
        text-shadow: 0 0 8px rgba(245, 217, 143, 0.8);
    }

    /* Underline animata */
    .nav-links a::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: -4px;
        transform: translateX(-50%) scaleX(0);
        width: 100%;
        height: 2px;
        background-color: currentColor;
        transition: transform 0.3s ease;
    }

    .nav-links a:hover::after {
        transform: translateX(-50%) scaleX(1);
    }

    .social-icons {
        display: flex;
        gap: 1rem;
        align-items: center;
        margin-right: 15rem; /* spostati più verso il centro */
    }

    /* Nascondi i social dentro al menu mobile su desktop */
    .nav-links .social-icons {
        display: none !important;
    }
}
/* Hero */

.hero {
    position: relative;
    height: 100vh;
    background: url('https://sanita.korian.it/wp-content/uploads/2024/07/Colon-irritabile-sintomi-e-cure-1.png') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #f5f5f5;
    padding: 0 1.5rem;
    z-index: 1;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.2));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 1rem;
    max-width: 800px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.3rem;
}

.cta-hero a {
    display: inline-block;
    margin: 0.5rem;
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
    font-weight: 600;
    background: #0077b6;
    color: #023e8a;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-hero a:hover {
    background: #0077b6;
    transform: translateY(-2px);
}

/* Mobile */
@media (max-width: 768px) {
    .hero-content {
        padding-top: 13rem; /* Aggiunto spazio sopra */
        padding-bottom: 7rem; /* oppure 15-20vh se serve più spazio */
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .cta-hero a {
        width: 70%;          /* meno largo */
        font-size: 0.9rem;   /* testo più piccolo */
        padding: 0.6rem 1.4rem; /* meno spazio interno */
    }
}

/* Onda animata */
.hero-wave {

    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    overflow: hidden;
    line-height: 0;
    z-index: 2; /* sopra la sezione successiva */
}

.hero-wave svg {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-wave path {
    fill: #ffffff;
}



@media (max-width: 768px) {
    .hero-wave {
        height: 80px; /* più piccola */
    }

    .hero-wave svg {
        height: 80px;
    }
}

.servizi-section {
    background-color: #ffffff;
    padding: 4rem 1.5rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #0077b6;
    margin-bottom: 3rem;
}

.servizio {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.servizio.reverse {
    flex-direction: row-reverse;
}

.servizio-img {
    flex: 1;
    min-width: 300px;
}

.servizio-img img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.servizio-testo {
    flex: 1;
    min-width: 280px;
}

.servizio-testo h3 {
    color: #0077b6;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.servizio-testo p {
    color: #023e8a;
    font-size: 1rem;
    line-height: 1.6;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .servizio, .servizio.reverse {
        flex-direction: column;
        text-align: center;
    }
    .servizio-img, .servizio-testo {
        width: 100%;
    }
}

.icon-box {
    font-size: 2.5rem;
    color: #00b4d8;
    margin-bottom: 1rem;
}

/* video */
.video-section {
    padding: 2rem 1rem;
    background-color: #ffffff;
    text-align: center;
}

.video-section .section-title {
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: #0077b6; /* puoi adattare il colore */
}

.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px; /* max larghezza video */
    margin: 0 auto;
    padding-top: 56.25%; /* rapporto 16:9 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
}

/* Recensioni */

.reviews {
    padding: 50px 20px;
    background: #ffffff;
    text-align: center;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.review-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px 20px;
    box-shadow: 0 6px 15px rgba(240,128,128,0.3);
    font-style: italic;
    color: #023e8a;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.review-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(240,128,128,0.5);
}

.review-card span {
    display: block;
    margin-top: 15px;
    font-weight: 600;
    color: #023e8a;
}

/* Sezione contatti */
.cta {
    background-color: #ffffff;
    padding: 4rem 2rem;
    color: #0077b6;
    text-align: center;
    font-family: 'Poppins', sans-serif;

}

.cta h2 {
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
    font-weight: 600;
}

/* Contenitore info di contatto */
.contact-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: nowrap;
    align-items: flex-start;
}

/* Singolo elemento contatto */
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1 1 0;

    padding: 1.2rem 1.5rem;
    border-radius: 10px;

    text-align: left;
    transition: background-color 0.3s ease;
}

.contact-item:hover {
    background: rgba(255 255 255 / 0.15);
}

/* Icone */
.contact-item .icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 4px;
    transition: filter 0.3s ease;
    filter: none; /* icona nera originale senza filtri */
}

.contact-item:hover .icon {
    filter: none; /* niente cambio colore al passaggio del mouse */
}

/* Titoli e testo */
.contact-item h3 {
    margin: 0 0 0.4rem;
    font-size: 1.30rem; /* prima 1.1rem */
    font-weight: 600;
    color: #0077b6;
}

.contact-item p {
    margin: 0;
    font-size: 1.55rem; /* prima 0.95rem */
    line-height: 1.5;   /* leggermente aumentata */
    color: #0077b6;
}

/* --- Responsive da mobile --- */
@media (max-width: 768px) {
    .contact-info {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .contact-item {
        flex-direction: row;
        align-items: flex-start;
        max-width: 100%;
        text-align: left;
        width: 100%;
        padding: 1rem;
    }

    .contact-item p {
        font-size: 1.1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .cta h2 {
        font-size: 1.8rem;
    }
}


/* Titolo form */
.cta h2 {
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
    font-weight: 600;
    color: #0077b6;
}

/* Form contatti */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding: 2rem;
    border-radius: 12px;
    background-color: #f0f8ff; /* azzurro molto chiaro */
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.2); /* ombra azzurro medico */
}

.contact-form input,
.contact-form textarea {
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background-color: #fff;
    color: #333;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    resize: vertical;
    min-height: 40px;
}

.contact-form textarea {
    min-height: 100px;
}

.contact-form input:focus,
.contact-form textarea:focus {
    box-shadow: 0 0 0 3px #1abc9c66;
    outline: none;
    transform: scale(1.02);
}


.contact-form button {
    background-color: #ffffff;
    color: black;
    padding: 0.9rem 1.8rem;
    font-size: 1rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(26, 188, 156, 0.5);
}

.contact-form button:hover {
    background-color: #17a589;
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(23, 165, 137, 0.7);
}

/* Responsive mobile */
@media (max-width: 768px) {
    .contact-info {
        flex-direction: column;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .cta {
        padding: 3rem 1rem;
        border-radius: 0;
    }
    .cta h2 {
        font-size: 1.8rem;
    }
    .contact-form input,
    .contact-form textarea {
        font-size: 0.95rem;
        padding: 0.7rem 0.9rem;
    }
    .contact-form button {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }
}


.social-section {
    padding: 3rem 1rem;
    text-align: center;
}

.social-section h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #0077b6;
}

.social-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.social-logos a img {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.social-logos a:hover img {
    transform: scale(1.15);
    filter: brightness(1.2);
}

/* Responsive: su schermi piccoli rendi tutto centrato e distanziato */
@media (max-width: 600px) {
    .social-logos {
        gap: 1.5rem;
    }

    .social-logos a img {
        width: 36px;
        height: 36px;
    }

    .social-section h2 {
        font-size: 1.5rem;
    }
}

.map-section {
    background-color: #ffffff;
    padding: 3rem 1rem;
    display: flex;
    justify-content: center;
}

.map-container {
    width: 90%;
    max-width: 920px;
    background: #023e8a;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(62, 26, 26, 0.5);
}

.map-container iframe {
    width: 100%;
    height: 400px;
    border: none;
    border-radius: 8px;
    display: block;
}


.whatsapp {
    position: fixed;
    bottom: 20px;  /* distanza dal fondo */
    left: 20px;    /* distanza dal bordo sinistro */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #25D366; /* verde WhatsApp */
    border-radius: 50%;        /* rotondo */
    width: 60px;               /* larghezza bottone */
    height: 60px;              /* altezza bottone */
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 10000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

.whatsapp img {
    width: 35px;  /* dimensione logo */
    height: 35px;
}

.whatsapp:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

/* Adattamento per schermi piccoli */
@media (max-width: 480px) {
    .whatsapp {
        width: 50px;
        height: 50px;
    }

    .whatsapp img {
        width: 28px;
        height: 28px;
    }
}

/* Footer */
footer {
    background: #ffffff;
    color: #023e8a;
    text-align: center;
    padding: 2rem 1rem;

    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.02em;
}

footer a {
    color: #023e8a;
    text-decoration: none;
    margin-left: 10px;
    transition: color 0.3s ease;
}

footer a:hover,
footer a:focus {
    color: #023e8a; /* cambia colore al passaggio del mouse */
    text-decoration: underline;
    outline: none;
}

/* === Responsive === */
@media (max-width: 1024px) {
    .riga {
        flex-direction: column;
    }
    .hero h1 {
        font-size: 2rem;
    }
}

.privacy-consent {
    display: block;
    font-size: 0.9rem;
    margin: 1rem 0;
    color: #00303f;
}

.privacy-consent input[type="checkbox"] {
    margin-right: 0.5rem;
    vertical-align: middle;
}

.privacy-consent a {
    color: #023e8a;
    text-decoration: underline;
}