:root {
    --color-primary: #0056b3;
    --color-primary-dark: #003366;
    --color-accent: #00c897;
    --color-dark: #1a1a2e;
    --color-light: #f4f7f9;
    --color-white: #ffffff;
    --color-text-muted: #6c757d;
    --font-main: 'Montserrat', sans-serif;
    --section-spacing: 5rem;
    --border-radius: 12px;
    --shadow-lg: 0 20px 40px rgba(0, 51, 102, 0.15);
    --shadow-sm: 0 5px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease-in-out;
}


/* montserrat-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/montserrat-v31-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* montserrat-500 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  src: url('../fonts/montserrat-v31-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* montserrat-700 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/montserrat-v31-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* montserrat-800 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 800;
  src: url('../fonts/montserrat-v31-latin-800.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}


* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-main); line-height: 1.7; color: var(--color-dark); background-color: var(--color-white); overflow-x: hidden; }

/* Utilities */
.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.section-padding { padding: var(--section-spacing) 0; }
.bg-light { background-color: var(--color-light); }
.bg-dark { background-color: var(--color-dark); color: var(--color-white); }
.bg-blue { background-color: var(--color-primary); }
.text-center { text-align: center; }
.text-white { color: var(--color-white) !important; }
.text-dark { color: var(--color-dark); }
.w-100 { width: 100%; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }
.p-4 { padding: 2rem; }
.gap-4 { gap: 2rem; }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.border-radius { border-radius: var(--border-radius); }
.color-primary { color: var(--color-primary); }
.color-accent { color: var(--color-accent); }

/* Typography */
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.5px; }
h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1.1; margin-bottom: 1rem; }
h2 { font-size: 2.5rem; margin-bottom: 1rem; color: var(--color-primary-dark); }
.section-title { position: relative; padding-bottom: 1rem; margin-bottom: 1.5rem; }
.section-title::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 80px; height: 4px; background: var(--color-accent); border-radius: 2px; }
.section-lead { font-size: 1.2rem; color: var(--color-text-muted); max-width: 800px; margin: 0 auto 2rem; }
p { margin-bottom: 1rem; }

/* --- HEADER WRAPPER & TOP BAR --- */
.header-wrapper { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; }



/* --- TOP BAR DEFINITIVA INFALLIBILE --- */
.top-bar { 
    background-color: var(--color-primary-dark); 
    color: var(--color-white); 
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.top-bar-layout { 
    display: flex !important; 
    justify-content: space-between !important; /* Questo FORZA il testo ai due lati opposti */
    align-items: center !important;
    height: 32px; 
    width: 100%;
}

.brand-info { 
    font-size: 0.75rem;
    opacity: 0.8; 
}

.numero-verde { 
    color: var(--color-white); 
    text-decoration: none; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.numero-verde strong { 
    font-size: 0.88rem; 
    color: var(--color-accent); 
    font-weight: 800; 
}

.numero-verde i { 
    color: var(--color-accent); 
    font-size: 0.75rem; 
}


/* Navbar */
#navbar { 
    position: relative; 
    width: 100%; 
    padding: 0.8rem 0; 
    background-color: #ffffff; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
    transition: padding 0.3s ease;
}
#navbar.scrolled { padding: 0.5rem 0; }
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 45px; width: auto; display: block; }

.nav-links ul { display: flex; list-style: none; align-items: center; gap: 1.5rem; }
.nav-links a { text-decoration: none; color: var(--color-dark); font-weight: 600; font-size: 0.85rem; transition: all 0.3s; position: relative; }

.nav-links a:not(.btn):hover, .nav-links a:not(.btn).active-link { color: var(--color-accent); }
.nav-links a.btn.active-link { background-color: #00a87e; color: var(--color-white) !important; box-shadow: inset 0 3px 6px rgba(0,0,0,0.15); }

.nav-links a:not(.btn)::after { content: ''; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 3px; background: var(--color-accent); border-radius: 2px; transition: width 0.3s ease; }
.nav-links a:not(.btn).active-link::after, .nav-links a:not(.btn):hover::after { width: 100%; }

.hamburger { display: none; cursor: pointer; color: var(--color-dark); font-size: 1.5rem; }

/* Aggiungi questo snippet per disegnare le linee del menu */
.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-primary-dark);
    margin: 5px auto;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* Buttons */
.btn { display: inline-block; padding: 0.7rem 1.4rem; border-radius: 50px; font-weight: 700; text-decoration: none; transition: var(--transition); border: 2px solid transparent; cursor: pointer; text-align: center; font-size: 0.85rem; }
.btn-primary { background-color: var(--color-primary); color: var(--color-white); }
.btn-primary:hover { background-color: var(--color-primary-dark); transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,86,179,0.3); }
.btn-accent { background-color: var(--color-accent); color: var(--color-white); }
.btn-accent:hover { background-color: #00a87e; transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0, 200, 151, 0.3); }
.btn-outline-white { border-color: var(--color-white); color: var(--color-white); }
.btn-outline-white:hover { background-color: var(--color-white); color: var(--color-primary-dark); }
.btn-outline-blue { border-color: var(--color-primary); color: var(--color-primary); }
.btn-outline-blue:hover { background-color: var(--color-primary); color: var(--color-white); }

/* Hero Slider */
#hero-slider { position: relative; height: 100vh; min-height: 600px; margin-top: 100px; overflow: hidden; background: var(--color-dark); }
.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0; transition: opacity 1s ease-in-out; z-index: 1; display: flex; align-items: center; }
.slide.active { opacity: 1; z-index: 2; }
.hero-bg-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(0, 51, 102, 0.85) 0%, rgba(0, 86, 179, 0.5) 100%); }
.hero-content { position: relative; z-index: 3; max-width: 800px; color: var(--color-white); }
.badge { display: inline-block; background: rgba(0, 200, 151, 0.2); color: var(--color-accent); padding: 0.5rem 1rem; border-radius: 20px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1.5rem; border: 1px solid var(--color-accent); }
.hero-subtitle { font-size: 1.1rem; margin-bottom: 2.2rem; opacity: 0.9; max-width: 600px; }
.cta-group { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Controlli Slider */
.slider-controls { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; z-index: 10; }
.slider-dot { width: 45px; height: 6px; background: rgba(255, 255, 255, 0.2); cursor: pointer; position: relative; overflow: hidden; border-radius: 4px; transition: background 0.3s; }
.slider-dot:hover { background: rgba(255, 255, 255, 0.4); }
.slider-dot-progress { position: absolute; top: 0; left: 0; height: 100%; width: 0%; background: var(--color-accent); }
.slider-dot.active .slider-dot-progress { animation: progressFill 6s linear forwards; }
@keyframes progressFill { 0% { width: 0%; } 100% { width: 100%; } }

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2.5rem; }
.two-cols { column-count: 2; column-gap: 2rem; }

/* Cards & Lists */
.card { background: var(--color-white); border: 1px solid #eee; }
.feature-card { background: var(--color-white); padding: 2.5rem 2rem; border-radius: var(--border-radius); box-shadow: var(--shadow-sm); transition: var(--transition); border-top: 4px solid transparent; height: 100%; }
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-top-color: var(--color-accent); }

.custom-card { border: 2px solid transparent; transition: transform 0.3s ease-in-out, border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out; }
.custom-card:hover { transform: scale(1.05); border-color: var(--color-primary); box-shadow: var(--shadow-lg) !important; z-index: 2; position: relative; }
.highlighted-card { border: 2px solid #b05b5a; }
.highlighted-card:hover { border-color: #b05b5a; }

.icon-box { font-size: 2.5rem; margin-bottom: 1rem; }
.tech-list { list-style: none; padding-left: 0; }
.tech-list li { margin-bottom: 0.8rem; position: relative; padding-left: 1.5rem; }
.tech-list li::before { content: ""; position: absolute; left: 0; top: 8px; width: 8px; height: 8px; background: var(--color-accent); border-radius: 50%; }

/* Content Blocks */
.content-block { max-width: 900px; margin: 0 auto; text-align: left; }

/* Contact Section */
.contact-wrapper { display: flex; border-radius: var(--border-radius); overflow: hidden; background: var(--color-white); }
.contact-info { flex: 2; padding: 4rem; }
.contact-form-container { flex: 3; padding: 4rem; }
.info-items .item { margin-bottom: 1.5rem; }
.info-items strong { display: block; font-size: 1.1rem; margin-bottom: 0.2rem; }
.info-items a { color: var(--color-white); text-decoration: none; opacity: 0.8; transition: opacity 0.3s; }
.info-items a:hover { opacity: 1; text-decoration: underline; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: var(--color-primary-dark); font-size: 0.9rem; }
.form-group input, .form-group select { width: 100%; padding: 1rem; border: 2px solid #eee; border-radius: 8px; font-family: inherit; font-size: 1rem; transition: var(--transition); }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--color-primary); background: #f9fcff; }

/* --- FOOTER GIBBS --- */
.gibbs-footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 3rem; }
.gibbs-brand p { font-style: italic; opacity: 0.7; font-size: 0.95rem; line-height: 1.5; }
.gibbs-contact li { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 1.2rem; color: rgba(255,255,255,0.7); }
.gibbs-contact i { color: var(--color-accent); margin-top: 5px; font-size: 1rem; }
.gibbs-contact a { color: rgba(255,255,255,0.7); text-decoration: none; transition: 0.3s; }
.gibbs-contact a:hover { color: var(--color-accent); }
.gibbs-nav li { margin-bottom: 0.8rem; }
.gibbs-nav a { color: rgba(255,255,255,0.7); text-decoration: none; transition: 0.3s; }
.gibbs-nav a:hover { color: var(--color-accent); }
.gibbs-bottom { background: rgba(0,0,0,0.25); padding: 1.5rem 0; border-top: 1px solid rgba(255,255,255,0.05); }
.gibbs-socials { display: flex; gap: 15px; }
.gibbs-socials a { color: rgba(255,255,255,0.7); font-size: 1.2rem; transition: 0.3s; }
.gibbs-socials a:hover { color: var(--color-accent); transform: translateY(-3px); display: inline-block; }

/* Scroll Reveal */
.fade-up { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.scroll-trigger { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.is-visible { opacity: 1!important; transform: translateY(0)!important; }
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }

/* Responsive */
@media (max-width: 992px) {
    /* Uccide la top bar su mobile */
    .topbar-hide-mobile { display: none !important; }
    #hero-slider { margin-top: 75px !important; }
    
    body > section:first-of-type {
        margin-top: 71px !important; 
    }

    /* Menu a tendina */
    .nav-links { 
        display: none; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        width: 100%; 
        background-color: #ffffff; 
        padding: 1.5rem 0; 
        box-shadow: 0 10px 15px rgba(0,0,0,0.1); 
        border-top: 1px solid #eee;
        z-index: 999;
    }
    .nav-links.active { display: block !important; }
    .nav-links ul { flex-direction: column; align-items: center; gap: 1.5rem; }
    
    /* Hamburger */
    .hamburger { display: block; cursor: pointer; padding: 10px; z-index: 1001; }
    .hamburger span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--color-primary-dark);
        margin: 5px auto;
        border-radius: 2px;
        transition: 0.3s;
    }
    
    /* Griglie standard mobile */
    .two-cols { column-count: 1; }
    .grid-2 { grid-template-columns: 1fr; }
    .gibbs-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    #hero-slider { height: auto; min-height: 80vh; margin-top: 75px !important; }
    .brand-info { display: none; }
    .section-padding { padding: 3rem 0; }
    .grid-3 { grid-template-columns: 1fr; }
    .gibbs-footer-grid { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
    .gibbs-brand img { margin: 0 auto; }
    .gibbs-certs li { justify-content: center; display: flex; align-items: center; }
    .gibbs-certs li a { display: flex; align-items: center; }
}