/* ==========================================================================
   🧼 RESET GLOBALE E AZZERAMENTO BARRE DI SCORRIMENTO
   ========================================================================== */
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 */
}

/* ==========================================================================
   🖼️ BLOCCO IMMAGINE DI COPERTINA (IMAGE MAIN COVERS)
   ========================================================================== */
.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; 
}

/* ==========================================================================
   🛠️ CONTENITORE PULSANTI INTERNI (CARD ACTIONS SAT_BUTTONS)
   ========================================================================== */
.card-actions-wrapper {
    margin-top: 5cqw !important;    /* 🎯 Convertito 5vw in cqw */
    margin-bottom: 7cqw !important; /* 🎯 Convertito 7vw in cqw */
    align-items: center !important;
    justify-content: center !important;
    display: flex !important;
    gap: 2.2cqw !important; /* 🎯 Convertito 8px in cqw (8 / 360 * 100) */
}

/* 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 cqw */
    color: #ffffff !important; 
}

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

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

/* 🌍 SUPPORTO AUTOMATICO LINGUA ARABA (RTL) */
[dir="rtl"] .card-actions-wrapper {
    right: auto !important;
    left: 3.3cqw !important; /* Convertito 12px */
    flex-direction: row-reverse !important; 
}

/* ==========================================================================
   🧱 QUADRATINI CONTATTI AD EFFETTO 3D ILLUMINATO (T5 GRID)
   ========================================================================== */
.div-row-link {
    margin-left: 5cqw !important;    /* 🎯 Convertito 5vw in cqw */
    margin-right: 5cqw !important;   /* 🎯 Convertito 5vw in cqw */
    margin-top: 15cqw !important;    /* 🎯 Convertito 10vw in cqw */
    margin-bottom: 7cqw !important;  /* 🎯 Convertito 7vw in cqw */
}

.div-row-link .col-3 {
    padding-left: 1.1cqw !important;  /* 🎯 Convertito 4px in cqw (4 / 360 * 100) */
    padding-right: 1.1cqw !important; /* 🎯 Convertito 4px in cqw */
    margin-bottom: 2.2cqw !important;  /* 🎯 Convertito 8px in cqw (8 / 360 * 100) */
}

.div-row-link .bordered-div.div-rialzato {
    display: block !important;
    width: 100% !important;
    aspect-ratio: 1 / 1 !important; /* Forza la forma quadrata stabile */
    border-radius: 3.8cqw !important;  /* 🎯 Convertito 14px in cqw (14 / 360 * 100) */
    position: relative !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;

    /* 🌟 BASE EFFETTO WOW: Doppia ombra convertita in cqw */
    box-shadow: 0.8cqw 0.8cqw 2.2cqw rgba(0, 0, 0, 0.3), 
                -0.5cqw -0.5cqw 1.6cqw rgba(255, 255, 255, 0.05) !important;
    transition: all 0.2s ease-in-out !important;
}

/* 🌟 QUANDO L'UTENTE PASSA IL DITO O FA HOVER (Illuminazione bordo brand) */
.div-row-link .bordered-div.div-rialzato:hover {
    border-color: rgba(255, 255, 255, 0.25) !important;
    box-shadow: 1.4cqw 1.4cqw 3.3cqw rgba(0, 0, 0, 0.4), 
                -0.8cqw -0.8cqw 2.2cqw rgba(255, 255, 255, 0.1) !important;
}

/* 🌟 QUANDO L'UTENTE CLICCA ATTIVAMENTE (Affondamento nel display) */
.div-row-link .bordered-div.div-rialzato:active {
    transform: scale(0.96) !important; 
    box-shadow: inset 0.5cqw 0.5cqw 1.4cqw rgba(0, 0, 0, 0.5), 
                inset -0.5cqw -0.5cqw 1.4cqw rgba(255, 255, 255, 0.05) !important; 
}

/* Quando l'utente tocca il quadrato, l'icona si illumina e fa un micro-scatto verso l'alto */
.div-row-link .bordered-div.div-rialzato:hover i {
    color: <?php echo $coloreLink ?? '#ffffff'; ?> !important;
    transform: translateY(-0.5cqw) scale(1.1) !important; /* Convertito lo scatto verticale in cqw */
    transition: all 0.25s ease !important;
}

/* 🎯 CENTRATURA ASSOLUTA DI ICONA E TESTO INSIDE */
.div-row-link .bordered-div.div-rialzato a {
    display: flex !important;
    flex-direction: column !important; /* Icona sopra, testo sotto */
    align-items: center !important;
    justify-content: center !important;
    
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    
    text-decoration: none !important;
    color: #ffffff !important;
    padding: 1.1cqw !important; /* 🎯 Convertito 4px di camera d'aria in cqw */
}

/* 📸 DIMENSIONE REATTIVA DELLE ICONE INTERNE */
.div-row-link .bordered-div.div-rialzato i {
    font-size: 5.5cqw !important;  /* 🎯 Convertito 5.5vw in cqw */
    margin-bottom: 1.1cqw !important; /* 🎯 Convertito 4px in cqw */
    margin-right: 0 !important;    
    margin-left: 0 !important;
    width: auto !important;        
    color: #000000 !important;
}


/* ==========================================================================
   📝 ETICHETTE DI TESTO DEI CONTATTI (BUTTON LABELS)
   ========================================================================== */
.div-row-link .btn-label {
    font-size: 3cqw !important; /* 🎯 Convertito 3.0vw in cqw per stare dentro il col-3 */
    font-weight: 400 !important;
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 90% !important; /* Evita che tocchi i bordi del quadratino */
    text-align: center !important;
}

/* 🌍 COMPATIBILITÀ ARABO (RTL) */
[dir="rtl"] .div-row-link {
    flex-direction: row !important; 
}

/* ==========================================================================
   🎛️ SYSTEM BOTTOM FIXED TAB BAR (BARRA SOCIAL SCROLLABILE T5)
   ========================================================================== */
.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 !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 INFERIORE TESSERA ELASTICA */
.social-btn-raised {
    width: 15cqw !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: 0.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: 4cqw !important; /* 🎯 Convertito 5vw in cqw */
    color: #ffffff !important;
    margin-bottom: 1.1cqw !important; /* Convertito 4px */
}

.social-btn-raised span {
    font-size: 2cqw !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;
}

/* ==========================================================================
   🏹 FRECCETTE INTERNE DI SCORRIMENTO AD ANCORAGGIO ASSOLUTO
   ========================================================================== */
.nav-arrow {
    position: absolute !important;
    top: 50% !important;              
    transform: translateY(-50%) !important; 
    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;
    z-index: 10000 !important;
    
    opacity: 0 !important; 
    pointer-events: none !important; 
    transition: opacity 0.3s ease !important;
    cursor: pointer !important;
}

.left-arrow-arrow {
    left: 0.8cqw !important; /* 🎯 Convertito 3px in cqw */
}

.right-arrow-arrow {
    right: 0.8cqw !important; /* 🎯 Convertito 3px in cqw */
}

.nav-arrow.visible {
    opacity: 0.8 !important; 
    pointer-events: auto !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 (T5 ACCORDION)
   ========================================================================== */
.custom-dark-accordion {
    width: 96% !important;
    margin: 0 auto !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 T5)
   ========================================================================== */
.avatar-container {
    /* 🎯 RISOLTO: Sradicato il vecchio 50vw e normalizzato a 43cqw come l'asse degli altri modelli. 
       In questo modo l'avatar non sfonderà mai la scocca da 180px nell'onboarding */
    width: 43cqw !important;
    height: 43cqw !important;
    flex-shrink: 0 !important;
    overflow: hidden !important; 
    position: relative !important;
    border: 0.8cqw solid #ffffff !important; /* Convertito 3px */
    
    display: block !important;          
    margin-left: auto !important;       
    margin-right: auto !important;      
    margin-top: 0 !important;           
    margin-bottom: 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{
    border-radius: 50% !important;
}

.avatar-container.shape-square{
    border-radius: 3.3cqw !important; /* 🎯 Convertito 12px in cqw */
}

/* ==========================================================================
   🔳 SEZIONE E CONTENITORE CORNICE QR CODE FINALE (T5 FINALE)
   ========================================================================== */
.qr-section {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 12.5cqw !important;    /* 🎯 Convertito 2vw in cqw */
    margin-bottom: 1.5cqw !important; /* 🎯 Convertito 7vw in cqw per equilibrare lo stacco dal fondo */
    box-sizing: border-box !important;
}

.qr-container {
    background-color: #262626 !important; 
    padding: 0cqw !important;
    border-radius: 4.4cqw !important; /* Convertito 16px */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-bottom: 2.7cqw !important; /* 🎯 Convertito 1vw 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 */
}

.qr-instruction {
    margin-top: 0cqw !important; /* Convertito 0vw */
    text-align: center !important;
    background-color: transparent !important;
}

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



/*  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 */
}
