/* =========================================
   1. RESET & FONTS
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Montserrat:wght@600;700;800&display=swap');

:root {
    --brand-cyan: #2ac8e0;      /* Colore Logo */
    --brand-cyan-dark: #1baec5;
    --brand-accent: #dd3333;    /* Rosso Dettagli */
    --text-main: #2c3e50;       /* Grigio Scuro elegante */
    --text-soft: #555555;
    --bg-gray: #f8f9fa;
    --white: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Lato', sans-serif;
    color: var(--text-main);
    background: #000; /* Default per Index Video */
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Montserrat', sans-serif; font-weight: 700; }
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* =========================================
   2. INDEX HERO (TUO CODICE ORIGINALE)
   ========================================= */
.hero { position: relative; width: 100%; height: 100vh; overflow: hidden; color: #fff; }
.hero video { position: absolute; top: 50%; left: 50%; min-width: 100%; min-height: 100%; transform: translate(-50%, -50%); object-fit: cover; filter: brightness(70%); }
.hero .content { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; z-index: 2; width: 90%; }
.hero h1 { font-size: 3rem; font-weight: bold; margin-bottom: 10px; }
.hero p { font-size: 1.3rem; margin-bottom: 20px; }
.cta { padding: 12px 28px; background: #ffffffcc; color: #000; border-radius: 6px; font-size: 1.1rem; }
.cta:hover { background: #fff; }
.video-credits { position: absolute; bottom: 14px; right: 18px; font-size: 0.7rem; color: #ffffffd0; z-index: 3; text-shadow: 0 0 6px rgba(0,0,0,0.6); }

/* =========================================
   3. NUOVO DESIGN (Home.html e Pagine)
   ========================================= */
body.modern-page {
    background: var(--white);
    color: var(--text-main);
}

/* HEADER */
.site-header {
    background-color: var(--brand-cyan);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.header-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 90px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* EFFETTO LOGO BALLERINO */
.logo img {
    max-height: 80px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.logo:hover img {
    transform: rotate(-5deg) scale(1.1);
}

/* NAVIGAZIONE */
.nav-links { display: flex; gap: 30px; }
.nav-links a {
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 5px;
}
.nav-links a::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
    background: #fff; transition: 0.3s;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.menu-btn { display: none; background: none; border: none; color: #fff; font-size: 1.8rem; cursor: pointer; }

/* BANNER INTRO */
.page-intro {
    background: var(--brand-cyan);
    padding: 30px 20px 60px;
    text-align: center;
    position: relative;
}

.intro-frame {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    border: 2px solid rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    backdrop-filter: blur(5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.intro-frame h1 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.intro-frame p {
    font-size: 1.1rem;
    color: #fff;
    font-weight: 400;
    opacity: 0.9;
}

/* LAYOUT ZIG ZAG */
.section-wrap { padding: 80px 0; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.feature-row {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 100px;
}

.feature-row:nth-child(even) { flex-direction: row-reverse; }

/* STILE LIBRI (Pop 3D) */
.img-col { flex: 1; text-align: center; perspective: 1000px; }

.img-col img.book-cover {
    display: inline-block;
    border-radius: 5px;
    box-shadow: 20px 20px 60px rgba(0,0,0,0.15);
    transform: rotateY(-5deg);
    transition: all 0.5s ease;
}

.feature-row:hover .img-col img.book-cover {
    transform: rotateY(0deg) scale(1.05);
    box-shadow: 25px 25px 70px rgba(0,0,0,0.25);
}

/* --- STILE FOTO CON CREDITI HOVER --- */
.img-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    transform: none;
    transition: transform 0.4s ease;
}

.img-wrapper img.photo-style {
    width: 100%;
    display: block;
    border-radius: 0;
    transition: transform 0.5s ease;
}

/* Barra dei crediti */
.img-credit {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.4); /* La trasparenza che volevi */
    
    /* MODIFICA RICHIESTA: Colore e Peso Font */
    color: #e0e0e0;       /* Bianco tendente al grigio chiaro */
    font-weight: 400;     /* Normale, non grassetto (era 600) */
    
    padding: 12px;
    font-size: 0.85rem;
    text-align: center;
    letter-spacing: 0.5px;
    transform: translateY(100%); 
    transition: transform 0.3s ease-in-out;
    font-family: 'Lato', sans-serif; /* Assicura che usi il font leggibile */
}

/* Effetto Hover */
.feature-row:hover .img-wrapper {
    transform: translateY(-5px);
}
.img-wrapper:hover .img-credit {
    transform: translateY(0); /* Sale su */
}

/* TESTI */
.text-col { flex: 1; }
.text-col h2 {
    font-size: 2.2rem;
    color: var(--brand-cyan);
    margin-bottom: 10px;
    line-height: 1.2;
}
.subtitle {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-accent);
    margin-bottom: 20px;
    text-transform: uppercase;
}
.text-col p { color: var(--text-soft); font-size: 1.1rem; margin-bottom: 30px; }

/* BOTTONI */
.btn-action {
    display: inline-block;
    padding: 12px 35px;
    background: var(--brand-cyan);
    color: #fff;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    box-shadow: 0 10px 20px rgba(42, 200, 224, 0.3);
}
.btn-action:hover {
    background: var(--brand-accent);
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(221, 51, 51, 0.3);
}

/* PDF SECTION */
.pdf-section { background: var(--white); padding: 60px 0; }
.gradient-card {
    background: linear-gradient(135deg, #2ac8e0 0%, #7928ca 100%);
    border-radius: 20px;
    padding: 50px;
    display: flex;
    align-items: center;
    gap: 50px;
    color: #fff;
    box-shadow: 0 20px 50px rgba(121, 40, 202, 0.3);
    position: relative;
    overflow: hidden;
}
.gradient-card::before {
    content: ''; position: absolute; top: -50%; right: -10%; width: 400px; height: 400px;
    background: rgba(255,255,255,0.1); border-radius: 50%;
}
.pdf-img { flex: 1; text-align: center; position: relative; z-index: 2; }
.pdf-img img {
    max-width: 280px;
    border-radius: 10px;
    transform: rotate(-5deg);
    border: 5px solid rgba(255,255,255,0.3);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    transition: 0.4s;
}
.gradient-card:hover .pdf-img img { transform: rotate(0deg) scale(1.05); }
.pdf-content { flex: 1.5; position: relative; z-index: 2; }
.pdf-content h3 { font-size: 2rem; margin-bottom: 15px; color: #fff; }
.pdf-content p { font-size: 1.1rem; margin-bottom: 25px; opacity: 0.95; }
.btn-white {
    background: #fff; color: #7928ca; padding: 15px 30px; border-radius: 30px;
    font-weight: 800; display: inline-block;
}
.btn-white:hover { background: var(--brand-cyan); color: #fff; }

/* FOOTER */
footer {
    background: #222;
    color: #fff;
    padding: 40px 0;
    text-align: center;
    border-top: 4px solid var(--brand-cyan);
}

/* ANIMAZIONI */
.reveal { opacity: 0; transform: translateY(30px); transition: 0.8s; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav-links {
        display: none; flex-direction: column; position: absolute; top: 90px; left: 0; width: 100%;
        background: var(--brand-cyan); padding: 20px 0; text-align: center;
    }
    .nav-links.show { display: flex; }
    .menu-btn { display: block; }
    
    .feature-row, .feature-row:nth-child(even) { flex-direction: column; gap: 30px; text-align: center; margin-bottom: 60px; }
    .intro-frame { padding: 20px; }
    .intro-frame h1 { font-size: 1.8rem; }
    
    .gradient-card { flex-direction: column; text-align: center; padding: 30px; }
    .pdf-img img { margin-bottom: 20px; transform: rotate(0); }
}

/* =========================================
   4. STILE PAGINA CONTATTI (Cards Aggiornato)
   ========================================= */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
    margin-top: 50px;
}

.contact-card {
    background: #fff;
    border-radius: 20px;
    padding: 50px 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.03);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.contact-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 50px rgba(42, 200, 224, 0.2);
    border-color: var(--brand-cyan);
}


/* FOTO CONTATTO - FIX COLORI E ZOOM */
.contact-avatar {
    width: 160px;
    height: 160px;
    margin: 0 auto 25px;
    border-radius: 50%;
    overflow: hidden;
    
    /* MODIFICA: Stato Iniziale = Ciano */
    border: 5px solid var(--brand-cyan); 
    
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: all 0.5s ease;
}

.contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    
    /* Filtro Bianco e Nero attivo inizialmente */
    filter: grayscale(100%); 
    
    transition: transform 0.5s ease, filter 0.5s ease;
}

/* STATO HOVER */
.contact-card:hover .contact-avatar {
    /* MODIFICA: Diventa Verde scuro (tipo Excel ma più scuro) */
    border-color: #185c37; 
}

.contact-card:hover .contact-avatar img {
    filter: grayscale(0%); /* L'immagine torna a colori */
    transform: scale(1.12); /* Zoom ridotto */
}



/* Testi Contatto */
.contact-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 5px;
}

.contact-role {
    color: var(--brand-accent);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: block;
}

.contact-bio {
    font-size: 1rem;
    color: var(--text-soft);
    margin-bottom: 30px;
    line-height: 1.5;
}

.btn-email {
    display: inline-block;
    background: var(--text-main);
    color: #fff;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}
.btn-email:hover {
    background: var(--brand-cyan);
    color: #fff;
    box-shadow: 0 5px 15px rgba(42, 200, 224, 0.4);
}