/* ============================================================
   PrivacyLog - Manuale Utente
   Stili usati soltanto da manuale.php. Caricato dopo css/style.css.
   ============================================================ */

:root {
    /* style.css non definisce --shadow-xl, usato dal lightbox e dalle schermate */
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.10), 0 8px 10px -6px rgba(0,0,0,.10);
}

        /* ============================================
           Manuale d'uso - stili di pagina
           ============================================ */

        .reading-progress {
            position: fixed;
            top: 0; left: 0; right: 0;
            height: 3px;
            z-index: 1100;
            background: transparent;
            pointer-events: none;
        }

        .reading-progress span {
            display: block;
            height: 100%;
            width: 0;
            background: var(--color-accent);
            transition: width 0.1s linear;
        }

        /* ---- Intestazione ---- */

        .manual-header {
            padding: 7.5rem 2rem 3.5rem;
        }

        .manual-header-inner {
            max-width: 760px;
            margin: 0 auto;
        }

        .manual-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            background: rgba(255,255,255,0.12);
            border: 1px solid rgba(255,255,255,0.25);
            color: white;
            padding: 0.4rem 1rem;
            border-radius: 100px;
            font-size: 0.85rem;
            font-weight: 600;
            margin-bottom: 1.25rem;
        }

        .manual-badge i { color: var(--color-accent); }

        .manual-header-actions {
            display: flex;
            gap: 0.75rem;
            justify-content: center;
            flex-wrap: wrap;
            margin-top: 2rem;
        }

        .btn-outline-light {
            background: transparent;
            border: 2px solid rgba(255,255,255,0.45);
            color: white;
        }

        .btn-outline-light:hover {
            background: white;
            color: var(--color-primary);
            border-color: white;
        }

        .manual-header-meta {
            font-size: 0.85rem !important;
            opacity: 0.65 !important;
            margin-top: 1.75rem !important;
            letter-spacing: 0.02em;
        }

        /* ---- Impianto a due colonne ---- */

        .manual-layout {
            max-width: 1200px;
            margin: 0 auto;
            padding: 3.5rem 2rem 5rem;
            display: grid;
            grid-template-columns: 260px 1fr;
            gap: 4rem;
            align-items: start;
        }

        /* ---- Indice laterale ---- */

        .manual-toc {
            position: sticky;
            top: 95px;
            max-height: calc(100vh - 120px);
            overflow-y: auto;
            padding-right: 0.5rem;
        }

        .manual-toc-toggle { display: none; }

        .manual-toc-body ol {
            list-style: none;
            counter-reset: cap;
            padding: 0;
            margin: 0;
        }

        .manual-toc-body li { counter-increment: cap; }

        .manual-toc-body a {
            display: flex;
            gap: 0.65rem;
            align-items: baseline;
            padding: 0.45rem 0.7rem;
            border-left: 2px solid #e5e7eb;
            color: var(--color-text-light);
            text-decoration: none;
            font-size: 0.9rem;
            line-height: 1.4;
            transition: color 0.15s, border-color 0.15s, background 0.15s;
        }

        .manual-toc-body a::before {
            content: counter(cap);
            font-size: 0.75rem;
            font-weight: 700;
            color: #cbd5e1;
            min-width: 1.1em;
        }

        .manual-toc-body a:hover {
            color: var(--color-primary);
            background: var(--color-bg-alt);
        }

        .manual-toc-body a.active {
            color: var(--color-primary);
            font-weight: 600;
            border-left-color: var(--color-accent);
            background: var(--color-bg-alt);
        }

        .manual-toc-body a.active::before { color: var(--color-accent); }

        /* ---- Contenuto ---- */

        .manual-content {
            max-width: 780px;
            font-size: 1.03rem;
            line-height: 1.75;
        }

        .manual-intro {
            background: var(--color-bg-alt);
            border-left: 3px solid var(--color-accent);
            border-radius: 4px 14px 14px 4px;
            padding: 1.5rem 1.75rem;
            margin-bottom: 1rem;
        }

        .manual-intro p { margin-bottom: 0.9rem; color: #374151; }
        .manual-intro p:last-child { margin-bottom: 0; }

        .manual-intro-nota {
            font-size: 0.9rem;
            color: var(--color-text-light) !important;
            display: flex;
            gap: 0.5rem;
            align-items: flex-start;
        }

        .manual-intro-nota i { color: var(--color-primary-light); margin-top: 0.2rem; }

        .cap {
            padding-top: 3.25rem;
            margin-top: 3rem;
            border-top: 1px solid rgba(0,0,0,0.07);
            scroll-margin-top: 95px;
        }

        .cap h2 {
            font-family: var(--font-display);
            font-size: 2rem;
            font-weight: 700;
            color: var(--color-primary);
            letter-spacing: -0.02em;
            line-height: 1.2;
            display: flex;
            align-items: center;
            gap: 0.9rem;
            margin-bottom: 1.35rem;
        }

        .cap-num {
            flex-shrink: 0;
            width: 44px;
            height: 44px;
            border-radius: 12px;
            background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
            color: white;
            font-family: var(--font-body);
            font-size: 1.05rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .cap h3 {
            font-family: var(--font-display);
            font-size: 1.3rem;
            font-weight: 600;
            color: var(--color-primary);
            border-left: 3px solid var(--color-accent);
            padding-left: 0.75rem;
            margin: 2.75rem 0 1rem;
            scroll-margin-top: 95px;
        }

        .cap p { margin-bottom: 1.1rem; color: #374151; }

        .cap-occhiello {
            color: var(--color-text-light);
            margin-top: -0.4rem;
        }

        .percorso-riga { margin-bottom: 1.75rem; }

        .percorso {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            background: #eef2f7;
            border: 1px solid #dbe3ec;
            border-radius: 6px;
            padding: 0.15rem 0.6rem;
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--color-primary);
            white-space: nowrap;
        }

        .percorso i { font-size: 0.7rem; opacity: 0.5; }

        .manual-content code {
            background: #f1f5f9;
            border: 1px solid #e2e8f0;
            border-radius: 5px;
            padding: 0.1rem 0.4rem;
            font-size: 0.88em;
            font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
            color: #334155;
        }

        .manual-content a {
            color: var(--color-primary-light);
            font-weight: 500;
            text-decoration: none;
            border-bottom: 1px solid rgba(45,90,138,0.3);
        }

        .manual-content a:hover { border-bottom-color: var(--color-primary-light); }

        .lista-segno {
            list-style: none;
            padding-left: 0;
            margin: 0 0 1.3rem;
        }

        .lista-segno li {
            position: relative;
            padding-left: 1.5rem;
            margin-bottom: 0.6rem;
            color: #374151;
        }

        .lista-segno li::before {
            content: '';
            position: absolute;
            left: 0.3rem;
            top: 0.72em;
            width: 6px;
            height: 6px;
            border-radius: 2px;
            background: var(--color-accent);
        }

        /* ---- Schermate ---- */

        figure.shot { margin: 2rem 0 2.25rem; }

        figure.shot img {
            display: block;
            width: 100%;
            height: auto;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            box-shadow: var(--shadow-md);
            cursor: zoom-in;
            transition: box-shadow 0.25s ease, transform 0.25s ease;
            background: white;
        }

        figure.shot img:hover {
            box-shadow: var(--shadow-xl);
            transform: translateY(-2px);
        }

        figure.shot.stretta img {
            max-width: 420px;
            margin: 0 auto;
        }

        figure.shot.verticale img {
            max-width: 470px;
            margin: 0 auto;
        }

        figure.shot figcaption {
            font-size: 0.875rem;
            color: var(--color-text-light);
            margin-top: 0.75rem;
            padding-left: 0.15rem;
        }

        /* ---- Riquadri di richiamo ---- */

        .callout {
            display: flex;
            gap: 0.95rem;
            padding: 1.15rem 1.35rem;
            border-radius: 4px 12px 12px 4px;
            margin: 1.85rem 0;
            font-size: 0.97rem;
            line-height: 1.7;
            color: #374151;
        }

        .callout > i {
            font-size: 1.1rem;
            margin-top: 0.2rem;
            flex-shrink: 0;
        }

        .callout p { margin: 0; color: inherit; }
        .callout p + p { margin-top: 0.85rem; }

        .callout.nota {
            background: #f1f5fb;
            border-left: 4px solid var(--color-primary-light);
        }
        .callout.nota > i { color: var(--color-primary-light); }

        .callout.attenzione {
            background: #fffbeb;
            border-left: 4px solid #f59e0b;
        }
        .callout.attenzione > i { color: #d97706; }

        .callout.chiave {
            background: #fdf9e9;
            border-left: 4px solid var(--color-accent);
        }
        .callout.chiave > i { color: #b8901a; }

        /* ---- Tabelle ---- */

        .tabella-wrap {
            overflow-x: auto;
            margin: 1.85rem 0;
            border: 1px solid #e5e7eb;
            border-radius: 12px;
        }

        .tabella-wrap table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.95rem;
        }

        .tabella-wrap th {
            background: #f1f5f9;
            color: var(--color-primary);
            text-align: left;
            padding: 0.75rem 1rem;
            font-weight: 700;
            font-size: 0.78rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            white-space: nowrap;
        }

        .tabella-wrap td {
            padding: 0.8rem 1rem;
            border-top: 1px solid #eef2f7;
            color: #374151;
            vertical-align: top;
        }

        .tabella-wrap tr.evidenziata td { background: #fdfaf0; }

        /* ---- Schede affiancate ---- */

        .due-colonne {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.25rem;
            margin: 1.85rem 0;
        }

        .scheda {
            background: white;
            border: 1px solid #e5e7eb;
            border-radius: 14px;
            padding: 1.4rem;
        }

        .scheda-icona {
            width: 42px;
            height: 42px;
            border-radius: 11px;
            background: #eef2f7;
            color: var(--color-primary);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.15rem;
        }

        .scheda h4 {
            font-family: var(--font-display);
            font-size: 1.1rem;
            color: var(--color-primary);
            margin: 0.8rem 0 0.5rem;
        }

        .scheda p {
            font-size: 0.94rem;
            color: var(--color-text-light);
            margin: 0;
            line-height: 1.65;
        }

        .scheda.accento {
            border-color: rgba(232,185,35,0.55);
            background: linear-gradient(180deg, #fffdf5, #ffffff);
        }

        .scheda.accento .scheda-icona {
            background: rgba(232,185,35,0.18);
            color: #a17e12;
        }

        /* ---- Domande frequenti ---- */

        .manual-faq { max-width: none; margin: 1.5rem 0 0; }
        .manual-faq .faq-question { font-size: 0.98rem; gap: 1rem; }
        .manual-faq .faq-answer p { margin: 0; }

        /* ---- Chiusura ---- */

        .manual-chiusura {
            margin-top: 4rem;
            background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
            color: white;
            border-radius: 16px;
            padding: 2rem 2.25rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1.5rem;
            flex-wrap: wrap;
        }

        .manual-chiusura h3 {
            font-family: var(--font-display);
            font-size: 1.35rem;
            margin-bottom: 0.35rem;
        }

        .manual-chiusura p {
            margin: 0;
            opacity: 0.88;
            font-size: 0.97rem;
        }

        .manual-chiusura a[href^="mailto"] {
            color: var(--color-accent);
            border-bottom-color: rgba(232,185,35,0.4);
        }

        .manual-chiusura .btn-primary {
            background: white;
            color: var(--color-primary);
            border-bottom: none;
            flex-shrink: 0;
        }

        .manual-chiusura .btn-primary:hover { background: var(--color-bg-alt); }

        /* ---- Ingrandimento immagini ---- */

        .lightbox {
            position: fixed;
            inset: 0;
            z-index: 2000;
            background: rgba(15,23,42,0.93);
            display: none;
            align-items: center;
            justify-content: center;
            padding: 3rem 2rem;
            cursor: zoom-out;
        }

        .lightbox.open { display: flex; }

        .lightbox img {
            max-width: 100%;
            max-height: 100%;
            border-radius: 8px;
            box-shadow: 0 25px 60px rgba(0,0,0,0.5);
        }

        .lightbox-close {
            position: absolute;
            top: 1.25rem;
            right: 1.5rem;
            width: 44px;
            height: 44px;
            border-radius: 50%;
            border: none;
            background: rgba(255,255,255,0.12);
            color: white;
            font-size: 1.1rem;
            cursor: pointer;
            transition: background 0.2s;
        }

        .lightbox-close:hover { background: rgba(255,255,255,0.25); }

        /* ---- Responsive ---- */

        @media (max-width: 1024px) {
            .manual-layout {
                grid-template-columns: 1fr;
                gap: 2rem;
                padding: 2.5rem 1.5rem 4rem;
            }

            .manual-toc {
                position: static;
                max-height: none;
                overflow: visible;
                border: 1px solid #e5e7eb;
                border-radius: 12px;
                padding: 0;
            }

            .manual-toc-toggle {
                display: flex;
                width: 100%;
                align-items: center;
                justify-content: space-between;
                background: var(--color-bg-alt);
                border: none;
                border-radius: 12px;
                padding: 1rem 1.25rem;
                font-family: var(--font-body);
                font-size: 0.95rem;
                font-weight: 600;
                color: var(--color-primary);
                cursor: pointer;
            }

            .manual-toc-toggle i:last-child { transition: transform 0.25s; }
            .manual-toc.open .manual-toc-toggle i:last-child { transform: rotate(180deg); }

            .manual-toc-body {
                display: none;
                padding: 0.5rem 1rem 1rem;
            }

            .manual-toc.open .manual-toc-body { display: block; }

            .manual-content { max-width: none; }
        }

        @media (max-width: 768px) {
            .manual-header { padding: 6.5rem 1.5rem 3rem; }
            .cap h2 { font-size: 1.6rem; gap: 0.7rem; }
            .cap-num { width: 38px; height: 38px; font-size: 0.95rem; border-radius: 10px; }
            .due-colonne { grid-template-columns: 1fr; }
            .manual-chiusura { padding: 1.75rem; text-align: center; justify-content: center; }
            .lightbox { padding: 1rem; }
        }

        /* ---- Stampa ---- */

        @media print {
            .navbar, .footer, .manual-toc, .reading-progress,
            .manual-header-actions, .lightbox, .manual-chiusura { display: none !important; }

            .manual-header {
                padding: 0 0 1.5rem;
                background: none !important;
                color: var(--color-primary) !important;
                text-align: left;
                border-bottom: 2px solid var(--color-accent);
            }

            .manual-badge { display: none; }
            .manual-header p { opacity: 1 !important; }

            .manual-layout {
                display: block;
                padding: 1.5rem 0 0;
                max-width: none;
            }

            .manual-content { max-width: none; font-size: 10.5pt; }

            .cap { page-break-before: always; border-top: none; padding-top: 0; }
            .cap:first-of-type { page-break-before: avoid; }

            figure.shot, .callout, .tabella-wrap, .scheda { page-break-inside: avoid; }
            figure.shot img { box-shadow: none; max-width: 100%; }

            .faq-item { opacity: 1 !important; transform: none !important; }
            .faq-answer { display: block !important; }
            .faq-question i { display: none; }
        }