/* ============================================================
   ROBERTO MASSUCCO - GLOBAL STYLE (FINAL MASTER VERSION)
   Include: Logo Max Size, GRASP Hero, FAQ, Typography
============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;700;800&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

:root {
    --bg-white: #ffffff;
    --bg-grey: #f9f9f9;
    --text-main: #111111;
    --text-light: #555555;
    --accent: #000000;
    --highlight: #e0f7fa;
    --grasp-blue: #00aaff;
    --border: #e0e0e0;
    
    /* --- DIMENSIONI HEADER MAGGIORATE PER LOGO GRANDE --- */
    --header-h-desktop: 220px; /* Altezza Header Desktop */
    --header-h-mobile: 140px;  /* Altezza Header Mobile */
    
    --container-width: 1300px;
}

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

body { 
    font-family: 'Manrope', sans-serif; 
    color: var(--text-main); 
    background-color: var(--bg-white); 
    line-height: 1.6; 
    font-size: 16px;
    padding-top: var(--header-h-desktop); /* Spinge il contenuto sotto l'header fisso */
    overflow-x: hidden;
}

/* TYPOGRAPHY */
h1, h2, h3, h4 { font-family: 'Manrope', sans-serif; color: var(--accent); line-height: 1.2; margin-bottom: 20px; letter-spacing: -0.5px; }
h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }
h3 { font-size: 1.5rem; font-weight: 700; }
p { margin-bottom: 1.5rem; color: var(--text-light); font-size: 1.05rem; max-width: 800px; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
strong { font-weight: 700; color: #000; }

/* UTILS */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 30px; position: relative; height: 100%; }
.section-padding { padding: 100px 0; }
.text-center { text-align: center; }
.center-block { margin: 0 auto; }
.bg-grey { background-color: var(--bg-grey); }
.reveal { opacity: 0; transform: translateY(30px); transition: 1s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

.pre-title { 
    font-family: 'Manrope', sans-serif; font-size: 0.8rem; text-transform: uppercase; 
    letter-spacing: 2px; color: #888; display: block; margin-bottom: 15px; 
    border-left: 3px solid #000; padding-left: 15px; font-weight: 700;
}

/* --- HEADER & NAVIGATION --- */
header { 
    position: fixed; top: 0; left: 0; width: 100%; 
    height: var(--header-h-desktop); 
    background: rgba(255,255,255,0.98); 
    border-bottom: 1px solid var(--border); 
    backdrop-filter: blur(10px); 
    z-index: 1000; 
    display: flex; align-items: center; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.02); 
    transition: height 0.3s ease;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; width: 100%; height: 100%; }

/* --- LOGO MAX SIZE --- */
.logo-wrapper { height: 100%; display: flex; align-items: center; padding: 15px 0; }
.logo-wrapper img { 
    height: 100% !important;      /* Occupa tutta l'altezza (220px) */
    width: auto !important;       
    max-height: none !important;  /* Nessun limite */
    display: block; 
    object-fit: contain; 
}

.nav-menu { height: 100%; display: flex; align-items: center; }
.nav-list { display: flex; gap: 30px; list-style: none; }
.nav-list a { 
    font-family: 'Manrope', sans-serif; font-size: 0.9rem; font-weight: 800; 
    text-transform: uppercase; color: #333; padding: 10px 0; position: relative; letter-spacing: 1px;
}
.nav-list a:hover, .nav-list a.active { color: #000; }
.nav-list a::after { content: ''; position: absolute; width: 0; height: 3px; bottom: 0; left: 0; background: #000; transition: width 0.3s; }
.nav-list a:hover::after, .nav-list a.active::after { width: 100%; }
.hamburger { display: none; cursor: pointer; background: none; border: none; }

/* LANG WIDGET */
.lang-widget {
    position: fixed; right: 20px; top: 50%; transform: translateY(-50%);
    background-color: #fff; padding: 15px 10px; z-index: 2000;
    display: flex; flex-direction: column; gap: 10px; border-radius: 4px; 
    box-shadow: -2px 0 10px rgba(0,0,0,0.1); border: 1px solid #eee;
}
.lang-widget a { 
    color: #ccc; font-family: 'Manrope'; font-weight: 700; font-size: 0.8rem; 
    writing-mode: vertical-rl; text-orientation: mixed; transform: rotate(180deg);
}
.lang-widget a.active, .lang-widget a:hover { color: #000; }

/* --- HERO FUSION (GRASP METHOD) --- */
#grasp-hero-specific.fusion-container {
    position: relative; width: 100%; height: 500px; overflow: hidden;
    display: flex; align-items: stretch; background: #fff;
    border-bottom: 1px solid #ddd; margin-top: 0; /* Header padding gestito dal body */
}
#particles-js { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }

#grasp-hero-specific .hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    z-index: 10; opacity: 1; transition: opacity 0.4s ease, visibility 0.4s; pointer-events: none;
}
/* Classi per gestione JS e Hover */
#grasp-hero-specific.fusion-container:hover .hero-overlay { opacity: 0; visibility: hidden; }
#grasp-hero-specific .hero-overlay.is-hidden { opacity: 0; visibility: hidden; }

.overlay-content { text-align: center; max-width: 800px; padding: 30px; animation: safeFadeIn 1s ease-out forwards; }
@keyframes safeFadeIn { from{opacity:0;transform:translateY(10px);} to{opacity:1;transform:translateY(0);} }
.hero-badge { background: #000; color: #fff; padding: 6px 14px; font-weight: 700; font-size: 0.75rem; border-radius: 4px; display: inline-block; margin-bottom: 20px; letter-spacing: 1px; }

#grasp-hero-specific .grasp-wrapper { display: flex; width: 100%; height: 100%; gap: 1px; position: relative; z-index: 5; pointer-events: auto; }
#grasp-hero-specific .grasp-panel {
    position: relative; flex: 1; background: #fff;
    border-right: 1px solid #eee; border-top: 4px solid #333;
    overflow: hidden; transition: flex 0.5s ease; cursor: pointer;
    padding: 25px; display: flex; flex-direction: column; justify-content: flex-end;
}
#grasp-hero-specific .grasp-panel:hover { flex: 10; background: #fcfcfc; border-top-color: var(--grasp-blue); }
.panel-letter { font-size: 3rem; font-weight: 900; color: #eee; position: absolute; top: 20px; left: 20px; transition: 0.4s; }
#grasp-hero-specific .grasp-panel:hover .panel-letter { font-size: 8rem; color: #f2f9fc; top: -10px; right: -10px; left: auto; }
.panel-title { font-size: 1.2rem; font-weight: 800; margin-bottom: 5px; color: #000; position: relative; z-index: 2; }
.panel-desc { font-size: 0.95rem; opacity: 0; max-height: 0; transform: translateY(20px); transition: all 0.4s ease; }
#grasp-hero-specific .grasp-panel:hover .panel-desc { opacity: 1; max-height: 300px; transform: translateY(0); margin-top: 15px; }
.killer-question { display: block; margin-top: 15px; padding: 10px; border-left: 3px solid var(--grasp-blue); background: rgba(0, 170, 255, 0.05); font-weight: 600; font-size: 0.85rem; color: #004466; }

/* --- HOME & OTHER SECTIONS --- */
.hero-text { z-index: 2; position: relative; }
.highlight-text { position: relative; z-index: 1; display: inline-block; }
.highlight-text::after { content: ''; position: absolute; bottom: 5px; left: 0; width: 100%; height: 30%; background-color: var(--highlight); z-index: -1; opacity: 0.8; }

.action-bar { background: #111; color: #fff; padding: 40px 0; border-top: 1px solid #333; }
.action-content { display: flex; align-items: center; justify-content: space-between; max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.action-text h3 { margin: 0; font-size: 1.5rem; color: #fff; }
.action-text p { margin: 5px 0 0 0; color: #999; font-size: 0.95rem; }

.shift-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 60px; }
.shift-col { padding: 40px; background: #fff; border: 1px solid #eee; border-radius: 4px; box-shadow: 0 10px 30px rgba(0,0,0,0.03); }
.shift-bad { border-top: 4px solid #ccc; }
.shift-good { border-top: 4px solid var(--grasp-blue); box-shadow: 0 15px 40px rgba(0, 170, 255, 0.08); }
.shift-title { font-weight: 800; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 25px; font-size: 0.9rem; display: flex; align-items: center; gap: 10px; }
.shift-list li { margin-bottom: 12px; padding-left: 25px; position: relative; list-style: none; font-size: 0.95rem; color: #555; }
.shift-bad li::before { content: '✕'; position: absolute; left: 0; color: #999; font-weight: bold; }
.shift-good li::before { content: '✓'; position: absolute; left: 0; color: var(--grasp-blue); font-weight: bold; }

.book-section { background: #fff; padding: 100px 0; border-top: 1px solid #eee; }
.book-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.css-book { width: 220px; height: 320px; background: #000; border-radius: 2px 10px 10px 2px; box-shadow: -15px 15px 30px rgba(0,0,0,0.3); position: relative; transform: perspective(1000px) rotateY(-15deg); transition: transform 0.5s ease; color: #fff; text-align: center; padding: 20px; display: flex; flex-direction: column; justify-content: center; }
.css-book:hover { transform: perspective(1000px) rotateY(0deg) scale(1.05); }
.css-book::before { content: ''; position: absolute; right: 0; top: 5px; bottom: 5px; width: 15px; background: linear-gradient(to right, #ccc, #fff, #ccc); border-radius: 0 5px 5px 0; transform: translateX(10px) translateZ(-10px); }
.book-badge { font-size: 0.7rem; letter-spacing: 2px; text-transform: uppercase; color: var(--grasp-blue); margin-bottom: 10px; }
.book-title { font-size: 1.8rem; font-weight: 800; line-height: 1.1; margin-bottom: 10px; font-family: 'Times New Roman', serif; font-style: italic; }
.book-author { font-size: 0.9rem; color: #999; }
.status-badge { background: #f0f9ff; color: var(--grasp-blue); padding: 8px 15px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; display: inline-block; }

.human-section { background: #f9f9f9; color: #000; padding: 80px 0; text-align: center; border-top: 1px solid #eee; }
.human-quote { font-size: 2rem; font-family: 'Times New Roman', serif; font-style: italic; max-width: 800px; margin: 0 auto 30px; line-height: 1.3; }

/* ABOUT CV TIMELINE */
.signature-video { width: 200px; margin-top: 30px; display: block; mix-blend-mode: multiply; }
.cv-timeline { border-left: 2px solid rgba(255,255,255,0.2); padding-left: 30px; margin: 40px 0; }
.cv-item { margin-bottom: 40px; position: relative; }
.cv-item::before { content: ''; position: absolute; left: -36px; top: 5px; width: 10px; height: 10px; background: #fff; border-radius: 50%; }
.cv-year { font-family: 'Manrope'; font-weight: 700; color: #999; font-size: 0.9rem; margin-bottom: 5px; display: block; }
.cv-role { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: #fff; margin-bottom: 5px; }
.cv-company { font-size: 1rem; color: #ccc; }

/* MODAL & FORMS */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 10000; display: none; align-items: center; justify-content: center; }
.scorecard-modal { background: #fff; padding: 40px; width: 90%; max-width: 600px; border-radius: 4px; position: relative; }
.close-modal { position: absolute; top: 15px; right: 20px; font-size: 30px; cursor: pointer; }
.q-box { animation: fadeIn 0.3s ease; }
.option-btn { width: 100%; padding: 15px; margin-bottom: 10px; background: #fff; border: 1px solid #ccc; text-align: left; cursor: pointer; transition: 0.2s; }
.option-btn:hover { background: #f0f9ff; border-color: var(--grasp-blue); }
#res-box input, .contact-form input, .contact-form textarea { width: 100%; padding: 15px; border: 1px solid #ccc; margin-bottom: 15px; border-radius: 4px; font-family: 'Manrope'; }
#res-box button.btn { width: 100%; }

/* BUTTONS */
.btn { display: inline-block; padding: 16px 40px; background: var(--accent); color: #fff; font-family: 'Manrope'; font-weight: 700; text-transform: uppercase; border: 1px solid var(--accent); cursor: pointer; transition: 0.3s; }
.btn:hover { background: #fff; color: #000; }
.btn-outline { display: inline-block; padding: 16px 40px; background: transparent; color: var(--accent); border: 1px solid var(--accent); margin-left: 15px; font-family: 'Manrope'; font-weight: 700; text-transform: uppercase; cursor: pointer; transition: 0.3s; }
.btn-outline:hover { background: var(--accent); color: #fff; }
.text-link { font-size: 0.8rem; font-weight: 800; text-transform: uppercase; color: #000; margin-top: 20px; display: inline-block; border-bottom: 1px solid #000; }

/* FAQ */
.faq-hero { padding: 60px 0 40px; border-bottom: 1px solid #eee; text-align: center; }
.faq-hero h1 { font-size: 3rem; margin-bottom: 15px; }
.faq-grid-container { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; }
.faq-box { background: #fff; border: 1px solid #e0e0e0; padding: 30px 25px; cursor: pointer; transition: 0.3s; position: relative; }
.faq-box:hover { border-color: #000; transform: translateY(-3px); }
.faq-box.active { border-color: #000; background: #f9f9f9; }
.faq-title { font-weight: 700; font-size: 1.1rem; padding-right: 30px; }
.faq-box::after { content: '+'; position: absolute; top: 25px; right: 20px; font-size: 1.5rem; color: #ccc; }
.faq-box.active::after { content: '-'; color: #000; }
.faq-content { max-height: 0; overflow: hidden; transition: 0.4s ease; opacity: 0; }
.faq-box.active .faq-content { max-height: 500px; opacity: 1; margin-top: 15px; }
.category-header { grid-column: 1 / -1; margin-top: 40px; font-weight: 800; text-transform: uppercase; border-bottom: 2px solid #000; padding-bottom: 5px; }

/* CARDS & GRIDS */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.hero-img img { width: 100%; height: auto; border-radius: 4px; box-shadow: 20px 20px 0 rgba(0,0,0,0.05); }
.card { padding: 40px; border: 1px solid var(--border); background: #fff; border-radius: 4px; transition: 0.4s; }
.card:hover { border-color: #000; transform: translateY(-10px); box-shadow: 0 20px 40px -10px rgba(0,0,0,0.15); }
.social-macro-card { background: #fff; border: 1px solid #eee; padding: 40px 30px; transition: 0.3s; display: flex; flex-direction: column; }
.social-macro-card:hover { border-color: #000; transform: translateY(-5px); }
.social-header { display: flex; align-items: center; gap: 20px; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 2px solid #f5f5f5; }
.social-header h3 { margin: 0; font-size: 1.5rem; font-weight: 700; }
.social-header img { width: 60px; height: 60px; object-fit: contain; }
.content-list { list-style: none; padding: 0; margin: 0; flex-grow: 1; }
.content-item { margin-bottom: 25px; padding-bottom: 25px; border-bottom: 1px solid #f9f9f9; }
.content-item:last-child { border-bottom: none; }
.content-cat { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; color: #999; display: block; margin-bottom: 5px; }
.content-title { font-size: 1.1rem; font-weight: 700; line-height: 1.4; color: #000; display: block; }
.social-cta { margin-top: 30px; display: block; text-align: center; font-weight: 800; text-transform: uppercase; font-size: 0.85rem; padding: 15px; border: 1px solid #000; transition: 0.3s; }
.social-cta:hover { background: #000; color: #fff; }

/* FOOTER */
footer { background: #111; color: #999; padding: 80px 0 40px; font-size: 0.9rem; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 50px; }
.footer-col h4 { color: #fff; margin-bottom: 25px; border-bottom: 1px solid #333; display: inline-block; padding-bottom: 5px; }
.footer-links li { margin-bottom: 10px; list-style: none; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #222; padding-top: 30px; display: flex; justify-content: space-between; }
.social-links a { margin-left: 20px; color: #fff; font-weight: 800; font-size: 0.8rem; }
#cookie-banner { position: fixed; bottom: 0; left: 0; width: 100%; background: #111; color: #fff; padding: 20px 0; z-index: 9999; display: none; }
.cookie-content { display: flex; justify-content: space-between; align-items: center; }
.cookie-buttons .btn { padding: 10px 30px; margin-left: 10px; }

/* --- MOBILE --- */
@media (max-width: 900px) {
    body { padding-top: var(--header-h-mobile); }
    header { height: var(--header-h-mobile); }
    .logo-wrapper img { height: 100% !important; max-height: 100px !important; }
    
    .hamburger { display: block; position: relative; z-index: 1001; }
    .nav-menu { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: #fff; flex-direction: column; justify-content: center; transform: translateX(100%); transition: 0.4s; padding: 40px; }
    .nav-menu.active { transform: translateX(0); }
    .nav-list { flex-direction: column; font-size: 1.5rem; text-align: center; gap: 20px; }
    .lang-widget { top: auto; bottom: 20px; right: 50%; transform: translateX(50%); flex-direction: row; }
    .lang-widget a { writing-mode: horizontal-tb; transform: none; }
    .grid-2, .grid-3, .footer-grid, .faq-grid-container, .book-grid, .shift-grid { grid-template-columns: 1fr; gap: 40px; }
    .reverse-mobile { display: flex; flex-direction: column-reverse; }
    .btn, .btn-outline { width: 100%; margin: 10px 0 0 0; }
    h1 { font-size: 2.5rem; } h2 { font-size: 2rem; }
    
    #grasp-hero-specific.fusion-container { flex-direction: column; height: auto; }
    #grasp-hero-specific .hero-overlay { position: relative; opacity: 1 !important; visibility: visible !important; padding: 60px 20px; }
    #grasp-hero-specific .grasp-wrapper { flex-direction: column; }
    #grasp-hero-specific .grasp-panel { height: 80px; }
    #grasp-hero-specific .grasp-panel:hover { height: 400px; flex: none; }
    .action-content { flex-direction: column; text-align: center; gap: 20px; }
}