/* ==========================================================
   CARILLIA — AGGIORNAMENTO VISIVO DEL SITO
   ========================================================== */

:root {
    --blue: #2463ce;
    --blue2: #184da6;
    --ink: #182b47;
    --muted: #465d7c;
    --accent: #54ebd0;
    --line: #c6d8f1;
    --bg: #e8f0fc;
}

body {
    background: #e8f0fc;
    color: var(--ink);
}

/* Navigazione */
.topbar {
    background: linear-gradient(100deg, #184da6, #2871dc);
}

.navbar {
    background: rgba(235, 243, 255, 0.96) !important;
    border-bottom: 1px solid #bdd0ee;
    box-shadow: 0 6px 28px rgba(25, 65, 130, 0.08);
    backdrop-filter: blur(16px);
}

.brand-symbol {
    background: linear-gradient(135deg, #2057bc, #3984ee);
    box-shadow: 0 6px 16px rgba(36, 99, 206, 0.24);
}

.nav-link {
    border-radius: 9px;
    transition: background-color 180ms ease, color 180ms ease;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
    background: #dbe8fc;
    color: #174b9e;
}

/* Sezione iniziale */
.hero {
    position: relative;
    isolation: isolate;
    background:
        radial-gradient(
            ellipse at 82% 20%,
            rgba(91, 232, 216, 0.22),
            transparent 45%
        ),
        radial-gradient(
            ellipse at 10% 90%,
            rgba(116, 156, 255, 0.28),
            transparent 50%
        ),
        linear-gradient(120deg, #2054ae, #286acb 60%, #2478c9);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to right, transparent, black);
}

.hero h1 {
    text-shadow: 0 5px 24px rgba(10, 40, 100, 0.12);
}

.hero .accent {
    color: #70ffe0;
}

.hero p {
    color: #f1f6ff;
}

.hero .col-lg-7 {
    animation: carillia-enter 650ms ease-out both;
}

.hero img {
    animation: carillia-enter 850ms ease-out both;
    filter: drop-shadow(0 24px 32px rgba(8, 38, 90, 0.28));
}

.pill {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
}

/* Sezioni: riduce il bianco pieno */
.section {
    background:
        radial-gradient(
            ellipse at 100% 0,
            rgba(133, 177, 255, 0.18),
            transparent 55%
        ),
        #eaf1fc;
}

.section.soft {
    background:
        radial-gradient(
            ellipse at 0 100%,
            rgba(73, 171, 216, 0.12),
            transparent 55%
        ),
        #dce8f9;
}

.section-intro {
    color: #405978;
}

/* Card */
.card-pro {
    position: relative;
    border: 1px solid #c2d4ef;
    border-radius: 22px;
    background: linear-gradient(145deg, #f7faff, #eaf2ff);
    box-shadow:
        0 12px 30px rgba(29, 67, 125, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    transition:
        transform 220ms ease,
        box-shadow 220ms ease,
        border-color 220ms ease;
}

.card-pro h3 {
    color: #193b70;
}

.card-pro p {
    color: #435a79;
}

.card-pro a {
    font-weight: 650;
}

.card-pro .number {
    border: 1px solid #bad1f4;
    border-radius: 13px;
    color: #174da8;
    background: linear-gradient(135deg, #dceaff, #cce0fc);
    box-shadow: 0 5px 12px rgba(36, 99, 206, 0.09);
}

/* Pulsanti */
.btn {
    border-radius: 12px;
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease;
}

.btn-primary {
    background: linear-gradient(120deg, #2059be, #327de0);
    border-color: #2463ce;
    box-shadow: 0 7px 18px rgba(36, 99, 206, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(120deg, #184da6, #246bd1);
    border-color: #184da6;
    box-shadow: 0 10px 24px rgba(36, 99, 206, 0.27);
}

.hero .btn-light {
    background: #eaf7ff;
    border-color: #eaf7ff;
    color: #17458e;
    box-shadow: 0 8px 20px rgba(10, 36, 85, 0.15);
}

/* Invito al contatto */
.cta {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 26px;
    background:
        radial-gradient(
            ellipse at 95% 0,
            rgba(84, 235, 208, 0.24),
            transparent 55%
        ),
        linear-gradient(120deg, #2054ae, #2a70d1);
    box-shadow: 0 20px 40px rgba(24, 70, 145, 0.18);
}

.cta h2 {
    color: white;
}

/* Moduli */
.form-control,
.form-select {
    border: 1px solid #b4c9e7;
    border-radius: 12px;
    background-color: #f8fbff;
    color: #182b47;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.form-control:focus,
.form-select:focus {
    background-color: white;
    border-color: #3275d8;
    box-shadow: 0 0 0 4px rgba(36, 99, 206, 0.13);
}

.form-control:disabled {
    background: #dfe9f7;
    color: #405978;
}

.form-check-input:checked {
    background-color: #2463ce;
    border-color: #2463ce;
}

/* Dashboard */
.dashboard {
    background: linear-gradient(145deg, #e6eefb, #d6e4f8);
}

.dash-side {
    background:
        radial-gradient(
            ellipse at top right,
            rgba(84, 235, 208, 0.18),
            transparent 60%
        ),
        linear-gradient(155deg, #2054ae, #286acb);
    box-shadow: 0 15px 30px rgba(24, 70, 145, 0.16);
}

.kpi strong {
    color: #2059ba;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: #182b47;
    --bs-table-border-color: #c8d7ed;
}

/* Footer */
footer {
    background: linear-gradient(120deg, #d2e2f7, #e2ecfa);
    border-top: 1px solid #b9cfea;
}

footer a:hover {
    color: #174da8;
}

.footer-bottom {
    border-top-color: #b9cfea;
}

/* Movimento solo su dispositivi con mouse */
@media (hover: hover) and (pointer: fine) {
    .card-pro:hover {
        transform: translateY(-7px);
        border-color: #7da8e5;
        box-shadow: 0 22px 40px rgba(29, 67, 125, 0.15);
    }

    .btn:hover {
        transform: translateY(-2px);
    }
}

@keyframes carillia-enter {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Rispetta la preferenza di riduzione delle animazioni */
@media (prefers-reduced-motion: reduce) {
    .hero .col-lg-7,
    .hero img {
        animation: none;
    }

    .card-pro,
    .btn,
    .nav-link,
    .form-control,
    .form-select {
        transition: none;
    }

    .card-pro:hover,
    .btn:hover {
        transform: none;
    }
}