:root {
    --navy: #0a152d;
    --gold: #c9a54d;
    --white: #ffffff;
    --silk: #f8fafc;
    --text-gray: #475569;
    --radius: 20px;
    
    /* VARIABILI FONT SEPARATE */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lora', serif;       /* Solo per i testi lunghi */
    --font-ui: 'Inter', sans-serif;   /* Per Logo, Menu e Bottoni (più stretti) */
}

body {
    font-family: var(--font-body);
    color: var(--navy);
    line-height: 1.7;
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

/* --- PROTEZIONE LOGO E UI (Font stretto) --- */
.logo-main-row h1, 
.logo-brand-tag, 
.logo-sub, 
.mobile-menu-btn {
    font-family: 'Inter', sans-serif !important;
 /* Forza Inter per non allargare le scritte */
    letter-spacing: 0 !important;           /* Impedisce alle lettere di allargarsi */
}
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    /* Aumentiamo lo spazio dai bordi: 40px su desktop, 25px su mobile */
    padding: 0 40px; 
}
/* HEADER */
.main-header {
    padding: 15px 0;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 9999;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.header-flex {
    display: flex;
    justify-content: space-between; /* Logo a sinistra, Menu a destra */
    align-items: center;
}
.logo h1 { font-family: 'Playfair Display', serif; font-size: 1.5rem; }
.logo span { font-size: 0.65rem; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.main-nav ul { list-style: none; display: flex; gap: 25px; align-items: center; }
.main-nav a { text-decoration: none; color: var(--navy); font-weight: 600; font-size: 0.85rem; }
.nav-cta { background: var(--navy); color: white !important; padding: 10px 20px; border-radius: 50px; }

/* HERO */
.hero { padding: 80px 0; background: #fff; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero h2 { font-family: 'Playfair Display', serif; font-size: 3rem; line-height: 1.1; margin: 15px 0; }
.gold-text { color: var(--gold); }
.hero p { font-size: 1.1rem; color: var(--text-gray); margin-bottom: 30px; text-align: justify; }

.image-card { 
    width: 100%; background: white; border-radius: var(--radius); 
    box-shadow: 0 15px 40px rgba(0,0,0,0.08); overflow: hidden;
}
.image-card img { width: 100%; display: block; height: auto; }

/* WORKFLOW 2x2 */
.section-padding { padding: 80px 0; }
.bg-soft { background: var(--silk); }
.section-title h3 { font-family: 'Playfair Display', serif; font-size: 2.5rem; margin-bottom: 15px; }

.workflow-grid-2x2 { 
    display: grid; grid-template-columns: 1fr 1fr; gap: 30px; max-width: 1000px; margin: 0 auto;
}
.workflow-item { 
    background: white; padding: 35px; border-radius: var(--radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); display: flex; flex-direction: column;
}
.step-number { font-family: 'Playfair Display', serif; font-size: 3rem; color: var(--gold); opacity: 0.5; line-height: 1; }
.workflow-item h4 { font-size: 1.3rem; margin: 10px 0; color: var(--navy); }
.workflow-item p { font-size: 0.95rem; color: var(--text-gray); text-align: justify; margin-bottom: 20px; flex-grow: 1; }
.step-image-box { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; }
.step-image-box img { width: 100%; height: 100%; object-fit: cover; }

/* VISIONE ETICA */
.ethics-wrapper { max-width: 1000px; margin: 0 auto; }
.ethics-main-text { text-align: center; margin-bottom: 50px; }
.ethics-main-text h3 { font-family: 'Playfair Display', serif; font-size: 2.5rem; margin-top: 10px; }
.ethics-main-text p { font-size: 1.1rem; color: var(--text-gray); max-width: 800px; margin: 20px auto 0; text-align: center; }

.ethics-cards-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ethics-card { 
    background: var(--silk); padding: 20px; border-radius: var(--radius); 
    border-bottom: 4px solid var(--gold); transition: 0.3s;
}
.ethics-card:hover { transform: translateY(-5px); background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.ethics-card h5 { color: var(--gold); font-size: 1.2rem; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px; }
.ethics-card p { font-size: 0.9rem; color: var(--navy); text-align: justify; }

/* LOGO GRID (TEAM) */
.logo-grid { 
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); 
    gap: 40px; align-items: center; justify-items: center; margin-top: 50px; 
}
/* LOGO GRID (TEAM) - VERSIONE A COLORI */
.logo-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); 
    gap: 40px; 
    align-items: center; 
    justify-items: center; 
    margin-top: 50px; 
}

.logo-item img { 
    max-width: 140px; 
    height: auto; 
    transition: 0.3s; 
    /* RIMOSSO GRayscale E OPACITY */
}

.logo-item img:hover { 
    transform: scale(1.05); /* Lasciamo solo un piccolo ingrandimento al passaggio */
}
/* VIDEO */
/* CONTENITORE VIDEO 1:1 */
.video-container-square { 
    max-width: 550px; 
    margin: 40px auto 0; 
    aspect-ratio: 1 / 1; 
    background: var(--navy); 
    border-radius: var(--radius); 
    box-shadow: 0 20px 50px rgba(10, 21, 45, 0.15); 
    overflow: hidden;
    border: 2px solid var(--gold); /* Un sottile bordo oro lo incornicia con eleganza */
}

/* IL VIDEO VERO E PROPRIO */
.real-video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Assicura che il video riempia il quadrato senza bordi neri */
    display: block;
}

/* MISC */
.gold-tag { color: var(--gold); font-weight: 700; text-transform: uppercase; font-size: 1.25rem; letter-spacing: 1px; }
.btn-gold { background: var(--gold); color: white; padding: 15px 30px; border-radius: 50px; text-decoration: none; font-weight: 700; display: inline-block; }

/* MOBILE */
@media (max-width: 768px) {
    .hero-grid, .workflow-grid-2x2, .ethics-cards-row { grid-template-columns: 1fr; }
    .hero, .ethics-main-text p { text-align: center; }
    .main-nav { display: none; }
    .section-title h3 { font-size: 2rem; }
    .logo-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
}
/* --- POSIZIONAMENTO LOGO CON TAGLINE ORO --- */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon-img {
    width: 45px;
    height: auto;
}

.logo-main-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.logo-main-row h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin: 0;
    line-height: 1;
}

.logo-brand-tag {
    color: var(--gold);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
}
/* --- MODIFICA SOLO PER DESKTOP --- */
@media (min-width: 769px) {
    .logo-text-group {
        display: flex;
        flex-direction: column;
        align-items: flex-start; /* Allinea h1 e sottotitolo allo stesso margine sinistro */
    }

    .logo-sub {
        font-size: 0.65rem;
        text-transform: uppercase;
        color: var(--navy);
        font-weight: 600;
        margin-left: 2px; /* Allineamento millimetrico sotto la 'O' di OR.G.A */
        margin-top: 2px;
    }
}
/* --- MENU MOBILE (HAMBURGER) --- */
.mobile-menu-btn {
    display: none !important; /* NASCONDE LE LINEE SU DESKTOP */
}

/* --- REGOLE SOLO PER MOBILE (iPhone 11) --- */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex !important; /* MOSTRA LE LINEE SOLO SU MOBILE */
        width: 30px !important;
        height: 30px !important;
        flex-shrink: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 10001;
    }
.container {
        padding: 0 25px !important; /* Spazio generoso ai lati */
    }
 .header-flex {
        padding: 0 10px;
    }

    .mobile-menu-btn span {
        width: 25px;
        height: 3px;
        background-color: var(--navy);
        margin: 2px 0;
        transition: 0.3s;
    }

    /* Animazione X quando attivo */
    .mobile-menu-btn.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
    .mobile-menu-btn.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    /* Navigazione a comparsa su Mobile */
    .main-nav {
        display: none; 
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #fff;
        z-index: 9999;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .main-nav.active {
        display: flex !important;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .main-nav a {
        font-size: 1.2rem;
    }

    .logo-brand-tag {
        font-size: 0.6rem;
        gap: 8px;
    }
}
/* --- POPUP COOKIE STYLE --- */
.cookie-popup {
    position: fixed;
    bottom: -100%; /* Inizialmente nascosto fuori schermo */
    left: 20px;
    right: 20px;
    background: var(--white);
    border: 1px solid rgba(201, 165, 77, 0.3);
    border-radius: var(--radius);
    box-shadow: 0 15px 50px rgba(10, 21, 45, 0.2);
    z-index: 10002; /* Sopra a tutto, anche al menu */
    padding: 25px;
    max-width: 500px;
    transition: bottom 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-popup.show {
    bottom: 25px; /* Appare dolcemente */
}

.cookie-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cookie-text h5 {
    font-family: var(--font-ui) !important;
    font-size: 1rem;
    color: var(--navy);
    margin-bottom: 10px;
}

.cookie-text p {
    font-family: var(--font-ui) !important;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-gray);
    margin: 0;
    text-align: left !important;
}

.cookie-link {
    color: var(--gold);
    text-decoration: underline;
    font-weight: 600;
}

.cookie-actions {
    display: flex;
    gap: 12px;
}

/* Bottoni specifici per il popup */
.btn-cookie-gold {
    background: var(--gold);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    flex: 1;
    transition: 0.3s;
}

.btn-cookie-outline {
    background: transparent;
    border: 1.5px solid var(--navy);
    color: var(--navy);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
}

/* OTTIMIZZAZIONE MOBILE */
@media (max-width: 768px) {
    .cookie-popup {
        left: 10px;
        right: 10px;
        padding: 20px;
    }
    .cookie-popup.show {
        bottom: 15px;
    }
    .cookie-actions {
        flex-direction: column;
    }
}
/* --- FOOTER STYLE --- */
.main-footer {
    padding: 40px 0;
    background: var(--white);
    border-top: 1px solid rgba(10, 21, 45, 0.05);
    font-family: var(--font-ui) !important; /* Usiamo il font tecnico più compatto */
}

.footer-flex {
    display: flex;
    justify-content: space-between; /* Spinge il contenuto ai due lati */
    align-items: center;
}

.footer-left p {
    font-size: 0.85rem;
    margin: 0;
    color: var(--navy);
}

.footer-left .credits {
    font-size: 0.75rem;
    color: var(--text-gray);
    margin-top: 5px;
}

.atn-link {
    color: var(--gold);
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s;
}

.atn-link:hover {
    text-decoration: underline;
}

.footer-right .legal-link {
    font-size: 0.85rem;
    color: var(--navy);
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

.footer-right .legal-link:hover {
    color: var(--gold);
}
.footer-link-contact {
    color: var(--gold); /* O il colore che usi nel footer */
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    transition: 0.3s;
}

.footer-link-contact:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* --- OTTIMIZZAZIONE MOBILE --- */
@media (max-width: 768px) {
    .footer-flex {
        flex-direction: column; /* Incolonna su mobile */
        gap: 20px;
        text-align: center;
    }
    
    .footer-left .credits {
        margin-bottom: 10px;
    }
}
@media (max-width: 768px) {
    /* 1. Margini generali del sito (rimangono ariosi) */
    .container {
        padding: 0 20px !important; 
    }

    /* 2. PROTEZIONE HEADER: meno spazio ai lati per far stare il logo in riga */
    .main-header .container {
        padding: 0 10px !important; /* Qui riduciamo il margine per dare spazio al logo */
    }

    .header-flex {
        gap: 5px !important; /* Stringiamo il gap tra logo e tasto menu */
    }

    /* 3. LOGO: compattazione estrema per evitare il salto di riga */
    .logo {
        gap: 8px !important; /* Avviciniamo il microscopio alle scritte */
    }

    .logo-icon-img {
        width: 32px !important; /* Microscopio leggermente più piccolo */
    }

    .logo-main-row h1 {
        font-size: 1.25rem !important; /* Testo OR.G.A ridotto */
        letter-spacing: -0.5px !important;
    }

    .logo-brand-tag {
        font-size: 0.55rem !important; /* Strategie Aziendali piccolo e unito */
        letter-spacing: 0.2px !important;
        white-space: nowrap !important;
    }

    .logo-sub {
        font-size: 0.52rem !important; /* Sottotitolo molto compatto */
        white-space: nowrap !important;
        margin-top: 0px !important;
    }

    /* 4. TASTO MENU: Assicuriamoci che non rubi spazio */
    .mobile-menu-btn {
        width: 28px !important;
        margin-left: 5px !important;
    }
}
