:root {
    color-scheme: light;
    --bg: #f7f4ef;
    --bg-2: #fffaf4;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-solid: #ffffff;
    --surface-muted: #fff7ef;
    --text: #2f3439;
    --heading: #20242a;
    --muted: #70757b;
    --border: #ebe3d9;
    --border-strong: #dccdbd;
    --primary: #d97a2b;
    --primary-dark: #bc6217;
    --primary-soft: #fff0e1;
    --secondary: #5d6670;
    --secondary-soft: #eef1f4;
    --success: #1f8b58;
    --danger: #b4453f;
    --warning: #bf751e;
    --purple: #6d54a8;
    --shadow: 0 20px 60px rgba(68, 52, 38, 0.11);
    --shadow-soft: 0 12px 30px rgba(68, 52, 38, 0.08);
    --ring: rgba(217, 122, 43, 0.16);
    --radius-xl: 34px;
    --radius-lg: 26px;
    --radius-md: 18px;
    --radius-sm: 14px;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #16181b;
    --bg-2: #20242a;
    --surface: rgba(39, 42, 47, 0.88);
    --surface-solid: #252930;
    --surface-muted: #2b251f;
    --text: #edf0f3;
    --heading: #ffffff;
    --muted: #b1b6bd;
    --border: #3a3f47;
    --border-strong: #555b64;
    --primary: #f08b36;
    --primary-dark: #ff9a45;
    --primary-soft: rgba(240, 139, 54, 0.16);
    --secondary: #d5d9de;
    --secondary-soft: #30353d;
    --success: #64d597;
    --danger: #ff8a80;
    --warning: #f6b15f;
    --purple: #b9a4f5;
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.30);
    --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.20);
    --ring: rgba(240, 139, 54, 0.22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    line-height: 1.5;
    background:
        radial-gradient(circle at top left, rgba(217, 122, 43, 0.20), transparent 25%),
        radial-gradient(circle at top right, rgba(93, 102, 112, 0.14), transparent 26%),
        linear-gradient(180deg, var(--bg-2), var(--bg));
    min-height: 100vh;
}

html[data-theme="dark"] body {
    background:
        radial-gradient(circle at top left, rgba(240, 139, 54, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(255,255,255, 0.06), transparent 24%),
        linear-gradient(180deg, var(--bg-2), var(--bg));
}

a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { color: var(--heading); letter-spacing: -0.02em; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(20px);
    background: rgba(255, 250, 244, 0.84);
    border-bottom: 1px solid rgba(235, 227, 217, 0.88);
}
html[data-theme="dark"] .topbar {
    background: rgba(32, 36, 42, 0.84);
    border-bottom-color: rgba(58, 63, 71, 0.86);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 86px;
    gap: 20px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--text);
    min-width: 0;
}
.brand:hover { text-decoration: none; }
.brand-logo {
    width: 112px;
    max-height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.10));
}
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { font-size: 1.05rem; letter-spacing: .02em; white-space: nowrap; }
.brand-copy small { font-size: .77rem; color: var(--muted); letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.menu { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.menu a {
    color: var(--secondary);
    font-weight: 760;
    padding: 10px 14px;
    border-radius: 999px;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.menu a:hover { text-decoration: none; background: var(--surface); color: var(--heading); transform: translateY(-1px); }
.menu-cta {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff !important;
    box-shadow: 0 10px 22px rgba(217, 122, 43, 0.25);
}
.menu-cta:hover { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); }
.menu-toggle,
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    color: var(--heading);
    border: 1px solid var(--border);
    border-radius: 15px;
    font-size: 22px;
    width: 46px;
    height: 46px;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease;
}
.menu-toggle:hover,
.theme-toggle:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.menu-toggle { display: none; }

.main { padding: 34px 0 56px; }
.footer { margin-top: 24px; border-top: 1px solid var(--border); background: rgba(255, 250, 244, 0.72); backdrop-filter: blur(14px); }
html[data-theme="dark"] .footer { background: rgba(32, 36, 42, 0.72); }
.footer-grid { min-height: 96px; display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 18px 0; }
.footer-brand { font-weight: 850; margin-bottom: 4px; }
.footer-copy { color: var(--muted); font-weight: 650; }

.hero {
    display: grid;
    grid-template-columns: 1.13fr .97fr;
    gap: 30px;
    align-items: center;
    min-height: calc(100vh - 230px);
}
.hero h1 { font-size: clamp(36px, 5vw, 64px); line-height: 1.02; margin: 12px 0 18px; max-width: 780px; }
.hero p { color: var(--muted); font-size: 18px; max-width: 720px; }
.eyebrow {
    display: inline-flex;
    color: var(--primary-dark);
    background: var(--primary-soft);
    border: 1px solid rgba(217, 122, 43, 0.26);
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .09em;
    padding: 8px 14px;
    border-radius: 999px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-badges,
.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.soft-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    font-weight: 750;
    color: var(--secondary);
}
.hero-panel { display: grid; gap: 18px; }
.hero-card,
.card,
.auth-card,
.stat-card,
.comment,
.mini-card,
.feature-card,
.insight-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}
.hero-card,
.card,
.auth-card { padding: 28px; }
.brand-showcase { display: flex; align-items: center; gap: 20px; position: relative; overflow: hidden; }
.brand-showcase::after {
    content: "";
    position: absolute;
    right: -50px;
    bottom: -70px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(217, 122, 43, 0.11);
}
.hero-logo { width: 196px; max-width: 42%; object-fit: contain; filter: drop-shadow(0 14px 18px rgba(0,0,0,.11)); position: relative; z-index: 1; }
.hero-feature-grid,
.feature-grid,
.service-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.feature-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mini-card,
.feature-card,
.insight-card { padding: 20px; box-shadow: var(--shadow-soft); }
.mini-card strong,
.feature-card h3 { display: block; margin-bottom: 8px; }
.mini-card span,
.feature-card p { color: var(--muted); }
.icon-bubble,
.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 22px;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(217, 122, 43, .16);
}
.section-soft { margin-top: 22px; }

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 16px;
    border: 1px solid transparent;
    font-weight: 850;
    cursor: pointer;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; box-shadow: 0 14px 26px rgba(217, 122, 43, 0.26); }
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); }
.btn-secondary { background: var(--surface); color: var(--heading); border-color: var(--border); box-shadow: var(--shadow-soft); }
.btn-danger { background: rgba(180, 69, 63, .12); color: var(--danger); border-color: rgba(180, 69, 63, .28); box-shadow: var(--shadow-soft); }
.btn-danger:hover { background: rgba(180, 69, 63, .18); }
.btn-ghost { background: transparent; color: var(--heading); border-color: var(--border); }
.btn-small { padding: 8px 12px; border-radius: 12px; font-size: 13px; }

.auth-card { max-width: 540px; margin: 30px auto; }
.auth-card.wide { max-width: 900px; }
.auth-surface { background: linear-gradient(180deg, var(--surface), var(--surface-muted)); }
.auth-brand { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.auth-brand img { width: 122px; object-fit: contain; filter: drop-shadow(0 10px 16px rgba(0,0,0,.09)); }
.auth-brand h1 { margin: 0 0 6px; }

.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 8px; font-weight: 760; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 13px 14px;
    font: inherit;
    color: var(--text);
    background: rgba(255,255,255,.86);
    box-shadow: inset 0 1px 2px rgba(0,0,0,.025);
}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea { background: rgba(22, 24, 27, .52); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 4px solid var(--ring); border-color: var(--primary); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.full { grid-column: 1 / -1; }
.help, .small { font-size: 13px; }
.muted { color: var(--muted); }
.alert { padding: 14px 16px; border-radius: 17px; margin-bottom: 18px; font-weight: 760; box-shadow: var(--shadow-soft); }
.alert-success { background: rgba(31, 139, 88, .12); color: var(--success); border: 1px solid rgba(31, 139, 88, .25); }
.alert-error { background: rgba(180, 69, 63, .12); color: var(--danger); border: 1px solid rgba(180, 69, 63, .25); }

.page-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 22px; }
.page-head h1 { margin: 0 0 5px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.card { margin-bottom: 22px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.dashboard-welcome {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 18px;
    align-items: stretch;
    margin-bottom: 22px;
}
.welcome-panel {
    background: linear-gradient(135deg, rgba(217,122,43,.13), rgba(255,255,255,.62));
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    padding: 28px;
    position: relative;
    overflow: hidden;
}
html[data-theme="dark"] .welcome-panel { background: linear-gradient(135deg, rgba(240,139,54,.18), rgba(39,42,47,.78)); }
.welcome-panel::after {
    content: "";
    position: absolute;
    right: -70px;
    top: -70px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: rgba(217, 122, 43, 0.15);
}
.welcome-panel h1 { margin: 0 0 8px; font-size: clamp(30px, 4vw, 46px); }
.insight-card { display: grid; gap: 12px; }
.insight-card strong { font-size: 28px; color: var(--heading); }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 22px; }
.stat-card { padding: 20px; display: grid; gap: 14px; box-shadow: var(--shadow-soft); position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; width: 90px; height: 90px; right: -38px; bottom: -38px; border-radius: 50%; background: var(--primary-soft); }
.stat-card strong { font-size: 36px; line-height: 1; color: var(--heading); }
.stat-card-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; position: relative; z-index: 1; }
.stat-card-number { position: relative; z-index: 1; }
.stat-card small { color: var(--muted); font-weight: 700; }
.table-wrap { overflow-x: auto; border-radius: 22px; border: 1px solid var(--border); background: rgba(255,255,255,.62); }
html[data-theme="dark"] .table-wrap { background: rgba(22,24,27,.25); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
tr:hover td { background: rgba(255, 249, 243, .75); }
html[data-theme="dark"] tr:hover td { background: rgba(255,255,255,.04); }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.table-title { font-weight: 850; color: var(--heading); }
.table-sub { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 11px; font-size: 12px; font-weight: 900; white-space: nowrap; }
.badge-blue { background: rgba(93, 102, 112, .14); color: var(--secondary); }
.badge-yellow { background: rgba(217, 122, 43, .14); color: var(--primary-dark); }
.badge-green { background: rgba(31, 139, 88, .13); color: var(--success); }
.badge-red { background: rgba(180, 69, 63, .13); color: var(--danger); }
.badge-purple { background: rgba(109, 84, 168, .13); color: var(--purple); }
.badge-gray { background: rgba(112, 117, 123, .13); color: var(--secondary); }
.badge-light { background: var(--primary-soft); color: var(--primary-dark); }
.filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.filters input { flex: 1 1 280px; }
.filters select { flex: 0 0 200px; }
.center { text-align: center; }
.ticket-layout { display: grid; grid-template-columns: 1fr 350px; gap: 22px; align-items: start; }
.ticket-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.preline { white-space: pre-line; }
.side-card dl { display: grid; grid-template-columns: 100px 1fr; gap: 10px 12px; }
.side-card dt { color: var(--muted); font-weight: 850; }
.side-card dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.compact { gap: 12px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 22px 0; }
.comment { padding: 17px; margin: 14px 0; background: rgba(255,255,255,.62); }
html[data-theme="dark"] .comment { background: rgba(22,24,27,.28); }
.comment-head { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); }
.comment-head strong { color: var(--heading); }
.comment-form { margin-top: 20px; }
.attachment { font-weight: 850; }
.inline-form { display: inline; }

.ticket-progress {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin: 18px 0 4px;
}
.progress-step {
    position: relative;
    padding: 12px 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255,255,255,.48);
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}
html[data-theme="dark"] .progress-step { background: rgba(22,24,27,.25); }
.progress-step.active,
.progress-step.done {
    border-color: rgba(217,122,43,.35);
    background: var(--primary-soft);
    color: var(--primary-dark);
}
.progress-step.done::before { content: "✓ "; }

.empty-state {
    padding: 34px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    text-align: center;
    color: var(--muted);
    background: rgba(255,255,255,.36);
}

@media (max-width: 1040px) {
    .menu-toggle { display: inline-flex; }
    .menu {
        display: none;
        position: absolute;
        left: 16px;
        right: 16px;
        top: 86px;
        background: var(--surface-solid);
        padding: 14px;
        border-radius: 22px;
        border: 1px solid var(--border);
        box-shadow: var(--shadow);
        flex-direction: column;
        align-items: stretch;
        z-index: 80;
    }
    .menu a { width: 100%; }
    .menu-open .menu { display: flex; }
}

@media (max-width: 980px) {
    .hero,
    .ticket-layout,
    .dashboard-welcome,
    .grid-3,
    .feature-grid.three { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
    .hero,
    .grid-2,
    .hero-feature-grid,
    .feature-grid,
    .service-grid { grid-template-columns: 1fr; }
    .page-head { align-items: flex-start; flex-direction: column; }
    .page-actions { justify-content: flex-start; }
    .footer-grid { flex-direction: column; align-items: flex-start; }
    .ticket-progress { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .container { width: min(100% - 24px, 1180px); }
    .stats-grid { grid-template-columns: 1fr; }
    .hero { min-height: auto; }
    .hero h1 { font-size: 34px; }
    .card,
    .auth-card,
    .hero-card { padding: 20px; }
    .brand-logo { width: 86px; }
    .brand-copy strong { font-size: .96rem; }
    .brand-copy small { font-size: .68rem; }
    .auth-brand { align-items: flex-start; }
    .theme-toggle { width: 43px; height: 43px; }
}

@media print {
    :root { color-scheme: light; }
    html[data-theme="dark"] { color-scheme: light; }
    body { background: #fff !important; color: #111 !important; }
    .no-print,
    .btn,
    .comment-form,
    .theme-toggle,
    .menu-toggle { display: none !important; }
    .container { width: 100%; }
    .main { padding: 0; }
    .card,
    .comment,
    .stat-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        background: #fff !important;
    }
    .ticket-layout { grid-template-columns: 1fr; }
    a { color: #111; text-decoration: none; }
}


/* Pagine informative N.G. Systems */
.page-hero {
    margin-top: 8px;
    margin-bottom: 24px;
}
.split-hero {
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    gap: 28px;
    align-items: center;
}
.page-hero h1 {
    font-size: clamp(34px, 4.4vw, 58px);
    line-height: 1.04;
    margin: 12px 0 16px;
    max-width: 820px;
}
.page-hero p {
    color: var(--muted);
    font-size: 18px;
    max-width: 760px;
}
.company-card,
.software-card,
.contact-summary {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.company-card::after,
.software-card::after,
.contact-summary::after {
    content: "";
    position: absolute;
    right: -70px;
    bottom: -80px;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    background: rgba(217, 122, 43, 0.12);
    pointer-events: none;
}
.company-logo,
.contact-logo {
    width: 210px;
    margin-bottom: 22px;
    filter: drop-shadow(0 14px 18px rgba(0,0,0,.10));
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.info-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 22px;
    backdrop-filter: blur(16px);
}
.info-card p { color: var(--muted); }
.timeline-grid,
.process-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.timeline-item,
.process-list > div {
    border: 1px solid var(--border);
    background: rgba(255,255,255,.42);
    border-radius: 20px;
    padding: 18px;
}
html[data-theme="dark"] .timeline-item,
html[data-theme="dark"] .process-list > div { background: rgba(22,24,27,.25); }
.process-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.map-card {
    min-height: 380px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    background: var(--surface);
}
.map-card iframe {
    width: 100%;
    height: 100%;
    min-height: 380px;
    border: 0;
}
.map-placeholder {
    min-height: 380px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    text-align: center;
    padding: 32px;
    background:
        radial-gradient(circle at center, rgba(217,122,43,.13), transparent 35%),
        linear-gradient(135deg, var(--surface), var(--surface-muted));
}
.map-placeholder span { font-size: 54px; }
.map-placeholder code {
    background: var(--secondary-soft);
    color: var(--heading);
    border-radius: 8px;
    padding: 2px 6px;
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 22px;
    align-items: start;
}
.contact-list,
.quick-contact-list { display: grid; gap: 12px; }
.contact-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255,255,255,.46);
    border: 1px solid var(--border);
}
html[data-theme="dark"] .contact-item { background: rgba(22,24,27,.25); }
.contact-item > span {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 900;
}
.contact-item p { margin: 3px 0 0; color: var(--muted); }
.quick-contact {
    display: grid;
    grid-template-columns: 42px 1fr;
    column-gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.42);
    color: var(--heading);
}
.quick-contact:hover { text-decoration: none; border-color: var(--border-strong); transform: translateY(-1px); }
.quick-contact span { font-size: 24px; grid-row: span 2; }
.quick-contact small { color: var(--muted); }
.icon-bubble.big {
    width: 70px;
    height: 70px;
    border-radius: 24px;
    font-size: 36px;
    margin-bottom: 20px;
}
.callout-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
    padding: 28px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(217,122,43,.28);
    background: linear-gradient(135deg, var(--primary-soft), var(--surface));
    box-shadow: var(--shadow);
}
.callout-card h2 { margin-top: 0; }
.callout-card p { color: var(--muted); margin-bottom: 0; }
.footer-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.footer-links a {
    color: var(--secondary);
    font-weight: 700;
    font-size: 14px;
}

@media (max-width: 980px) {
    .split-hero,
    .contact-grid,
    .info-grid,
    .info-grid.three,
    .timeline-grid,
    .process-list {
        grid-template-columns: 1fr;
    }
    .company-card,
    .software-card,
    .contact-summary { min-height: auto; }
    .callout-card { flex-direction: column; align-items: flex-start; }
}

/* Software personalizzato page */
.software-slider {
    position: relative;
    overflow: hidden;
    padding: 0;
    min-height: 560px;
    margin-bottom: 28px;
}

.software-slider__track {
    position: relative;
    min-height: 560px;
}

.software-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .6s ease, visibility .6s ease;
}

.software-slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.software-slide > img {
    width: 100%;
    height: 560px;
    object-fit: cover;
}

.software-slide__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 34px;
    color: #fff;
    background: linear-gradient(180deg, rgba(19, 22, 28, 0.08) 0%, rgba(19, 22, 28, 0.78) 100%);
}

.software-slide__overlay h1,
.software-slide__overlay h2,
.software-slide__overlay p {
    color: #fff;
    max-width: 860px;
}

.software-slide__overlay h1,
.software-slide__overlay h2 {
    margin: 12px 0 14px;
    font-size: clamp(32px, 4vw, 58px);
    line-height: 1.04;
}

.software-slide__overlay p {
    font-size: 18px;
    margin: 0;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.34);
    background: rgba(20, 23, 29, 0.42);
    color: #fff;
    font-size: 34px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
}
.slider-arrow--prev { left: 18px; }
.slider-arrow--next { right: 18px; }
.slider-arrow:hover { background: rgba(20, 23, 29, 0.62); }

.slider-dots {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.slider-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border-radius: 999px;
    border: 0;
    background: rgba(255,255,255,.45);
    cursor: pointer;
}

.slider-dot.is-active {
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255,255,255,.18);
}

.software-intro { min-height: auto; margin-top: 10px; }
.software-side-card { align-self: stretch; }
.software-story-grid {
    display: grid;
    gap: 18px;
}
.software-story-card {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: center;
    overflow: hidden;
    padding: 0;
}
.software-story-card img {
    width: 100%;
    height: 100%;
    min-height: 230px;
    object-fit: cover;
}
.software-story-card > div {
    padding: 26px 28px 26px 0;
}
.software-story-card.reverse {
    grid-template-columns: 1fr 320px;
}
.software-story-card.reverse img {
    order: 2;
}
.software-story-card.reverse > div {
    order: 1;
    padding: 26px 0 26px 28px;
}
.software-process-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.callout-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 980px) {
    .software-story-card,
    .software-story-card.reverse {
        grid-template-columns: 1fr;
    }
    .software-story-card > div,
    .software-story-card.reverse > div {
        padding: 0 24px 24px;
    }
    .software-story-card.reverse img { order: 0; }
}

@media (max-width: 720px) {
    .software-slider,
    .software-slider__track,
    .software-slide > img {
        min-height: 470px;
        height: 470px;
    }
    .software-slide__overlay {
        padding: 22px;
    }
    .slider-arrow {
        width: 44px;
        height: 44px;
        font-size: 28px;
    }
}

@media (max-width: 560px) {
    .software-slide__overlay h1,
    .software-slide__overlay h2 {
        font-size: 28px;
    }
    .software-slide__overlay p {
        font-size: 16px;
    }
    .slider-arrow {
        top: auto;
        bottom: 64px;
        transform: none;
    }
    .slider-arrow--prev { left: 14px; }
    .slider-arrow--next { right: 14px; }
}

/* Upgrade pagina Software personalizzato / su misura */
.software-slider {
    isolation: isolate;
}
.software-slide.is-active > img {
    animation: sliderImageZoom 5.4s ease forwards;
}
.software-slide.is-active .software-slide__overlay .eyebrow,
.software-slide.is-active .software-slide__overlay h1,
.software-slide.is-active .software-slide__overlay h2,
.software-slide.is-active .software-slide__overlay p,
.software-slide.is-active .software-slide__overlay .hero-actions {
    animation: slideTextUp .72s ease both;
}
.software-slide.is-active .software-slide__overlay h1,
.software-slide.is-active .software-slide__overlay h2 { animation-delay: .08s; }
.software-slide.is-active .software-slide__overlay p { animation-delay: .16s; }
.software-slide.is-active .software-slide__overlay .hero-actions { animation-delay: .24s; }

@keyframes sliderImageZoom {
    from { transform: scale(1.04); }
    to { transform: scale(1.10); }
}
@keyframes slideTextUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .7s ease, transform .7s ease;
}
.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.seo-service-band {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.seo-service-band article {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 7px;
}
.seo-service-band strong {
    color: var(--heading);
    font-size: 1.04rem;
}
.seo-service-band span {
    color: var(--muted);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}
.portfolio-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-solid);
    box-shadow: var(--shadow-soft);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
html[data-theme="dark"] .portfolio-card { background: var(--surface); }
.portfolio-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--border-strong);
}
.portfolio-card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
}
.portfolio-card div {
    padding: 20px;
}
.portfolio-card h3 {
    margin: 12px 0 8px;
}
.portfolio-card p {
    color: var(--muted);
    margin-bottom: 0;
}

.software-contact-layout {
    display: grid;
    grid-template-columns: .86fr 1.14fr;
    gap: 22px;
    align-items: start;
}
.software-contact-copy,
.software-contact-form {
    margin-bottom: 0;
}
.software-contact-copy h2 {
    margin-top: 12px;
}
.software-contact-form h3 {
    margin-top: 0;
}
.compact-form-row {
    gap: 12px;
}

.callout-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 980px) {
    .seo-service-band,
    .portfolio-grid,
    .software-contact-layout {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .software-slide.is-active > img,
    .software-slide.is-active .software-slide__overlay .eyebrow,
    .software-slide.is-active .software-slide__overlay h1,
    .software-slide.is-active .software-slide__overlay h2,
    .software-slide.is-active .software-slide__overlay p,
    .software-slide.is-active .software-slide__overlay .hero-actions,
    .reveal-on-scroll {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}


/* Pulsanti WhatsApp fissi su tutto il sito */
.nav-call-book {
    background: #19a463 !important;
    color: #fff !important;
    font-weight: 900 !important;
    box-shadow: 0 10px 22px rgba(25, 164, 99, 0.25);
}
.nav-call-book:hover {
    background: #12834f !important;
    color: #fff !important;
}

.whatsapp-floating {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 80;
    display: grid;
    gap: 10px;
    width: min(280px, calc(100vw - 36px));
}

.whatsapp-action {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 15px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    font-weight: 800;
    line-height: 1.1;
    box-shadow: 0 14px 30px rgba(18, 131, 79, 0.25);
    backdrop-filter: blur(12px);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.whatsapp-action:hover {
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(18, 131, 79, 0.32);
    filter: saturate(1.06);
}

.whatsapp-action__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 18px;
}

.whatsapp-action--video {
    background: linear-gradient(135deg, #22c55e, #129a5b);
}

.whatsapp-action--voice {
    background: linear-gradient(135deg, #18b46b, #0f7f4b);
}

.whatsapp-action--book {
    background: #19a463;
    color: #fff !important;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.whatsapp-action--book strong {
    color: #fff;
    font-weight: 950;
}

html[data-theme="dark"] .whatsapp-action {
    border-color: rgba(255,255,255,.16);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.36);
}

@media (max-width: 720px) {
    .whatsapp-floating {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
        grid-template-columns: 1fr;
    }
    .whatsapp-action {
        justify-content: center;
        padding: 11px 13px;
        font-size: 14px;
    }
    body {
        padding-bottom: 168px;
    }
}

@media (min-width: 721px) {
    .whatsapp-floating .whatsapp-action--video,
    .whatsapp-floating .whatsapp-action--voice {
        width: max-content;
        min-width: 215px;
        justify-self: end;
    }
}

@media print {
    .whatsapp-floating,
    .nav-call-book {
        display: none !important;
    }
}

/* Forzatura stile pulsanti di prenotazione CALL: verde + testo bianco grassetto */
.nav-call-book,
a.nav-call-book,
.menu a.nav-call-book,
[data-open-whatsapp-call],
.whatsapp-action--book,
a.whatsapp-action--book,
.btn-book-call,
a.btn-book-call {
    background: #25d366 !important;
    background-image: none !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    border-color: #25d366 !important;
    text-shadow: none !important;
}

.nav-call-book:hover,
a.nav-call-book:hover,
.menu a.nav-call-book:hover,
[data-open-whatsapp-call]:hover,
.whatsapp-action--book:hover,
a.whatsapp-action--book:hover,
.btn-book-call:hover,
a.btn-book-call:hover {
    background: #128c4a !important;
    background-image: none !important;
    color: #ffffff !important;
    border-color: #128c4a !important;
}

.whatsapp-action--book *,
.nav-call-book *,
.btn-book-call * {
    color: #ffffff !important;
    font-weight: 900 !important;
}
