/* ==========================================================================
   FONT LOCALE: INTER (300, 400, 600, 700)
   ========================================================================== */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('inter-light.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('inter-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('inter-semibold.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('inter-bold.woff2') format('woff2');
}

/* ==========================================================================
   VARIABILI E RESET (MODERNO)
   ========================================================================== */
:root {
    --colore-primario: #0B2447; 
    --colore-primario-light: #19376D;
    --colore-accento: #FF6B35; 
    --colore-accento-hover: #E85D2A;
    --colore-testo: #334155; 
    --colore-testo-light: #64748B;
    --colore-sfondo: #F8FAFC; 
    --colore-bianco: #ffffff;
    --font-principale: 'Inter', system-ui, -apple-system, sans-serif;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
}

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

body {
    font-family: var(--font-principale);
    color: var(--colore-testo);
    background-color: var(--colore-bianco);
    line-height: 1.7;
    /* PADDING-BOTTOM RIMOSSO PER RECUPERARE LO SPAZIO DEL VECCHIO MENU */
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: var(--colore-primario); transition: all 0.2s ease; }

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 0;
}

h1, h2, h3 {
    color: var(--colore-primario);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

h2 { font-size: 2.2rem; }

.lead-text { 
    font-size: 1.15rem; 
    color: var(--colore-testo-light); 
    max-width: 800px; 
    margin: 0 0 1.5rem 0; 
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px; padding: 0;
    margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); border: 0;
}

/* ==========================================================================
   BOTTONI
   ========================================================================== */
.btn-primary, .btn-submit {
    display: inline-block;
    background-color: var(--colore-accento);
    color: var(--colore-bianco);
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.05rem;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.btn-primary:hover, .btn-submit:hover {
    background-color: var(--colore-accento-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.btn-outline-white {
    display: inline-block;
    border: 2px solid var(--colore-bianco);
    color: var(--colore-bianco);
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
}

.btn-outline-white:hover {
    background-color: var(--colore-bianco);
    color: var(--colore-primario);
}

/* ==========================================================================
   HEADER & HERO
   ========================================================================== */
.main-header {
    background-color: var(--colore-primario);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.menu-trigger {
    background: transparent;
    border: none;
    color: var(--colore-bianco);
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.menu-trigger:hover {
    color: var(--colore-accento);
}

.hero {
    background: linear-gradient(135deg, var(--colore-sfondo) 0%, #e2e8f0 100%);
    padding: 3rem 1rem 4rem 1rem;
}

.hero h1 { font-size: 2.5rem; letter-spacing: -1px; }
.hero p { 
    font-size: 1.15rem; 
    margin: 0 0 2rem 0; 
    color: var(--colore-testo-light); 
    max-width: 800px; 
}

@media (min-width: 992px) {
    .hero { padding: 3rem 2rem; }
    .hero h1 { font-size: 3.5rem; }
}

/* ==========================================================================
   LAYOUT A GRIGLIA
   ========================================================================== */
.bg-grigio { background-color: var(--colore-sfondo); }
.bg-blue-dark { background-color: var(--colore-primario); color: white; }
.bg-blue-dark h2, .bg-blue-dark p { color: white; }

.grid-moderna {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.due-colonne { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card-moderna {
    background: var(--colore-bianco);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--colore-primario);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-moderna:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.link-scopri {
    display: inline-block;
    margin-top: 1rem;
    font-weight: 600;
    color: var(--colore-accento);
}

/* ==========================================================================
   COMPONENTI SPECIFICI
   ========================================================================== */
.card-step {
    padding: 2rem;
    background: var(--colore-bianco);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--colore-accento);
}
.step-number {
    background: var(--colore-accento);
    color: white;
    width: 50px; height: 50px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; font-weight: bold;
    margin: 0 0 1.5rem 0;
    box-shadow: var(--shadow-md);
}

.lista-check { list-style: none; padding-left: 0; }
.lista-check li {
    position: relative;
    padding-left: 35px;
    margin-bottom: 15px;
    font-size: 1.1rem;
}
.lista-check li::before {
    content: "✓";
    position: absolute;
    left: 0; top: 0;
    color: var(--colore-accento);
    font-weight: bold;
    font-size: 1.3rem;
}

.pill-container {
    display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 12px; margin-top: 2rem;
}
.pill {
    background-color: var(--colore-bianco);
    color: var(--colore-primario);
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
}
.pill:hover {
    background-color: var(--colore-primario);
    color: white;
}

.form-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
}
.form-moderno { display: flex; flex-direction: column; gap: 1.2rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: var(--font-principale);
    font-size: 1rem;
    transition: border-color 0.3s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--colore-primario);
    box-shadow: 0 0 0 3px rgba(11, 36, 71, 0.1);
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-list { max-width: 900px; margin-top: 2.5rem; }
.faq-item { margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid #cbd5e1; }
.faq-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.faq-item h3 { font-size: 1.3rem; margin-bottom: 0.8rem; color: var(--colore-primario); }
.faq-item p { color: var(--colore-testo-light); margin: 0; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer {
    background-color: var(--colore-primario);
    color: white;
    padding: 3rem 0 1rem 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}
.footer-bottom {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; font-size: 0.9rem; color: #cbd5e1;
}
.footer-legal a { color: #cbd5e1; margin-left: 15px; }
.footer-grid a { color: var(--colore-bianco); font-weight: bold; }
.footer-grid a:hover { color: var(--colore-accento); }

/* ==========================================================================
   BLOB MENU OVERLAY & ANIMAZIONI 
   ========================================================================== */

body.menu-active { overflow: hidden; }

#menu-blob {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 9999;
    pointer-events: none; 
}

#menu-blob.open { pointer-events: auto; }

.blob-shape {
    position: absolute;
    top: -20%; right: -20%;
    width: 0; height: 0;
    background: var(--colore-primario);
    border-radius: 50%;
    transition: all 1.2s cubic-bezier(0.7, 0, 0.3, 1);
    transform-origin: top right;
}

#menu-blob.open .blob-shape {
    width: 250vw; height: 350vh;
    border-radius: 0;
}

.overlay-content {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch; 
    display: flex;
    opacity: 0;
    transition: opacity 0.4s ease 0.3s; 
}

#menu-blob.open .overlay-content { opacity: 1; }

.btn-close {
    position: fixed; 
    top: 30px; right: 30px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 10px;
    z-index: 10001; 
}

.btn-close:hover {
    transform: rotate(90deg) scale(1.1);
    color: var(--colore-accento);
}

.menu-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 1000px;
    gap: 40px;
    margin: auto; 
    padding: 100px 0; 
}

@media (min-width: 768px) {
    .menu-layout {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.menu-brand {
    display: flex;
    flex-direction: column;
    align-items: center; 
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

#menu-blob.open .menu-brand {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
}

.menu-logo {
    width: 240px; 
    height: auto;
    margin-bottom: -5px; 
}

.menu-brand-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-left: 28px; 
    display: block;
}

.menu-links {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 768px) {
    .menu-links { align-items: flex-end; text-align: right; }
}

@media (max-width: 767px) {
    .menu-links { align-items: center; text-align: center; gap: 15px; }
}

.stagger-link {
    font-size: clamp(1.8rem, 3.5vw, 3rem); 
    font-weight: 900;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: -1px; 
    line-height: 1.1;
    display: block;
    transform: translateY(40px);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease, color 0.3s ease;
}

.open .stagger-link {
    transform: translateY(0);
    opacity: 1;
}

/* Colora di accento la voce principale della pagina in cui ci troviamo */
.stagger-link.active {
    color: var(--colore-accento) !important;
}

/* Ritardi a cascata per i 6 elementi principali */
.open .menu-links > li:nth-child(1) > .stagger-link { transition-delay: 0.3s; }
.open .menu-links > li:nth-child(2) > .stagger-link { transition-delay: 0.35s; }
.open .menu-links > li:nth-child(3) > .stagger-link { transition-delay: 0.4s; }
.open .menu-links > li:nth-child(4) > .stagger-link { transition-delay: 0.45s; }
.open .menu-links > li:nth-child(5) > .stagger-link { transition-delay: 0.5s; }
.open .menu-links > li:nth-child(6) > .stagger-link { transition-delay: 0.55s; }

.hover-color-blue:hover { 
    color: #ffffff !important; 
    transform: scale(1.05); 
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.6); 
    transition: all 0.05s ease !important; 
}

.highlight {
    color: #ff9f66 !important;
}

.highlight:hover {
    color: #fff;
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    transition: all 0.05s ease !important;
}

/* =======================================
   SOTTOMENU A TENDINA
   ======================================= */
.dropdown-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.dropdown-toggle .arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.dropdown-toggle.active .arrow {
    transform: rotate(180deg);
    color: #fff; 
}

.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0; 
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease, margin 0.4s ease;
}

.submenu.open-dropdown {
    max-height: 500px; 
    opacity: 1;
    margin-top: 10px;
    margin-bottom: 20px;
}

.submenu-link {
    font-size: 1.2rem; 
    font-weight: 700;
    text-transform: none; 
    text-decoration: none;
    color: rgba(255, 255, 255, 0.5); 
    display: block;
    padding: 8px 20px; 
    transition: all 0.3s ease;
}

.submenu-link:hover {
    color: #fff;
    transform: translateX(10px); 
    transition: all 0.08s ease !important;
}

/* Colora di accento la voce della pagina in cui ci troviamo */
.submenu-link.active {
    color: var(--colore-accento);
}

@media (max-width: 768px) {
    .submenu-link:hover {
        transform: scale(1.05); 
    }
}