@charset "utf-8";
/* CSS Document */

        /* Testo e Griglia */
        .text-content { max-height: 450px; overflow: hidden; position: relative; transition: max-height 0.5s ease; color: #eee; line-height: 1.6; margin-bottom: 10px; }
        .text-content.is-truncated::after { content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 80px; background: linear-gradient(transparent, #000); pointer-events: none; }
        .text-content.is-expanded { max-height: 5000px; }
        .read-more-btn { display: none; color: #ffcc00; cursor: pointer; font-weight: bold; margin-bottom: 25px; text-decoration: underline; font-family: 'Oswald', sans-serif; }
        .nav-back { color: #ff0; text-decoration: none; font-weight: bold; margin-top: 40px; display: inline-block; font-family: 'Oswald'; text-transform: uppercase; }
        .grid-foto { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 15px; margin-top: 20px; }
        .foto-card { background: #111; padding: 10px; border: 1px solid #333; cursor: pointer; height: 180px; display: flex; align-items: center; justify-content: center; overflow: hidden; transition: 0.3s; }
        .foto-card img { max-width: 100%; max-height: 100%; object-fit: contain; pointer-events: none; }

        /* MODALE - OTTIMIZZATA PER TOUCH & ZOOM */
        #modal { 
            display: none; position: fixed; z-index: 999999; left: 0; top: 0; width: 100%; height: 100%; 
            background: rgba(0,0,0,0.98); touch-action: none; /* Impedisce lo scroll della pagina sotto */
        }
        #modalContainer { 
            width: 100%; height: 100%; overflow: hidden; 
            display: flex; align-items: center; justify-content: center; 
            position: relative;
        }
        #modalImg { 
            max-width: 95%; max-height: 95%; border: 1px solid #444; 
            display: block; margin: auto;
            user-select: none; -webkit-user-drag: none;
            transform-origin: center center;
            will-change: transform;
        }

        .chiudi-foto { position: absolute; top: 10px; right: 20px; color: #fff; font-size: 45px; cursor: pointer; z-index: 1000001; font-family: Arial; text-shadow: 0 0 10px #000; }
        .arrow { position: absolute; top: 50%; transform: translateY(-50%); color: white; font-size: 50px; cursor: pointer; padding: 15px; z-index: 1000000; background: rgba(0,0,0,0.3); border-radius: 5px; }
        .arrow.disabled { opacity: 0.1; pointer-events: none; }
        .prev { left: 10px; }
        .next { right: 10px; }
        .zoom-info { position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%); color: #888; font-size: 11px; font-family: sans-serif; pointer-events: none; text-align: center; width: 100%; }
        
        @media (max-width: 768px) {
            .arrow { font-size: 40px; padding: 10px; background: rgba(0,0,0,0.5); }
            .chiudi-foto { top: 5px; right: 15px; font-size: 50px; }
        }


