* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #ffffff;
    --text-primary: rgb(12, 4, 7);
    --accent-color: #155484;
}

body {
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    margin: 0;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Classi per animazioni scroll */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: none !important;
}

.fade-in-up.is-visible {
    animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: none !important;
}

.fade-in-left.is-visible {
    animation: fadeInLeft 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: none !important;
}

.fade-in-right.is-visible {
    animation: fadeInRight 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fade-in-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: none !important;
}

.fade-in-scale.is-visible {
    animation: fadeInScale 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Delay progressivi per elementi multipli nella stessa sezione */
.about-content .fade-in-left { animation-delay: 0s; }
.about-content .fade-in-right { animation-delay: 0.2s; }

.services-container .fade-in-up:nth-child(1) { animation-delay: 0s; }
.services-container .fade-in-scale { animation-delay: 0.2s; }

.projects-container .fade-in-up:nth-child(1) { animation-delay: 0s; }
.projects-container .fade-in-scale { animation-delay: 0.2s; }


.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid transparent;
    box-shadow: none;
    padding: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(12, 4, 7, 0.06);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
}

.navbar.hidden {
    transform: translateY(-100%);
    opacity: 0;
}

.navbar.menu-open {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(12, 4, 7, 0.06);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
}

.nav-content-block {
    max-width: 100%;
    margin: 0 auto;
    padding: 24px 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-img {
    height: 36px;
    width: auto;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-white {
    display: none;
}

.logo-color {
    opacity: 1;
}

.logo-mobile {
    display: none;
}

.logo-desktop {
    display: block;
}

.brand {
    position: relative;
}

.nav-menu {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-link-wrap {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: rgba(12, 4, 7, 0.6);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.nav-button-wrap {
    display: flex;
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 0;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.button:hover {
    background-color: rgb(17, 70, 110);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(21, 84, 132, 0.25);
}

.button-text-wrapper {
    position: relative;
    height: 20px;
    overflow: hidden;
}

.button-text {
    margin: 0;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.button-text.absolute {
    position: absolute;
    top: 100%;
    left: 0;
}

.button:hover .button-text:not(.absolute) {
    transform: translateY(-100%);
}

.button:hover .button-text.absolute {
    transform: translateY(-100%);
}

.button-arrow-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.button-arrow-wrapper svg {
    width: 100%;
    height: 100%;
}

.menu-button {
    display: none;
    cursor: pointer;
    z-index: 10;
}

.hamburger {
    width: 24px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-line-top,
.hamburger-line-middle,
.hamburger-line-bottom {
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    transition: all 0.3s ease;
}


.menu-button.active .hamburger-line-top {
    transform: rotate(45deg) translateY(8px);
}

.menu-button.active .hamburger-line-middle {
    opacity: 0;
}

.menu-button.active .hamburger-line-bottom {
    transform: rotate(-45deg) translateY(-8px);
}

.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fdfdfd;
    border-bottom: none;
    box-shadow: none;
    padding: 24px 20px 32px 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 24px;
}

.mobile-nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 16px 0;
    border-bottom: 1px solid rgba(12, 4, 7, 0.08);
    transition: color 0.2s ease;
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--accent-color);
}

.mobile-menu-cta {
    padding-top: 16px;
    border-top: none;
}

.button-full {
    width: 100%;
    justify-content: center;
}

.hero {
    min-height: 100vh;
    background-color: #e8eef2;
    background-image: url('../media/img/homepage/hero-home.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fallback per browser che non supportano WebP */
@supports not (background-image: url('test.webp')) {
    .hero {
        background-image: url('../media/img/homepage/hero-home.jpg');
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1200px;
    padding: 0 60px;
    animation: fadeIn 1.2s ease-out 0.3s both;
}

.hero-title {
    font-size: clamp(48px, 8vw, 96px);
    font-weight: 700;
    color: var(--accent-color);
    margin: 0 0 24px 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 400;
    color: var(--accent-color);
    margin: 0 0 40px 0;
    line-height: 1.5;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.button-hero {
    background-color: var(--accent-color);
    color: white;
}

.button-hero:hover {
    background-color: rgb(17, 70, 110);
}

.button-hero .button-arrow-wrapper {
    display: none;
}

.scroll-arrow {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: var(--accent-color);
    opacity: 0;
    animation: fadeIn 1.2s ease-out 0.8s both, bounce 2.5s ease-in-out 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

.about-section {
    padding: 140px 0 160px 0;
    background-color: #f8f9fa;
}

.about-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 60px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: stretch;
}

.about-image {
    width: 100%;
    height: 100%;
    padding-right: 40px;
    position: relative;
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-image:hover img {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.about-right {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding-left: 40px;
}

.about-title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
    transition: color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.title-highlight {
    color: var(--accent-color);
    font-weight: 700;
    transition: color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.title-gray {
    color: #5A7A8F;
    font-weight: 400;
    transition: color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-description-text {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-description-text p {
    font-size: 19px;
    line-height: 1.7;
    color: rgba(12, 4, 7, 0.7);
    margin: 0;
    transition: color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.services-section {
    padding: 140px 0 160px 0;
    background-color: var(--accent-color);
}

.services-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 60px;
}

.services-header-new {
    margin-bottom: 100px;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

.services-main-title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    line-height: 1.25;
    color: white;
    margin: 0;
    text-align: center;
}

.title-white {
    color: white;
    font-weight: 400;
    opacity: 0.7;
}

.services-grid-new {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.service-card-new {
    background-color: white;
    padding: 56px 48px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    cursor: pointer;
}

.service-card-new:focus {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: -3px;
}

.service-card-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent-color) 0%, rgb(17, 70, 110) 100%);
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.service-card-new:hover::before {
    opacity: 1;
}

.service-card-new > * {
    position: relative;
    z-index: 2;
}

.service-card-arrow {
    position: absolute;
    top: 24px;
    right: 24px;
    color: var(--accent-color);
    opacity: 0;
    transform: translate(8px, -8px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.service-card-new:hover .service-card-arrow {
    opacity: 1;
    transform: translate(0, 0);
    color: white;
}

.service-featured {
    grid-row: span 2;
    min-height: auto;
}

.service-tag {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 20px;
    display: inline-block;
    transition: color 0.4s ease;
}

.service-card-new:hover .service-tag {
    color: rgba(255, 255, 255, 0.8);
}

.service-title-new {
    font-size: 28px;
    font-weight: 600;
    color: var(--accent-color);
    margin: 0 0 10px 0;
    line-height: 1.2;
    transition: color 0.4s ease;
}

.service-card-new:hover .service-title-new {
    color: white;
}

.service-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(12, 4, 7, 0.6);
    margin: 0;
    transition: color 0.4s ease;
}

.service-card-new:hover .service-excerpt {
    color: rgba(255, 255, 255, 0.9);
}

.service-card-new:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.projects-section {
    padding: 140px 0 100px 0;
    background-color: #ffffff;
}

.projects-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 60px;
}

.projects-header {
    margin-bottom: 80px;
    text-align: center;
}

.projects-title {
    font-size: clamp(40px, 5vw, 64px);
    font-weight: 700;
    color: var(--accent-color);
    margin: 0;
    line-height: 1.2;
}

.title-light {
    font-weight: 400;
    color: rgba(21, 84, 132, 0.4);
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: repeat(2, 400px);
    gap: 16px;
}

.project-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.project-large {
    grid-row: span 2;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent-color) 0%, rgb(17, 70, 110) 100%);
    opacity: 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 24px;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-overlay {
    opacity: 0.9;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-arrow {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 5;
    color: white;
    opacity: 0;
    transform: translate(8px, -8px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-arrow {
    opacity: 1;
    transform: translate(0, 0);
}

.footer {
    background-color: #ffffff;
    border-top: 1px solid rgba(12, 4, 7, 0.06);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.03);
    position: relative;
}

.footer-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 80px 60px 0 60px;
}

.footer-content {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 80px;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.footer-contacts {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.footer-contact-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-label {
    font-size: 14px;
    font-weight: 400;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.footer-link {
    font-size: 14px;
    font-weight: 400;
    color: rgba(12, 4, 7, 0.7);
    text-decoration: none;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-link:hover {
    color: rgba(12, 4, 7, 0.9);
}

.footer-email {
    font-size: 14px;
    font-weight: 400;
    color: rgba(12, 4, 7, 0.7);
    text-decoration: none;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-email:hover {
    color: rgba(12, 4, 7, 0.9);
}

.footer-address {
    font-size: 14px;
    font-weight: 400;
    color: rgba(12, 4, 7, 0.6);
    margin: 0;
    line-height: 1.6;
}

.footer-certifications {
    display: flex;
    gap: 32px;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

.footer-cert {
    height: 40px;
    width: auto;
    opacity: 0.7;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-cert:hover {
    opacity: 1;
}

.footer-bottom {
    padding-top: 16px;
    padding-bottom: 16px;
    border-top: 1px solid rgba(12, 4, 7, 0.06);
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    position: relative;
}

.footer-legal {
    font-size: 14px;
    font-weight: 400;
    color: rgba(12, 4, 7, 0.4);
    margin: 0;
    text-align: center;
    grid-column: 2;
}

.mobile-break {
    display: none;
}

.footer-crafted {
    grid-column: 3;
    justify-self: end;
    margin-right: 60px;
    opacity: 0.4;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-crafted:hover {
    opacity: 0.8;
}

.footer-crafted img {
    height: 12px;
    width: auto;
    display: block;
}

.footer-privacy-link,
.footer-privacy-link:link,
.footer-privacy-link:visited,
.footer-privacy-link:hover,
.footer-privacy-link:active,
.footer-privacy-link:focus,
a.footer-privacy-link,
a.footer-privacy-link:link,
a.footer-privacy-link:visited,
a.footer-privacy-link:hover,
a.footer-privacy-link:active {
    color: rgba(12, 4, 7, 0.4) !important;
    text-decoration: none !important;
    -webkit-text-decoration: none !important;
    -webkit-text-fill-color: rgba(12, 4, 7, 0.4) !important;
    -webkit-tap-highlight-color: transparent !important;
}

.page-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    padding: 200px 0 120px 0;
}

.page-hero-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 60px;
    text-align: center;
}

.page-hero-title {
    font-size: clamp(48px, 8vw, 80px);
    font-weight: 700;
    color: var(--accent-color);
    margin: 0 0 24px 0;
    line-height: 1.1;
}

.page-hero-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 400;
    color: rgba(12, 4, 7, 0.6);
    margin: 0;
    line-height: 1.6;
    white-space: nowrap;
}

.servizi-section-new {
    padding: 0;
    background-color: #ffffff;
}

.servizi-container-new {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0;
}

.servizio-block {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0;
    min-height: 100vh;
    position: relative;
    padding: 0 80px;
    align-items: center;
}

.servizio-content {
    grid-column: 1 / 7;
    z-index: 2;
    padding: 120px 0;
}

.servizio-content.wide {
    grid-column: 3 / 11;
}

.servizio-content .num {
    display: block;
    font-size: 180px;
    font-weight: 700;
    color: rgba(21, 84, 132, 0.03);
    line-height: 1;
    margin-bottom: -40px;
    letter-spacing: -0.03em;
}

.servizio-content h2 {
    font-size: clamp(48px, 6vw, 96px);
    font-weight: 700;
    color: var(--accent-color);
    margin: 0 0 40px 0;
    line-height: 0.95;
    letter-spacing: -0.03em;
}

.servizio-content p {
    font-size: 21px;
    line-height: 1.7;
    color: rgba(12, 4, 7, 0.7);
    margin: 0;
    max-width: 1600px;
}

.image-float {
    overflow: hidden;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.12);
}

.image-float img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-float:hover img {
    transform: scale(1.05);
}

.lavori-gallery {
    padding: 100px 0 120px 0;
    background-color: #ffffff;
}

.lavori-gallery-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 60px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 300px;
    gap: 20px;
    grid-auto-flow: dense;
}

.gallery-item {
    overflow: hidden;
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    opacity: 0;
    transform: translate(8px, -8px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 32px;
    right: 32px;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 12L12 4M12 4H4M12 4V12' stroke='%23155484' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    transform: translate(8px, -8px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
}

.gallery-item:hover::after,
.gallery-item:hover::before {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    z-index: 10;
}

.gallery-item.tall {
    grid-row: span 2;
}

.gallery-item.wide {
    grid-column: span 2;
}

.gallery-item.big {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lightbox-content {
    position: relative;
    z-index: 2;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox.active .lightbox-content img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 40px;
    right: 40px;
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
}

.lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-close svg {
    width: 24px;
    height: 24px;
}

.cta-finale {
    padding: 120px 0;
    background-color: var(--accent-color);
    text-align: center;
}

.cta-finale-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 60px;
}

.cta-finale-title {
    font-size: clamp(40px, 5vw, 64px);
    font-weight: 700;
    color: white;
    margin: 0 0 24px 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
    max-width: 1600px;
}

.cta-finale-text {
    font-size: 20px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 40px 0;
    max-width: 1600px;
}

.button-large {
    padding: 16px 32px;
    font-size: 16px;
}

.button-white {
    background-color: var(--accent-color);
    color: white;
}

.button-white:hover {
    background-color: rgb(17, 70, 110);
    color: white;
    transform: translateY(-1px);
}

.button-white .button-arrow-wrapper svg path {
    stroke: white;
}

.contact-section {
    padding: 120px 0;
    background-color: #ffffff;
}

.contact-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 60px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: stretch;
}

.contact-info {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.contact-map {
    width: 100%;
    flex: 1;
    min-height: 350px;
    margin-top: 48px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.contact-map iframe {
    filter: grayscale(20%) contrast(1.05);
    transition: filter 0.3s ease;
}

.contact-map:hover iframe {
    filter: grayscale(0%) contrast(1);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.contact-detail-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-detail-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-detail-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.contact-detail-value {
    font-size: 16px;
    font-weight: 400;
    color: rgba(12, 4, 7, 0.7);
    text-decoration: none;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    line-height: 1.6;
}

a.contact-detail-value:hover {
    color: var(--accent-color);
}

.contact-form-wrapper {
    background-color: #f8f9fa;
    padding: 48px;
    border-radius: 0;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-color);
    letter-spacing: 0.3px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: rgba(12, 4, 7, 0.9);
    background-color: white;
    border: 1px solid rgba(12, 4, 7, 0.1);
    border-radius: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(21, 84, 132, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 140px;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(12, 4, 7, 0.4);
}

.contact-features {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid rgba(12, 4, 7, 0.1);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: rgba(12, 4, 7, 0.8);
}

.contact-feature svg {
    flex-shrink: 0;
    color: var(--accent-color);
}

.servizi-list {
    padding: 120px 0 140px 0;
    background-color: #ffffff;
}

.servizi-list-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px 40px;
}

.servizio-item {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 48px;
    background-color: #f8f9fa;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.servizio-item.has-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 400px;
}

.servizio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.servizio-content-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.servizio-item.has-image .servizio-number {
    color: rgba(255, 255, 255, 0.2);
}

.servizio-item.has-image .servizio-title {
    color: white;
}

.servizio-item.has-image .servizio-description {
    color: rgba(255, 255, 255, 0.95);
}

.servizio-item.has-image:hover .servizio-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.servizio-item:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

.servizio-item:not(.has-image):hover {
    background-color: #ffffff;
}

.servizio-item.featured {
    grid-column: span 2;
}

.servizio-item.featured:not(.has-image) {
    background-color: var(--accent-color);
}

.servizio-item.featured:not(.has-image):hover {
    background-color: rgb(17, 70, 110);
}

.servizio-item.featured:not(.has-image) .servizio-number {
    color: rgba(255, 255, 255, 0.15);
}

.servizio-item.featured:not(.has-image) .servizio-title {
    color: white;
}

.servizio-item.featured:not(.has-image) .servizio-description {
    color: rgba(255, 255, 255, 0.9);
}

.servizio-number {
    font-size: 80px;
    font-weight: 700;
    color: rgba(21, 84, 132, 0.1);
    line-height: 1;
    letter-spacing: -0.02em;
}

.servizio-title {
    font-size: clamp(28px, 3vw, 36px);
    font-weight: 700;
    color: var(--accent-color);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.servizio-description {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(12, 4, 7, 0.7);
    margin: 0;
}

.servizi-image-break {
    width: 100%;
    margin: 40px 0;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.servizi-image-break img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.servizi-image-break:hover img {
    transform: scale(1.03);
}

.error-404 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    padding: 180px 60px 120px 60px;
}

.error-404-container {
    max-width: 800px;
    margin: 0 auto;
}

.error-404-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.error-404-number {
    font-size: clamp(120px, 20vw, 200px);
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
    margin: 0;
    opacity: 0.15;
    letter-spacing: -0.03em;
}

.error-404-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    color: var(--accent-color);
    margin: 0;
    line-height: 1.2;
}

.error-404-text {
    font-size: clamp(16px, 2vw, 20px);
    color: rgba(12, 4, 7, 0.6);
    margin: 0 0 16px 0;
    line-height: 1.6;
    max-width: 500px;
}

.error-404-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 16px;
}

@media (max-width: 768px) {
    .error-404 {
        padding: 160px 20px 100px 20px;
    }

    .error-404-buttons {
        flex-direction: column;
        width: 100%;
    }

    .error-404-buttons .button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    /* Semplifica animazioni su mobile - solo fade-in-up per tutto */
    .fade-in-left,
    .fade-in-right {
        transform: translateY(30px) !important;
    }

    .fade-in-left.is-visible {
        animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    }

    .fade-in-right.is-visible {
        animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    }

    .fade-in-up {
        transform: translateY(30px);
    }

    .fade-in-scale {
        transform: translateY(30px) scale(1) !important;
    }

    .fade-in-scale.is-visible {
        animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    }

    /* Hero mobile - forza altezza 100vh */
    .hero {
        min-height: 100vh;
        min-height: 100svh; /* Safari mobile fix */
        height: 100vh;
        height: 100svh;
    }

    .hero-content {
        padding: 0 20px;
    }

    .services-section {
        padding: 80px 0 100px 0;
    }

    .services-container {
        padding: 0 20px;
    }

    .services-header-new {
        margin-bottom: 60px;
        max-width: 100%;
    }

    .services-main-title {
        font-size: 28px;
        text-align: center;
    }

    .services-grid-new {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .service-card-new {
        padding: 40px 32px;
        min-height: 200px;
    }

    .service-featured {
        grid-row: span 1;
    }

    .service-title-new {
        font-size: 24px;
    }

    .service-card-arrow {
        top: 20px;
        right: 20px;
        opacity: 1;
        transform: translate(0, 0);
    }

    .projects-section {
        padding: 80px 0 60px 0;
    }

    .projects-container {
        padding: 0 20px;
    }

    .projects-header {
        margin-bottom: 48px;
    }

    .projects-title {
        font-size: 36px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 12px;
    }

    .project-card {
        min-height: 280px;
    }

    .project-large {
        grid-row: span 1;
    }

    .project-card .project-arrow {
        opacity: 1 !important;
        transform: translate(0, 0) !important;
        position: absolute;
        top: 20px;
        right: 20px;
        z-index: 10;
        color: white;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    }

    .project-overlay {
        display: none;
    }

    .footer-container {
        padding: 60px 20px 40px 20px;
    }

    .footer-content {
        gap: 36px;
    }

    .footer-main {
        flex-direction: column;
        gap: 40px;
        align-items: center;
        text-align: center;
    }

    .footer-info {
        align-items: center;
    }

    .footer-contacts {
        flex-direction: column;
        gap: 24px;
        align-items: center;
    }

    .footer-certifications {
        justify-content: center;
        gap: 24px;
    }

    .footer-cert {
        height: 32px;
    }

    .footer-bottom {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .footer-legal {
        grid-column: 1;
    }

    .footer-crafted {
        grid-column: 1;
        justify-self: center;
        margin-right: 0;
    }

    .footer-crafted img {
        height: 10px;
    }

    .footer-bottom {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .footer-bottom a[href="/privacy-policy"] {
        margin-left: 0 !important;
        text-align: center;
        order: 2;
    }

    .footer-legal {
        order: 1;
        text-align: center;
    }

    .mobile-break {
        display: inline;
    }

    .footer-crafted {
        margin-right: 0 !important;
        justify-self: center;
        order: 3;
    }

    .page-hero {
        padding: 160px 0 100px 0;
    }

    .page-hero-container {
        padding: 0 20px;
    }

    .servizi-grid-section {
        padding: 80px 0 100px 0;
    }

    .servizi-grid-container {
        padding: 0 20px;
    }

    .servizi-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .servizio-card {
        padding: 40px 32px;
        min-height: 200px;
    }

    .servizio-large {
        grid-row: span 1;
        min-height: 300px;
    }

    .page-hero-subtitle {
        white-space: normal;
    }

    .servizio-block {
        min-height: auto;
        padding: 80px 20px;
        display: flex;
        flex-direction: column;
        gap: 40px;
    }

    .servizio-content,
    .servizio-content.wide {
        grid-column: 1 / -1;
        padding: 0;
    }

    .servizio-content .num {
        font-size: 80px;
        margin-bottom: -20px;
    }

    .servizio-content h2 {
        font-size: 40px;
        margin-bottom: 24px;
    }

    .servizio-content p {
        font-size: 17px;
        max-width: 100%;
    }

    .image-float {
        margin: 60px auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .lavori-gallery {
        padding: 60px 0 80px 0;
    }

    .lavori-gallery-container {
        padding: 0 20px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
        gap: 16px;
    }

    .gallery-item.tall {
        grid-row: span 2;
        grid-auto-rows: 250px;
    }

    .gallery-item.wide,
    .gallery-item.big {
        grid-column: span 1;
        grid-row: span 1;
    }

    .gallery-item:hover {
        transform: translateY(-4px);
    }

    .gallery-item::after {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }

    .gallery-item::before {
        opacity: 1;
        transform: translate(0, 0);
    }

    .cta-finale {
        padding: 80px 0;
    }

    .cta-finale-container {
        padding: 0 20px;
    }

    .cta-finale-title {
        font-size: 32px;
        margin-bottom: 20px;
        line-height: 1.2;
    }

    .cta-finale-text {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: 32px;
    }

    .button-large {
        width: 100%;
        justify-content: center;
        padding: 14px 28px;
        font-size: 15px;
    }

    .lightbox-close {
        position: fixed;
        top: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }

    .lightbox-close svg {
        width: 20px;
        height: 20px;
    }

    .lightbox-content {
        max-width: 95vw;
        max-height: 85vh;
        padding: 0 20px;
    }

    .lightbox-content img {
        max-height: 85vh;
    }

    .contact-section {
        padding: 50px 0 80px 0;
    }

    .contact-container {
        padding: 0 20px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 60px;
        align-items: start;
    }

    .contact-info {
        height: auto;
    }

    .contact-map {
        height: 400px;
        min-height: 400px;
        margin-top: 32px;
        flex: none;
    }

    .contact-map iframe {
        width: 100% !important;
        height: 100% !important;
    }

    .contact-details {
        gap: 20px;
        text-align: center;
        align-items: center;
    }

    .contact-form-wrapper {
        padding: 32px 24px;
    }

    .contact-form {
        gap: 20px;
    }

    .contact-features {
        margin-top: 40px;
        padding-top: 32px;
    }

    .contact-feature {
        font-size: 14px;
    }

    .servizi-list {
        padding: 80px 0 100px 0;
    }

    .servizi-list-container {
        padding: 0 20px;
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .servizio-item {
        padding: 32px 24px;
        gap: 16px;
    }

    .servizio-item.featured {
        grid-column: span 1;
    }

    .servizio-number {
        font-size: 48px;
    }

    .servizio-title {
        font-size: 24px;
    }

    .servizio-description {
        font-size: 15px;
    }
}

@media (max-width: 1024px) {
    .about-section {
        padding: 100px 0;
    }

    .about-container {
        padding: 0 40px;
    }

    .about-content {
        gap: 60px;
    }

    .about-title {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .about-section {
        padding: 15px 0 80px 0;
    }

    .about-container {
        padding: 0 20px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
        display: flex;
        flex-direction: column;
    }

    .about-right {
        gap: 24px;
        padding-left: 0;
        order: 1;
        text-align: center;
    }

    .about-image {
        padding-right: 0;
        order: 2;
    }

    .about-image img {
        width: 100%;
        height: auto;
        aspect-ratio: 4/3;
    }

    .about-title {
        font-size: 28px;
    }

    .about-description-text p {
        font-size: 16px;
    }
}

@media (max-width: 1200px) {
    .nav-content-block {
        padding: 20px 40px;
    }

    .nav-link-wrap {
        gap: 28px;
    }
}

@media (max-width: 991px) {
    .nav-menu {
        display: none;
    }

    .nav-right {
        display: none;
    }

    .menu-button {
        display: block;
    }
}

@media (max-width: 768px) {
    .nav-content-block {
        padding: 18px 20px;
    }

    .logo-img {
        height: 29px;
    }

    .logo-desktop {
        display: none;
    }

    .logo-mobile {
        display: block;
    }
}
