:root {
    --primary: #0b4f9e;
    --primary-dark: #083a75;
    --secondary: #1e293b;
    --accent: #0bf546;
    --text: #334155;
    --light: #f1f5f9;
    --white: #ffffff;
    --max-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    line-height: 1.6;
    background-color: var(--light);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section { padding: 80px 0; }
.bg-light { background-color: var(--white); }
.bg-dark { background-color: var(--secondary); color: var(--white); }
.text-white { color: var(--white); }

.text-center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.grid-3, .valori-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: stretch;
}

.grid-3 a {
    display: block;
    height: 100%;
}

.grid-4 {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 30px;
    align-items: stretch;
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.logo span { color: var(--primary); }

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 500;
    transition: 0.3s;
    font-size: 0.95rem;
}

.nav-menu a:hover { color: var(--primary); }

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px;
    background: var(--secondary);
    transition: 0.3s;
}

.btn-primary, .btn-secondary, .btn-full {
    display: inline-flex;
    height: 55px;
    width: 220px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0;
}

.btn-primary, .btn-full {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(79, 152, 235, 0.3);
}

.btn-primary:hover, .btn-full:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    margin-left: 0;
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: var(--white);
}

.btn-oro {
    display: inline-block;
    padding: 14px 35px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    background-color: #bfa15f !important;
    color: #ffffff !important;
    border: 1px solid #bfa15f !important;
    transition: all 0.3s ease;
}

.btn-oro:hover, .btn-oro:active {
    background-color: #deb86e !important;
    border-color: #deb86e !important;
    color: #ffffff !important;
    transform: translateY(-2px);
}

.btn-green {
    background-color: #2d6a4f;
    color: var(--white);
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    display: inline-block;
    transition: background 0.3s ease;
}

.btn-green:hover { background-color: #1b4332; }

.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #eef2ff 0%, #dbeafe 100%);
    margin-top: 80px;
    text-align: center;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 25px;
    line-height: 1.2;
    font-weight: 800;
}

.hero p {
    font-size: 1.2rem;
    color: #475569;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-content img {
    max-width: 100%;
    width: 500px;
    height: auto;
    margin-bottom: 30px;
    mix-blend-mode: multiply;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.hero-chi-siamo {
    padding: 80px 0;
    background: var(--white);
}

.hero-green {
    background-color: #f0fdf4;
    padding: 80px 0;
    border-bottom: 5px solid #2d6a4f;
}

.product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
    text-align: center;
    padding: 20px;
    border: 1px solid #f1f5f9;
}

.product-card p { flex-grow: 1; }
.product-card:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }

.product-img {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 3rem;
}

.product-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.product-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.badge-color { background: #e0f2fe; color: #0369a1; }
.badge-bw { background: #f1f5f9; color: #475569; }

.product-brand {
    color: #94a3b8;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-name {
    color: var(--secondary);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 5px 0 15px 0;
}

.product-category-title {
    border-left: 5px solid var(--primary);
    padding-left: 20px;
    margin: 60px 0 30px 0;
    color: var(--secondary);
}

.hub-card-large {
    text-decoration: none;
    background: var(--white);
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.hub-card-large:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.hub-img-large {
    height: 250px;
    overflow: hidden;
}

.hub-img-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hub-info-large {
    padding: 35px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.hub-info-large h3 {
    font-size: 1.6rem;
    color: #0f172a;
    margin-bottom: 15px;
    font-weight: 800;
}

.hub-info-large p {
    color: #64748b;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}

.hub-link {
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.green-card, .valore-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.green-card { border-top: 4px solid #2d6a4f; }
.valore-card { border-top: 4px solid var(--primary); }
.green-card:hover, .valore-card:hover { transform: translateY(-10px); }

.green-card img {
    height: 65px;
    width: auto;
    object-fit: contain;
    margin: 0 auto 20px auto;
    display: block;
}

.valore-card img {
    height: 55px;
    width: auto;
    object-fit: contain;
    margin: 0 auto 20px auto;
    display: block;
}

.green-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.valore-card h3 {
    color: var(--secondary);
    margin-bottom: 10px;
}

.valore-card p {
    color: var(--text);
    flex-grow: 1;
}

.sede-img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.sede-img:hover { transform: scale(1.02); }

.map-container {
    border-radius: 20px;
    overflow: hidden;
    height: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-top: 20px;
}

.brands-section {
    padding: 60px 0;
    background: var(--white);
    text-align: center;
}

.brands-image {
    max-width: 100%;
    height: auto;
    margin-top: 30px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.brands-image:hover { opacity: 1; }

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-form input, .contact-form select, .contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    font-family: inherit;
}

footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 40px 0;
    text-align: center;
    margin-top: auto;
}

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 900px) {
    .grid-3, .valori-grid {
        grid-template-columns: 1fr !important;
    }
    
    div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
        max-width: 450px !important;
        margin: 0 auto;
    }
    
    .split-layout {
        grid-template-columns: 1fr !important;
        gap: 30px;
        text-align: center;
    }
    
    .chi-siamo-immagine {
        order: -1;
        margin-bottom: 20px;
    }

    .sede-img {
        max-width: 100%;
        height: auto;
        border-radius: 15px;
    }
    
    .hero-chi-siamo h1 {
        font-size: 2rem !important;
    }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    
    .contact-wrapper { grid-template-columns: 1fr; }
    
    .grid-4 { grid-template-columns: 1fr !important; }

    .hamburger { display: block; }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        padding: 20px 0;
    }

    .nav-menu.active { left: 0; }
    
    .nav-menu ul { flex-direction: column; }
    
    .hero-content img { width: 250px; }
    
    .hero-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .btn-primary, .btn-secondary, .btn-full {
        width: 100%;
        max-width: 280px;
        margin: 0 !important;
    }
    
    .btn-secondary { margin-top: 10px; }
}