.cherimus-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background-color: #000;
    color: #fff;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.cherimus-navbar .logo {
    flex: 1;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cherimus-navbar .logo img {
    max-height: 50px;
    width: auto;
    vertical-align: middle;
}

.cherimus-navbar .logout,
.cherimus-navbar .back-button {
    background: transparent;
    color: #fff;
    border: 0px solid #fff !important;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 600 !important;
}

.cherimus-navbar .back-button:hover,
.cherimus-navbar .logout:hover {
    background: #000000 !important;
    color: #ffffff !important;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}
body {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    font-size: 18px;
}
.header {
    padding: 20px;
    background-color: #f8f8f8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}
.header-logo {
    display: flex;
    align-items: center;
}
.header-logo img {
    vertical-align: middle;
}
.header-links a {
    margin-right: 15px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
}
.svg-page-wrapper {
    position: relative;
    width: 100%;
    height: calc(100vh - 50px); /* Altezza totale meno footer (50px) */
    overflow: hidden;
    margin-bottom: 0; /* Rimuovi qualsiasi margine in basso */
}
.svg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: grab;
}
.svg-container:active {
    cursor: grabbing;
}
.svg-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-origin: 0 0;
}
.svg-content svg {
    max-width: 100%;
    height: auto;
    /* Fix per rendering sfocato su Safari iOS */
    -webkit-backface-visibility: hidden;
    -webkit-perspective: 1000;
    -webkit-transform-style: preserve-3d;
    backface-visibility: hidden;
    perspective: 1000px;
    transform-style: preserve-3d;
    /* Migliora la qualità del rendering delle immagini */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

footer {
    margin-top: 0 !important; /* Rimuovi qualsiasi margine in alto del footer */
    padding-top: 20px; /* Mantieni lo spazio interno invece che esterno */
}

.cherimus-footerbar{
    background-color:#282828 !important;    
    padding: 3px 0;
    z-index: 1000000!important;
}



.animazione {
    width: 300px;
    height: 300px;
    
}

@keyframes flickerAnimation {
  0%   { opacity:0.65; }
  50%  { opacity:0.15; }
  100% { opacity:0.65; }
}
@-o-keyframes flickerAnimation{
  0%   { opacity:0.65; }
  50%  { opacity:0.15; }
  100% { opacity:0.65; }
}
@-moz-keyframes flickerAnimation{
  0%   { opacity:0.65; }
  50%  { opacity:0.1; }
  100% { opacity:0.65; }
}
@-webkit-keyframes flickerAnimation{
  0%   { opacity:0.65; }
  50%  { opacity:0.15; }
  100% { opacity:0.65; }
}
.animate-flicker {
   -webkit-animation: flickerAnimation 3s infinite ease;
   -moz-animation: flickerAnimation 3s infinite ease;
   -o-animation: flickerAnimation 3s infinite ease;
    animation: flickerAnimation 3s infinite ease;
}
.opera-details-container {
    width: calc(100% - 60px);
    height: calc(100% - 60px);
    padding: 30px;
    overflow: hidden;
}
.opera-details-container2 {
    width: 100%;
    height: calc(100% - 75px);
    padding-left: 25px;
    
}

/* Classi Tipografiche per Cartigli */
.cartiglio-titolo {
    font-family: 'Roboto Condensed', sans-serif;
       font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 28px;
}

.cartiglio-artista {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 300;  /* Regular */
    font-size: 23px;
    line-height: 24px;
    
}

.cartiglio-anno {
    font-family: 'Roboto Condensed', sans-serif;
    font-style: italic;
    font-size: 18px;
    font-weight: 300; 
}

/* Classi Tipografiche per Popup */
.popup-titolo {
    font-family: 'Roboto', sans-serif;
    font-weight: 600;  /* Semibold */
    font-size: 22px;
    width: 80%;

}

.popup-opera {
    font-family: 'Roboto ', sans-serif;
    font-weight: 600;  /* Semibold */
    font-size: 22px;
}
.popup-testo {
    font-family: 'Roboto', sans-serif;
    font-weight: 300;  /* Light */
    font-size: 20px;
}

.popup-testo .contenutotesto {
    padding: 10px 0px;
}

/* -------------- SVG Atlas Image Pulse Effect -------------- */
/* Animazione pulsazione: da 0 a 1 per gli schermi del treno */
@keyframes atlas-image-pulse {
    0%, 100% {
       
        opacity: 0.8;
    }
    50% {
       
        opacity: 0;
    }
}

.atlas-opera-image {
    cursor: pointer;
    animation: atlas-image-pulse 3s ease-in-out infinite;
    transition: filter 0.3s ease, transform 0.2s ease;
}

.atlas-opera-image:hover {
    animation: atlas-image-pulse 1.5s ease-in-out infinite;
    filter: brightness(1.4);
}

/* Mobile Optimizations */
@media (max-width: 768px) and (orientation: portrait) {
    .opera-details-container {
        height: calc(100% - 130px) !important;
    }

    .opera-details-container2 {
        padding-left: 0px !important;
    }
}

/* FIX BLUR iOS Safari - rimuovi GPU acceleration che causa rasterizzazione e blur */
@supports (-webkit-touch-callout: none) {
    .svg-content {
        /* Rimuovi GPU acceleration dal container principale */
        -webkit-backface-visibility: visible !important;
        -webkit-perspective: none !important;
        -webkit-transform-style: flat !important;
        backface-visibility: visible !important;
        perspective: none !important;
        transform-style: flat !important;
        will-change: auto !important;
    }

    .svg-content svg {
        /* Rimuovi 3D transforms che causano blur */
        -webkit-backface-visibility: visible !important;
        -webkit-perspective: none !important;
        -webkit-transform-style: flat !important;
        backface-visibility: visible !important;
        perspective: none !important;
        transform-style: flat !important;
        will-change: auto !important;
        /* Forza rendering nitido */
        image-rendering: -webkit-optimize-contrast;
        -webkit-font-smoothing: antialiased;
    }

    .svg-container {
        will-change: auto !important;
        -webkit-transform-style: flat !important;
        transform-style: flat !important;
    }

    .gif-container,
    .lottie-container {
        will-change: auto !important;
    }
}