/* Journal Pugliautismo – 29/10/2026
   Parte 1: copia dello stile in linea della home (26/10/2026) per menu, piè di pagina, banner cookie, chat e finestre.
   Parte 2: stile specifico del Journal. */

        /* Base responsive styles */
        *, *::before, *::after { box-sizing: border-box; }
        html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
        body { 
            font-family: 'Inter', sans-serif; 
            background-color: #fafafa; 
            overflow-x: hidden;
            min-height: 100vh;
        }
        img { max-width: 100%; height: auto; display: block; }
        /* 26/10/2026: per crawler e senza JS la hero non segue l'altezza della finestra (Google rende con finestra altissima) */
        html:not(.anim-on) section.min-h-screen { min-height: min(100vh, 900px); }
        
        /* Typography responsive */
        .text-primary { color: #1a1a1a; }
        .text-secondary { color: #525252; }
        .text-muted { color: #737373; }
        .bg-primary { background-color: #171717; }
        .bg-secondary { background-color: #f5f5f5; }
        .border-subtle { border-color: #e5e5e5; }
        
        /* Card hover effects */
        .card-hover { transition: all 0.3s ease; }
        .card-hover:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); }
        
        /* Navigation blur */
        .nav-blur { 
            backdrop-filter: blur(12px); 
            -webkit-backdrop-filter: blur(12px);
            background: rgba(255,255,255,0.95); 
        }
        
        /* Section reveal animation */
        .section-reveal { opacity: 0; transform: translateY(30px); }
        
        /* Image grayscale effect */
        .grayscale-img { filter: grayscale(100%); transition: filter 0.5s ease; }
        .grayscale-img:hover { filter: grayscale(0%); }
        
        /* Data grid background */
        .data-grid {
            background-image: linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
            linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
            background-size: 20px 20px;
        }
        
        /* CMS loader */
        [data-cms] { opacity: 0; transition: opacity 0.3s ease; }
        [data-cms].cms-loaded { opacity: 1; }
        
        #cms-loader {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: #fafafa; z-index: 99998;
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            transition: opacity 0.5s ease, visibility 0.5s ease;
        }
        #cms-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
        .cms-loader-spinner {
            width: 50px; height: 50px;
            border: 3px solid #e5e5e5; border-top-color: #171717;
            border-radius: 50%; animation: spin 1s linear infinite;
        }
        @keyframes spin { to { transform: rotate(360deg); } }
        .cms-loader-text { 
            margin-top: 1rem; 
            font-size: clamp(0.75rem, 2vw, 0.875rem); 
            color: #737373; 
            font-family: 'JetBrains Mono', monospace; 
            text-align: center;
            padding: 0 1rem;
        }
        
        /* Intro screen */
        #intro-screen {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: #000; z-index: 99999;
            display: flex; align-items: center; justify-content: center;
            font-family: 'JetBrains Mono', monospace;
            padding: 1rem;
        }
        .intro-content { 
            max-width: 900px; 
            padding: clamp(1rem, 5vw, 2rem); 
            color: #fff; 
            width: 100%;
        }
        .typing-line { 
            font-size: clamp(1rem, 4vw, 1.5rem); 
            line-height: 1.8; 
            margin-bottom: clamp(1rem, 3vw, 1.5rem); 
            opacity: 0; 
            min-height: 3rem; 
        }
        .typing-text { color: #fff; }
        .cursor { 
            display: inline-block; 
            width: 3px; 
            height: 1.2em; 
            background-color: #facc15; 
            margin-left: 2px; 
            animation: blink 1s infinite; 
            vertical-align: text-bottom; 
        }
        @keyframes blink { 0%,50%{opacity:1} 51%,100%{opacity:0} }
        .highlight-word { color: #facc15; font-weight: 700; }
        .intro-skip { 
            position: absolute; 
            bottom: clamp(1rem, 4vw, 2rem); 
            right: clamp(1rem, 4vw, 2rem); 
            color: #666; 
            font-size: clamp(0.75rem, 2vw, 0.875rem); 
            cursor: pointer; 
            transition: color 0.3s; 
            text-transform: uppercase; 
            letter-spacing: 0.1em; 
        }
        .intro-skip:hover { color: #facc15; }
        .intro-progress { 
            position: absolute; 
            bottom: 0; left: 0; 
            height: 2px; 
            background: #facc15; 
            width: 0%; 
            transition: width 0.1s linear; 
        }
        
        /* Footer responsive */
        .footer-custom { 
            background-color: #0a0a0a; 
            color: #a3a3a3; 
            padding: clamp(2rem, 8vw, 4rem) 0 clamp(1rem, 4vw, 2rem) 0; 
        }
        .footer-grid { 
            display: grid; 
            grid-template-columns: 2fr 1fr 1fr 1fr; 
            gap: clamp(1.5rem, 4vw, 3rem); 
            max-width: 80rem; 
            margin: 0 auto; 
            padding: 0 clamp(1rem, 4vw, 1.5rem); 
        }
        @media (max-width: 1024px) { 
            .footer-grid { grid-template-columns: 1fr 1fr; } 
        }
        @media (max-width: 640px) { 
            .footer-grid { grid-template-columns: 1fr; gap: 2rem; } 
        }
        
        .footer-logo { 
            font-size: clamp(1.5rem, 4vw, 2rem); 
            font-weight: 700; 
            color: #fff; 
            margin-bottom: 1rem; 
            display: block; 
            letter-spacing: -0.02em; 
        }
        .footer-description { 
            font-size: clamp(0.8rem, 2vw, 0.875rem); 
            line-height: 1.6; 
            max-width: 300px; 
        }
        .footer-heading { 
            color: #fff; 
            font-size: 0.75rem; 
            font-weight: 600; 
            text-transform: uppercase; 
            letter-spacing: 0.1em; 
            margin-bottom: 1.5rem; 
        }
        .footer-links { list-style: none; padding: 0; margin: 0; }
        .footer-links li { margin-bottom: 0.75rem; }
        .footer-links a { 
            color: #a3a3a3; 
            text-decoration: none; 
            font-size: clamp(0.8rem, 2vw, 0.875rem); 
            transition: color 0.2s; 
            cursor: pointer; 
        }
        .footer-links a:hover { color: #fff; }
        .footer-social { 
            display: flex; 
            gap: 1rem; 
            margin-top: 1.5rem; 
            flex-wrap: wrap;
        }
        .footer-social a { 
            width: 2.5rem; 
            height: 2.5rem; 
            background-color: #262626; 
            border-radius: 50%; 
            display: flex; 
            align-items: center; 
            justify-content: center; 
            color: #fff; 
            transition: background-color 0.2s; 
            flex-shrink: 0;
        }
        .footer-social a:hover { background-color: #404040; }
        .footer-bottom { 
            border-top: 1px solid #262626; 
            margin-top: 3rem; 
            padding-top: 2rem; 
            display: flex; 
            justify-content: space-between; 
            align-items: center; 
            font-size: 0.75rem; 
            text-transform: uppercase; 
            letter-spacing: 0.05em; 
            max-width: 80rem; 
            margin-left: auto; 
            margin-right: auto; 
            padding-left: clamp(1rem, 4vw, 1.5rem); 
            padding-right: clamp(1rem, 4vw, 1.5rem);
            flex-wrap: wrap;
            gap: 1rem;
        }
        @media (max-width: 640px) { 
            .footer-bottom { flex-direction: column; text-align: center; } 
        }
        
        /* Cookie banner responsive */

        /* ============================================================
           ASSISTENTE PUGLIAUTISMO
           Invito al termine dell'intro, pulsante fisso, popup con la chat.
           ============================================================ */
        #intro-cta {
            margin-top: clamp(1.5rem, 4vw, 2.5rem);
            opacity: 0;
            transform: translateY(10px);
            transition: opacity .7s ease, transform .7s ease;
            pointer-events: none;
        }
        #intro-cta.show { opacity: 1; transform: none; pointer-events: auto; }
        #intro-cta p {
            color: #737373;
            font-size: clamp(.7rem, 2vw, .8rem);
            text-transform: uppercase;
            letter-spacing: .15em;
            margin-bottom: .9rem;
        }
        .chat-cta-btn {
            display: inline-flex;
            align-items: center;
            gap: .6rem;
            background: #facc15;
            color: #0a0a0a;
            border: none;
            font-family: 'JetBrains Mono', monospace;
            font-size: clamp(.75rem, 2vw, .85rem);
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .1em;
            padding: .9rem 1.6rem;
            cursor: pointer;
            transition: background .3s ease, transform .3s ease;
        }
        .chat-cta-btn:hover { background: #fde047; transform: translateY(-2px); }
        .chat-cta-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

        /* Pulsante fisso: resta disponibile dopo l'intro e nelle visite successive */
        #chat-fab {
            position: fixed;
            right: clamp(1rem, 3vw, 1.75rem);
            bottom: clamp(1rem, 3vw, 1.75rem);
            z-index: 9998;
            display: inline-flex;
            align-items: center;
            gap: .55rem;
            background: #171717;
            color: #f5f5f5;
            border: 1px solid #facc15;
            font-family: 'JetBrains Mono', monospace;
            font-size: .72rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .1em;
            padding: .8rem 1.1rem;
            cursor: pointer;
            opacity: 0;
            visibility: hidden;
            transform: translateY(12px);
            transition: opacity .4s ease, transform .4s ease, background .3s ease, bottom .3s ease;
        }
        #chat-fab.show { opacity: 1; visibility: visible; transform: none; }
        #chat-fab:hover { background: #262626; }
        #chat-fab:focus-visible { outline: 2px solid #facc15; outline-offset: 3px; }
        /* Non finisce sopra il banner dei cookie */
        body.cookie-visible #chat-fab { bottom: clamp(9rem, 22vh, 12rem); }
        @media (max-width: 640px) {
            #chat-fab .chat-fab-label { display: none; }
            #chat-fab { padding: .85rem; border-radius: 50%; }
        }

        /* Il popup usa il sistema modale del sito, senza padding interno */
        .modal-container--chat {
            background: #0a0a0b;
            border: 1px solid #2b2b31;
            max-width: min(880px, 96vw);
            height: min(86vh, 880px);
        }
        @supports (height: 100dvh) {
            .modal-container--chat { height: min(86dvh, 880px); }
        }
        .modal-container--chat .modal-header {
            background: #111113;
            border-bottom: 1px solid #24242a;
        }
        .modal-container--chat .modal-content {
            padding: 0;
            background: transparent;
            overflow: hidden;
            -webkit-backdrop-filter: none;
            backdrop-filter: none;
        }
        .chat-frame { display: block; width: 100%; height: 100%; border: 0; }
        .chat-privacy-note {
            flex: 0 0 auto;
            padding: 9px 18px 12px;
            background: #0a0a0b;
            border-top: 1px solid #24242a;
            color: #6f6f78;
            font-size: 11px;
            line-height: 1.45;
            text-align: center;
        }
        .chat-privacy-link {
            background: none;
            border: 0;
            padding: 0;
            color: #9a9aa4;
            font: inherit;
            text-decoration: underline;
            cursor: pointer;
        }
        .chat-privacy-link:hover { color: #facc15; }
        .modal-container--chat .modal-content { flex: 1 1 auto; min-height: 0; }
        .modal-subtitle {
            display: block;
            font-family: 'JetBrains Mono', monospace;
            font-size: .62rem;
            font-weight: 400;
            letter-spacing: .12em;
            text-transform: uppercase;
            color: #737373;
            margin-top: .3rem;
        }
        @media (prefers-reduced-motion: reduce) {
            #intro-cta, #chat-fab, .chat-cta-btn { transition: none; }
        }

        .cookie-banner { 
            position: fixed; 
            bottom: 0; left: 0; right: 0; 
            background: #0a0a0a; 
            color: #fff; 
            padding: clamp(1rem, 4vw, 1.5rem); 
            z-index: 9999; 
            transform: translateY(100%); 
            transition: transform 0.3s ease; 
            box-shadow: 0 -4px 20px rgba(0,0,0,0.3); 
        }
        .cookie-banner.show { transform: translateY(0); }
        .cookie-banner-content { 
            max-width: 80rem; 
            margin: 0 auto; 
            display: flex; 
            justify-content: space-between; 
            align-items: center; 
            gap: clamp(1rem, 3vw, 2rem); 
            flex-wrap: wrap; 
        }
        .cookie-banner-text { 
            flex: 1; 
            font-size: clamp(0.8rem, 2vw, 0.875rem); 
            line-height: 1.6; 
            min-width: 280px;
        }
        .cookie-banner-text a { color: #fff; text-decoration: underline; cursor: pointer; }
        .cookie-banner-buttons { 
            display: flex; 
            gap: 1rem; 
            flex-shrink: 0;
            flex-wrap: wrap;
            justify-content: center;
        }
        .cookie-btn { 
            padding: clamp(0.5rem, 2vw, 0.75rem) clamp(1rem, 3vw, 1.5rem); 
            font-size: clamp(0.8rem, 2vw, 0.875rem); 
            font-weight: 500; 
            cursor: pointer; 
            transition: all 0.2s; 
            border: none; 
            white-space: nowrap;
        }
        .cookie-btn-accept { background: #fff; color: #0a0a0a; }
        .cookie-btn-accept:hover { background: #e5e5e5; }
        .cookie-btn-decline { background: transparent; color: #fff; border: 1px solid #404040; }
        .cookie-btn-decline:hover { background: #262626; }
        
        /* Modal responsive */
        .modal-overlay { 
            position: fixed; 
            top: 0; left: 0; right: 0; bottom: 0; 
            background: rgba(0,0,0,0.4); 
            backdrop-filter: blur(20px); 
            -webkit-backdrop-filter: blur(20px); 
            z-index: 10000; 
            display: flex; 
            align-items: center; 
            justify-content: center; 
            padding: clamp(1rem, 4vw, 2rem); 
            opacity: 0; 
            visibility: hidden; 
            transition: all 0.4s cubic-bezier(0.4,0,0.2,1); 
        }
        .modal-overlay.active { opacity: 1; visibility: visible; }
        .modal-container { 
            background: rgba(255,255,255,0.25); 
            width: 100%; 
            max-width: min(800px, 95vw); 
            max-height: 85vh; 
            border-radius: 24px; 
            overflow: hidden; 
            display: flex; 
            flex-direction: column; 
            transform: scale(0.9) translateY(30px); 
            transition: all 0.4s cubic-bezier(0.4,0,0.2,1); 
            box-shadow: 0 8px 32px 0 rgba(0,0,0,0.37), inset 0 0 0 1px rgba(255,255,255,0.4); 
            border: 1px solid rgba(255,255,255,0.18); 
            backdrop-filter: blur(16px); 
            -webkit-backdrop-filter: blur(16px); 
        }
        .modal-overlay.active .modal-container { transform: scale(1) translateY(0); }
        .modal-header { 
            background: rgba(10,10,10,0.65); 
            backdrop-filter: blur(20px); 
            color: #fff; 
            padding: clamp(1rem, 3vw, 1.5rem) clamp(1rem, 4vw, 2rem); 
            display: flex; 
            justify-content: space-between; 
            align-items: center; 
            border-bottom: 1px solid rgba(255,255,255,0.1); 
            gap: 1rem;
        }
        .modal-title { 
            font-size: clamp(1rem, 3vw, 1.25rem); 
            font-weight: 600; 
            text-transform: uppercase; 
            letter-spacing: 0.1em; 
        }
        .modal-close { 
            background: rgba(255,255,255,0.15); 
            border: 1px solid rgba(255,255,255,0.2); 
            color: #fff; 
            cursor: pointer; 
            padding: 0.5rem; 
            border-radius: 50%; 
            transition: all 0.3s; 
            display: flex; 
            align-items: center; 
            justify-content: center; 
            width: 40px; 
            height: 40px; 
            flex-shrink: 0;
        }
        .modal-close:hover { background: rgba(255,255,255,0.25); transform: rotate(90deg); }
        .modal-content { 
            padding: clamp(1rem, 4vw, 2rem); 
            overflow-y: auto; 
            flex: 1; 
            background: rgba(255,255,255,0.1); 
            backdrop-filter: blur(10px); 
        }
        .modal-content h3 { 
            font-size: clamp(1rem, 2.5vw, 1.125rem); 
            font-weight: 600; 
            color: #fff; 
            margin-top: 1.5rem; 
            margin-bottom: 0.75rem; 
        }
        .modal-content h3:first-child { margin-top: 0; }
        .modal-content p { 
            color: rgba(255,255,255,0.9); 
            line-height: 1.7; 
            margin-bottom: 1rem; 
            font-size: clamp(0.85rem, 2vw, 0.95rem); 
        }
        .modal-content strong { color: #fff; font-weight: 600; }
        .modal-footer { 
            background: rgba(245,245,245,0.15); 
            backdrop-filter: blur(20px); 
            padding: clamp(1rem, 3vw, 1.25rem) clamp(1rem, 4vw, 2rem); 
            border-top: 1px solid rgba(255,255,255,0.1); 
            display: flex; 
            justify-content: flex-end; 
        }
        .modal-btn-close { 
            background: rgba(255,255,255,0.2); 
            color: #fff; 
            border: 1px solid rgba(255,255,255,0.3); 
            padding: clamp(0.5rem, 2vw, 0.75rem) clamp(1rem, 3vw, 2rem); 
            font-size: clamp(0.8rem, 2vw, 0.875rem); 
            font-weight: 500; 
            text-transform: uppercase; 
            letter-spacing: 0.05em; 
            cursor: pointer; 
            transition: all 0.3s; 
            border-radius: 12px; 
        }
        .modal-btn-close:hover { background: rgba(255,255,255,0.35); transform: translateY(-2px); }
        .modal-content::-webkit-scrollbar { width: 8px; }
        .modal-content::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); border-radius: 4px; }
        .modal-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 4px; }
        
        /* Counter animations */
        .counter-number { font-variant-numeric: tabular-nums; transition: all 0.3s ease; }
        .counter-update { animation: counterPulse 0.3s ease; }
        @keyframes counterPulse { 0%{transform:scale(1)} 50%{transform:scale(1.1);color:#22c55e} 100%{transform:scale(1)} }
        .live-indicator { display: inline-flex; align-items: center; gap: 0.5rem; }
        .live-dot { 
            width: 8px; 
            height: 8px; 
            background-color: #22c55e; 
            border-radius: 50%; 
            position: relative; 
            flex-shrink: 0;
        }
        .live-dot::after { 
            content: ''; 
            position: absolute; 
            top: -4px; left: -4px; right: -4px; bottom: -4px; 
            border-radius: 50%; 
            border: 2px solid #22c55e; 
            animation: livePulse 2s infinite; 
        }
        @keyframes livePulse { 0%{transform:scale(0.8);opacity:1} 100%{transform:scale(2);opacity:0} }
        
        /* Course card badge */
        .course-card { position: relative; overflow: hidden; }
        .course-badge { 
            position: absolute; 
            top: 1rem; right: 1rem; 
            background: #171717; 
            color: white; 
            padding: 0.25rem 0.75rem; 
            font-size: clamp(0.65rem, 1.5vw, 0.75rem); 
            font-weight: 600; 
            text-transform: uppercase; 
            letter-spacing: 0.05em; 
            z-index: 10;
        }
        
        /* WhatsApp button */
        .whatsapp-btn { 
            background: linear-gradient(135deg, #25D366 0%, #128C7E 100%); 
            color: white; 
            transition: all 0.3s ease; 
        }
        .whatsapp-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(37,211,102,0.3); }
        
        /* Navbar brand */
        .navbar-brand { 
            font-size: clamp(1.25rem, 3vw, 1.75rem); 
            font-weight: 700; 
            letter-spacing: -0.02em; 
            color: #1a1a1a; 
        }
        
        /* Hero background */
        #hero-bg-container { 
            position: absolute; 
            inset: 0; 
            overflow: hidden; 
            opacity: 0; 
            transition: opacity 0.5s ease; 
        }
        #hero-bg-container.loaded { opacity: 1; }
        
        /* Testimonianze slider responsive */
        .testimonianza-slide {
            min-width: 100%;
        }
        
        @media (max-width: 1024px) {
            .testimonianza-slide > div {
                grid-template-columns: 1fr !important;
            }
            .testimonianza-slide > div > div:last-child {
                border-top: 1px solid #1f1f1f;
            }
        }
        
        /* FAQ responsive */
        @media (max-width: 640px) {
            .faq-item button {
                padding: 1.25rem !important;
            }
            .faq-item button > div:first-child {
                gap: 0.75rem !important;
            }
            .faq-answer > div {
                padding-left: 1.25rem !important;
            }
        }
        
        /* Risultati grafici responsive */
        @media (max-width: 768px) {
            #risultati .grid.md\:grid-cols-3 {
                grid-template-columns: 1fr;
            }
        }
        
        
        /* Finestra critica grid */
        @media (max-width: 768px) {
            #finestra .grid.grid-cols-2 {
                grid-template-columns: 1fr;
            }
        }
        
        /* Realta counter grid */
        @media (max-width: 1024px) {
            #realta .grid.lg\:grid-cols-4 {
                grid-template-columns: repeat(2, 1fr);
            }
        }
        @media (max-width: 640px) {
            #realta .grid.lg\:grid-cols-4 {
                grid-template-columns: 1fr;
            }
        }
        
        /* Typography clamp utilities */
        .text-responsive-hero {
            font-size: clamp(2rem, 8vw, 5rem);
        }
        .text-responsive-section {
            font-size: clamp(1.75rem, 5vw, 3rem);
        }
        .text-responsive-body {
            font-size: clamp(0.875rem, 2vw, 1rem);
        }
        
        /* Touch-friendly improvements */
        @media (hover: none) and (pointer: coarse) {
            .card-hover:hover {
                transform: none;
            }
            .grayscale-img {
                filter: grayscale(0%);
            }
        }
        
        /* Prevent horizontal overflow */
        .overflow-x-clip {
            overflow-x: clip;
        }

        /* 26/10/2026 visibilita' immediata: testo visibile al caricamento, anche senza JS */
        .section-reveal { opacity: 1; transform: none; }
        [data-cms] { opacity: 1; }
        #cms-loader { display: none; }
        #intro-screen { display: none; }
        html.intro-on #intro-screen { display: flex; }
    
/* ===================== Parte 2: Journal ===================== */
.journal-body { background: #fafafa; }
.journal-main { padding-top: 4rem; min-height: 60vh; }
@media (min-width: 640px) { .journal-main { padding-top: 5rem; } }
.journal-nav-active { color: #1a1a1a !important; font-weight: 700 !important; text-decoration: underline; text-underline-offset: 4px; }
.j-wrap { max-width: 72rem; margin: 0 auto; padding-left: 1rem; padding-right: 1rem; }
@media (min-width: 640px) { .j-wrap { padding-left: 1.5rem; padding-right: 1.5rem; } }
.j-narrow { max-width: 46rem; }
.j-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* testata */
.j-hero { background: #fff; border-bottom: 1px solid #e5e5e5; padding: 3rem 0 1.75rem; background-image: linear-gradient(rgba(0,0,0,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,.03) 1px, transparent 1px); background-size: 40px 40px; }
@media (min-width: 1024px) { .j-hero { padding: 4.5rem 0 2.25rem; } }
.j-kicker { font-family: 'JetBrains Mono', monospace; font-size: .7rem; letter-spacing: .3em; text-transform: uppercase; color: #737373; margin: 0 0 .75rem; }
.j-h1 { font-size: clamp(2.25rem, 7vw, 4.5rem); font-weight: 300; letter-spacing: -.03em; line-height: 1.05; margin: 0 0 1rem; color: #1a1a1a; }
.j-h1-cat { font-weight: 600; }
.j-intro { max-width: 46rem; color: #525252; font-size: clamp(1rem, 2vw, 1.125rem); line-height: 1.7; margin: 0 0 1.75rem; }
.j-search { display: flex; gap: .5rem; max-width: 40rem; margin-bottom: 1.25rem; }
.j-search input { flex: 1; min-width: 0; border: 1px solid #d4d4d4; background: #fff; padding: .85rem 1rem; font: inherit; font-size: 1rem; border-radius: 0; color: #1a1a1a; }
.j-search input:focus { outline: 2px solid #171717; outline-offset: 1px; }
.j-search button { background: #171717; color: #fff; border: 0; padding: 0 1.4rem; font: inherit; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.j-search button:hover { background: #404040; }
.j-filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.j-filter { display: inline-block; border: 1px solid #d4d4d4; background: #fff; color: #404040; padding: .5rem .85rem; font-size: .78rem; text-decoration: none; transition: all .2s; }
.j-filter:hover { border-color: #171717; color: #171717; }
.j-filter.is-active { background: #171717; border-color: #171717; color: #fff; }

/* elenco */
.j-list { padding-top: 2.5rem; padding-bottom: 3rem; }
.j-count { font-family: 'JetBrains Mono', monospace; font-size: .75rem; color: #737373; margin: 0 0 1.25rem; letter-spacing: .05em; }
.j-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .j-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .j-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.j-card { background: #fff; border: 1px solid #e5e5e5; display: flex; flex-direction: column; transition: transform .3s ease, box-shadow .3s ease; }
.j-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,.08); }
@media (hover: none) { .j-card:hover { transform: none; } }
.j-card-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #f5f5f5; }
.j-card-img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%); transition: filter .5s ease; }
.j-card:hover .j-card-img { filter: grayscale(0); }
@media (hover: none) { .j-card-img { filter: none; } }
.j-card-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #171717; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 24px 24px; }
.j-card-ph span { font-size: 3.5rem; font-weight: 200; color: #fff; }
.j-card-body { padding: 1.25rem 1.25rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.j-card-cats { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; align-items: center; }
.j-chip { font-family: 'JetBrains Mono', monospace; font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; color: #525252; border: 1px solid #e5e5e5; padding: .2rem .5rem; text-decoration: none; background: #fafafa; }
a.j-chip:hover { border-color: #171717; color: #171717; }
.j-badge-example { font-family: 'JetBrains Mono', monospace; font-size: .62rem; font-weight: 700; letter-spacing: .1em; color: #fff; background: #b45309; padding: .22rem .5rem; }
.j-card-title { font-size: 1.2rem; font-weight: 600; line-height: 1.3; margin: 0 0 .5rem; letter-spacing: -.01em; }
.j-card-title a { color: #1a1a1a; text-decoration: none; }
.j-card-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.j-meta { font-family: 'JetBrains Mono', monospace; font-size: .72rem; color: #737373; margin: 0 0 .75rem; line-height: 1.6; }
.j-card-excerpt { color: #525252; font-size: .95rem; line-height: 1.65; margin: 0 0 1rem; flex: 1; }
.j-card-more { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: #1a1a1a; font-weight: 600; text-decoration: none; }
.j-card-more:hover { text-decoration: underline; }
.j-empty { background: #fff; border: 1px dashed #d4d4d4; padding: 2.5rem 1.5rem; text-align: center; color: #525252; }
.j-empty a { color: #1a1a1a; }
.j-pager { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: 2.5rem; }
.j-page { min-width: 2.5rem; height: 2.5rem; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #d4d4d4; background: #fff; color: #1a1a1a; text-decoration: none; font-family: 'JetBrains Mono', monospace; font-size: .85rem; }
.j-page.is-current { background: #171717; color: #fff; border-color: #171717; }
.j-loading { opacity: .45; transition: opacity .2s; }
.j-site-box { background: #f5f5f5; border-left: 3px solid #171717; padding: 1.1rem 1.25rem; color: #404040; font-size: .95rem; line-height: 1.7; margin: 0 auto 3rem; }
.j-site-box a { color: #1a1a1a; font-weight: 600; }
.j-site-box p { margin: 0; }

/* articolo */
.j-article { padding: 2.25rem 0 1rem; background: #fff; }
@media (min-width: 1024px) { .j-article { padding-top: 3.5rem; } }
.j-crumbs { font-size: .78rem; color: #737373; margin-bottom: 1.25rem; }
.j-crumbs a { color: #525252; text-decoration: none; }
.j-crumbs a:hover { color: #1a1a1a; text-decoration: underline; }
.j-article-title { font-size: clamp(1.9rem, 5.5vw, 3.25rem); font-weight: 600; line-height: 1.12; letter-spacing: -.025em; margin: 0 0 1rem; color: #1a1a1a; }
.j-article-meta { margin-bottom: 1.75rem; }
.j-example-note { background: #fff7ed; border: 1px solid #fdba74; color: #7c2d12; padding: .8rem 1rem; font-size: .9rem; margin: 0 0 1.5rem; }
.j-cover { margin: 0 0 2rem; }
.j-cover img { width: 100%; height: auto; }
.j-prose { font-size: 1.075rem; line-height: 1.8; color: #262626; }
.j-prose > * + * { margin-top: 1.15em; }
.j-prose p { margin: 0; }
.j-prose h2 { font-size: 1.6rem; font-weight: 600; line-height: 1.25; letter-spacing: -.015em; margin-top: 2.2em; color: #1a1a1a; }
.j-prose h3 { font-size: 1.25rem; font-weight: 600; margin-top: 1.8em; color: #1a1a1a; }
.j-prose h4 { font-size: 1.05rem; font-weight: 700; margin-top: 1.5em; }
.j-prose a { color: #1a1a1a; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.j-prose a:hover { text-decoration-thickness: 2px; }
.j-prose ul, .j-prose ol { padding-left: 1.4em; }
.j-prose ul { list-style: disc; }
.j-prose ol { list-style: decimal; }
.j-prose li + li { margin-top: .4em; }
.j-prose blockquote { border-left: 3px solid #171717; padding: .25em 0 .25em 1.1em; font-size: 1.2rem; font-weight: 300; color: #404040; margin-left: 0; margin-right: 0; }
.j-prose hr { border: 0; border-top: 1px solid #e5e5e5; margin: 2.5em 0; }
.j-prose figure { margin-left: 0; margin-right: 0; }
.j-prose img { width: 100%; height: auto; }
.j-prose figcaption, .j-video figcaption, .j-gallery figcaption { font-size: .82rem; color: #737373; margin-top: .5rem; line-height: 1.5; }
.j-prose table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.j-prose th, .j-prose td { border: 1px solid #e5e5e5; padding: .5rem .7rem; text-align: left; }
.j-section { margin-top: 2.75rem; }
.j-sub { font-family: 'JetBrains Mono', monospace; font-size: .75rem; font-weight: 700; letter-spacing: .25em; text-transform: uppercase; color: #737373; margin: 0 0 1rem; }
.j-video { margin: 0 0 1.75rem; }
.j-video video { width: 100%; height: auto; background: #000; display: block; }
.j-yt { position: relative; aspect-ratio: 16 / 9; background: #171717; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 28px 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #fff; padding: 1rem; }
.j-yt-link { color: #fff; text-decoration: none; display: flex; align-items: center; gap: 1rem; text-align: left; }
.j-yt-play { width: 4rem; height: 4rem; border-radius: 50%; border: 2px solid #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; padding-left: 4px; transition: background .2s; }
.j-yt-link:hover .j-yt-play, .j-yt button:hover .j-yt-play { background: #fff; color: #171717; }
.j-yt-text { font-size: .95rem; line-height: 1.5; }
.j-yt-note { font-size: .72rem; color: #a3a3a3; margin: 1rem 0 0; max-width: 28rem; }
.j-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.j-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 700px) { .j-gallery { grid-template-columns: repeat(3, 1fr); } }
.j-gallery figure { margin: 0; }
.j-gallery a { display: block; aspect-ratio: 1; overflow: hidden; background: #f5f5f5; }
.j-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.j-gallery a:hover img { transform: scale(1.04); }
.j-site-box--article { margin: 2.5rem 0 1.5rem; }
.j-back { margin: 0 0 2.5rem; }
.j-back a { color: #1a1a1a; font-size: .85rem; letter-spacing: .05em; }
.j-related { padding-top: 3rem; padding-bottom: 3.5rem; border-top: 1px solid #e5e5e5; }
.j-404 { padding: 4rem 1rem; }
.j-404 a { color: #1a1a1a; }
.j-preview-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2000; background: #b45309; color: #fff; text-align: center; font: 700 .8rem/1.4 'JetBrains Mono', monospace; letter-spacing: .1em; padding: .6rem; }

/* visualizzatore foto */
.j-lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1rem; }
.j-lightbox img { max-width: 100%; max-height: 82vh; width: auto; height: auto; }
.j-lightbox p { color: #e5e5e5; font-size: .9rem; margin: .75rem 0 0; text-align: center; }
.j-lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 3rem; height: 3rem; font-size: 1.4rem; cursor: pointer; }
.j-lightbox button:hover { background: rgba(255,255,255,.25); }
.j-lb-close { top: 1rem; right: 1rem; }
.j-lb-prev { left: .5rem; top: 50%; transform: translateY(-50%); }
.j-lb-next { right: .5rem; top: 50%; transform: translateY(-50%); }
@media (prefers-reduced-motion: reduce) { .j-card, .j-card-img, .j-gallery img { transition: none; } }
@media print { nav.fixed, .footer-custom, #cookieBanner, #chat-fab, .j-site-box, .j-related { display: none !important; } .journal-main { padding-top: 0; } }
