body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background: #f8f9fa;
}

/* Miglioramenti navbar: loghi e link più vicini, font più grande */
.logo-container {
    display: flex;
    align-items: center;
    gap: 44px;
    margin-left: 58px;
}

/* Navbar sticky: resta visibile mentre scorri */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.navbar-nav {
    gap: 0.7em;
}

.navbar-nav .nav-link {
    position: relative;
    transition: color 0.2s;
    font-size: 1.18em;
    padding-left: 0.5em !important;
    padding-right: 0.5em !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: #0079A4 !important;
}

.navbar-nav .nav-link::after {
    content: "";
    display: block;
    width: 0;
    height: 2px;
    background: #0079A4;
    transition: width 0.3s;
    position: absolute;
    left: 0;
    bottom: -2px;
}

.navbar-nav .dropdown-toggle::after {
    display: none !important;
}
.navbar-nav .nav-link.dropdown-toggle::after {
    display: none !important;
}
.navbar .btn-warning {
    margin-left: 12px !important;
    margin-right: 24px !important;
    font-size: 1.08em;
}
.navbar .dropdown:hover > .dropdown-menu,
.navbar .dropdown:focus-within > .dropdown-menu,
.navbar .dropdown.show > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.navbar .dropdown-menu {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s, visibility 0.22s;
    display: block;
    border-radius: 1em;
    box-shadow: 0 4px 18px rgba(0,89,153,0.10);
    border: none;
    min-width: 220px;
    padding: 0.5em 0;
    margin-top: 0.5em;
    background: #fff;
}
.logo {
    height: 200px;
    width: auto;
}
.logo-text {
    height: 80px;
    width: auto;
}

/* Hero section */
.hero {
    position: relative;
    width: 100%;
    min-height: 320px;
    height: 400px;
    max-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 0;
}
.hero-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    top: 0;
    left: 0;
    z-index: 1;
    filter: brightness(0.7);
    transition: all 0.3s;
    will-change: transform;
}
.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    color: #fff;
    text-align: center;
    max-width: 90vw;
    width: 100%;
    padding: 0 5vw;
}

.hero-content h1 {
    font-size: 2.2em;
    font-weight: 400;
    margin-bottom: 20px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.25);
    letter-spacing: 0.5px;
}

.hero-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

footer {
    background: #ffffff;
    color: #222;
    text-align: center;
    padding: 10px 0;
    position: static;
    width: 100%;
    font-size: 0.95em;
    border-top: 1px solid #eee;
    margin-top: 40px;
}

.btn-primary {
    background: #0079A4 !important;
    border: none !important;
    border-radius: 1.5em !important;
    font-weight: bold;
    letter-spacing: 0.5px;
}
.btn-primary:hover {
    background: #0079A4 !important;
}

.btn-warning {
    background: #0079A4 !important;
    border: none !important;
    color: #fff !important;
    border-radius: 1.5em !important;
    font-weight: bold;
    letter-spacing: 0.5px;
}
.btn-warning:hover {
    background: #0079A4 !important;
    color: #fff !important;
}

h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4em;
    font-weight: 700;
    color: #3076b3;
}

/* Effetto sui tasti Contattaci */
.btn-primary,
.btn-warning {
    transition: transform 0.18s, box-shadow 0.18s;
}

.btn-primary:hover,
.btn-warning:hover {
    transform: scale(1.07);
    box-shadow: 0 4px 18px rgba(0,121,164,0.18);
}

/* Effetto sulle icone dei materiali */
.img-fluid.rounded.shadow {
    transition: transform 0.18s, box-shadow 0.18s;
}

.img-fluid.rounded.shadow:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(0,121,164,0.22);
}

.footer-custom {
    background: #f8f9fa;
    border-top: 2px solid #0079A4;
    color: #222;
    font-size: 1em;
    letter-spacing: 0.2px;
}
.footer-custom a:hover {
    color: #005999;
    text-decoration: none;
}

/* Effetto hover sulle icone servizi */
.row .col-auto a img {
    transition: transform 0.18s, box-shadow 0.18s;
    cursor: pointer;
}
.row .col-auto a:hover img {
    transform: scale(1.13);
    box-shadow: 0 4px 18px rgba(0,121,164,0.22);
}

/* Effetto hover su "Scopri di più" */
.scopri-di-piu {
    color: #0079A4;
    transition: color 0.18s, text-decoration 0.18s;
    cursor: pointer;
}
.row .col-auto a:hover .scopri-di-piu {
    color: #0079A4;
    text-decoration: underline;
}

/* Effetto hover su tutto il box servizio */
.row .col-auto a:hover {
    text-decoration: none;
}
/* Forza colore blu su hover per "Scopri di più" */
.scopri-di-piu,
.row .col-auto a:hover .scopri-di-piu,
.row .col-auto a:focus .scopri-di-piu,
.row .col-auto a:active .scopri-di-piu,
.row .col-auto a:hover span.scopri-di-piu,
.row .col-auto a:hover span:last-child {
    color: #0079A4 !important;
    text-decoration: underline;
}

@media (max-width: 900px) {
    .hero {
        height: 220px;
        min-height: 180px;
        max-height: 300px;
    }
    .hero-content h1 {
        font-size: 1.3em;
    }
    .hero-content p {
        font-size: 1em;
    }
    .logo {
        height: 40px;
    }
    .logo-text {
        height: 20px;
    }
    .navbar-nav .nav-link {
        font-size: 1em;
        padding-left: 0.3em !important;
        padding-right: 0.3em !important;
    }
    .logo-container {
        gap: 10px;
        margin-left: 6px;
    }
    .navbar .btn-warning {
        margin-left: 6px !important;
        margin-right: 10px !important;
        font-size: 1em;
    }
}