/* ============================================================
   Hydraulic Design – Shared Stylesheet
   Nav + Footer CSS comune a tutte le pagine
   ============================================================ */

/* Reset & Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0066cc;
    --primary-dark: #004999;
    --secondary: #0099ff;
    --accent: #00ccff;
    --dark: #1a1a2e;
    --gray: #f5f7fa;
    --text: #2c3e50;
    --light-text: #6c757d;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
}

html {
    overflow-y: scroll;
}

/* ============================================================
   Navigation
   ============================================================ */

nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-icon {
    width: 120px;
    height: 40px;
    background: white;
    border-radius: 5px;
    padding: 2px;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
    font-size: 1rem;
    letter-spacing: 0.3px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--primary);
    transition: all 0.3s ease;
    border-radius: 3px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ============================================================
   Footer
   ============================================================ */

footer {
    background: rgba(26, 26, 46, 0.95);
    color: white;
    padding: 0.5rem 2rem;
    backdrop-filter: blur(10px);
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.footer-logo {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.footer-logo h3 {
    color: var(--accent);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

.footer-center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.3rem;
}

.footer-center p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0;
    text-align: center;
}

.footer-credits {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    text-align: center;
    white-space: nowrap;
}

.footer-credits a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-credits a:hover {
    color: var(--accent);
}

.footer-contacts {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.footer-email-social {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.email-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    line-height: 1;
    font-size: 0.95rem;
}

.email-link:hover {
    color: var(--accent);
}

.policy-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.policy-link:hover {
    color: var(--accent);
}

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

.social-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.social-icon:hover {
    background: var(--accent);
    transform: scale(1.1);
}

.social-icon svg {
    width: 18px;
    height: 18px;
    fill: white;
}

/* ============================================================
   Responsive – Nav & Footer
   ============================================================ */

@media (min-width: 1920px) {
    .nav-container,
    .footer-content {
        max-width: 1600px;
    }
}

@media (min-width: 1280px) and (max-width: 1919px) {
    .nav-container {
        max-width: 1200px;
    }
}

@media (min-width: 1025px) and (max-width: 1279px) {
    .nav-container {
        max-width: 1000px;
        padding: 1rem 1.5rem;
    }
    .nav-links {
        gap: 2rem;
    }
}

@media (min-width: 901px) and (max-width: 1024px) {
    .nav-container {
        max-width: 950px;
        padding: 1rem 1.5rem;
    }
    .nav-links {
        gap: 1.5rem;
    }
    .nav-links a {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .logo-icon {
        width: 120px;
        height: 40px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 1rem 2rem;
        border-bottom: 1px solid var(--gray);
    }

    .nav-links a::after {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }

    .footer-logo,
    .footer-center,
    .footer-contacts {
        justify-content: center;
    }

    .footer-email-social {
        flex-direction: column;
        gap: 0.8rem;
    }
}

@media (max-width: 400px) {
    .nav-container {
        max-width: 100%;
        padding: 0.8rem 1rem;
    }

    .logo-icon {
        width: 90px;
        height: 30px;
    }

    footer {
        padding: 1.5rem 1rem;
    }

    .footer-content {
        gap: 0.5rem;
    }
}

/* ── Iubenda: nasconde la barra in basso, mantiene il pulsante floating ── */
.iub__us-widget { display: none !important; }
