/* ==========================================================================
   🎨 TIPOGRAFICA GLOBALE E INTEGRALE (AL CARICAMENTO)
   ========================================================================== */
*, html, body, div, p, span, a, h1, h2, h3, h4, h5, h6, button, input, .accordion-button, .card-title, .card-text, .icon-label-text {
    font-family: '<?php echo htmlspecialchars($design['font_family'] ?? 'system-ui', ENT_QUOTES, 'UTF-8'); ?>', sans-serif !important;
}

/* ⚠️ PROTEZIONE ICONE: Impedisce alla regola sopra di rompere i simboli grafici di Font Awesome */
.fa, .fas, .fab, .fa-brands {
    font-family: 'Font Awesome 5 Free', 'Font Awesome 5 Brands' !important; 
}
            
.hide_scroll::-webkit-scrollbar {
    display: none;
}

/* 📱 Rimozione totale delle barre di scorrimento visibili sui browser mobile */ 
:root::-webkit-scrollbar {
    display: none;
}
:root {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* 🎨 IMMAGINE LOGO IN TESTATA RESPONSIVA */
.img-logo {
    width: 88.8cqw !important; /* 🎯 Convertito width: 320px in cqw (320 / 360 * 100) */
    max-width: 100% !important; /* Paracadute rigido anti-deformazione */
    height: auto !important;
    display: block;
    margin: 0 auto;
}

@media (max-width: 550px) {
    .img-logo {
        min-width: 41.6cqw !important; /* Convertito 150px */
        max-width: 55.5cqw !important; /* Convertito 200px */
        text-align: center;
        margin-top: 0.8cqw !important;
        margin-bottom: 1.4cqw !important;
    }
    
    .add-to-home-screen-btn {
        font-size: 4cqw !important; /* Convertito 4vw in cqw */
    }
}

/* ==========================================================================
   📸 FOTO PROFILO CERCHIO PERFETTO ELASTICO CON CORNICE (PASSPARTOUT)
   ========================================================================== */
.circular--portrait {
    position: relative !important;
    /* 🎯 RISOLTO: Convertito il diametro fisso da 40vw a 28cqw.
       Ora si rimpicciolisce proporzionalmente alla dimensione del finto guscio! */
    width: 28cqw !important;
    height: 28cqw !important;
    overflow: hidden !important;
    border-radius: 50% !important;
    
    border: 0.7cqw solid #326d8f !important; /* Spessore della cornice proporzionato (7px) */
    padding: 0.8cqw !important;              /* Spazio di stacco interno (3px) */
    background-color: #ffffff !important;     /* Colore dello stacco passpartout */
    box-sizing: border-box !important;          
    margin: 0 auto !important;
}

.circular--portrait img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important; /* Forza l'immagine interna a ritagliarsi a cerchio perfetto */
    box-sizing: border-box !important;
}

/* ==========================================================================
   📝 INTESTAZIONI IDENTITÀ UTENTE (NOME COMPLETO E RUOLO)
   ========================================================================== */
.main-name h1 {
    font-weight: normal !important; 
    font-size: 8cqw !important; /* 🎯 RISOLTO: Convertito 8vw in 8cqw per salvare il testo nei pc */
    font-family: 'Open Sans', sans-serif !important;
    color: #777 !important; 
    margin-top: 2.7cqw !important; /* Convertito 10px in cqw */
    margin-bottom: 2.7cqw !important;
    margin-left: 2.7cqw !important;
    margin-right: 2.7cqw !important;
    text-align: center !important;
}

.role {
    font-weight: normal !important; 
    font-size: 6cqw !important; /* 🎯 RISOLTO: Convertito 6vw in 6cqw */
    font-family: 'Open Sans', sans-serif !important;
    color: #777 !important; 
    margin-bottom: 5.5cqw !important; /* Convertito 20px in cqw */
    margin-left: 2.7cqw !important;
    margin-right: 2.7cqw !important;
    text-align: center !important;
}

/* ==========================================================================
   🛸 PULSANTI SOCIAL NETWORK (RAGGIO SUPERIORE)
   ========================================================================== */
.first-button-row {
    margin-top: 9cqw !important; /* 🎯 Convertito 9vw in 9cqw */
    margin-bottom: 6cqw !important; /* 🎯 Convertito 6vw in 6cqw */
    text-align: center !important;
}

.first-button-row a:hover {
    text-decoration: none !important;
}

.fab, .fa-brands {
    text-align: center !important;
    vertical-align: middle !important;
    text-decoration: none !important;
    border-radius: 2cqw !important; /* Convertito 2vw in cqw */
    margin-right: 2cqw !important;
    margin-left: 2cqw !important;
    margin-bottom: 5cqw !important;
    width: 10cqw !important;  /* 🎯 Convertito width: 10vw in cqw */
    height: 10cqw !important; /* 🎯 Convertito height: 10vw in cqw */
    font-size: 5cqw !important;  /* 🎯 Convertito font-size: 5vw in cqw */
    
    /* 🔥 IL FIX CRUCIALE: Il line-height in cqw costringe l'icona interna (es. LinkedIn, Instagram) 
       a rimanere bloccata geometricamente al centro esatto della pallina, senza scivolare in basso! */
    line-height: 10cqw !important; 
    
    background: #547c8f !important;
    color: #ffffff !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;
}

.fa-facebook-f {
    text-align: center !important;
    vertical-align: middle !important;
    text-decoration: none !important;
    border-radius: 2cqw !important;
    margin-right: 1cqw !important;
    margin-left: 0cqw !important;
    width: 10cqw !important;
    height: 10cqw !important;
    font-size: 5cqw !important; 
    line-height: 10cqw !important; /* Allineamento centrale perfetto */
    background: #547c8f !important;
    color: #ffffff !important;
    cursor: pointer !important;
}

/* ==========================================================================
   🛸 PULSANTI DI AZIONE RAPIDA (CONDIVISIONE E SALVATAGGIO IN RUBRICA)
   ========================================================================== */
.fas.fa-share-alt {
    text-align: center !important;
    vertical-align: middle !important;
    text-decoration: none !important;
    border-radius: 2cqw !important; /* 🎯 Convertito 2vw in cqw */
    margin-right: 1cqw !important;
    margin-left: 0cqw !important;
    width: 10cqw !important;  /* 🎯 Convertito 10vw in cqw */
    height: 10cqw !important; /* 🎯 Convertito 10vw in cqw */
    font-size: 5cqw !important;  /* 🎯 Convertito 5vw in cqw */
    line-height: 10cqw !important; /* Mantiene l'icona centrata al millimetro */
    background: #547c8f !important;
    color: #ffffff !important;
    cursor: pointer !important;
}

.fas.fa-user-plus {
    text-align: center !important;
    vertical-align: middle !important;
    text-decoration: none !important;
    border-radius: 2cqw !important;
    margin-right: 1cqw !important;
    margin-left: 0cqw !important;
    width: 10cqw !important;
    height: 10cqw !important;
    font-size: 5cqw !important; 
    line-height: 10cqw !important;
    background: #547c8f !important;
    color: #ffffff !important;
    cursor: pointer !important;
}

/* ==========================================================================
   📇 BLOCCHI CONTATTI INDIVIDUALI (TELEFONI, EMAIL, INDIRIZZO)
   ========================================================================== */
.bordered-div {
    text-align: center !important;
    margin-top: 2.7cqw !important; /* 🎯 Convertito 10px in cqw (10 / 360 * 100) */
    margin-left: 0cqw !important;
    margin-right: 0cqw !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 2.2cqw !important; /* 🎯 Convertito 8px in cqw */
    padding: 2.7cqw !important; /* 🎯 Convertito 10px in cqw */
    position: relative !important;
}

.bordered-div .title {  
    padding: 2.7cqw !important; /* 🎯 Convertito 10px in cqw */
    text-decoration: none !important;
    margin-left: 12cqw !important; /* 🎯 Convertito 12% in cqw per stabilità asincrona */
}

.bordered-div .title-elipsis {  
    padding: 2.7cqw !important;
    text-decoration: none !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    margin-left: 12cqw !important; /* 🎯 Convertito 12% in cqw */
}

/* 🎯 ICONE DI CONTATTO POSIZIONATE RIGIDAMENTE SUL VETRO */
.bordered-div i {
    color: #547c8f !important;
    font-size: 7cqw !important; /* 🎯 Convertito 7vw in cqw */
    float: left !important;
    position: absolute !important;
    top: 50% !important;
    left: 8cqw !important; /* 🎯 Convertito 8% in cqw per bloccarne l'ancoraggio laterale */
    transform: translate(-50%, -50%) !important;
}

.div-rialzato {
    /* 🎯 Convertito ombreggiatura fissa in cqw proporzionale per il resize */
    box-shadow: 0.5cqw 0.8cqw 2.2cqw rgba(200, 220, 220, 0.8) !important; 
    background-color: #000000 !important; 
}

.phones-mail-address-link {
    margin-bottom: 8.3cqw !important; /* 🎯 Convertito 30px in cqw (30 / 360 * 100) */
}

.phones-mail-address-link .title {
    font-weight: normal !important;
    color: #777 !important; 
    font-size: 5cqw !important; /* 🎯 Convertito 5vw in cqw */
    font-family: 'Open Sans', sans-serif !important;
    text-align: center !important;
}

.phones-mail-address-link .title-elipsis {
    font-weight: normal !important;
    color: #777 !important; 
    font-size: 4.5cqw !important; /* 🎯 Convertito 4.5vw in cqw */
    font-family: 'Open Sans', sans-serif !important;
    text-align: center !important;
}

.phones-mail-address-link a {
    color: #777 !important;
    text-decoration: none !important;
}
    
/* ==========================================================================
   🧩 SEZIONE ACCORDION DINAMICA (GALLERY, VIDEO, DETTAGLI)
   ========================================================================== */
.myaccordion {
    max-width: 100% !important;
    margin-left: 0cqw !important;
    margin-right: 0cqw !important;
    margin-top: 0cqw !important; /* 🎯 Convertito 30px in cqw */
    margin-bottom: 8.3cqw !important; /* 🎯 Convertito 30px in cqw */
}
 
.myaccordion .card {
    margin-top: 0cqw !important;
} 

.myaccordion .card,
.myaccordion .card:last-child .card-header {
    border: 0px solid #e8e8e8 !important;
    margin-top: 0cqw !important;
}
 
.myaccordion .card-header {
    border-bottom-color: transparent !important;
    background: #ffffff !important;
    color: #808080 !important;
}
 
.myaccordion .card-body {
    background: #ffffff !important;
    font-size: 6cqw !important; /* 🎯 Convertito 6vw in cqw */
    font-family: 'Open Sans', sans-serif !important;
    padding-top: 2.7cqw !important; /* 🎯 Convertito 10px in cqw */
    padding-bottom: 4.1cqw !important; /* 🎯 Convertito 15px in cqw */
    border-radius: 0px !important;
}
 
.myaccordion .btn {
    width: 100% !important;
    font-weight: normal !important;
    color: #808080 !important;
    padding: 0 !important;
    font-size: 4cqw !important; /* 🎯 Convertito 4vw in cqw */
    font-family: 'Open Sans', sans-serif !important;
}

/* 🎯 ICONE E FRECCE DELL'ACCORDION INTERNO */
.myaccordion i {
    font-size: 5cqw !important; /* 🎯 Convertito 5vw in cqw */
    margin-right: 5.5cqw !important; /* 🎯 Convertito 20px in cqw (20 / 360 * 100) */
    width: 5cqw !important; /* 🎯 Convertito 5vw in cqw */
}

.myaccordion .btn-link:hover,
.myaccordion .btn-link:focus {
    text-decoration: none !important;
}


/* ==========================================================================
   🧩 INTERFACCIA ACCORDION AZIONI E STATI DI FOCUS
   ========================================================================== */
.myaccordion .btn:focus,
.myaccordion .btn:active,
.myaccordion .btn:focus-visible,
.myaccordion .btn-link:focus,
.myaccordion .btn-link:active {
    box-shadow: none !important;      /* Rimuove l'alone sfumato di focus di Bootstrap */
    outline: none !important;         /* Rimuove la linea rigida del browser */
    text-decoration: none !important; /* Garantisce che il testo non si sottolinei al clic */
    border-color: transparent !important;
}

.myaccordion .card-header:focus,
.myaccordion .card-header:focus-within {
    box-shadow: none !important;
    outline: none !important;
}
 
.myaccordion li + li {
    margin-top: 2.7cqw !important; /* 🎯 Convertito 10px in cqw (10 / 360 * 100) */
}   

/* 🌍 2. Configurazione Speculare per Lingua Araba (RTL) */
[dir="rtl"] .myaccordion .card-header button span i {
    margin-inline-end: 2.2cqw !important; /* Convertito 8px */
    transform: scaleX(-1) !important;     /* Capovolge specularmente le icone dell'accordion */
    display: inline-block !important; 
}

[dir="rtl"] .myaccordion .card-body {
    padding-right: 8.3cqw !important; /* 🎯 Convertito 30px in cqw */
    padding-left: 4.1cqw !important;  /* 🎯 Convertito 15px in cqw */
}

.myaccordion .card + .card {
    margin-top: 2.7cqw !important; /* Convertito 10px in cqw */
}

.margintop10 {
    margin-top: 5.5cqw !important; /* 🎯 Convertito 20px in cqw */
    border-radius: 3.3cqw !important; /* 🎯 Convertito 12px in cqw */
}   
    
/* ==========================================================================
   🖼️ LIGHTBOX IMMAGINI GALLERY (BAGUETTEBOX OVERLAY)
   ========================================================================== */
#baguetteBox-overlay .full-image {
    position: relative !important;
    overflow: hidden !important;
    border: 0px solid #ffffff !important;
    border-radius: 0px !important;
    background-color: #ffffff !important;
    opacity: 1 !important;
} 

#baguetteBox-overlay .full-image img {
    object-fit: contain !important;
    width: 100% !important;
}    

#qr_frame {
    width: 69.4cqw !important;  /* 🎯 Convertito 250px in cqw (250 / 360 * 100) */
    height: 69.4cqw !important; /* 🎯 Convertito 250px in cqw */
}

.container {
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
}

.responsive-iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

.qr table {
    margin: 0 auto !important;
}

/* ==========================================================================
   ↕️ CLASSI DI SPAZIATURA VERTICALE ELASTICA PROPORZIONATA (MARGINS TO CQW)
   ========================================================================== */
.margin10 { margin-top: 2.7cqw !important; } /* 10px */
.margin20 { margin-top: 5.5cqw !important; } /* 20px */
.margin30 { margin-top: 8.3cqw !important; } /* 30px */
.margin40 { margin-top: 11.1cqw !important; } /* 40px */
.margin50 { margin-top: 13.8cqw !important; } /* 50px */

/* ==========================================================================
   📸 SECONDA VARIANTE AVATAR CONTENITORE (PROPORTIONAL RINGS)
   ========================================================================== */
.profile-avatar-ring {
    width: 22.2cqw !important;  /* 🎯 Convertito 80px in cqw (80 / 360 * 100) */
    height: 22.2cqw !important; /* 🎯 Convertito 80px in cqw */
    border: 0.7cqw solid #326d8f !important; /* Convertito 3px */
    padding: 0cqw !important;
    background-color: #ffffff !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    transition: border-radius 0.2s ease !important;
}

.profile-avatar-ring.is-round, 
.profile-avatar-ring.is-round .profile-avatar-img {
    border-radius: 50% !important;
}

.profile-avatar-ring.is-square, 
.profile-avatar-ring.is-square .profile-avatar-img {
    border-radius: 2.2cqw !important; /* 🎯 Convertito 8px in cqw */
}

.profile-avatar-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    box-sizing: border-box !important;
}

/* ==========================================================================
   🛸 CONTENITORE FOTO  ZOOM E PRESET FORME (MASTER WRAPPER)
   ========================================================================== */
.zoom-in-out-box {
    position: relative !important;
    width: 43cqw !important;  /* 🎯 Convertito 120px in cqw (120 / 360 * 100) */
    height: 43cqw !important; /* 🎯 Convertito 120px in cqw */
    margin-top: 0 !important; 
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.zoom-in-out-box.circular--portrait {
    border: 0.2cqw solid #fafafa !important; /* 🎯 Convertito 5px in cqw */
    border-radius: 50% !important;
    overflow: hidden !important;
}
.zoom-in-out-box.circular--portrait img {
    border-radius: 50% !important;
}

.zoom-in-out-box.shape-square {
    border: 0.7cqw solid #fafafa !important; /* 🎯 Convertito 5px in cqw */
    border-radius: 3.3cqw !important;        /* 🎯 Convertito 12px in cqw */
    overflow: hidden !important;
}
.zoom-in-out-box.shape-square img {
    border-radius: 3.3cqw !important;
}

.zoom-in-out-box img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; 
}

.zoom-in-out-box img[src*=".svg"] {
    object-fit: contain !important;
    padding: 0.8cqw !important; /* 🎯 Convertito 3px in cqw */
    box-sizing: border-box !important;
}

/* ==========================================================================
   📡 STRUTTURA E CENTRAGGIO DEL QR CODE PUBBLICO (T1)
   ========================================================================== */
.public-qrcode-container {
    text-align: center !important;
    margin-top: 6.6cqw !important;    /* 🎯 Convertito 1.5rem in cqw proporzionato */
    margin-bottom: 6.6cqw !important; /* 🎯 Convertito 1.5rem in cqw proporzionato */
    width: 100% !important;
}

.public-qrcode-container .scan-me {
    margin-bottom: 0.8cqw !important; /* Convertito 3px */
    letter-spacing: 0.2cqw !important; /* Convertito 1px */
}

.public-qrcode-container .qrcode-wrapper {
    display: inline-block !important;
    padding: 0.8cqw !important; /* Convertito 3px */
    border-radius: 0px !important; 
    box-shadow: 0 1.1cqw 2.7cqw rgba(0,0,0,0.05) !important;
    background-color: transparent !important; 
}

#qrcode-public {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto !important;
}

/* 🎯 BLOCCO CRUCIALE SULL'IMMAGINE DEL QR CODE */
#qrcode-public canvas,
#qrcode-public img {
    max-width: 66.6cqw !important; /* 🎯 Convertito il limite di 240px in cqw (240 / 360 * 100) */
    width: 66.6cqw !important;     /* 🎯 Sostituito il vecchio 75vw instabile con i cqw */
    height: auto !important;
}


/*  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 */
}




