/* ═══════════════════════════════════════════
   QC Circle Menu v2.2.0 — Frontend CSS
   Approccio: dimensioni fisse in px
   Cerchio perfetto su TUTTI i browser
   ═══════════════════════════════════════════ */

.qcc-section {
    padding: 70px 20px;
    overflow: visible;
    position: relative;
}
.qcc-section *,
.qcc-section *::before,
.qcc-section *::after {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Immagine sfondo con opacità ── */
.qcc-bg-image {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
}
/* ── Contenitore: larghezza E altezza esplicite = cerchio perfetto ── */
.qcc-wrap {
    position: relative;
    z-index: 1;
    width: 780px;
    height: 780px;
    margin: 0 auto;
}

/* ── Icona personalizzata (immagine caricata dall'admin) ── */
.qcc-custom-icon {
    width: 42px;
    height: 42px;
    -o-object-fit: contain;
    object-fit: contain;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    pointer-events: none;
    max-width: 100%;
    max-height: 65%;
}

/* ── Wrapper SVG per dimensione personalizzabile ── */
.qcc-svg-wrap {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    max-width: 100%;
    max-height: 65%;
}
.qcc-svg-wrap svg {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

/* ── Cerchio ombra/gradiente (opzionale, colore dal pannello admin) ── */
.qcc-shadow-ring {
    position: absolute;
    top: 80px; right: 80px; bottom: 80px; left: 80px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* ── Orbita tratteggiata rossa ── */
.qcc-dash-ring {
    position: absolute;
    top: 50px; right: 50px; bottom: 50px; left: 50px;
    border-radius: 50%;
    border: 2.5px dashed #e8564a;
    pointer-events: none;
    -webkit-animation: qccDashSpin 40s linear infinite;
    animation: qccDashSpin 40s linear infinite;
}
@-webkit-keyframes qccDashSpin {
    0%   { -webkit-transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); }
}
@keyframes qccDashSpin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ── Orbita servizi ── */
.qcc-orbit {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    -webkit-animation: qccSpin 24s linear infinite;
    animation: qccSpin 24s linear infinite;
}
@-webkit-keyframes qccSpin {
    0%   { -webkit-transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); }
}
@keyframes qccSpin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ── Nodo servizio ── */
.qcc-node {
    position: absolute;
    -webkit-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    z-index: 2;
}
.qcc-node-inner {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-animation: qccCounter 24s linear infinite;
    animation: qccCounter 24s linear infinite;
}
@-webkit-keyframes qccCounter {
    0%   { -webkit-transform: rotate(0deg); }
    100% { -webkit-transform: rotate(-360deg); }
}
@keyframes qccCounter {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

/* Posizioni: le bolle si posizionano sui bordi del contenitore */
.qcc-pos-top    { top: 4%;  left: 50%; }
.qcc-pos-right  { top: 46%; left: 97%; }
.qcc-pos-bottom { top: 96%; left: 50%; }
.qcc-pos-left   { top: 46%; left: 3%;  }

/* ── Bolla cliccabile ── */
.qcc-bubble {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    gap: 3px;
    padding: 10%;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none !important;
    border: 3px solid;
    -webkit-transition: -webkit-transform 0.3s ease, box-shadow 0.3s ease;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
.qcc-bubble:hover {
    -webkit-transform: scale(1.08);
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}
.qcc-bubble:focus {
    outline: 2px solid #4a90d9;
    outline-offset: 3px;
}
.qcc-bubble svg {
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    max-width: 100%;
    max-height: 65%;
}
.qcc-btxt {
    font-family: 'Poppins', 'Segoe UI', -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
    color: #2c2c2c;
    max-width: 100%;
    display: block;
    overflow: hidden;
    word-break: break-word;
}

/* ── Centro: logo ── */
.qcc-center {
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    z-index: 3;
    pointer-events: none;
    white-space: nowrap;
}

.qcc-center-img {
    max-width: 300px;
}
.qcc-center-img img {
    width: 100%;
    height: auto;
}

.qcc-center-brand {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    gap: 10px;
}
.qcc-heart-icon {
    width: 55px;
    height: 55px;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
}
.qcc-brand-text {
    text-align: left;
}
.qcc-brand-name {
    font-family: 'Poppins', 'Segoe UI', -apple-system, sans-serif;
    font-size: 38px;
    font-weight: 700;
    color: #304a6e;
    letter-spacing: -0.5px;
    line-height: 1;
}
.qcc-brand-name em {
    font-style: normal;
    color: #c0392b;
}
.qcc-brand-tag {
    font-family: 'Poppins', 'Segoe UI', -apple-system, sans-serif;
    font-size: 16px;
    color: #6b7c93;
    margin-top: 5px;
}

/* ── Testo descrittivo al click ── */
.qcc-desc {
    position: absolute;
    left: 50%;
    top: 58%;
    -webkit-transform: translateX(-50%) translateY(8px);
    transform: translateX(-50%) translateY(8px);
    font-family: 'Poppins', 'Segoe UI', -apple-system, sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    padding: 0 20px;
    max-width: 400px;
    line-height: 1.4;
    opacity: 0;
    -webkit-transition: opacity 0.4s ease, -webkit-transform 0.4s ease;
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
    white-space: normal;
    z-index: 4;
}
.qcc-desc-visible {
    opacity: 1;
    -webkit-transform: translateX(-50%) translateY(0);
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

@media (max-width: 640px) {
    .qcc-desc {
        font-size: 13px;
        max-width: 280px;
        top: 60%;
    }
}


/* ═══════════════════════════════════════════
   RESPONSIVE — sempre width = height
   ═══════════════════════════════════════════ */
@media (max-width: 850px) {
    .qcc-section { padding: 50px 12px; }
    .qcc-wrap { width: 580px; height: 580px; }
    .qcc-bubble { width: 140px; height: 140px; }
    .qcc-shadow-ring { top: 60px; right: 60px; bottom: 60px; left: 60px; }
    .qcc-dash-ring  { top: 35px; right: 35px; bottom: 35px; left: 35px; }
    .qcc-brand-name { font-size: 28px; }
    .qcc-brand-tag { font-size: 12px; }
    .qcc-heart-icon { width: 42px; height: 42px; }
    .qcc-center-img { max-width: 220px; }
}

@media (max-width: 640px) {
    .qcc-section { padding: 30px 5px; }
    .qcc-wrap { width: 100vw; height: 100vw; max-width: 500px; max-height: 500px; }
    .qcc-bubble { width: 120px; height: 120px; }
    .qcc-shadow-ring { top: 35px; right: 35px; bottom: 35px; left: 35px; }
    .qcc-dash-ring  { top: 15px; right: 15px; bottom: 15px; left: 15px; }
    .qcc-brand-name { font-size: 22px; }
    .qcc-brand-tag { font-size: 10px; }
    .qcc-heart-icon { width: 34px; height: 34px; }
    .qcc-center-img { max-width: 160px; }
    .qcc-center-brand { gap: 6px; }
}

@media (max-width: 400px) {
    .qcc-wrap { max-width: 360px; max-height: 360px; }
    .qcc-bubble { width: 95px; height: 95px; border-width: 2px; }
    .qcc-shadow-ring { top: 25px; right: 25px; bottom: 25px; left: 25px; }
    .qcc-dash-ring  { top: 10px; right: 10px; bottom: 10px; left: 10px; }
    .qcc-brand-name { font-size: 18px; }
    .qcc-brand-tag { font-size: 9px; }
    .qcc-heart-icon { width: 28px; height: 28px; }
    .qcc-center-img { max-width: 120px; }
}

/* Centrato quando lo schermo è più stretto del wrap */
@media (max-width: 820px) {
    .qcc-wrap {
        max-width: 100%;
    }
}

/* ── Accessibilità ── */
@media (prefers-reduced-motion: reduce) {
    .qcc-orbit,
    .qcc-node-inner,
    .qcc-dash-ring {
        -webkit-animation: none !important;
        animation: none !important;
    }
}
