/* =========================================================================
   SPOKENCY - SITO ISTITUZIONALE
   Fogli di stile globali
   ========================================================================= */

/* --- VARIABILI GLOBALI (Colori, Font, Spaziature) --- */
:root {
    /* Toni Brand Principali - Coerenti con i funnel esistenti */
    --navy: #034664;
    /* Blu Scuro - Colore principale per testi e fondi scuri */
    --navy-light: #02638e;
    /* Variante più chiara del navy per hover */
    --navy-dark: #011B27;
    /* Navy molto scuro per sezioni "serissime" */

    --green: #40F99C;
    /* Verde Accento - Colore principale CTA e dettagli */
    --green-hover: #2ee68a;
    /* Verde per hover CTA */

    --white: #F4FAEE;
    /* Bianco sporco/caldo usato come sfondo generale */
    --white-pure: #ffffff;
    /* Bianco puro per card e overlay */

    /* Toni di testo e bordi */
    --text-main: #034664;
    /* Testo principale (usa il navy) */
    --text-muted: rgba(3, 70, 100, 0.7);
    /* Testo secondario (navy semi-trasparente) */
    --border-muted: rgba(3, 70, 100, 0.1);
    /* Bordi leggeri */

    /* Tipografia (Google Fonts) */
    --font-display: 'Inter', sans-serif;
    /* Font principale (body, testi lunghi, UI) */
    --font-heading: 'Roboto', sans-serif;
    /* Font per titoli, più solido e istituzionale */

    /* Spaziature (Border Radius) */
    --radius-sm: 0.5rem;
    /* 8px */
    --radius-md: 1rem;
    /* 16px */
    --radius-lg: 1.5rem;
    /* 24px */
    --radius-xl: 2rem;
    /* 32px */

    /* Ombre per profondità e premium feel */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Transizioni morbide per micro-interazioni */
    --transition-fast: all 0.2s ease-in-out;
    --transition-base: all 0.3s ease-in-out;
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- RESET & IMPOSTAZIONI BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Scorrimento fluido sulle ancore */
}

body {
    background-color: var(--white);
    color: var(--text-main);
    font-family: var(--font-display);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    /* Rende il font più nitido su Mac/iOS */
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    /* Evita scroll orizzontale accidentale */
}

/* --- TIPOGRAFIA --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--navy);
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    /* Titoli più compatti, look premium */
}

h1 {
    font-size: 2.5rem;
    font-weight: 900;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
}

h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

h4 {
    font-size: 1.25rem;
    font-weight: 700;
}

@media (min-width: 768px) {
    h1 {
        font-size: 3.5rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    h3 {
        font-size: 1.75rem;
    }
}

@media (min-width: 1024px) {
    h1 {
        font-size: 4.5rem;
    }

    h2 {
        font-size: 3rem;
    }
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    color: var(--text-muted);
}

a {
    text-decoration: none;
    color: var(--navy);
    transition: var(--transition-base);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- CLASSI UTILITY & LAYOUT --- */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    /* Margine laterale mobile */
}

.text-center {
    text-align: center;
}

.text-navy {
    color: var(--navy);
}

.text-green {
    color: var(--green);
}

.text-white {
    color: var(--white-pure);
}

.bg-white {
    background-color: var(--white-pure);
}

.bg-navy {
    background-color: var(--navy);
    color: var(--white-pure);
}

.bg-navy h1,
.bg-navy h2,
.bg-navy h3,
.bg-navy h4,
.page-header h1,
.page-header h2,
.page-header h3,
.page-header h4 {
    color: var(--white-pure);
}

.bg-navy p {
    color: rgba(255, 255, 255, 0.8);
}

/* Badge di Sezione (elementi visivi per separare concetti, es: "IL METODO") */
.section-badge {
    display: inline-block;
    color: var(--navy);
    background: rgba(64, 249, 156, 0.3);
    /* Sfondo verde trasparente */
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    margin-bottom: 1rem;
}

.bg-navy .section-badge {
    background: rgba(64, 249, 156, 0.1);
}

/* Margini verticali standard per sezioni */
.section {
    padding: 5rem 0;
}

@media (min-width: 768px) {
    .section {
        padding: 8rem 0;
    }
}

/* --- BOTTONI E LISTE --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    border: none;
    transition: var(--transition-base);
    text-align: center;
    gap: 0.5rem;
    /* Spazio tra testo e icona eventuale */
}

/* Bottone Primario (Azione Principale, es: "Richiedi Consulenza") */
.btn-primary {
    background-color: var(--green);
    color: var(--navy);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: var(--green-hover);
    transform: translateY(-2px);
    /* Effetto sollevamento */
    box-shadow: var(--shadow-lg);
}

/* Bottone Secondario (Azione Alternativa, es: "Scopri Corsi") */
.btn-secondary {
    background-color: transparent;
    color: var(--navy);
    border: 2px solid var(--navy);
}

.btn-secondary:hover {
    background-color: var(--navy);
    color: var(--white-pure);
}

/* --- HEADER / NAVBAR --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(244, 250, 238, 0.95);
    /* Header quasi opaco */
    backdrop-filter: blur(10px);
    /* Effetto vetro/sfocatura dietro */
    border-bottom: 1px solid var(--border-muted);
    z-index: 1000;
    transition: var(--transition-base);
}

.site-header.scrolled {
    box-shadow: var(--shadow-sm);
    /* Ombra compare quando si scrolla */
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 5rem;
    /* 80px */
}

.logo img {
    height: 2.5rem;
    width: auto;
}

/* Menu Desktop */
.nav-menu {
    display: none;
    /* Nascosto su mobile */
    align-items: center;
    gap: 2rem;
    list-style: none;
}

@media (min-width: 1024px) {
    .nav-menu {
        display: flex;
    }
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--navy);
}

/* Linea animata sotto i link al passaggio del mouse */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--green);
    transition: var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Header CTA e Hamburger Menu */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-cta {
    display: none;
    /* Nascosta su mobile per spazio */
    font-size: 0.75rem;
    padding: 0.75rem 1.5rem;
}

@media (min-width: 768px) {
    .nav-cta {
        display: inline-flex;
    }
}

/* Hamburger icon per menu mobile */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    /* Sopra il menu espanso */
}

@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none;
    }
}

.mobile-menu-btn span {
    width: 2rem;
    height: 0.25rem;
    background-color: var(--navy);
    border-radius: 10px;
    transition: var(--transition-base);
    position: relative;
    transform-origin: 1px;
}

/* Menu Mobile Overlay */
.mobile-menu {
    position: fixed;
    top: 5rem;
    /* Sotto l'header */
    left: 0;
    width: 100%;
    height: calc(100vh - 5rem);
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transform: translateX(100%);
    /* Nascosto a destra */
    transition: transform 0.4s ease-in-out;
    z-index: 999;
}

.mobile-menu.open {
    transform: translateX(0);
    /* Entra nello schermo */
}

.mobile-menu .nav-link {
    font-size: 1.5rem;
}

.mobile-menu .nav-cta {
    display: flex;
    margin-top: 1rem;
    font-size: 1rem;
    padding: 1rem 2rem;
}

/* Animazione Hamburger a X */
.mobile-menu-btn.open span:nth-child(1) {
    transform: rotate(45deg);
}

.mobile-menu-btn.open span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.open span:nth-child(3) {
    transform: rotate(-45deg);
}


/* --- FOOTER --- */
.site-footer {
    background-color: var(--navy-dark);
    color: var(--white-pure);
    padding: 5rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
    }

    /* Layout 4 colonne asimmetrico */
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    margin-top: 1rem;
    max-width: 300px;
}

.footer-heading {
    color: var(--white-pure);
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--green);
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white-pure);
}

.social-icon:hover {
    background-color: var(--green);
    color: var(--navy);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    margin-bottom: 0;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0.5rem;
}

.footer-bottom a:hover {
    color: var(--white-pure);
}

/* --- ANIMAZIONI GENERALI (Scroll Reveal) --- */
/* Questa classe verrà gestita tramite IntersectionObserver in JS */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Utilità di Ritardo per animazioni a cascata */
.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}