@font-face {
    font-family: 'Arial Narrow Italic';
    src: url('font/subset-ArialNarrow-Italic.woff2') format('woff2'), url('font/subset-ArialNarrow-Italic.woff') format('woff');
    font-weight: normal;
    font-style: italic;
    font-stretch: condensed;
    font-display: block;
}

@font-face {
    font-family: 'Arial Narrow';
    src: url('font/subset-ArialNarrow.woff2') format('woff2'), url('font/subset-ArialNarrow.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-stretch: condensed;
    font-display: block;
}

:root {
    /* Colori */
    --mittente-bg: #1c1c1c;
    --mittente-color: #fcfcfc;
    --destinatario-bg: #1c1c1c;
    --destinatario-text: #fcfcfc;
    --page-background: #f0efeb;
    --secondo-colore: #cccccc;
    /* Tipografia */
    --font-size-large: 2rem;
    --font-size-base: 1.4rem;
    --font-size-small: 0.99rem;
    --font-size-extrasmall: 0.7rem;
    /* Spaziature */
    --padding-base: 0.8em;
    --gap-griglia: 9px;
    /* Animazioni — modificare qui sincronizza CSS e JS */
    --animation-duration: 317ms;
    --animation-hide-delay: 350ms;
    --close-button-delay: 750ms;
    /* Z-index */
    --z-griglia: 0;
    --z-buttons: 10;
    --z-overlay: 200;
    --z-global-close: 1002;
    --z-paper-overlay: 9999;
    /* Griglie */
    --grid-columns: repeat(6, minmax(10px, 1fr));
    --grid-rows: repeat(9, minmax(10px, 0.3fr));
    --griglia-columns: repeat(9, minmax(10px, 1fr));
    --overlay-columns: repeat(15, minmax(10px, 1fr));
    /* Chat */
    --chat-width: 25%;
    --chat-height: 65dvh;
    text-wrap-style: pretty;
    scroll-behavior: smooth;
}

a:-webkit-any-link {
    color: var(--mittente-bg);
    cursor: pointer;
    text-decoration: underline;
}

body {
    font-family: "Arial Narrow", sans-serif;
    white-space: normal;
    scroll-behavior: smooth;
    margin: 0;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
i {
    font-family: "Arial Narrow", sans-serif, cursive;
    font-style: italic;
}

b {
    font-family: "Arial Narrow", sans-serif, bold;
}

s {
    text-decoration: line-through 2.5px solid black;
}

main {
    margin: 0;
    position: relative;
    width: 100%;
}

p {
    margin: 0;
    margin-block-start: 0; font-size: var(--font-size-small);
}
h2{
   font-size: var(--font-size-large);
   margin: 0;
   font-weight: normal;
}

h3 {
    font-size: var(--font-size-large);
    font-family: "Arial Narrow", sans-serif, regular;
    font-weight: normal;
    margin: 0;
    text-transform: uppercase;
    /* line-height: 1em; */
}

img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    cursor: auto;
}

footer {
    padding: 0.8em;
    position: fixed;
    bottom: 0;
    width: 100%;
}

.grid {
    display: grid;
    grid-template-columns: var(--grid-columns);
    grid-template-rows: var(--grid-rows);
    grid-gap: 10px;
    height: 100%;
    width: 100%;
    z-index: 0;
    position: fixed;
    top: 0;
    margin: 0 auto;
    justify-self: center;
    padding: 0px;
}

.griglia-lavori {
    display: none;
    opacity: 0;
    height: 100%;
    background: #ffffffd6;
    backdrop-filter: blur(2px);
    filter: blur(0.2px);
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    grid-template-columns: var(--griglia-columns);
    grid-template-rows: auto;
    transition: opacity 0.5s ease, visibility 0.5s ease, z-index 0s 0.5s;
    grid-gap: var(--gap-griglia);
    width: 100%;
    margin: 0 auto;
    justify-self: center;
    position: fixed;
    overflow: scroll;
    justify-content: center;
    z-index: var(--z-griglia);
}

.about-group, .editorial-group {
    pointer-events: auto;
}

.hidden-grid {
    display: none !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    height: 0 !important;
    overflow: hidden !important;
}

.window {
    border-radius: 0.6em 0.6em 0.6em 0.6em;
    padding: 0em 0.4em;
    width: fit-content;
    height: fit-content;
    overflow-y: auto;
    word-wrap: break-word;
    text-wrap-style: pretty;
}

.window:before {
    height: 1.4em;
    z-index: 3;
    align-items: center;
    /* justify-self: stretch; */
    border-bottom: solid 0.01em #1C1C1C;
    background-color: #fcfcfce6;
    display: flex;
    font-style: italic;
    text-align: center;
    margin: -0.5em;
    position: sticky;
    font-size: 0.9em;
    top: -0px;
    justify-content: center;
}

.window:hover {
    /* filter: drop-shadow(5px 5px 5px #2c2c2c75); */
    filter: drop-shadow(0px 0px 18px 4px);
}

.welcome {
    text-wrap-style: pretty;
    line-height: 1.34;
    font-size: var(--font-size-base);
    grid-column: 1 / span 3;
    backdrop-filter: saturate(181%) blur(0.2px);
    filter: blur(0.25px);
    padding: var(--padding-base);
}

.hover-item {
    cursor: auto;
}

#preview {
    position: absolute;
    z-index: 5;
    top: 50%;
    grid-column: 4;
    right: -110%;
    width: 35vh;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.contact-group {
    grid-column: 1 / span 6;
    grid-row: 5;
    /* display: none; */
    opacity: 0;
    text-align: center;
    justify-self: center;
    line-height: 1.34;
    font-size: var(--font-size-base);
    text-shadow: -2px 1px 0 #ffffff, 2px 0px 0 #ffffff, -2px -1px 0 #ffffff, 3px 0px 0 #ffffff;
    backdrop-filter: saturate(181%) blur(0.2px);
    filter: blur(0.25px);
    align-self: center;
}

a {
    transform: rotate(0deg);
    transition: all 0.2s ease 0.1s;
}

a::hover {
    transform: rotate(5deg);
    transform-origin: 0% 0%;
    cursor: pointer;
}

.chat {
    overflow-x: clip;
    align-self: center;
    align-content: center;
    justify-self: center;
    /* justify-content: center; */
    height: var(--chat-height);
    width: calc(var(--chat-height) * (800 / 1567));
    aspect-ratio: 800 / 1567;
    rotate: -2deg;
    background-image: url(img/iphone-rotto.png);
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 41.8px;
    border: none;
    position: fixed;
    box-shadow: inset -1px -2px 15px 1px #18181866, 0 0px 20px 9px #7f7f7f63;
}

.nuvola-messaggio p {
    margin-block-start: 0; margin-block-end: 0; }

.nuvola-messaggio {
    max-width: 83%;
    width: fit-content;
    word-wrap: break-word;
    text-wrap-style: pretty;
    margin-bottom: 12px;
    line-height: 1.14em;
    position: relative;
    padding: 0.4em 0.5em;
    margin-left: 0.4em;
    margin-right: 0.4em;
    font-size: 0.92em;
    border-radius: 1em;
    border: solid 0.08em var(--destinatario-bg);
    z-index: 1;
}

.nuvola-messaggio:before, .nuvola-messaggio:after {
    content: "";
    position: absolute;
    bottom: -1px;
    z-index: 0;
    height: 29px;
}

.mittente {
    color: var(--mittente-color);
    background: var(--destinatario-bg);
    justify-self: end;
}

.mittente:before {
    right: -8px;
    width: 20px;
    position: absolute;
    border-bottom-left-radius: 16px 14px;
}

.mittente:after {
    right: -6px;
    width: 17px;
    height: 17px;
    border-bottom-left-radius: 10px;
    backdrop-filter: none;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17 12"><path d="M4.69 0 .65 8.42c2.21 2.69 6.13 2.79 15.51 2.78C9.39 10.37 6.54 8.28 4.69 0Z" style="fill:%231c1c1c"/></svg>') no-repeat;
    background-size: cover;
}

.destinatario {
    color: var(--mittente-bg);
    align-self: flex-start;
}

.destinatario:before {
    left: -9.98px;
    z-index: 3;
    width: 9px;
    border: solid var(--destinatario-bg);
    border-top-width: 0px;
    border-left-width: 0px;
    border-right-width: 0.08em;
    border-bottom-width: 0.08em;
    z-index: 5;
    background-color: var(--mittente-color);
    border-bottom-right-radius: 8px 12px;
}

.destinatario:after {
    left: -7px;
    width: 10px;
    align-self: flex-end;
    border: solid 0.08em var(--destinatario-bg);
    border-top-width: 0px;
    border-left-width: 0px;
    border-right-width: 0px;
    border-bottom-width: 0.08em;
    background-color: var(--mittente-color);
    border-bottom-right-radius: 9px;
}

.selettori {
    grid-row: 1 / span 1;
    grid-column: 3 / span 5;
    display: flex;
    flex-direction: row;
}

.editorial-group {
    text-align: center;
    padding: 3em 0 0 0;
    justify-items: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    height: 88vh;
    align-content: center;
    flex-direction: row;
}

.editorial-group img {
    cursor: pointer;
}

.editorial-group img:hover, .editorial-group img:active, .editorial-group img:focus {
    cursor: pointer;
}

.editorial-group:first-child {
    grid-row: 1 / span 4;
    grid-column: 1 / span 5;
}

.editorial-group:nth-child(2) {
    grid-row: 2 / span 4;
    grid-column: 6 / span 3;
    align-items: center;
}

.editorial-group:nth-child(3) {
    grid-row: 5 / span 4;
    grid-column: 2 / span 3;
}

.editorial-group:nth-child(4) {
    grid-row: 6 / span 3;
    grid-column: 6 / span 3;
}

.editorial-group:nth-child(5) {
    grid-row: 8 / span 3;
    grid-column: 2 / span 3;
}

.editorial-group:nth-child(6) {
    grid-row: 9 / span 2;
    grid-column: 6 / span 3;
}

.editorial-group:nth-child(7) {
    grid-row: 10 / span 4;
    grid-column: 1/ span 2;
}

.immagini {
    background-size: cover;
    border: none;
}

.chat-box {
    overflow-y: auto;
    overflow-x: clip;
    width: 86%;
    height: 67%;
    /* top: 2em; */
    justify-self: center;
    /* padding: 0.3em; */
    margin: 7% auto 0 auto;
    mix-blend-mode: exclusion;
    background-color: #ffffff;
    z-index: 85;
    backdrop-filter: brightness(1.5);
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.uno {
        margin-top: 0.9em;
}
.chat-box::-webkit-scrollbar {
    display: none;
}

.paperOverlay {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-repeat: repeat;
    background-image: url("img/rumore.png");
    mix-blend-mode: multiply;
    opacity: 34%;
    pointer-events: none;
    z-index: var(--z-paper-overlay);
    backdrop-filter: saturate(180%) blur(0.6px);
    filter: blur(0.05px);
}

.divdesc {
    opacity: 0%;
    transition: opacity 1.2s ease;
    display: grid;
    padding: 1em 0.6em;
    width: 100%;
    text-transform: capitalize;
}

.visible {
    opacity: 100%;
}

img:hover, img:active, img:focus {
    cursor: auto;
    filter: drop-shadow(3px 4px 8px #9a9a9a80);
}

img:hover + .divdesc {
    opacity: 100%;
}

img:active + .divdesc {
    opacity: 100%;
}

img:focus + .divdesc {
    opacity: 100%;
}

.descprog {
    width: 49%;
    text-wrap-style: pretty;
    float: left;
    text-align: end;
    text-transform: lowercase;
    padding-right: 0px;
}

.descproging {
    text-align: start;
    text-transform: lowercase;
    float: inline-end;
    width: 49%;
}

.descproginfo {
    float: inline-start;
    text-align: right;
    width: 49%;
}

.descproginfo2 {
    text-align: left;
    float: right;
    width: 49%;
}

.overflow-scroll:hover {
    filter: none;
    float: left;
}

input[type="checkbox"] {
    display: none;
}

label {
    display: inline-block;
    text-shadow: -2px 1px 0 #ffffff, 2px 0px 0 #ffffff, -2px -1px 0 #ffffff, 3px 0px 0 #ffffff;
    color: #000;
    cursor: pointer;
    -webkit-user-select: none;
    /* Safari */
    -ms-user-select: none;
    /* IE 10 and IE 11 */
    user-select: none;
    /* Standard syntax */
    position: relative;
    transition: 0.6s 0.2s ease;
}

label::before {
    content: "";
    position: absolute;
    top: 83%;
    right: 4%;
    width: 0%;
    overflow: hidden;
    height: 6%;
    background-color: #000000;
    mix-blend-mode: multiply;
    z-index: -1;
    transition: all 0.7s ease;
}

label span {
    position: relative;
    z-index: 1;
}

input[type="checkbox"]:checked+label::before {
    width: 95%;
}

input[type="checkbox"]:checked+label span {
    transition: all 0.2s ease 0.1s;
}

label:hover {
    cursor: pointer;
}

.rotate {
    transform: rotate(-5deg);
    transform-origin: 0% 0%;
}

input[type="checkbox"]:checked + .rotate {
    transform: rotate(0deg);
    transition: all 0.2s ease 0.1s;
}

.rotate1 {
    transform: rotate(5deg);
    transform-origin: 0% 0%;
}

input[type="checkbox"]:checked+.rotate1 {
    transition: 250ms;
    transform: rotate(0deg);
}

.rotate2 {
    transform: rotate(5deg);
    transform-origin: 0% 0%;
}

input[type="checkbox"]:checked + .rotate2 {
    transition: all 0.2s ease 0.1s;
    transform: rotate(0deg);
}

.indent {
    text-indent: 3em;
}

img {
    filter: drop-shadow(0px 0px 5px #bebebeab);
    display: grid;
    grid-column: 6 / span 4;
    grid-row: 2 / span 4;
    /* width: 96%; */
    height: auto;
    justify-self: center;
}

.img1 {
    width: 56%;
    height: auto;
    justify-self: center;
}

.img2 {
    width: 96%;
    height: auto;
    justify-self: center;
}

.img3 {
    width: 96%;
    justify-self: center;
    align-items: center;
}

.img4 {
    width: 96%;
    justify-self: center;
    align-items: center;
}

.img5 {
    width: 96%;
    justify-self: center;
    align-items: center;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

.fade-in-up {
    animation: var(--animation-duration) ease-in-out 1 normal forwards running fadeInUp;
    transition-behavior: allow-discrete;
}

.fade-out-down {
    animation: var(--animation-duration) ease-in-out 1 normal forwards running fadeOutDown;
    transition-behavior: allow-discrete;
}

.hidden-grid {
    display: none;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    height: 0 !important;
    overflow: hidden !important;
}

.img6 {
    width: 96%;
    justify-self: center;
    align-items: center;
}

.blocco-testo {
    align-items: center;
    width: 100%;
    display: block;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4em 0;
}

.prima {
    height: 99dvh;
    display: grid;
}

.prima::before {
    content: "";
    position: absolute;
    inset: 0;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

.blocco-testo:first-of-type {
    grid-column: 1 / span 6;
}

.blocco-testo:nth-of-type(2) {
    grid-column: 1 / span 15;
    /* min-height: 98vh; */
}

.blocco-testo:nth-of-type(3) {
    grid-column: 1 / span 9;
    /* min-height: 98vh; */
}

.blocco-testo {
}

.blocco-testo:nth-of-type(4) {
    grid-column: 1 / span 3;
    grid-row: 7 / span 2;
    /* min-height: 98vh; */
}

.blocco-testo:nth-of-type(5) {
    grid-column: 1 / span 3;
    grid-row: 9 / span 2;
    width: auto;
    overflow: clip;
    height: fit-content;
    /* min-height: 98vh; */
}

.blocco-testo-img {
    width: auto;
    height: 19em;
    display: block;
    pointer-events: none;
}

.blocco-testo-img.verticale {
    width: auto;
    height: 82vh;
}

.blocco-testo-img.orizzontale {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
}

.overlay {
    display: none;
    position: absolute;
    margin: 0 auto;
    grid-template-rows: auto 1fr;
    pointer-events: none;
    background: #ffffff87;
    z-index: var(--z-overlay);
    transition: opacity 0.5s ease, visibility 0.5s ease, z-index 0s 0.5s;
    opacity: 0;
    filter: blur(0.2px);
    backdrop-filter: blur(4px);
    overflow-x: hidden;
    overflow-y: auto;
    position: fixed;
    height: 100vh;
    justify-self: center;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
}

.scroll-container {
    position: relative;
    overflow-y: auto;
    width: 100%;
    overflow-x: hidden;
    height: auto;
    scroll-behavior: smooth;
}

body.dimmed::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(2px);
    z-index: 920;
    opacity: 80%;
    animation: dimIn 0.6s forwards;
}

@keyframes dimIn {
    to {
        opacity: 1;
    }
}

.overlay-content {
    display: grid;
    grid-template-columns: var(--overlay-columns);
    grid-auto-rows: auto;
    grid-gap: var(--gap-griglia);
    padding: var(--gap-griglia);
    height: auto;
    min-height: fit-content;
    overflow-y: auto;
    overflow-x: hidden;
    grid-row: 2;
    backdrop-filter: blur(0.1px);
}

.overlay-content::-webkit-scrollbar {
    width: 8px;
}

.overlay-content::-webkit-scrollbar-track {
    background: transparent;
}

.overlay-content::-webkit-scrollbar-thumb {
    background: #cccccc;
    border-radius: 4px;
}

.overlay-content::-webkit-scrollbar-thumb:hover {
    background: #999999;
}

.overlay-content {
    scrollbar-width: thin;
    scrollbar-color: #cccccc transparent;
}

.overlay-content * {
    pointer-events: auto;
}

.back-button {
    position: fixed;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    right: 0;
    top: 0;
    width: fit-content;
    font-size: var(--font-size-large);
    color: #000;
    text-decoration: none;
    margin: var(--padding-base);
    border: none;
    background: none;
    font-family: "Arial Narrow", sans-serif;
    pointer-events: auto;
    z-index: var(--z-buttons);
    transition: 0.2s 0.2s ease;
}

.ruotabottone::before {
    content: "";
    position: absolute;
    top: 93%;
    left: 2%;
    width: 0%;
    overflow: hidden;
    height: 8%;
    background-color: #000000;
    mix-blend-mode: multiply;
    z-index: -8;
    transition: all 0.7s 0.15s cubic-bezier(0.65, 0.04, 0.09, 1.03);
}

.back-button:hover .ruotabottone::before {
    width: 95%;
}

.back-button:active .ruotabottone::before {
    width: 95%;
}

.ruotabottone {
    transform: rotate(-12deg);
    transform-origin: 100% 0%;
    margin: 0 7px;
    transition: 0.2s 0.3s cubic-bezier(0.25, 0.46, 0.76, 0.78);
}

.back-button:hover .ruotabottone {
    transform: rotate(0deg);
    cursor: pointer;
    margin: 0 5px;
}

.back-button:active .ruotabottone {
    transform: rotate(0deg);
    cursor: pointer;
    /* transition: 0.6s 0.2s ease; */
    margin: 0 5px;
}

.back-button.hidden {
    display: flex !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.sfondo-telefono {
    background: #ffffffe3;
    backdrop-filter: blur(6px);
    display: none;
    filter: blur(0.2px);
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    opacity: 0;
    transition: opacity 0.5s ease, visibility 0.5s ease, z-index 0s 0.5s;
    transform: translateY(2800px);
}

.sfondo-telefono.visible {
    display: flex;
    justify-content: center;
    align-items: center;
}

img.mezza {
    grid-column: 1 / span 2;
    width: auto;
    height: 100%;
}

.blocco-testo.mezza {
    grid-column: 1 / span 2;
    grid-row: 11 /span 1;
    margin: 1em;
    overflow: clip;
    min-height: auto;
    height: 38vh;
    justify-self: flex-start;
}

.blocco-testo.mezza-sotto {
    grid-column: 2 / span 2;
    grid-row: 12 / span 1;
    margin: 1em;
    overflow: clip;
    min-height: auto;
    height: 41vh;
    justify-self: flex-end;
}

.blocco-testo.mezza1 {
    grid-column: 1 / span 2;
    grid-row: 13 / span 1;
    margin: 1em;
    overflow: clip;
    min-height: auto;
    height: 45vh;
    justify-self: flex-start;
}

.blocco-testo.mezza-sotto1 {
    /* grid-column: 2 / span 2; */
    /* grid-row: 14 / span 1; */
    margin: 1em;
    overflow: clip;
    min-height: auto;
    height: 47vh;
    justify-self: flex-end;
}

button#backFromChat {
    /* top: 0.9em; */
    /* right: 0.9em; */
    cursor: pointer;
}

.hidden {
    display: none !important;
}

button#globalCloseOverlay {
    z-index: var(--z-global-close);
}

.descinfo {
    text-transform: uppercase;
    width: 100%;
    margin-top: 0.3em;
    font-size: var(--font-size-extrasmall);
}

.titolo-progetto {
    /* margin: var(--padding-base); */
    font-size: var(--font-size-large);
    width: 100%;
}

.info-prog {
    width: 100%;
    min-height: auto;
    margin-bottom: 0.9em;
    /* margin: auto 0; */
    display: flex;
    justify-content: center;
    grid-column: 1 / span 2;
    grid-row: span 1;
    align-content: center;
    flex-direction: row;
    flex-wrap: wrap;
}

.dx {
    text-align: right;
    padding-right: 0.15em;
    width: 48%;
}

.sx {
    text-align: left;
    width: 48%;
    padding-left: 0.15em;
}

.abstract-prog {
    text-indent: +1.5em;
    margin-bottom: 0.9em;
    font-size: var(--font-size-small);
}

img.blocco-testo-img {
    width: auto;
}

.overlay.show {
    pointer-events: auto;
}

.overlay.is-open {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.overlay.is-closing {
    pointer-events: none;
}

.freccia {
    display: block;
}

img.ultima-immagine {
    height: 42vh;
}

/* ============================
   MEDIA QUERIES - RESPONSIVE
   ============================ */
/* Mobile extra Small */
@media screen and (max-width: 480px) {
    :root {
        --font-size-base: 1.4rem;
        --font-size-large: 1.4rem;
        --chat-width: 14em;
        --griglia-columns: repeat(1, minmax(10px, 1fr));
        --overlay-columns: repeat(3, minmax(10px, 1fr));
        --grid-columns: repeat(2, minmax(10px, 1fr));
        --grid-rows: auto;
    }

    /* reset overlay layout: colonna singola, scroll normale */
    .overlay {
        overflow-y: auto;
        overflow-x: hidden;
        height: 100dvh;
    }

    .overlay-content {
        display: block;
        height: auto;
        overflow: visible;
        padding: var(--gap-griglia);
    }

    .blocco-testo.prima {
        position: static;
        height: 89dvh;
        width: 100%;
        flex: unset;
    }

    .overlay-right {
        display: block;
        width: 100%;
        height: auto;
        overflow: visible;
        padding: 0;
    }

    .overlay-right .blocco-testo, .overlay-right .info-prog {
        width: 100%;
    }

    .welcome {
        line-height: 1.3em;
        position: relative;
        grid-column: 1 / span all;
        grid-row: 1 / span 4;
        padding: var(--padding-base);
    }

    .contact-group {
        padding: var(--padding-base);
        grid-row: 3;
        grid-column: 1 / span all;
    }

    .contenuti-griglia-lavori {
        grid-column-gap: 9px;
        grid-row-gap: 9px;
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 1fr;
    }

    .editorial-group {
        align-content: center;
    }

    .editorial-group:first-child {
        grid-row: 1 / span 1;
        grid-column: 1 / span 2;
        width: 100%;
    }

    .editorial-group:nth-child(2) {
        grid-row: 2/ span 1;
        grid-column: 1 / span 2;
    }

    .editorial-group:nth-child(3) {
        grid-row: 3/ span 1;
        grid-column: 1 / span 2;
    }

    .editorial-group:nth-child(4) {
        grid-row: 4/ span 1;
        grid-column: 1 / span 2;
    }

    .editorial-group:nth-child(5) {
        grid-row: 5/ span 1;
        grid-column: 1 / span 2;
    }

    .editorial-group:nth-child(6) {
        grid-row: 6/ span 1;
        grid-column: 1 / span 2;
    }

    .editorial-group:nth-child(7) {
        grid-row: 6/ span 1;
        grid-column: 1 / span 2;
    }

    .blocco-testo {
        width: 100%;
        /* margin: auto auto 15% auto; */
        overflow-x: hidden;
        /* height: max-content; */
        grid-column: span 3;
        grid-row: span 2;
    }

    .blocco-testo:first-of-type {
        grid-column: 1 / span 3;
        grid-row: 1 /span 2;
        /* min-height: 68vh; */
    }

    .blocco-testo:nth-of-type(2) {
        grid-column: 1 / span 3;
        grid-row: 3 / span 2;
    }

    .blocco-testo:nth-of-type(3) {
        grid-column: 1 / span 3;
        grid-row: 5 / span 2;
    }

    .blocco-testo-img {
        margin: auto;
        justify-self: center;
        overflow: clip;
        margin: 0 auto;
    }

    .blocco-testo-img.verticale {
        width: auto;
        height: 65vh;
    }

    .blocco-testo-img.orizzontale {
        width: 100%;
        height: auto;
        /* max-height: 55vw; */
    }

    .titolo-progetto {
        padding-top: 1em;
        text-indent: 0;
    }

    .sfondo-telefono {
        height: 100dvh;
    }
}

/* Mobile medio, tablet e smatphone */
@media screen and (min-width: 481px) and (max-width: 768px) {
    :root {
        --font-size-base: 1.59rem;
        --font-size-large: 1.5rem;
        --chat-width: 14em;
        --griglia-columns: repeat(1, minmax(10px, 1fr));
        --overlay-columns: repeat(3, minmax(10px, 1fr));
    }

    /* reset overlay layout: colonna singola, scroll normale */
    .overlay {
        overflow-y: auto;
        overflow-x: hidden;
        height: 100dvh;

    }

    .overlay-content {
        display: block;
        height: auto;
        overflow: visible;
        padding: var(--gap-griglia);
    }

    .titolo-progetto {
        padding-top: 1em;
    }

    .blocco-testo.prima {
        position: static;
        height: auto;
        width: 99%;
        flex: unset;
    }

    .overlay-right {
        display: block;
        width: 100%;
        height: auto;
        overflow: visible;
        padding: 0;
    }

    .overlay-right .blocco-testo, .overlay-right .info-prog {
        width: 100%;
    }

    .welcome {
        width: auto;
        line-height: 1.4em;
        padding: var(--padding-base);
        position: relative;
        grid-column: 1 / span 5;
    }

    .contact-group {
        line-height: 1.4em;
        padding: var(--padding-base);
        grid-row: 6;
    }

    .editorial-group:first-child, .editorial-group:nth-child(2), .editorial-group:nth-child(3), .editorial-group:nth-child(4), .editorial-group:nth-child(5), .editorial-group:nth-child(6), .editorial-group:nth-child(7) {
        grid-column: 1;
        grid-row: auto;
        width: 100%;
    }

    .blocco-testo:first-of-type {
        min-height: 90dvh;
        grid-column: 1 / span 3;
        grid-row: 1 / span 2;
    }

    .blocco-testo:nth-of-type(2) {
        grid-column: 1 / span 2;
    }

    .blocco-testo:nth-of-type(3) {
        grid-column: 1 / span 2;
    }

    .blocco-testo:nth-of-type(4) {
        grid-column: 2 / span 2;
        grid-row: auto;
    }

    .blocco-testo:nth-of-type(5) {
        grid-column: 1 / span 3;
        grid-row: auto;
        width: auto;
        height: 100%;
    }

    .blocco-testo.mezza-sotto {
        grid-row: auto;
    }

    .blocco-testo.mezza1 {
        grid-row: auto;
    }

    .blocco-testo.mezza-sotto1 {
        grid-row: auto;
    }

    .progetto {
        height: 85%;
        width: auto;
    }

    .blocco-testo-img.verticale {
        width: auto;
        height: 70vh;
    }

    .blocco-testo-img.orizzontale {
        width: 100%;
        height: auto;
        max-height: 60vw;
    }

    .sfondo-telefono {
        height: 100dvh;
    }
}

/* Desktop */
@media screen and (min-width: 769px) and (max-width:1440px) {
    :root {
        --font-size-large: 1.9rem;
        --font-size-base: 1.7rem;
        --font-size-small: 1.07em;
        --chat-width: 16em;
    }

    .welcome {
        width: auto;
        line-height: 1.4;
        grid-column: 1 / span 4;
    }

    .contact-group {
        line-height: 1.4;
        padding: var(--padding-base);
    }

    .overlay {
        overflow: hidden;
    }

    .overlay-content {
        display: flex;
        flex-direction: row;
        height: 100vh;
        overflow: hidden;
        padding: 0;
        gap: 0;
    }

    .titolo-progetto {
        margin: var(--padding-base);
    }

    /* colonna sinistra fissa */
    .blocco-testo.prima {
        flex: 0 0 40%;
        height: 100vh;
        overflow: hidden;
        padding: var(--gap-griglia);
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        position: static;
    }

    /* colonna destra scrollabile */
    .overlay-right {
        flex: 1;
        height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
        padding: var(--gap-griglia);
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--gap-griglia);
    }

    .overlay-right .blocco-testo, .overlay-right .info-prog {
        width: 100dvw;
        grid-column: unset;
        grid-row: unset;
    }

    .freccia {
        display: none;
    }

    .blocco-testo-img.verticale {
        width: auto;
        height: 80dvh;
        max-height: 100dvh;
    }

    .blocco-testo-img.orizzontale {
        width: 100%;
        height: auto;
        max-height: unset;
    }
}

/* Large desktop */
@media screen and (min-width: 1441px) {
    :root {
        --font-size-large: 2rem;
        --font-size-base: 1.65rem;
        --chat-width: 19em;
        --font-size-small: 1.34rem;
    }

    .welcome {
        line-height: 1.4;
        grid-column: 1 / span 3;
        padding: var(--padding-base);
    }

    .contact-group {
        grid-row: 5 / span 1;
        line-height: 1.4;
        padding: var(--padding-base);
    }

    .editorial-group {
        padding: 6em 0 2em 0;
    }

    .primaimmagine {
        padding: 2em 0 0 0;
    }

    img.blocco-testo-img {
        width: 60%;
        height: auto;
        /* mix-blend-mode: multiply; */
    }

    img.blocco-testo-img.verticale {
        width: auto;
        height: 80%;
        max-height: 100vh;
    }

    img.blocco-testo-img.orizzontale {
        width: 80%;
        height: auto;
        max-height: unset;
    }

    .overlay {
        overflow: hidden;
    }

    .overlay-content {
        display: flex;
        flex-direction: row;
        height: 100vh;
        overflow: hidden;
        padding: 0;
        gap: 0;
    }

    .blocco-testo.prima {
        flex: 0 0 38%;
        height: 100vh;
        overflow: hidden;
        padding: var(--gap-griglia);
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        position: static;
    }

    .titolo-progetto {
        margin: var(--padding-base);
    }

    .overlay-right {
        flex: 1;
        height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
        padding: var(--gap-griglia);
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--gap-griglia);
    }

    .overlay-right .blocco-testo, .overlay-right .info-prog {
        width: 100%;
        grid-column: unset;
        grid-row: unset;
    }

    .freccia {
        display: none;
    }
}

/* dispositivi touch */
@media (hover: none) and (pointer: coarse) {
    img:hover + .divdesc {
        opacity: 0%;
    }
}
