/* ═══════════════════════════════════════════════════════════
   MEsoft – Pagine software (DynamoBilling, Software SMS)
   e telecomunicazioni con NEXA TLC.
   Estende style.css: usa solo i token definiti in :root.
   ═══════════════════════════════════════════════════════════ */

/* ───────── Hero sotto-pagine ───────── */
.px-hero-lead {
    max-width: 62ch;
    margin: 1.25rem auto 0;
    color: var(--text-soft);
    font-size: 1.1rem;
}
.px-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.75rem;
}
.px-nexa-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 1.25rem;
    padding: 0.35rem 0.85rem 0.35rem 0.45rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
}
.px-nexa-badge .px-nexa-logo { padding: 0.2rem 0.5rem; border-radius: 999px; min-width: 0; background: transparent; }
.px-nexa-badge .px-nexa-logo img { height: 18px; width: auto; }
.px-nexa-badge .px-nexa-word { font-size: 0.8rem; }

/* ───────── Titoli di sezione ───────── */
.px-head { margin-bottom: 2.5rem; max-width: 62ch; }
.px-head h2 { margin-bottom: 0.75rem; }
.px-head p { color: var(--text-soft); }
.px-head.center { text-align: center; margin-inline: auto; }
.px-head.center .eyebrow { justify-content: center; }

/* ───────── Card (link) ───────── */
.px-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}
.px-card:hover { color: inherit; }
.px-card .more { margin-top: auto; padding-top: 1.25rem; }
.px-card p { margin-bottom: 0; }
.px-card .icon-wrap { width: 44px; height: 44px; border-radius: 12px; margin-bottom: 1rem; }
.px-card .icon-wrap svg { width: 20px; height: 20px; }
.px-card h3 { font-size: 1.1rem; }

.px-card-static:hover { transform: none; box-shadow: none; border-color: var(--border); }
.px-card-static:hover::after { transform: scaleX(0); }

/* Card rossa "Richiedi il listino" */
.px-card-cta {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    padding: 1.75rem;
    background: linear-gradient(135deg, var(--red-700) 0%, var(--red-900) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}
.px-card-cta h3 { color: var(--white); font-size: 1.2rem; margin-bottom: 0.5rem; }
.px-card-cta p { color: rgba(255,255,255,0.85); font-size: 0.95rem; }
.px-card-cta .btn { margin-top: auto; align-self: stretch; }
.px-card-cta .btn-spacer { flex: 1; min-height: 1.25rem; }

/* ───────── Box fornitore NEXA TLC ───────── */
.px-provider {
    display: grid;
    grid-template-columns: 200px 1fr auto;
    gap: clamp(1.25rem, 3vw, 2.5rem);
    align-items: center;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(1.25rem, 3vw, 2rem);
}
.px-provider h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.px-provider p { font-size: 0.92rem; }
.px-provider strong { color: var(--gray-900); }
@media (max-width: 800px) {
    .px-provider { grid-template-columns: 1fr; text-align: left; }
    .px-provider .px-nexa-logo { justify-self: start; }
}

.px-nexa-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #F4F6FA;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    min-width: 160px;
}
.px-nexa-logo img { width: 100%; max-width: 170px; height: auto; }
.px-nexa-word {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: 0.04em;
    color: #1B5FA8;
    line-height: 1;
}

/* ───────── Step (come funziona) ───────── */
.px-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 800px) { .px-steps { grid-template-columns: 1fr; } }
.px-step {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
}
.px-step .num {
    width: 34px; height: 34px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--red-700), var(--red-500));
    color: var(--white);
    font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 1rem;
}
.px-step h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.px-step p { font-size: 0.95rem; }

/* ───────── Due modalità (DynamoBilling) ───────── */
.px-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 800px) { .px-modes { grid-template-columns: 1fr; } }
.px-mode {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3vw, 2.25rem);
}
.px-mode .icon-wrap {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: var(--red-50);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.25rem;
}
.px-mode .icon-wrap svg { width: 22px; height: 22px; }
.px-mode h3 { margin-bottom: 0.5rem; }
.px-mode .feature-list { margin-top: 1.25rem; gap: 0.6rem; font-size: 0.95rem; }

.px-mode-head { display: flex; justify-content: space-between; align-items: flex-start; }
.px-mode-foot { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--text-mute); }
.px-mode-foot a { text-decoration: underline; text-underline-offset: 3px; }
.px-status {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    border: 1px solid transparent;
}
.px-status-ok { background: #ECF8EF; color: #1F6B33; border-color: #B7E2C2; }
.px-status-progress { background: #FFF6E0; color: #7A5B00; border-color: #F0DC9E; }

/* ───────── Per chi è ───────── */
.px-audience {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.4rem;
}
.px-audience .icon-wrap {
    flex-shrink: 0;
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--red-50);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
}
.px-audience .icon-wrap svg { width: 18px; height: 18px; }
.px-audience h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.px-audience p { font-size: 0.9rem; }

.px-notice {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--red-50);
    border: 1px solid var(--red-100);
    border-radius: var(--radius);
    font-size: 0.92rem;
    color: var(--gray-900);
}
.px-notice svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--primary); margin-top: 2px; }

/* ───────── FAQ ───────── */
.px-faq {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}
@media (max-width: 800px) { .px-faq { grid-template-columns: 1fr; } }
.px-faq-list { display: grid; gap: 0.75rem; }
.px-faq details {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
}
.px-faq summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--gray-900);
    list-style: none;
    display: flex;
    gap: 0.6rem;
    align-items: baseline;
}
.px-faq summary::-webkit-details-marker { display: none; }
.px-faq summary::before {
    content: '▸';
    color: var(--primary);
    transition: transform var(--t-fast) var(--ease);
}
.px-faq details[open] summary::before { transform: rotate(90deg); }
.px-faq details p { margin-top: 0.65rem; font-size: 0.95rem; }

/* ───────── Form listino ───────── */
.px-form-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: clamp(1.5rem, 4vw, 2.5rem);
    align-items: start;
}
@media (max-width: 880px) { .px-form-grid { grid-template-columns: 1fr; } }
.px-form-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(1.25rem, 3vw, 2rem);
}
.px-checks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}
@media (max-width: 520px) { .px-checks { grid-template-columns: 1fr; } }
.px-checks label {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    padding: 0.65rem 0.85rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-900);
    cursor: pointer;
    transition: border-color var(--t-fast);
}
.px-checks label:hover { border-color: var(--gray-300); }
.px-checks input { accent-color: var(--primary); }
.px-aside {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}
.px-aside h3 { font-size: 1.15rem; margin-bottom: 1rem; }
.px-aside .feature-list { margin-top: 0; font-size: 0.95rem; }
.px-aside hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.px-aside .lbl {
    font-size: 0.78rem;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 0.4rem;
}
.px-aside .tel { font-size: 1.3rem; font-weight: 700; color: var(--gray-900); display: block; }
.px-aside .wa { display: inline-block; margin-top: 0.5rem; font-weight: 600; text-decoration: underline; }

.captcha-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.captcha-row img {
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #F8F8F8;
    flex-shrink: 0;
    user-select: none;
    display: block;
}
.px-captcha-refresh {
    width: 40px; height: 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text-mute);
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.px-captcha-refresh:hover { color: var(--primary); border-color: var(--primary); }
.px-captcha-input { text-transform: uppercase; letter-spacing: 0.15em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ───────── Illustrazioni ───────── */
/* Tabella traffico (DynamoBilling) */
.px-table-card {
    position: absolute;
    inset: 14% 8% 14% 8%;
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 24px 48px -16px rgba(0,0,0,0.18);
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    overflow: hidden;
}
.px-table-card .top { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.8rem; }
.px-table-card .top strong { color: var(--gray-900); font-size: 0.85rem; }
.px-table-card .top span { color: var(--text-mute); font-size: 0.72rem; }
.px-table-card .chart { height: 64px; background: var(--gray-50); border-radius: 8px; position: relative; overflow: hidden; }
.px-table-card .chart svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.px-table-card table { width: 100%; border-collapse: collapse; font-size: 0.72rem; }
.px-table-card th { text-align: left; color: var(--text-mute); font-weight: 600; letter-spacing: 0.06em; font-size: 0.62rem; padding: 0.3rem 0; border-bottom: 1px solid var(--border); }
.px-table-card td { padding: 0.35rem 0; border-bottom: 1px solid var(--gray-100); color: var(--text-soft); }
.px-table-card td:first-child { font-weight: 600; color: var(--gray-900); }

/* Chip numeri (numerazioni) */
.px-num-chip {
    position: absolute;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 24px -8px rgba(0,0,0,0.16);
    padding: 0.7rem 1rem;
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    font-size: 0.78rem;
    color: var(--text-soft);
    z-index: 2;
}
.px-num-chip strong { font-family: var(--font-display); font-size: 1.35rem; color: var(--primary); line-height: 1; }
.px-num-chip-1 { top: 12%; left: 8%; }
.px-num-chip-2 { top: 36%; right: 8%; }
.px-num-chip-3 { top: 60%; left: 16%; }

/* Grafico canali voce (SIP trunk) */
.px-chart-card {
    position: absolute;
    inset: 12% 10% 34% 10%;
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 24px 48px -16px rgba(0,0,0,0.18);
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.px-chart-card .dots { display: flex; gap: 0.3rem; }
.px-chart-card .dots span { width: 7px; height: 7px; border-radius: 999px; background: var(--gray-300); }
.px-chart-card .dots span:first-child { background: var(--red-500); }
.px-chart-card strong { font-size: 0.85rem; color: var(--gray-900); }
.px-chart-card .chart { flex: 1; position: relative; }
.px-chart-card .chart svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.px-chart-card .bars { display: grid; grid-template-columns: 1.2fr 2fr 1fr; gap: 0.4rem; }
.px-chart-card .bars span { height: 5px; border-radius: 3px; background: var(--gray-200); }
.px-chart-card .bars span:first-child { background: var(--red-600); }

/* Telefono con SMS */
.px-phone {
    position: absolute;
    left: 12%;
    top: 10%;
    bottom: 10%;
    width: 44%;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 26px;
    box-shadow: 0 24px 48px -16px rgba(0,0,0,0.18);
    padding: 1.6rem 0.8rem 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    overflow: hidden;
}
.px-phone::before {
    content: '';
    position: absolute;
    top: 0.6rem; left: 50%;
    width: 36px; height: 4px;
    margin-left: -18px;
    background: var(--gray-200);
    border-radius: 3px;
}
.px-bubble {
    background: var(--gray-100);
    border-radius: 12px 12px 12px 4px;
    padding: 0.5rem 0.65rem;
    font-size: 0.7rem;
    line-height: 1.35;
    color: var(--gray-900);
}
.px-campaign {
    position: absolute;
    right: 6%;
    top: 30%;
    width: 46%;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 18px 36px -12px rgba(0,0,0,0.2);
    padding: 0.85rem;
    z-index: 2;
    font-size: 0.72rem;
}
.px-campaign strong { display: block; color: var(--gray-900); font-size: 0.8rem; margin-bottom: 0.5rem; }
.px-campaign .line { height: 5px; border-radius: 3px; background: var(--gray-200); margin-bottom: 0.35rem; }
.px-campaign .line.red { background: var(--red-600); width: 70%; }
.px-campaign .legend { display: flex; justify-content: space-between; color: var(--text-mute); font-size: 0.62rem; margin-top: 0.5rem; }

/* ───────── Pagine legali ───────── */
.legal-todo {
    background: #FFF3C4;
    color: #7A5B00;
    padding: 0.05rem 0.35rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.92em;
}
.article .content h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); }
.legal-table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 520px; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--border); }
.legal-table th { background: var(--gray-50); color: var(--gray-900); font-weight: 600; }
.legal-updated { color: var(--text-mute); font-size: 0.9rem; margin-bottom: 2rem; }

.illu-chip .ic svg { width: 14px; height: 14px; }
.cta-banner .eyebrow { position: relative; }
.cta-banner .eyebrow::before { background: rgba(255,255,255,0.7); }

@media (max-width: 480px) {
    .px-bubble { font-size: 0.62rem; }
    .px-campaign { width: 52%; right: 3%; }
    .px-num-chip strong { font-size: 1.1rem; }
}
