/* ==========================================================================
   0. FONTS IN LOCALE (@font-face)
   ========================================================================== */

/* --- INTER --- */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('../assets/fonts/inter-v20-latin-300.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../assets/fonts/inter-v20-latin-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../assets/fonts/inter-v20-latin-500.woff2') format('woff2');
}

/* --- CORMORANT GARAMOND --- */
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../assets/fonts/cormorant-garamond-v21-latin-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../assets/fonts/cormorant-garamond-v21-latin-500.woff2') format('woff2');
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../assets/fonts/cormorant-garamond-v21-latin-600.woff2') format('woff2');
}

/* ==========================================================================
   1. VARIABILI E CONFIGURAZIONE ROOT
   ========================================================================== */
:root {
    --bg: #f6f7f4;        /* base */
    --bg-alt: #e7ece6;    /* verde-grigio più evidente */
    --bg-alt-2: #f3efe7;  /* caldo beige più percepibile */

    --text: #2f2f2f;
    --primary: #4f7d6b;
    --primary-dark: #355a4c;
    --card: #ffffff;
    --line: #e3ebe6;
    --header-h: 78px;
}

html {
    scroll-behavior: smooth;
}

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

/* ==========================================================================
   2. TIPOGRAFIA E STILI BASE
   ========================================================================== */
body {
    font-family: "Inter", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    padding-top: var(--header-h);
}

h1, h2, h3, .logo, a.logo {
    font-family: "Cormorant Garamond", serif !important;
}

.hero h1, .hero p, .hero .meta, .hero-focus, .credentials {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   3. LAYOUT E SEZIONI GENERALI
   ========================================================================== */
section {
    width: 100%;
    margin: auto;
    padding: clamp(80px, 8vw, 110px) 0;
    scroll-margin-top: calc(var(--header-h) + 20px);
    background: var(--bg);
}

section.alt { background: var(--bg-alt); }
section.alt-2 { background: var(--bg-alt-2); }

.section-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

h2 {
    color: var(--primary-dark);
    margin-bottom: 20px;
    font-size: clamp(1.5rem, 1.8vw, 1.8rem);
}

.block {
    background: var(--card);
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
    margin-top: 15px;
}

.grid { display: grid; gap: 14px; }
.tag { font-size: 0.85rem; color: #5f7f73; margin-bottom: 6px; }

/* ==========================================================================
   4. HEADER E NAVIGAZIONE
   ========================================================================== */
header {
    left: 0;
    right: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(246, 247, 244, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    transition: 0.3s ease;
    min-height: 78px;
}

.nav {
    min-height: 78px;
    max-width: 1100px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
}

a.logo {
    font-size: 1.35rem !important;
    font-weight: 500 !important;
    color: var(--primary-dark) !important;
    letter-spacing: 0.2px !important;
    line-height: 1.05 !important;
    text-decoration: none !important;
    text-transform: none !important;
    display: inline-block !important;
}

.menu {
    display: flex;
    gap: 18px;
    align-items: center;
}

.nav a {
    text-decoration: none;
    color: var(--text);
    font-size: 0.9rem;
    transition: 0.2s ease;
}

.nav a:hover {
    color: var(--primary);
}

/* Pulsante Contatti convertito in Bottone elegante */
.nav a.nav-btn {
    background: var(--primary);
    color: #fff !important;
    padding: 10px 22px;
    border-radius: 20px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav a.nav-btn:hover {
    background: var(--primary-dark);
}

.hamburger {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    color: var(--primary-dark);
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

/* ==========================================================================
   5. SEZIONE HERO
   ========================================================================== */
.hero {
    width: 100%;
    max-width: none;
    margin: 0;
    height: calc(100dvh - var(--header-h));
    min-height: calc(100dvh - var(--header-h));
    padding: 0 20px;
    background: linear-gradient(rgba(20, 30, 25, 0.5), rgba(20, 30, 25, 0.65)), url("../assets/images/hero-bg.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

.hero-content {
    max-width: 760px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero h1 {
    letter-spacing: -0.5px;
    font-size: clamp(2.4rem, 3.2vw, 3rem);
    line-height: 1.12;
    margin-bottom: 8px;
    font-weight: 500;
}

.hero p {
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    opacity: 0.95;
    margin-bottom: 0;
}

.hero .meta {
    margin: 12px auto 0;
    font-size: clamp(0.95rem, 1.05vw, 1rem);
    opacity: 0.92;
    max-width: 650px;
}

.hero-divider {
    width: 60px;
    height: 1px;
    background: rgba(255, 255, 255, 0.35);
    margin: 18px auto;
    border-radius: 2px;
}

.credentials {
    max-width: 650px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 6px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.credentials p { margin-bottom: 6px; }

.hero-focus {
    margin-bottom: 10px;
    font-size: clamp(0.98rem, 1.05vw, 1rem);
    opacity: 0.95;
    max-width: 650px;
}

/* Doppia CTA */
.hero-ctas {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 24px;
}

.cta {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 30px;
    text-decoration: none;
    transition: 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.2px;
    font-size: 0.95rem;
}

.cta-primary {
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
}

.cta-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.cta-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
}

.cta-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 1);
}

/* ==========================================================================
   6. CARDS E CONTENITORI GRID
   ========================================================================== */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: #ffffff;
    border: 1px solid #e3ebe6;
    border-top: 4px solid #6f9b89;
    border-radius: 16px;
    padding: 26px;
    transition: 0.35s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.card-tag {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 0.72rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--primary);
    opacity: 0.8;
    font-weight: 600;
}

.card h3 {
    font-size: 1.25rem;
    line-height: 1.25;
    margin-bottom: 10px;
    color: var(--primary-dark);
    font-weight: 500;
}

.card p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text);
    opacity: 0.92;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   7. SEZIONE CHI SONO
   ========================================================================== */
.chi-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-top: 20px;
}

.chi-testo { flex: 2; }
.chi-testo p { margin-bottom: 14px; }

.lead {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 22px;
    line-height: 1.8;
}

.chi-foto {
    flex: 1;
    position: sticky;
    top: 120px;
}

.foto-box {
    background: #ffffff;
    padding: 10px;
    border: 1px solid #e3ebe6;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.foto-box img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

/* ==========================================================================
   8. APPROCCIO
   ========================================================================== */
.approccio-container { max-width: 900px; margin: auto; }
.approccio-intro { margin-bottom: 30px; }

.approccio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.approccio-box {
    background: #ffffff;
    border: 1px solid var(--line);
    border-left: 3px solid var(--primary);
    border-radius: 10px;
    padding: 22px;
    transition: 0.25s ease;
}

.approccio-box:hover { transform: translateY(-5px); }

.approccio-box h3 {
    font-size: 1.35rem;
    line-height: 1.2;
    margin-bottom: 10px;
    color: var(--primary-dark);
    font-weight: 500;
}

.approccio-box p { font-size: 0.9rem; line-height: 1.7; opacity: 0.95; }

/* ==========================================================================
   10. COLLOQUIO
   ========================================================================== */
.colloquio-intro { margin-bottom: 28px; }
.colloquio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }

.colloquio-box {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px;
    transition: 0.25s ease;
}

.colloquio-box:hover { transform: translateY(-5px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04); }
.colloquio-box h3 { font-size: 1.35rem; margin-bottom: 12px; color: var(--primary-dark); font-weight: 500; }
.colloquio-box p { font-size: 0.95rem; line-height: 1.75; }

/* ==========================================================================
   11. SEZIONE CONTATTI (Ottimizzata Top 10% - Griglia Bilanciata Desktop)
   ========================================================================== */
#contatti {
    padding: 80px 20px;
}

#contatti .section-inner {
    max-width: 1100px; /* Più largo per accogliere la struttura a due colonne */
    display: grid;
    grid-template-columns: 1.1fr 0.9fr; /* Colonna sinistra: intro/pulsante, Colonna destra: i box */
    gap: 40px;
    align-items: start;
}

/* Fa in modo che il titolo h2 occupi tutta la larghezza in alto */
#contatti h2 {
    grid-column: 1 / -1;
    margin-bottom: 10px;
}

.contatti-intro {
    max-width: 100%;
    margin-bottom: 0; 
}

/* Modulo di contatto evidenziato come pulsante principale della sezione */
.contatti-intro .cta {
    margin-top: 20px;
    padding: 16px 32px;
}

/* Nota di rassicurazione strategica (Click Trigger) sotto il pulsante */
.cta-trigger-note {
    display: block;
    margin-top: 15px;
    font-size: 0.88rem;
    color: #5d615c; /* Grigio-verde discreto ed elegante */
    font-style: italic;
    line-height: 1.4;
}

/* Colonna destra: Incolonna i box informativi verticalmente eliminando il vuoto */
.contatti-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-box {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px;
    transition: 0.25s ease, box-shadow 0.25s ease;
}

.info-box:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04); 
}

.info-box h3 { 
    font-size: 1.35rem; 
    margin-bottom: 12px; 
    color: var(--primary-dark); 
    font-weight: 500; 
}

.info-box p { 
    font-size: 0.95rem; 
    line-height: 1.75; 
}

.info-box strong {
    color: var(--primary-dark);
    font-weight: 600;
}

/* Dettaglio cromatico sofisticato per l'evidenziazione delle visite online */
.note-online { 
    display: inline-block;
    margin-top: 12px; 
    font-size: 0.92rem; 
    color: var(--primary); 
    font-style: italic; 
}

/* ==========================================================================
   9. FOOTER (Ottimizzato Variante "Top 10%" a contrasto)
   ========================================================================== */
footer {
    background: var(--primary-dark);
    padding: 60px 20px 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-content { max-width: 1100px; margin: auto; }

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: left;
    margin-bottom: 30px;
}

.footer-block p {
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9); 
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Il tuo Nome e Cognome: Elegante, Serif e perfettamente allineato */
.footer-block:first-child .footer-title {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.4rem;
    line-height: 1.2;
    margin-bottom: 14px; /* Allineamento baseline perfetto */
    color: #ffffff;
    letter-spacing: 0.3px;
}

/* Titoli delle colonne (Labels) in beige caldo a contrasto */
.footer-label {
    font-size: 0.75rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--bg-alt-2);
    font-weight: 600;
    margin-bottom: 14px; /* Perfettamente speculare alla prima colonna */
    display: block;
}

.footer-copy { 
    margin-top: 30px; 
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem; 
    color: rgba(255, 255, 255, 0.6); 
    text-align: center; 
}

/* Gestione e interazione dei Link attivi nel footer scuro */
.footer-content a { 
    color: #ffffff; 
    text-decoration: none; 
    transition: 0.2s ease; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-content a:hover { 
    color: var(--bg-alt-2); 
    border-bottom-color: var(--bg-alt-2); 
}

/* ==========================================================================
   12. COPERTURA MEDIA QUERY (TABLET)
   ========================================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    section { max-width: 94%; padding: 88px 36px; }
    .cards, .approccio-grid, .colloquio-grid, .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    
    /* Adattamento tablet per la sezione contatti */
    #contatti .section-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
    
    .chi-container { gap: 32px; }
    .chi-foto { top: 110px; }
}

/* ==========================================================================
   13. COPERTURA MEDIA QUERY (MOBILE)
   ========================================================================== */
@media (max-width: 768px) {
    section { padding: 72px 20px; }
    .block { padding: 20px; }

    /* Navigazione responsive e Hamburger */
    .hamburger {
        display: block;
        position: relative;
        z-index: 1001;
    }

    .menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(246, 247, 244, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 24px;
        padding: 40px;
        z-index: 999;
    }

    .menu.show {
        display: flex;
    }

    .menu a {
        font-size: 1.35rem;
        font-family: "Cormorant Garamond", serif;
        color: var(--primary-dark) !important;
        width: 100%;
        text-align: center;
        padding: 10px 0;
    }

    .nav a.nav-btn {
        background: transparent !important;
        color: var(--primary-dark) !important;
        padding: 10px 0 !important;
        border-radius: 0 !important;
        display: block !important;
        width: 100%;
        text-align: center;
        box-shadow: none !important;
    }

    .nav a.nav-btn:hover {
        background: transparent !important;
        color: var(--primary) !important;
    }

    /* Ottimizzazione Hero e pulsanti su mobile */
    .hero { min-height: 100svh; height: auto; padding: 40px 15px 40px; }
    .hero-ctas { flex-direction: column; width: 100%; max-width: 320px; gap: 12px; }
    .cta { width: 100%; text-align: center; padding: 12px 20px; }

    .chi-container { flex-direction: column; }
    .chi-foto { order: -1; position: relative; top: auto; margin-bottom: 20px; }
    .foto-box { max-width: 320px; margin: 0 auto; }
    
    /* Incolonnamento mobile per griglie e sezione Contatti */
    #contatti .section-inner { grid-template-columns: 1fr; gap: 30px; }
    .contatti-intro { text-align: center; }
    
    .cards, .approccio-grid, .colloquio-grid, .footer-grid { grid-template-columns: 1fr; }
    .footer-grid { gap: 18px; text-align: center; }
}