
#step-graphic {
    display: grid;
    grid-template-columns: subgrid;
    grid-column: 2 / 3;
    position: relative;
    width: auto;
    max-width: 1140px;
    /* aspect-ratio: 2/1; */
    margin: 0 auto;

    --overlay-padding: 36px;

    border-radius: 8px;

    /* background-color: #fafafa; */

    /* box-shadow: 0 -4px 0 8px #fafafa, 0 0 24px 8px #00000055; */
    transform-origin: center;

    --ar: 2/1;

}
#step-title {
    display: grid;
    grid-column: 2 / 3;
    width: 100%;
    max-width: 900px;
    margin: 2rem auto;
}

#step-graphic[data-step="10"] .IMLOGO {
    display: none;
}
#step-graphic[data-step="10"] p {
    max-width: 75%;
}

#step-overlay-splash-screen {
    /* background-color: #00000033; */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 102;
    opacity: 1;
    transition: opacity 0.5s;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;

    transition: opacity 0.5s;
    border-radius: 8px;
}
#step-overlay-splash-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

/* #step-overlay-splash-screen svg {
    object-fit: contain;
} */



#step-overlay-splash-screen button {
    font-size: 1.05rem;
    padding: 32px 40px;
    border-radius: 12px;
    margin: 4rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;

    border: 3px solid hsl(219, 63%, 43%);
    background-color: hsl(219, 63%, 53%);
    background-image: linear-gradient(180deg, hsl(219, 63%, 53%), hsl(219, 63%, 43%));
    box-shadow: 
    inset 0 5px 2px 0px hsl(219, 63%, 58%), 
    inset 0 -5px 2px 0px hsl(219, 63%, 40%);
    backdrop-filter: blur(4px);
    /* box-shadow: 0 0 10px 0px #00000055; */
    cursor: pointer;
}

#step-overlay-splash-screen button p {
    margin: 0;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Roboto Slab', serif;
    text-shadow: -1px 2px 3px black;
    transition: text-shadow 400ms ease-in-out;
}
#step-overlay-splash-screen button span svg {
    
    width: 1.5rem;
    height: 1.2rem;
    transform-origin: center;
    transform: rotate(180deg) translateY(-3px) translateX(-5px);
    animation: chevronPulse 0.8s infinite;
}
#step-overlay-splash-screen button span svg path {
    fill: cornflowerblue;
}

@keyframes chevronPulse {
    0%, 100% { transform: rotate(180deg) translateY(-3px) translateX(-5px); }
    85% { transform: rotate(180deg) translateY(-3px) translateX(-15px); }
}
@keyframes primaryButtonPulse {
    0%, 100% {
    border: 3px solid hsl(219, 63%, 43%);
    }
    50% {
    border: 3px solid hsl(219, 63%, 63%);
    }
}

#step-overlay-splash-screen button:hover {
    animation: primaryButtonPulse 0.7s infinite;
    background-image: linear-gradient(180deg, hsl(219, 63%, 53%), hsl(219, 63%, 43%));
    box-shadow: 
    inset 0 5px 2px 0px hsl(219, 63%, 58%), 
    inset 0 -5px 2px 0px hsl(219, 63%, 40%);
    border: 3px solid hsl(219, 63%, 43%);
}

#step-overlay-splash-screen button:hover p {
    text-shadow: -2px 5px 5px #000000aa;
}
#step-overlay-splash-screen button:hover span svg {
    animation: chevronPulse 0.4s infinite;
}

#step-pan {
    display: block;
    position: relative;
    width: calc(100% - 2rem);
    max-width: 1440px;
    /* max-height: calc(1440px * (540/990)); */
    margin: 0 auto;
    z-index: 1;
    background-image: url(../img/Panorama_Eevee_2.jpg);
    background-position: 0 0;
    background-size: cover;
    /* height: calc(100vw * (540/990)); */
    /* aspect-ratio: 27 / 48; */
    transition: background-position 1.2s;
    border-radius: 8px;

    aspect-ratio: var(--ar);
}

#step-pan_overlay {
    content: "";
    position: absolute;
    top: 0;
    left: 1rem;
    width: calc(100% - 2rem);
    height: 100%;
    aspect-ratio: var(--ar);
    /* background-color: #FF000033; */
    background-image: url(../img/Panorama_Eevee_2_a.png);
    background-position: 0 0;
    background-size: cover;
    /* height: 540px; */
    transition: background-position 1.2s;
    z-index: 103;
    pointer-events: none;
    border-radius: 8px;
}

#step-video {
    display: block;
    position: relative;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    z-index: 1;
}

#step-video video {
    width: 100%;
    aspect-ratio: var(--ar);
}

#step-overlay {
    position: absolute;
    top: 0px;
    left: 0;
    width: 100%;
    height: 100%;
    /* display: none; */
    /* background-color: rgba(255, 255, 255, 0.95); */
    z-index: 101;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    max-width: 1140px;
}

#step-overlay.active {
    display: block;
}


#step-overlay #step-overlay-body > h2 > span {
    background-color: #e9e9e9;
    color: #777;
    padding: 2px 8px;
    border-radius: 8px;
    margin-right: 8px;
}
#step-overlay #step-overlay-body {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 1fr 110px;
    width: 520px;
    max-width: 60%;
    color: black;
    font-size: 18px;
    background-color: rgba(255, 255, 255, 0.80);
    border-radius: 6px;
    padding: var(--overlay-padding);
    margin-bottom: 60px;
    backdrop-filter: blur(5px);

    box-shadow: inset 0 0 10px 0px rgba(93, 139, 224, 0.3), 0 10px 10px #00000055;
    border-radius: 16px;
}
#step-overlay #step-overlay-body h2 {
    margin: 0 0 2rem 0;
    font-size: 1.4rem;
    color: #333;
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    line-height: 1.2;
    align-self: center;
}
#step-overlay #step-overlay-body p {
    margin: 0;
    line-height: 1.5;
    font-size: 18px;
    opacity: 1;
    grid-column: 1 / -1;
}

@media screen and (max-width: 1100px) {
    #step-overlay #step-overlay-body {
        display: grid;
        grid-column: 1 / -1;
        grid-template-columns: 1fr 110px;
        width: calc(100% - 2rem);
        max-width: 540px;
        color: black;
        font-size: 18px;
        background-color: rgba(255, 255, 255, 0.80);
        border-radius: 6px;
        padding: var(--overlay-padding);
        margin-top: auto;
        margin-bottom: auto;
        backdrop-filter: blur(5px);
    
        box-shadow: inset 0 0 10px 0px rgba(93, 139, 224, 0.3), 0 10px 10px #00000055;
        border-radius: 16px;
    }

}
@media screen and (max-width: 768px) {
    #step-pan {
        width: 100%;
    }
    #step-graphic {
        --ar: 3/4;
        border-radius: 0;
        margin: 2rem -1rem 2rem -1rem;
        width: calc(100% + 2rem);
    }
    #step-graphic  * {
        border-radius: 0;
    }
    #step-title {
        margin-bottom: 1rem;
    }
    #step-overlay #step-overlay-body {
        width: calc(100% - 1rem);
    }
    
    #step-pan_overlay {
        display: none !important;
    }

    #step-overlay #step-overlay-body {
        margin: 0;
    }
    
}


.IMLOGO {
    width: 90px;
    height: 90px;
    margin-right: 10px;
    margin-top: -10px;
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

#step-overlay #step-overlay-body p span {
    opacity: 0;
    transition: opacity 350ms ease-in;
    color: #555;
    opacity: 0.2;
}
#step-overlay #step-overlay-body p span.show {
    opacity: 1;
    color: var(--brand);
}
#step-overlay #step-overlay-body p + p {
    margin-top: 18px;
}



#step-overlay #step-overlay-body.hiding {
    opacity: 0;
    transform: translateY(20px);
    transition: 0.5s;
}
#step-overlay #step-overlay-body.hidden {
    opacity: 0;
    transform: translateY(0px);
    transition: 0.5s;
}
#step-overlay #step-overlay-body.show {
    opacity: 1;
    transform: translateY(0px);
    transition: 0.5s;
}

.step-buttons {
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
    margin-top: 42px;
    grid-column: 1 / -1;
    z-index: 105;
}

.step-buttons button.step-button.step-forward {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

#step-overlay #step-overlay-body .step-buttons button.step-button.step-forward p {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 500;
    color: #555;
    width: 120px;
    text-align: left;
    line-height: 1.2;
}
.step-buttons button.step-button.step-forward span {
    display: inline-block;
    width: 1.0rem;
}
.step-button.step-forward span svg {
    width: 100%;
}
.step-button.step-forward span svg path {
    fill: cornflowerblue;
    transform-origin: center;
    transform: rotate(180deg) translateY(-3px) translateX(-5px);
    /* animation: chevronPulseBlue 1.6s infinite; */
}
@keyframes chevronPulseBlue {
    0%, 100% { fill: #99c9c9; }
    60% { 
        fill: #47b3b3;
    }
}

@keyframes buttonPulse {
    0% {
        box-shadow: inset 0 0 0 #99c9c955, 0 0 0 0px #99c9c955;
        background-color: #ffffff;
    }
    50% {
        box-shadow: inset 0 0 10px #99c9c955, 0 0 5px 2px #99c9c955;
        background-color: #ffffff;
    }
    100% {
        box-shadow: inset 0 0 0 #99c9c955, 0 0 0 0px #99c9c955;
        background-color: #ffffff;
    }
}
.step-buttons button {
    padding: 8px 16px;
    background: none;
    border: 1px solid #c9c9c9;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s;
    cursor: pointer;
}
.step-buttons button.step-forward {

    animation: buttonPulse 2s cubic-bezier(0.19, 1, 0.22, 1) 8s infinite;
    z-index: 103;
}
.step-buttons button.step-back {
    border-color: #f3f3f3;
    color: #aaa;
    z-index: 103;
    background-color: #f8f8f8aa;
}
.step-buttons button.step-back:hover {
    border: 1px solid #c9c9c9;
    color: #777;
}
.step-buttons button.step-forward:hover {
    border: 1px solid #77bb99;
    box-shadow: inset 0 0 10px 0px #99c9c955;
}

.step-buttons button.step-forward:hover svg path {
    animation: chevronPulseBlue 1.6s infinite;
}



#step-frames {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    aspect-ratio: 2/1;
    width: 100%;
    border-radius: 16px;
    width: 100%;
    max-width: 1140px;

    /* background-image: url(../video/Longer-Eevee/0001.jpg);
    background-position: center;
    background-size: cover; */
}

#step-frames > * {
    max-width: 100%;
    object-fit: contain;
    grid-column: 1 / 1;
    grid-row: 1 / 1;
    border-radius: 8px;
}
#step-frames [data-frame].active {
    z-index: 100 !important;
}
#step-frames > div > img {
    object-fit: cover;
    width: 100%;
    border-radius: 16px;
}