/* --- 1. VARIABILI E COLORI (SALVIA & TERRA) --- */
:root {
    --bg-color: #F9FAF9;
    --text-color: #4A504D; 
    --heading-color: #2C3E36; 
    --accent-color: #7DA88C; /* Verde Salvia */
    --accent-dark: #688f75;
    --accent-light: #E8F1EB;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* --- 2. RESET E GLOBAL --- */
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    /* Font principale per i testi (pulito e leggibile) */
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0; padding: 0;
    background-color: var(--bg-color); color: var(--text-color);
    font-size: 1.1rem; line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
    color: var(--heading-color);
    margin-bottom: 15px; 
    font-weight: 700; 
    line-height: 1.3;
    letter-spacing: -0.02em;
}

/* --- 3. HEADER FISSO --- */
header {
    background-color: rgba(255, 255, 255, 0.98);
    padding: 10px 5%; 
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 2px 15px rgba(0,0,0,0.04);
    position: sticky; top: 0; z-index: 9999;
}

.logo-container { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-graphic { height: 70px; width: auto; } /* Logo Disegno */

/* NUOVO LOGO TESTUALE (STILE ELEGANTE) */
.logo-text-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-name {
    font-family: 'Playfair Display', serif; /* Font elegante */
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--heading-color);
    line-height: 1;
    letter-spacing: -0.01em;
}

.brand-sub {
    font-family: 'Lato', sans-serif; /* Font pulito */
    font-size: 0.75rem;
    font-weight: 400;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.15em; /* Spaziatura elegante */
    margin-top: 5px;
}

/* MENU */
nav ul { list-style: none; display: flex; gap: 24px; align-items: center; padding: 0; margin: 0; }
nav a { text-decoration: none; color: var(--heading-color); font-size: 1rem; transition: color 0.3s; font-weight: 400; }
nav a:hover { color: var(--accent-color); }

.menu-icon { display: none; font-size: 2.2rem; cursor: pointer; color: var(--heading-color); }
.lang-switch { margin-left: 10px; border-left: 1px solid #ccc; padding-left: 15px; font-weight: 700; font-size: 0.9rem; }
.lang-switch a { margin: 0 3px; color: #999; text-decoration: none; }
.lang-switch a.active { color: var(--accent-color); pointer-events: none; }

/* --- 4. HERO SECTION --- */
.hero {
    background-image: url('sfondo.jpg');
    background-size: cover; background-position: center;
    height: 85vh; display: flex; align-items: center; justify-content: center;
    text-align: center; position: relative;
}
.hero-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.2); }
.hero-content {
    background-color: rgba(255, 255, 255, 0.96); padding: 60px;
    border-radius: 8px;
    max-width: 750px; position: relative;
    box-shadow: var(--shadow); margin: 0 20px;
}
.hero h2 { font-size: 3.5rem; margin-bottom: 15px; font-weight: 700; letter-spacing: -0.03em; }
.btn-hero, .btn-cv, .btn-blog {
    display: inline-block; margin-top: 25px;
    background-color: var(--heading-color); 
    color: var(--white);
    padding: 14px 35px; text-decoration: none; border-radius: 50px;
    transition: all 0.3s; border: none; cursor: pointer; font-size: 1rem; font-weight: 700;
}
.btn-hero:hover, .btn-cv:hover, .btn-blog:hover { background-color: var(--accent-color); transform: translateY(-3px); }
.btn-cv { background-color: transparent; border: 2px solid var(--heading-color); color: var(--heading-color); margin-top: 15px; }
.btn-cv:hover { background-color: var(--heading-color); color: var(--white); }

/* --- 5. SEZIONI STANDARD --- */
section { padding: 100px 10%; }
.benefits-section { background-color: var(--white); text-align: center; }
.intro-text { max-width: 800px; margin: 0 auto 60px auto; font-size: 1.3rem; color: #555; font-weight: 400; }
.benefits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.benefit-card { background: var(--accent-light); padding: 40px; border-radius: 12px; transition: transform 0.3s; }
.benefit-card:hover { transform: translateY(-8px); }

.service-section { display: flex; align-items: center; gap: 80px; margin: 50px 0; }
.service-section.reverse { flex-direction: row-reverse; }
.text-box { flex: 1; }
.visual-box { flex: 1; text-align: center; }
.service-img { width: 100%; max-width: 550px; height: 350px; object-fit: cover; border-radius: 8px; box-shadow: 15px 15px 0px var(--accent-color); filter: brightness(0.95) contrast(0.9); }

/* --- 6. ESPERIENZA --- */
.experience-section { background-color: #F2F4F3; padding: 100px 10%; }
.experience-container { display: flex; align-items: flex-start; gap: 80px; }
.profile-column { flex: 1; text-align: center; position: sticky; top: 120px; }
.profile-photo { width: 300px; height: 300px; border-radius: 50%; object-fit: cover; border: 10px solid var(--white); box-shadow: var(--shadow); margin-bottom: 20px; }
.timeline-column { flex: 1.5; display: flex; flex-direction: column; gap: 30px; }
.timeline-item { padding: 35px; border-radius: 15px; border-left: 6px solid; background-color: var(--white); box-shadow: 0 5px 15px rgba(0,0,0,0.03); transition: transform 0.3s; }
.timeline-item:hover { transform: translateY(-5px); }
.timeline-item:nth-child(1) { background-color: #F0F7F4; border-left-color: #7DA88C; }
.timeline-item:nth-child(2) { background-color: #FCFBF7; border-left-color: #C8B7A0; }
.timeline-item:nth-child(3) { background-color: #F4F7F9; border-left-color: #98B0C8; }

/* --- 7. PARTNER LOGOS (ALLINEAMENTO PERFETTO) --- */
.partners-block {
    background-color: var(--white);
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    margin-bottom: 50px;
}
.partners-title { 
    font-size: 0.9rem; text-transform: uppercase; letter-spacing: 2px; 
    color: #888; margin-bottom: 40px; display: block; font-weight: 700;
}
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    align-items: start;
}
.partner-item { display: flex; flex-direction: column; align-items: center; width: 100%; }
.partner-link {
    text-decoration: none; color: inherit; display: flex; flex-direction: column; align-items: center; width: 100%;
    transition: transform 0.3s;
}
.partner-link:hover { transform: translateY(-5px); }

/* BOX LOGO FISSO (Fondamentale per allineamento) */
.partner-logo-box {
    height: 120px; width: 100%;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 15px;
}
.partner-logo {
    max-height: 100px; max-width: 100%; width: auto; object-fit: contain;
    filter: grayscale(100%); opacity: 0.9; transition: all 0.3s;
}
.partner-link:hover .partner-logo { filter: grayscale(0%); opacity: 1; transform: scale(1.05); }

/* Fix ottici specifici */
img[src="LogoUniCatt.jpg"].partner-logo { max-height: 110px; transform: scale(1.1); }
img[src="LogoAcMilan.jpg"].partner-logo { max-height: 95px; }

.partner-info { text-align: center; width: 100%; }
.partner-name {
    font-size: 0.95rem; font-weight: 700; color: var(--heading-color);
    margin-bottom: 5px; line-height: 1.2; display: block;
}
.partner-role { font-size: 0.85rem; color: #666; font-style: italic; line-height: 1.3; display: block; }

/* --- 8. CV LAYOUT --- */
.cv-layout { display: flex; max-width: 1200px; margin: 60px auto; gap: 50px; padding: 0 20px; }
.cv-sidebar { flex: 0 0 300px; position: sticky; top: 110px; height: fit-content; background-color: var(--white); padding: 30px; border-radius: 8px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); border: 1px solid #eee; text-align: center; }
.cv-photo-frame { width: 180px; height: 180px; object-fit: cover; border-radius: 50%; border: 5px solid var(--accent-light); margin-bottom: 20px; }
.cv-sidebar h1 { font-size: 1.4rem; margin-bottom: 5px; font-weight: 700; }
.cv-sidebar p { font-size: 0.95rem; color: #666; margin-bottom: 20px; }
.cv-divider { border-top: 1px solid #eee; margin: 20px 0; }
.cv-main { flex: 1; }
.cv-section-title { font-size: 1.8rem; color: var(--heading-color); border-left: 5px solid var(--accent-color); padding-left: 15px; margin-bottom: 30px; margin-top: 40px; }
.cv-section-title:first-child { margin-top: 0; }
.cv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; }
.cv-card { background-color: var(--white); padding: 25px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.03); border: 1px solid #f0f0f0; transition: transform 0.3s; display: flex; flex-direction: column; justify-content: flex-start; }
.cv-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); border-color: var(--accent-color); }
.cv-date-badge { display: inline-block; background-color: var(--accent-light); color: var(--heading-color); font-size: 0.8rem; font-weight: 700; padding: 5px 12px; border-radius: 20px; margin-bottom: 15px; align-self: flex-start; }
.cv-role { font-size: 1.2rem; font-weight: 700; margin: 0 0 5px 0; color: var(--heading-color); }
.cv-place { font-size: 0.95rem; font-style: italic; color: #666; margin-bottom: 10px; }
.cv-desc { font-size: 0.95rem; color: var(--text-color); margin: 0; }
.cv-header-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 15px; }
.cv-logo-small { height: 65px; width: auto; object-fit: contain; }
img[src="LogoUniCatt.jpg"].cv-logo-small { height: 85px; }
.cv-languages-container { text-align: center; }
.cv-languages-list { display: inline-block; text-align: left; }
.cv-lang-item { font-size: 1rem; color: var(--text-color); margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }

/* --- 9. ALTRE SEZIONI --- */
.steps-section { background-color: var(--white); text-align: center; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-top: 50px; }
.step-card { padding: 20px; position: relative; }
.step-number { display: inline-block; width: 50px; height: 50px; line-height: 50px; background-color: var(--heading-color); color: white; border-radius: 50%; font-size: 1.5rem; font-weight: 700; margin-bottom: 20px; }
.blog-section { background-color: #F9FAF9; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }
.blog-card { background-color: white; border-radius: 12px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: transform 0.3s; }
.blog-card:hover { transform: translateY(-5px); }
.blog-content { padding: 25px; }
.blog-tag { font-size: 0.8rem; color: var(--accent-color); font-weight: 700; text-transform: uppercase; }
.btn-link { color: var(--heading-color); text-decoration: none; font-weight: 700; border-bottom: 2px solid var(--accent-color); }
.btn-link:hover { color: var(--accent-color); }

.faq-section { background-color: var(--white); }
details { background-color: #FAFAFA; margin-bottom: 20px; border-radius: 8px; border: 1px solid #eee; overflow: hidden; }
summary { padding: 20px; font-weight: 700; cursor: pointer; font-size: 1.2rem; color: var(--heading-color); list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::after { content: '+'; font-size: 1.5rem; color: var(--accent-color); font-weight: 300; }
details[open] summary::after { content: '-'; }
details[open] summary { background-color: var(--accent-light); border-bottom: 1px solid #eee; }
.faq-content { padding: 25px; font-size: 1.1rem; color: #555; background-color: var(--white); }
.contact-section { background-color: #F9FAF9; padding-bottom: 150px; }
.contact-wrapper { text-align: center; max-width: 800px; margin: 0 auto; }
.map-frame iframe { border-radius: 12px; box-shadow: var(--shadow); margin-top: 30px; }

.floating-btn { position: fixed; bottom: 30px; right: 30px; background-color: var(--heading-color); color: var(--white); padding: 15px 30px; border-radius: 50px; box-shadow: 0 10px 25px rgba(0,0,0,0.3); cursor: pointer; z-index: 2000; font-weight: 700; display: flex; align-items: center; gap: 10px; border: none; transition: transform 0.3s; }
.floating-btn:hover { background-color: var(--accent-color); transform: scale(1.05); }
.chat-window { display: none; position: fixed; bottom: 100px; right: 30px; width: 350px; background-color: var(--white); border-radius: 15px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); z-index: 2001; overflow: hidden; border: 1px solid #eee; animation: slideUp 0.3s ease-out; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.chat-header { background-color: var(--heading-color); color: var(--white); padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; }
.close-btn { background: none; border: none; color: var(--white); font-size: 1.5rem; cursor: pointer; }
.chat-body { padding: 20px; }
.chat-body input, .chat-body textarea { width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #ddd; border-radius: 6px; font-family: inherit; font-size: 0.95rem; box-sizing: border-box; }
.chat-body button { width: 100%; background-color: var(--accent-color); color: var(--white); padding: 12px; border: none; border-radius: 6px; font-weight: 700; cursor: pointer; }
.chat-body button:hover { background-color: var(--accent-dark); }
.cookie-banner { position: fixed; bottom: 0; left: 0; width: 100%; background-color: #2C3E36; color: white; padding: 20px; box-shadow: 0 -5px 20px rgba(0,0,0,0.2); display: none; z-index: 9999; text-align: center; font-size: 0.95rem; }
.cookie-content { max-width: 1000px; margin: 0 auto; display: flex; justify-content: center; align-items: center; gap: 20px; flex-wrap: wrap; }
.btn-accept { background-color: #7DA88C; color: white; border: none; padding: 10px 25px; border-radius: 5px; cursor: pointer; font-weight: 700; }
.btn-accept:hover { background-color: var(--accent-dark); }
footer { text-align: center; padding: 40px; background-color: var(--heading-color); color: rgba(255,255,255,0.7); font-size: 0.9rem; }

/* --- 10. MOBILE RESPONSIVE --- */
@media (max-width: 992px) {
    header { padding: 10px 15px; }
    .menu-icon { display: block; margin-left: auto; }
    .logo-container { gap: 10px; }
    .logo-graphic { height: 50px; }
    
    /* Ridimensionamento font mobile */
    .brand-name { font-size: 1.4rem; }
    .brand-sub { font-size: 0.7rem; letter-spacing: 0.05em; }

    nav ul { display: none; flex-direction: column; width: 100%; background-color: white; position: absolute; top: 100%; left: 0; padding: 20px 0; box-shadow: 0 10px 20px rgba(0,0,0,0.05); border-top: 1px solid #eee; }
    nav ul.show-menu { display: flex; }
    nav ul li { width: 100%; text-align: center; padding: 10px 0; }
    .hero h2 { font-size: 2.2rem; }
    
    .partners-grid { grid-template-columns: 1fr; gap: 50px; } 
    .partner-logo-box { height: 100px; }
    .partner-item:first-child .partner-logo-box { height: 100px; align-items: center; padding-bottom: 0; }
    .partner-item:first-child .partner-info { margin-top: 0; }
    img[src="LogoAcMilan.jpg"].partner-logo { max-height: 100%; }

    .cv-layout { flex-direction: column; gap: 30px; }
    .cv-sidebar { width: auto; position: static; margin-bottom: 20px; }
    .cv-grid { grid-template-columns: 1fr; }
    .service-section, .service-section.reverse { flex-direction: column; text-align: center; gap: 40px; }
    .experience-container { flex-direction: column; align-items: center; }
    .profile-column { position: static; width: 100%; }
    .chat-window { width: 90%; right: 5%; bottom: 90px; }
    section { padding: 70px 5%; }
}