/* Contenitore Canvas 3D */
.hero-3d-container {
    width: 100%;
    height: 600px;
    position: relative;
    cursor: grab;
    touch-action: none;
    overflow: hidden;
}

.hero-3d-container:active {
    cursor: grabbing;
}

canvas {
    outline: none;
    display: block;
}

/* BADGE DI HINT PER L'UTENTE */
.interaction-hint {
    position: absolute;
    top: 16px; /* Spostato in alto sopra al modello 3D */
    bottom: auto; /* Annulla l'eventuale posizionamento in basso */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(24, 24, 27, 0.85); /* Antracite dark frosted */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #a1a1aa; /* Grigio neutro/chiaro */
    font-size: 11px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 20px;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: opacity 0.3s ease;
}

/* ANNOTATION BADGE (FLUTTUANTE DAL PUNTO DI CLICK) */
.annotation-badge {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 10px;
    /* Centra l'origine di ancoraggio del badge esattamente sul punto del click */
    transform-origin: 0% 50%;
    z-index: 30;
}

.annotation-badge.hidden {
    display: none;
}

.badge-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(20, 184, 166, 0.95);
    color: #090D16;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 15px rgba(20, 184, 166, 0.5);
    flex-shrink: 0;
}

.badge-content {
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 14px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
}

.badge-title {
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.badge-sub {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 400;
}
/* MOBILE MENU STYLES */
#mobile-menu {
    transition: all 0.3s ease-in-out;
    height: 100vh;
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
}

#mobile-menu.hidden {
    display: none;
}

/* BADGE DI HINT PER L'UTENTE (Spostato più in basso) */

/* CONTAINER 3D */
.hero-3d-container {
    width: 100%;
    height: 600px;
    position: relative;
    cursor: grab;
    touch-action: none;
    overflow: hidden;
}

.hero-3d-container:active {
    cursor: grabbing;
}

/* HOTSPOT/PALLINI FLUTTUANTI SUL MODELLO 3D */
.hotspot-badge {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 30;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

/* PALLINO NORMALE */
.hotspot-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(20, 184, 166, 0.9);
    color: #090D16;
    font-weight: 800;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 12px rgba(20, 184, 166, 0.6);
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.25s ease;
}

.hotspot-badge:hover .hotspot-dot {
    transform: scale(1.25);
    background: #06B6D4;
}

/* POSIZIONAMENTO BADGE */
/* POSIZIONAMENTO E STRUTTURA DEL BADGE */
.hotspot-badge {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 30;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.3s ease;
}

/* PALLINO CON IL NUMERO (Grigio Antracite) */
.hotspot-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #27272a; /* Grigio scuro zinc */
    color: #f4f4f5; /* Testo grigio chiarissimo */
    font-weight: 700;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* HOVER SUL PALLINO */
.hotspot-badge:hover .hotspot-dot {
    transform: scale(1.18);
    background: #3f3f46; /* Grigio medio */
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

/* PALLINO ATTIVO / SELEZIONATO */
.hotspot-badge.active .hotspot-dot {
    background: #e4e4e7; /* Grigio platino chiaro */
    color: #09090b; /* Testo nero scuro per massimo contrasto */
    border-color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.25);
}

/* SCHEDA INFORMATIVA ESPANSA (Grigio Frosted Glass) */
.hotspot-content {
    background: rgba(24, 24, 27, 0.92); /* Antracite profondo opaco */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 8px 14px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    
    /* Stato iniziale nascosto */
    opacity: 0;
    visibility: hidden;
    transform: scale(0.7) translateX(-10px);
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* TITOLO E SOTTOTITOLO SULLA SCHEDA */
.hotspot-title {
    color: #f4f4f5; /* Bianco perla */
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.hotspot-sub {
    color: #a1a1aa; /* Grigio neutro desaturato */
    font-size: 10px;
    font-weight: 400;
}

/* APERTURA SCHEDA AL CLICK */
.hotspot-badge.active {
    z-index: 40;
}

.hotspot-badge.active .hotspot-content {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateX(0);
    pointer-events: auto;
}   
#webgl-hero, 
#webgl-hero canvas {
    touch-action: pan-y !important;
}