/* ===========================
   STILE 4: SERENO
   Palette: Verde salvia scuro / Beige caldo / Terracotta
   Ispirazione: layout arioso, fotografia grande, tipografia editoriale
   Colori campionati dalla palette di riferimento fornita dalla cliente.
=========================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Color+Emoji&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,600&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --primary:      #495a58;  /* Verde salvia scuro */
    --primary-light:#5c706d;
    --primary-deep: #3f4a49;  /* Verde antracite: testo e titoli */
    --accent:       #d4967d;  /* Terracotta */
    --accent-dark:  #c07f65;
    --bg:           #ffffff;
    --bg-section:   #dcd9d0;  /* Beige caldo */
    --bg-soft:      #f8f8f8;
    --text:         #3f4a49;
    --text-light:   #5f6d6b;
    --white:        #ffffff;
    --border:       #e2e0d9;
    --shadow:       rgba(63,74,73,0.10);

    /* Il respiro e' la cosa piu' importante di questo stile:
       sezioni alte, testo stretto, poche cose per schermata. */
    --section-y:    140px;
    --measure:      64ch;
}

* { margin:0; padding:0; box-sizing:border-box; }
.emoji { font-family:'Noto Color Emoji',sans-serif; }

body {
    background:var(--bg); color:var(--text);
    font-family:'Inter',system-ui,sans-serif;
    font-weight:400;
    font-size:17px;
    line-height:2;              /* interlinea molto ampia, come nel riferimento */
    overflow-x:hidden;
    -webkit-font-smoothing:antialiased;
}

.container { max-width:1180px; margin:0 auto; padding:0 32px; }

/* HEADER */
header {
    background:var(--white);
    border-bottom:1px solid var(--border);
    position:fixed; width:100%; top:0; z-index:1000;
}
.navbar { display:flex; justify-content:space-between; align-items:center; padding:22px 0; }

.logo {
    font-family:'Source Serif 4',Georgia,serif;
    font-size:25px; font-weight:400;
    color:var(--primary-deep); letter-spacing:0.2px;
    line-height:1.2;
}
.logo span { color:var(--accent); }

.nav-links { display:flex; list-style:none; align-items:center; }
.nav-links li { margin-left:34px; }
.nav-links a {
    text-decoration:none; color:var(--text-light);
    font-size:15px; font-weight:400; letter-spacing:0.2px;
    transition:color 0.25s;
}
.nav-links a:hover { color:var(--accent); }

.language-selector { margin-left:24px; }
.language-selector select {
    padding:8px 14px; border:1px solid var(--border); border-radius:0;
    background:var(--white); color:var(--primary-deep);
    font-family:'Inter',sans-serif; font-size:13px; cursor:pointer;
    transition:all 0.25s;
}
.language-selector select:hover { border-color:var(--accent); color:var(--accent); }

.burger { display:none; cursor:pointer; background:none; border:none; padding:4px; }
.burger div, .burger span { display:block; width:24px; height:1.5px; background:var(--primary-deep); margin:6px 0; transition:all 0.3s; }

/* HERO — foto a tutto schermo, testo in basso a sinistra */
.hero {
    min-height:100vh;
    display:flex; align-items:center;
    padding-top:110px; padding-bottom:80px;
    background:
        /* Velo chiaro sopra la foto, come nel tema "Naturale": l'immagine resta
           solo come texture di fondo e il testo torna scuro e leggibile.
           Il primo valore (0.95) decide quanto la foto e' coperta: alzalo per
           sbiadirla ancora, abbassalo per farla emergere. */
        linear-gradient(to right, rgba(255,255,255,0.95) 45%, rgba(255,255,255,0.90) 100%),
        url('formazione-aula.jpg') center 32%/cover no-repeat;
}
.hero-content { max-width:780px; }

.hero h1 {
    font-family:'Source Serif 4',Georgia,serif;
    font-weight:400;
    font-size:clamp(40px,5.6vw,74px);
    line-height:1.1;
    letter-spacing:-0.01em;
    color:var(--primary-deep);
    margin-bottom:28px;
    text-wrap:balance;
}
.hero p {
    font-size:17px; line-height:1.9;
    color:var(--text-light);
    margin-bottom:14px;
    max-width:56ch;
}
.hero .btn { margin-top:24px; }

/* BOTTONI — rettangoli netti, testo serif spaziato */
.btn {
    display:inline-block;
    padding:17px 40px;
    background:var(--accent); color:var(--white);
    text-decoration:none;
    border:1px solid var(--accent);
    border-radius:0;
    font-family:'Source Serif 4',Georgia,serif;
    font-size:15px; font-weight:400;
    letter-spacing:0.09em;
    line-height:1;
    transition:background 0.25s, border-color 0.25s, color 0.25s;
}
.btn:hover { background:var(--accent-dark); border-color:var(--accent-dark); color:var(--white); }

.btn-outline {
    background:transparent; color:var(--primary-deep);
    border:1px solid var(--primary-deep);
    margin-left:14px;
}
.btn-outline:hover { background:var(--primary-deep); border-color:var(--primary-deep); color:var(--white); }

/* Nelle sezioni chiare il bottone secondario torna verde */
.about-content .btn-outline,
.services .btn-outline {
    color:var(--primary-deep); border-color:var(--primary-deep);
}

/* TITOLI DI SEZIONE */
.section-title { text-align:center; margin-bottom:72px; }
.section-title h2 {
    font-family:'Source Serif 4',Georgia,serif;
    font-weight:400;
    font-size:clamp(32px,4vw,52px);
    line-height:1.15;
    color:var(--primary-deep);
    letter-spacing:-0.01em;
}

/* SERVIZI */
.services { padding:var(--section-y) 0; background:var(--bg-soft); }
.services-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:40px; }

.service-card {
    background:var(--white);
    border:1px solid var(--border);
    border-radius:0;
    overflow:hidden;
    transition:box-shadow 0.3s, transform 0.3s;
}
.service-card:hover { transform:translateY(-4px); box-shadow:0 18px 48px var(--shadow); }

/* Icona su fondo verde, come il blocco servizi del riferimento */
.service-icon {
    width:100%; height:190px;
    background:var(--primary);          /* verde salvia scuro */
    display:flex; align-items:center; justify-content:center;
    font-size:46px; color:var(--accent); /* simbolo terracotta rosato */
}

.service-content { padding:40px 34px; }
.service-content h3 {
    font-family:'Source Serif 4',Georgia,serif;
    font-weight:400; font-size:26px; line-height:1.2;
    color:var(--primary-deep); margin-bottom:18px;
}
.service-content p { color:var(--text-light); margin-bottom:18px; font-size:16px; line-height:1.85; }
.service-content p strong { color:var(--primary-deep); font-weight:500; }

.toggle-details {
    cursor:pointer; color:var(--accent);
    font-family:'Source Serif 4',Georgia,serif;
    font-size:16px; letter-spacing:0.04em;
    display:inline-flex; align-items:center; gap:8px;
    text-decoration:none;
    border-bottom:1px solid var(--accent);
    padding-bottom:2px;
    transition:color 0.25s, border-color 0.25s;
}
.toggle-details:hover { color:var(--primary-deep); border-color:var(--primary-deep); }
.toggle-details i { transition:transform 0.3s; font-size:12px; }
.toggle-details.active i { transform:rotate(180deg); }

.service-details {
    margin-top:28px; padding:28px;
    background:var(--bg-section);
    border-radius:0;
}
.service-details[hidden] { display:none; }
.service-details h4 {
    font-family:'Inter',sans-serif;
    color:var(--primary-deep); margin-bottom:14px;
    font-size:12px; font-weight:600;
    text-transform:uppercase; letter-spacing:0.14em;
}
.service-details ul { margin-left:18px; margin-bottom:16px; }
.service-details ul li { margin-bottom:8px; font-size:15px; line-height:1.75; color:var(--text-light); }
.service-details p { font-size:15px; line-height:1.8; color:var(--text-light); margin-bottom:12px; }

/* CHI SONO */
.about { padding:var(--section-y) 0; background:var(--bg-section); }
.about-grid { display:grid; grid-template-columns:1.05fr 1fr; gap:88px; align-items:center; }
.about-content h2 {
    font-family:'Source Serif 4',Georgia,serif;
    font-weight:400;
    font-size:clamp(32px,4vw,52px);
    line-height:1.15;
    color:var(--primary-deep);
    margin-bottom:36px;
    letter-spacing:-0.01em;
}
.about-content p { margin-bottom:20px; line-height:1.95; font-size:16px; color:var(--text-light); max-width:var(--measure); }
.about-content .btn { margin-top:20px; background:var(--accent); border-color:var(--accent); color:var(--white); }
.about-img img {
    width:100%; max-width:460px; height:auto;
    border-radius:0;
    box-shadow:none;
    display:block; margin:0 auto;
}

/* CONTATTI */
.contact { padding:var(--section-y) 0; background:var(--white); }
.contact-grid { display:grid; grid-template-columns:1fr 1fr; gap:80px; }
.contact-info h3 {
    font-family:'Source Serif 4',Georgia,serif;
    font-weight:400; font-size:28px; line-height:1.2;
    color:var(--primary-deep); margin-bottom:20px;
}
.contact-info p { margin-bottom:34px; line-height:1.95; color:var(--text-light); font-size:16px; }
.contact-links { display:flex; flex-direction:column; gap:20px; }
.contact-link {
    display:flex; align-items:center; gap:16px;
    text-decoration:none; color:var(--text-light);
    font-size:16px; transition:color 0.25s;
}
.contact-link:hover { color:var(--accent); }
.contact-link i { font-size:17px; color:var(--accent); width:20px; }

.form-control {
    width:100%; padding:16px 18px; margin-bottom:16px;
    border:1px solid var(--border); border-radius:0;
    font-size:16px; font-family:'Inter',sans-serif;
    background:var(--bg-soft); color:var(--text);
    transition:border-color 0.25s, background 0.25s;
}
.form-control::placeholder { color:#93a09e; }
.form-control:focus { outline:none; border-color:var(--primary); background:var(--white); }
.textarea { min-height:170px; resize:vertical; line-height:1.7; }

.form-checkbox { display:flex; align-items:flex-start; margin-bottom:24px; gap:12px; }
.form-checkbox input { margin-top:6px; accent-color:var(--primary); }
.form-checkbox label { font-size:14px; color:var(--text-light); line-height:1.7; }
.form-checkbox a { color:var(--accent); }

.form-btn {
    width:100%; padding:18px;
    background:var(--accent); color:var(--white);
    border:1px solid var(--accent); border-radius:0;
    font-family:'Source Serif 4',Georgia,serif;
    font-size:16px; letter-spacing:0.09em; line-height:1;
    cursor:pointer; transition:background 0.25s, border-color 0.25s;
}
.form-btn:hover { background:var(--accent-dark); border-color:var(--accent-dark); }

.form-message { padding:16px; margin-top:18px; border-radius:0; display:none; font-size:15px; line-height:1.7; }
.form-message.success { background:#eef2ef; color:#33513f; border:1px solid #c2d5c7; }
.form-message.error   { background:#fbf0ec; color:#8c4a33; border:1px solid #e8c4b6; }

/* FOOTER */
footer { background:var(--primary); color:var(--white); padding:96px 0 40px; }
.footer-content { text-align:center; }
.footer-logo {
    font-family:'Source Serif 4',Georgia,serif;
    font-size:30px; font-weight:400;
    color:var(--white); margin-bottom:14px;
}
.footer-logo span { color:var(--accent); }
.footer-content > p { margin-bottom:36px; color:rgba(255,255,255,0.72); font-size:16px; }

.social-links { display:flex; justify-content:center; gap:16px; margin-bottom:36px; }
.social-link {
    display:inline-flex; align-items:center; justify-content:center;
    width:44px; height:44px;
    background:transparent; color:var(--white);
    border:1px solid rgba(255,255,255,0.3);
    text-decoration:none; border-radius:50%;
    transition:all 0.25s;
}
.social-link:hover { background:var(--accent); border-color:var(--accent); transform:translateY(-3px); }

.style-switcher { margin:28px 0; }
.style-switcher label {
    color:rgba(255,255,255,0.65); font-size:12px;
    margin-right:12px; text-transform:uppercase; letter-spacing:0.14em;
}
.style-switcher select {
    padding:9px 16px; border:1px solid rgba(255,255,255,0.3);
    border-radius:0; background:transparent;
    color:var(--white); font-family:'Inter',sans-serif;
    font-size:13px; cursor:pointer;
}
.style-switcher select option { background:var(--primary); }

.footer-nav { display:flex; justify-content:center; list-style:none; gap:32px; margin-bottom:32px; flex-wrap:wrap; }
.footer-nav a {
    color:rgba(255,255,255,0.85); text-decoration:none;
    font-size:15px; transition:color 0.25s;
    border-bottom:1px solid transparent; padding-bottom:2px;
}
.footer-nav a:hover { color:var(--accent); border-color:var(--accent); }
.copyright { font-size:13px; color:rgba(255,255,255,0.45); margin-top:32px; line-height:1.8; }

/* COOKIE BANNER */
.cookie-banner {
    position:fixed; bottom:0; left:0; right:0;
    background:var(--primary-deep); color:var(--white);
    padding:24px; z-index:9999; display:none;
    border-top:3px solid var(--accent);
}
.cookie-banner.show { display:block; }
.cookie-content { max-width:1180px; margin:0 auto; display:flex; align-items:center; justify-content:space-between; gap:28px; }
.cookie-text { flex:1; }
.cookie-text p { margin-bottom:6px; font-size:14px; line-height:1.7; }
.cookie-text a { color:var(--accent); }
.cookie-buttons { display:flex; gap:12px; }
.cookie-btn {
    padding:12px 26px; border:1px solid transparent; border-radius:0;
    cursor:pointer; font-family:'Source Serif 4',Georgia,serif;
    font-size:14px; letter-spacing:0.06em; transition:all 0.25s;
}
.cookie-btn.accept { background:var(--accent); color:var(--white); border-color:var(--accent); }
.cookie-btn.accept:hover { background:var(--accent-dark); border-color:var(--accent-dark); }
.cookie-btn.decline { background:transparent; color:var(--white); border-color:rgba(255,255,255,0.4); }
.cookie-btn.decline:hover { background:rgba(255,255,255,0.12); }

/* MODALE PRIVACY */
.privacy-modal-overlay {
    display:none; position:fixed; inset:0;
    background:rgba(63,74,73,0.7); z-index:10000;
    align-items:center; justify-content:center;
}
.privacy-modal-overlay.open { display:flex; }
.privacy-modal {
    background:var(--white); max-width:740px; width:90%;
    max-height:85vh; overflow-y:auto;
    border-radius:0; padding:56px 48px; position:relative;
}
.privacy-modal h2 {
    font-family:'Source Serif 4',Georgia,serif; font-weight:400;
    color:var(--primary-deep); margin-bottom:24px; font-size:32px; line-height:1.2;
}
.privacy-modal h3 { font-family:'Inter',sans-serif; color:var(--primary-deep); margin:26px 0 10px; font-size:14px; font-weight:600; text-transform:uppercase; letter-spacing:0.1em; }
.privacy-modal p, .privacy-modal li { font-size:15px; color:var(--text-light); line-height:1.85; margin-bottom:10px; }
.privacy-modal a { color:var(--accent); }
.privacy-modal ul { margin-left:20px; margin-bottom:12px; }
.privacy-close {
    position:absolute; top:20px; right:24px;
    background:none; border:none; font-size:28px;
    cursor:pointer; color:var(--text-light); line-height:1;
}

/* RESPONSIVE */
@media screen and (max-width:900px) {
    :root { --section-y:84px; }
    .about-grid { grid-template-columns:1fr; gap:48px; }
    .contact-grid { grid-template-columns:1fr; gap:56px; }
}

@media screen and (max-width:768px) {
    .container { padding:0 22px; }
    .burger { display:block; }
    .nav-links {
        position:fixed; right:-100%; height:100vh; top:76px;
        background:var(--white); display:flex; flex-direction:column;
        align-items:center; width:100%; transition:right 0.3s;
        padding-top:56px;
    }
    .nav-links.active { right:0; }
    .nav-links li { margin:20px 0; }
    .language-selector { margin-left:0; margin-top:20px; }
    .hero { padding-bottom:64px; align-items:flex-end; }
    .hero p { font-size:16px; }
    .btn { display:block; text-align:center; }
    .btn-outline { margin-left:0; margin-top:12px; }
    .services-grid { grid-template-columns:1fr; }
    .section-title { margin-bottom:48px; }
    .service-content { padding:32px 26px; }
    .privacy-modal { padding:40px 26px; }
    .cookie-content { flex-direction:column; text-align:center; }
    .cookie-buttons { flex-direction:column; width:100%; }
    .cookie-btn { width:100%; }
    .footer-nav { gap:20px; }
}

@keyframes navLinkFade {
    from { opacity:0; transform:translateX(50px); }
    to { opacity:1; transform:translateX(0); }
}

/* Il fade-in si attiva solo se il JS e' disponibile. */
html.js img[loading="lazy"] { opacity:0; transition:opacity 0.4s; }
html.js img[loading="lazy"].loaded { opacity:1; }

/* Focus visibile per la navigazione da tastiera */
a:focus-visible, button:focus-visible, select:focus-visible,
input:focus-visible, textarea:focus-visible {
    outline:2px solid var(--accent);
    outline-offset:3px;
}

/* Skip link */
.skip-link {
    position:absolute; left:-9999px; top:0; z-index:10001;
    background:var(--primary-deep); color:var(--white);
    padding:14px 22px; text-decoration:none; font-size:14px;
}
.skip-link:focus { left:0; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration:0.01ms !important;
        animation-iteration-count:1 !important;
        transition-duration:0.01ms !important;
        scroll-behavior:auto !important;
    }
}
