/* Stili del sito pubblico (landing page). I documenti stampabili usano landing.css. */
:root {
    --cm-primary: #1e88e5;
    --cm-primary-dark: #1565c0;
    --cm-accent: #e53935;
    --cm-accent-dark: #c62828;
    --cm-text: #455a64;
    --cm-heading: #263238;
    --cm-surface: #f5f8fb;
    --bs-body-font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
    --bs-body-color: var(--cm-text);
    --bs-link-color: var(--cm-primary);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem; /* compensa l'header sticky per i link a ancora */
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

body {
    font-weight: 400;
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--cm-heading);
    font-weight: 600;
    line-height: 1.25;
}

/* Header */
.site-header {
    background: linear-gradient(90deg, var(--cm-primary-dark), var(--cm-primary));
    box-shadow: 0 2px 12px rgba(0, 0, 0, .18);
}

/* Header sovrapposto all'hero: trasparente in cima (.at-top), pieno dopo lo scroll o con il menu mobile aperto */
.site-header-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    transition: background-color .3s ease, box-shadow .3s ease;
}

.site-header-overlay.at-top:not(:has(.navbar-collapse.show, .navbar-collapse.collapsing)) {
    background: transparent;
    box-shadow: none;
}

.site-header .nav-link {
    color: rgba(255, 255, 255, .88);
    font-weight: 400;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus {
    color: #fff;
}

/* Bottoni */
.btn-accent {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--cm-accent);
    --bs-btn-border-color: var(--cm-accent);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--cm-accent-dark);
    --bs-btn-hover-border-color: var(--cm-accent-dark);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--cm-accent-dark);
    --bs-btn-active-border-color: var(--cm-accent-dark);
    font-weight: 500;
    border-radius: 50rem;
}

.btn-hero-outline {
    --bs-btn-color: #fff;
    --bs-btn-border-color: rgba(255, 255, 255, .8);
    --bs-btn-hover-color: var(--cm-primary-dark);
    --bs-btn-hover-bg: #fff;
    --bs-btn-hover-border-color: #fff;
    border-radius: 50rem;
    font-weight: 500;
}

/* Hero */
.hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: min(100vh, 52rem);
    padding: 7rem 0 4.5rem; /* spazio per l'header sovrapposto */
    color: #fff;
    text-align: center;
    background:
        radial-gradient(60rem 30rem at 85% 10%, rgba(79, 195, 247, .35), transparent 60%),
        radial-gradient(45rem 25rem at 0% 100%, rgba(123, 97, 255, .3), transparent 60%),
        linear-gradient(135deg, #0d47a1 0%, #1565c0 45%, #1e88e5 100%);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 -1px 0;
    height: 3.5rem;
    z-index: -1;
    background: #fff;
    clip-path: ellipse(60% 100% at 50% 100%);
}

.hero h1 {
    color: #fff;
    font-size: clamp(2rem, 4.4vw, 3.2rem);
    font-weight: 700;
    line-height: 1.15;
}

.hero .lead {
    color: #fff;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 500;
}

.hero p {
    color: rgba(255, 255, 255, .92);
}

.hero-checks {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem 1.5rem;
    font-size: .95rem;
    color: rgba(255, 255, 255, .95);
}

.hero-checks i {
    margin-right: .35rem;
    color: #81d4fa;
}

/* Mockup prodotto nell'hero: finestra browser + smartphone sovrapposto */
.hero-mockup {
    position: relative;
    max-width: 38rem;
    margin: 0 auto;
    padding-bottom: 2rem;
}

.browser-frame {
    overflow: hidden;
    border-radius: .9rem;
    background: #fff;
    box-shadow: 0 1.5rem 3.5rem rgba(0, 0, 0, .35);
}

.browser-bar {
    display: flex;
    gap: .4rem;
    padding: .6rem .8rem;
    background: #eceff1;
}

.browser-bar span {
    width: .65rem;
    height: .65rem;
    border-radius: 50%;
    background: #b0bec5;
}

.browser-frame img {
    display: block;
    width: 100%;
    height: auto;
}

.hero-mockup .hero-phone {
    position: absolute;
    right: -1rem;
    bottom: 0;
    width: 30%;
    min-width: 7rem;
    border-width: .4rem;
    border-radius: 1.4rem;
    border-color: #0d2a4a;
}

@media (min-width: 992px) {
    .hero {
        text-align: left;
    }

    .hero-checks {
        justify-content: flex-start;
    }

    .hero-mockup .hero-phone {
        right: -2rem;
    }
}

/* Sezioni */
.section {
    padding: 4.5rem 0;
}

.section-alt {
    background: var(--cm-surface);
}

.section-title {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.section-title::after {
    content: "";
    display: block;
    width: 3.5rem;
    height: 4px;
    margin: .75rem auto 0;
    border-radius: 2px;
    background: var(--cm-primary);
}

/* Punti di forza */
.highlight {
    text-align: center;
    padding: 1.5rem 1rem;
    height: 100%;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 .25rem 1rem rgba(38, 50, 56, .08);
    transition: transform .2s ease, box-shadow .2s ease;
}

.highlight:hover {
    transform: translateY(-4px);
    box-shadow: 0 .75rem 1.75rem rgba(38, 50, 56, .14);
}

.highlight img {
    width: 4.5rem;
    height: 4.5rem;
    margin-bottom: .75rem;
}

.highlight .title {
    color: var(--cm-heading);
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.highlight p {
    margin: .25rem 0 0;
    font-size: .9rem;
}

/* Funzionalità */
.feature h3 {
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.feature img {
    max-width: 100%;
    height: auto;
    border-radius: .75rem;
    box-shadow: 0 .75rem 2rem rgba(38, 50, 56, .18);
}

.feature img.plain {
    border-radius: 0;
    box-shadow: none;
}

/* Prezzi */
.price-card {
    max-width: 24rem;
    margin: 0 auto;
    border: 0;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 1rem 2.5rem rgba(38, 50, 56, .15);
}

.price-card .card-header {
    padding: 1rem;
    color: #fff;
    background: linear-gradient(90deg, var(--cm-primary-dark), var(--cm-primary));
}

.price-card .card-header h4 {
    margin: 0;
    color: #fff;
    letter-spacing: .08em;
}

.price-card .price {
    color: #2e7d32;
    font-size: 3.25rem;
    font-weight: 700;
    line-height: 1.1;
}

.price-card ul li {
    padding: .35rem 0;
    border-bottom: 1px solid #eceff1;
}

.price-card ul li:last-child {
    border-bottom: 0;
}

/* Footer */
.site-footer {
    color: rgba(255, 255, 255, .8);
    background: var(--cm-heading);
    font-size: .9rem;
}

.site-footer a {
    color: #fff;
}

/* Card informative (pubblico, normative, passi) */
.info-card {
    height: 100%;
    padding: 1.5rem;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 .25rem 1rem rgba(38, 50, 56, .08);
}

.info-card h3,
.news-card h3 {
    font-size: 1.1rem;
}

.section-alt .info-card {
    background: #fff;
}

.steps {
    padding: 0;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: .75rem;
    border-radius: 50%;
    color: #fff;
    font-weight: 600;
    background: var(--cm-primary);
}

.news-card {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 .25rem 1rem rgba(38, 50, 56, .08);
}

.faq {
    max-width: 50rem;
}

.faq .accordion-button:not(.collapsed) {
    color: var(--cm-primary-dark);
    background: var(--cm-surface);
}

/* Pagine di approfondimento */
.page-hero {
    padding: 5rem 0 3.5rem;
    color: #fff;
    background: linear-gradient(135deg, var(--cm-primary-dark), var(--cm-primary));
}

.page-hero h1 {
    color: #fff;
    font-size: clamp(1.8rem, 4.5vw, 2.8rem);
    font-weight: 700;
}

.page-hero .lead,
.page-hero .breadcrumb-item.active,
.page-hero .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, .92);
}

.page-hero .breadcrumb a {
    color: #fff;
}

.content-page {
    max-width: 62rem;
}

.content-page h2 {
    margin-bottom: 1rem;
    font-size: clamp(1.4rem, 3vw, 1.8rem);
}

a.info-card {
    color: inherit;
    transition: transform .2s ease, box-shadow .2s ease;
}

a.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 .75rem 1.75rem rgba(38, 50, 56, .14);
}

.site-footer .footer-links {
    margin-bottom: .75rem;
}

.more-link {
    display: inline-block;
    margin-top: .75rem;
    color: var(--cm-primary-dark);
    font-weight: 500;
    text-decoration: none;
}

.more-link:hover {
    text-decoration: underline;
}

.feature p + .more-link {
    margin-top: 0;
}

@media (max-width: 575.98px) {
    .highlight .title {
        font-size: .8rem;
        letter-spacing: .02em;
        overflow-wrap: anywhere;
    }

    .feature img.plain {
        max-width: 60%;
    }
}

/* Anteprime su smartphone */
.phone-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.phone-frame {
    width: 15rem;
    max-width: 100%;
    margin: 0;
    overflow: hidden;
    border: .6rem solid var(--cm-heading);
    border-radius: 2rem;
    background: #fff;
    box-shadow: 0 1rem 2.5rem rgba(38, 50, 56, .25);
}

.phone-frame img {
    display: block;
    width: 100%;
    height: auto;
}

/* Icone nelle card e nei riquadri */
.icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 3.25rem;
    height: 3.25rem;
    margin-bottom: .75rem;
    border-radius: 1rem;
    font-size: 1.5rem;
    color: var(--cm-primary-dark);
    background: linear-gradient(135deg, rgba(30, 136, 229, .16), rgba(79, 195, 247, .22));
}

.info-card-icon {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.info-card-icon .icon-badge {
    margin-bottom: 0;
}

.info-card-icon p:last-child {
    margin-bottom: 0;
}

a.info-card-icon {
    color: inherit;
}
