* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    height: 100%;
    background-color: #0a0a0a;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #ffffff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ANIMAZIONE REVEAL TENDINE INIZIALI */
.curtain-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}
.curtain {
    width: 100%;
    height: 50vh;
    background-color: #ffffff;
}
.curtain-top {
    transform-origin: top center;
    animation: slideUp 1.2s cubic-bezier(0.85, 0, 0.15, 1) forwards;
    animation-delay: 0.2s;
}
.curtain-bottom {
    transform-origin: bottom center;
    animation: slideDown 1.2s cubic-bezier(0.85, 0, 0.15, 1) forwards;
    animation-delay: 0.2s;
}
@keyframes slideUp { 0% { transform: translateY(0); } 100% { transform: translateY(-100%); } }
@keyframes slideDown { 0% { transform: translateY(0); } 100% { transform: translateY(100%); } }

/* ==========================================================================
   IL PANNELLO DEL MENU A COMPARSA
   ========================================================================== */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #0a0a0a; 
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5%;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.menu-inner {
    width: 100%;
    max-width: 1400px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-contacts {
    display: flex;
    flex-direction: column;
    gap: 35px;
    text-align: left;
}
.contact-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.contact-label {
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: #666666;
    font-weight: 700;
}
.contact-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
}
.contact-value a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}
.contact-value a:hover { color: #a0a0a0; }

.menu-navigation {
    text-align: right;
}
.menu-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.menu-links li a {
    font-size: 3.8rem; 
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
    line-height: 1.1;
    letter-spacing: -1px;
    display: inline-block;
    transition: transform 0.3s ease, color 0.3s ease;
}
.menu-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #444444;
    margin-right: 15px;
    vertical-align: super;
}
.menu-links li a:hover {
    color: #b0b0b0;
    transform: translateX(-10px);
}

/* ==========================================================================
   3. SEZIONE HERO - CONFIGURAZIONE DESKTOP (INGRANDITO E RIEMPITO)
   ========================================================================== */
.hero-section {
    width: 100%;
    height: 100vh;
    background-image: url("hero-desktop.jpg");
    background-size: auto 100vh;
    background-repeat: no-repeat;
    background-position: left bottom; 
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: flex-end;     
    padding: 0 5%;
}

/* HEADER DESKTOP: Centrato verticalmente e allineato all'altezza del logo */
.main-header {
    position: absolute;
    top: 50px;
    left: 5%;
    right: 5%;
    height: 72px; 
    z-index: 100; 
    display: flex;
    justify-content: space-between; 
    align-items: center; 
    animation: fadeInComponent 1s ease forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

/* PULSANTE PANINO DESKTOP */
.menu-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    width: 45px;
    height: 45px;
    padding: 0;
    gap: 8px; 
}
.hamburger-line {
    width: 36px; 
    height: 2px;
    background-color: #ffffff;
    display: block;
    transition: transform 0.3s ease, background-color 0.3s ease, width 0.3s ease;
}

.menu-toggle.open .hamburger-line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}
.menu-toggle.open .hamburger-line:nth-child(2) {
    transform: translateY(-5px) rotate(-45deg);
}

.logo-wrapper { 
    display: block; 
    height: 72px; 
    transition: opacity 0.3s ease; 
}
.logo-wrapper:hover { opacity: 0.8; }
.site-logo {
    height: 72px; 
    width: auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
}

/* FIX BLOCCO TESTI DESKTOP: Allargato al 60% per riempire meglio l'ombra scura */
.hero-text-block {
    max-width: 60%;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    z-index: 5;
    margin-top: 50px; 
}

/* FIX TITOLI DESKTOP: Ingrandito a 5.0rem per dare massima densità grafica */
.main-title {
    font-size: 5.0rem;
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -2px;
    margin-bottom: 35px;
    color: #ffffff !important;
}

.title-line {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUpText 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.title-line:nth-child(1) { animation-delay: 0.6s; }
.title-line:nth-child(2) { animation-delay: 0.8s; }
.title-line:nth-child(3) { animation-delay: 1.0s; }
.title-line:nth-child(4) { animation-delay: 1.2s; }
.main-payoff { 
    display: block;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUpText 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 1.5s; 
}

.outline-brand {
    color: transparent !important;
    -webkit-text-stroke: 1.5px #ffffff;
}

/* FIX PAYOFF DESKTOP: Ingrandito leggermente a 1.25rem per fare corpo con i titoli sovrastanti */
.main-payoff {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #a0a0a0;
    line-height: 1.45;
    text-transform: uppercase;
    width: 100%;
    max-width: 800px;
}

@keyframes fadeInUpText { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInComponent { to { opacity: 1; } }

/* ==========================================================================
   4. ADATTAMENTO RESPONSIVE PER SMARTPHONE (ISOLATO E PROTETTO)
   ========================================================================== */
@media screen and (max-width: 768px) {
    
    .menu-overlay {
        padding: 140px 8% 40px 8%;
        align-items: flex-start;
    }
    .menu-inner {
        flex-direction: column-reverse; 
        align-items: flex-start;
        gap: 50px;
    }
    .menu-navigation {
        text-align: right;
        width: 100%;
    }
    .menu-links li a {
        font-size: 2.1rem;
		line-height: 0.20;
    }
	.menu-group-services {
    margin-bottom: 20px !important;
    }
    .menu-number {
        font-size: 1.0rem;
        margin-right: 8px;
    }
    .menu-contacts {
        gap: 12px;
		width: 100%;
    text-align: right;
    align-items: flex-end;
    transform: translateY(-40px);
    }
    .contact-value {
        font-size: 1.0rem;
    }

    .hero-section {
        background-image: url("hero-mobile.jpg") !important;
        background-size: cover !important;
        background-repeat: no-repeat !important;
        background-position: center center !important; 
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-end !important; 
        align-items: flex-end !important;     
        padding-top: 0 !important;
        padding-bottom: 6dvh !important;       
        padding-left: 5% !important;
        padding-right: 5% !important;         
        height: 100dvh !important; 
    }

    .main-header {
        position: absolute !important;
        top: 30px !important;
        left: 5% !important;
        right: 5% !important;
        width: auto !important;
        height: 40px !important; 
    }

    .site-logo {
        height: 40px !important; 
    }

    .menu-toggle {
        width: 40px;
        height: 40px;
        gap: 6px;
    }
    .hamburger-line {
        width: 28px;
    }
    .menu-toggle.open .hamburger-line:nth-child(1) { transform: translateY(4px) rotate(45deg); }
    .menu-toggle.open .hamburger-line:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

    .hero-text-block {
        width: 100% !important;
        max-width: 50% !important; 
        text-align: right !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-end !important;
        margin-top: 0 !important;
		transform: translateY(-16vh) !important;
    }

    .main-title {
        font-size: 1.65rem !important;         
        line-height: 1.22 !important;         
        letter-spacing: -0.5px !important;
        margin-bottom: 20px !important;
        text-shadow: 0 4px 15px rgba(0, 0, 0, 0.7) !important;
        color: #ffffff !important;
    }

    .title-line {
        display: block !important;
        width: 100% !important;
    }

    .outline-brand {
        color: transparent !important;
        -webkit-text-stroke: 1px #ffffff !important; 
    }

    .main-payoff {
        font-size: 0.63rem !important;        
        letter-spacing: 1px !important;
        line-height: 1.3 !important;          
        max-width: 100% !important;           
        color: #b0b0b0 !important; 
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95) !important;
        text-transform: uppercase !important;
    }

    .second-phrase {
        margin-top: 6px !important;
    }

    .desktop-only-br {
        display: none !important;
    }
}
