
html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important; /* Blocca tassativamente lo scorrimento orizzontale */
    background-color: #1a1a1a !important; /* Sfondo grigio scuro */
    font-family: 'Open Sans', sans-serif !important;
    box-sizing: border-box !important;
    -ms-overflow-style: none !important;  
    scrollbar-width: none !important;     
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

a {
    text-decoration: none !important; /* Rimuove la sottolineatura da qualsiasi link */
}

/* ==========================================================================
   🖼 ` GESTIONE IMMAGINE DI COPERTINA (COVER MAIN IMAGE)
   ========================================================================== */
.image-main {
    width: 100% !important;
    position: relative !important;
}

.main-cover-image {
    width: 100% !important;
    height: auto !important; /* L'altezza si calcola da sola proporzionalmente */
    display: block !important; 
}



/* 🌍 SUPPORTO AUTOMATICO LINGUA ARABA (RTL) */
[dir="rtl"] .card-actions-wrapper {
    right: auto !important;
    left: 3.3cqw !important; /* Sposta l'intero blocco a sinistra */
    flex-direction: row-reverse !important; 
}

/* ==========================================================================
   📝 BLOCCO NOME E RUOLO (TEXT MANAGEMENT)
   ========================================================================== */
.name-role {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    margin-left: 0cqw !important;
    flex-grow: 1 !important;
    padding: 1.4cqw !important;        /* Convertito 5px */
    margin-bottom: 1.4cqw !important; /* Convertito 5px */ 
}

.contact-label-name {
    font-size: 6cqw !important; /* 🎯 Convertito 6vw in cqw */
    font-weight: 500 !important;
    color: #ff6600 !important; 
    margin: 0px !important;
    line-height: 1.0 !important;
}

.contact-value-role {
    font-size: 4cqw !important; /* 🎯 Convertito 4vw in cqw */
    color: #ffffff !important; 
    margin: 1.1cqw 0 0 0 !important; /* Convertito 4px */
    line-height: 1.0 !important;
}

/* ==========================================================================
   🏢 LOGO AZIENDALE INTERNO
   ========================================================================== */
.company-logo {
    width: auto !important;
    height: 50cqw !important; /* 🎯 Convertito 180px in cqw (180 / 360 * 100) */
    object-fit: contain !important;
    max-width: 69.4cqw !important; /* 🎯 Convertito 250px in cqw (250 / 360 * 100) */
    padding: 2.7cqw !important; /* Convertito 10px */
}

/* ==========================================================================
   📝 BLOCCO RIGHE CONTATTO ICONE ALLINEATE (CONTACT SECTION LABELS)
   ========================================================================== */
.contact-section {
    margin: 4.1cqw 4.1cqw !important; /* 🎯 Convertito 15px in cqw (15 / 360 * 100) */
    display: flex !important;
    flex-direction: column !important;
}

.contact-row {
    display: flex !important;
    align-items: center !important; /* Blocca l'icona a metà altezza tra i due testi a destra */
    justify-content: flex-start !important;
    width: 100% !important;
    margin-top: 12.5cqw !important; 
}

/* Icona di contatto */
.contact-row i {
    font-size: 7cqw !important; /* 🎯 Convertito 7vw in cqw per la stabilità asincrona */
    color: #ffffff !important; 
    width: 12cqw !important;   /* 🎯 Convertito 12vw in cqw per preservare le proporzioni laterali */
    text-align: center !important;
    margin-right: 4.1cqw !important; /* 🎯 Convertito 15px in cqw */
    flex-shrink: 0 !important;
}

/* ==========================================================================
   📝 GESTIONE RETTANGOLI DI TESTO CONTATTI (CONTACT TEXT BOX LABELS)
   ========================================================================== */
.contact-text-box {
    flex: 1 !important;             /* Occupa tutto lo spazio rimasto dopo l'icona */
    min-width: 0 !important;        /* FONDAMENTALE: permette al box di restringersi e attivare l'ellipsis */
}

.contact-label {
    font-size: 3.5cqw !important; /* 🎯 Convertito 3.5vw in cqw */
    font-weight: 600 !important;
    color: #ff6600 !important; 
    margin: 0px !important;
    line-height: 1.2 !important;
}

.contact-value {
    font-size: 3.5cqw !important; /* 🎯 Convertito 3.5vw in cqw */
    color: #ffffff !important;
    margin: 0.8cqw 0 0 0 !important; /* 🎯 Convertito 3px in cqw */
    line-height: 1.3 !important;
    display: block !important;
    width: 100% !important;
}

/* Regola per i Link Lunghi (Email e Sito Web): Taglio intelligente con i tre puntini */
.contact-value a {
    color: inherit !important;
    text-decoration: none !important;
    display: block !important;
    width: 100% !important;
    white-space: nowrap !important;     /* Forza la mail/sito su una riga */
    overflow: hidden !important;        /* Nasconde l'eccedenza */
    text-overflow: ellipsis !important; /* Mette i 3 puntini */
}

/* Regola speciale per l'Indirizzo stradale (Evita il taglio, asseconda il ritorno a capo) */
.contact-row:has(.fa-map-marker-alt) .contact-value {
    white-space: normal !important;
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
}

.contact-row:has(.fa-map-marker-alt) .contact-value a {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    display: inline !important;
}

/* ==========================================================================
   🎛️ SYSTEM BOTTOM FIXED TAB BAR (BARRA SOCIAL ORIZZONTALE T6)
   ========================================================================== */
.bottom-tab-container {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    background-color: #1a1a1a !important;
}

.bottom-tab-bar {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 1.4cqw 0 1.4cqw 0 !important; /* 🎯 Convertito 5px in cqw (5 / 360 * 100) */
    overflow-x: auto !important;
    white-space: nowrap !important;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}
.bottom-tab-bar::-webkit-scrollbar {
    display: none !important;
    height: 0 !important;
}

.social-buttons-row {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 3.3cqw !important; /* 🎯 Convertito 12px in cqw (12 / 360 * 100) */
    width: max-content !important;
    min-width: 100% !important;
    padding: 0 4.1cqw !important; /* 🎯 Convertito 15px in cqw (15 / 360 * 100) */
    box-sizing: border-box !important;
}

/* 🟦 IL SINGOLO BOTTONE SOCIAL INFERIORE ELASTICO */
.social-btn-raised {
    width: 18cqw !important; /* 🎯 Convertito 18vw in 18cqw per il perfetto resize */
    /*aspect-ratio: 1 / 1 !important; */        
    flex-shrink: 0 !important;
    background-color: #262626 !important;
    border-radius: 3.3cqw !important; /* Convertito 12px */
    padding: 2.7cqw 0 !important; /* Convertito 10px */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 1.1cqw 2.7cqw rgba(0,0,0,0.3) !important;
}

.social-btn-raised i {
    font-size: 5cqw !important; /* 🎯 Convertito 5vw in cqw */
    color: #ffffff !important;
    margin-bottom: 0cqw !important; /* Convertito 4px */
}

.social-btn-raised span {
    font-size: 2.5cqw !important; /* 🎯 Convertito 3vw in cqw */
    font-weight: 600 !important;
    color: #ff6600 !important;
    letter-spacing: 0.08cqw !important; /* Convertito 0.3px */
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.social-icon-clear {
    /* [FONDAMENTALE] Forza il browser a usare Font Awesome per questo elemento */
    font-family: "Font Awesome 6 Brands", "Font Awesome 7 Brands", "Font Awesome 6 Free", "Font Awesome 7 Free" !important;
    
    /* [FONDAMENTALE] I brand richiedono un peso specifico per essere renderizzati */
    font-weight: 400 !important; 
    
    /* Assicura che l'icona mantenga uno stile visivo corretto e pulito */
    font-style: normal !important;
    display: inline-block !important;
}


/* ==========================================================================
   🏹 ASOLA DI NAVIGAZIONE E FRECCETTE ORIZZONTALI
   ========================================================================== */
.nav-arrow-wrapper {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 12.5cqw !important; /* 🎯 Convertito 45px in cqw (45 / 360 * 100) per scalare con l'Iframe */
    display: flex !important;
    align-items: center !important;
    z-index: 10000 !important;
    pointer-events: none !important; 
    opacity: 0 !important; 
    transition: opacity 0.3s ease !important;
}

.left-arrow-wrapper {
    left: 0 !important;
    justify-content: flex-start !important;
    padding-left: 0.8cqw !important; /* Convertito 3px */
    background: transparent !important;
}

.right-arrow-wrapper {
    right: 0 !important;
    justify-content: flex-end !important;
    padding-right: 0.8cqw !important; /* Convertito 3px */
    background: transparent !important;
}

.nav-arrow-wrapper.visible {
    opacity: 0.8 !important;
    background: transparent !important;
}

.nav-arrow {
    width: 6.6cqw !important;   /* 🎯 Convertito 24px in cqw (24 / 360 * 100) */
    height: 6.6cqw !important;  /* 🎯 Convertito 24px in cqw */
    background-color: transparent !important; 
    color: #ffffff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 2cqw !important; /* 🎯 Convertito 2vw in cqw */
    box-shadow: 0 0.5cqw 1.6cqw rgba(0,0,0,0.4) !important;
}

/* 🌍 Inversione Speculare in Lingua Araba (RTL) */
[dir="rtl"] .social-buttons-row {
    display: flex !important;
    flex-direction: row-reverse !important; 
}

[dir="rtl"] .bottom-tab-container, 
[dir="rtl"] #bottomTabBar {
    direction: ltr !important;
}

/* ==========================================================================
   ↕ ... CLASSI DI MARGINE E SPAZIATURA VERTICALE ELASTICA
   ========================================================================== */
.section-spacer-little {
    height: 0.8cqw !important; /* 🎯 Convertito 3px in cqw */
    width: 100% !important;
    display: block !important;
    clear: both !important;
}

.section-spacer {
    height: 9.7cqw !important; /* 🎯 Convertito 35px in cqw */
    width: 100% !important;
    display: block !important;
    clear: both !important;
}

.section-spacer-large {
    height: 25cqw !important; /* 🎯 Convertito 90px in cqw per perfetto isolamento prima del QR */
    width: 100% !important;
    display: block !important;
    clear: both !important;
}

/* ==========================================================================
   🗂️ PERSONALIZZAZIONE RIGIDA DARK ACCORDION BOOTSTRAP (T6 ACCORDION)
   ========================================================================== */
.custom-dark-accordion {
    width: 96cqw;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 32cqw !important;
}

.custom-dark-accordion .accordion-item {
    background-color: #262626 !important;
    border: 1px solid #333333 !important;
    margin-bottom: 2.7cqw !important; /* 🎯 Convertito 10px in cqw (10 / 360 * 100) */
    border-radius: 3.3cqw !important;  /* 🎯 Convertito 12px in cqw */
    overflow: hidden !important;
}

/* Stato base del bottone */
.custom-dark-accordion .accordion-button {
    background-color: #262626 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    padding: 4.1cqw !important;  /* 🎯 Convertito 15px in cqw (15 / 360 * 100) */
    font-size: 3.5cqw !important; /* 🎯 Convertito 3.5vw in cqw */
}

/* Icona della freccia di Bootstrap colorata di arancione */
.custom-dark-accordion .accordion-button::after {
    filter: invert(51%) sepia(94%) saturate(2352%) hue-rotate(1deg) brightness(103%) contrast(105%) !important;
}

/* Stato quando la scheda è aperta */
.custom-dark-accordion .accordion-button:not(.collapsed) {
    color: #ff6600 !important; 
    border-bottom: 0px solid #333333 !important;
}

.custom-dark-accordion .accordion-body {
    background-color: #1f1f1f !important;
    color: #dcdcdc !important;
    font-size: 3cqw !important; /* 🎯 Convertito 3vw in cqw */
    line-height: 1.5 !important;
}

/* ==========================================================================
   🖼️ STILI ANTEPRIME GALLERIA FOTOGRAFICA
   ========================================================================== */
.gallery-thumb {
    width: 100% !important;
    object-fit: cover !important;
    border-radius: 2.2cqw !important; /* 🎯 Convertito 8px in cqw */
    border: 1px solid #444444 !important;
    transition: transform 0.2s ease !important;
}

.gallery-thumb:hover {
    transform: scale(1.03) !important;
}

/* 🌍 Supporto speculare per lingue RTL arabo nell'accordion */
[dir="rtl"] .custom-dark-accordion .accordion-button::after {
    margin-right: auto !important; 
    margin-left: 0 !important;     
}

[dir="rtl"] .custom-dark-accordion .accordion-button i.me-2 {
    margin-right: 0 !important;   
    margin-left: 2.2cqw !important;  /* 🎯 Convertito 8px in cqw */
    transform: scaleX(-1) !important; 
}

/* ==========================================================================
   📸 GESTIONE PROFILO AVATAR CORE (CENTRATURA ELASTICA T6)
   ========================================================================== */
/* ==========================================================================
   📸 GESTIONE PROFILO IN T6 (RISOLTO ABBATTIMENTO BUG ALTEZZA ROTONDA)
   ========================================================================== */
/* ==========================================================================
   📸 GESTIONE PROFILO IN T6 (COPIATA DALLA LOGICA ASSOLUTA FUNZIONANTE DEL T4)
   ========================================================================== */
.avatar-container {
    position: relative !important;
    /* 🎯 AZZERAMENTO FORZATO: Rimuove spinte parassite lasciando che sia align-items della card a centrare */
    margin-top: 0 !important; 
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    
    width: 35cqw !important;
    height: 35cqw !important;
    max-width: 28cqw !important;  
    max-height: 28cqw !important; 
    flex-shrink: 0 !important;    
    overflow: hidden !important; 
    border: 0.5cqw solid #333333 !important; 
    display: block !important;          
    box-sizing: border-box !important;
}

.top-profile-card {
    background-color: #262626 !important; 
    /* Padding generoso a 15cqw sopra e sotto per slanciare la struttura */
    padding: 15cqw 4.1cqw 15cqw 4.1cqw !important; 
    border-radius: 4.4cqw !important; 
    box-shadow: 0 2.7cqw 6.9cqw rgba(0,0,0,0.3) !important; 
    
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important; 
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    gap: 0 !important; /* Azzeriamo il gap flessibile per controllarlo al millimetro con i margini */
    margin: 0cqw 1.9cqw 0cqw 1.9cqw !important; 
    position: relative !important;
    z-index: 999 !important; 
}


.avatar-container {
    /* 🎯 IL SEGRETO: Sganciamo l'immagine dal flusso. Ora fluttua a sinistra,
       permettendo ai testi di andarle incontro senza essere confinati a destra! */
    position: absolute !important;
                 /* Distanza rigida dal bordo sinistro della card */
    
    width: 33cqw !important;
    height: 33cqw !important;
    max-width: 33cqw !important;  
    max-height: 33cqw !important; 
    flex-shrink: 0 !important;    
    overflow: hidden !important; 
    border: 0.5cqw solid #333333 !important; 
    display: block !important;          
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
}

.avatar-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important; 
    object-position:  center !important;
    display: block !important;
}


.avatar-container.circular--portrait,
.avatar-container.circular--portrait img {
    border-radius: 50% !important;
}

.avatar-container.shape-square,
.avatar-container.shape-square img {
    border-radius: 3.3cqw !important; 
}

/* ==========================================================================
   📝 3. POSIZIONAMENTO RIGIDO NOME E RUOLO (INCOLLATI A SINISTRA ALLA FOTO)
   ========================================================================== */
.top-profile-card .name-role {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important; 
    
    /* 🎯 INCOLLATI A SINISTRA: Annulliamo qualsiasi centratura o spinta a destra */
    text-align: left !important;       
    align-items: flex-start !important; 
    
    /* 🎯 IL CALCOLO MATEMATICO DEI 10 PIXEL:
       L'aria iniziale è 4.1cqw + la larghezza della foto è 28cqw (= 32.1cqw totale).
       Aggiungiamo esattamente i 10px richiesti (pari a 2.7cqw).
       32.1cqw + 2.7cqw = 34.8cqw. Impostiamo 35cqw per un'adesione ferrea alla foto! */
    margin-left: 38cqw !important; 
    
    flex-grow: 0 !important;
    width: auto !important;
    max-width: 45cqw !important; /* Limite per non andare sopra i tasti azione a destra */
    padding: 0.4cqw !important; 
    margin-top: 0px !important;
    margin-bottom: 5cqw !important;
    margin-right: 0px !important;
    box-sizing: border-box !important;
}

/* Allineamento a bandiera sinistro per i singoli testi */
.top-profile-card .main-name,
.top-profile-card .role {
    width: 100% !important;
    display: block !important;
    text-align: left !important; 
}

.top-profile-card .main-name {
    margin-top: 0px !important;
    margin-bottom: 3.4cqw !important; /* Micro-spazio sotto il nome (5px) */
}

.top-profile-card .role {
    margin-top: 0px !important;
    margin-bottom: 0px !important;
}



.card-actions-wrapper {
    position: absolute !important;
    bottom: 3.3cqw !important; /* Convertito 12px */
    right: 3.3cqw !important;  /* Convertito 12px */
    display: flex !important;
    gap: 2.2cqw !important;    /* Convertito 8px */
}

/* LO STILE UNIFICATO DEI MINI BOTTONI AZIONE */
.action-mini-btn {
    background-color: #1a1a1a !important; 
    width: 10cqw !important;  /* 🎯 Convertito 36px in cqw (36 / 360 * 100) */
    height: 10cqw !important; /* 🎯 Convertito 36px in cqw */
    border-radius: 2.7cqw !important; /* Convertito 10px */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 1.1cqw 2.7cqw rgba(0,0,0,0.4) !important;
    text-decoration: none !important;
    transition: transform 0.2s ease, background-color 0.2s ease !important;
}

/* Icona del tasto Salva (Discreta e bianca) */
.action-mini-btn i {
    font-size: 5cqw !important; /* 🎯 Convertito 5vw in 5cqw */
    color: #ffffff !important; 
}

/* Icona e stile del tasto Share (Arancione per priorità visiva) */
.action-mini-btn.btn-orange i {
    font-size: 5cqw !important; /* 🎯 Convertito 5vw in 5cqw */
    color: #ff6600 !important;
}

/* Effetto pressione */
.action-mini-btn:active {
    transform: scale(0.92) !important;
    background-color: #333333 !important;
}

/* ==========================================================================
   🔳 SEZIONE E CONTENITORE CORNICE QR CODE FINALE (T6 FINALE)
   ========================================================================== */
.qr-section {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 14.7cqw !important;    /* 🎯 Convertito 35px in cqw (35 / 360 * 100) */
    margin-bottom: 5.7cqw !important; /* 🎯 Convertito 35px in cqw */
    box-sizing: border-box !important;
}

.qr-container {
    background-color: #262626 !important; 
    padding: 3.3cqw !important;        /* 🎯 Convertito 12px in cqw */
    border-radius: 4.4cqw !important;  /* 🎯 Convertito 16px in cqw */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-bottom: 3.3cqw !important;  /* Convertito 12px in cqw */
}

.qrcode-wrapper {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

#qrcode-public {
    width: 66.6cqw !important;  /* 🎯 RISOLTO: Sradicato il vecchio 70vw e forzato a 66.6cqw (240px) */
    height: 66.6cqw !important; /* 🎯 Sincronizzato a 66.6cqw */
    max-width: 88.8cqw !important;  /* Tetto massimo in cqw corrispondente ai vecchi 320px */
    max-height: 88.8cqw !important; 
    background: transparent !important;
}

#qrcode-public canvas,
#qrcode-public img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    border-radius: 2.2cqw !important; /* Convertito 8px in cqw */
}

.qr-instruction {
    margin-top: 0.4cqw !important; /* Convertito 5px in cqw */
    text-align: center !important;
    background-color: transparent !important;
}

.qr-instruction span {
    font-size: 3.3cqw !important; /* 🎯 Convertito 0.85rem in cqw proporzionato */
    font-weight: 600 !important;
    color: #ff6600 !important;
    letter-spacing: 0.2cqw !important; /* Convertito 1px in cqw */
}

/*  Per rimpicciolire le frecce detra e sinistra nella gallery di baguettebox */

/* 1. Fa trasparente il cerchio/blocco esterno delle frecce laterali */
#baguetteBox-overlay button#next-button,
#baguetteBox-overlay button#previous-button {
     
    background-color: transparent !important; 
}

/* 🎯 RIMPICCIOLISCE LA FRECCIA GRAFICA EFFETTIVA */
#baguetteBox-overlay .baguetteBox-button svg {
    /* Rimpicciolisce la freccia al 60% della sua dimensione originale */
    transform: scale(0.6) !important; 
    
    /* Assicura che la freccia rimanga centrata durante il rimpicciolimento */
    transform-origin: center !important; 
}

/* 🎯 AVVICINA LE FRECCE AI BORDI DELLA SCOCCA DELLO SMARTPHONE */

/* Spinge la freccia sinistra (Previous) verso il bordo sinistro */
#baguetteBox-overlay button#previous-button {
    left: -8px !important; /* Regola questo valore: 0px è il limite massimo attaccato al bordo */
}

/* Spinge la freccia destra (Next) verso il bordo destro */
#baguetteBox-overlay button#next-button {
    right: -8px !important; /* Regola questo valore: 0px è il limite massimo attaccato al bordo */
}
