:root {
    /* Palette fedele al logo MATAG 3 */
    --color-primary: #1a6190;
    --color-primary-dark: #0e4a6e;
    --color-accent: #5a93b5;
    --color-silver: #9daab3;
    --color-light: #f4f7f9;
    --color-white: #ffffff;
    --color-dark: #1e2428;
    --color-text: #333333;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition-fast: 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    --transition-slow: 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

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

@media (pointer: fine) {
    * { cursor: none; }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-white);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ================= Scroll Progress Bar ================= */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    z-index: 10001;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* ================= Custom Cursor ================= */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    background-color: var(--color-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(26, 97, 144, 0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.1s, width 0.3s, height 0.3s, background-color 0.3s;
}

.cursor.hover {
    width: 0;
    height: 0;
}
.cursor-follower.hover {
    width: 80px;
    height: 80px;
    background-color: rgba(26, 97, 144, 0.1);
    border-color: var(--color-primary);
    backdrop-filter: blur(2px);
}

/* ================= Preloader ================= */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-white);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1);
}

.preloader.hide {
    transform: translateY(-100%);
}

.preloader-logo {
    height: 110px;
    width: auto;
    opacity: 0;
    transform: scale(0.88);
    animation: preloaderReveal 0.7s cubic-bezier(0.25, 1, 0.5, 1) 0.2s forwards;
}

@keyframes preloaderReveal {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.progress-bar {
    width: 160px;
    height: 2px;
    background: rgba(0,0,0,0.08);
    overflow: hidden;
    border-radius: 2px;
}

.progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    animation: loading 2s ease-in-out forwards;
    border-radius: 2px;
}

@keyframes loading {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* ================= Typography & Utilities ================= */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.1;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.section-padding {
    padding: 150px 0;
}

.section-subtitle {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--color-accent);
    margin-bottom: 20px;
    font-weight: 600;
}

/* ================= Navigation ================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 5%;
    display: flex;
    justify-content: center;
    z-index: 1000;
    transition: background-color 0.4s, padding 0.4s;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    padding: 14px 5%;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.nav-container {
    width: 100%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.logo {
    position: static;
    left: auto;
    transform: none;
}

.logo img {
    height: 82px;
    transition: var(--transition-fast);
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-dark);
    position: relative;
}

.nav-links a:not(.btn-primary)::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}
.nav-links a:not(.btn-primary):hover::after {
    width: 100%;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white) !important;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition-fast);
    display: inline-block;
    overflow: hidden;
    position: relative;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(26, 97, 144, 0.25);
}

/* ================= Hero Section ================= */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 5%;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.35) 100%);
}

/* Noise / grain texture Awwward */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.035;
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    padding-top: 100px;
    position: relative;
    z-index: 2;
}

.reveal-text {
    overflow: visible;
}

.hero h1 {
    font-size: clamp(3rem, 7vw, 7.5rem);
    color: var(--color-dark);
    text-transform: uppercase;
    letter-spacing: -2px;
    white-space: nowrap;
}

.hero h1.accent {
    color: var(--color-primary);
}

/* Character split animation */
.char {
    display: inline-block;
    opacity: 0;
    transform: translateY(60px);
    animation: charReveal 0.7s cubic-bezier(0.25, 1, 0.5, 1) both;
}

@keyframes charReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: #555;
    margin: 30px 0 50px;
    max-width: 580px;
    opacity: 0;
    animation: slideUpFade 0.9s cubic-bezier(0.25, 1, 0.5, 1) 2.6s both;
}

.hero .btn-primary {
    opacity: 0;
    animation: slideUpFade 0.9s cubic-bezier(0.25, 1, 0.5, 1) 2.8s both;
}

.scroll-indicator {
    position: absolute;
    bottom: 50px;
    left: 5%;
    display: flex;
    align-items: center;
    gap: 20px;
    opacity: 0;
    animation: fadeIn 1s 3s forwards;
    z-index: 2;
}

.scroll-indicator span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 600;
    color: var(--color-dark);
}

.scroll-indicator .line {
    width: 50px;
    height: 1px;
    background: var(--color-dark);
    position: relative;
    overflow: hidden;
}

.scroll-indicator .line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--color-primary);
    animation: scrollLine 2s infinite;
}

@keyframes scrollLine {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

/* ================= About Section ================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about h2 {
    font-size: clamp(2.5rem, 4vw, 4rem);
    margin-bottom: 30px;
    color: var(--color-dark);
}

.about p {
    font-size: 1.05rem;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.75;
}

.stats {
    display: flex;
    gap: 40px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--color-primary);
    font-variant-numeric: tabular-nums;
}

.stat-item p {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0;
    color: #888;
}

/* ISO & Cert Badge */
.cert-badges {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    align-items: center;
    flex-wrap: wrap;
}

.cert-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--color-light);
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 12px 18px;
    transition: var(--transition-fast);
}

.cert-badge:hover {
    border-color: var(--color-accent);
    box-shadow: 0 6px 20px rgba(26, 97, 144, 0.08);
    transform: translateY(-2px);
}

.cert-badge img {
    height: 44px;
    width: auto;
    object-fit: contain;
}

.cert-badge span {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-dark);
    line-height: 1.3;
    max-width: 100px;
}

.glass-card {
    background: rgba(90, 147, 181, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 60px;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.glass-card:hover::before {
    opacity: 1;
}

.about-logo-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.about-logo-large {
    width: 100%;
    max-width: 320px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.glass-content h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--color-primary);
}

.glass-content p {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.75;
}

/* ================= ISO 9001 Section ================= */
.iso-section {
    background-color: var(--color-light);
}

.iso-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 80px;
    align-items: center;
}

.iso-badge-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.iso-badge-wrap img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.12);
    display: block;
    margin: 0 auto;
}

.iso-stamp {
    position: absolute;
    bottom: -16px;
    right: 20px;
    background: var(--color-primary);
    color: var(--color-white);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(26, 97, 144, 0.3);
}

.iso-content h2 {
    font-size: clamp(2.5rem, 4vw, 4rem);
    margin-bottom: 24px;
    color: var(--color-dark);
}

.iso-content p {
    font-size: 1.05rem;
    color: #666;
    line-height: 1.75;
    margin-bottom: 32px;
}

.iso-features {
    list-style: none;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.iso-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    color: var(--color-text);
}

.iso-features li::before {
    content: '';
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 50%;
    background: var(--color-primary);
}

.iso-cta {
    display: inline-block;
}

@media (max-width: 992px) {
    .iso-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

/* ================= Products Section ================= */
.products {
    background-color: var(--color-light);
}

.section-header h2 {
    font-size: clamp(3rem, 5vw, 5rem);
    margin-bottom: 80px;
    max-width: 800px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 400px;
    gap: 24px;
    perspective: 1200px;
}

.product-card {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    padding: 40px;
    display: flex;
    align-items: flex-end;
    transition: box-shadow 0.4s ease;
    will-change: transform;
}

.product-card.large {
    grid-column: span 2;
    grid-row: span 2;
}

.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    transition: transform 0.8s ease;
}

.card-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-bg .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, transparent 100%);
}

.color-bg-1 { background: linear-gradient(135deg, #1a6190, #5a93b5); }
.color-bg-2 { background: linear-gradient(135deg, #1e2428, #3a454d); }
.color-bg-3 { background: linear-gradient(135deg, #e8edf2, #c8d4dc); }
.color-bg-4 { background: linear-gradient(135deg, #0d6b55, #1aab87); }

.product-card.wide {
    grid-column: span 2;
}

.product-card:hover .card-bg {
    transform: scale(1.06);
}

.product-card:hover {
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);
}

.card-content {
    position: relative;
    z-index: 2;
    color: var(--color-white);
}


.card-content h3 {
    font-size: 1.9rem;
    margin-bottom: 14px;
}

.card-content p {
    font-size: 0.97rem;
    opacity: 0.82;
    margin-bottom: 20px;
    max-width: 90%;
    line-height: 1.6;
}

.btn-text {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-text .arrow {
    transition: transform 0.3s;
}

.product-card:hover .arrow {
    transform: translateX(10px);
}

/* ================= Machines Showcase ================= */
.machines-showcase {
    margin-top: 60px;
}

.machines-showcase .section-subtitle {
    display: block;
    margin-bottom: 30px;
}

.machines-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.machines-grid--6 {
    grid-template-columns: repeat(6, 1fr);
}

.machine-card {
    background: var(--color-white);
    border: 1px solid #e0e6ed;
    border-radius: 20px;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    transition: var(--transition-fast);
}

.machine-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(26, 97, 144, 0.1);
    border-color: var(--color-accent);
}

.machine-card img {
    width: 100%;
    height: 160px;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.machine-card p {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-dark);
    text-align: center;
}

/* ================= Marquee ================= */
.sectors-marquee {
    padding: 100px 0;
    background-color: var(--color-primary);
    color: var(--color-white);
    overflow: hidden;
}

.marquee-container {
    width: 100%;
    overflow: hidden;
}

.marquee-track {
    display: flex;
    white-space: nowrap;
    animation: marquee 30s linear infinite;
}

.marquee-track span {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 5vw, 5rem);
    font-weight: 800;
    text-transform: uppercase;
    padding-right: 50px;
    -webkit-text-stroke: 1px rgba(255,255,255,0.45);
    color: transparent;
    transition: color 0.3s;
}

.marquee-track span:hover {
    color: var(--color-white);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ================= Brand Partners ================= */
.brands {
    background-color: var(--color-light);
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 60px;
}

.brand-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 24px;
    background: var(--color-white);
    border: 1px solid #eee;
    border-radius: 16px;
    transition: var(--transition-fast);
    min-height: 110px;
}

.brand-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 8px 30px rgba(26, 97, 144, 0.08);
    transform: translateY(-4px);
}

.brand-card img {
    max-width: 100%;
    max-height: 55px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.55;
    transition: filter 0.4s ease, opacity 0.4s ease;
}

.brand-card:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

.brand-card--crop img {
    object-fit: none;
    object-position: left center;
    width: 158px;
    height: 48px;
    max-width: 158px;
    max-height: 48px;
}

/* ================= Photo Gallery ================= */
.gallery {
    background-color: var(--color-white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 300px;
    gap: 16px;
    margin-top: 60px;
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item--tall { grid-row: span 2; }
.gallery-item--wide { grid-column: span 2; }
.gallery-item--full {
    grid-column: 1 / -1;
    height: 260px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    display: block;
}

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

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 97, 144, 0.78) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 28px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ================= Contact Box ================= */
.contact-box {
    background: var(--color-dark);
    border-radius: 40px;
    padding: 100px 5%;
    text-align: center;
    color: var(--color-white);
}

.contact-box h2 {
    font-size: clamp(2.5rem, 4vw, 4rem);
    margin-bottom: 20px;
}

.contact-box > p {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 50px;
}

.btn-primary.large {
    font-size: 1.2rem;
    padding: 20px 50px;
}

/* ================= Contact Form ================= */
.menu-toggle {
    display: none;
}

.contact-form {
    margin-top: 50px;
    text-align: left;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.form-group label {
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 16px 20px;
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s, background-color 0.3s;
    outline: none;
    width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.28);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.11);
}

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

/* Privacy checkbox in form */
.form-check {
    flex-direction: row;
    align-items: flex-start;
    gap: 14px;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border-radius: 4px;
    accent-color: var(--color-accent);
    cursor: pointer;
    margin-top: 2px;
    padding: 0;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
}

.form-check label {
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.5;
    color: rgba(255,255,255,0.65);
    font-weight: 400;
    cursor: pointer;
}

.form-check label a {
    color: var(--color-accent);
    text-decoration: underline;
}

.contact-form button[type="submit"] {
    width: 100%;
    border: none;
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

/* ================= Map Section ================= */
.map-section {
    background-color: var(--color-light);
}

.map-header {
    padding: 80px 5% 50px;
    text-align: center;
}

.map-header h2 {
    font-size: clamp(2rem, 3.5vw, 3.5rem);
    color: var(--color-dark);
    margin-bottom: 12px;
}

.map-header p {
    font-size: 1.05rem;
    color: #888;
}

.map-wrap {
    width: 100%;
    line-height: 0;
}

.map-wrap iframe {
    width: 100%;
    height: 420px;
    border: 0;
    display: block;
}

/* ================= Footer ================= */
.footer {
    padding: 80px 0 30px;
    background-color: var(--color-white);
    border-top: 1px solid #eee;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

.footer-logo {
    height: 56px;
    margin-bottom: 20px;
    transition: var(--transition-fast);
}

.footer-brand p {
    color: #888;
    max-width: 300px;
    font-size: 0.95rem;
    line-height: 1.65;
}

/* ISO badge nel footer */
.footer-iso {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.footer-iso img {
    height: 36px;
    width: auto;
    opacity: 0.65;
    transition: opacity 0.3s;
}

.footer-iso:hover img { opacity: 1; }

.footer-iso span {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    line-height: 1.3;
}

.footer h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--color-dark);
}

.footer-links a, .footer-contact p, .footer-contact a {
    display: block;
    color: #666;
    margin-bottom: 10px;
    font-size: 0.97rem;
    transition: color 0.2s;
}

.footer-links a:hover, .footer-contact a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 28px;
    border-top: 1px solid #eee;
    color: #999;
    font-size: 0.88rem;
}

.footer-bottom a {
    color: var(--color-primary);
    transition: color 0.2s;
}

.footer-bottom a:hover {
    color: var(--color-primary-dark);
}

.capital {
    font-weight: 600;
    color: var(--color-primary);
}

/* ================= Cookie Banner ================= */
.cookie-banner {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    background: var(--color-dark);
    color: var(--color-white);
    border-radius: 20px;
    padding: 24px 28px;
    max-width: 680px;
    width: calc(100% - 40px);
    z-index: 9997;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    gap: 16px;
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease;
    pointer-events: none;
}

.cookie-banner.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.cookie-banner p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.55;
    margin: 0;
}

.cookie-banner p a {
    color: var(--color-accent);
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-cookie-reject {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.75);
    padding: 10px 24px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-cookie-reject:hover {
    border-color: rgba(255,255,255,0.7);
    color: var(--color-white);
}

.btn-cookie-accept {
    background: var(--color-primary);
    border: 1px solid var(--color-primary);
    color: var(--color-white);
    padding: 10px 24px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-cookie-accept:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(26, 97, 144, 0.3);
}

/* ================= Animations (JS Triggered) ================= */
.fade-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease, transform 1s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

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

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

/* ================= Responsive ================= */
@media (max-width: 992px) {
    .about-grid { grid-template-columns: 1fr; gap: 50px; }
    .products-grid { grid-template-columns: 1fr 1fr; }
    .product-card.large { grid-column: span 2; grid-row: span 1; }
    .product-card.wide { grid-column: span 2; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .brands-grid { grid-template-columns: repeat(3, 1fr); }
    .gallery-grid { grid-template-columns: 1fr 1fr; }
    .gallery-item--tall { grid-row: span 1; }
    .gallery-item--full { height: 220px; }
    .machines-grid { grid-template-columns: repeat(2, 1fr); }
    .machines-grid--6 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(12px);
        z-index: 999;
        justify-content: center;
        align-items: center;
        gap: 40px;
    }
    .nav-links.open a {
        font-size: 2rem;
        font-weight: 800;
        font-family: var(--font-heading);
        color: var(--color-dark);
    }
    .nav-links.open .btn-primary {
        font-size: 1.5rem;
        padding: 16px 40px;
    }
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
    }
    .menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 6px;
        background: none;
        border: none;
        padding: 4px;
        z-index: 1001;
    }
    .menu-toggle span {
        width: 28px;
        height: 2px;
        background: var(--color-dark);
        transition: transform 0.3s ease, opacity 0.3s ease;
        display: block;
    }
    .menu-toggle.active span:first-child {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .menu-toggle.active span:last-child {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    .products-grid { grid-template-columns: 1fr; }
    .product-card.large { grid-column: span 1; grid-row: span 1; }
    .product-card.wide { grid-column: span 1; }
    .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
    .form-row { grid-template-columns: 1fr; }
    .brands-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-item,
    .gallery-item--tall,
    .gallery-item--wide,
    .gallery-item--full {
        grid-column: span 1;
        grid-row: span 1;
        height: 240px;
    }
    .cookie-banner {
        bottom: 16px;
        padding: 20px;
    }
    .cert-badges { gap: 12px; }
}
