/* ===== RESPONSIVE UTILITIES ===== */
.hide-on-desktop {
    display: none;
    z-index: 9999;
}
.hide-on-mobile {
    display: block;
}

@media (max-width: 768px) {
    .hide-on-desktop {
        display: block;
    }
    .hide-on-mobile {
        display: none;
    }
}

/* ===== BODY STYLES ===== */
body.no-scroll {
    overflow: hidden;
    height: 100%;
    position: fixed;
    width: 100%;
}
body {
    margin: 0;
    overflow: hidden;
    font-family: 'Roboto Mono', monospace !important;
}

#MyParagraph a,
.testoDiv a {
    font-family: 'Roboto Mono', monospace !important;
}

/* ===== HEADER ===== */
header {
    position: fixed;
    bottom: env(safe-area-inset-bottom);
    width: 100%;
    z-index: 1000;
}

/* ===== ANIMATIONS ===== */
.pulsate-fwd {
    animation: pulsate-fwd 4s ease-in-out infinite both;
    transform-origin: center center;
}
@keyframes pulsate-fwd {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ===== TITOLO STYLES ===== */
.titolo .word-wrapper {
    display: block;
    text-align: center;
    white-space: nowrap;
    position: relative;
    margin-bottom: 0.1em;
    letter-spacing: -0.01em;
    word-spacing: -0.4em;
}
.titolo .word-break {
    display: block;
    width: 100%;
    height: 0;
}
.titolo {
    color: #D90712;
    font-family: 'Roboto Mono', monospace !important;
    font-size: clamp(1.5rem, 4.5vw, 6.5em) !important;
    line-height: 0.7;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3), -2px -2px 6px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    font-weight: 800;
    position: relative;
    display: inline-block;
    z-index: 130;
    max-width: 100%;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-out;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
    text-align: center;
    white-space: normal;
}
.titolo.prepared {
    visibility: visible;
}
.titolo.animated {
    opacity: 1;
    overflow: visible;
    pointer-events: none;
}
.titolo.animation-complete {
    pointer-events: auto;
    overflow: visible;
}
.titolo-wrapper {
    display: inline-block;
    overflow: visible;
    line-height: 0.8;
    position: relative;
}
.titolo-wrapper .letter {
    display: inline-block;
    transform: translateY(120%);
    opacity: 0;
    will-change: transform, opacity;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    text-shadow: inherit;
    text-transform: inherit;
    line-height: inherit;
    position: relative;
    backface-visibility: hidden;
}
.titolo,
.titolo-wrapper,
.titolo-wrapper .letter {
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== MAIN CONTAINERS ===== */
#divUp {
    align-self: center;
    z-index: 200;
    width: 100%;
    margin: 0%;
    position: absolute;
    bottom: 0;
}
#MyText {
    visibility: visible;
    position: absolute;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    width: 500px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    font-size: 20px;
    line-height: 1.4;
    z-index: 10;
}
.wp-image-1602 {
    width: 300px !important;
    height: auto !important;
}
#MyParagraph {
    font-family: 'Roboto Mono', monospace !important;
    position: absolute;
    top: calc(80% + 125px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 15px;
    color: white;
    font-weight: 400;
    z-index: 9999;
    padding: 0;
    margin: 0;
}
#MyButton {
    font-size: 10px;
    display: inline-block;
    margin-right: 10px;
    text-transform: uppercase;
    font-weight: 600;
    font-family: 'Roboto Mono', monospace !important;
    transform-origin: center;
    opacity: 0;
    transform: translateY(100px);
    will-change: transform, opacity;
    transition: all 0.7s cubic-bezier(0.5, 2.5, 0.3, 0.8);
    border: none;
    cursor: pointer;
    white-space: nowrap;
}
.MyButton {
    white-space: nowrap;
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
}
.MyButton a {
    background: none;
    color: white;
    text-decoration: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}
.logo {
    margin: 10px 0 !important;
}

/* ===== VERTICAL MENU ===== */
.vertical-menu {
    opacity: 0;
    pointer-events: none;
    position: fixed;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
    will-change: opacity;
}
.menu-dot {
    width: 17px;
    height: 17px;
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    will-change: transform, border-color;
    background: transparent;
}
.menu-dot::before {
    content: "";
    width: 5px;
    height: 5px;
    background-color: rgba(255,255,255,0.7);
    border-radius: 50%;
    transition: background-color 0.3s ease;
}
.menu-dot:hover {
    transform: scale(1.1);
}
.menu-dot.active {
    border-color: #E8001D;
    transform: scale(1.2);
}
.menu-dot.active::before {
    background-color: #E8001D;
}

/* ===== BACKGROUND & MAIN DIVS ===== */
#divSfondo {
    height: 100vh !important;
    width: 100vw !important;
}
#divPrincipale {
    display: grid;
    flex-direction: column;
    padding: 0;
    position: fixed;
    opacity: 0;
    width: 70%;
    height: 100vh;
    left: 35%;
    bottom: -1000px;
    z-index: 90;
}
.testoDiv {
    z-index: 100;
    visibility: visible;
    font-size: clamp(0.45rem, 1vw, 0.9rem);
		line-height: 1.25;
    opacity: 1;
    display: block;
    position: absolute;
    width: 100%;
    max-width: 500px;
    bottom: 50%;
    color: black;
    align-items: center;
    text-align: left;
    background-color: rgba(255,255,255,0.8);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    padding: 20px 0;
    right: 0px;
    transform: translateY(50%);
    font-family: 'Roboto Mono', monospace !important;
    overflow: hidden;
}
.testoDiv > div[style*="padding: 56.25% 0 0 0;"] {
    margin-bottom: -16px !important;
    padding-bottom: 0 !important;
    position: relative;
    bottom: -22px;
    z-index: 200;
}
.testoDiv > div:first-child {
    margin: -20px 0 20px 0 !important;
    width: 100% !important;
}
.testoDiv iframe {
    border: none !important;
    display: block !important;
}

.testoDiv .word {
    opacity: 0;
}
.divG {
    align-items: center;
    align-content: center;
    display: flex;
    position: relative;
    height: 85vh;
    width: 100%;
    opacity: 1;
    z-index: 100;
    resize: none;
}
#bottoni {
    visibility: inherit;
    align-self: center;
    background-color: transparent;
    z-index: 200;
    width: 100%;
    position: fixed;
    display: flex;
    flex-wrap: wrap;
}
img#imgButton {
    position: absolute;
    right: 19px;
    width: 30px;
}
.wp-block-site-logo {
    margin: 10px;
    margin-left: 15px !important;
    width: 40px;
    bottom: 0px;
}

/* ===== FOCUS STYLES ===== */
:where(.wp-site-blocks *:focus) {
    outline-width: 0px;
    outline-style: solid;
}
.MyButton a:focus,
.mobile-menu-item:focus,
.menu-dot:focus {
    outline: none !important;
    box-shadow: none !important;
}
.MyButton a .icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    object-fit: contain;
    transform: translateY(-1px);
}

/* ===== MOBILE MENU ===== */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #D90712;
    z-index: 1000;
    transform: translateY(100vh);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.mobile-menu-overlay.active {
    transform: translateY(0);
    bottom: 53px;
}
.mobile-menu-content {
    width: 100%;
    max-width: 300px;
}
.mobile-menu-item {
    color: white;
    font-family: 'Roboto Mono', monospace;
    font-size: 24px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    display: block;
    padding: 20px 0;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}
.menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    margin: 10px 0;
    width: 100%;
}
.mobile-menu-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 1001;
    transition: transform 0.3s ease;
}

/* ===== DESKTOP STYLES ===== */
@media (min-width: 769px) {
    .MyButton a::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: 2px;
        width: 0;
        height: 1px;
        background-color: currentColor;
        transition: width 0.2s ease;
    }
    .MyButton a:hover::after {
        width: 100%;
    }
    
    .divG {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: relative;
    }
    .testoDiv {
        position: relative !important;
        width: 433px !important;
        bottom: auto !important;
        right: auto !important;
        left: auto !important;
        transform: none !important;
        order: 2;
    }
	.testoDiv { padding-left: 30px; padding-right: 40px; padding-bottom:70px; }
.arrow-down,
.arrow-right {
  position: absolute;
  bottom: 12px;
  right: 6px;
  width: 32px;
  height: 32px;
  background-image: url('https://www.gradisca.studio/wp-content/uploads/2025/11/Down_Arrow_clip_art_hight.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: .9;
  cursor: pointer;
  pointer-events: auto;
}

.arrow-down {
  transform: rotate(0deg);
}

.arrow-right {
  transform: rotate(-90deg);
}
img[src="https://www.gradisca.studio/wp-content/uploads/2025/11/Down_Arrow_clip_art_hight.png"] {
    cursor: pointer;
}
.testoDiv.last::after {
  top: 50%;
  bottom: auto;
  right: 12px;
  transform: translateY(-50%) rotate(-90deg);
}
    .titolo {
        position: relative !important;
        bottom: auto !important;
        right: auto !important;
        text-align: center !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        order: 1;
        width: 433px !important;
        max-width: 433px !important;
        display: block;
        margin-bottom: -10px
    }
    .divG > *:first-child {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
}

/* ===== MOBILE STYLES ===== */
@media (max-width: 768px) {
    .MyButton a:active {
        background-color: rgba(255, 255, 255, 0.1);
        transform: scale(0.95);
    }
    .MyButton a::after {
        display: none;
    }
    
    .mobile-menu-item {
        padding: 25px 0;
        transform: translateY(20px);
        opacity: 0;
        transition: all 0s ease;
    }
    .mobile-menu-overlay.active .mobile-menu-item {
        transform: translateY(0);
        opacity: 1;
        transition: all 0.4s ease;
        transition-delay: 0.2s;
    }
    .mobile-menu-overlay.active .mobile-menu-item:nth-of-type(1) { transition-delay: 0.25s; }
    .mobile-menu-overlay.active .mobile-menu-item:nth-of-type(2) { transition-delay: 0.3s; }
    .mobile-menu-overlay.active .mobile-menu-item:nth-of-type(3) { transition-delay: 0.35s; }
    .mobile-menu-overlay.active .mobile-menu-item:nth-of-type(4) { transition-delay: 0.4s; }
    .mobile-menu-item:active {
        background-color: rgba(255, 255, 255, 0.1);
        transform: translateX(10px) !important;
    }
    .mobile-menu-close:active {
        transform: scale(0.9);
    }
    
    #divPrincipale {
        width: 90%;
        left: 50%;
        transform: translateX(-50%);
        box-sizing: border-box;
        padding: 0 15px;
        max-width: 100vw;
        opacity: 1;
    }
    .testoDiv {
                position: relative !important;
        transform: none !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        margin: clamp(1rem, 6vw, 2.5rem) auto 0 auto;
        max-width: 90%;
        width: 100%;
        box-sizing: border-box;
        text-align: left;
        font-size: 15px;
        z-index: 20;
    }

.arrow-down,
  .arrow-right {
    position: absolute;
    bottom: 12px;
    right: -24px;
    width: 24px;
    height: 24px;
    background-image: url('https://www.gradisca.studio/wp-content/uploads/2025/11/Down_Arrow_clip_art_hight.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: .9;
    cursor: pointer;
    pointer-events: auto;
  }

  .arrow-down {
    transform: rotate(0deg);
  }

  .arrow-right {
    transform: rotate(-90deg);
  }

    .vertical-menu {
        display: none !important;
    }
    .titolo {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    display: block;
    width: 100%;
    text-align: center;
    font-size: clamp(3rem, 10vw, 5em) !important;
    line-height: 0.85;
    z-index: 30;
    white-space: normal;
    margin: 0 auto;
    top: 35px !important;
}
    #MyButton {
        margin-bottom: 30px;
        position: relative;
        left: 10px;
        letter-spacing: 0px;
    }
    .MyButton a {
        font-size: 10px;
    }
    .MyButton {
        flex-wrap: nowrap !important;
        flex-direction: row !important;
        overflow-x: auto;
    }
    .divG {
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    #bottoni {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        display: flex;
        justify-content: center;
    }
    .MyButton {
        display: flex;
        flex-direction: row;
        gap: 20px;
        justify-content: center;
        align-items: center;
        flex-wrap: nowrap;
    }
    #MyButton {
        margin: 0;
        position: relative;
        left: 0;
        transform: none;
        opacity: 1;
    }
    #MyButton, .MyButton a {
        cursor: pointer;
    }
}

.editor-styles-wrapper .acf-block-component.divG {
  display: block;
  height: auto;
  z-index: auto;
  align-items: stretch;
}
.editor-styles-wrapper .acf-block-component.divG > * {
  display: block;
  width: 100%;
}

.testoDiv { padding-left: 30px; padding-right: 40px; padding-bottom:70px; }

/* Fix: GSAP forza display:inline-block sui .word per animare la transform "y",
   creando spazi enormi tra le parole del testo semplice (non i link/underline,
   che restano un unico elemento). Si forza il display inline per il layout,
   la transform continua a funzionare regolarmente sui browser moderni. */
.testoDiv .word {
    display: inline !important;
}
